bianbu-linux-6.6/drivers/net/can
Marc Kleine-Budde 0f2211f1cf can: gs_usb: gs_usb_set_phys_id(): return with error if identify is not supported
Until commit 409c188c57 ("can: tree-wide: advertise software
timestamping capabilities") the ethtool_ops was only assigned for
devices which support the GS_CAN_FEATURE_IDENTIFY feature. That commit
assigns ethtool_ops unconditionally.

This results on controllers without GS_CAN_FEATURE_IDENTIFY support
for the following ethtool error:

| $ ethtool -p can0 1
| Cannot identify NIC: Broken pipe

Restore the correct error value by checking for
GS_CAN_FEATURE_IDENTIFY in the gs_usb_set_phys_id() function.

| $ ethtool -p can0 1
| Cannot identify NIC: Operation not supported

While there use the variable "netdev" for the "struct net_device"
pointer and "dev" for the "struct gs_can" pointer as in the rest of
the driver.

Fixes: 409c188c57 ("can: tree-wide: advertise software timestamping capabilities")
Link: http://lore.kernel.org/all/20220818143853.2671854-1-mkl@pengutronix.de
Cc: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2022-09-21 09:48:52 +02:00
..
c_can can: tree-wide: advertise software timestamping capabilities 2022-07-28 11:44:01 +02:00
cc770 can: tree-wide: advertise software timestamping capabilities 2022-07-28 11:44:01 +02:00
ctucanfd can: tree-wide: advertise software timestamping capabilities 2022-07-28 11:44:01 +02:00
dev can: dev: add generic function can_eth_ioctl_hwts() 2022-07-28 11:44:30 +02:00
flexcan can: flexcan: flexcan_mailbox_read() fix return value for drop = true 2022-09-21 09:48:51 +02:00
ifi_canfd can: tree-wide: advertise software timestamping capabilities 2022-07-28 11:44:01 +02:00
m_can can: tree-wide: advertise software timestamping capabilities 2022-07-28 11:44:01 +02:00
mscan powerpc updates for 6.0 2022-08-06 16:38:17 -07:00
peak_canfd can: peak_canfd: advertise timestamping capabilities and add ioctl support 2022-07-28 11:44:31 +02:00
rcar can: tree-wide: advertise software timestamping capabilities 2022-07-28 11:44:01 +02:00
sja1000 can: tree-wide: advertise software timestamping capabilities 2022-07-28 11:44:01 +02:00
slcan can: tree-wide: advertise software timestamping capabilities 2022-07-28 11:44:01 +02:00
softing can: tree-wide: advertise software timestamping capabilities 2022-07-28 11:44:01 +02:00
spi can: mcp251x: Fix race condition on receive interrupt 2022-08-09 21:40:22 +02:00
usb can: gs_usb: gs_usb_set_phys_id(): return with error if identify is not supported 2022-09-21 09:48:52 +02:00
at91_can.c can: tree-wide: advertise software timestamping capabilities 2022-07-28 11:44:01 +02:00
can327.c can: can327: fix a broken link to Documentation 2022-07-31 20:53:50 +02:00
grcan.c can: tree-wide: advertise software timestamping capabilities 2022-07-28 11:44:01 +02:00
janz-ican3.c can: tree-wide: advertise software timestamping capabilities 2022-07-28 11:44:01 +02:00
Kconfig can: slcan: use CAN network device driver API 2022-07-03 11:34:28 +02:00
kvaser_pciefd.c can: kvaser_pciefd: advertise timestamping capabilities and add ioctl support 2022-07-28 11:44:30 +02:00
Makefile can: slcan: move driver into separate sub directory 2022-07-03 11:34:44 +02:00
pch_can.c can: tree-wide: advertise software timestamping capabilities 2022-07-28 11:44:01 +02:00
sun4i_can.c can: tree-wide: advertise software timestamping capabilities 2022-07-28 11:44:01 +02:00
ti_hecc.c SPDX changes for 6.0-rc1 2022-08-04 12:12:54 -07:00
vcan.c can: tree-wide: advertise software timestamping capabilities 2022-07-28 11:44:01 +02:00
vxcan.c can: tree-wide: advertise software timestamping capabilities 2022-07-28 11:44:01 +02:00
xilinx_can.c can: tree-wide: advertise software timestamping capabilities 2022-07-28 11:44:01 +02:00