Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

AHCI: Make distinct names for ports in /proc/interrupts

Currently all interrupts assigned to AHCI ports show up in
'/proc/interrupts' as 'ahci'. This fix adds port numbers as
suffixes and hence makes the descriptions distinct.

Reported-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>

authored by

Alexander Gordeev and committed by
Tejun Heo
b29900e6 966fbe19

+14 -1
+3 -1
drivers/ata/ahci.c
··· 1142 1142 return rc; 1143 1143 1144 1144 for (i = 0; i < host->n_ports; i++) { 1145 + struct ahci_port_priv *pp = host->ports[i]->private_data; 1146 + 1145 1147 rc = devm_request_threaded_irq(host->dev, 1146 1148 irq + i, ahci_hw_interrupt, ahci_thread_fn, IRQF_SHARED, 1147 - dev_driver_string(host->dev), host->ports[i]); 1149 + pp->irq_desc, host->ports[i]); 1148 1150 if (rc) 1149 1151 goto out_free_irqs; 1150 1152 }
+1
drivers/ata/ahci.h
··· 306 306 int fbs_last_dev; /* save FBS.DEV of last FIS */ 307 307 /* enclosure management info per PM slot */ 308 308 struct ahci_em_priv em_priv[EM_MAX_SLOTS]; 309 + char *irq_desc; /* desc in /proc/interrupts */ 309 310 }; 310 311 311 312 struct ahci_host_priv {
+10
drivers/ata/libahci.c
··· 2234 2234 if (!pp) 2235 2235 return -ENOMEM; 2236 2236 2237 + if (ap->host->n_ports > 1) { 2238 + pp->irq_desc = devm_kzalloc(dev, 8, GFP_KERNEL); 2239 + if (!pp->irq_desc) { 2240 + devm_kfree(dev, pp); 2241 + return -ENOMEM; 2242 + } 2243 + snprintf(pp->irq_desc, 8, 2244 + "%s%d", dev_driver_string(dev), ap->port_no); 2245 + } 2246 + 2237 2247 /* check FBS capability */ 2238 2248 if ((hpriv->cap & HOST_CAP_FBS) && sata_pmp_supported(ap)) { 2239 2249 void __iomem *port_mmio = ahci_port_base(ap);