|
@@ -1789,7 +1789,7 @@ static void ahci_port_intr(struct ata_port *ap)
|
|
|
ahci_handle_port_interrupt(ap, port_mmio, status);
|
|
|
}
|
|
|
|
|
|
-irqreturn_t ahci_thread_fn(int irq, void *dev_instance)
|
|
|
+static irqreturn_t ahci_thread_fn(int irq, void *dev_instance)
|
|
|
{
|
|
|
struct ata_port *ap = dev_instance;
|
|
|
struct ahci_port_priv *pp = ap->private_data;
|
|
@@ -1809,7 +1809,6 @@ irqreturn_t ahci_thread_fn(int irq, void *dev_instance)
|
|
|
|
|
|
return IRQ_HANDLED;
|
|
|
}
|
|
|
-EXPORT_SYMBOL_GPL(ahci_thread_fn);
|
|
|
|
|
|
static void ahci_hw_port_interrupt(struct ata_port *ap)
|
|
|
{
|
|
@@ -1823,7 +1822,7 @@ static void ahci_hw_port_interrupt(struct ata_port *ap)
|
|
|
pp->intr_status |= status;
|
|
|
}
|
|
|
|
|
|
-irqreturn_t ahci_hw_interrupt(int irq, void *dev_instance)
|
|
|
+static irqreturn_t ahci_hw_interrupt(int irq, void *dev_instance)
|
|
|
{
|
|
|
struct ata_port *ap_this = dev_instance;
|
|
|
struct ahci_port_priv *pp = ap_this->private_data;
|
|
@@ -1877,9 +1876,8 @@ irqreturn_t ahci_hw_interrupt(int irq, void *dev_instance)
|
|
|
|
|
|
return IRQ_WAKE_THREAD;
|
|
|
}
|
|
|
-EXPORT_SYMBOL_GPL(ahci_hw_interrupt);
|
|
|
|
|
|
-irqreturn_t ahci_interrupt(int irq, void *dev_instance)
|
|
|
+static irqreturn_t ahci_interrupt(int irq, void *dev_instance)
|
|
|
{
|
|
|
struct ata_host *host = dev_instance;
|
|
|
struct ahci_host_priv *hpriv;
|
|
@@ -1938,7 +1936,6 @@ irqreturn_t ahci_interrupt(int irq, void *dev_instance)
|
|
|
|
|
|
return IRQ_RETVAL(handled);
|
|
|
}
|
|
|
-EXPORT_SYMBOL_GPL(ahci_interrupt);
|
|
|
|
|
|
unsigned int ahci_qc_issue(struct ata_queued_cmd *qc)
|
|
|
{
|
|
@@ -2472,24 +2469,8 @@ void ahci_set_em_messages(struct ahci_host_priv *hpriv,
|
|
|
}
|
|
|
EXPORT_SYMBOL_GPL(ahci_set_em_messages);
|
|
|
|
|
|
-/**
|
|
|
- * ahci_host_activate - start AHCI host, request IRQs and register it
|
|
|
- * @host: target ATA host
|
|
|
- * @irq: base IRQ number to request
|
|
|
- * @sht: scsi_host_template to use when registering the host
|
|
|
- *
|
|
|
- * Similar to ata_host_activate, but requests IRQs according to AHCI-1.1
|
|
|
- * when multiple MSIs were allocated. That is one MSI per port, starting
|
|
|
- * from @irq.
|
|
|
- *
|
|
|
- * LOCKING:
|
|
|
- * Inherited from calling layer (may sleep).
|
|
|
- *
|
|
|
- * RETURNS:
|
|
|
- * 0 on success, -errno otherwise.
|
|
|
- */
|
|
|
-int ahci_host_activate(struct ata_host *host, int irq,
|
|
|
- struct scsi_host_template *sht)
|
|
|
+static int ahci_host_activate_multi_irqs(struct ata_host *host, int irq,
|
|
|
+ struct scsi_host_template *sht)
|
|
|
{
|
|
|
int i, rc;
|
|
|
|
|
@@ -2531,6 +2512,36 @@ out_free_irqs:
|
|
|
|
|
|
return rc;
|
|
|
}
|
|
|
+
|
|
|
+/**
|
|
|
+ * ahci_host_activate - start AHCI host, request IRQs and register it
|
|
|
+ * @host: target ATA host
|
|
|
+ * @irq: base IRQ number to request
|
|
|
+ * @sht: scsi_host_template to use when registering the host
|
|
|
+ *
|
|
|
+ * Similar to ata_host_activate, but requests IRQs according to AHCI-1.1
|
|
|
+ * when multiple MSIs were allocated. That is one MSI per port, starting
|
|
|
+ * from @irq.
|
|
|
+ *
|
|
|
+ * LOCKING:
|
|
|
+ * Inherited from calling layer (may sleep).
|
|
|
+ *
|
|
|
+ * RETURNS:
|
|
|
+ * 0 on success, -errno otherwise.
|
|
|
+ */
|
|
|
+int ahci_host_activate(struct ata_host *host, int irq,
|
|
|
+ struct scsi_host_template *sht)
|
|
|
+{
|
|
|
+ struct ahci_host_priv *hpriv = host->private_data;
|
|
|
+ int rc;
|
|
|
+
|
|
|
+ if (hpriv->flags & AHCI_HFLAG_MULTI_MSI)
|
|
|
+ rc = ahci_host_activate_multi_irqs(host, irq, sht);
|
|
|
+ else
|
|
|
+ rc = ata_host_activate(host, irq, ahci_interrupt,
|
|
|
+ IRQF_SHARED, sht);
|
|
|
+ return rc;
|
|
|
+}
|
|
|
EXPORT_SYMBOL_GPL(ahci_host_activate);
|
|
|
|
|
|
MODULE_AUTHOR("Jeff Garzik");
|