提交 c3d475c7 编写于 作者: X Xiang Chen 提交者: Greg Kroah-Hartman

scsi: megaraid: disable device when probe failed after enabled device

[ 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.comSigned-off-by: NXiang Chen <chenxiang66@hisilicon.com>
Reviewed-by: NJohn Garry <john.garry@huawei.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
上级 c6d91bd3
...@@ -4189,11 +4189,11 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -4189,11 +4189,11 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
*/ */
if (pdev->subsystem_vendor == PCI_VENDOR_ID_COMPAQ && if (pdev->subsystem_vendor == PCI_VENDOR_ID_COMPAQ &&
pdev->subsystem_device == 0xC000) pdev->subsystem_device == 0xC000)
return -ENODEV; goto out_disable_device;
/* Now check the magic signature byte */ /* Now check the magic signature byte */
pci_read_config_word(pdev, PCI_CONF_AMISIG, &magic); pci_read_config_word(pdev, PCI_CONF_AMISIG, &magic);
if (magic != HBA_SIGNATURE_471 && magic != HBA_SIGNATURE) if (magic != HBA_SIGNATURE_471 && magic != HBA_SIGNATURE)
return -ENODEV; goto out_disable_device;
/* Ok it is probably a megaraid */ /* Ok it is probably a megaraid */
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册