• Alan Stern's avatar
    [PATCH] USB: Fix EHCI boot oops on AMD · 7d4e3289
    Alan Stern authored
    > > ----- Forwarded message from Andi Kleen <ak@suse.de> -----
    > > Someone added an test for AMD 8111 in EHCI, returning
    > > an error in reset.
    > >
    > > When triggered it would cause an NULL pointer oops because
    > > it would usb_hcd_put an half initialized hcd without
    > > initialized class.  I added a new usb_hcd_free function
    > > to handle such half baked objects.
    
    Andi's diagnosis is correct -- the embedded class_device was not fully
    initialized -- but the solution is wrong.  The correct patch
    is below.  This was clearly my fault, an error in driver-model
    programming brought on by lack of documentation about which fields in the
    driver-model structures need to be set for which API calls.  (Greg, long
    ago I sent you a documentation patch to try and help remedy this problem,
    but it seems to have fallen by the wayside.)
    Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
    7d4e3289
hcd.c 45 KB