diff options
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/cardbus/if_fxp_cardbus.c | 6 | ||||
| -rw-r--r-- | sys/dev/ic/i82557.c | 14 | ||||
| -rw-r--r-- | sys/dev/ic/i82557reg.h | 4 | ||||
| -rw-r--r-- | sys/dev/ic/i82557var.h | 3 | ||||
| -rw-r--r-- | sys/dev/pci/if_fxp_pci.c | 16 |
5 files changed, 22 insertions, 21 deletions
diff --git a/sys/dev/cardbus/if_fxp_cardbus.c b/sys/dev/cardbus/if_fxp_cardbus.c index 2d0c6870b05..5f55145ca19 100644 --- a/sys/dev/cardbus/if_fxp_cardbus.c +++ b/sys/dev/cardbus/if_fxp_cardbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_fxp_cardbus.c,v 1.35 2009/01/18 10:37:03 mrg Exp $ */ +/* $NetBSD: if_fxp_cardbus.c,v 1.36 2009/02/20 05:49:34 mrg Exp $ */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_fxp_cardbus.c,v 1.35 2009/01/18 10:37:03 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_fxp_cardbus.c,v 1.36 2009/02/20 05:49:34 mrg Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -168,7 +168,7 @@ fxp_cardbus_attach(struct device *parent, struct device *self, if (sc->sc_rev >= FXP_REV_82558_A4) sc->sc_flags |= FXPF_FC|FXPF_EXT_TXCB; if (sc->sc_rev >= FXP_REV_82550) - sc->sc_flags |= FXPF_EXT_RFA|FXPF_IPCB; + sc->sc_flags |= FXPF_EXT_RFA; sc->sc_dmat = ca->ca_dmat; sc->sc_enable = fxp_cardbus_enable; diff --git a/sys/dev/ic/i82557.c b/sys/dev/ic/i82557.c index 429229ca5b5..07c9a73d5d5 100644 --- a/sys/dev/ic/i82557.c +++ b/sys/dev/ic/i82557.c @@ -1,4 +1,4 @@ -/* $NetBSD: i82557.c,v 1.122 2009/01/18 10:37:04 mrg Exp $ */ +/* $NetBSD: i82557.c,v 1.123 2009/02/20 05:49:34 mrg Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2001, 2002 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.122 2009/01/18 10:37:04 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.123 2009/02/20 05:49:34 mrg Exp $"); #include "bpfilter.h" #include "rnd.h" @@ -268,7 +268,7 @@ fxp_attach(struct fxp_softc *sc) * too, but that's already enabled by the code above. * Be careful to do this only on the right devices. */ - if (sc->sc_flags & FXPF_IPCB) + if (sc->sc_flags & FXPF_EXT_TXCB) sc->sc_txcmd = htole16(FXP_CB_COMMAND_IPCBXMIT); else sc->sc_txcmd = htole16(FXP_CB_COMMAND_XMIT); @@ -324,7 +324,7 @@ fxp_attach(struct fxp_softc *sc) */ for (i = 0; i < FXP_NTXCB; i++) { if ((error = bus_dmamap_create(sc->sc_dmat, MCLBYTES, - (sc->sc_flags & FXPF_IPCB) ? FXP_IPCB_NTXSEG : FXP_NTXSEG, + (sc->sc_flags & FXPF_EXT_TXCB) ? FXP_IPCB_NTXSEG : FXP_NTXSEG, MCLBYTES, 0, 0, &FXP_DSTX(sc, i)->txs_dmamap)) != 0) { aprint_error_dev(sc->sc_dev, "unable to create tx DMA map %d, error = %d\n", @@ -374,7 +374,7 @@ fxp_attach(struct fxp_softc *sc) ifp->if_stop = fxp_stop; IFQ_SET_READY(&ifp->if_snd); - if (sc->sc_flags & FXPF_IPCB) { + if (sc->sc_flags & FXPF_EXT_TXCB) { KASSERT(sc->sc_flags & FXPF_EXT_RFA); /* we have both or none */ /* * IFCAP_CSUM_IPv4_Tx seems to have a problem, @@ -896,7 +896,7 @@ fxp_start(struct ifnet *ifp) tbdp = txd->txd_tbd; len = m0->m_pkthdr.len; nsegs = dmamap->dm_nsegs; - if (sc->sc_flags & FXPF_IPCB) + if (sc->sc_flags & FXPF_EXT_TXCB) tbdp++; for (seg = 0; seg < nsegs; seg++) { tbdp[seg].tb_addr = @@ -940,7 +940,7 @@ fxp_start(struct ifnet *ifp) txd->txd_txcb.tbd_number = nsegs; KASSERT((csum_flags & (M_CSUM_TCPv6 | M_CSUM_UDPv6)) == 0); - if (sc->sc_flags & FXPF_IPCB) { + if (sc->sc_flags & FXPF_EXT_TXCB) { struct m_tag *vtag; struct fxp_ipcb *ipcb; /* diff --git a/sys/dev/ic/i82557reg.h b/sys/dev/ic/i82557reg.h index b1843b77879..106ee185125 100644 --- a/sys/dev/ic/i82557reg.h +++ b/sys/dev/ic/i82557reg.h @@ -1,4 +1,4 @@ -/* $NetBSD: i82557reg.h,v 1.21 2008/12/03 15:34:38 tsutsui Exp $ */ +/* $NetBSD: i82557reg.h,v 1.22 2009/02/20 05:49:34 mrg Exp $ */ /*- * Copyright (c) 1998, 1999, 2001 The NetBSD Foundation, Inc. @@ -370,7 +370,7 @@ struct fxp_tbd { #define FXP_CB_STATUS_C 0x8000 /* commands */ -#define FXP_CB_COMMAND_CMD 0x0007 /* XXX how about FXPF_IPCB case? */ +#define FXP_CB_COMMAND_CMD 0x0007 #define FXP_CB_COMMAND_NOP 0x0 #define FXP_CB_COMMAND_IAS 0x1 #define FXP_CB_COMMAND_CONFIG 0x2 diff --git a/sys/dev/ic/i82557var.h b/sys/dev/ic/i82557var.h index 33c444aeddd..cbc20981d07 100644 --- a/sys/dev/ic/i82557var.h +++ b/sys/dev/ic/i82557var.h @@ -1,4 +1,4 @@ -/* $NetBSD: i82557var.h,v 1.42 2009/01/18 10:37:04 mrg Exp $ */ +/* $NetBSD: i82557var.h,v 1.43 2009/02/20 05:49:34 mrg Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2001 The NetBSD Foundation, Inc. @@ -222,7 +222,6 @@ struct fxp_softc { #define FXPF_EXT_TXCB 0x0080 /* enable extended TxCB */ #define FXPF_UCODE_LOADED 0x0100 /* microcode is loaded */ #define FXPF_EXT_RFA 0x0200 /* enable extended RFD */ -#define FXPF_IPCB 0x0400 /* use IPCB */ #define FXPF_RECV_WORKAROUND 0x0800 /* receiver lock-up workaround */ #define FXPF_FC 0x1000 /* has flow control */ diff --git a/sys/dev/pci/if_fxp_pci.c b/sys/dev/pci/if_fxp_pci.c index 464bae45d9a..25a903a0a7d 100644 --- a/sys/dev/pci/if_fxp_pci.c +++ b/sys/dev/pci/if_fxp_pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_fxp_pci.c,v 1.61 2009/01/18 10:37:04 mrg Exp $ */ +/* $NetBSD: if_fxp_pci.c,v 1.62 2009/02/20 05:49:34 mrg Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_fxp_pci.c,v 1.61 2009/01/18 10:37:04 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_fxp_pci.c,v 1.62 2009/02/20 05:49:34 mrg Exp $"); #include "rnd.h" @@ -348,7 +348,7 @@ fxp_pci_attach(device_t parent, device_t self, void *aux) chipname = "i82559S Ethernet"; if (sc->sc_rev >= FXP_REV_82550) { chipname = "i82550 Ethernet"; - sc->sc_flags |= FXPF_EXT_RFA|FXPF_IPCB; + sc->sc_flags |= FXPF_EXT_RFA; } /* @@ -372,17 +372,19 @@ fxp_pci_attach(device_t parent, device_t self, void *aux) case PCI_PRODUCT_INTEL_82562EH_HPNA_1: case PCI_PRODUCT_INTEL_82562EH_HPNA_2: case PCI_PRODUCT_INTEL_PRO_100_VM_2: - aprint_normal(": %s, rev %d\n", fpp->fpp_name, sc->sc_rev); - sc->sc_flags |= FXPF_FC|FXPF_EXT_TXCB; /* * The ICH-2 and ICH-3 have the "resume bug". */ sc->sc_flags |= FXPF_HAS_RESUME_BUG; - break; + /* FALLTHROUGH */ default: aprint_normal(": %s, rev %d\n", fpp->fpp_name, sc->sc_rev); - sc->sc_flags |= FXPF_FC|FXPF_EXT_TXCB|FXPF_EXT_RFA|FXPF_IPCB; + if (sc->sc_rev >= FXP_REV_82558_A4) + sc->sc_flags |= FXPF_FC|FXPF_EXT_TXCB; + if (sc->sc_rev == FXP_REV_82550 || sc->sc_rev == FXP_REV_82550_C) + sc->sc_flags |= FXPF_EXT_RFA; + break; } |
