linux/drivers/net/arcnet
Thomas Reichinger e38cd53421 arcnet: restoring support for multiple Sohard Arcnet cards
[ Upstream commit 6b17a597fc ]

Probe of Sohard Arcnet cards fails,
if 2 or more cards are installed in a system.
See kernel log:
[    2.759203] arcnet: arcnet loaded
[    2.763648] arcnet:com20020: COM20020 chipset support (by David Woodhouse et al.)
[    2.770585] arcnet:com20020_pci: COM20020 PCI support
[    2.772295] com20020 0000:02:00.0: enabling device (0000 -> 0003)
[    2.772354] (unnamed net_device) (uninitialized): PLX-PCI Controls
...
[    3.071301] com20020 0000:02:00.0 arc0-0 (uninitialized): PCI COM20020: station FFh found at F080h, IRQ 101.
[    3.071305] com20020 0000:02:00.0 arc0-0 (uninitialized): Using CKP 64 - data rate 2.5 Mb/s
[    3.071534] com20020 0000:07:00.0: enabling device (0000 -> 0003)
[    3.071581] (unnamed net_device) (uninitialized): PLX-PCI Controls
...
[    3.369501] com20020 0000:07:00.0: Led pci:green:tx:0-0 renamed to pci:green:tx:0-0_1 due to name collision
[    3.369535] com20020 0000:07:00.0: Led pci:red:recon:0-0 renamed to pci:red:recon:0-0_1 due to name collision
[    3.370586] com20020 0000:07:00.0 arc0-0 (uninitialized): PCI COM20020: station E1h found at C000h, IRQ 35.
[    3.370589] com20020 0000:07:00.0 arc0-0 (uninitialized): Using CKP 64 - data rate 2.5 Mb/s
[    3.370608] com20020: probe of 0000:07:00.0 failed with error -5

commit 5ef216c1f8 ("arcnet: com20020-pci: add rotary index support")
changes the device name of all COM20020 based PCI cards,
even if only some cards support this:
	snprintf(dev->name, sizeof(dev->name), "arc%d-%d", dev->dev_id, i);

The error happens because all Sohard Arcnet cards would be called arc0-0,
since the Sohard Arcnet cards don't have a PLX rotary coder.
I.e. EAE Arcnet cards have a PLX rotary coder,
which sets the first decimal, ensuring unique devices names.

This patch adds two new card feature flags to indicate
which cards support LEDs and the PLX rotary coder.
For EAE based cards the names still depend on the PLX rotary coder
(untested, since missing EAE hardware).
For Sohard based cards, this patch will result in devices
being called arc0, arc1, ... (tested).

Signed-off-by: Thomas Reichinger <thomas.reichinger@sohard.de>
Fixes: 5ef216c1f8 ("arcnet: com20020-pci: add rotary index support")
Link: https://lore.kernel.org/r/20231130113503.6812-1-thomas.reichinger@sohard.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-13 18:18:12 +01:00
..
arc-rawmode.c
arc-rimi.c net: arcnet: Fix RESET flag handling 2023-12-13 18:18:12 +01:00
arcdevice.h arcnet: restoring support for multiple Sohard Arcnet cards 2023-12-13 18:18:12 +01:00
arcnet.c net: arcnet: Fix RESET flag handling 2023-12-13 18:18:12 +01:00
capmode.c
com90io.c net: arcnet: Fix RESET flag handling 2023-12-13 18:18:12 +01:00
com90xx.c net: arcnet: Fix RESET flag handling 2023-12-13 18:18:12 +01:00
com9026.h
com20020_cs.c net: arcnet: Fix RESET flag handling 2023-12-13 18:18:12 +01:00
com20020-isa.c net: arcnet: Fix RESET flag handling 2023-12-13 18:18:12 +01:00
com20020-pci.c arcnet: restoring support for multiple Sohard Arcnet cards 2023-12-13 18:18:12 +01:00
com20020.c
com20020.h
Kconfig
Makefile
rfc1051.c
rfc1201.c