All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] Documentation usb serial: fixed how to provide vendor and product id
@ 2015-04-13 20:09 Marek Belisko
  2015-04-14  7:30 ` Johan Hovold
  2015-04-20 20:15 ` Marek Belisko
  0 siblings, 2 replies; 7+ messages in thread
From: Marek Belisko @ 2015-04-13 20:09 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 a Cinterion GSM/GPS/3G module I had reconfigured
the USB interface by mistake and therefore needed to run a different
USB driver than CDC-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 only available
if compiled as a kernel module and have been superseded by a /sys interface.

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 to describe the modern variant.
Please note that the old one still works (if compiled as module).

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Marek Belisko <marek@goldelico.com>
---

changes from v1:
- add modern variant with /sys as preferred but also old one works so
  keep it in documentation (was removed in first version which was not correct)

 Documentation/usb/usb-serial.txt | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/Documentation/usb/usb-serial.txt b/Documentation/usb/usb-serial.txt
index 947fa62..3f31c96 100644
--- a/Documentation/usb/usb-serial.txt
+++ b/Documentation/usb/usb-serial.txt
@@ -465,12 +465,15 @@ Generic Serial driver
   device, and does not support any kind of device flow control. All that
   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####
+
+  To enable the generic driver to recognize your device, provide
+	echo #### #### >/sys/bus/usb-serial/drivers/generic/new_id
   where the #### is replaced with the hex representation of your device's
   vendor id and product id.
+  If the driver is compiled as a module, you can either
+	modprobe usbserial
+  or, you can also provide the parameters directly
+	insmod usbserial vendor=0x#### product=0x####
 
   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] 7+ messages in thread

* Re: [PATCH v2] Documentation usb serial: fixed how to provide vendor and product id
  2015-04-13 20:09 [PATCH v2] Documentation usb serial: fixed how to provide vendor and product id Marek Belisko
@ 2015-04-14  7:30 ` Johan Hovold
  2015-04-20 20:15 ` Marek Belisko
  1 sibling, 0 replies; 7+ messages in thread
From: Johan Hovold @ 2015-04-14  7:30 UTC (permalink / raw)
  To: Marek Belisko
  Cc: johan, gregkh, corbet, linux-usb, linux-doc, linux-kernel,
	gta04-owner, H. Nikolaus Schaller

On Mon, Apr 13, 2015 at 10:09:27PM +0200, Marek Belisko wrote:
> From: "H. Nikolaus Schaller" <hns@goldelico.com>
> 
> While trying to test a Cinterion GSM/GPS/3G module I had reconfigured
> the USB interface by mistake and therefore needed to run a different
> USB driver than CDC-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 only available
> if compiled as a kernel module and have been superseded by a /sys interface.
> 
> 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 to describe the modern variant.
> Please note that the old one still works (if compiled as module).
> 
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> Signed-off-by: Marek Belisko <marek@goldelico.com>
> ---
> 
> changes from v1:
> - add modern variant with /sys as preferred but also old one works so
>   keep it in documentation (was removed in first version which was not correct)

Thanks for the update. Much better.

>  Documentation/usb/usb-serial.txt | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/usb/usb-serial.txt b/Documentation/usb/usb-serial.txt
> index 947fa62..3f31c96 100644
> --- a/Documentation/usb/usb-serial.txt
> +++ b/Documentation/usb/usb-serial.txt
> @@ -465,12 +465,15 @@ Generic Serial driver
>    device, and does not support any kind of device flow control. All that
>    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####
> +
> +  To enable the generic driver to recognize your device, provide
> +	echo #### #### >/sys/bus/usb-serial/drivers/generic/new_id
>    where the #### is replaced with the hex representation of your device's
>    vendor id and product id.

Could you use distinct symbols for vendor and product if (e.g. <vid>
and <pid>) to make it clear which is which?

> +  If the driver is compiled as a module, you can either
> +	modprobe usbserial

This isn't needed.

> +  or, you can also provide the parameters directly

This could be "you can also provide one id when loading the module".

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

Thanks,
Johan

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

* [PATCH v2] Documentation usb serial: fixed how to provide vendor and product id
  2015-04-13 20:09 [PATCH v2] Documentation usb serial: fixed how to provide vendor and product id Marek Belisko
  2015-04-14  7:30 ` Johan Hovold
@ 2015-04-20 20:15 ` Marek Belisko
  2015-04-21  7:47   ` Johan Hovold
  1 sibling, 1 reply; 7+ messages in thread
From: Marek Belisko @ 2015-04-20 20:15 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 a Cinterion GSM/GPS/3G module I had reconfigured
the USB interface by mistake and therefore needed to run a different
USB driver than CDC-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 only available
if compiled as a kernel module and have been superseded by a /sys interface.

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 to describe the modern variant.
Please note that the old one still works (if compiled as module).

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Marek Belisko <marek@goldelico.com>
---

- fixed 2 sentences suggested by Johan Hovold

 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..349f310 100644
--- a/Documentation/usb/usb-serial.txt
+++ b/Documentation/usb/usb-serial.txt
@@ -465,12 +465,14 @@ Generic Serial driver
   device, and does not support any kind of device flow control. All that
   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:
+
+  To enable the generic driver to recognize your device, provide
+	echo <vid> <pid> >/sys/bus/usb-serial/drivers/generic/new_id
+  where the <vid> and <pid> is replaced with the hex representation of your
+  device's vendor id and product id.
+  If the driver is compiled as a module you can also provide one id when
+  loading the module
 	insmod usbserial vendor=0x#### product=0x####
-  where the #### is replaced with the hex representation of your device's
-  vendor id and 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] 7+ messages in thread

* Re: [PATCH v2] Documentation usb serial: fixed how to provide vendor and product id
  2015-04-20 20:15 ` Marek Belisko
