From: Pete B. <pe...@ak...> - 2011-09-22 00:54:16
|
On 2011.09.21 06:39, Nathan Hjelm wrote: > +static inline uint8_t port_from_location (UInt32 location) { > + int i; > + > + for (i = 0 ; i< 8 ; ++i, location>>= 4) { > + if (location& 0xf) > + break; > + } > + > + return location& 0xf; > +} I'm having a small issue with this patch. The problem has to do with the port reported by root hubs. On Linux and Windows, the root hub port is always set to 0, which allows us to eliminate them from the topology listing, as we logically want to make it start at a physical port and physical ports start at 1. On my platform though, the OSX root hub virtual port (from the HCD) is always set to 13, regardless of the HCD, which results in an extra node in our topology. Does that "13" number come from anywhere? Is there a way Darwin could set the port number for all its root hubs to 0 instead? Apart from that, things look real good, and, on the same machine, the topology data returned by libusb appears to be the same, regardless of whether Linux, Windows or OS X is being used. Regards, /Pete |