]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ethernet: 3c509: Fix AUI transceiver type selection
authorMaciej W. Rozycki <macro@orcam.me.uk>
Wed, 20 May 2026 11:18:53 +0000 (12:18 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 21 May 2026 15:28:56 +0000 (08:28 -0700)
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>
drivers/net/ethernet/3com/3c509.c

index fb68339e1511c4c24ba1dfd3ef26d0d30f6a5202..67b9a3f4de5eac435d3f4ebfc92f42d61c3edc80 100644 (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;