ethernet: 3c509: Fix AUI transceiver type selection

The transceiver type is held in bits 15:14 of the Address Configuration
Register, with the values of 0b00, 0b01, and 0b11 denoting TP, AUI, and
BNC types respectively.  Therefore switching from BNC to AUI requires
bits to be cleared before setting bit 14 or the setting won't change.

NB this has always been wrong ever since this code was added in 2.5.42.

Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
Link: https://patch.msgid.link/alpine.DEB.2.21.2605201205160.1450@angie.orcam.me.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Maciej W. Rozycki 2026-05-20 12:18:53 +01:00 committed by Jakub Kicinski
parent 28db0338db
commit 029a6b3a14

View File

@ -1099,6 +1099,7 @@ el3_netdev_set_ecmd(struct net_device *dev,
dev->if_port = 0;
break;
case PORT_AUI:
tmp &= ~(3<<14);
tmp |= (1<<14);
dev->if_port = 1;
break;