RE: [PATCH 6/6] can: peak_usb: add ethtool interface to user defined flashed device number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marc,

>On 15.02.2022 16:10:45, Marc Kleine-Budde wrote:
>> On 11.02.2022 10:57:34, Stéphane Grosjean wrote:
>> > endianess is handled by lower level functions (see for ex
>> > pcan_usb_fd_get_user_devid()/pcan_usb_fd_set_user_devid() in PATCH
>> > 2/6).
>> >
>> > This data is really a number and must be treated as such.
>>
>> What's the use case for the data/number? What's the big picture?

>| Jan 01 05:16:21 DistroKit kernel: peak_usb 1-1:1.0: PEAK-System PCAN-USB FD v1 fw v3.2.0 (1 channels)
>| Jan 01 05:16:21 DistroKit kernel: peak_usb 1-1:1.0 can0: attached to PCAN-USB FD channel 0 (device 1144201745)
>                                                                                                     ^^^^^^^^^^

>But that is something different than the serial number, right?

Yep! This is a number that can be used to uniquely identify the device, regardless of the USB port or the order in which it is connected. The purpose is to allow the user to name the network interface according to this number. This is for example what is done by the "historical" driver "pcan" which is freely downloadable from www.peak-system.com.

>On a little endian system this gives:
>
>| ➜ (pts/0) frogger@rpi4b4:~ (master) sudo ethtool -e can0
>| Offset          Values
>| ------          ------
>| 0x0000:         11 22 33 44
>
>On a big endian we see:
>
>| root@DistroKit:~ ethtool -e can0
>| Offset                Values
>| ------                ------
>| 0x0000:               44 33 22 11

I admit that it is quite disturbing indeed to imagine that 0x11 is not necessarily in eeprom[0]... But:

>| root@DistroKit:~ ethtool -e can0 raw on|hexdump -v -e '1 "%u\n"'
>| 1144201745
>| ➜ (pts/0) frogger@rpi4b4:~ (master) sudo ethtool -e can0 raw on|hexdump -v -e '1 "%u\n"'
>| 1144201745

is the goal: can interface name will be the same in both systems.

In any case, thanks for the tests.

--- Stephane


            De: Marc Kleine-Budde
Envoyé: Mercredi 16 février 2022 10:51
À: Stéphane Grosjean
Cc: linux-can Mailing List
Objet: Re: [PATCH 6/6] can: peak_usb: add ethtool interface to user defined flashed device number




On 15.02.2022 16:10:45, Marc Kleine-Budde wrote:

> On 11.02.2022 10:57:34, Stéphane Grosjean wrote:

> > endianess is handled by lower level functions (see for ex

> > pcan_usb_fd_get_user_devid()/pcan_usb_fd_set_user_devid() in PATCH

> > 2/6).

> >

> > This data is really a number and must be treated as such.

>

> What's the use case for the data/number? What's the big picture?



| Jan 01 05:16:21 DistroKit kernel: peak_usb 1-1:1.0: PEAK-System PCAN-USB FD v1 fw v3.2.0 (1 channels)

| Jan 01 05:16:21 DistroKit kernel: peak_usb 1-1:1.0 can0: attached to PCAN-USB FD channel 0 (device 1144201745)

                                                                                                     ^^^^^^^^^^



But that is something different than the serial number, right?



regards,

Marc



--

Pengutronix e.K.                 | Marc Kleine-Budde           |

Embedded Linux                   | https://www.pengutronix.de  |

Vertretung West/Dortmund         | Phone: +49-231-2826-924     |

Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |


--
PEAK-System Technik GmbH
Sitz der Gesellschaft Darmstadt - HRB 9183
Geschaeftsfuehrung: Alexander Gach / Uwe Wilhelm
Unsere Datenschutzerklaerung mit wichtigen Hinweisen
zur Behandlung personenbezogener Daten finden Sie unter
www.peak-system.com/Datenschutz.483.0.html




[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux