Deleted Added
full compact
if_ste.c (170794) if_ste.c (173839)
1/*-
2 * Copyright (c) 1997, 1998, 1999
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, 1999
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/pci/if_ste.c 170794 2007-06-15 21:45:41Z thompsa $");
34__FBSDID("$FreeBSD: head/sys/pci/if_ste.c 173839 2007-11-22 02:45:00Z yongari $");
35
36#ifdef HAVE_KERNEL_OPTION_HEADERS
37#include "opt_device_polling.h"
38#endif
39
40#include <sys/param.h>
41#include <sys/systm.h>
42#include <sys/sockio.h>

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

104static void ste_stats_update(void *);
105static void ste_stop(struct ste_softc *);
106static void ste_reset(struct ste_softc *);
107static int ste_ioctl(struct ifnet *, u_long, caddr_t);
108static int ste_encap(struct ste_softc *, struct ste_chain *, struct mbuf *);
109static void ste_start(struct ifnet *);
110static void ste_start_locked(struct ifnet *);
111static void ste_watchdog(struct ifnet *);
35
36#ifdef HAVE_KERNEL_OPTION_HEADERS
37#include "opt_device_polling.h"
38#endif
39
40#include <sys/param.h>
41#include <sys/systm.h>
42#include <sys/sockio.h>

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

104static void ste_stats_update(void *);
105static void ste_stop(struct ste_softc *);
106static void ste_reset(struct ste_softc *);
107static int ste_ioctl(struct ifnet *, u_long, caddr_t);
108static int ste_encap(struct ste_softc *, struct ste_chain *, struct mbuf *);
109static void ste_start(struct ifnet *);
110static void ste_start_locked(struct ifnet *);
111static void ste_watchdog(struct ifnet *);
112static void ste_shutdown(device_t);
112static int ste_shutdown(device_t);
113static int ste_newbuf(struct ste_softc *, struct ste_chain_onefrag *,
114 struct mbuf *);
115static int ste_ifmedia_upd(struct ifnet *);
116static void ste_ifmedia_upd_locked(struct ifnet *);
117static void ste_ifmedia_sts(struct ifnet *, struct ifmediareq *);
118
119static void ste_mii_sync(struct ste_softc *);
120static void ste_mii_send(struct ste_softc *, u_int32_t, int);

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

1731
1732 if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
1733 ste_start_locked(ifp);
1734 STE_UNLOCK(sc);
1735
1736 return;
1737}
1738
113static int ste_newbuf(struct ste_softc *, struct ste_chain_onefrag *,
114 struct mbuf *);
115static int ste_ifmedia_upd(struct ifnet *);
116static void ste_ifmedia_upd_locked(struct ifnet *);
117static void ste_ifmedia_sts(struct ifnet *, struct ifmediareq *);
118
119static void ste_mii_sync(struct ste_softc *);
120static void ste_mii_send(struct ste_softc *, u_int32_t, int);

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

1731
1732 if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
1733 ste_start_locked(ifp);
1734 STE_UNLOCK(sc);
1735
1736 return;
1737}
1738
1739static void
1739static int
1740ste_shutdown(dev)
1741 device_t dev;
1742{
1743 struct ste_softc *sc;
1744
1745 sc = device_get_softc(dev);
1746
1747 STE_LOCK(sc);
1748 ste_stop(sc);
1749 STE_UNLOCK(sc);
1750
1740ste_shutdown(dev)
1741 device_t dev;
1742{
1743 struct ste_softc *sc;
1744
1745 sc = device_get_softc(dev);
1746
1747 STE_LOCK(sc);
1748 ste_stop(sc);
1749 STE_UNLOCK(sc);
1750
1751 return;
1751 return (0);
1752}
1752}