linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] lpfc: Don't return internal MBXERR_ERROR code from probe function
@ 2017-08-28 13:05 Stefano Brivio
  2017-09-06  8:32 ` Stefano Brivio
  2017-09-06  9:02 ` [PATCH RESEND] " Stefano Brivio
  0 siblings, 2 replies; 12+ messages in thread
From: Stefano Brivio @ 2017-08-28 13:05 UTC (permalink / raw)
  To: Dick Kennedy, James Smart, QLogic-Storage-Upstream
  Cc: Maurizio Lombardi, martin.petersen, James E . J . Bottomley,
	linux-scsi

Internal error codes happen to be positive, thus the PCI driver
core won't treat them as failure, but we do. This would cause a
crash later on as lpfc_pci_remove_one() is called (e.g. as
shutdown function).

Fixes: 6d368e532168 ("[SCSI] lpfc 8.3.24: Add resource extent support")
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
---
 drivers/scsi/lpfc/lpfc_init.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 491aa95eb0f6..38cc2b5bb5a2 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -6118,6 +6118,7 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba)
 				"Extents and RPI headers enabled.\n");
 		}
 		mempool_free(mboxq, phba->mbox_mem_pool);
+		rc = -EIO;
 		goto out_free_bsmbx;
 	}
 
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-09-16  1:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-28 13:05 [PATCH] lpfc: Don't return internal MBXERR_ERROR code from probe function Stefano Brivio
2017-09-06  8:32 ` Stefano Brivio
2017-09-06  8:42   ` Johannes Thumshirn
2017-09-06  8:47     ` Stefano Brivio
2017-09-06  8:52       ` Johannes Thumshirn
2017-09-06  9:02 ` [PATCH RESEND] " Stefano Brivio
2017-09-06  9:30   ` Johannes Thumshirn
2017-09-06  9:54     ` Stefano Brivio
2017-09-06 10:02       ` Johannes Thumshirn
2017-09-15  1:19   ` Martin K. Petersen
2017-09-15 14:18     ` James Smart
2017-09-16  1:16   ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).