I'm using the USB2517 for a project. It's a seven port hub, and I'm using six of them. I'm working through the config settings, and I'm stumped by the port remap registers. The datasheet gives the following text (page 34 in the datasheet):
Port remap register for ports 1 & 2 When a hub is enumerated by a USB Host Controller, the hub is only permitted to report how many ports it has; the hub is not permitted to select a numerical range or assignment. The Host Controller will number the downstream ports of the hub starting with the number '1', up to the number of ports that the hub recognizes.
The host's port number is referred to as "Logical Port Number" and the physical port on the hub is the “Physical Port Number". When remapping mode is enabled (see PRTMAP_EN in
Register 08h: Configuration Data Byte 3) the hub's downstream port
numbers can be remapped to different logical port numbers (assigned by the host). Note: The OEM must ensure that Contiguous Logical Port Numbers are
used, starting from #1 up to the maximum number of enabled ports; this ensures that the hub's ports are numbered in accordance with the way a Host will communicate with the ports
So, I've got seven ports, DS[1:7]. These are the "Physical Port Numbers". The host enumerates these as a range, which we can call PORT[1:7]. These are the "Logical Port Numbers". By writing to this register, I'm mapping DS[x] to PORT[y], or outwrite [see what I did there?] disabling it
Why would I want to remap my ports, however? What does that gain me over letting the hub automatically handle remapping? Is there some kind of port priority in the USB 2.0 spec that allocates additional bandwidth to lower numbered ports? Is it just in there to keep overcautious engineers up at night?
Edit: The hub is able to automatically remap ports to ensure contiguous logical ports if physical ports in the middle of the range are disabled if PRTMAP_EN (08h:3) is low. Is there anything to be gained by manually remapping them in a different order than the hub would automatically do it?