svn commit: r206575 - stable/8/sys/dev/msk
Pyun YongHyeon
yongari at FreeBSD.org
Wed Apr 14 00:50:19 UTC 2010
Author: yongari
Date: Wed Apr 14 00:50:18 2010
New Revision: 206575
URL: http://svn.freebsd.org/changeset/base/206575
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/8/sys/dev/msk/if_msk.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
stable/8/sys/dev/xen/xenpci/ (props changed)
Modified: stable/8/sys/dev/msk/if_msk.c
==============================================================================
--- stable/8/sys/dev/msk/if_msk.c Wed Apr 14 00:50:09 2010 (r206574)
+++ stable/8/sys/dev/msk/if_msk.c Wed Apr 14 00:50:18 2010 (r206575)
@@ -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
More information about the svn-src-stable-8
mailing list