scsi: lpfc: fix block guard enablement on SLI3 adapters
authorMartin Wilck <mwilck@suse.com>
Mon, 12 Nov 2018 08:58:37 +0000 (09:58 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 28 Nov 2018 17:14:25 +0000 (12:14 -0500)
commitdfb7513374c1f8e7cd595106fbdba3fd07ebaf30
treef9403932f43f44000da7a50130cf54fe4dfd522c
parent8e4829c6f7470722c1f5a1dc5769ebe09ef036d6
scsi: lpfc: fix block guard enablement on SLI3 adapters

Since f44ac12f1dcc, BG enablement is tracked with the LPFC_SLI3_BG_ENABLED
bit, which is set in lpfc_get_cfgparam before lpfc_sli_config_sli_port() is
called. The bit shouldn't be cleared before checking the feature.  Based on
problem analysis by David Bond.

Fixes: f44ac12f1dcc "scsi: lpfc: Memory allocation error during driver start-up on power8"
Tested-by: David Bond <dbond@suse.com>
Signed-off-by: Martin Wilck <mwilck@suse.com>
Cc: stable@vger.kernel.org # 4.17.x
Cc: stable@vger.kernel.org # 4.18.x
Cc: stable@vger.kernel.org # 4.19.x
Reviewed-by: Hannes Reinecke <hare@suse.com>
Acked-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_sli.c