• Duncan Sands's avatar
    [PATCH] usb: extract sensible strings from buggy string descriptors · c1e15eeb
    Duncan Sands authored
    The Freebox is a USB modem popular in France.  It returns bogus string
    descriptors: while the string part is there, the length and type bytes
    are both zero.  This patch detects that case and tries to recover a
    sensible string by scanning for printable Latin characters.  This not
    only causes the modem to spring to life (because usbnet gets a valid
    MAC address) - it also means you get the correct Product and Manufacturer
    strings in sysfs and elsewhere.  This patch is in the "mostly harmless"
    category.
    Signed-off-by: default avatarDuncan Sands <baldrick@free.fr>
    Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
    c1e15eeb
message.c 43.5 KB