Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 254417
b: refs/heads/master
c: 31e824e
h: refs/heads/master
i:
  254415: d5dcbda
v: v3
  • Loading branch information
Dan Williams committed Jul 3, 2011
1 parent 2eae6cb commit ae2a2f4
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e2023b8735956bb78f167d0fdc575364e69b02c4
refs/heads/master: 31e824ed0d8c84c5232405167b2338ffc071ae8a
26 changes: 11 additions & 15 deletions trunk/drivers/scsi/isci/host.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,23 +77,19 @@ irqreturn_t isci_msix_isr(int vec, void *data)

irqreturn_t isci_intx_isr(int vec, void *data)
{
struct pci_dev *pdev = data;
struct isci_host *ihost;
irqreturn_t ret = IRQ_NONE;
int i;
struct isci_host *ihost = data;
struct scic_sds_controller *scic = ihost->core_controller;

for_each_isci_host(i, ihost, pdev) {
struct scic_sds_controller *scic = ihost->core_controller;

if (scic_sds_controller_isr(scic)) {
tasklet_schedule(&ihost->completion_tasklet);
ret = IRQ_HANDLED;
} else if (scic_sds_controller_error_isr(scic)) {
spin_lock(&ihost->scic_lock);
scic_sds_controller_error_handler(scic);
spin_unlock(&ihost->scic_lock);
ret = IRQ_HANDLED;
}
if (scic_sds_controller_isr(scic)) {
writel(SMU_ISR_COMPLETION, &scic->smu_registers->interrupt_status);
tasklet_schedule(&ihost->completion_tasklet);
ret = IRQ_HANDLED;
} else if (scic_sds_controller_error_isr(scic)) {
spin_lock(&ihost->scic_lock);
scic_sds_controller_error_handler(scic);
spin_unlock(&ihost->scic_lock);
ret = IRQ_HANDLED;
}

return ret;
Expand Down
17 changes: 11 additions & 6 deletions trunk/drivers/scsi/isci/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ static int num_controllers(struct pci_dev *pdev)
static int isci_setup_interrupts(struct pci_dev *pdev)
{
int err, i, num_msix;
struct isci_host *ihost;
struct isci_pci_info *pci_info = to_pci_info(pdev);

/*
Expand All @@ -353,35 +354,39 @@ static int isci_setup_interrupts(struct pci_dev *pdev)
for (i = 0; i < num_msix; i++) {
int id = i / SCI_NUM_MSI_X_INT;
struct msix_entry *msix = &pci_info->msix_entries[i];
struct isci_host *isci_host = pci_info->hosts[id];
irq_handler_t isr;

ihost = pci_info->hosts[id];
/* odd numbered vectors are error interrupts */
if (i & 1)
isr = isci_error_isr;
else
isr = isci_msix_isr;

err = devm_request_irq(&pdev->dev, msix->vector, isr, 0,
DRV_NAME"-msix", isci_host);
DRV_NAME"-msix", ihost);
if (!err)
continue;

dev_info(&pdev->dev, "msix setup failed falling back to intx\n");
while (i--) {
id = i / SCI_NUM_MSI_X_INT;
isci_host = pci_info->hosts[id];
ihost = pci_info->hosts[id];
msix = &pci_info->msix_entries[i];
devm_free_irq(&pdev->dev, msix->vector, isci_host);
devm_free_irq(&pdev->dev, msix->vector, ihost);
}
pci_disable_msix(pdev);
goto intx;
}
return 0;

intx:
err = devm_request_irq(&pdev->dev, pdev->irq, isci_intx_isr,
IRQF_SHARED, DRV_NAME"-intx", pdev);
for_each_isci_host(i, ihost, pdev) {
err = devm_request_irq(&pdev->dev, pdev->irq, isci_intx_isr,
IRQF_SHARED, DRV_NAME"-intx", ihost);
if (err)
break;
}
return err;
}

Expand Down

0 comments on commit ae2a2f4

Please sign in to comment.