if_nge.c (167190) | if_nge.c (173839) |
---|---|
1/*- 2 * Copyright (c) 2001 Wind River Systems 3 * Copyright (c) 1997, 1998, 1999, 2000, 2001 4 * Bill Paul <wpaul@bsdi.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: --- 18 unchanged lines hidden (view full) --- 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 34#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2001 Wind River Systems 3 * Copyright (c) 1997, 1998, 1999, 2000, 2001 4 * Bill Paul <wpaul@bsdi.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: --- 18 unchanged lines hidden (view full) --- 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 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: head/sys/dev/nge/if_nge.c 167190 2007-03-04 03:38:08Z csjp $"); | 35__FBSDID("$FreeBSD: head/sys/dev/nge/if_nge.c 173839 2007-11-22 02:45:00Z yongari $"); |
36 37/* 38 * National Semiconductor DP83820/DP83821 gigabit ethernet driver 39 * for FreeBSD. Datasheets are available from: 40 * 41 * http://www.national.com/ds/DP/DP83820.pdf 42 * http://www.national.com/ds/DP/DP83821.pdf 43 * --- 117 unchanged lines hidden (view full) --- 161static void nge_tick(void *); 162static void nge_start(struct ifnet *); 163static void nge_start_locked(struct ifnet *); 164static int nge_ioctl(struct ifnet *, u_long, caddr_t); 165static void nge_init(void *); 166static void nge_init_locked(struct nge_softc *); 167static void nge_stop(struct nge_softc *); 168static void nge_watchdog(struct ifnet *); | 36 37/* 38 * National Semiconductor DP83820/DP83821 gigabit ethernet driver 39 * for FreeBSD. Datasheets are available from: 40 * 41 * http://www.national.com/ds/DP/DP83820.pdf 42 * http://www.national.com/ds/DP/DP83821.pdf 43 * --- 117 unchanged lines hidden (view full) --- 161static void nge_tick(void *); 162static void nge_start(struct ifnet *); 163static void nge_start_locked(struct ifnet *); 164static int nge_ioctl(struct ifnet *, u_long, caddr_t); 165static void nge_init(void *); 166static void nge_init_locked(struct nge_softc *); 167static void nge_stop(struct nge_softc *); 168static void nge_watchdog(struct ifnet *); |
169static void nge_shutdown(device_t); | 169static int nge_shutdown(device_t); |
170static int nge_ifmedia_upd(struct ifnet *); 171static void nge_ifmedia_upd_locked(struct ifnet *); 172static void nge_ifmedia_sts(struct ifnet *, struct ifmediareq *); 173 174static void nge_delay(struct nge_softc *); 175static void nge_eeprom_idle(struct nge_softc *); 176static void nge_eeprom_putbyte(struct nge_softc *, int); 177static void nge_eeprom_getword(struct nge_softc *, int, u_int16_t *); --- 1978 unchanged lines hidden (view full) --- 2156 2157 return; 2158} 2159 2160/* 2161 * Stop all chip I/O so that the kernel's probe routines don't 2162 * get confused by errant DMAs when rebooting. 2163 */ | 170static int nge_ifmedia_upd(struct ifnet *); 171static void nge_ifmedia_upd_locked(struct ifnet *); 172static void nge_ifmedia_sts(struct ifnet *, struct ifmediareq *); 173 174static void nge_delay(struct nge_softc *); 175static void nge_eeprom_idle(struct nge_softc *); 176static void nge_eeprom_putbyte(struct nge_softc *, int); 177static void nge_eeprom_getword(struct nge_softc *, int, u_int16_t *); --- 1978 unchanged lines hidden (view full) --- 2156 2157 return; 2158} 2159 2160/* 2161 * Stop all chip I/O so that the kernel's probe routines don't 2162 * get confused by errant DMAs when rebooting. 2163 */ |
2164static void | 2164static int |
2165nge_shutdown(dev) 2166 device_t dev; 2167{ 2168 struct nge_softc *sc; 2169 2170 sc = device_get_softc(dev); 2171 2172 NGE_LOCK(sc); 2173 nge_reset(sc); 2174 nge_stop(sc); 2175 NGE_UNLOCK(sc); 2176 | 2165nge_shutdown(dev) 2166 device_t dev; 2167{ 2168 struct nge_softc *sc; 2169 2170 sc = device_get_softc(dev); 2171 2172 NGE_LOCK(sc); 2173 nge_reset(sc); 2174 nge_stop(sc); 2175 NGE_UNLOCK(sc); 2176 |
2177 return; | 2177 return (0); |
2178} | 2178} |