linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH] scsi: megaraid: disable device when probe failed after enabled device
@ 2019-09-07  1:07 chenxiang
  2019-09-10  8:29 ` John Garry
  2019-09-24  2:55 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: chenxiang @ 2019-09-07  1:07 UTC (permalink / raw)
  To: martin.petersen
  Cc: linuxarm, linux-scsi, john.garry, kashyap.desai, sumit.saxena,
	shivasharan.srikanteshwara, Xiang Chen

From: Xiang Chen <chenxiang66@hisilicon.com>

For pci device, need to disable device when probe failed after enabled
device.

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
---
 drivers/scsi/megaraid.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index 45a6604..ff6d4aa 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -4183,11 +4183,11 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
 		 */
 		if (pdev->subsystem_vendor == PCI_VENDOR_ID_COMPAQ &&
 		    pdev->subsystem_device == 0xC000)
-		   	return -ENODEV;
+			goto out_disable_device;
 		/* Now check the magic signature byte */
 		pci_read_config_word(pdev, PCI_CONF_AMISIG, &magic);
 		if (magic != HBA_SIGNATURE_471 && magic != HBA_SIGNATURE)
-			return -ENODEV;
+			goto out_disable_device;
 		/* Ok it is probably a megaraid */
 	}
 
-- 
2.8.1


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

end of thread, other threads:[~2019-09-24  2:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-07  1:07 [RESEND PATCH] scsi: megaraid: disable device when probe failed after enabled device chenxiang
2019-09-10  8:29 ` John Garry
2019-09-24  2:55 ` 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).