Deleted Added
full compact
if_dc.c (171729) if_dc.c (173839)
1/*-
2 * Copyright (c) 1997, 1998, 1999
3 * Bill Paul <wpaul@ee.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

--- 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, 1999
3 * Bill Paul <wpaul@ee.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

--- 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/dc/if_dc.c 171729 2007-08-05 11:28:19Z marius $");
34__FBSDID("$FreeBSD: head/sys/dev/dc/if_dc.c 173839 2007-11-22 02:45:00Z yongari $");
35
36/*
37 * DEC "tulip" clone ethernet driver. Supports the DEC/Intel 21143
38 * series chips and several workalikes including the following:
39 *
40 * Macronix 98713/98715/98725/98727/98732 PMAC (www.macronix.com)
41 * Macronix/Lite-On 82c115 PNIC II (www.macronix.com)
42 * Lite-On 82c168/82c169 PNIC (www.litecom.com)

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

243static void dc_intr(void *);
244static void dc_start(struct ifnet *);
245static void dc_start_locked(struct ifnet *);
246static int dc_ioctl(struct ifnet *, u_long, caddr_t);
247static void dc_init(void *);
248static void dc_init_locked(struct dc_softc *);
249static void dc_stop(struct dc_softc *);
250static void dc_watchdog(void *);
35
36/*
37 * DEC "tulip" clone ethernet driver. Supports the DEC/Intel 21143
38 * series chips and several workalikes including the following:
39 *
40 * Macronix 98713/98715/98725/98727/98732 PMAC (www.macronix.com)
41 * Macronix/Lite-On 82c115 PNIC II (www.macronix.com)
42 * Lite-On 82c168/82c169 PNIC (www.litecom.com)

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

243static void dc_intr(void *);
244static void dc_start(struct ifnet *);
245static void dc_start_locked(struct ifnet *);
246static int dc_ioctl(struct ifnet *, u_long, caddr_t);
247static void dc_init(void *);
248static void dc_init_locked(struct dc_softc *);
249static void dc_stop(struct dc_softc *);
250static void dc_watchdog(void *);
251static void dc_shutdown(device_t);
251static int dc_shutdown(device_t);
252static int dc_ifmedia_upd(struct ifnet *);
253static void dc_ifmedia_sts(struct ifnet *, struct ifmediareq *);
254
255static void dc_delay(struct dc_softc *);
256static void dc_eeprom_idle(struct dc_softc *);
257static void dc_eeprom_putbyte(struct dc_softc *, int);
258static void dc_eeprom_getword(struct dc_softc *, int, u_int16_t *);
259static void dc_eeprom_getword_pnic(struct dc_softc *, int, u_int16_t *);

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

3756
3757 return (0);
3758}
3759
3760/*
3761 * Stop all chip I/O so that the kernel's probe routines don't
3762 * get confused by errant DMAs when rebooting.
3763 */
252static int dc_ifmedia_upd(struct ifnet *);
253static void dc_ifmedia_sts(struct ifnet *, struct ifmediareq *);
254
255static void dc_delay(struct dc_softc *);
256static void dc_eeprom_idle(struct dc_softc *);
257static void dc_eeprom_putbyte(struct dc_softc *, int);
258static void dc_eeprom_getword(struct dc_softc *, int, u_int16_t *);
259static void dc_eeprom_getword_pnic(struct dc_softc *, int, u_int16_t *);

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

3756
3757 return (0);
3758}
3759
3760/*
3761 * Stop all chip I/O so that the kernel's probe routines don't
3762 * get confused by errant DMAs when rebooting.
3763 */
3764static void
3764static int
3765dc_shutdown(device_t dev)
3766{
3767 struct dc_softc *sc;
3768
3769 sc = device_get_softc(dev);
3770
3771 DC_LOCK(sc);
3772 dc_stop(sc);
3773 DC_UNLOCK(sc);
3765dc_shutdown(device_t dev)
3766{
3767 struct dc_softc *sc;
3768
3769 sc = device_get_softc(dev);
3770
3771 DC_LOCK(sc);
3772 dc_stop(sc);
3773 DC_UNLOCK(sc);
3774
3775 return (0);
3774}
3776}