Deleted Added
full compact
if_re.c (173565) if_re.c (173839)
1/*-
2 * Copyright (c) 1997, 1998-2003
3 * Bill Paul <wpaul@windriver.com>. 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

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

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
33#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1997, 1998-2003
3 * Bill Paul <wpaul@windriver.com>. 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

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

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
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/dev/re/if_re.c 173565 2007-11-12 15:44:00Z remko $");
34__FBSDID("$FreeBSD: head/sys/dev/re/if_re.c 173839 2007-11-22 02:45:00Z yongari $");
35
36/*
37 * RealTek 8139C+/8169/8169S/8110S/8168/8111/8101E PCI NIC driver
38 *
39 * Written by Bill Paul <wpaul@windriver.com>
40 * Senior Networking Software Engineer
41 * Wind River Systems
42 */

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

256static void re_start (struct ifnet *);
257static int re_ioctl (struct ifnet *, u_long, caddr_t);
258static void re_init (void *);
259static void re_init_locked (struct rl_softc *);
260static void re_stop (struct rl_softc *);
261static void re_watchdog (struct rl_softc *);
262static int re_suspend (device_t);
263static int re_resume (device_t);
35
36/*
37 * RealTek 8139C+/8169/8169S/8110S/8168/8111/8101E PCI NIC driver
38 *
39 * Written by Bill Paul <wpaul@windriver.com>
40 * Senior Networking Software Engineer
41 * Wind River Systems
42 */

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

256static void re_start (struct ifnet *);
257static int re_ioctl (struct ifnet *, u_long, caddr_t);
258static void re_init (void *);
259static void re_init_locked (struct rl_softc *);
260static void re_stop (struct rl_softc *);
261static void re_watchdog (struct rl_softc *);
262static int re_suspend (device_t);
263static int re_resume (device_t);
264static void re_shutdown (device_t);
264static int re_shutdown (device_t);
265static int re_ifmedia_upd (struct ifnet *);
266static void re_ifmedia_sts (struct ifnet *, struct ifmediareq *);
267
268static void re_eeprom_putbyte (struct rl_softc *, int);
269static void re_eeprom_getword (struct rl_softc *, int, u_int16_t *);
270static void re_read_eeprom (struct rl_softc *, caddr_t, int, int);
271static int re_gmii_readreg (device_t, int, int);
272static int re_gmii_writereg (device_t, int, int, int);

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

2801
2802 return (0);
2803}
2804
2805/*
2806 * Stop all chip I/O so that the kernel's probe routines don't
2807 * get confused by errant DMAs when rebooting.
2808 */
265static int re_ifmedia_upd (struct ifnet *);
266static void re_ifmedia_sts (struct ifnet *, struct ifmediareq *);
267
268static void re_eeprom_putbyte (struct rl_softc *, int);
269static void re_eeprom_getword (struct rl_softc *, int, u_int16_t *);
270static void re_read_eeprom (struct rl_softc *, caddr_t, int, int);
271static int re_gmii_readreg (device_t, int, int);
272static int re_gmii_writereg (device_t, int, int, int);

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

2801
2802 return (0);
2803}
2804
2805/*
2806 * Stop all chip I/O so that the kernel's probe routines don't
2807 * get confused by errant DMAs when rebooting.
2808 */
2809static void
2809static int
2810re_shutdown(dev)
2811 device_t dev;
2812{
2813 struct rl_softc *sc;
2814
2815 sc = device_get_softc(dev);
2816
2817 RL_LOCK(sc);
2818 re_stop(sc);
2819 /*
2820 * Mark interface as down since otherwise we will panic if
2821 * interrupt comes in later on, which can happen in some
2822 * cases.
2823 */
2824 sc->rl_ifp->if_flags &= ~IFF_UP;
2825 RL_UNLOCK(sc);
2810re_shutdown(dev)
2811 device_t dev;
2812{
2813 struct rl_softc *sc;
2814
2815 sc = device_get_softc(dev);
2816
2817 RL_LOCK(sc);
2818 re_stop(sc);
2819 /*
2820 * Mark interface as down since otherwise we will panic if
2821 * interrupt comes in later on, which can happen in some
2822 * cases.
2823 */
2824 sc->rl_ifp->if_flags &= ~IFF_UP;
2825 RL_UNLOCK(sc);
2826
2827 return (0);
2826}
2828}