projects
/
platform
/
kernel
/
linux-amlogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea8a6a5
)
scsi: megaraid: disable device when probe failed after enabled device
author
Xiang Chen
<chenxiang66@hisilicon.com>
Sat, 7 Sep 2019 01:07:30 +0000
(09:07 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Tue, 29 Oct 2019 08:14:57 +0000
(09:14 +0100)
[ Upstream commit
70054aa39a013fa52eff432f2223b8bd5c0048f8
]
For pci device, need to disable device when probe failed after enabled
device.
Link:
https://lore.kernel.org/r/1567818450-173315-1-git-send-email-chenxiang66@hisilicon.com
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Reviewed-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/megaraid.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/megaraid.c
b/drivers/scsi/megaraid.c
index
19bffe0
..
2cbfec6
100644
(file)
--- a/
drivers/scsi/megaraid.c
+++ b/
drivers/scsi/megaraid.c
@@
-4219,11
+4219,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 */
}