Deleted Added
full compact
if_lge.c (166901) if_lge.c (173839)
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:

--- 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 <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:

--- 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/lge/if_lge.c 166901 2007-02-23 12:19:07Z piso $");
35__FBSDID("$FreeBSD: head/sys/dev/lge/if_lge.c 173839 2007-11-22 02:45:00Z yongari $");
36
37/*
38 * Level 1 LXT1001 gigabit ethernet driver for FreeBSD. Public
39 * documentation not available, but ask me nicely.
40 *
41 * The Level 1 chip is used on some D-Link, SMC and Addtron NICs.
42 * It's a 64-bit PCI part that supports TCP/IP checksum offload,
43 * VLAN tagging/insertion, GMII and TBI (1000baseX) ports. There

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

133static void lge_tick(void *);
134static void lge_start(struct ifnet *);
135static void lge_start_locked(struct ifnet *);
136static int lge_ioctl(struct ifnet *, u_long, caddr_t);
137static void lge_init(void *);
138static void lge_init_locked(struct lge_softc *);
139static void lge_stop(struct lge_softc *);
140static void lge_watchdog(struct ifnet *);
36
37/*
38 * Level 1 LXT1001 gigabit ethernet driver for FreeBSD. Public
39 * documentation not available, but ask me nicely.
40 *
41 * The Level 1 chip is used on some D-Link, SMC and Addtron NICs.
42 * It's a 64-bit PCI part that supports TCP/IP checksum offload,
43 * VLAN tagging/insertion, GMII and TBI (1000baseX) ports. There

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

133static void lge_tick(void *);
134static void lge_start(struct ifnet *);
135static void lge_start_locked(struct ifnet *);
136static int lge_ioctl(struct ifnet *, u_long, caddr_t);
137static void lge_init(void *);
138static void lge_init_locked(struct lge_softc *);
139static void lge_stop(struct lge_softc *);
140static void lge_watchdog(struct ifnet *);
141static void lge_shutdown(device_t);
141static int lge_shutdown(device_t);
142static int lge_ifmedia_upd(struct ifnet *);
143static void lge_ifmedia_upd_locked(struct ifnet *);
144static void lge_ifmedia_sts(struct ifnet *, struct ifmediareq *);
145
146static void lge_eeprom_getword(struct lge_softc *, int, u_int16_t *);
147static void lge_read_eeprom(struct lge_softc *, caddr_t, int, int, int);
148
149static int lge_miibus_readreg(device_t, int, int);

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

1574
1575 return;
1576}
1577
1578/*
1579 * Stop all chip I/O so that the kernel's probe routines don't
1580 * get confused by errant DMAs when rebooting.
1581 */
142static int lge_ifmedia_upd(struct ifnet *);
143static void lge_ifmedia_upd_locked(struct ifnet *);
144static void lge_ifmedia_sts(struct ifnet *, struct ifmediareq *);
145
146static void lge_eeprom_getword(struct lge_softc *, int, u_int16_t *);
147static void lge_read_eeprom(struct lge_softc *, caddr_t, int, int, int);
148
149static int lge_miibus_readreg(device_t, int, int);

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

1574
1575 return;
1576}
1577
1578/*
1579 * Stop all chip I/O so that the kernel's probe routines don't
1580 * get confused by errant DMAs when rebooting.
1581 */
1582static void
1582static int
1583lge_shutdown(dev)
1584 device_t dev;
1585{
1586 struct lge_softc *sc;
1587
1588 sc = device_get_softc(dev);
1589
1590 LGE_LOCK(sc);
1591 lge_reset(sc);
1592 lge_stop(sc);
1593 LGE_UNLOCK(sc);
1594
1583lge_shutdown(dev)
1584 device_t dev;
1585{
1586 struct lge_softc *sc;
1587
1588 sc = device_get_softc(dev);
1589
1590 LGE_LOCK(sc);
1591 lge_reset(sc);
1592 lge_stop(sc);
1593 LGE_UNLOCK(sc);
1594
1595 return;
1595 return (0);
1596}
1596}