USB: serial: option.c: Add blacklisting infrastructure for special device handling
authorGernot Hillier <gernot@hillier.de>
Mon, 11 Jan 2010 08:30:00 +0000 (09:30 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 2 Mar 2010 22:54:21 +0000 (14:54 -0800)
commitcc175ce2c01fc78dbf98a2b00f23d8863de20764
treecf1cce6adf7fedec1aa06c919db8f006986cdf09
parent79da01d79e0f2c8d2d6f1b823fce429877c423a7
USB: serial: option.c: Add blacklisting infrastructure for special device handling

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: Gernot Hillier <gernot@hillier.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/option.c