Commit a6849b9f authored by Alexander Gordeev's avatar Alexander Gordeev Committed by Tejun Heo

AHCI: Pass SCSI host template as arg to ahci_host_activate()

This update is a prerequisite for consolidation of
AHCI host activation code within ahci_host_activate()
function.
Signed-off-by: default avatarAlexander Gordeev <agordeev@redhat.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Cc: linux-ide@vger.kernel.org
parent 36888e95
...@@ -1230,8 +1230,7 @@ static int ahci_init_interrupts(struct pci_dev *pdev, unsigned int n_ports, ...@@ -1230,8 +1230,7 @@ static int ahci_init_interrupts(struct pci_dev *pdev, unsigned int n_ports,
* ahci_host_activate - start AHCI host, request IRQs and register it * ahci_host_activate - start AHCI host, request IRQs and register it
* @host: target ATA host * @host: target ATA host
* @irq: base IRQ number to request * @irq: base IRQ number to request
* @irq_handler: irq_handler used when requesting IRQs * @sht: scsi_host_template to use when registering the host
* @irq_flags: irq_flags used when requesting IRQs
* *
* Similar to ata_host_activate, but requests IRQs according to AHCI-1.1 * 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 * when multiple MSIs were allocated. That is one MSI per port, starting
...@@ -1243,7 +1242,8 @@ static int ahci_init_interrupts(struct pci_dev *pdev, unsigned int n_ports, ...@@ -1243,7 +1242,8 @@ static int ahci_init_interrupts(struct pci_dev *pdev, unsigned int n_ports,
* RETURNS: * RETURNS:
* 0 on success, -errno otherwise. * 0 on success, -errno otherwise.
*/ */
int ahci_host_activate(struct ata_host *host, int irq) int ahci_host_activate(struct ata_host *host, int irq,
struct scsi_host_template *sht)
{ {
int i, rc; int i, rc;
...@@ -1271,7 +1271,7 @@ int ahci_host_activate(struct ata_host *host, int irq) ...@@ -1271,7 +1271,7 @@ int ahci_host_activate(struct ata_host *host, int irq)
for (i = 0; i < host->n_ports; i++) for (i = 0; i < host->n_ports; i++)
ata_port_desc(host->ports[i], "irq %d", irq + i); ata_port_desc(host->ports[i], "irq %d", irq + i);
rc = ata_host_register(host, &ahci_sht); rc = ata_host_register(host, sht);
if (rc) if (rc)
goto out_free_all_irqs; goto out_free_all_irqs;
...@@ -1488,7 +1488,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1488,7 +1488,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
pci_set_master(pdev); pci_set_master(pdev);
if (hpriv->flags & AHCI_HFLAG_MULTI_MSI) if (hpriv->flags & AHCI_HFLAG_MULTI_MSI)
return ahci_host_activate(host, pdev->irq); return ahci_host_activate(host, pdev->irq, &ahci_sht);
return ata_host_activate(host, pdev->irq, ahci_interrupt, IRQF_SHARED, return ata_host_activate(host, pdev->irq, ahci_interrupt, IRQF_SHARED,
&ahci_sht); &ahci_sht);
......
...@@ -392,7 +392,8 @@ irqreturn_t ahci_interrupt(int irq, void *dev_instance); ...@@ -392,7 +392,8 @@ irqreturn_t ahci_interrupt(int irq, void *dev_instance);
irqreturn_t ahci_hw_interrupt(int irq, void *dev_instance); irqreturn_t ahci_hw_interrupt(int irq, void *dev_instance);
irqreturn_t ahci_thread_fn(int irq, void *dev_instance); irqreturn_t ahci_thread_fn(int irq, void *dev_instance);
void ahci_print_info(struct ata_host *host, const char *scc_s); void ahci_print_info(struct ata_host *host, const char *scc_s);
int ahci_host_activate(struct ata_host *host, int irq); int ahci_host_activate(struct ata_host *host, int irq,
struct scsi_host_template *sht);
void ahci_error_handler(struct ata_port *ap); void ahci_error_handler(struct ata_port *ap);
static inline void __iomem *__ahci_port_base(struct ata_host *host, static inline void __iomem *__ahci_port_base(struct ata_host *host,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment