}
}
-#ifndef __sparc__
+ /*
+ * Device is reset now. It must have de-asserted the interrupt line
+ * (if it was asserted) and it should be safe to register for the
+ * interrupt now.
+ */
+ if ((ret == 0) && (reason == MPT_HOSTEVENT_IOC_BRINGUP)) {
+ ioc->pci_irq = -1;
+ if (ioc->pcidev->irq) {
+ if (mpt_msi_enable && !pci_enable_msi(ioc->pcidev))
+ printk(MYIOC_s_INFO_FMT "PCI-MSI enabled\n",
+ ioc->name);
+ rc = request_irq(ioc->pcidev->irq, mpt_interrupt,
+ SA_SHIRQ, ioc->name, ioc);
+ if (rc < 0) {
-#else
- printk(MYIOC_s_ERR_FMT "Unable to allocate "
- "interrupt %s!\n", ioc->name,
- __irq_itoa(ioc->pcidev->irq));
-#endif
+ printk(MYIOC_s_ERR_FMT "Unable to allocate "
+ "interrupt %d!\n", ioc->name,
+ ioc->pcidev->irq);
-#ifndef __sparc__
+ if (mpt_msi_enable)
+ pci_disable_msi(ioc->pcidev);
+ return -EBUSY;
+ }
+ irq_allocated = 1;
+ ioc->pci_irq = ioc->pcidev->irq;
+ pci_set_master(ioc->pcidev); /* ?? */
+ pci_set_drvdata(ioc->pcidev, ioc);
-#else
- dprintk((KERN_INFO MYNAM ": %s installed at interrupt "
- "%s\n", ioc->name,
- __irq_itoa(ioc->pcidev->irq)));
-#endif
+ dprintk((KERN_INFO MYNAM ": %s installed at interrupt "
+ "%d\n", ioc->name, ioc->pcidev->irq));
+ }
+ }
+
/* Prime reply & request queues!
* (mucho alloc's) Must be done prior to
* init as upper addresses are needed for init.