RTK_CFG2_BUSFREQ is only 1 byte. Fixes panic on landisk.

This commit is contained in:
uwe 2019-04-05 23:44:59 +00:00
parent 3393b8dcf9
commit 4e21ffdefb
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: rtl8169.c,v 1.157 2019/01/22 03:42:26 msaitoh Exp $ */
/* $NetBSD: rtl8169.c,v 1.158 2019/04/05 23:44:59 uwe Exp $ */
/*
* Copyright (c) 1997, 1998-2003
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.157 2019/01/22 03:42:26 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.158 2019/04/05 23:44:59 uwe Exp $");
/* $FreeBSD: /repoman/r/ncvs/src/sys/dev/re/if_re.c,v 1.20 2004/04/11 20:34:08 ru Exp $ */
/*
@ -1959,7 +1959,7 @@ re_init(struct ifnet *ifp)
} else if ((sc->sc_quirk & RTKQ_PCIE) != 0) {
period = 8;
} else {
switch (CSR_READ_4(sc, RTK_CFG2_BUSFREQ) & 0x7) {
switch (CSR_READ_1(sc, RTK_CFG2_BUSFREQ) & 0x7) {
case RTK_BUSFREQ_33MHZ:
period = 30;
break;