Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80efde4b authored by Xiang Chen's avatar Xiang Chen Committed by Greg Kroah-Hartman
Browse files

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.com


Signed-off-by: default avatarXiang Chen <chenxiang66@hisilicon.com>
Reviewed-by: default avatarJohn Garry <john.garry@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent ea8a6a58
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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 */
	}