git: e0bc8f8da2b3 - main - etherswitch/arswitch: correct version detection
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 08 Aug 2023 08:06:41 UTC
The branch main has been updated by mizhka: URL: https://cgit.FreeBSD.org/src/commit/?id=e0bc8f8da2b3f40b74925a28c2c7f4236bd94c3f commit e0bc8f8da2b3f40b74925a28c2c7f4236bd94c3f Author: Michael Zhilin <mizhka@FreeBSD.org> AuthorDate: 2023-08-08 08:02:09 +0000 Commit: Michael Zhilin <mizhka@FreeBSD.org> CommitDate: 2023-08-08 08:02:09 +0000 etherswitch/arswitch: correct version detection During porting of etherswitch to NetBSD mistypo was discovered in Atheros switch version detection. Reported by: Hiroki Mori yamori813@yahoo.co.jp MFC after: 1 week --- sys/dev/etherswitch/arswitch/arswitch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/etherswitch/arswitch/arswitch.c b/sys/dev/etherswitch/arswitch/arswitch.c index f22b8da55288..6a95c7a8ad80 100644 --- a/sys/dev/etherswitch/arswitch/arswitch.c +++ b/sys/dev/etherswitch/arswitch/arswitch.c @@ -126,7 +126,7 @@ arswitch_probe(device_t dev) /* AR8xxx probe */ id = arswitch_readreg(dev, AR8X16_REG_MASK_CTRL); sc->chip_rev = (id & AR8X16_MASK_CTRL_REV_MASK); - sc->chip_ver = (id & AR8X16_MASK_CTRL_VER_MASK) > AR8X16_MASK_CTRL_VER_SHIFT; + sc->chip_ver = (id & AR8X16_MASK_CTRL_VER_MASK) >> AR8X16_MASK_CTRL_VER_SHIFT; switch (id & (AR8X16_MASK_CTRL_VER_MASK | AR8X16_MASK_CTRL_REV_MASK)) { case 0x0101: chipname = "AR8216";