Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Sync with r1.3 from OpenBSD



details:   https://anonhg.NetBSD.org/src/rev/b64c24977635
branches:  trunk
changeset: 971613:b64c24977635
user:      sevan <sevan%NetBSD.org@localhost>
date:      Thu Apr 30 00:32:16 2020 +0000

description:
Sync with r1.3 from OpenBSD

"Use correct bit mask to promptly exit rge_set_phy_power() and
rge_exit_oob() timeout loops.

Spotted by CID 1491296 and 1491309."

diffstat:

 sys/dev/pci/if_rge.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 7cb23dba0de6 -r b64c24977635 sys/dev/pci/if_rge.c
--- a/sys/dev/pci/if_rge.c      Wed Apr 29 23:15:21 2020 +0000
+++ b/sys/dev/pci/if_rge.c      Thu Apr 30 00:32:16 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_rge.c,v 1.9 2020/02/29 21:27:19 thorpej Exp $       */
+/*     $NetBSD: if_rge.c,v 1.10 2020/04/30 00:32:16 sevan Exp $        */
 /*     $OpenBSD: if_rge.c,v 1.2 2020/01/02 09:00:45 kevlo Exp $        */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_rge.c,v 1.9 2020/02/29 21:27:19 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_rge.c,v 1.10 2020/04/30 00:32:16 sevan Exp $");
 
 /* #include "vlan.h" Sevan */
 
@@ -1448,7 +1448,7 @@
                rge_write_phy(sc, 0, MII_BMCR, BMCR_AUTOEN);
 
                for (i = 0; i < RGE_TIMEOUT; i++) {
-                       if ((rge_read_phy_ocp(sc, 0xa420) & 0x0080) == 3)
+                       if ((rge_read_phy_ocp(sc, 0xa420) & 0x0007) == 3)
                                break;
                        DELAY(1000);
                }
@@ -1889,7 +1889,7 @@
 
        if (rge_read_mac_ocp(sc, 0xd42c) & 0x0100) {
                for (i = 0; i < RGE_TIMEOUT; i++) {
-                       if ((rge_read_phy_ocp(sc, 0xa420) & 0x0080) == 2)
+                       if ((rge_read_phy_ocp(sc, 0xa420) & 0x0007) == 2)
                                break;
                        DELAY(1000);
                }



Home | Main Index | Thread Index | Old Index