Deleted Added
full compact
if_xl.c (117126) if_xl.c (117208)
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

--- 86 unchanged lines hidden (view full) ---

95 * support the PCI "boomerang" chips even though they work with the
96 * "vortex" driver in order to obtain better performance.
97 *
98 * This driver is in the /sys/pci directory because it only supports
99 * PCI-based NICs.
100 */
101
102#include <sys/cdefs.h>
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

--- 86 unchanged lines hidden (view full) ---

95 * support the PCI "boomerang" chips even though they work with the
96 * "vortex" driver in order to obtain better performance.
97 *
98 * This driver is in the /sys/pci directory because it only supports
99 * PCI-based NICs.
100 */
101
102#include <sys/cdefs.h>
103__FBSDID("$FreeBSD: head/sys/pci/if_xl.c 117126 2003-07-01 15:52:06Z scottl $");
103__FBSDID("$FreeBSD: head/sys/pci/if_xl.c 117208 2003-07-03 21:39:53Z imp $");
104
105#include <sys/param.h>
106#include <sys/systm.h>
107#include <sys/sockio.h>
108#include <sys/endian.h>
109#include <sys/mbuf.h>
110#include <sys/kernel.h>
111#include <sys/socket.h>

--- 1237 unchanged lines hidden (view full) ---

1349 if (pci_get_device(dev) == TC_DEVICEID_TORNADO_656C)
1350 sc->xl_flags |= XL_FLAG_INVERT_MII_PWR;
1351 if (pci_get_device(dev) == TC_DEVICEID_HURRICANE_656 ||
1352 pci_get_device(dev) == TC_DEVICEID_HURRICANE_656B)
1353 sc->xl_flags |= XL_FLAG_INVERT_MII_PWR |
1354 XL_FLAG_INVERT_LED_PWR;
1355 if (pci_get_device(dev) == TC_DEVICEID_TORNADO_10_100BT_920B)
1356 sc->xl_flags |= XL_FLAG_PHYOK;
104
105#include <sys/param.h>
106#include <sys/systm.h>
107#include <sys/sockio.h>
108#include <sys/endian.h>
109#include <sys/mbuf.h>
110#include <sys/kernel.h>
111#include <sys/socket.h>

--- 1237 unchanged lines hidden (view full) ---

1349 if (pci_get_device(dev) == TC_DEVICEID_TORNADO_656C)
1350 sc->xl_flags |= XL_FLAG_INVERT_MII_PWR;
1351 if (pci_get_device(dev) == TC_DEVICEID_HURRICANE_656 ||
1352 pci_get_device(dev) == TC_DEVICEID_HURRICANE_656B)
1353 sc->xl_flags |= XL_FLAG_INVERT_MII_PWR |
1354 XL_FLAG_INVERT_LED_PWR;
1355 if (pci_get_device(dev) == TC_DEVICEID_TORNADO_10_100BT_920B)
1356 sc->xl_flags |= XL_FLAG_PHYOK;
1357
1357#ifndef BURN_BRIDGES
1358 /*
1359 * If this is a 3c905B, we have to check one extra thing.
1360 * The 905B supports power management and may be placed in
1361 * a low-power mode (D3 mode), typically by certain operating
1362 * systems which shall not be named. The PCI BIOS is supposed
1363 * to reset the NIC and bring it out of low-power mode, but
1364 * some do not. Consequently, we have to see if this chip
1365 * supports power management, and if so, make sure it's not

--- 22 unchanged lines hidden (view full) ---

1388
1389 pci_set_powerstate(dev, PCI_POWERSTATE_D0);
1390
1391 /* Restore PCI config data. */
1392 pci_write_config(dev, XL_PCI_LOIO, iobase, 4);
1393 pci_write_config(dev, XL_PCI_LOMEM, membase, 4);
1394 pci_write_config(dev, XL_PCI_INTLINE, irq, 4);
1395 }
1358 /*
1359 * If this is a 3c905B, we have to check one extra thing.
1360 * The 905B supports power management and may be placed in
1361 * a low-power mode (D3 mode), typically by certain operating
1362 * systems which shall not be named. The PCI BIOS is supposed
1363 * to reset the NIC and bring it out of low-power mode, but
1364 * some do not. Consequently, we have to see if this chip
1365 * supports power management, and if so, make sure it's not

--- 22 unchanged lines hidden (view full) ---

1388
1389 pci_set_powerstate(dev, PCI_POWERSTATE_D0);
1390
1391 /* Restore PCI config data. */
1392 pci_write_config(dev, XL_PCI_LOIO, iobase, 4);
1393 pci_write_config(dev, XL_PCI_LOMEM, membase, 4);
1394 pci_write_config(dev, XL_PCI_INTLINE, irq, 4);
1395 }
1396
1396#endif
1397 /*
1398 * Map control/status registers.
1399 */
1400 pci_enable_busmaster(dev);
1401
1402 rid = XL_PCI_LOMEM;
1403 res = SYS_RES_MEMORY;
1404

--- 1881 unchanged lines hidden ---
1397 /*
1398 * Map control/status registers.
1399 */
1400 pci_enable_busmaster(dev);
1401
1402 rid = XL_PCI_LOMEM;
1403 res = SYS_RES_MEMORY;
1404

--- 1881 unchanged lines hidden ---