Skip to contentSkip to conversation

mpt2sas: Fix for issue - Unable to boot from the SAS drive connected to HBA

PATCH RESEND Superseded [email protected] 2 participants 2 messages Aug 21, 2012 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 mpt2sas: Fix for issue - Unable to boot from the SAS drive connected to HBA

Fix for issue - Unable to boot from the SAS drive connected to HBA

This patch checks whether HBA is SAS2008 B0 controller.
if it is a SAS2008 B0 controller then it use IO-APIC interrupt instead of MSIX, as SAS2008 B0 controller doesn't support MSIX interrupts.

---

drivers/scsi/mpt2sas/mpt2sas_base.c +9 -0
index 6102ef2..fd2f4ad 100644
@@ -1207,6 +1207,15 @@ _base_check_enable_msix(struct MPT2SAS_ADAPTER *ioc)
 {
 	int base;
 	u16 message_control;
+	u8 revision;
+
+	/* Check whether controller SAS2008 B0 controller,
+	   if it is a SAS2008 B0 controller use IO-APIC instead of MSIX */
+	pci_read_config_byte(ioc->pdev, PCI_CLASS_REVISION, &revision);
+	if (ioc->pdev->device == MPI2_MFGPAGE_DEVID_SAS2008 &&
+	    revision == 0x01) {
+		return -EINVAL;
+	}
 
 
 	base = pci_find_capability(ioc->pdev, PCI_CAP_ID_MSIX);
#1 lore raw

Am Dienstag 21 August 2012, 21:53:15 schrieb [email protected]:

Quoted 15 lines

Fix for issue - Unable to boot from the SAS drive connected to HBA

This patch checks whether HBA is SAS2008 B0 controller.
if it is a SAS2008 B0 controller then it use IO-APIC interrupt instead of MSIX, as SAS2008 B0 controller doesn't support MSIX interrupts.

---

(quoted diff) +0 -0

b/drivers/scsi/mpt2sas/mpt2sas_base.c index 6102ef2..fd2f4ad 100644

drivers/scsi/mpt2sas/mpt2sas_base.c _base_check_enable_msix(struct MPT2SAS_ADAPTER *ioc) · line 1214

Quoted 8 lines
drivers/scsi/mpt2sas/mpt2sas_base.c +5 -0
@@ -1207,6 +1207,15 @@ _base_check_enable_msix(struct MPT2SAS_ADAPTER *ioc)
 {
 	int base;
 	u16 message_control;
+	u8 revision;
+
+	/* Check whether controller SAS2008 B0 controller,
+	   if it is a SAS2008 B0 controller use IO-APIC instead of MSIX */
+	pci_read_config_byte(ioc->pdev, PCI_CLASS_REVISION, &revision);

Nope. Just use ioc->pdev->revision here.

drivers/scsi/mpt2sas/mpt2sas_base.c _base_check_enable_msix(struct MPT2SAS_ADAPTER *ioc) · line 1221

Quoted 7 lines
drivers/scsi/mpt2sas/mpt2sas_base.c +4 -0
+	if (ioc->pdev->device == MPI2_MFGPAGE_DEVID_SAS2008 &&
+	    revision == 0x01) {
+		return -EINVAL;
+	}
 
 
 	base = pci_find_capability(ioc->pdev, PCI_CAP_ID_MSIX);

Eike