linux-stable/drivers/net/arcnet
Thomas Reichinger 6b17a597fc arcnet: restoring support for multiple Sohard Arcnet cards
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>
2023-12-04 18:01:20 -08:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
arc-rawmode.c
arc-rimi.c net: remove single-byte netdev->dev_addr writes 2021-10-13 10:03:59 -07:00
arcdevice.h arcnet: restoring support for multiple Sohard Arcnet cards 2023-12-04 18:01:20 -08:00
arcnet.c net: arcnet: Do not call kfree_skb() under local_irq_disable() 2023-08-25 10:10:52 +01:00
capmode.c arcnet: capmode: remove redundant assignment to pointer pkt 2019-08-30 14:14:46 -07:00
com90io.c net: remove single-byte netdev->dev_addr writes 2021-10-13 10:03:59 -07:00
com90xx.c net: remove single-byte netdev->dev_addr writes 2021-10-13 10:03:59 -07:00
com9026.h
com20020-isa.c net: remove single-byte netdev->dev_addr writes 2021-10-13 10:03:59 -07:00
com20020-pci.c arcnet: restoring support for multiple Sohard Arcnet cards 2023-12-04 18:01:20 -08:00
com20020.c net: remove single-byte netdev->dev_addr writes 2021-10-13 10:03:59 -07:00
com20020.h
com20020_cs.c arcnet: fix potential memory leak in com20020_probe() 2022-11-23 12:41:54 +00:00
rfc1051.c
rfc1201.c