diff options
author | Dan Williams <dan.j.williams@intel.com> | 2011-02-18 12:25:11 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 06:55:27 -0400 |
commit | 92f4f0f544a6a75979bace0c43fee9c4fb95830c (patch) | |
tree | bf1c8d9e4fff6af6004b4e5bd1dc17b2f299911e /drivers/scsi/isci/init.c | |
parent | 77950f51f5299c1b4f4fa4a19974128da720d199 (diff) |
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.c | 10 |
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) | |||
330 | int id = i / SCI_NUM_MSI_X_INT; | 330 | int id = i / SCI_NUM_MSI_X_INT; |
331 | struct msix_entry *msix = &pci_info->msix_entries[i]; | 331 | struct msix_entry *msix = &pci_info->msix_entries[i]; |
332 | struct isci_host *isci_host = isci_host_by_id(pdev, id); | 332 | struct isci_host *isci_host = isci_host_by_id(pdev, id); |
333 | irq_handler_t isr; | ||
334 | |||
335 | /* odd numbered vectors are error interrupts */ | ||
336 | if (i & 1) | ||
337 | isr = isci_error_isr; | ||
338 | else | ||
339 | isr = isci_msix_isr; | ||
333 | 340 | ||
334 | BUG_ON(!isci_host); | 341 | BUG_ON(!isci_host); |
335 | 342 | ||
336 | /* @todo: need to handle error case. */ | 343 | err = devm_request_irq(&pdev->dev, msix->vector, isr, 0, |
337 | err = devm_request_irq(&pdev->dev, msix->vector, isci_msix_isr, 0, | ||
338 | DRV_NAME"-msix", isci_host); | 344 | DRV_NAME"-msix", isci_host); |
339 | if (!err) | 345 | if (!err) |
340 | continue; | 346 | continue; |