]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
scsi: lpfc: Fix Port going offline after
authorJames Smart <james.smart@broadcom.com>
Wed, 12 Jul 2017 22:49:17 +0000 (18:49 -0400)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 14 Jul 2017 00:14:05 +0000 (17:14 -0700)
[backport of f4af07d4df21c5d02f66a0174b9669187a40bf1e]
From: rkennedy <dick.kennedy@avagotech.com>

Orabug: 26439257

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>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/scsi/lpfc/lpfc_sli.c

index 09a012edea9e6bd5906af0123ecbc0252ab88771..2fcc8a9a3fbba938173625f13707ded3b1f73f0b 100644 (file)
@@ -952,6 +952,7 @@ __lpfc_sli_get_sglq(struct lpfc_hba *phba, struct lpfc_iocbq *piocbq)
                        list_remove_head(lpfc_sgl_list, sglq,
                                                struct lpfc_sglq, list);
                        if (sglq == start_sglq) {
+                               list_add_tail(&sglq->list, lpfc_sgl_list);
                                sglq = NULL;
                                break;
                        } else