Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci use sc->sc_itr instead of hard-coded number.
details: https://anonhg.NetBSD.org/src/rev/099d7b238688
branches: trunk
changeset: 340739:099d7b238688
user: knakahara <knakahara%NetBSD.org@localhost>
date: Mon Sep 28 06:04:04 2015 +0000
description:
use sc->sc_itr instead of hard-coded number.
ok by msaitoh@n.o
diffstat:
sys/dev/pci/if_wm.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r a3344a48f002 -r 099d7b238688 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Mon Sep 28 01:54:14 2015 +0000
+++ b/sys/dev/pci/if_wm.c Mon Sep 28 06:04:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.347 2015/09/07 15:19:05 msaitoh Exp $ */
+/* $NetBSD: if_wm.c,v 1.348 2015/09/28 06:04:04 knakahara Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -83,7 +83,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.347 2015/09/07 15:19:05 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.348 2015/09/28 06:04:04 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -4361,8 +4361,10 @@
} else {
CSR_WRITE(sc, WMREG_RDH, 0);
CSR_WRITE(sc, WMREG_RDT, 0);
- CSR_WRITE(sc, WMREG_RDTR, 375 | RDTR_FPD); /* ITR/4 */
- CSR_WRITE(sc, WMREG_RADV, 375); /* MUST be same */
+ /* ITR/4 */
+ CSR_WRITE(sc, WMREG_RDTR, (sc->sc_itr / 4) | RDTR_FPD);
+ /* MUST be same */
+ CSR_WRITE(sc, WMREG_RADV, sc->sc_itr);
}
}
for (i = 0; i < WM_NRXDESC; i++) {
Home |
Main Index |
Thread Index |
Old Index