if_xl.c (104324) | if_xl.c (105221) |
---|---|
1/* 2 * Copyright (c) 1997, 1998, 1999 3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 * | 1/* 2 * Copyright (c) 1997, 1998, 1999 3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 * |
32 * $FreeBSD: head/sys/pci/if_xl.c 104324 2002-10-01 22:27:03Z phk $ | 32 * $FreeBSD: head/sys/pci/if_xl.c 105221 2002-10-16 09:14:59Z phk $ |
33 */ 34 35/* 36 * 3Com 3c90x Etherlink XL PCI NIC driver 37 * 38 * Supports the 3Com "boomerang", "cyclone" and "hurricane" PCI 39 * bus-master chips (3c90x cards and embedded controllers) including 40 * the following: --- 106 unchanged lines hidden (view full) --- 147 * might not work on some devices. 148 */ 149#define XL_USEIOSPACE 150 151#include <pci/if_xlreg.h> 152 153#if !defined(lint) 154static const char rcsid[] = | 33 */ 34 35/* 36 * 3Com 3c90x Etherlink XL PCI NIC driver 37 * 38 * Supports the 3Com "boomerang", "cyclone" and "hurricane" PCI 39 * bus-master chips (3c90x cards and embedded controllers) including 40 * the following: --- 106 unchanged lines hidden (view full) --- 147 * might not work on some devices. 148 */ 149#define XL_USEIOSPACE 150 151#include <pci/if_xlreg.h> 152 153#if !defined(lint) 154static const char rcsid[] = |
155 "$FreeBSD: head/sys/pci/if_xl.c 104324 2002-10-01 22:27:03Z phk $"; | 155 "$FreeBSD: head/sys/pci/if_xl.c 105221 2002-10-16 09:14:59Z phk $"; |
156#endif 157 158#define XL905B_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP) 159 160/* 161 * Various supported device vendors/types and their names. 162 */ 163static struct xl_type xl_devs[] = { --- 181 unchanged lines hidden (view full) --- 345 * autoneg logic that's faked up to look like a PHY (3c905B-TX). 346 * Note: if you don't perform the MDIO operations just right, 347 * it's possible to end up with code that works correctly with 348 * some chips/CPUs/processor speeds/bus speeds/etc but not 349 * with others. 350 */ 351#define MII_SET(x) \ 352 CSR_WRITE_2(sc, XL_W4_PHY_MGMT, \ | 156#endif 157 158#define XL905B_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP) 159 160/* 161 * Various supported device vendors/types and their names. 162 */ 163static struct xl_type xl_devs[] = { --- 181 unchanged lines hidden (view full) --- 345 * autoneg logic that's faked up to look like a PHY (3c905B-TX). 346 * Note: if you don't perform the MDIO operations just right, 347 * it's possible to end up with code that works correctly with 348 * some chips/CPUs/processor speeds/bus speeds/etc but not 349 * with others. 350 */ 351#define MII_SET(x) \ 352 CSR_WRITE_2(sc, XL_W4_PHY_MGMT, \ |
353 CSR_READ_2(sc, XL_W4_PHY_MGMT) | x) | 353 CSR_READ_2(sc, XL_W4_PHY_MGMT) | (x)) |
354 355#define MII_CLR(x) \ 356 CSR_WRITE_2(sc, XL_W4_PHY_MGMT, \ | 354 355#define MII_CLR(x) \ 356 CSR_WRITE_2(sc, XL_W4_PHY_MGMT, \ |
357 CSR_READ_2(sc, XL_W4_PHY_MGMT) & ~x) | 357 CSR_READ_2(sc, XL_W4_PHY_MGMT) & ~(x)) |
358 359/* 360 * Sync the PHYs by setting data bit and strobing the clock 32 times. 361 */ 362static void 363xl_mii_sync(sc) 364 struct xl_softc *sc; 365{ --- 2742 unchanged lines hidden --- | 358 359/* 360 * Sync the PHYs by setting data bit and strobing the clock 32 times. 361 */ 362static void 363xl_mii_sync(sc) 364 struct xl_softc *sc; 365{ --- 2742 unchanged lines hidden --- |