On 12/21/12 10:22 PM, "Greg KH" <[email protected]> wrote:
>On Fri, Dec 21, 2012 at 05:54:33PM -0600, Kevin K wrote:
>> I use an USB device that looks like a serial port to the kernel.
>>However,
>> since the Device ID is unknown, I have to either modprobe usbserial with
>> the vendor/id codes as parameters, or modify generic.c so it knows to
>> handle the device. I have been going with the code modification since
>> there are 2 versions of this device with different numbers, and you can
>> only do 1 on the command line.
>>
>> What is the "right" way to see if it can be pushed into mainline
>>support?
>> It seems overkill to write another driver that essentially wraps around
>> generic.c.
>
>No it isn't overkill, we have a few drivers like this. What type of USB
>serial chip is this device? Perhaps we should just add the device ids
>to an existing driver?
>
>thanks,
>
>greg k-h
Sorry to not respond until now. I missed some time due to a cold and the
holiday.
I don't know the actual serial chip, but I went and ran lsusb -v on a
system with it.
What I guess makes it complicated is that the device is a multifunction
device. Depending on configuration, it can appear as both a serial port
and a rndis_host based network device. On Red Hat EL 6, lsusb shows the
following:
Bus 003 Device 002: ID 229c:0000
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2 ?
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x229c
idProduct 0x0000
bcdDevice 1.00
iManufacturer 1 Raytheon
iProduct 2 TacLink 3300 COM
iSerial 3 000000001197
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 75
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 4 CDC ADM W/IAD
bmAttributes 0x80
(Bus Powered)
MaxPower 400mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 2
bFunctionClass 2 Communications
bFunctionSubClass 2 Abstract (modem)
bFunctionProtocol 0 None
iFunction 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 0 None
iInterface 6 HOST COM INTERFACE
CDC Header:
bcdCDC 1.10
CDC Call Management:
bmCapabilities 0x00
bDataInterface 1
CDC ACM:
bmCapabilities 0x00
CDC Union:
bMasterInterface 0
bSlaveInterface 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 32
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0
iInterface 6 HOST COM INTERFACE
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Device Status: 0x0000
(Bus Powered)
When the RNDIS mode is enabled, the ID changes to 229c:0001, and the
rndis_host mode works without any kernel change other than making sure the
module is loaded.
Thanks,
Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html