[PATCH 76/76] xhci: add the meaningful IRQ description if it is empty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Adrian Huang <ahuang12@xxxxxxxxxx>

When some xHCI host controllers fall back to use the legacy IRQ,
the member irq_descr of the usb_hcd structure will be empty. This
leads to the empty string of the xHCI host controller in
/proc/interrupts. Here is the example (The irq 19 is the xHCI host
controller):

           CPU0
  0:         91		IO-APIC-edge      	timer
  8:          1         IO-APIC-edge      	rtc0
  9:       7191         IO-APIC-fasteoi   	acpi
 18:        104       	IR-IO-APIC-fasteoi 	ehci_hcd:usb1, ehci_hcd:usb2
 19:        473     	IR-IO-APIC-fasteoi

After applying the patch, the name of the registered xHCI host
controller can be displayed correctly. Here is the example:

           CPU0
  0:         91		IO-APIC-edge      	timer
  8:          1         IO-APIC-edge      	rtc0
  9:       7191         IO-APIC-fasteoi   	acpi
 18:        104       	IR-IO-APIC-fasteoi 	ehci_hcd:usb1, ehci_hcd:usb2
 19:        473     	IR-IO-APIC-fasteoi	xhci_hcd:usb3

Tested on v3.14-rc4.

Signed-off-by: Adrian Huang <ahuang12@xxxxxxxxxx>
Reviewed-by: Nagananda Chumbalkar <nchumbalkar@xxxxxxxxxx>
Signed-off-by: Sarah Sharp <sarah.a.sharp@xxxxxxxxxxxxxxx>
---
 drivers/usb/host/xhci.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 1db3c2794a49..652be2138b4b 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -390,6 +390,10 @@ static int xhci_try_enable_msi(struct usb_hcd *hcd)
 	}
 
  legacy_irq:
+	if (!strlen(hcd->irq_descr))
+		snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d",
+			 hcd->driver->description, hcd->self.busnum);
+
 	/* fall back to legacy interrupt*/
 	ret = request_irq(pdev->irq, &usb_hcd_irq, IRQF_SHARED,
 			hcd->irq_descr, hcd);
-- 
1.8.5.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux