Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Aug 2023 08:06:41 GMT
From:      Michael Zhilin <mizhka@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: e0bc8f8da2b3 - main - etherswitch/arswitch: correct version detection
Message-ID:  <202308080806.37886fdo092161@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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";



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202308080806.37886fdo092161>