[PATCH] usb:serial:optrion: fix dwm-158 3g modem interface
The dwm-158 interface 4 and 5 doesn't answer to the AT commands and doesn't appears a option interface. Tested on openwrt distribution (kernel 4.14 using the old blacklist definitions). Signed-off-by: Giuseppe Lippolis <giu.lippo...@gmail.com> --- drivers/usb/serial/option.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index c3f252283ab9..f0c3612467a3 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -1911,7 +1911,8 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d01, 0xff) }, /* D-Link DWM-156 (variant) */ { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d02, 0xff) }, { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d03, 0xff) }, - { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff) }, /* D-Link DWM-158 */ + { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff), /* D-Link DWM-158 */ +.driver_info = RSVD(4) | RSVD(5) }, { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d0e, 0xff) }, /* D-Link DWM-157 C1 */ { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e19, 0xff), /* D-Link DWM-221 B1 */ .driver_info = RSVD(4) }, -- 2.14.1 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] usb:serial:optrion: fix dwm-158 3g modem interface
The dwm-158 interface 4 and 5 doesn't answer to the AT commands and doesn't appears a option interface. Tested on openwrt distribution (kernel 4.14 using the old blacklist definitions). Signed-off-by: Giuseppe Lippolis <giu.lippo...@gmail.com> --- drivers/usb/serial/option.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index c3f252283ab9..f0c3612467a3 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -1911,7 +1911,8 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d01, 0xff) }, /* D-Link DWM-156 (variant) */ { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d02, 0xff) }, { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d03, 0xff) }, - { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff) }, /* D-Link DWM-158 */ + { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff), /* D-Link DWM-158 */ +.driver_info = RSVD(4) | RSVD(5) }, { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d0e, 0xff) }, /* D-Link DWM-157 C1 */ { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e19, 0xff), /* D-Link DWM-221 B1 */ .driver_info = RSVD(4) }, -- 2.14.1 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
AW: [PATCH v2] net-usb: add qmi_wwan if on lte modem wistron neweb d18q1
Johan thanks again. As I told you currently the option is only an auxiliary IF. What is really needed is the qmi_wwan interface. I prefer to add the option patch later on (testing it). Bye. Giuseppe. > -Ursprüngliche Nachricht- > Von: Johan Hovold [mailto:jhov...@gmail.com] Im Auftrag von Johan Hovold > Gesendet: Freitag, 23. März 2018 10:14 > An: Giuseppe Lippolis <giu.lippo...@gmail.com> > Cc: linux-usb@vger.kernel.org; jhov...@gmail.com > Betreff: Re: [PATCH v2] net-usb: add qmi_wwan if on lte modem wistron > neweb d18q1 > > On Fri, Mar 23, 2018 at 09:55:38AM +0100, Giuseppe Lippolis wrote: > > Johan thanks for your advices. > > Currently I don't have the opportunity to test the patch on a > > linux-next system. > > Therefore I will apply now the patch only for the qmi_wwan IF only and > > I will wait the option backport/update on my system to send the option > > patch. > > That's all right. The conversion to the new scheme is pretty straight-forward > so you don't need to actually test the updated patch on a device if you prefer > to send a v2 straight away (compile-testing would be nice, but I can make an > exception this time). > > Thanks, > Johan -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2] net-usb: add qmi_wwan if on lte modem wistron neweb d18q1
Johan thanks for your advices. Currently I don't have the opportunity to test the patch on a linux-next system. Therefore I will apply now the patch only for the qmi_wwan IF only and I will wait the option backport/update on my system to send the option patch. For this device the option IF is an auxiliary IF, the most important is the qmi_wwan. Thanks, Giuseppe -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2] net-usb: add qmi_wwan if on lte modem wistron neweb d18q1
This modem is embedded on dlink dwr-921 router. The oem configuration states: T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1435 ProdID=0918 Rev= 2.32 S: Manufacturer=Android S: Product=Android S: SerialNumber=0123456789ABCDEF C:* #Ifs= 7 Cfg#= 1 Atr=80 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none) E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=84(I) Atr=03(Int.) MxPS= 64 Ivl=32ms E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan E: Ad=86(I) Atr=03(Int.) MxPS= 64 Ivl=32ms E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan E: Ad=88(I) Atr=03(Int.) MxPS= 64 Ivl=32ms E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan E: Ad=8a(I) Atr=03(Int.) MxPS= 64 Ivl=32ms E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none) E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=125us Tested on openwrt distribution Signed-off-by: Giuseppe Lippolis <giu.lippo...@gmail.com> --- drivers/net/usb/qmi_wwan.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index 5894e3c..b1f9b0a 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c @@ -1100,6 +1100,9 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x0846, 0x68a2, 8)}, {QMI_FIXED_INTF(0x12d1, 0x140c, 1)},/* Huawei E173 */ {QMI_FIXED_INTF(0x12d1, 0x14ac, 1)},/* Huawei E1820 */ + {QMI_FIXED_INTF(0x1435, 0xd181, 3)},/* Wistron NeWeb D18Q1 */ + {QMI_FIXED_INTF(0x1435, 0xd181, 4)},/* Wistron NeWeb D18Q1 */ + {QMI_FIXED_INTF(0x1435, 0xd181, 5)},/* Wistron NeWeb D18Q1 */ {QMI_FIXED_INTF(0x16d8, 0x6003, 0)},/* CMOTech 6003 */ {QMI_FIXED_INTF(0x16d8, 0x6007, 0)},/* CMOTech CHE-628S */ {QMI_FIXED_INTF(0x16d8, 0x6008, 0)},/* CMOTech CMU-301 */ -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] net-usb: add lte modem wistron neweb d18q1
ype None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 9 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x89 EP 9 IN bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x06 EP 6 OUT bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber6 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 8 Mass Storage bInterfaceSubClass 6 SCSI bInterfaceProtocol 80 Bulk-Only iInterface 6 Mass Storage Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x8b EP 11 IN bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x07 EP 7 OUT bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 1 Binary Object Store Descriptor: bLength 5 bDescriptorType15 wTotalLength 12 bNumDeviceCaps 1 USB 2.0 Extension Device Capability: bLength 7 bDescriptorType16 bDevCapabilityType 2 bmAttributes 0x0002 Link Power Management (LPM) Supported Device Status: 0x (Bus Powered) The patch has been tested using the openwrt distribution Signed-off-by: Giuseppe Lippolis <giu.lippo...@gmail.com> --- drivers/net/usb/qmi_wwan.c | 3 +++ drivers/usb/serial/option.c | 11 +++ 2 files changed, 14 insertions(+) diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index 5894e3c..b1f9b0a 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c @@ -1100,6 +1100,9 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x0846, 0x68a2, 8)}, {QMI_FIXED_INTF(0x12d1, 0x140c, 1)},/* Huawei E173 */ {QMI_FIXED_INTF(0x12d1, 0x14ac, 1)},/* Huawei E1820 */ + {QMI_FIXED_INTF(0x1435, 0xd181, 3)},/* Wistron NeWeb D18Q1 */ + {QMI_FIXED_INTF(0x1435, 0xd181, 4)},/* Wistron NeWeb D18Q1 */ + {QMI_FIXED_INTF(0x1435, 0xd181, 5)},/* Wistron NeWeb D18Q1 */ {QMI_FIXED_INTF(0x16d8, 0x6003, 0)},/* CMOTech 6003 */ {QMI_FIXED_INTF(0x16d8, 0x6007, 0)},/* CMOTech CHE-628S */ {QMI_FIXED_INTF(0x16d8, 0x6008, 0)},/* CMOTech CMU-301 */ diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index ebe51f11..5aea146 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -542,6 +542,10 @@ static void option_instat_callback(struct urb *urb); #define WETELECOM_PRODUCT_6802 0x6802 #define WETELECOM_PRODUCT_WMD300 0x6803 +/* Wistron NeWeb products */ +#define WISTRON_NEWEB_VENDOR_ID0x1435 +#define WISTRON_NEWEB_PRODUCT_D18Q10xd181 + struct option_blacklist_info { /* bitmask of interface numbers blacklisted for send_setup */ const unsigned long sendsetup; @@ -675,6 +679,11 @@ static const struct option_blacklist_info cinterion_rmnet2_blacklist = { .reserved = BIT(4) | BIT(5), }; +static const struct option_blacklist_info wistron_neweb_d18q1_blacklist = { + .sendsetup = BIT(0) | BIT(2), + .reserved = BIT(1) | BIT(3) | BIT(4) | BIT(5), +}; + static const struct usb_device_id option_ids[] = { { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, @@ -2035,6 +2044,8 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_6802, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_WMD300, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0x421d, 0xff, 0xff, 0xff) }, /* HP lt2523 (Nov
AW: AW: new usb LTE modem device
> sendsetup is to prevent the driver from sending a specific USB control > message for setting up serial parameters, which some devices ignore and > cause the driver to stall. > > reserved is what you're looking for. This one tells option not to bind to the > given USB interfaces. > > So for example, ".reserved = BIT(3)" tells the option driver to ignore USB > interface 3 on that device. ".reserved = BIT(3) | BIT(5)" tells it to ignore > both > interfaces 3 and 5. > > For your device, you'll want to set "reserved" in option.c to all the > interfaces > that qmi_wwan is going to claim, to make sure option doesn't claim them. > option by default is a greedy driver. Thanks for the clear description. I will proceed accordingly and as soon as I have tested, I will submit the patch. Bye. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
AW: new usb LTE modem device
> The option driver use interface blacklists instead of multiple match entries. > You should probably follow the same style there. But this is up to Johan... Can I ask what ist he difference between .sendsetup and .reserved and how to use the bitmask in drivers/usb/serial/option.c ? Thanks, Bye. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
AW: new usb LTE modem device
> But we already have many Sierra devices with 2 QMI interfaces (the 3rd one > is documented and verified non-functional for unknown reasons). And these > tend to come with multiple OEM device IDs. So a whitelist method could > reduce the number of matching entries considerably. Feel free to submit > patches if you like :-) Dear Bjorg, I'm going to prepare the following patch. If you think it is ok, I will build and test it and if working I will submit it. Bye. diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index 5894e3c..c708a8f 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c @@ -1100,6 +1100,9 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x0846, 0x68a2, 8)}, {QMI_FIXED_INTF(0x12d1, 0x140c, 1)},/* Huawei E173 */ {QMI_FIXED_INTF(0x12d1, 0x14ac, 1)},/* Huawei E1820 */ +{QMI_FIXED_INTF(0x1435, 0xd181, 3)},/* D18, WNC VID, d181-3 */ +{QMI_FIXED_INTF(0x1435, 0xd181, 4)},/* D18, WNC VID, d181-4 */ +{QMI_FIXED_INTF(0x1435, 0xd181, 5)},/* D18, WNC VID, d181-5 */ {QMI_FIXED_INTF(0x16d8, 0x6003, 0)},/* CMOTech 6003 */ {QMI_FIXED_INTF(0x16d8, 0x6007, 0)},/* CMOTech CHE-628S */ {QMI_FIXED_INTF(0x16d8, 0x6008, 0)},/* CMOTech CMU-301 */ diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index ebe51f11..6944e87 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -2035,6 +2035,8 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_6802, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_WMD300, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0x421d, 0xff, 0xff, 0xff) }, /* HP lt2523 (Novatel E371) */ + {USB_DEVICE_INTERFACE_NUMBER(0x1435, 0xd181, 0)},/* D18, WNC VID, d181-0 */ + {USB_DEVICE_INTERFACE_NUMBER(0x1435, 0xd181, 2)},/* D18, WNC VID, d181-2 */ { } /* Terminating entry */ }; MODULE_DEVICE_TABLE(usb, option_ids); -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
new usb LTE modem device
Hi all, I'm working to port OpenWRT/LEDE on a new router with embedded usb LTE modem. The modem have 3 qmi_wwan interfaces and 2 option. I would like to prepare the patch, but before I would like to know if using the QMI_FIXED_INTF macro is the best way to identify the interface or if there is a better way. Here the info grapped from cat /proc/bus/usb/devices using the stock firmware: T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1435 ProdID=0918 Rev= 2.32 S: Manufacturer=Android S: Product=Android S: SerialNumber=0123456789ABCDEF C:* #Ifs= 7 Cfg#= 1 Atr=80 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none) E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=84(I) Atr=03(Int.) MxPS= 64 Ivl=32ms E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan E: Ad=86(I) Atr=03(Int.) MxPS= 64 Ivl=32ms E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan E: Ad=88(I) Atr=03(Int.) MxPS= 64 Ivl=32ms E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan E: Ad=8a(I) Atr=03(Int.) MxPS= 64 Ivl=32ms E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none) E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=125us Thanks, Bye. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] USB: serial: option: add dlink dwm-158
Dear Johan, Thanks for the tips. Here is the patch. Bye. --- drivers/usb/serial/option.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 9894e34..386b687 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -1989,6 +1989,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d02, 0xff, 0x00, 0x00) }, { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x02, 0x01) }, { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x00, 0x00) }, + { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff) }, /* D-Link DWM-158 */ { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e19, 0xff), /* D-Link DWM-221 B1 */ .driver_info = (kernel_ulong_t)_intf4_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */ -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
AW: [PATCH] add dlink dwm-158 to usb-serial-option
> Any chance you can resend this in a format we can apply it in (tabs properly > used, no line-wrap, correct signed-off-by, good subject and changelog text, > etc.)? Adding registration for 3G modem DWM-158 in usb-serial-option Signed-off-by: Giuseppe Lippolis <giu.lippo...@gmail.com> diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 9894e34..386b687 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -1989,6 +1989,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d02, 0xff, 0x00, 0x00) }, { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x02, 0x01) }, { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x00, 0x00) }, + { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff) }, /* D-Link DWM-158 */ { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e19, 0xff), /* D-Link DWM-221 B1 */ .driver_info = (kernel_ulong_t)_intf4_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */ Is it now ok? Bye. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] add dlink dwm-158 to usb-serial-option
I all, This patch will add the 3G modem dwm-158 found inside the DWR-512 from Dlink. The modem have 2 cdc_ether interface and 4 usb-serial. I tested the patch in the current lede system and compiled on the latest linux tree. diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 9894e34..386b687 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -1989,6 +1989,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d02, 0xff, 0x00, 0x00) }, { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x02, 0x01) }, { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x00, 0x00) }, + { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff) }, /* D-Link DWM-158 */ { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e19, 0xff), /* D-Link DWM-221 B1 */ .driver_info = (kernel_ulong_t)_intf4_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */ Result on the target: T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2001 ProdID=7d04 Rev= 3.00 S: Manufacturer=D-Link,Inc S: Product=D-Link DWM-158 C:* #Ifs= 7 Cfg#= 1 Atr=a0 MxPwr=500mA A: FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=06 Prot=00 I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=cdc_ether E: Ad=88(I) Atr=03(Int.) MxPS= 64 Ivl=125us I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=02 Prot=01 Driver=option E: Ad=87(I) Atr=03(Int.) MxPS= 64 Ivl=125us E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none) E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms Here the relevant lsusb info: Bus 001 Device 002: ID 2001:7d04 D-Link Corp. Device Descriptor: bLength18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass2 Communications bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize064 idVendor 0x2001 D-Link Corp. idProduct 0x7d04 bcdDevice3.00 iManufacturer 10 D-Link,Inc iProduct 11 D-Link DWM-158 iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 229 bNumInterfaces 7 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xa0 (Bus Powered) Remote Wakeup MaxPower 500mA Interface Association: bLength 8 bDescriptorType11 bFirstInterface 0 bInterfaceCount 2 bFunctionClass 2 Communications bFunctionSubClass 6 Ethernet Networking bFunctionProtocol 0 iFunction 2 COM(comm_if) Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 6 Ethernet Networking bInterfaceProtocol 0 iInterface 2 COM(comm_if) CDC Header: bcdCDC 1.10 CDC Union: bMasterInterface0 bSlaveInterface 1 CDC Ethernet: iMacAddress 1 0200FFAA bmEthernetStatistics0x7f18 wMaxSegmentSize 1514 wNumberMCFilters0x bNumberPowerFilters 16 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x88 EP 8 IN bmAttributes3 Transfer TypeInterrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber1
AW: AW: add usb option device
Dear All, > If possible you want to tell the option driver which interfaces to > bind to (white-listing) rather than specifying which not to bind to > (black-listing). The latter typically means probing all interfaces, > checking the black list, and then bailing out for unsupported > interfaces. I try to use the blacklist to specify which interface not to bind: static const struct option_blacklist_info dlink_dwm_158_ blacklist = { .reserved = BIT(0) | BIT(1), }; { USB_DEVICE (0x2001, 0x7d04), .driver_info = (kernel_ulong_t)_dwm_158_blacklist }, The result seems positive, after boot: T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 1 B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0 D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1d6b ProdID=0002 Rev= 4.04 S: Manufacturer=Linux 4.4.35 ehci_hcd S: Product=EHCI Host Controller S: SerialNumber=101c.ehci C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2001 ProdID=7d04 Rev= 3.00 S: Manufacturer=D-Link,Inc S: Product=D-Link DWM-158 C:* #Ifs= 7 Cfg#= 1 Atr=a0 MxPwr=500mA A: FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=06 Prot=00 I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=cdc_ether E: Ad=88(I) Atr=03(Int.) MxPS= 64 Ivl=125us I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=02 Prot=01 Driver=option E: Ad=87(I) Atr=03(Int.) MxPS= 64 Ivl=125us E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none) E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms On the kernel v4.8.12, I see similar d-link devices with the same VENDOR_ID declared in this way: { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d01, 0xff, 0x02, 0x01) }, /* D-Link DWM-156 (variant) */ { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d01, 0xff, 0x00, 0x00) }, /* D-Link DWM-156 (variant) */ { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d02, 0xff, 0x02, 0x01) }, { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d02, 0xff, 0x00, 0x00) }, { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x02, 0x01) }, { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x00, 0x00) }, { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e19, 0xff), /* D-Link DWM-221 B1 */ .driver_info = (kernel_ulong_t)_intf4_blacklist }, Shall I declare a #define DLINK_VENDOR_ID 0x2001 Or use the hardcoded style ? Another question when is appropriate to use USB_DEVICE and when USB_DEVICE_INTERFACE_CLASS ? Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
AW: add usb option device
> > This will make option grab all the ports, as shown by your dmesg > > output. But USB interfaces 0 and 1 are actually cdc-ether and should > > *not* be grabbed by option. I also have another curiosity: Why the driver architecture doesn't recognize autonomously the cdc-ether Interface and only gets the serial ports? Thanks, Bye. > -Ursprüngliche Nachricht- > Von: Oliver Neukum [mailto:oneu...@suse.com] > Gesendet: Mittwoch, 16. November 2016 21:57 > An: Dan Williams <d...@redhat.com> > Cc: Giuseppe Lippolis <giu.lippo...@gmail.com>; linux-usb@vger.kernel.org > Betreff: Re: add usb option device > > On Wed, 2016-11-16 at 11:49 -0600, Dan Williams wrote: > > This will make option grab all the ports, as shown by your dmesg > > output. But USB interfaces 0 and 1 are actually cdc-ether and should > > *not* be grabbed by option. > > > > You want to limit option to grabbing bInterfaceClass=255 to make sure > > it only gets the serial ports. > > Hi, > > what happens if you actually use these ethernet interfaces while somebody > uses the serial interfaces? > > Regards > Oliver > -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
AW: add usb option device
Dear All, thanks for the very interesting discussion. > > This will make option grab all the ports, as shown by your dmesg > > output. But USB interfaces 0 and 1 are actually cdc-ether and should > > *not* be grabbed by option. > > > > You want to limit option to grabbing bInterfaceClass=255 to make sure > > it only gets the serial ports. > Actually the device have 2 cdc_ether interface and the others are serial comm. This is the bootlog of the original oem firmware: hub 2-0:1.0: USB hub found hub 2-0:1.0: 1 port detected usb 2-1: new high speed USB device using rt3xxx-ehci and address 2 usb 2-1: configuration #1 chosen from 1 choice usbcore: registered new interface driver cdc_ether usbcore: registered new interface driver usbserial drivers/usb/serial/usb-serial.c: USB Serial support registered for generic usbserial_generic 2-1:1.2: generic converter detected usb 2-1: generic converter now attached to ttyUSB0 usbserial_generic 2-1:1.3: generic converter detected usb 2-1: generic converter now attached to ttyUSB1 usbserial_generic 2-1:1.4: generic converter detected usb 2-1: generic converter now attached to ttyUSB2 usbserial_generic 2-1:1.5: generic converter detected usb 2-1: generic converter now attached to ttyUSB3 usbserial_generic 2-1:1.6: generic converter detected usb 2-1: generic converter now attached to ttyUSB4 usbcore: registered new interface driver usbserial_generic drivers/usb/serial/usb-serial.c: USB Serial Driver core and at the end of the modem configuration: usbnet0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx inet addr:77.25.169.193 Bcast:77.25.169.195 Mask:255.255.255.252 inet6 addr: fe80:::feaa:/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:272 (272.0 B) TX bytes:600 (600.0 B) Therefore I also consider convenient preserve the first two interface for the cdc_ether. Can you please clarify me the differences between black and white list and how to configure it? > Also, is it really a D-Link DWM-158? That appears to be a USB dongle- type > device, while what's in the DWR-512 is a PCI-E minicard that looks like a ZTE > MF210, from the FCC pictures. How is interested in having more info about the modem and the router can read the description page I compiled here: https://wiki.openwrt.org/inbox/d-link/d-link_dwr-512_b I will make additional test with different driver configuration and I will come back to you. Bye. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
AW: add usb option device
> Your email client ate the tabs and spit out spaces and line-wrapped the > patch, making it impossible to apply. > > Also, you need to make it against the latest kernel tree, 4.4 is really old. > > And finally, there is no good subject: line, or description of the patch, or a > signed-off-by: line, all of which are described in the document I pointed you > at. > > Please fix this up and resend. I add now a new post making a patch on the linux 4.8.8 : [PATCH] add DWR-158 in usb option http://marc.info/?l=linux-usb=147924122203290=2 I hope now is better. Bye. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] add DWR-158 in usb option
Signed-off-by: Giuseppe Lippolis <giu.lippo...@gmail.com> --- Adding support for 3G modem DWR-158 from Dlink (I found it embedded in the DWR-512). --- --- drivers/usb/serial/option.c.orig2016-11-15 21:05:16.987504020 +0100 +++ drivers/usb/serial/option.c 2016-11-15 21:08:27.722378924 +0100 @@ -306,6 +306,9 @@ static void option_instat_callback(struc #define DLINK_PRODUCT_DWM_652_U5 0xce16 #define DLINK_PRODUCT_DWM_652_U5A 0xce1e +#define DLINK_ATL_VENDOR_ID0x2001 +#define DLINK_PRODUCT_DWM_158 0x7d04 + #define QISDA_VENDOR_ID0x1da5 #define QISDA_PRODUCT_H21_4512 0x4512 #define QISDA_PRODUCT_H21_4523 0x4523 @@ -1812,6 +1815,7 @@ static const struct usb_device_id option { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) }, { USB_DEVICE(ALINK_VENDOR_ID, DLINK_PRODUCT_DWM_652_U5) }, /* Yes, ALINK_VENDOR_ID */ { USB_DEVICE(ALINK_VENDOR_ID, DLINK_PRODUCT_DWM_652_U5A) }, + { USB_DEVICE(DLINK_ATL_VENDOR_ID, DLINK_PRODUCT_DWM_158) }, { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4512) }, { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4523) }, { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4515) }, -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
AW: add usb option device
Here it is: --- a/linux-4.4.23/drivers/usb/serial/option.c2016-09-30 10:20:43.0 +0200 +++ b/linux-4.4.30/drivers/usb/serial/option.c 2016-11-14 21:01:15.738450136 +0100 @@ -306,6 +306,9 @@ static void option_instat_callback(struc #define DLINK_PRODUCT_DWM_652_U5 0xce16 #define DLINK_PRODUCT_DWM_652_U5A 0xce1e +#define DLINK_ATL_VENDOR_ID0x2001 +#define DLINK_PRODUCT_DWM_158 0x7d04 + #define QISDA_VENDOR_ID0x1da5 #define QISDA_PRODUCT_H21_4512 0x4512 #define QISDA_PRODUCT_H21_4523 0x4523 @@ -1812,6 +1815,8 @@ static const struct usb_device_id option { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) }, { USB_DEVICE(ALINK_VENDOR_ID, DLINK_PRODUCT_DWM_652_U5) }, /* Yes, ALINK_VENDOR_ID */ { USB_DEVICE(ALINK_VENDOR_ID, DLINK_PRODUCT_DWM_652_U5A) }, + { USB_DEVICE(DLINK_ATL_VENDOR_ID, DLINK_PRODUCT_DWM_158) }, + { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4512) }, { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4523) }, { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4515) }, bye > -Ursprüngliche Nachricht- > Von: Greg KH [mailto:gre...@linuxfoundation.org] > Gesendet: Dienstag, 15. November 2016 20:19 > An: Giuseppe Lippolis <giu.lippo...@gmail.com> > Cc: linux-usb@vger.kernel.org > Betreff: Re: add usb option device > > On Tue, Nov 15, 2016 at 08:13:56PM +0100, Giuseppe Lippolis wrote: > > Dear all, > > I'm porting the Dlink DWR-512 device to LEDE (embedded linux). > > This device embed a 3G modem connected through the usb bus . > > The modem work properly with the option kernel module. > > > > I added these line in the > > > > #define DLINK_PRODUCT_DWM_652 0x3e04 > > #define DLINK_PRODUCT_DWM_652_U5 0xce16 > > #define DLINK_PRODUCT_DWM_652_U5A 0xce1e > > > > + #define DLINK_ATL_VENDOR_ID 0x2001 > > + #define DLINK_PRODUCT_DWM_158 0x7d04 > > > > #define QISDA_VENDOR_ID 0x1da5 > > #define QISDA_PRODUCT_H21_4512 0x4512 > > > > [...] > > > > { USB_DEVICE(ALINK_VENDOR_ID, DLINK_PRODUCT_DWM_652_U5) }, > /* > > Yes, ALINK_VENDOR_ID */ > > { USB_DEVICE(ALINK_VENDOR_ID, DLINK_PRODUCT_DWM_652_U5A) > }, > > + { USB_DEVICE(DLINK_ATL_VENDOR_ID, DLINK_PRODUCT_DWM_158) > }, > > { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4512) }, > > { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4523) }, > > Great, can you provide a patch for this in a format that we can apply it in? > The file, Documentation/SubmittingPatches will show you what you need to > do. If you have any questions after reading that, please let us know. > > thanks, > > greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
add usb option device
Dear all, I'm porting the Dlink DWR-512 device to LEDE (embedded linux). This device embed a 3G modem connected through the usb bus . The modem work properly with the option kernel module. I added these line in the #define DLINK_PRODUCT_DWM_652 0x3e04 #define DLINK_PRODUCT_DWM_652_U5 0xce16 #define DLINK_PRODUCT_DWM_652_U5A 0xce1e + #define DLINK_ATL_VENDOR_ID 0x2001 + #define DLINK_PRODUCT_DWM_158 0x7d04 #define QISDA_VENDOR_ID 0x1da5 #define QISDA_PRODUCT_H21_4512 0x4512 [...] { USB_DEVICE(ALINK_VENDOR_ID, DLINK_PRODUCT_DWM_652_U5) }, /* Yes, ALINK_VENDOR_ID */ { USB_DEVICE(ALINK_VENDOR_ID, DLINK_PRODUCT_DWM_652_U5A) }, + { USB_DEVICE(DLINK_ATL_VENDOR_ID, DLINK_PRODUCT_DWM_158) }, { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4512) }, { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4523) }, And at the end the system work as expected: [ 11.659320] usbcore: registered new interface driver usbserial [ 11.671412] usbcore: registered new interface driver usbserial_generic [ 11.684835] usbserial: USB Serial support registered for generic [ 11.739752] xt_time: kernel timezone is - [ 11.865508] PPP generic driver version 2.4.2 [ 11.880069] NET: Registered protocol family 24 [ 11.919594] usbcore: registered new interface driver option [ 11.931155] usbserial: USB Serial support registered for GSM modem (1-port) [ 11.945724] option 1-1:1.0: no of_node; not parsing pinctrl DT [ 11.946566] option 1-1:1.0: GSM modem (1-port) converter detected [ 11.959201] option1 ttyUSB0: no of_node; not parsing pinctrl DT [ 11.959661] option 1-1:1.1: no of_node; not parsing pinctrl DT [ 11.960472] option 1-1:1.1: GSM modem (1-port) converter detected [ 11.973103] option1 ttyUSB1: no of_node; not parsing pinctrl DT [ 11.973542] option 1-1:1.2: no of_node; not parsing pinctrl DT [ 11.974347] option 1-1:1.2: GSM modem (1-port) converter detected [ 11.986980] option1 ttyUSB2: no of_node; not parsing pinctrl DT [ 11.987462] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2 [ 12.001470] option 1-1:1.3: no of_node; not parsing pinctrl DT [ 12.002354] option 1-1:1.3: GSM modem (1-port) converter detected [ 12.015005] option1 ttyUSB3: no of_node; not parsing pinctrl DT [ 12.015479] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3 [ 12.029487] option 1-1:1.4: no of_node; not parsing pinctrl DT [ 12.030327] option 1-1:1.4: GSM modem (1-port) converter detected [ 12.042978] option1 ttyUSB4: no of_node; not parsing pinctrl DT [ 12.043463] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB4 [ 12.057468] option 1-1:1.5: no of_node; not parsing pinctrl DT [ 12.058395] option 1-1:1.5: GSM modem (1-port) converter detected [ 12.070971] option1 ttyUSB5: no of_node; not parsing pinctrl DT [ 12.071482] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB5 [ 12.085484] option 1-1:1.6: no of_node; not parsing pinctrl DT Here the relevant lsusb info: Bus 001 Device 002: ID 2001:7d04 D-Link Corp. Device Descriptor: bLength18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass2 Communications bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize064 idVendor 0x2001 D-Link Corp. idProduct 0x7d04 bcdDevice3.00 iManufacturer 10 D-Link,Inc iProduct 11 D-Link DWM-158 iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 229 bNumInterfaces 7 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xa0 (Bus Powered) Remote Wakeup MaxPower 500mA Interface Association: bLength 8 bDescriptorType11 bFirstInterface 0 bInterfaceCount 2 bFunctionClass 2 Communications bFunctionSubClass 6 Ethernet Networking bFunctionProtocol 0 iFunction 2 COM(comm_if) Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 6 Ethernet Networking bInterfaceProtocol 0 iInterface 2 COM(comm_if) CDC Header: bcdCDC 1.10 CDC Union: bMasterInterface0 bSlaveInterface 1 CDC Ethernet: iMacAddress 1 0200FFAA bmEthernetStatistics0x7f18 wMaxSegmentSize