Deleted Added
full compact
if_wb.c (183714) if_wb.c (194023)
1/*-
2 * Copyright (c) 1997, 1998
3 * Bill Paul <wpaul@ctr.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
3 * Bill Paul <wpaul@ctr.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/wb/if_wb.c 183714 2008-10-09 02:25:18Z peter $");
34__FBSDID("$FreeBSD: head/sys/dev/wb/if_wb.c 194023 2009-06-11 17:14:28Z avg $");
35
36/*
37 * Winbond fast ethernet PCI NIC driver
38 *
39 * Supports various cheap network adapters based on the Winbond W89C840F
40 * fast ethernet controller chip. This includes adapters manufactured by
41 * Winbond itself and some made by Linksys.
42 *

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

154static void wb_tick(void *);
155static void wb_start(struct ifnet *);
156static void wb_start_locked(struct ifnet *);
157static int wb_ioctl(struct ifnet *, u_long, caddr_t);
158static void wb_init(void *);
159static void wb_init_locked(struct wb_softc *);
160static void wb_stop(struct wb_softc *);
161static void wb_watchdog(struct ifnet *);
35
36/*
37 * Winbond fast ethernet PCI NIC driver
38 *
39 * Supports various cheap network adapters based on the Winbond W89C840F
40 * fast ethernet controller chip. This includes adapters manufactured by
41 * Winbond itself and some made by Linksys.
42 *

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

154static void wb_tick(void *);
155static void wb_start(struct ifnet *);
156static void wb_start_locked(struct ifnet *);
157static int wb_ioctl(struct ifnet *, u_long, caddr_t);
158static void wb_init(void *);
159static void wb_init_locked(struct wb_softc *);
160static void wb_stop(struct wb_softc *);
161static void wb_watchdog(struct ifnet *);
162static void wb_shutdown(device_t);
162static int wb_shutdown(device_t);
163static int wb_ifmedia_upd(struct ifnet *);
164static void wb_ifmedia_sts(struct ifnet *, struct ifmediareq *);
165
166static void wb_eeprom_putbyte(struct wb_softc *, int);
167static void wb_eeprom_getword(struct wb_softc *, int, u_int16_t *);
168static void wb_read_eeprom(struct wb_softc *, caddr_t, int, int, int);
169static void wb_mii_sync(struct wb_softc *);
170static void wb_mii_send(struct wb_softc *, u_int32_t, int);

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

1827
1828 return;
1829}
1830
1831/*
1832 * Stop all chip I/O so that the kernel's probe routines don't
1833 * get confused by errant DMAs when rebooting.
1834 */
163static int wb_ifmedia_upd(struct ifnet *);
164static void wb_ifmedia_sts(struct ifnet *, struct ifmediareq *);
165
166static void wb_eeprom_putbyte(struct wb_softc *, int);
167static void wb_eeprom_getword(struct wb_softc *, int, u_int16_t *);
168static void wb_read_eeprom(struct wb_softc *, caddr_t, int, int, int);
169static void wb_mii_sync(struct wb_softc *);
170static void wb_mii_send(struct wb_softc *, u_int32_t, int);

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

1827
1828 return;
1829}
1830
1831/*
1832 * Stop all chip I/O so that the kernel's probe routines don't
1833 * get confused by errant DMAs when rebooting.
1834 */
1835static void
1835static int
1836wb_shutdown(dev)
1837 device_t dev;
1838{
1839 struct wb_softc *sc;
1840
1841 sc = device_get_softc(dev);
1842
1843 WB_LOCK(sc);
1844 wb_stop(sc);
1845 WB_UNLOCK(sc);
1846
1836wb_shutdown(dev)
1837 device_t dev;
1838{
1839 struct wb_softc *sc;
1840
1841 sc = device_get_softc(dev);
1842
1843 WB_LOCK(sc);
1844 wb_stop(sc);
1845 WB_UNLOCK(sc);
1846
1847 return;
1847 return (0);
1848}
1848}