KL26Z USB enumeration issue through USB hub

We are seeing an issue intermittently with USB enumeration though when going through a hub. I’ve seen this both on our board (which has a SMSC USB2514B USB Hub connected at Full Speed to the KL26Z) using our application, as well as on the Eval board (FRDM-KL26Z) when using a USB Hub using mouse_keyboard example from the KSDK2.0 (host_hid_mouse_keyboard_bm.bin). On the Eval board, I tried both the SMSC hub that we had, as well as another Belkin model, both externally powered and that one Jumper is set on the FRDM-KL26Z to pass power to the USB port. The interesting thing is, if I take the hub out of the equation, the host_hid_mouse_keyboard_bm.bin example works fine with a mouse I can make fail almost every time using a hub in the middle (HP mouse).

I’ve been capturing USB traces and analyzing them using my CATC, and the one thing I notice is I’m seeing a lot of failing on getting the device descriptor after setting address. I noticed that this is not the usual 2ms that the USB spec calls out as allowed time to come back up at that address. I’ve tried adding delays in, but that doesn’t seem to take care of things.

I’ve also been playing with the SOFTHLD register, since I noticed when reading through the KL26Z user manual that it recommends that this be set to 74 for 64-byte packets (but it’s set to 255 in usb_host_khci.c in USB_HostKhciCreate). I can make the problem change behavior by messing with this (making it much worse if it’s too small, making it somewhat better if I make it closer to 124).

Long story short, I feel like I’m dealing with some kind of timing issue with the USB stack in the KL26Z. Other than messing with the SOFTHLD register, the only other register I’ve seen that can manipulate time is the USBFRMADJUST register, but I’m not exactly sure how to mess with this (or where to mess with it). I have 4 weeks to complete this project and get the software solid, so any help you can provide is appreciated.