Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci No functional change:
details: https://anonhg.NetBSD.org/src/rev/cac27ea206e4
branches: trunk
changeset: 785148:cac27ea206e4
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Wed Feb 27 14:19:38 2013 +0000
description:
No functional change:
- Fix comments.
- Change macro name.
- Change sysctl related functions for consistency.
diffstat:
sys/dev/pci/if_bge.c | 44 ++++++++++++++++++--------------------------
sys/dev/pci/if_bgereg.h | 4 ++--
2 files changed, 20 insertions(+), 28 deletions(-)
diffs (172 lines):
diff -r 316a2b51de7f -r cac27ea206e4 sys/dev/pci/if_bge.c
--- a/sys/dev/pci/if_bge.c Wed Feb 27 13:59:30 2013 +0000
+++ b/sys/dev/pci/if_bge.c Wed Feb 27 14:19:38 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bge.c,v 1.206 2013/02/26 11:06:23 msaitoh Exp $ */
+/* $NetBSD: if_bge.c,v 1.207 2013/02/27 14:19:38 msaitoh Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.206 2013/02/26 11:06:23 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.207 2013/02/27 14:19:38 msaitoh Exp $");
#include "vlan.h"
@@ -259,8 +259,8 @@
static void bge_stop_fw(struct bge_softc *);
static int bge_reset(struct bge_softc *);
static void bge_link_upd(struct bge_softc *);
-static void sysctl_bge_init(struct bge_softc *);
-static int sysctl_bge_verify(SYSCTLFN_PROTO);
+static void bge_sysctl_init(struct bge_softc *);
+static int bge_sysctl_verify(SYSCTLFN_PROTO);
#ifdef BGE_DEBUG
#define DPRINTF(x) if (bgedebug) printf x
@@ -624,18 +624,10 @@
NULL },
};
-/*
- * XXX: how to handle variants based on 5750 and derivatives:
- * 5750 5751, 5721, possibly 5714, 5752, and 5708?, which
- * in general behave like a 5705, except with additional quirks.
- * This driver's current handling of the 5721 is wrong;
- * how we map ASIC revision to "quirks" needs more thought.
- * (defined here until the thought is done).
- */
#define BGE_IS_5700_FAMILY(sc) ((sc)->bge_flags & BGE_5700_FAMILY)
#define BGE_IS_5714_FAMILY(sc) ((sc)->bge_flags & BGE_5714_FAMILY)
#define BGE_IS_5705_PLUS(sc) ((sc)->bge_flags & BGE_5705_PLUS)
-#define BGE_IS_5750_OR_BEYOND(sc) ((sc)->bge_flags & BGE_5750_PLUS)
+#define BGE_IS_575X_PLUS(sc) ((sc)->bge_flags & BGE_575X_PLUS)
#define BGE_IS_5755_PLUS(sc) ((sc)->bge_flags & BGE_5755_PLUS)
#define BGE_IS_JUMBO_CAPABLE(sc) ((sc)->bge_flags & BGE_JUMBO_CAPABLE)
@@ -2690,10 +2682,10 @@
BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5906 ||
BGE_IS_5755_PLUS(sc) ||
BGE_IS_5714_FAMILY(sc))
- sc->bge_flags |= BGE_5750_PLUS;
+ sc->bge_flags |= BGE_575X_PLUS;
if (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5705 ||
- BGE_IS_5750_OR_BEYOND(sc))
+ BGE_IS_575X_PLUS(sc))
sc->bge_flags |= BGE_5705_PLUS;
/*
@@ -2820,7 +2812,7 @@
& BGE_HWCFG_ASF) {
sc->bge_asf_mode |= ASF_ENABLE;
sc->bge_asf_mode |= ASF_STACKUP;
- if (BGE_IS_5750_OR_BEYOND(sc)) {
+ if (BGE_IS_575X_PLUS(sc)) {
sc->bge_asf_mode |= ASF_NEW_HANDSHAKE;
}
}
@@ -3092,7 +3084,7 @@
else
aprint_error_dev(self, "couldn't establish power handler\n");
- sysctl_bge_init(sc);
+ bge_sysctl_init(sc);
#ifdef BGE_DEBUG
bge_debug_info(sc);
@@ -3120,7 +3112,7 @@
int i, val;
void (*write_op)(struct bge_softc *, int, int);
- if (BGE_IS_5750_OR_BEYOND(sc) && !BGE_IS_5714_FAMILY(sc)
+ if (BGE_IS_575X_PLUS(sc) && !BGE_IS_5714_FAMILY(sc)
&& (BGE_ASICREV(sc->bge_chipid) != BGE_ASICREV_BCM5906)) {
if (sc->bge_flags & BGE_PCIE)
write_op = bge_writemem_direct;
@@ -3940,7 +3932,7 @@
}
/*
- * Encapsulate an mbuf chain in the tx ring by coupling the mbuf data
+ * Encapsulate an mbuf chain in the tx ring by coupling the mbuf data
* pointers to descriptors.
*/
static int
@@ -4092,7 +4084,7 @@
- sizeof(struct tcphdr)
- sizeof(struct ip)) >> 2;
}
- if (BGE_IS_5750_OR_BEYOND(sc)) {
+ if (BGE_IS_575X_PLUS(sc)) {
th->th_sum = 0;
csum_flags &= ~(BGE_TXBDFLAG_TCP_UDP_CSUM);
} else {
@@ -4176,7 +4168,7 @@
* of TSO flags and segsize.
*/
if (use_tso) {
- if (BGE_IS_5750_OR_BEYOND(sc) || i == 0) {
+ if (BGE_IS_575X_PLUS(sc) || i == 0) {
f->bge_rsvd = maxsegsize;
f->bge_flags = csum_flags | txbd_tso_flags;
} else {
@@ -4856,7 +4848,7 @@
}
static int
-sysctl_bge_verify(SYSCTLFN_ARGS)
+bge_sysctl_verify(SYSCTLFN_ARGS)
{
int error, t;
struct sysctlnode node;
@@ -4889,7 +4881,7 @@
* Set up sysctl(3) MIB, hw.bge.*.
*/
static void
-sysctl_bge_init(struct bge_softc *sc)
+bge_sysctl_init(struct bge_softc *sc)
{
int rc, bge_root_num;
const struct sysctlnode *node;
@@ -4914,7 +4906,7 @@
CTLFLAG_READWRITE,
CTLTYPE_INT, "rx_lvl",
SYSCTL_DESCR("BGE receive interrupt mitigation level"),
- sysctl_bge_verify, 0,
+ bge_sysctl_verify, 0,
&bge_rx_thresh_lvl,
0, CTL_HW, bge_root_num, CTL_CREATE,
CTL_EOL)) != 0) {
@@ -4937,8 +4929,8 @@
printf("Hardware Flags:\n");
if (BGE_IS_5755_PLUS(sc))
printf(" - 5755 Plus\n");
- if (BGE_IS_5750_OR_BEYOND(sc))
- printf(" - 5750 Plus\n");
+ if (BGE_IS_575X_PLUS(sc))
+ printf(" - 575X Plus\n");
if (BGE_IS_5705_PLUS(sc))
printf(" - 5705 Plus\n");
if (BGE_IS_5714_FAMILY(sc))
diff -r 316a2b51de7f -r cac27ea206e4 sys/dev/pci/if_bgereg.h
--- a/sys/dev/pci/if_bgereg.h Wed Feb 27 13:59:30 2013 +0000
+++ b/sys/dev/pci/if_bgereg.h Wed Feb 27 14:19:38 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bgereg.h,v 1.60 2013/02/26 11:06:23 msaitoh Exp $ */
+/* $NetBSD: if_bgereg.h,v 1.61 2013/02/27 14:19:38 msaitoh Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
* Copyright (c) 1997, 1998, 1999, 2001
@@ -2383,7 +2383,7 @@
#define BGE_NO_ETH_WIRE_SPEED 0x00080000
#define BGE_IS_5788 0x00100000
#define BGE_5705_PLUS 0x00200000
-#define BGE_5750_PLUS 0x00400000
+#define BGE_575X_PLUS 0x00400000
#define BGE_5755_PLUS 0x00800000
#define BGE_5714_FAMILY 0x01000000
#define BGE_5700_FAMILY 0x02000000
Home |
Main Index |
Thread Index |
Old Index