OK, my bad, I looked at your code too fast (piece of advice though - a diff or 
a patch works a lot better than a code snippet). There are still a few issues:

1. Using both `SPDRP_ADDRESS` and `SPDRP_LOCATION_INFORMATION` seems quite 
redundant. If the latter works all the time, we might as well use that always. 
But now of course, we need to prove that `SPDRP_LOCATION_INFORMATION` can be 
used as a replacement for `SPDRP_ADDRESS` and doesn't introduce a regression, 
which will take some testing.
2. At the very least, I think you want to issue the 
`SPDRP_LOCATION_INFORMATION` call within the `if ((pass >= HUB_PASS) && (pass 
<= GEN_PASS))` block. Else you're going to try to fetch a port number for HCDs 
and other stuff which (provided the `port_nr = 0;` is from existing code, which 
I can't tell without looking since you didn't provide a diff), will be unused 
anyway.
3. I see no reference whatsoever to `SPDRP_LOCATION_INFORMATION` in the usbview 
source I have (which I think is the latest). I do see references to 
`SPDRP_ADDRESS`, which is what i think I traced back at the time as the API 
call to use to fetch the port number. If usbview displays the right port from 
your ASMedia, but apparently without using `SPDRP_LOCATION_INFORMATION`, can 
you find out how they do it?

---
Reply to this email directly or view it on GitHub:
https://github.com/libusbx/libusbx/issues/147#issuecomment-25128817
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to