if_lge.c (78508) | if_lge.c (79472) |
---|---|
1/* 2 * Copyright (c) 2001 Wind River Systems 3 * Copyright (c) 1997, 1998, 1999, 2000, 2001 4 * Bill Paul <william.paul@windriver.com>. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 16 unchanged lines hidden (view full) --- 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 * | 1/* 2 * Copyright (c) 2001 Wind River Systems 3 * Copyright (c) 1997, 1998, 1999, 2000, 2001 4 * Bill Paul <william.paul@windriver.com>. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 16 unchanged lines hidden (view full) --- 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 * |
33 * $FreeBSD: head/sys/dev/lge/if_lge.c 78508 2001-06-20 19:48:35Z bmilekic $ | 33 * $FreeBSD: head/sys/dev/lge/if_lge.c 79472 2001-07-09 17:58:42Z wpaul $ |
34 */ 35 36/* 37 * Level 1 LXT1001 gigabit ethernet driver for FreeBSD. Public 38 * documentation not available, but ask me nicely. 39 * 40 * Written by Bill Paul <william.paul@windriver.com> 41 * Wind River Systems --- 67 unchanged lines hidden (view full) --- 109 110#include <dev/lge/if_lgereg.h> 111 112/* "controller miibus0" required. See GENERIC if you get errors here. */ 113#include "miibus_if.h" 114 115#ifndef lint 116static const char rcsid[] = | 34 */ 35 36/* 37 * Level 1 LXT1001 gigabit ethernet driver for FreeBSD. Public 38 * documentation not available, but ask me nicely. 39 * 40 * Written by Bill Paul <william.paul@windriver.com> 41 * Wind River Systems --- 67 unchanged lines hidden (view full) --- 109 110#include <dev/lge/if_lgereg.h> 111 112/* "controller miibus0" required. See GENERIC if you get errors here. */ 113#include "miibus_if.h" 114 115#ifndef lint 116static const char rcsid[] = |
117 "$FreeBSD: head/sys/dev/lge/if_lge.c 78508 2001-06-20 19:48:35Z bmilekic $"; | 117 "$FreeBSD: head/sys/dev/lge/if_lge.c 79472 2001-07-09 17:58:42Z wpaul $"; |
118#endif 119 120/* 121 * Various supported device vendors/types and their names. 122 */ 123static struct lge_type lge_devs[] = { 124 { LGE_VENDORID, LGE_DEVICEID, "Level 1 Gigabit Ethernet" }, 125 { 0, 0, NULL } --- 399 unchanged lines hidden (view full) --- 525 pci_write_config(dev, LGE_PCI_LOMEM, membase, 4); 526 pci_write_config(dev, LGE_PCI_INTLINE, irq, 4); 527 } 528 529 /* 530 * Map control/status registers. 531 */ 532 pci_enable_busmaster(dev); | 118#endif 119 120/* 121 * Various supported device vendors/types and their names. 122 */ 123static struct lge_type lge_devs[] = { 124 { LGE_VENDORID, LGE_DEVICEID, "Level 1 Gigabit Ethernet" }, 125 { 0, 0, NULL } --- 399 unchanged lines hidden (view full) --- 525 pci_write_config(dev, LGE_PCI_LOMEM, membase, 4); 526 pci_write_config(dev, LGE_PCI_INTLINE, irq, 4); 527 } 528 529 /* 530 * Map control/status registers. 531 */ 532 pci_enable_busmaster(dev); |
533 pci_enable_io(dev, PCIM_CMD_PORTEN); 534 pci_enable_io(dev, PCIM_CMD_MEMEN); | 533 pci_enable_io(dev, SYS_RES_IOPORT); 534 pci_enable_io(dev, SYS_RES_MEMORY); |
535 command = pci_read_config(dev, PCIR_COMMAND, 4); 536 537#ifdef LGE_USEIOSPACE 538 if (!(command & PCIM_CMD_PORTEN)) { 539 printf("lge%d: failed to enable I/O ports!\n", unit); 540 error = ENXIO;; 541 goto fail; 542 } --- 1082 unchanged lines hidden --- | 535 command = pci_read_config(dev, PCIR_COMMAND, 4); 536 537#ifdef LGE_USEIOSPACE 538 if (!(command & PCIM_CMD_PORTEN)) { 539 printf("lge%d: failed to enable I/O ports!\n", unit); 540 error = ENXIO;; 541 goto fail; 542 } --- 1082 unchanged lines hidden --- |