scsi: lpfc: Fix Port going offline after multiple resets.
authorJames Smart <jsmart2021@gmail.com>
Fri, 2 Jun 2017 04:07:01 +0000 (21:07 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 13 Jun 2017 01:37:31 +0000 (21:37 -0400)
commit14041bd170c28f652a91f6ac343acbabfdf1ef4b
tree1bbfe1c5317bfea4de64730465203e3dbb4ccf91
parent6599e12428a8b3b182e91818cb7b73ab29e7daff
scsi: lpfc: Fix Port going offline after multiple resets.

Observing lpfc port down after issuing hbacmd reset command

Failure in posting SGL buffers. If there is only one SGL buffer and rrq
is valid for its XRI, we are rightly returning NULL but not adding the
buffer back to the SGL list. So, number of buffers become less than
total count and repost fails during reset.

Add SGL buffer back to list before returning NULL.

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