summaryrefslogtreecommitdiff
path: root/drivers/scsi/isci/init.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-02-18 20:25:11 +0300
committerDan Williams <dan.j.williams@intel.com>2011-07-03 14:55:27 +0400
commit92f4f0f544a6a75979bace0c43fee9c4fb95830c (patch)
treebf1c8d9e4fff6af6004b4e5bd1dc17b2f299911e /drivers/scsi/isci/init.c
parent77950f51f5299c1b4f4fa4a19974128da720d199 (diff)
downloadlinux-92f4f0f544a6a75979bace0c43fee9c4fb95830c.tar.xz
isci: implement error isr
Add basic support for handling/reporting error interrupts. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/init.c')
-rw-r--r--drivers/scsi/isci/init.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c
index f2bd92b81136..4d6decb6d08c 100644
--- a/drivers/scsi/isci/init.c
+++ b/drivers/scsi/isci/init.c
@@ -330,11 +330,17 @@ static int isci_setup_interrupts(struct pci_dev *pdev)
int id = i / SCI_NUM_MSI_X_INT;
struct msix_entry *msix = &pci_info->msix_entries[i];
struct isci_host *isci_host = isci_host_by_id(pdev, id);
+ irq_handler_t isr;
+
+ /* odd numbered vectors are error interrupts */
+ if (i & 1)
+ isr = isci_error_isr;
+ else
+ isr = isci_msix_isr;
BUG_ON(!isci_host);
- /* @todo: need to handle error case. */
- err = devm_request_irq(&pdev->dev, msix->vector, isci_msix_isr, 0,
+ err = devm_request_irq(&pdev->dev, msix->vector, isr, 0,
DRV_NAME"-msix", isci_host);
if (!err)
continue;