• Russell King's avatar
    [PATCH] 2.5.32-usb · 1cdfd319
    Russell King authored
    This patch appears not to be in 2.5.32, but applies cleanly.
    
    The following patch fixes 3 problems in USB:
    
    1. Don't pci_map buffers when we know we're not going to pass them
       to a device.
    
       This was first noticed on ARM (no surprises here); the root hub
       code, rh_call_control(), placed data into the buffer and then
       called usb_hcd_giveback_urb().  This function called
       pci_unmap_single() on this region which promptly destroyed the
       data that rh_call_control() had placed there.  This lead to a
       corrupted device descriptor and the "too many configurations"
       message.
    
    2. If controller->hcca is NULL, don't try to dereference it.
    
    3. If we free the root hub (in ohci-hcd.c or uhci-hcd.c), don't
       leave a dangling pointer around to trip us up in usb_disconnect().
       EHCI appears to get this right.
    1cdfd319
uhci-hcd.c 61.4 KB