@ 2015-04-21  7:47   ` Johan Hovold
  2015-04-21 11:57     ` Bjørn Mork
  0 siblings, 1 reply; 7+ messages in thread
From: Johan Hovold @ 2015-04-21  7:47 UTC (permalink / raw)
  To: Marek Belisko
  Cc: johan, gregkh, corbet, linux-usb, linux-doc, linux-kernel,
	gta04-owner, H. Nikolaus Schaller

On Mon, Apr 20, 2015 at 10:15:20PM +0200, Marek Belisko wrote:
> From: "H. Nikolaus Schaller" <hns@goldelico.com>
> 
> While trying to test a Cinterion GSM/GPS/3G module I had reconfigured
> the USB interface by mistake and therefore needed to run a different
> USB driver than CDC-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 only available
> if compiled as a kernel module and have been superseded by a /sys interface.
> 
> 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 to describe the modern variant.
> Please note that the old one still works (if compiled as module).
> 
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> Signed-off-by: Marek Belisko <marek@goldelico.com>
> ---
> 
> - fixed 2 sentences suggested by Johan Hovold

Thanks for fixing this. Looks good now.

Acked-by: Johan Hovold <johan@kernel.org>

Johan

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

* Re: [PATCH v2] Documentation usb serial: fixed how to provide vendor and product id
  2015-04-21  7:47   ` Johan Hovold
@ 2015-04-21 11:57     ` Bjørn Mork
  2015-04-21 13:03       ` Johan Hovold
  0 siblings, 1 reply; 7+ messages in thread
From: Bjørn Mork @ 2015-04-21 11:57 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Marek Belisko, gregkh, corbet, linux-usb, linux-doc,
	linux-kernel, gta04-owner, H. Nikolaus Schaller

Johan Hovold <johan@kernel.org> writes:
> On Mon, Apr 20, 2015 at 10:15:20PM +0200, Marek Belisko wrote:
>> From: "H. Nikolaus Schaller" <hns@goldelico.com>
>> 
>> The parameters vendor= and product= are only available
>> if compiled as a kernel module

Really? I believe you should be able to do

  usbserial.vendor=vid usbserial.product=pid

on the command line if usbserial is built-in. Not that I recommend doing
that.  But it should work.


Bjørn

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

* Re: [PATCH v2] Documentation usb serial: fixed how to provide vendor and product id
  2015-04-21 11:57     ` Bjørn Mork
@ 2015-04-21 13:03       ` Johan Hovold
  2015-05-07 15:45         ` Jonathan Corbet
  0 siblings, 1 reply; 7+ messages in thread
From: Johan Hovold @ 2015-04-21 13:03 UTC (permalink / raw)
  To: Bjørn Mork
  Cc: Johan Hovold, Marek Belisko, gregkh, corbet, linux-usb,
	linux-doc, linux-kernel, gta04-owner, H. Nikolaus Schaller

On Tue, Apr 21, 2015 at 01:57:05PM +0200, Bjørn Mork wrote:
> Johan Hovold <johan@kernel.org> writes:
> > On Mon, Apr 20, 2015 at 10:15:20PM +0200, Marek Belisko wrote:
> >> From: "H. Nikolaus Schaller" <hns@goldelico.com>
> >> 
> >> The parameters vendor= and product= are only available
> >> if compiled as a kernel module
> 
> Really? I believe you should be able to do
> 
>   usbserial.vendor=vid usbserial.product=pid
> 
> on the command line if usbserial is built-in. Not that I recommend doing
> that.  But it should work.

You're right, the commit message is a little misleading, but the updated
documentation is correct. The current text does not mention the option
to pass module parameters on the kernel command line explicitly either.

Johan

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

* Re: [PATCH v2] Documentation usb serial: fixed how to provide vendor and product id
  2015-04-21 13:03       ` Johan Hovold
@ 2015-05-07 15:45         ` Jonathan Corbet
  0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Corbet @ 2015-05-07 15:45 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Bjørn Mork, Marek Belisko, gregkh, linux-usb, linux-doc,
	linux-kernel, gta04-owner, H. Nikolaus Schaller

On Tue, 21 Apr 2015 15:03:10 +0200
Johan Hovold <johan@kernel.org> wrote:

> > Really? I believe you should be able to do
> > 
> >   usbserial.vendor=vid usbserial.product=pid
> > 
> > on the command line if usbserial is built-in. Not that I recommend doing
> > that.  But it should work.  
> 
> You're right, the commit message is a little misleading, but the updated
> documentation is correct. The current text does not mention the option
> to pass module parameters on the kernel command line explicitly either.

OK, I've taken this into the docs tree with a commit message tweak to
reflect this discussion.

Thanks,

jon

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

end of thread, other threads:[~2015-05-07 15:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-13 20:09 [PATCH v2] Documentation usb serial: fixed how to provide vendor and product id Marek Belisko
2015-04-14  7:30 ` Johan Hovold
2015-04-20 20:15 ` Marek Belisko
2015-04-21  7:47   ` Johan Hovold
2015-04-21 11:57     ` Bjørn Mork
2015-04-21 13:03       ` Johan Hovold
2015-05-07 15:45         ` Jonathan Corbet

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.