From 92a4a5bb36353989fb1e67aaf3858273929777f5 Mon Sep 17 00:00:00 2001 From: Sylvestre Gallon Date: Wed, 24 Mar 2010 13:45:32 +0100 Subject: [PATCH] Allow nfe and xl to compile without DEVICE_POLLING. --- sys/dev/netif/nfe/if_nfe.c | 4 +++- sys/dev/netif/xl/if_xl.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/dev/netif/nfe/if_nfe.c b/sys/dev/netif/nfe/if_nfe.c index 333e4b7..5149e96 100644 --- a/sys/dev/netif/nfe/if_nfe.c +++ b/sys/dev/netif/nfe/if_nfe.c @@ -109,6 +109,7 @@ static void nfe_miibus_statchg(device_t); #ifdef DEVICE_POLLING static void nfe_poll(struct ifnet *, enum poll_cmd, int); +static void nfe_disable_intrs(struct nfe_softc *); #endif static void nfe_intr(void *); static int nfe_ioctl(struct ifnet *, u_long, caddr_t, struct ucred *); @@ -150,7 +151,6 @@ static int nfe_newbuf_std(struct nfe_softc *, struct nfe_rx_ring *, int, static int nfe_newbuf_jumbo(struct nfe_softc *, struct nfe_rx_ring *, int, int); static void nfe_enable_intrs(struct nfe_softc *); -static void nfe_disable_intrs(struct nfe_softc *); static int nfe_sysctl_imtime(SYSCTL_HANDLER_ARGS); @@ -2435,6 +2435,7 @@ nfe_enable_intrs(struct nfe_softc *sc) sc->sc_flags &= ~NFE_F_IRQ_TIMER; } +#ifdef DEVICE_POLLING static void nfe_disable_intrs(struct nfe_softc *sc) { @@ -2442,3 +2443,4 @@ nfe_disable_intrs(struct nfe_softc *sc) NFE_WRITE(sc, NFE_IRQ_MASK, 0); sc->sc_flags &= ~NFE_F_IRQ_TIMER; } +#endif diff --git a/sys/dev/netif/xl/if_xl.c b/sys/dev/netif/xl/if_xl.c index 2309ba1..e66e6a4 100644 --- a/sys/dev/netif/xl/if_xl.c +++ b/sys/dev/netif/xl/if_xl.c @@ -219,7 +219,6 @@ static void xl_txeoc (struct xl_softc *); static void xl_intr (void *); static void xl_start_body (struct ifnet *, int); static void xl_start (struct ifnet *); -static void xl_start_poll (struct ifnet *); static void xl_start_90xB (struct ifnet *); static int xl_ioctl (struct ifnet *, u_long, caddr_t, struct ucred *); @@ -227,6 +226,7 @@ static void xl_init (void *); static void xl_stop (struct xl_softc *); static void xl_watchdog (struct ifnet *); #ifdef DEVICE_POLLING +static void xl_start_poll (struct ifnet *); static void xl_poll (struct ifnet *, enum poll_cmd, int); #endif static void xl_enable_intrs (struct xl_softc *, uint16_t); @@ -2492,11 +2492,13 @@ xl_start(struct ifnet *ifp) xl_start_body(ifp, 1); } +#ifdef DEVICE_POLLING static void xl_start_poll(struct ifnet *ifp) { xl_start_body(ifp, 0); } +#endif /* * Main transmit routine. To avoid having to do mbuf copies, we put pointers -- 1.7.7.2