linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id
@ 2015-03-25 20:53 Marek Belisko
  2015-03-26  9:53 ` Greg KH
  2015-03-28 13:37 ` Marek Belisko
  0 siblings, 2 replies; 17+ messages in thread
From: Marek Belisko @ 2015-03-25 20:53 UTC (permalink / raw)
  To: johan, gregkh, corbet
  Cc: linux-usb, linux-doc, linux-kernel, marek, gta04-owner,
	H. Nikolaus Schaller

From: "H. Nikolaus Schaller" <hns@goldelico.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.

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.

Here was the solution:

https://bbs.archlinux.org/viewtopic.php?id=175499

  insmod usbserial vendor=0x#### product=0x####

becomes (first #### is vendor, second is product)

  modprobe usbserial
  echo #### #### >/sys/bus/usb-serial/drivers/generic/new_id

This patch changes the documentation file as needed.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
 Documentation/usb/usb-serial.txt | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/Documentation/usb/usb-serial.txt b/Documentation/usb/usb-serial.txt
index 947fa62..9f184d8 100644
--- a/Documentation/usb/usb-serial.txt
+++ b/Documentation/usb/usb-serial.txt
@@ -466,11 +466,13 @@ Generic Serial driver
   is required of your device is that it has at least one bulk in endpoint,
   or one bulk out endpoint. 
   
-  To enable the generic driver to recognize your device, build the driver
-  as a module and load it by the following invocation:
-	insmod usbserial vendor=0x#### product=0x####
-  where the #### is replaced with the hex representation of your device's
-  vendor id and product id.
+  To enable the generic driver to recognize your device, configure
+  USB_SERIAL_GENERIC=y and build the driver as a module. Then load it by the
+  following invocation:
+	modprobe usbserial
+	echo #### #### >/sys/bus/usb-serial/drivers/generic/new_id
+  where the the first #### is replaced with the hex representation of your
+  device's vendor id and the second #### by the product id.
 
   This driver has been successfully used to connect to the NetChip USB
   development board, providing a way to develop USB firmware without
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id
  2015-03-25 20:53 [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id Marek Belisko
@ 2015-03-26  9:53 ` Greg KH
  2015-03-26 10:41   ` Belisko Marek
  2015-03-28 13:37 ` Marek Belisko
  1 sibling, 1 reply; 17+ messages in thread
From: Greg KH @ 2015-03-26  9:53 UTC (permalink / raw)
  To: Marek Belisko
  Cc: johan, corbet, linux-usb, linux-doc, linux-kernel, gta04-owner,
	H. Nikolaus Schaller

On Wed, Mar 25, 2015 at 09:53:34PM +0100, Marek Belisko wrote:
> From: "H. Nikolaus Schaller" <hns@goldelico.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.
> 
> 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.
> 
> Here was the solution:
> 
> https://bbs.archlinux.org/viewtopic.php?id=175499
> 
>   insmod usbserial vendor=0x#### product=0x####
> 
> becomes (first #### is vendor, second is product)
> 
>   modprobe usbserial
>   echo #### #### >/sys/bus/usb-serial/drivers/generic/new_id
> 
> This patch changes the documentation file as needed.
> 
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>

You are forwarding on a patch from someone else, why didn't you also
sign-off on it?  Do you not agree with it?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id
  2015-03-26  9:53 ` Greg KH
@ 2015-03-26 10:41   ` Belisko Marek
  2015-03-26 11:34     ` Dr. H. Nikolaus Schaller
  2015-03-26 11:42     ` Greg KH
  0 siblings, 2 replies; 17+ messages in thread
From: Belisko Marek @ 2015-03-26 10:41 UTC (permalink / raw)
  To: Greg KH
  Cc: johan, corbet, Linux USB Mailing List, linux-doc, LKML,
	GTA04 owners, H. Nikolaus Schaller

On Thu, Mar 26, 2015 at 10:53 AM, Greg KH <gregkh@linuxfoundation.org> wrote:
> On Wed, Mar 25, 2015 at 09:53:34PM +0100, Marek Belisko wrote:
>> From: "H. Nikolaus Schaller" <hns@goldelico.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.
>>
>> 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.
>>
>> Here was the solution:
>>
>> https://bbs.archlinux.org/viewtopic.php?id=175499
>>
>>   insmod usbserial vendor=0x#### product=0x####
>>
>> becomes (first #### is vendor, second is product)
>>
>>   modprobe usbserial
>>   echo #### #### >/sys/bus/usb-serial/drivers/generic/new_id
>>
>> This patch changes the documentation file as needed.
>>
>> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
>
> You are forwarding on a patch from someone else, why didn't you also
> sign-off on it?  Do you not agree with it?
I wasn't involved in patch development I just review it and forward.
>
> thanks,
>
> greg k-h

BR,

marek

-- 
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id
  2015-03-26 10:41   ` Belisko Marek
@ 2015-03-26 11:34     ` Dr. H. Nikolaus Schaller
  2015-03-26 11:42     ` Greg KH
  1 sibling, 0 replies; 17+ messages in thread
From: Dr. H. Nikolaus Schaller @ 2015-03-26 11:34 UTC (permalink / raw)
  To: Greg KH
  Cc: johan, corbet, Linux USB Mailing List, linux-doc, LKML,
	GTA04 owners, Belisko Marek


Am 26.03.2015 um 11:41 schrieb Belisko Marek <marek.belisko@gmail.com>:

> On Thu, Mar 26, 2015 at 10:53 AM, Greg KH <gregkh@linuxfoundation.org> wrote:
>> On Wed, Mar 25, 2015 at 09:53:34PM +0100, Marek Belisko wrote:
>>> From: "H. Nikolaus Schaller" <hns@goldelico.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.
>>> 
>>> 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.
>>> 
>>> Here was the solution:
>>> 
>>> https://bbs.archlinux.org/viewtopic.php?id=175499
>>> 
>>>  insmod usbserial vendor=0x#### product=0x####
>>> 
>>> becomes (first #### is vendor, second is product)
>>> 
>>>  modprobe usbserial
>>>  echo #### #### >/sys/bus/usb-serial/drivers/generic/new_id
>>> 
>>> This patch changes the documentation file as needed.
>>> 
>>> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
>> 
>> You are forwarding on a patch from someone else, why didn't you also
>> sign-off on it?  Do you not agree with it?
> I wasn’t involved in patch development I just review it and forward.

Yes,
I asked Marek to submit this patch (from our local repo).

BR,
Nikolaus

>> 
>> thanks,
>> 
>> greg k-h
> 
> BR,
> 
> marek
> 
> -- 
> as simple and primitive as possible
> -------------------------------------------------
> Marek Belisko - OPEN-NANDRA
> Freelance Developer
> 
> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
> Tel: +421 915 052 184
> skype: marekwhite
> twitter: #opennandra
> web: http://open-nandra.com


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id
  2015-03-26 10:41   ` Belisko Marek
  2015-03-26 11:34     ` Dr. H. Nikolaus Schaller
@ 2015-03-26 11:42     ` Greg KH
  1 sibling, 0 replies; 17+ messages in thread
From: Greg KH @ 2015-03-26 11:42 UTC (permalink / raw)
  To: Belisko Marek
  Cc: johan, corbet, Linux USB Mailing List, linux-doc, LKML,
	GTA04 owners, H. Nikolaus Schaller

On Thu, Mar 26, 2015 at 11:41:24AM +0100, Belisko Marek wrote:
> On Thu, Mar 26, 2015 at 10:53 AM, Greg KH <gregkh@linuxfoundation.org> wrote:
> > On Wed, Mar 25, 2015 at 09:53:34PM +0100, Marek Belisko wrote:
> >> From: "H. Nikolaus Schaller" <hns@goldelico.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.
> >>
> >> 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.
> >>
> >> Here was the solution:
> >>
> >> https://bbs.archlinux.org/viewtopic.php?id=175499
> >>
> >>   insmod usbserial vendor=0x#### product=0x####
> >>
> >> becomes (first #### is vendor, second is product)
> >>
> >>   modprobe usbserial
> >>   echo #### #### >/sys/bus/usb-serial/drivers/generic/new_id
> >>
> >> This patch changes the documentation file as needed.
> >>
> >> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> >
> > You are forwarding on a patch from someone else, why didn't you also
> > sign-off on it?  Do you not agree with it?
> I wasn't involved in patch development I just review it and forward.

If you reviewed and forwarded it, why did you not add a signed-off-by:
to it?  Do you not think it is acceptable for merging?  If not, then we
shouldn't either :)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id
  2015-03-25 20:53 [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id Marek Belisko
  2015-03-26  9:53 ` Greg KH
@ 2015-03-28 13:37 ` Marek Belisko
  2015-03-30  7:45   ` Johan Hovold
  2015-04-02 10:12   ` Jonathan Corbet
  1 sibling, 2 replies; 17+ messages in thread
From: Marek Belisko @ 2015-03-28 13:37 UTC (permalink / raw)
  To: johan, gregkh, corbet
  Cc: linux-usb, linux-doc, linux-kernel, marek, gta04-owner,
	H. Nikolaus Schaller

From: "H. Nikolaus Schaller" <hns@goldelico.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.

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.

Here was the solution:

https://bbs.archlinux.org/viewtopic.php?id=175499

  insmod usbserial vendor=0x#### product=0x####

becomes (first #### is vendor, second is product)

  modprobe usbserial
  echo #### #### >/sys/bus/usb-serial/drivers/generic/new_id

This patch changes the documentation file as needed.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Marek Belisko <marek@goldelico.com>
---
 Documentation/usb/usb-serial.txt | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/Documentation/usb/usb-serial.txt b/Documentation/usb/usb-serial.txt
index 947fa62..9f184d8 100644
--- a/Documentation/usb/usb-serial.txt
+++ b/Documentation/usb/usb-serial.txt
@@ -466,11 +466,13 @@ Generic Serial driver
   is required of your device is that it has at least one bulk in endpoint,
   or one bulk out endpoint. 
   
-  To enable the generic driver to recognize your device, build the driver
-  as a module and load it by the following invocation:
-	insmod usbserial vendor=0x#### product=0x####
-  where the #### is replaced with the hex representation of your device's
-  vendor id and product id.
+  To enable the generic driver to recognize your device, configure
+  USB_SERIAL_GENERIC=y and build the driver as a module. Then load it by the
+  following invocation:
+	modprobe usbserial
+	echo #### #### >/sys/bus/usb-serial/drivers/generic/new_id
+  where the the first #### is replaced with the hex representation of your
+  device's vendor id and the second #### by the product id.
 
   This driver has been successfully used to connect to the NetChip USB
   development board, providing a way to develop USB firmware without
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id
  2015-03-28 13:37 ` Marek Belisko
@ 2015-03-30  7:45   ` Johan Hovold
  2015-03-30  9:32     ` Dr. H. Nikolaus Schaller
  2015-04-02 10:12   ` Jonathan Corbet
  1 sibling, 1 reply; 17+ messages in thread
From: Johan Hovold @ 2015-03-30  7:45 UTC (permalink / raw)
  To: Marek Belisko
  Cc: johan, gregkh, corbet, linux-usb, linux-doc, linux-kernel,
	gta04-owner, H. Nikolaus Schaller

On Sat, Mar 28, 2015 at 02:37:57PM +0100, Marek Belisko wrote:
> From: "H. Nikolaus Schaller" <hns@goldelico.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

> 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.

> Here was the solution:
> 
> https://bbs.archlinux.org/viewtopic.php?id=175499
> 
>   insmod usbserial vendor=0x#### product=0x####
> 
> becomes (first #### is vendor, second is product)
> 
>   modprobe usbserial
>   echo #### #### >/sys/bus/usb-serial/drivers/generic/new_id
> 
> This patch changes the documentation file as needed.
> 
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> Signed-off-by: Marek Belisko <marek@goldelico.com>
> ---
>  Documentation/usb/usb-serial.txt | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/usb/usb-serial.txt b/Documentation/usb/usb-serial.txt
> index 947fa62..9f184d8 100644
> --- a/Documentation/usb/usb-serial.txt
> +++ b/Documentation/usb/usb-serial.txt
> @@ -466,11 +466,13 @@ Generic Serial driver
>    is required of your device is that it has at least one bulk in endpoint,
>    or one bulk out endpoint. 
>    
> -  To enable the generic driver to recognize your device, build the driver
> -  as a module and load it by the following invocation:
> -	insmod usbserial vendor=0x#### product=0x####
> -  where the #### is replaced with the hex representation of your device's
> -  vendor id and product id.
> +  To enable the generic driver to recognize your device, configure
> +  USB_SERIAL_GENERIC=y and build the driver as a module. Then load it by the

You don't need to build the driver as a module when using the sysfs
method.

> +  following invocation:
> +	modprobe usbserial
> +	echo #### #### >/sys/bus/usb-serial/drivers/generic/new_id
> +  where the the first #### is replaced with the hex representation of your
> +  device's vendor id and the second #### by the product id.
>  
>    This driver has been successfully used to connect to the NetChip USB
>    development board, providing a way to develop USB firmware without

Thanks,
Johan

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id
  2015-03-30  7:45   ` Johan Hovold
@ 2015-03-30  9:32     ` Dr. H. Nikolaus Schaller
  2015-03-30  9:40       ` [Gta04-owner] " Dr. H. Nikolaus Schaller
  2015-03-30 10:08       ` Johan Hovold
  0 siblings, 2 replies; 17+ messages in thread
From: Dr. H. Nikolaus Schaller @ 2015-03-30  9:32 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Marek Belisko, gregkh, corbet, linux-usb, linux-doc,
	linux-kernel, gta04-owner

Hi Johan,

Am 30.03.2015 um 09:45 schrieb Johan Hovold <johan@kernel.org>:

> On Sat, Mar 28, 2015 at 02:37:57PM +0100, Marek Belisko wrote:
>> From: "H. Nikolaus Schaller" <hns@goldelico.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.

> 
>> Here was the solution:
>> 
>> https://bbs.archlinux.org/viewtopic.php?id=175499
>> 
>>  insmod usbserial vendor=0x#### product=0x####
>> 
>> becomes (first #### is vendor, second is product)
>> 
>>  modprobe usbserial
>>  echo #### #### >/sys/bus/usb-serial/drivers/generic/new_id
>> 
>> This patch changes the documentation file as needed.
>> 
>> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
>> Signed-off-by: Marek Belisko <marek@goldelico.com>
>> ---
>> Documentation/usb/usb-serial.txt | 12 +++++++-----
>> 1 file changed, 7 insertions(+), 5 deletions(-)
>> 
>> diff --git a/Documentation/usb/usb-serial.txt b/Documentation/usb/usb-serial.txt
>> index 947fa62..9f184d8 100644
>> --- a/Documentation/usb/usb-serial.txt
>> +++ b/Documentation/usb/usb-serial.txt
>> @@ -466,11 +466,13 @@ Generic Serial driver
>>   is required of your device is that it has at least one bulk in endpoint,
>>   or one bulk out endpoint. 
>> 
>> -  To enable the generic driver to recognize your device, build the driver
>> -  as a module and load it by the following invocation:
>> -	insmod usbserial vendor=0x#### product=0x####
>> -  where the #### is replaced with the hex representation of your device's
>> -  vendor id and product id.
>> +  To enable the generic driver to recognize your device, configure
>> +  USB_SERIAL_GENERIC=y and build the driver as a module. Then load it by the
> 
> You don't need to build the driver as a module when using the sysfs
> method.

Ok, that is right and my formulation is too narrow on that.

So we just s/ as a module//.

> 
>> +  following invocation:
>> +	modprobe usbserial
>> +	echo #### #### >/sys/bus/usb-serial/drivers/generic/new_id
>> +  where the the first #### is replaced with the hex representation of your
>> +  device's vendor id and the second #### by the product id.
>> 
>>   This driver has been successfully used to connect to the NetChip USB
>>   development board, providing a way to develop USB firmware without
> 
> Thanks,
> Johan

Thanks as well,
Nikolaus



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Gta04-owner] [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id
  2015-03-30  9:32     ` Dr. H. Nikolaus Schaller
@ 2015-03-30  9:40       ` Dr. H. Nikolaus Schaller
  2015-03-30 10:10         ` Johan Hovold
  2015-03-30 10:08       ` Johan Hovold
  1 sibling, 1 reply; 17+ messages in thread
From: Dr. H. Nikolaus Schaller @ 2015-03-30  9:40 UTC (permalink / raw)
  To: List for communicating with real GTA04 owners
  Cc: Johan Hovold, corbet, linux-doc, gregkh, linux-usb, linux-kernel,
	Marek Belisko


Am 30.03.2015 um 11:32 schrieb Dr. H. Nikolaus Schaller <hns@goldelico.com>:

> Hi Johan,
> 
> Am 30.03.2015 um 09:45 schrieb Johan Hovold <johan@kernel.org>:
> 
>> On Sat, Mar 28, 2015 at 02:37:57PM +0100, Marek Belisko wrote:
>>> From: "H. Nikolaus Schaller" <hns@goldelico.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.
> 
>> 
>>> Here was the solution:
>>> 
>>> https://bbs.archlinux.org/viewtopic.php?id=175499
>>> 
>>> insmod usbserial vendor=0x#### product=0x####
>>> 
>>> becomes (first #### is vendor, second is product)
>>> 
>>> modprobe usbserial
>>> echo #### #### >/sys/bus/usb-serial/drivers/generic/new_id
>>> 
>>> This patch changes the documentation file as needed.
>>> 
>>> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
>>> Signed-off-by: Marek Belisko <marek@goldelico.com>
>>> ---
>>> Documentation/usb/usb-serial.txt | 12 +++++++-----
>>> 1 file changed, 7 insertions(+), 5 deletions(-)
>>> 
>>> diff --git a/Documentation/usb/usb-serial.txt b/Documentation/usb/usb-serial.txt
>>> index 947fa62..9f184d8 100644
>>> --- a/Documentation/usb/usb-serial.txt
>>> +++ b/Documentation/usb/usb-serial.txt
>>> @@ -466,11 +466,13 @@ Generic Serial driver
>>>  is required of your device is that it has at least one bulk in endpoint,
>>>  or one bulk out endpoint. 
>>> 
>>> -  To enable the generic driver to recognize your device, build the driver
>>> -  as a module and load it by the following invocation:
>>> -	insmod usbserial vendor=0x#### product=0x####
>>> -  where the #### is replaced with the hex representation of your device's
>>> -  vendor id and product id.
>>> +  To enable the generic driver to recognize your device, configure
>>> +  USB_SERIAL_GENERIC=y and build the driver as a module. Then load it by the
>> 
>> You don't need to build the driver as a module when using the sysfs
>> method.
> 
> Ok, that is right and my formulation is too narrow on that.

Well, I should add that not my formulation was too narrow but already the original.
> 
> So we just s/ as a module//.
> 
>> 
>>> +  following invocation:
>>> +	modprobe usbserial
>>> +	echo #### #### >/sys/bus/usb-serial/drivers/generic/new_id
>>> +  where the the first #### is replaced with the hex representation of your
>>> +  device's vendor id and the second #### by the product id.
>>> 
>>>  This driver has been successfully used to connect to the NetChip USB
>>>  development board, providing a way to develop USB firmware without
>> 
>> Thanks,
>> Johan
> 
> Thanks as well,
> Nikolaus
> 
> 
> _______________________________________________
> Gta04-owner mailing list
> Gta04-owner@goldelico.com
> http://lists.goldelico.com/mailman/listinfo.cgi/gta04-owner


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id
  2015-03-30  9:32     ` Dr. H. Nikolaus Schaller
  2015-03-30  9:40       ` [Gta04-owner] " Dr. H. Nikolaus Schaller
@ 2015-03-30 10:08       ` Johan Hovold
  2015-04-02 14:25         ` Dr. H. Nikolaus Schaller
  1 sibling, 1 reply; 17+ messages in thread
From: Johan Hovold @ 2015-03-30 10:08 UTC (permalink / raw)
  To: Dr. H. Nikolaus Schaller
  Cc: Johan Hovold, Marek Belisko, gregkh, corbet, linux-usb,
	linux-doc, linux-kernel, gta04-owner

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@kernel.org>:
> 
> > On Sat, Mar 28, 2015 at 02:37:57PM +0100, Marek Belisko wrote:
> >> From: "H. Nikolaus Schaller" <hns@goldelico.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.

Johan

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Gta04-owner] [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id
  2015-03-30  9:40       ` [Gta04-owner] " Dr. H. Nikolaus Schaller
@ 2015-03-30 10:10         ` Johan Hovold
  0 siblings, 0 replies; 17+ messages in thread
From: Johan Hovold @ 2015-03-30 10:10 UTC (permalink / raw)
  To: Dr. H. Nikolaus Schaller
  Cc: List for communicating with real GTA04 owners, Johan Hovold,
	corbet, linux-doc, gregkh, linux-usb, linux-kernel,
	Marek Belisko

On Mon, Mar 30, 2015 at 11:40:20AM +0200, Dr. H. Nikolaus Schaller wrote:

> >>> diff --git a/Documentation/usb/usb-serial.txt b/Documentation/usb/usb-serial.txt
> >>> index 947fa62..9f184d8 100644
> >>> --- a/Documentation/usb/usb-serial.txt
> >>> +++ b/Documentation/usb/usb-serial.txt
> >>> @@ -466,11 +466,13 @@ Generic Serial driver
> >>>  is required of your device is that it has at least one bulk in endpoint,
> >>>  or one bulk out endpoint. 
> >>> 
> >>> -  To enable the generic driver to recognize your device, build the driver
> >>> -  as a module and load it by the following invocation:
> >>> -	insmod usbserial vendor=0x#### product=0x####
> >>> -  where the #### is replaced with the hex representation of your device's
> >>> -  vendor id and product id.
> >>> +  To enable the generic driver to recognize your device, configure
> >>> +  USB_SERIAL_GENERIC=y and build the driver as a module. Then load it by the
> >> 
> >> You don't need to build the driver as a module when using the sysfs
> >> method.
> > 
> > Ok, that is right and my formulation is too narrow on that.
> 
> Well, I should add that not my formulation was too narrow but already
> the original.

Since you change the description so that the context becomes invalid,
you are responsible for updating the context as well.

> > 
> > So we just s/ as a module//.
> > 
> >> 
> >>> +  following invocation:
> >>> +	modprobe usbserial
> >>> +	echo #### #### >/sys/bus/usb-serial/drivers/generic/new_id
> >>> +  where the the first #### is replaced with the hex representation of your
> >>> +  device's vendor id and the second #### by the product id.
> >>> 
> >>>  This driver has been successfully used to connect to the NetChip USB
> >>>  development board, providing a way to develop USB firmware without

Johan

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id
  2015-03-28 13:37 ` Marek Belisko
  2015-03-30  7:45   ` Johan Hovold
@ 2015-04-02 10:12   ` Jonathan Corbet
  2015-04-02 10:35     ` Johan Hovold
  1 sibling, 1 reply; 17+ messages in thread
From: Jonathan Corbet @ 2015-04-02 10:12 UTC (permalink / raw)
  To: Marek Belisko
  Cc: johan, gregkh, linux-usb, linux-doc, linux-kernel, gta04-owner,
	H. Nikolaus Schaller

On Sat, 28 Mar 2015 14:37:57 +0100
Marek Belisko <marek@goldelico.com> wrote:

> This patch changes the documentation file as needed.

Applied to the docs tree (with the changelog typo fixed).

Thanks,

jon

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id
  2015-04-02 10:12   ` Jonathan Corbet
@ 2015-04-02 10:35     ` Johan Hovold
  2015-04-02 10:39       ` Dr. H. Nikolaus Schaller
  2015-04-02 12:14       ` Jonathan Corbet
  0 siblings, 2 replies; 17+ messages in thread
From: Johan Hovold @ 2015-04-02 10:35 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: Marek Belisko, johan, gregkh, linux-usb, linux-doc, linux-kernel,
	gta04-owner, H. Nikolaus Schaller

On Thu, Apr 02, 2015 at 12:12:37PM +0200, Jonathan Corbet wrote:
> On Sat, 28 Mar 2015 14:37:57 +0100
> Marek Belisko <marek@goldelico.com> wrote:
> 
> > This patch changes the documentation file as needed.
> 
> Applied to the docs tree (with the changelog typo fixed).

This patch was incorrect and needed to be updated as discussed in the
thread. Can you drop it or is your tree immutable?

Thanks,
Johan

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id
  2015-04-02 10:35     ` Johan Hovold
@ 2015-04-02 10:39       ` Dr. H. Nikolaus Schaller
  2015-04-02 12:14       ` Jonathan Corbet
  1 sibling, 0 replies; 17+ messages in thread
From: Dr. H. Nikolaus Schaller @ 2015-04-02 10:39 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Jonathan Corbet, Marek Belisko, gregkh, linux-usb, linux-doc,
	linux-kernel, gta04-owner


Am 02.04.2015 um 12:35 schrieb Johan Hovold <johan@kernel.org>:

> On Thu, Apr 02, 2015 at 12:12:37PM +0200, Jonathan Corbet wrote:
>> On Sat, 28 Mar 2015 14:37:57 +0100
>> Marek Belisko <marek@goldelico.com> wrote:
>> 
>>> This patch changes the documentation file as needed.
>> 
>> Applied to the docs tree (with the changelog typo fixed).
> 
> This patch was incorrect and needed to be updated as discussed in the
> thread. Can you drop it or is your tree immutable?

Yes, please.
I did not find time to test Johan’s valuable comments.

BR,
Nikolaus


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id
  2015-04-02 10:35     ` Johan Hovold
  2015-04-02 10:39       ` Dr. H. Nikolaus Schaller
@ 2015-04-02 12:14       ` Jonathan Corbet
  1 sibling, 0 replies; 17+ messages in thread
From: Jonathan Corbet @ 2015-04-02 12:14 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Marek Belisko, gregkh, linux-usb, linux-doc, linux-kernel,
	gta04-owner, H. Nikolaus Schaller

On Thu, 2 Apr 2015 12:35:09 +0200
Johan Hovold <johan@kernel.org> wrote:

> This patch was incorrect and needed to be updated as discussed in the
> thread. Can you drop it or is your tree immutable?

Sigh...and I thought I was on top of that.  Dropped, sorry for the
confusion.

jon

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id
  2015-03-30 10:08       ` Johan Hovold
@ 2015-04-02 14:25         ` Dr. H. Nikolaus Schaller
  2015-04-02 14:34           ` Johan Hovold
  0 siblings, 1 reply; 17+ messages in thread
From: Dr. H. Nikolaus Schaller @ 2015-04-02 14:25 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Marek Belisko, gregkh, corbet, linux-usb, linux-doc,
	linux-kernel, gta04-owner

Hi,

Am 30.03.2015 um 12:08 schrieb Johan Hovold <johan@kernel.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@kernel.org>:
>> 
>>> On Sat, Mar 28, 2015 at 02:37:57PM +0100, Marek Belisko wrote:
>>>> From: "H. Nikolaus Schaller" <hns@goldelico.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@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@vger.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@vger.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@vger.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@vger.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@vger.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@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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id
  2015-04-02 14:25         ` Dr. H. Nikolaus Schaller
@ 2015-04-02 14:34           ` Johan Hovold
  0 siblings, 0 replies; 17+ messages in thread
From: Johan Hovold @ 2015-04-02 14:34 UTC (permalink / raw)
  To: Dr. H. Nikolaus Schaller
  Cc: Johan Hovold, Marek Belisko, gregkh, corbet, linux-usb,
	linux-doc, linux-kernel, gta04-owner

On Thu, Apr 02, 2015 at 04:25:50PM +0200, Dr. H. Nikolaus Schaller wrote:

> >>>> 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.

Great.
 
> 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?

That should do it (and, yes, it works when the module is compiled in).

Thanks,
Johan

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-04-02 14:34 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-25 20:53 [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id Marek Belisko
2015-03-26  9:53 ` Greg KH
2015-03-26 10:41   ` Belisko Marek
2015-03-26 11:34     ` Dr. H. Nikolaus Schaller
2015-03-26 11:42     ` Greg KH
2015-03-28 13:37 ` Marek Belisko
2015-03-30  7:45   ` Johan Hovold
2015-03-30  9:32     ` Dr. H. Nikolaus Schaller
2015-03-30  9:40       ` [Gta04-owner] " Dr. H. Nikolaus Schaller
2015-03-30 10:10         ` Johan Hovold
2015-03-30 10:08       ` Johan Hovold
2015-04-02 14:25         ` Dr. H. Nikolaus Schaller
2015-04-02 14:34           ` Johan Hovold
2015-04-02 10:12   ` Jonathan Corbet
2015-04-02 10:35     ` Johan Hovold
2015-04-02 10:39       ` Dr. H. Nikolaus Schaller
2015-04-02 12:14       ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).