USB: Ignore storage device in modem mode on DWN-652

D-Link DWN-652 in Modem mode exposes 3 interfaces
- First one is the USB storage one
- Second one is for both control and connection
- Third one is unknown

This patch avoids usb-storage trying to switch again when already in
modem mode, and exposes only 2 ttyUSB instead of 3 by not attaching
to the storage interface

Signed-off-by: Pascal Terjan <pterjan@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Pascal Terjan
2009-04-16 19:00:45 +02:00
committed by Greg Kroah-Hartman
parent cc71329b3b
commit c5be1b52d9
3 changed files with 18 additions and 2 deletions

View File

@@ -94,7 +94,8 @@ int option_ms_init(struct us_data *us)
*/
if (udev->descriptor.bDeviceClass != 0 ||
udev->descriptor.bDeviceSubClass != 0 ||
udev->descriptor.bDeviceProtocol != 0)
udev->descriptor.bDeviceProtocol != 0 ||
udev->actconfig->desc.bNumInterfaces == 3)
return USB_STOR_TRANSPORT_GOOD;
US_DEBUGP("Option MS: option_ms_init called\n");