Deleted Added
full compact
if_vr.c (172555) if_vr.c (173839)
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/vr/if_vr.c 172555 2007-10-12 03:32:55Z yongari $");
34__FBSDID("$FreeBSD: head/sys/dev/vr/if_vr.c 173839 2007-11-22 02:45:00Z yongari $");
35
36/*
37 * VIA Rhine fast ethernet PCI NIC driver
38 *
39 * Supports various network adapters based on the VIA Rhine
40 * and Rhine II PCI controllers, including the D-Link DFE530TX.
41 * Datasheets are available at http://www.via.com.tw.
42 *

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

181static void vr_intr(void *);
182static void vr_start(struct ifnet *);
183static void vr_start_locked(struct ifnet *);
184static int vr_ioctl(struct ifnet *, u_long, caddr_t);
185static void vr_init(void *);
186static void vr_init_locked(struct vr_softc *);
187static void vr_stop(struct vr_softc *);
188static void vr_watchdog(struct ifnet *);
35
36/*
37 * VIA Rhine fast ethernet PCI NIC driver
38 *
39 * Supports various network adapters based on the VIA Rhine
40 * and Rhine II PCI controllers, including the D-Link DFE530TX.
41 * Datasheets are available at http://www.via.com.tw.
42 *

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

181static void vr_intr(void *);
182static void vr_start(struct ifnet *);
183static void vr_start_locked(struct ifnet *);
184static int vr_ioctl(struct ifnet *, u_long, caddr_t);
185static void vr_init(void *);
186static void vr_init_locked(struct vr_softc *);
187static void vr_stop(struct vr_softc *);
188static void vr_watchdog(struct ifnet *);
189static void vr_shutdown(device_t);
189static int vr_shutdown(device_t);
190static int vr_ifmedia_upd(struct ifnet *);
191static void vr_ifmedia_sts(struct ifnet *, struct ifmediareq *);
192
193static int vr_mii_readreg(const struct vr_softc *, struct vr_mii_frame *);
194static int vr_mii_writereg(const struct vr_softc *, const struct vr_mii_frame *);
195static int vr_miibus_readreg(device_t, uint16_t, uint16_t);
196static int vr_miibus_writereg(device_t, uint16_t, uint16_t, uint16_t);
197static void vr_miibus_statchg(device_t);

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

1590 bzero((char *)&sc->vr_ldata->vr_tx_list,
1591 sizeof(sc->vr_ldata->vr_tx_list));
1592}
1593
1594/*
1595 * Stop all chip I/O so that the kernel's probe routines don't
1596 * get confused by errant DMAs when rebooting.
1597 */
190static int vr_ifmedia_upd(struct ifnet *);
191static void vr_ifmedia_sts(struct ifnet *, struct ifmediareq *);
192
193static int vr_mii_readreg(const struct vr_softc *, struct vr_mii_frame *);
194static int vr_mii_writereg(const struct vr_softc *, const struct vr_mii_frame *);
195static int vr_miibus_readreg(device_t, uint16_t, uint16_t);
196static int vr_miibus_writereg(device_t, uint16_t, uint16_t, uint16_t);
197static void vr_miibus_statchg(device_t);

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

1590 bzero((char *)&sc->vr_ldata->vr_tx_list,
1591 sizeof(sc->vr_ldata->vr_tx_list));
1592}
1593
1594/*
1595 * Stop all chip I/O so that the kernel's probe routines don't
1596 * get confused by errant DMAs when rebooting.
1597 */
1598static void
1598static int
1599vr_shutdown(device_t dev)
1600{
1601
1602 vr_detach(dev);
1599vr_shutdown(device_t dev)
1600{
1601
1602 vr_detach(dev);
1603
1604 return (0);
1603}
1605}