From 4031826b3ca40982880f6b9f2282c7d7fad60d77 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Tue, 3 Jul 2007 01:38:47 +0900 Subject: libata: fix assigned IRQ reporting host->irq and host->irq2 should be set before ata_host_register() for IRQ reporting to work. Move up host->irq assignment in ata_host_activate() and add it to ata_pci_init_one() native path and pata_cs5520. The port info printing in ata_host_register() doesn't fit all the different controllers. It should probably be moved out to LLDs with some helpers in the future. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- drivers/ata/libata-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/ata/libata-core.c') diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 2407f848294..981b397cb46 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -6423,14 +6423,14 @@ int ata_host_activate(struct ata_host *host, int irq, if (rc) return rc; + /* Used to print device info at probe */ + host->irq = irq; + rc = ata_host_register(host, sht); /* if failed, just free the IRQ and leave ports alone */ if (rc) devm_free_irq(host->dev, irq, host); - /* Used to print device info at probe */ - host->irq = irq; - return rc; } -- cgit v1.2.3