diff options
| author | Hannes Reinecke <hare@suse.com> | 2017-07-03 18:09:14 +0200 |
|---|---|---|
| committer | Hannes Reinecke <hare@suse.com> | 2021-03-14 10:48:42 +0100 |
| commit | 66215c55d4bc633a83910fb6ee5fa1464e6e9c08 (patch) | |
| tree | fdedd37c86d07d2b9a3177ec50375c892b571f45 | |
| parent | f749d8b7a9896bc6e5ffe104cc64345037e0b152 (diff) | |
| download | scsi-devel-66215c55d4bc633a83910fb6ee5fa1464e6e9c08.tar.gz | |
megaraid_mbox: Add support for legacy MegaRAID3 cards
MegaRAID3 HBAs share the PCI ID with generic i960 cards, so
we need to check the magic AMI signature port.
Signed-off-by: Hannes Reinecke <hare@suse.com>
| -rw-r--r-- | drivers/scsi/megaraid/megaraid_mbox.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c index d57e93872d7b5..9bfdee06ec9b8 100644 --- a/drivers/scsi/megaraid/megaraid_mbox.c +++ b/drivers/scsi/megaraid/megaraid_mbox.c @@ -273,6 +273,12 @@ static struct pci_device_id pci_id_table_g[] = { PCI_ANY_ID, }, { + PCI_VENDOR_ID_INTEL, + PCI_DEVICE_ID_AMI_MEGARAID3, + PCI_ANY_ID, + PCI_ANY_ID, + }, + { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_AMI_MEGARAID3, PCI_ANY_ID, @@ -424,6 +430,25 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) // Enable bus-mastering on this controller pci_set_master(pdev); + /* + * Older MegaRAID3 HBAs share the PCI ID with generic i960 + * devices. + */ + if (pdev->vendor == PCI_VENDOR_ID_INTEL) { + u16 magic; + /* + * Don't fall over the Compaq management cards using the same + * PCI identifier + */ + if (pdev->subsystem_vendor == PCI_VENDOR_ID_COMPAQ && + pdev->subsystem_device == 0xC000) + return -ENODEV; + /* 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; + } + // Allocate the per driver initialization structure adapter = kzalloc(sizeof(adapter_t), GFP_KERNEL); |
