Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Avoid undefined behavior when reset the chip. fo...



details:   https://anonhg.NetBSD.org/src/rev/57b454493f6a
branches:  trunk
changeset: 458529:57b454493f6a
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Tue Jul 30 16:07:04 2019 +0000

description:
Avoid undefined behavior when reset the chip. found by kUBSan.

diffstat:

 sys/dev/pci/if_etreg.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 1116827955ea -r 57b454493f6a sys/dev/pci/if_etreg.h
--- a/sys/dev/pci/if_etreg.h    Tue Jul 30 15:56:53 2019 +0000
+++ b/sys/dev/pci/if_etreg.h    Tue Jul 30 16:07:04 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_etreg.h,v 1.1 2010/11/13 00:47:25 jnemeth Exp $     */
+/*     $NetBSD: if_etreg.h,v 1.2 2019/07/30 16:07:04 msaitoh Exp $     */
 /*     $OpenBSD: if_etreg.h,v 1.3 2008/06/08 06:18:07 jsg Exp $        */
 
 /*
@@ -235,7 +235,7 @@
 #define ET_MAC_CFG1_RST_TXMC           (1 << 18)
 #define ET_MAC_CFG1_RST_RXMC           (1 << 19)
 #define ET_MAC_CFG1_SIM_RST            (1 << 30)
-#define ET_MAC_CFG1_SOFT_RST           (1 << 31)
+#define ET_MAC_CFG1_SOFT_RST           __BIT(31)
 
 #define ET_MAC_CFG2                    0x5004
 #define ET_MAC_CFG2_FDX                        (1 << 0)



Home | Main Index | Thread Index | Old Index