if_xl.c (72084) | if_xl.c (72813) |
---|---|
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 72084 2001-02-06 10:12:15Z phk $ | 32 * $FreeBSD: head/sys/pci/if_xl.c 72813 2001-02-21 20:54:22Z wpaul $ |
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: --- 104 unchanged lines hidden (view full) --- 145 * might not work on some devices. 146 */ 147#define XL_USEIOSPACE 148 149#include <pci/if_xlreg.h> 150 151#if !defined(lint) 152static 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: --- 104 unchanged lines hidden (view full) --- 145 * might not work on some devices. 146 */ 147#define XL_USEIOSPACE 148 149#include <pci/if_xlreg.h> 150 151#if !defined(lint) 152static const char rcsid[] = |
153 "$FreeBSD: head/sys/pci/if_xl.c 72084 2001-02-06 10:12:15Z phk $"; | 153 "$FreeBSD: head/sys/pci/if_xl.c 72813 2001-02-21 20:54:22Z wpaul $"; |
154#endif 155 156/* 157 * Various supported device vendors/types and their names. 158 */ 159static struct xl_type xl_devs[] = { 160 { TC_VENDORID, TC_DEVICEID_BOOMERANG_10BT, 161 "3Com 3c900-TPO Etherlink XL" }, --- 1137 unchanged lines hidden (view full) --- 1299 pci_write_config(dev, XL_PCI_LOIO, iobase, 4); 1300 pci_write_config(dev, XL_PCI_LOMEM, membase, 4); 1301 pci_write_config(dev, XL_PCI_INTLINE, irq, 4); 1302 } 1303 1304 /* 1305 * Map control/status registers. 1306 */ | 154#endif 155 156/* 157 * Various supported device vendors/types and their names. 158 */ 159static struct xl_type xl_devs[] = { 160 { TC_VENDORID, TC_DEVICEID_BOOMERANG_10BT, 161 "3Com 3c900-TPO Etherlink XL" }, --- 1137 unchanged lines hidden (view full) --- 1299 pci_write_config(dev, XL_PCI_LOIO, iobase, 4); 1300 pci_write_config(dev, XL_PCI_LOMEM, membase, 4); 1301 pci_write_config(dev, XL_PCI_INTLINE, irq, 4); 1302 } 1303 1304 /* 1305 * Map control/status registers. 1306 */ |
1307 pci_enable_busmaster(dev); 1308 pci_enable_io(dev, PCIM_CMD_PORTEN); 1309 pci_enable_io(dev, PCIM_CMD_MEMEN); |
|
1307 command = pci_read_config(dev, PCIR_COMMAND, 4); | 1310 command = pci_read_config(dev, PCIR_COMMAND, 4); |
1308 command |= (PCIM_CMD_PORTEN|PCIM_CMD_MEMEN|PCIM_CMD_BUSMASTEREN); 1309 pci_write_config(dev, PCIR_COMMAND, command, 4); 1310 command = pci_read_config(dev, PCIR_COMMAND, 4); | |
1311 1312#ifdef XL_USEIOSPACE 1313 if (!(command & PCIM_CMD_PORTEN)) { 1314 printf("xl%d: failed to enable I/O ports!\n", unit); 1315 error = ENXIO; 1316 goto fail; 1317 } 1318#else --- 1680 unchanged lines hidden --- | 1311 1312#ifdef XL_USEIOSPACE 1313 if (!(command & PCIM_CMD_PORTEN)) { 1314 printf("xl%d: failed to enable I/O ports!\n", unit); 1315 error = ENXIO; 1316 goto fail; 1317 } 1318#else --- 1680 unchanged lines hidden --- |