NetBSD-Bugs archive

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

Re: kern/60073: xhci(4): NetBSD xHCI roothub uses ud_addr=0 instead of 1?



The following reply was made to PR kern/60073; it has been noted by GNATS.

From: "Jonathan A. Kollasch" <jakllsch%kollasch.net@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
	netbsd-bugs%netbsd.org@localhost
Subject: Re: kern/60073: xhci(4): NetBSD xHCI roothub uses ud_addr=0 instead
 of 1?
Date: Thu, 12 Mar 2026 14:40:28 -0500

 Using address 0 for the NetBSD xhci(4) root hub is precisely what I
 intended to do.
 
 An xHCI hardware/firmware implementation has exclusive discretion as to
 how it allocates bus addresses to devices.  The only address it will
 never give a device is 0, as that is the un-addressed initial state of
 a new device.  An xHCI hardware/firmware implementation is allowed to
 use identical USB addresses for real devices on different bus interfaces
 (think multiple USB1/2 bus interfaces to increase available bandwidth
 across multiple USB1/2 root ports).  Hardware/firmware implementations
 are also allowed to allocate address 1 to a device on the bus(es).
 
 The OS's USB root hub is *not* a real device.  USB Transactions to the
 OS-implemented root hub never reach the data lines of the bus, and there
 is no mechanism to notify the xHCI hardware/firmware that the OS has
 reserved a bus address for a virtual (root hub) device.
 
 Any solution to 60074 should take these constraints into account.
 
 I agree this should be documented in comments in the code.
 


Home | Main Index | Thread Index | Old Index