From: "André Hartmann" <aha_1980@gmx.de>
To: Oliver Hartkopp <socketcan@hartkopp.net>,
Jimmy Assarsson <extja@kvaser.com>,
Marc Kleine-Budde <mkl@pengutronix.de>,
"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: Re: Associate physical device with device name
Date: Sat, 10 Feb 2018 12:01:04 +0100 [thread overview]
Message-ID: <748430cb-e826-a442-09ef-c2382a9916bc@gmx.de> (raw)
In-Reply-To: <16bc3c4c-4013-9d9c-4afe-4cbffc2d8ad7@hartkopp.net>
Hi Oliver,
Am 09.02.2018 um 18:09 schrieb Oliver Hartkopp:
>
>
> On 02/09/2018 04:35 PM, Jimmy Assarsson wrote:
>> On 2018-02-09 14:24, Marc Kleine-Budde wrote:
>>> On 02/09/2018 12:21 PM, Jimmy Assarsson wrote:
>>>> All devices with the same EAN look identical, since we do not set
>>>> serial
>>>> number in the USB descriptor.
>>>
>>> That should be done on the next FW revision.
>>
>> It is left out on purpose. I don't remember the details, but it had
>> something to do with Windows reinstalling the driver whenever a device
>> with different serial number is connected to the same USB port.
>>
>>> Ok - I see two possibilities.
>>>
>>> 1) sysfs file
>>> Add a file to sysfs that contains the serial number, see:
>>> http://lxr.bootlin.com/linux/latest/source/drivers/net/can/softing/softing_main.c#L718
>>>
>>>
>>> 2) ethtool eeprom
>>> You can export the serial number via ethtool's dump eeprom
>>> functionality.
>>>
>>> Better try 1).
>>
>> Great :) Will try this next week.
>
> Would it make sense to provide a common sysfs infrastructure in
>
> linux/drivers/net/can/dev.c
>
> to populate
>
> /sys/class/net/<can-interface-name>/<serial-num-whatever>
>
> instead of maintaining this stuff in each single driver?
>
> We have this requirement in the softing/kvaser/peak adapters so far.
>
> We could provide some pointer in struct can_priv which points to a
> struct which contains the sysfs content - or something like this.
+1. A general solution to read a serial number from sysfs would be very
welcome.
> Any thoughts?
>
> Best,
> Oliver
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-can" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2018-02-10 11:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-26 14:38 Associate physical device with device name Jimmy Assarsson
2018-02-08 12:05 ` Jimmy Assarsson
2018-02-08 12:45 ` Marc Kleine-Budde
2018-02-08 13:04 ` Jimmy Assarsson
2018-02-09 7:50 ` Jimmy Assarsson
2018-02-09 10:47 ` Marc Kleine-Budde
2018-02-09 11:21 ` Jimmy Assarsson
2018-02-09 13:24 ` Marc Kleine-Budde
2018-02-09 15:35 ` Jimmy Assarsson
2018-02-09 17:09 ` Oliver Hartkopp
2018-02-10 9:58 ` Kurt Van Dijck
2018-02-10 11:01 ` André Hartmann [this message]
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=748430cb-e826-a442-09ef-c2382a9916bc@gmx.de \
--to=aha_1980@gmx.de \
--cc=extja@kvaser.com \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=socketcan@hartkopp.net \
/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