mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 22:21:42 +00:00
scsi: megaraid: disable device when probe failed after enabled device
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>
This commit is contained in:
parent
0ed8810276
commit
70054aa39a
@ -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 */
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user