lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <568E2756.2040205@actia.se>
Date:	Thu, 7 Jan 2016 08:52:38 +0000
From:	John Ernberg <john.ernberg@...ia.se>
To:	Johan Hovold <johan@...nel.org>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>
Subject: Re: [PATCH] usb: option.c: Fix Cinterion AHxx enumeration.

Hi Johan,

Apologies for the late reply, I was out of office.

Below is the 'lsusb -v' output for the AH3 modem.

For the mailing lists: Please CC me directly, I did not sign up for the mailing lists. Thank you.

Best regards // John Ernberg

Bus 001 Device 002: ID 1e2d:0055
Device Descriptor:
   bLength                18
   bDescriptorType         1
   bcdUSB               2.00
   bDeviceClass          239 Miscellaneous Device
   bDeviceSubClass         2 ?
   bDeviceProtocol         1 Interface Association
   bMaxPacketSize0        64
   idVendor           0x1e2d
   idProduct          0x0055
   bcdDevice            0.00
   iManufacturer           4 Cinterion
   iProduct                3 AHx
   iSerial                 0
   bNumConfigurations      1
   Configuration Descriptor:
     bLength                 9
     bDescriptorType         2
     wTotalLength          187
     bNumInterfaces          6
     bConfigurationValue     1
     iConfiguration          2 Qualcomm Configuration
     bmAttributes         0xe0
       Self Powered
       Remote Wakeup
     MaxPower               10mA
     Interface Descriptor:
       bLength                 9
       bDescriptorType         4
       bInterfaceNumber        0
       bAlternateSetting       0
       bNumEndpoints           2
       bInterfaceClass       255 Vendor Specific Class
       bInterfaceSubClass    255 Vendor Specific Subclass
       bInterfaceProtocol    255 Vendor Specific Protocol
       iInterface              0
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x81  EP 1 IN
         bmAttributes            2
           Transfer Type            Bulk
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0200  1x 512 bytes
         bInterval              32
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x01  EP 1 OUT
         bmAttributes            2
           Transfer Type            Bulk
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0200  1x 512 bytes
         bInterval              32
     Interface Descriptor:
       bLength                 9
       bDescriptorType         4
       bInterfaceNumber        1
       bAlternateSetting       0
       bNumEndpoints           2
       bInterfaceClass       255 Vendor Specific Class
       bInterfaceSubClass    255 Vendor Specific Subclass
       bInterfaceProtocol    255 Vendor Specific Protocol
       iInterface              0
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x82  EP 2 IN
         bmAttributes            2
           Transfer Type            Bulk
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0200  1x 512 bytes
         bInterval              32
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x02  EP 2 OUT
         bmAttributes            2
           Transfer Type            Bulk
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0200  1x 512 bytes
         bInterval              32
     Interface Descriptor:
       bLength                 9
       bDescriptorType         4
       bInterfaceNumber        2
       bAlternateSetting       0
       bNumEndpoints           2
       bInterfaceClass       255 Vendor Specific Class
       bInterfaceSubClass    255 Vendor Specific Subclass
       bInterfaceProtocol    255 Vendor Specific Protocol
       iInterface              0
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x83  EP 3 IN
         bmAttributes            2
           Transfer Type            Bulk
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0200  1x 512 bytes
         bInterval              32
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x03  EP 3 OUT
         bmAttributes            2
           Transfer Type            Bulk
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0200  1x 512 bytes
         bInterval              32
     Interface Descriptor:
       bLength                 9
       bDescriptorType         4
       bInterfaceNumber        3
       bAlternateSetting       0
       bNumEndpoints           3
       bInterfaceClass       255 Vendor Specific Class
       bInterfaceSubClass    255 Vendor Specific Subclass
       bInterfaceProtocol    255 Vendor Specific Protocol
       iInterface              0
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x84  EP 4 IN
         bmAttributes            3
           Transfer Type            Interrupt
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0040  1x 64 bytes
         bInterval               5
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x85  EP 5 IN
         bmAttributes            2
           Transfer Type            Bulk
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0200  1x 512 bytes
         bInterval              32
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x04  EP 4 OUT
         bmAttributes            2
           Transfer Type            Bulk
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0200  1x 512 bytes
         bInterval              32
     Interface Association:
       bLength                 8
       bDescriptorType        11
       bFirstInterface         4
       bInterfaceCount         2
       bFunctionClass          2 Communications
       bFunctionSubClass       0
       bFunctionProtocol       0
       iFunction               0
     Interface Descriptor:
       bLength                 9
       bDescriptorType         4
       bInterfaceNumber        4
       bAlternateSetting       0
       bNumEndpoints           1
       bInterfaceClass         2 Communications
       bInterfaceSubClass      6 Ethernet Networking
       bInterfaceProtocol      0
       iInterface              0
       CDC Header:
         bcdCDC               1.10
       CDC Ethernet:
         iMacAddress                      1 00A0C6294080
         bmEthernetStatistics    0x00000000
         wMaxSegmentSize               8192
         wNumberMCFilters            0x0001
         bNumberPowerFilters              0
       CDC Union:
         bMasterInterface        4
         bSlaveInterface         5
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x86  EP 6 IN
         bmAttributes            3
           Transfer Type            Interrupt
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0040  1x 64 bytes
         bInterval               5
     Interface Descriptor:
       bLength                 9
       bDescriptorType         4
       bInterfaceNumber        5
       bAlternateSetting       0
       bNumEndpoints           0
       bInterfaceClass        10 CDC Data
       bInterfaceSubClass      0 Unused
       bInterfaceProtocol      0
       iInterface              0
     Interface Descriptor:
       bLength                 9
       bDescriptorType         4
       bInterfaceNumber        5
       bAlternateSetting       1
       bNumEndpoints           2
       bInterfaceClass        10 CDC Data
       bInterfaceSubClass      0 Unused
       bInterfaceProtocol      0
       iInterface              0
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x87  EP 7 IN
         bmAttributes            2
           Transfer Type            Bulk
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0200  1x 512 bytes
         bInterval              32
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x05  EP 5 OUT
         bmAttributes            2
           Transfer Type            Bulk
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0200  1x 512 bytes
         bInterval              32
Device Qualifier (for other device speed):
   bLength                10
   bDescriptorType         6
   bcdUSB               2.00
   bDeviceClass          239 Miscellaneous Device
   bDeviceSubClass         2 ?
   bDeviceProtocol         1 Interface Association
   bMaxPacketSize0        64
   bNumConfigurations      1
Device Status:     0x0000
   (Bus Powered)



On 12/22/2015 07:49 PM, Johan Hovold wrote:
> [ +CC: linux-usb ]
>
> On Tue, Dec 22, 2015 at 10:51:32AM +0000, John Ernberg wrote:
>> From: John Ernberg <john.ernberg@...ia.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