aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libahci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/libahci.c')
-rw-r--r--drivers/ata/libahci.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index 5a1329e31609..0d028ead99e8 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -2378,7 +2378,7 @@ static int ahci_port_start(struct ata_port *ap)
2378 /* 2378 /*
2379 * Switch to per-port locking in case each port has its own MSI vector. 2379 * Switch to per-port locking in case each port has its own MSI vector.
2380 */ 2380 */
2381 if (hpriv->flags & (AHCI_HFLAG_MULTI_MSI | AHCI_HFLAG_MULTI_MSIX)) { 2381 if (hpriv->flags & AHCI_HFLAG_MULTI_MSI) {
2382 spin_lock_init(&pp->lock); 2382 spin_lock_init(&pp->lock);
2383 ap->lock = &pp->lock; 2383 ap->lock = &pp->lock;
2384 } 2384 }
@@ -2520,7 +2520,7 @@ static int ahci_host_activate_multi_irqs(struct ata_host *host,
2520 */ 2520 */
2521 for (i = 0; i < host->n_ports; i++) { 2521 for (i = 0; i < host->n_ports; i++) {
2522 struct ahci_port_priv *pp = host->ports[i]->private_data; 2522 struct ahci_port_priv *pp = host->ports[i]->private_data;
2523 int irq = ahci_irq_vector(hpriv, i); 2523 int irq = hpriv->get_irq_vector(host, i);
2524 2524
2525 /* Do not receive interrupts sent by dummy ports */ 2525 /* Do not receive interrupts sent by dummy ports */
2526 if (!pp) { 2526 if (!pp) {
@@ -2556,10 +2556,15 @@ int ahci_host_activate(struct ata_host *host, struct scsi_host_template *sht)
2556 int irq = hpriv->irq; 2556 int irq = hpriv->irq;
2557 int rc; 2557 int rc;
2558 2558
2559 if (hpriv->flags & (AHCI_HFLAG_MULTI_MSI | AHCI_HFLAG_MULTI_MSIX)) { 2559 if (hpriv->flags & AHCI_HFLAG_MULTI_MSI) {
2560 if (hpriv->irq_handler) 2560 if (hpriv->irq_handler)
2561 dev_warn(host->dev, 2561 dev_warn(host->dev,
2562 "both AHCI_HFLAG_MULTI_MSI flag set and custom irq handler implemented\n"); 2562 "both AHCI_HFLAG_MULTI_MSI flag set and custom irq handler implemented\n");
2563 if (!hpriv->get_irq_vector) {
2564 dev_err(host->dev,
2565 "AHCI_HFLAG_MULTI_MSI requires ->get_irq_vector!\n");
2566 return -EIO;
2567 }
2563 2568
2564 rc = ahci_host_activate_multi_irqs(host, sht); 2569 rc = ahci_host_activate_multi_irqs(host, sht);
2565 } else { 2570 } else {