linux/drivers/net/dsa/microchip
Sebastien Royen fc13ba44da net: dsa: microchip: fix KSZ8765 fiber detection
The KSZ8765 is similar to the KSZ8795 but has two fiber ports.

KSZ8_PORT_STATUS_0 is used to detect fiber mode. It is currently
defined as 0x08, which is the Global Control 6 MIB Control register
and has bit 7 defined as Flush Counter.

Set KSZ8_PORT_STATUS_0 to 0x18, which is the Port 1 Status 0 register
where bit 7 is the Fiber Mode bit.

This issue was discovered when upgrading an embedded device from kernel
5.10 to 6.16. The device was using a KSZ8765 device tree configuration
and the corresponding hardware, but during boot the kernel incorrectly
detected it as a KSZ8795. The relevant boot messages were:

  ksz-switch spi0.0: found switch: KSZ8795, rev 0
  ksz-switch spi0.0: Device tree specifies chip KSZ8765 but found KSZ8795, please fix it!

Cc: stable@vger.kernel.org
Fixes: 91a98917a8 ("net: dsa: microchip: move switch chip_id detection to ksz_common")
Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de>
Signed-off-by: Sebastien Royen <sebastien.royen@armadeus.com>
Link: https://patch.msgid.link/20261007080557.15719-1-sebastien.royen@armadeus.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-08 10:48:00 -07:00
..
Kconfig net: dsa: microchip: Add SGMII port support to KSZ9477 switch 2025-05-26 17:15:51 +02:00
ksz_common.c net: dsa: microchip: allow the use of other IRQ operations. 2026-07-31 16:29:55 -07:00
ksz_common.h net: dsa: microchip: fix KSZ8765 fiber detection 2026-10-08 10:48:00 -07:00
ksz_dcb.c net: dsa: microchip: Use different registers for KSZ8463 2025-07-25 17:01:56 -07:00
ksz_dcb.h
ksz_ptp_reg.h net: dsa: microchip: add two-steps PTP support for KSZ8463 2026-07-31 16:29:56 -07:00
ksz_ptp.c net: dsa: microchip: add two-steps PTP support for KSZ8463 2026-07-31 16:29:56 -07:00
ksz_ptp.h net: dsa: microchip: add two-steps PTP support for KSZ8463 2026-07-31 16:29:56 -07:00
ksz_spi.c net: dsa: microchip: hook up ksz_switch_alloc() to chip-specific dsa_switch_ops 2026-05-08 19:09:13 -07:00
ksz8_reg.h net: dsa: microchip: add two-steps PTP support for KSZ8463 2026-07-31 16:29:56 -07:00
ksz8.c net: dsa: microchip: add two-steps PTP support for KSZ8463 2026-07-31 16:29:56 -07:00
ksz8.h net: dsa: microchip: ensure each ksz_dev_ops has its own dsa_switch_ops 2026-05-08 19:09:13 -07:00
ksz8863_smi.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
ksz9477_acl.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ksz9477_i2c.c net: dsa: Use named initializers for struct i2c_device_id 2026-05-20 19:01:25 -07:00
ksz9477_reg.h net: dsa: microchip: Fix reserved multicast address table programming 2025-11-06 07:11:36 -08:00
ksz9477_tc_flower.c
ksz9477.c net: dsa: microchip: move the drive strength config out of the common section 2026-07-08 11:05:52 +02:00
ksz9477.h net: dsa: microchip: move ksz9477_set_default_prio_queue_mapping() to ksz9477.c 2026-07-08 11:05:51 +02:00
lan937x_main.c net: dsa: microchip: move the drive strength config out of the common section 2026-07-08 11:05:52 +02:00
lan937x_reg.h net: dsa: microchip: Fix LAN937X set_ageing_time function 2024-12-19 18:04:04 -08:00
lan937x.h net: dsa: microchip: ensure each ksz_dev_ops has its own dsa_switch_ops 2026-05-08 19:09:13 -07:00
Makefile net: dsa: microchip: rename ksz8 series files 2024-09-06 08:41:35 +01:00