mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-17 22:05:08 +00:00
ata: core: fix irq description on AHCI single irq systems
On my machine with single irq AHCI just the PCI id is printed as description in /proc/interrupts. I found a related discussion from beginning of this year: http://www.gossamer-threads.com/lists/linux/kernel/2117335 Seems like 4f37b504768c ("libata: Use dev_name() for request_irq() to distinguish devices") tried to fix displaying a proper interrupt description for one scenario but broke it for another one. The mentioned discussion ended in the current situation being considered as broken but w/o a patch to fix it. The following patch is based on a proposal in this mail thread. Now the interrupt is properly described as: PCI-MSI 512000-edge ahci[0000:00:1f.2] By combining both values also the scenario that commit 4f37b504768c ("libata: Use dev_name() for request_irq() to distinguish devices") refers to should still be fine. There it should look like this now: ahci[20100000.ide] Using managed memory allocation ensures that the irq description lives at least as long as the interrupt. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
This commit is contained in:
parent
2ef42f4a7e
commit
7e22c0024c
@ -6223,6 +6223,7 @@ int ata_host_activate(struct ata_host *host, int irq,
|
|||||||
struct scsi_host_template *sht)
|
struct scsi_host_template *sht)
|
||||||
{
|
{
|
||||||
int i, rc;
|
int i, rc;
|
||||||
|
char *irq_desc;
|
||||||
|
|
||||||
rc = ata_host_start(host);
|
rc = ata_host_start(host);
|
||||||
if (rc)
|
if (rc)
|
||||||
@ -6234,8 +6235,14 @@ int ata_host_activate(struct ata_host *host, int irq,
|
|||||||
return ata_host_register(host, sht);
|
return ata_host_register(host, sht);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
irq_desc = devm_kasprintf(host->dev, GFP_KERNEL, "%s[%s]",
|
||||||
|
dev_driver_string(host->dev),
|
||||||
|
dev_name(host->dev));
|
||||||
|
if (!irq_desc)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
rc = devm_request_irq(host->dev, irq, irq_handler, irq_flags,
|
rc = devm_request_irq(host->dev, irq, irq_handler, irq_flags,
|
||||||
dev_name(host->dev), host);
|
irq_desc, host);
|
||||||
if (rc)
|
if (rc)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user