Skip to content

Commit 53e13ee

Browse files
jsmart-ghmartinkpetersen
authored andcommitted
scsi: lpfc: Correct MDS diag and nvmet configuration
A recent change added some MDS processing in the lpfc_drain_txq routine that relies on the fcp_wq being allocated. For nvmet operation the fcp_wq is not allocated because it can only be an nvme-target. When the original MDS support was added LS_MDS_LOOPBACK was defined wrong, (0x16) it should have been 0x10 (decimal value used for hex setting). This incorrect value allowed MDS_LOOPBACK to be set simultaneously with LS_NPIV_FAB_SUPPORTED, causing the driver to crash when it accesses the non-existent fcp_wq. Correct the bad value setting for LS_MDS_LOOPBACK. Fixes: ae9e28f ("lpfc: Add MDS Diagnostic support.") Cc: <stable@vger.kernel.org> # v4.12+ Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Tested-by: Ewan D. Milne <emilne@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 9abd999 commit 53e13ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/lpfc/lpfc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ struct lpfc_hba {
672672
#define LS_NPIV_FAB_SUPPORTED 0x2 /* Fabric supports NPIV */
673673
#define LS_IGNORE_ERATT 0x4 /* intr handler should ignore ERATT */
674674
#define LS_MDS_LINK_DOWN 0x8 /* MDS Diagnostics Link Down */
675-
#define LS_MDS_LOOPBACK 0x16 /* MDS Diagnostics Link Up (Loopback) */
675+
#define LS_MDS_LOOPBACK 0x10 /* MDS Diagnostics Link Up (Loopback) */
676676

677677
uint32_t hba_flag; /* hba generic flags */
678678
#define HBA_ERATT_HANDLED 0x1 /* This flag is set when eratt handled */

0 commit comments

Comments
 (0)