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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 2 Apr 2015 16:25:50 +0200
From:	"Dr. H. Nikolaus Schaller" <hns@...delico.com>
To:	Johan Hovold <johan@...nel.org>
Cc:	Marek Belisko <marek@...delico.com>, gregkh@...uxfoundation.org,
	corbet@....net, linux-usb@...r.kernel.org,
	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
	gta04-owner@...delico.com
Subject: Re: [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id

Hi,

Am 30.03.2015 um 12:08 schrieb Johan Hovold <johan@...nel.org>:

> 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@...nel.org>:
>> 
>>> On Sat, Mar 28, 2015 at 02:37:57PM +0100, Marek Belisko wrote:
>>>> From: "H. Nikolaus Schaller" <hns@...delico.com>
>>>> 
>>>> 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@...04:~# 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@...04:~# 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@...04:~# [   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@...04:~# 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@...04:~# 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@...r.kernel.org 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@...r.kernel.org 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@...r.kernel.org 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@...r.kernel.org 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@...r.kernel.org 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@...04:~# ./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-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