isci: implement error isr

Add basic support for handling/reporting error interrupts.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
Dan Williams
2011-02-18 09:25:11 -08:00
parent 77950f51f5
commit 92f4f0f544
4 changed files with 33 additions and 22 deletions

View File

@@ -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;