Re: [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Am 30.03.2015 um 12:08 schrieb Johan Hovold <johan@xxxxxxxxxx>:

> On Mon, Mar 30, 2015 at 11:32:39AM +0200, Dr. H. Nikolaus Schaller wrote:
>> Hi Johan,
>> 
>> Am 30.03.2015 um 09:45 schrieb Johan Hovold <johan@xxxxxxxxxx>:
>> 
>>> On Sat, Mar 28, 2015 at 02:37:57PM +0100, Marek Belisko wrote:
>>>> From: "H. Nikolaus Schaller" <hns@xxxxxxxxxxxxx>
>>>> 
>>>> While trying to test the Pyra GSM/GPS/3G module I had reconfigured
>>>> the USB interface by mistake and therefore needed to run a different
>>>> USB driver than CSC-ACM. It turned out that I need the "usbserial" driver.
>>> 
>>> CDC-ACM
>> 
>> oh, thanks. There is always at least one more typo in any document…
>> 
>>> 
>>>> This file is an official description how to use it:
>>>> Documentation/usb/usb-serial.txt
>>>> 
>>>> But it is outdated. The parameters vendor= and product= are no longer
>>>> available since ca. 3.12 which means that documentation is lagging behind
>>>> quite some time.
>>> 
>>> This is simply not true. The vendor and module parameters are still
>>> there for usbserial (i.e. the generic driver).
>>> 
>>> Would you mind updating this patch to document the sysfs-method as an
>>> alternative instead? Using sysfs is preferred as that functionality can
>>> be used with any usb-serial driver and the drivers can also be compiled
>>> in.
>> 
>> Hm. For me it did not work as described and therefore I searched for
>> and found the solution cited below, which appears to confirm that it does
>> not work any more. Only with these hints to use the /sys approach I
>> could make it working immediately.
>> 
>> Therefore I assumed that the documentation is outdated.
>> 
>> But it might also be a hidden bug with the parameter passing.
>> I had tested on 4.0-rc3.
>> 
>> I can try a little more but it might be waste of time to find out why the old
>> does not work, if there is a preferred method now.
> 
> Please do try to figure out if it doesn't work as we have not deprecated
> this functionality yet. It should still work.

Good news:

I have tried again (this time with 4.0-rc5) and was successful. I have no
clue why it did not work with my tests with 4.0-rc3.

Here is the log:

> gta04 login: root
> Password: 
> Last login: Thu Apr  2 14:06:13 UTC 2015 on ttyO2
> Linux gta04 4.0.0-rc5-gta04+ #1022 SMP Mon Mar 23 08:13:29 CET 2015 armv7l
> 
> The programs included with the Debian GNU/Linux system are free software;
> the exact distribution terms for each program are described in the
> individual files in /usr/share/doc/*/copyright.
> 
> Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
> permitted by applicable law.
> root@gta04:~# lsusb
> Bus 001 Device 002: ID 0424:3503 Standard Microsystems Corp. 
> Bus 001 Device 003: ID 0424:9730 Standard Microsystems Corp. 
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> root@gta04:~# rfkill unblock wwan
> [   40.443892] wwan_on_off_rfkill_set_block: blocked: 0
> [   40.449109] modem: set_power 0
> [   40.452318]   state 1
> [   40.454687] modem: send impulse
> [   41.174775] modem: done
> root@gta04:~# [   42.874901] usb 1-2.2: new high-speed USB device number 4 using ehci-omap
> [   43.008009] usb 1-2.2: New USB device found, idVendor=1e2d, idProduct=0053
> [   43.015211] usb 1-2.2: New USB device strings: Mfr=3, Product=2, SerialNumber=0
> [   43.022859] usb 1-2.2: Product: PH8
> [   43.026525] usb 1-2.2: Manufacturer: Cinterion
> 
> root@gta04:~# lsusb
> Bus 001 Device 002: ID 0424:3503 Standard Microsystems Corp. 
> Bus 001 Device 003: ID 0424:9730 Standard Microsystems Corp. 
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 001 Device 004: ID 1e2d:0053  
> root@gta04:~# insmod /lib/modules/4.0.0-rc5-gta04+/kernel/drivers/usb/serial/usbserial.ko vendor=0x1e2d product=0x0053 
> [  172.699426] usbcore: registered new interface driver usbserial
> [  172.705714] usbcore: registered new interface driver usbserial_generic
> [  172.715819] usbserial: USB Serial support registered for generic
> [  172.722237] usbserial_generic 1-2.2:1.0: The "generic" usb-serial driver is only for testing and one-off prototypes.
> [  172.733328] usbserial_generic 1-2.2:1.0: Tell linux-usb@xxxxxxxxxxxxxxx to add your device to a proper driver.
> [  172.743848] usbserial_generic 1-2.2:1.0: generic converter detected
> [  172.754681] usb 1-2.2: generic converter now attached to ttyUSB0
> [  172.761543] usbserial_generic 1-2.2:1.1: The "generic" usb-serial driver is only for testing and one-off prototypes.
> [  172.772640] usbserial_generic 1-2.2:1.1: Tell linux-usb@xxxxxxxxxxxxxxx to add your device to a proper driver.
> [  172.783154] usbserial_generic 1-2.2:1.1: generic converter detected
> [  172.790765] usb 1-2.2: generic converter now attached to ttyUSB1
> [  172.797235] usbserial_generic 1-2.2:1.2: The "generic" usb-serial driver is only for testing and one-off prototypes.
> [  172.808296] usbserial_generic 1-2.2:1.2: Tell linux-usb@xxxxxxxxxxxxxxx to add your device to a proper driver.
> [  172.818797] usbserial_generic 1-2.2:1.2: generic converter detected
> [  172.826135] usb 1-2.2: generic converter now attached to ttyUSB2
> [  172.832582] usbserial_generic 1-2.2:1.3: The "generic" usb-serial driver is only for testing and one-off prototypes.
> [  172.843642] usbserial_generic 1-2.2:1.3: Tell linux-usb@xxxxxxxxxxxxxxx to add your device to a proper driver.
> [  172.854159] usbserial_generic 1-2.2:1.3: generic converter detected
> [  172.861580] usb 1-2.2: generic converter now attached to ttyUSB3
> [  172.868018] usbserial_generic 1-2.2:1.4: The "generic" usb-serial driver is only for testing and one-off prototypes.
> [  172.879081] usbserial_generic 1-2.2:1.4: Tell linux-usb@xxxxxxxxxxxxxxx to add your device to a proper driver.
> [  172.889582] usbserial_generic 1-2.2:1.4: generic converter detected
> [  172.896804] usb 1-2.2: generic converter now attached to ttyUSB4
> root@gta04:~# ./femtocom /dev/ttyUSB3
> 
> ^SYSSTART
> ati
> ati
> 
> Cinterion
> PHS8-E
> REVISION 03.001
> 
> OK
> 

So we will edit the patch to describe
* that the sysfs method is in addition, and preferred
* and works even if driver is compiled into the kernel (which I haven’t tested in my setup but assume it works as well)

Ok?

Thanks for comments,
Nikolaus

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux