From owner-svn-src-user@FreeBSD.ORG Thu Nov 15 16:42:13 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 78662DC9; Thu, 15 Nov 2012 16:42:13 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5EEF88FC0C; Thu, 15 Nov 2012 16:42:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFGgDM5019149; Thu, 15 Nov 2012 16:42:13 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFGgDZx019148; Thu, 15 Nov 2012 16:42:13 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201211151642.qAFGgDZx019148@svn.freebsd.org> From: Andre Oppermann Date: Thu, 15 Nov 2012 16:42:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r243090 - user/andre/tcp_workqueue/sys/dev/fxp X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 16:42:13 -0000 Author: andre Date: Thu Nov 15 16:42:12 2012 New Revision: 243090 URL: http://svnweb.freebsd.org/changeset/base/243090 Log: Remove traditional polling code. Modified: user/andre/tcp_workqueue/sys/dev/fxp/if_fxp.c Modified: user/andre/tcp_workqueue/sys/dev/fxp/if_fxp.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/fxp/if_fxp.c Thu Nov 15 16:01:49 2012 (r243089) +++ user/andre/tcp_workqueue/sys/dev/fxp/if_fxp.c Thu Nov 15 16:42:12 2012 (r243090) @@ -33,11 +33,6 @@ __FBSDID("$FreeBSD$"); /* * Intel EtherExpress Pro/100B PCI Fast Ethernet driver */ - -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_device_polling.h" -#endif - #include #include #include @@ -860,11 +855,6 @@ fxp_attach(device_t dev) ifp->if_capenable |= IFCAP_WOL_MAGIC; } -#ifdef DEVICE_POLLING - /* Inform the world we support polling. */ - ifp->if_capabilities |= IFCAP_POLLING; -#endif - /* * Attach the interface. */ @@ -1003,11 +993,6 @@ fxp_detach(device_t dev) { struct fxp_softc *sc = device_get_softc(dev); -#ifdef DEVICE_POLLING - if (sc->ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(sc->ifp); -#endif - FXP_LOCK(sc); /* * Stop DMA and drop transmit queue, but disable interrupts first. @@ -1630,44 +1615,6 @@ fxp_encap(struct fxp_softc *sc, struct m return (0); } -#ifdef DEVICE_POLLING -static poll_handler_t fxp_poll; - -static int -fxp_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) -{ - struct fxp_softc *sc = ifp->if_softc; - uint8_t statack; - int rx_npkts = 0; - - FXP_LOCK(sc); - if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { - FXP_UNLOCK(sc); - return (rx_npkts); - } - - statack = FXP_SCB_STATACK_CXTNO | FXP_SCB_STATACK_CNA | - FXP_SCB_STATACK_FR; - if (cmd == POLL_AND_CHECK_STATUS) { - uint8_t tmp; - - tmp = CSR_READ_1(sc, FXP_CSR_SCB_STATACK); - if (tmp == 0xff || tmp == 0) { - FXP_UNLOCK(sc); - return (rx_npkts); /* nothing to do */ - } - tmp &= ~statack; - /* ack what we can */ - if (tmp != 0) - CSR_WRITE_1(sc, FXP_CSR_SCB_STATACK, tmp); - statack |= tmp; - } - rx_npkts = fxp_intr_body(sc, ifp, statack, count); - FXP_UNLOCK(sc); - return (rx_npkts); -} -#endif /* DEVICE_POLLING */ - /* * Process interface interrupts. */ @@ -2540,15 +2487,6 @@ fxp_init_body(struct fxp_softc *sc, int /* * Enable interrupts. */ -#ifdef DEVICE_POLLING - /* - * ... but only do that if we are not polling. And because (presumably) - * the default is interrupts on, we need to disable them explicitly! - */ - if (ifp->if_capenable & IFCAP_POLLING ) - CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, FXP_SCB_INTR_DISABLE); - else -#endif /* DEVICE_POLLING */ CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, 0); /* @@ -2864,27 +2802,6 @@ fxp_ioctl(struct ifnet *ifp, u_long comm case SIOCSIFCAP: reinit = 0; mask = ifp->if_capenable ^ ifr->ifr_reqcap; -#ifdef DEVICE_POLLING - if (mask & IFCAP_POLLING) { - if (ifr->ifr_reqcap & IFCAP_POLLING) { - error = ether_poll_register(fxp_poll, ifp); - if (error) - return(error); - FXP_LOCK(sc); - CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, - FXP_SCB_INTR_DISABLE); - ifp->if_capenable |= IFCAP_POLLING; - FXP_UNLOCK(sc); - } else { - error = ether_poll_deregister(ifp); - /* Enable interrupts in any case */ - FXP_LOCK(sc); - CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, 0); - ifp->if_capenable &= ~IFCAP_POLLING; - FXP_UNLOCK(sc); - } - } -#endif FXP_LOCK(sc); if ((mask & IFCAP_TXCSUM) != 0 && (ifp->if_capabilities & IFCAP_TXCSUM) != 0) {