From: Johan Hovold <johan@kernel.org>
To: John Ernberg <john.ernberg@actia.se>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
linux-usb@vger.kernel.org
Subject: Re: [PATCH] usb: option.c: Fix Cinterion AHxx enumeration.
Date: Tue, 22 Dec 2015 19:49:51 +0100 [thread overview]
Message-ID: <20151222184951.GD29167@localhost> (raw)
In-Reply-To: <1450781515-12250-2-git-send-email-john.ernberg@actia.se>
[ +CC: linux-usb ]
On Tue, Dec 22, 2015 at 10:51:32AM +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.
>
> In dmesg it may look like this:
> [ 18.380585] usb 1-1: new high-speed USB device number 2 using ci_hdrc
> [ 18.592290] usbcore: registered new interface driver usbserial
> [ 18.606636] usbcore: registered new interface driver usbserial_generic
> [ 18.614815] usbserial: USB Serial support registered for generic
> [ 18.652111] usbcore: registered new interface driver option
> [ 18.659745] usbserial: USB Serial support registered for GSM modem (1-port)
> [ 18.667600] option 1-1:1.0: GSM modem (1-port) converter detected
> [ 18.676906] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
> [ 18.686725] cdc_ether 1-1:1.4 wwan0: register 'cdc_ether' at usb-ci_hdrc.1-1, Mobile Broadband Network Device
> [ 18.705587] option 1-1:1.1: GSM modem (1-port) converter detected
> [ 18.713468] usbcore: registered new interface driver cdc_ether
> [ 18.719930] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
> [ 18.729770] option 1-1:1.2: GSM modem (1-port) converter detected
> [ 18.737421] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
> [ 18.745232] option 1-1:1.3: GSM modem (1-port) converter detected
> [ 18.752838] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3
> [ 43.422579] option1 ttyUSB3: option_instat_callback: error -71
> [ 43.622575] option1 ttyUSB3: option_instat_callback: error -71
> [ 43.822579] option1 ttyUSB3: option_instat_callback: error -71
> [ 44.022575] option1 ttyUSB3: option_instat_callback: error -71
> [ 44.222569] option1 ttyUSB3: option_instat_callback: error -71
> [ 44.398490] usb 1-1: USB disconnect, device number 2
> [ 44.405414] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
> [ 44.417200] option 1-1:1.0: device disconnected
> [ 44.424903] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
> [ 44.434249] option 1-1:1.1: device disconnected
> [ 44.438824] option1 ttyUSB3: option_instat_callback: error -71
> [ 44.448436] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
> [ 44.457736] option 1-1:1.2: device disconnected
> [ 44.465204] option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
> [ 44.474480] option 1-1:1.3: device disconnected
> [ 44.479754] cdc_ether 1-1:1.4 wwan0: unregister 'cdc_ether' usb-ci_hdrc.1-1, Mobile Broadband Network Device
> [ 48.960593] usb 1-1: new high-speed USB device number 3 using ci_hdrc
> [ 49.116118] option 1-1:1.0: GSM modem (1-port) converter detected
> [ 49.123853] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
> [ 49.132029] option 1-1:1.1: GSM modem (1-port) converter detected
> [ 49.138778] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
> [ 49.147432] option 1-1:1.2: GSM modem (1-port) converter detected
> [ 49.154924] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
> [ 49.162940] option 1-1:1.3: GSM modem (1-port) converter detected
> [ 49.169724] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3
> [ 49.178440] option 1-1:1.4: GSM modem (1-port) converter detected
> [ 49.185979] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB4
> [ 49.193985] option 1-1:1.5: GSM modem (1-port) converter detected
> [ 49.201458] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB5
> ---
> 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) },
Thanks for the patch.
Could you provide the output of lsusb -v for this device?
Thanks,
Johan
next prev parent reply other threads:[~2015-12-22 18:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-22 10:51 [PATCH] usb: option.c: Fix Cinterion AHxx enumeration John Ernberg
2015-12-22 10:51 ` John Ernberg
2015-12-22 18:49 ` Johan Hovold [this message]
2016-01-07 8:52 ` John Ernberg
2016-01-25 11:44 ` Johan Hovold
2016-01-25 11:49 ` John Ernberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151222184951.GD29167@localhost \
--to=johan@kernel.org \
--cc=john.ernberg@actia.se \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.