Date: Wed, 14 Apr 2010 01:09:14 +0000 (UTC) From: Pyun YongHyeon <yongari@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r206576 - stable/7/sys/dev/msk Message-ID: <201004140109.o3E19EwI019172@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yongari Date: Wed Apr 14 01:09:14 2010 New Revision: 206576 URL: http://svn.freebsd.org/changeset/base/206576 Log: MFC r206364: Partial revert r204545. Just relying on status LE ownership of status block seems to cause poor performance. Always read current status index register first and then check status ownership as we had before. Accessing status index register seems to trigger immediate status update if controller have pending status updates. Reported by: Andre Albsmeier <Andre.Albsmeier <> siemens dot com> Tested by: Andre Albsmeier <Andre.Albsmeier <> siemens dot com> Modified: stable/7/sys/dev/msk/if_msk.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/msk/if_msk.c ============================================================================== --- stable/7/sys/dev/msk/if_msk.c Wed Apr 14 00:50:18 2010 (r206575) +++ stable/7/sys/dev/msk/if_msk.c Wed Apr 14 01:09:14 2010 (r206576) @@ -3327,6 +3327,9 @@ msk_handle_events(struct msk_softc *sc) uint32_t control, status; int cons, len, port, rxprog; + if (sc->msk_stat_cons == CSR_READ_2(sc, STAT_PUT_IDX)) + return (0); + /* Sync status LEs. */ bus_dmamap_sync(sc->msk_stat_tag, sc->msk_stat_map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); @@ -3407,7 +3410,7 @@ msk_handle_events(struct msk_softc *sc) if (rxput[MSK_PORT_B] > 0) msk_rxput(sc->msk_if[MSK_PORT_B]); - return (rxprog > sc->msk_process_limit ? EAGAIN : 0); + return (sc->msk_stat_cons != CSR_READ_2(sc, STAT_PUT_IDX)); } static void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004140109.o3E19EwI019172>