linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Stephane Grosjean <s.grosjean@peak-system.com>
Cc: linux-usb Mailing List <linux-usb@vger.kernel.org>,
	netdev Mailing List <netdev@vger.kernel.org>,
	linux-can Mailing List <linux-can@vger.kernel.org>
Subject: Re: [PATCH 0/3 V3.1] can/usb: Add PEAK-System PCAN USB adapters driver
Date: Thu, 19 Jan 2012 20:08:08 +0100	[thread overview]
Message-ID: <4F186A18.6020903@hartkopp.net> (raw)
In-Reply-To: <1326968863-20229-1-git-send-email-s.grosjean@peak-system.com>

On 19.01.2012 11:27, Stephane Grosjean wrote:

> That serie of patches adds the peak_usb driver which handles the PCAN-USB
> and PCAN-USB Pro adapters from PEAK-System (http://www.peak-system.com).
> These patches are planned for kernel v3.02.00 and above.


Hello Stephane,

i tried your patch with Linus' current tree (3.3 merge).

Plugging-in the PEAK USB adapter it turns out to be *very* informative in
the kernel log and also presents information twice:

[  153.566193] usb 2-1.2: new full-speed USB device number 6 using ehci_hcd
[  153.663659] usb 2-1.2: New USB device found, idVendor=0c72, idProduct=000c
[  153.663665] usb 2-1.2: New USB device strings: Mfr=0, Product=3, SerialNumber=0
[  153.663669] usb 2-1.2: Product: VER1:PEAK    
[  153.663671] VER2:02.8.01        
[  153.663672] DAT :06.05.2004
[  153.663672] TIME:09:35:37
[  153.663673]                              ...
[  153.682683] peak_usb: PCAN-USB interfaces driver loaded
[  153.682736] peak_usb 2-1.2:1.0: new PEAK-System usb adapter with 1 can detected:
[  153.682741] peak_usb 2-1.2:1.0: PEAK-System PCAN-USB
[  153.682746] peak_usb 2-1.2:1.0: VER1:PEAK    .VER2:02.8.01        .DAT :06.05.2004.TIME:09:35:37.                             ...
[  153.685422] peak_usb 2-1.2:1.0: serial FFFFFFFF hwrev 28
[  153.686413] peak_usb 2-1.2:1.0: can2 attached to PCAN-USB can 0 (device 46)
[  153.686521] usbcore: registered new interface driver peak_usb

As i assume that this VER2/DAT/TIME stuff and also the "..." line comes
somewhere from the device itself and is printed by the USB stack, i wonder if
we could reduce the information provided by the peak_usb driver then.

E.g.

[  153.682683] peak_usb: PCAN-USB interfaces driver loaded
# is obsolete as peak_usb speaks to us in the following lines

[  153.682736] peak_usb 2-1.2:1.0: new PEAK-System usb adapter with 1 can detected:
[  153.682741] peak_usb 2-1.2:1.0: PEAK-System PCAN-USB
# Can be merged, e.g. to
[  153.682741] peak_usb 2-1.2:1.0: PEAK-System PCAN-USB adapter hwrev 28 (one channel)


[  153.682746] peak_usb 2-1.2:1.0: VER1:PEAK    .VER2:02.8.01        .DAT :06.05.2004.TIME:09:35:37.                             ...
# If you think, this is still needed(???) -> at least kill the spaces like this:
[  153.682746] peak_usb 2-1.2:1.0: VER1:PEAK.VER2:02.8.01.DAT:06.05.2004.TIME:09:35:37....


[  153.685422] peak_usb 2-1.2:1.0: serial FFFFFFFF hwrev 28
[  153.686413] peak_usb 2-1.2:1.0: can2 attached to PCAN-USB can 0 (device 46)
# Can be merged, e.g. to
[  153.686413] peak_usb 2-1.2:1.0: PCAN-USB channel 0 (serial FFFFFFFF, device 46) attached to can2

So it would finally look like this (6 -> 2 lines):

[  153.682741] peak_usb 2-1.2:1.0: PEAK-System PCAN-USB adapter hwrev 28 (one channel)
[  153.686413] peak_usb 2-1.2:1.0: PCAN-USB channel 0 (serial FFFFFFFF, device 46) attached to can2

I'm not sure, if the serial number was identical when having two channels like in the USB-Pro.
If so the serial number in general could be moved up like this:

[  153.682741] peak_usb 2-1.2:1.0: PEAK-System PCAN-USB adapter hwrev 28 serial FFFFFFFF (one channel)
[  153.686413] peak_usb 2-1.2:1.0: PCAN-USB channel 0 (device 46) attached to can2

Btw. thanks for your contribution. You did really big steps in improving your code.
I will do some functional tests now ...

Best regards,
Oliver

  parent reply	other threads:[~2012-01-19 19:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-19 10:27 [PATCH 0/3 V3.1] can/usb: Add PEAK-System PCAN USB adapters driver Stephane Grosjean
2012-01-19 10:27 ` [PATCH 2/3 V3.1] can/usb: PEAK-System Technik PCAN-USB specific part Stephane Grosjean
2012-01-19 15:07   ` Alan Stern
2012-01-20  7:52     ` Oliver Hartkopp
2012-01-20 12:28       ` Oliver Hartkopp
2012-01-20 12:34         ` Wolfgang Grandegger
2012-01-20 12:36           ` Wolfgang Grandegger
2012-01-20 13:37             ` Oliver Hartkopp
2012-01-20 13:52               ` Wolfgang Grandegger
2012-01-20 14:53                 ` Stephane Grosjean
2012-01-20 17:32                   ` Wolfgang Grandegger
     [not found] ` <1326968863-20229-1-git-send-email-s.grosjean-g4cQ8AsIbFbL9ATBNaCtXw@public.gmane.org>
2012-01-19 10:27   ` [PATCH 1/3 V3.1] can/usb: PEAK-System Technik USB adapters driver core Stephane Grosjean
2012-01-19 10:27   ` [PATCH 3/3 V3.1] can/usb: PEAK-System Technik PCAN-USB Pro specific part Stephane Grosjean
2012-01-19 19:08 ` Oliver Hartkopp [this message]
2012-01-20  9:28   ` [PATCH 0/3 V3.1] can/usb: Add PEAK-System PCAN USB adapters driver Wolfgang Grandegger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F186A18.6020903@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=s.grosjean@peak-system.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).