Skip to contentSkip to conversation

usb: ohci-at91: Use dynamic device name for OHCI HCD creation

PATCH Superseded Mihai Sain 2 participants 3 messages Jun 11, 2025 – Jun 12, 2025 1 message not in the archive

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Mihai Sain

author
#0 lore raw

PATCH 1/1 usb: ohci-at91: Use dynamic device name for OHCI HCD creation

Use the dynamic device name instead of the hardcoded string "at91" when creating the OHCI host controller driver.
This ensures that the device name is more flexible
and correctly reflects the actual device in the system. This will be in sync with ehci at91 driver.

[root@sam9x75eb ~]$ dmesg | grep usb

[    1.464487] usb usb1: Manufacturer: Linux 6.16.0-rc1 ehci_hcd
[    1.470210] usb usb1: SerialNumber: 700000.usb-ehci
[    1.595683] usb usb2: Manufacturer: Linux 6.16.0-rc1 ohci_hcd
[    1.601406] usb usb2: SerialNumber: 600000.usb-ohci

[root@sam9x75eb ~]$ cat /proc/iomem | grep usb 00600000-006fffff : 600000.usb-ohci usb-ohci@600000 00700000-007fffff : 700000.usb-ehci usb-ehci@700000

---
 drivers/usb/host/ohci-at91.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/ohci-at91.c +1 -1
index 5df793dcb25d..12fdb18934cf 100644
@@ -193,7 +193,7 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,
 	if (irq < 0)
 		return irq;
 
-	hcd = usb_create_hcd(driver, dev, "at91");
+	hcd = usb_create_hcd(driver, dev, dev_name(dev));
 	if (!hcd)
 		return -ENOMEM;
 	ohci_at91 = hcd_to_ohci_at91_priv(hcd);

base-commit: aef17cb3d3c43854002956f24c24ec8e1a0e3546

Signature · 1 line
2.49.0
maintainer
#1 lore raw
Quoted 7 lines · Mihai Sain

Use the dynamic device name instead of the hardcoded string "at91" when creating the OHCI host controller driver.
This ensures that the device name is more flexible
and correctly reflects the actual device in the system. This will be in sync with ehci at91 driver.

[root@sam9x75eb ~]$ dmesg | grep usb

Quoted 8 lines
[    1.464487] usb usb1: Manufacturer: Linux 6.16.0-rc1 ehci_hcd
[    1.470210] usb usb1: SerialNumber: 700000.usb-ehci
[    1.595683] usb usb2: Manufacturer: Linux 6.16.0-rc1 ohci_hcd
[    1.601406] usb usb2: SerialNumber: 600000.usb-ohci

[root@sam9x75eb ~]$ cat /proc/iomem | grep usb 00600000-006fffff : 600000.usb-ohci usb-ohci@600000 00700000-007fffff : 700000.usb-ehci usb-ehci@700000

Are these two outputs supposed to make some sort of point? It would be better to have a before-and-after comparison, so we can see what the effect of the patch is.

Alan Stern

A message that is not in the archive (sent off-list or not yet received): PH3PPF37F43E35DF7E5350AEBBB079073748274A@PH3PPF37F43E35D.namprd11.prod.outlook.com

maintainer
#3 lore raw
Quoted 25 lines · On Thu, Jun 12, 2025 at 10:33:09AM +0000, [email protected] wrote:

Hi Alan,

I'm sorry, I'm replying using Outlook web.

Quoted 7 lines · Mihai Sain

Use the dynamic device name instead of the hardcoded string "at91" when creating the OHCI host controller driver.
This ensures that the device name is more flexible
and correctly reflects the actual device in the system. This will be in sync with ehci at91 driver.

[root@sam9x75eb ~]$ dmesg | grep usb

Quoted 8 lines
[    1.464487] usb usb1: Manufacturer: Linux 6.16.0-rc1 ehci_hcd
[    1.470210] usb usb1: SerialNumber: 700000.usb-ehci
[    1.595683] usb usb2: Manufacturer: Linux 6.16.0-rc1 ohci_hcd
[    1.601406] usb usb2: SerialNumber: 600000.usb-ohci

[root@sam9x75eb ~]$ cat /proc/iomem | grep usb 00600000-006fffff : 600000.usb-ohci usb-ohci@600000 00700000-007fffff : 700000.usb-ehci usb-ehci@700000

Are these two outputs supposed to make some sort of point? It would be better to have a before-and-after comparison, so we can see what the effect of the patch is.

Quoted 5 lines

Before this patch the SerialNumber print from ohci driver, was looking like this:

[    1.601406] usb usb2: SerialNumber: at91

I thought it was a good ideea to align this print with the one from ehci drive

Okay, good. Yes, that is worth doing.

Please include this information in the patch description and resubmit.

Alan Stern