• Gernot Hillier's avatar
    USB: serial: option.c: Add blacklisting infrastructure for special device handling · cc175ce2
    Gernot Hillier authored
    As suggested by Matthias Urlichs, this patch adds a somehow generic
    mechanism for special handling of devices which don't support all bits
    expected by this driver.
    
    The blacklisting code is heavily stolen from sierra.c, but extended to
    support different special cases.
    
    For now, one case is implemented (OPTION_BLACKLIST_SENDSETUP), targeted
    at the 4G W14 device: devices which don't understand the setting of
    RTS/DTR in option_send_setup() causing a USB timeout of 5 s in any
    userspace open() which leads to errors in most userspace applications.
    
    In addition, I prepared another case for devices with interfaces which
    shall not be accessed by this driver (targeted at the D-Link DWM 652).
    
    However, OPTION_BLACKLIST_RESERVED_IF is not fully implemented yet as I
    have no device to test this. Anyone volunteering to help here?  If not,
    I'll contact the guys who added D-Link DWM 652 support soon.
    Signed-off-by: default avatarGernot Hillier <gernot@hillier.de>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    cc175ce2
option.c 57.2 KB