scsi: lpfc: Fix crash doing IO with resets
authorJames Smart <jsmart2021@gmail.com>
Fri, 16 Jun 2017 05:56:48 +0000 (22:56 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 20 Jun 2017 01:40:44 +0000 (21:40 -0400)
commit11e644e2a2afa34a4d0ca896cf722572317b21ed
tree18d75de2f364a868031f59128f460644457c0b2c
parent569dbe84a3e769009aa4a5d1030d000168889580
scsi: lpfc: Fix crash doing IO with resets

During every reset, IOCBs are allocated. So, at one point, number of
allocated IOCBs reaches maximum limit and lpfc_sli_next_iotag fails.

Allocate IOCBs only during initialization. Reuse them after every reset
instead of allocating new set of IOCBs.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_sli.c