if_gem_pci.c (212725) | if_gem_pci.c (223944) |
---|---|
1/*- 2 * Copyright (C) 2001 Eduardo Horvath. 3 * Copyright (c) 2007 Marius Strobl <marius@FreeBSD.org> 4 * All rights reserved. 5 * 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 15 unchanged lines hidden (view full) --- 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * 28 * from: NetBSD: if_gem_pci.c,v 1.7 2001/10/18 15:09:15 thorpej Exp 29 */ 30 31#include <sys/cdefs.h> | 1/*- 2 * Copyright (C) 2001 Eduardo Horvath. 3 * Copyright (c) 2007 Marius Strobl <marius@FreeBSD.org> 4 * All rights reserved. 5 * 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 15 unchanged lines hidden (view full) --- 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * 28 * from: NetBSD: if_gem_pci.c,v 1.7 2001/10/18 15:09:15 thorpej Exp 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/sys/dev/gem/if_gem_pci.c 212725 2010-09-16 09:29:48Z marius $"); | 32__FBSDID("$FreeBSD: head/sys/dev/gem/if_gem_pci.c 223944 2011-07-12 08:20:15Z marius $"); |
33 34/* 35 * PCI bindings for Apple GMAC, Sun ERI and Sun GEM Ethernet controllers 36 */ 37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/bus.h> --- 131 unchanged lines hidden (view full) --- 172 173 /* 174 * Some Sun GEMs/ERIs do have their intpin register bogusly set to 0, 175 * although it should be 1. Correct that. 176 */ 177 if (pci_get_intpin(dev) == 0) 178 pci_set_intpin(dev, 1); 179 | 33 34/* 35 * PCI bindings for Apple GMAC, Sun ERI and Sun GEM Ethernet controllers 36 */ 37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/bus.h> --- 131 unchanged lines hidden (view full) --- 172 173 /* 174 * Some Sun GEMs/ERIs do have their intpin register bogusly set to 0, 175 * although it should be 1. Correct that. 176 */ 177 if (pci_get_intpin(dev) == 0) 178 pci_set_intpin(dev, 1); 179 |
180 /* Set the PCI latency timer for Sun ERIs. */ 181 if (sc->sc_variant == GEM_SUN_ERI) 182 pci_write_config(dev, PCIR_LATTIMER, GEM_ERI_LATENCY_TIMER, 1); 183 |
|
180 sc->sc_dev = dev; 181 sc->sc_flags |= GEM_PCI; 182 183 if (bus_alloc_resources(dev, gem_pci_res_spec, sc->sc_res)) { 184 device_printf(dev, "failed to allocate resources\n"); 185 bus_release_resources(dev, gem_pci_res_spec, sc->sc_res); 186 return (ENXIO); 187 } --- 183 unchanged lines hidden --- | 184 sc->sc_dev = dev; 185 sc->sc_flags |= GEM_PCI; 186 187 if (bus_alloc_resources(dev, gem_pci_res_spec, sc->sc_res)) { 188 device_printf(dev, "failed to allocate resources\n"); 189 bus_release_resources(dev, gem_pci_res_spec, sc->sc_res); 190 return (ENXIO); 191 } --- 183 unchanged lines hidden --- |