* [PATCH v2 0/1] usb: option.c: Fix Cinterion AHxx enumeration. @ 2016-01-25 12:26 John Ernberg 2016-01-25 12:27 ` [PATCH v2 1/1] " John Ernberg 0 siblings, 1 reply; 3+ messages in thread From: John Ernberg @ 2016-01-25 12:26 UTC (permalink / raw) To: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org From: John Ernberg <john.ernberg@actia.se> Added signoff and made corrections to the commit message after review by Johan Hovold. This resolves a race condition that may occur with Cinterion AH3 modem modules if both the option and cdc_ether drivers are compiled as kernel modules. Note: Since I have no other AHxx modem modules to test with, I cannot guarantee that this is the correct way to solve this issue globally. This might break support for other AHxx modules. Please consider this during the review of the patch. Please explicitly keep me on CC as I did not register. John Ernberg (1): usb: option.c: Fix Cinterion AHxx enumeration. drivers/usb/serial/option.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 1/1] usb: option.c: Fix Cinterion AHxx enumeration. 2016-01-25 12:26 [PATCH v2 0/1] usb: option.c: Fix Cinterion AHxx enumeration John Ernberg @ 2016-01-25 12:27 ` John Ernberg 2016-01-25 12:39 ` Johan Hovold 0 siblings, 1 reply; 3+ messages in thread From: John Ernberg @ 2016-01-25 12:27 UTC (permalink / raw) To: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org; +Cc: John Ernberg From: John Ernberg <john.ernberg@actia.se> In certain kernel configurations where the cdc_ether and option drivers are compiled as modules there can occur a race condition in enumeration. This causes the option driver to enumerate the ethernet(wwan) interface as usb-serial interfaces. usb-devices output for the modem: T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=1e2d ProdID=0055 Rev=00.00 S: Manufacturer=Cinterion S: Product=AHx C: #Ifs= 6 Cfg#= 1 Atr=e0 MxPwr=10mA I: If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#= 4 Alt= 0 #EPs= 1 Cls=02(commc) Sub=06 Prot=00 Driver=cdc_ether I: If#= 5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether Signed-off-by: John Ernberg <john.ernberg@actia.se> --- drivers/usb/serial/option.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index f228060..4e483f2 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -1679,7 +1679,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_EU3_P) }, { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PH8), .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, - { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_AHXX) }, + { USB_DEVICE_INTERFACE_CLASS(CINTERION_VENDOR_ID, CINTERION_PRODUCT_AHXX, 0xff) }, { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PLXX), .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_HC28_MDM) }, -- 1.9.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/1] usb: option.c: Fix Cinterion AHxx enumeration. 2016-01-25 12:27 ` [PATCH v2 1/1] " John Ernberg @ 2016-01-25 12:39 ` Johan Hovold 0 siblings, 0 replies; 3+ messages in thread From: Johan Hovold @ 2016-01-25 12:39 UTC (permalink / raw) To: John Ernberg; +Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org On Mon, Jan 25, 2016 at 12:27:17PM +0000, John Ernberg wrote: > From: John Ernberg <john.ernberg@actia.se> > > In certain kernel configurations where the cdc_ether and option drivers > are compiled as modules there can occur a race condition in enumeration. > This causes the option driver to enumerate the ethernet(wwan) interface > as usb-serial interfaces. > > usb-devices output for the modem: > T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=480 MxCh= 0 > D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 > P: Vendor=1e2d ProdID=0055 Rev=00.00 > S: Manufacturer=Cinterion > S: Product=AHx > C: #Ifs= 6 Cfg#= 1 Atr=e0 MxPwr=10mA > I: If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option > I: If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option > I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option > I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option > I: If#= 4 Alt= 0 #EPs= 1 Cls=02(commc) Sub=06 Prot=00 Driver=cdc_ether > I: If#= 5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether > > Signed-off-by: John Ernberg <john.ernberg@actia.se> Now applied, thanks. Johan ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-01-25 12:39 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-01-25 12:26 [PATCH v2 0/1] usb: option.c: Fix Cinterion AHxx enumeration John Ernberg 2016-01-25 12:27 ` [PATCH v2 1/1] " John Ernberg 2016-01-25 12:39 ` Johan Hovold
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).