netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iproute2: update CAN bitrate SJW help text
@ 2011-10-17 15:43 Oliver Hartkopp
  2011-10-17 15:58 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Oliver Hartkopp @ 2011-10-17 15:43 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Wolfgang Grandegger, Linux Netdev List, linux-can

The ip-tool from iproute2 already supports to pass a user defined SJW
value for the in-kernel bittiming calculation. This patch updates the
help text accordingly.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>

---

diff --git a/ip/iplink_can.c b/ip/iplink_can.c
index c8af4bc..00e7d98 100644
--- a/ip/iplink_can.c
+++ b/ip/iplink_can.c
@@ -23,7 +23,8 @@ static void usage(void)
 {
 	fprintf(stderr,
 		"Usage: ip link set DEVICE type can\n"
-	        "\t[ bitrate BITRATE [ sample-point SAMPLE-POINT] ] | \n"
+		"\t[ bitrate BITRATE [ sample-point SAMPLE-POINT ] [ sjw SJW "
+		"] ] | \n"
 	        "\t[ tq TQ prop-seg PROP_SEG phase-seg1 PHASE-SEG1\n "
 		"\t  phase-seg2 PHASE-SEG2 [ sjw SJW ] ]\n"
 		"\n"

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

* Re: [PATCH] iproute2: update CAN bitrate SJW help text
  2011-10-17 15:43 [PATCH] iproute2: update CAN bitrate SJW help text Oliver Hartkopp
@ 2011-10-17 15:58 ` Stephen Hemminger
  2011-10-17 17:02   ` Oliver Hartkopp
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2011-10-17 15:58 UTC (permalink / raw)
  To: Oliver Hartkopp; +Cc: Wolfgang Grandegger, Linux Netdev List, linux-can

On Mon, 17 Oct 2011 17:43:37 +0200
Oliver Hartkopp <socketcan@hartkopp.net> wrote:

> The ip-tool from iproute2 already supports to pass a user defined SJW
> value for the in-kernel bittiming calculation. This patch updates the
> help text accordingly.
> 
> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
> 
> ---
> 
> diff --git a/ip/iplink_can.c b/ip/iplink_can.c
> index c8af4bc..00e7d98 100644
> --- a/ip/iplink_can.c
> +++ b/ip/iplink_can.c
> @@ -23,7 +23,8 @@ static void usage(void)
>  {
>  	fprintf(stderr,
>  		"Usage: ip link set DEVICE type can\n"
> -	        "\t[ bitrate BITRATE [ sample-point SAMPLE-POINT] ] | \n"
> +		"\t[ bitrate BITRATE [ sample-point SAMPLE-POINT ] [ sjw SJW "
> +		"] ] | \n"
>  	        "\t[ tq TQ prop-seg PROP_SEG phase-seg1 PHASE-SEG1\n "
>  		"\t  phase-seg2 PHASE-SEG2 [ sjw SJW ] ]\n"
>  		"\n"

Please update man page as well.

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

* Re: [PATCH] iproute2: update CAN bitrate SJW help text
  2011-10-17 15:58 ` Stephen Hemminger
@ 2011-10-17 17:02   ` Oliver Hartkopp
  0 siblings, 0 replies; 3+ messages in thread
From: Oliver Hartkopp @ 2011-10-17 17:02 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Wolfgang Grandegger, Linux Netdev List, linux-can

On 10/17/11 17:58, Stephen Hemminger wrote:

> On Mon, 17 Oct 2011 17:43:37 +0200
> Oliver Hartkopp <socketcan@hartkopp.net> wrote:
> 
>> The ip-tool from iproute2 already supports to pass a user defined SJW
>> value for the in-kernel bittiming calculation. This patch updates the
>> help text accordingly.
>>
>> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
>>
>> ---
>>
>> diff --git a/ip/iplink_can.c b/ip/iplink_can.c
>> index c8af4bc..00e7d98 100644
>> --- a/ip/iplink_can.c
>> +++ b/ip/iplink_can.c
>> @@ -23,7 +23,8 @@ static void usage(void)
>>  {
>>  	fprintf(stderr,
>>  		"Usage: ip link set DEVICE type can\n"
>> -	        "\t[ bitrate BITRATE [ sample-point SAMPLE-POINT] ] | \n"
>> +		"\t[ bitrate BITRATE [ sample-point SAMPLE-POINT ] [ sjw SJW "
>> +		"] ] | \n"
>>  	        "\t[ tq TQ prop-seg PROP_SEG phase-seg1 PHASE-SEG1\n "
>>  		"\t  phase-seg2 PHASE-SEG2 [ sjw SJW ] ]\n"
>>  		"\n"
> 
> Please update man page as well.


Oops. The manpage has several issues regarding CAN support:

- this updated help text is _not_ part of the ip.8 man page at all

    It can only be accessed by 'ip link set <anynetdev> type can help'

Usage: ip link set DEVICE type can
	[ bitrate BITRATE [ sample-point SAMPLE-POINT] ] |
	[ tq TQ prop-seg PROP_SEG phase-seg1 PHASE-SEG1
 	  phase-seg2 PHASE-SEG2 [ sjw SJW ] ]

	[ loopback { on | off } ]
	[ listen-only { on | off } ]
	[ triple-sampling { on | off } ]
	[ one-shot { on | off } ]
	[ berr-reporting { on | off } ]

	[ restart-ms TIME-MS ]
	[ restart ]

	Where: BITRATE       := { 1..1000000 }
	       SAMPLE-POINT  := { 0.000..0.999 }
	       TQ            := { NUMBER }
	       PROP-SEG      := { 1..8 }
	       PHASE-SEG1    := { 1..8 }
	       PHASE-SEG2    := { 1..8 }
	       SJW           := { 1..4 }
	       RESTART-MS    := { 0 | NUMBER }

-> ip link set <anynetdev> "type TYPE" is not documented in help text & man
page anywhere

- VCAN and CAN interfaces are mixed in the man page

    You can not create real CAN interfaces, only virtual ones.

Looks like i tapped into a bigger problem here :-(

Maybe it's the best to apply this help text update first and then to try to
rework the ip.8 man page according to the latest version.

Setting the CAN bittiming & controller setting does not seem to fit into the
'ip link' section of the man page. Do you have an idea how to do that in a
'nice' way?

Regards,
Oliver

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

end of thread, other threads:[~2011-10-17 17:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-17 15:43 [PATCH] iproute2: update CAN bitrate SJW help text Oliver Hartkopp
2011-10-17 15:58 ` Stephen Hemminger
2011-10-17 17:02   ` Oliver Hartkopp

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