summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormux <mux@FreeBSD.org>2003-04-08 13:05:11 +0000
committermux <mux@FreeBSD.org>2003-04-08 13:05:11 +0000
commite105056ea61ca6ae4a0e93115e8916181e93be8b (patch)
treea55606f6d756a3a7cf1075042d70608d4beb630e /sys
parent8b0dbc5c038a9c2cbe548449f01d3f810ec9193e (diff)
downloadFreeBSD-src-e105056ea61ca6ae4a0e93115e8916181e93be8b.zip
FreeBSD-src-e105056ea61ca6ae4a0e93115e8916181e93be8b.tar.gz
Fix the hangs people have been seeing. For some reason, the
atomic operation change caused this, so backout it until I can figure out what's wrong with it.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/fxp/if_fxp.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index 06bc6a0..e7adfd1 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$");
#include <net/ethernet.h>
#include <net/if_arp.h>
-#include <machine/atomic.h>
#include <machine/clock.h> /* for DELAY */
#include <net/if_types.h>
@@ -1208,7 +1207,7 @@ static void
fxp_start(struct ifnet *ifp)
{
struct fxp_softc *sc = ifp->if_softc;
- struct fxp_tx *txp, *last;
+ struct fxp_tx *txp;
struct mbuf *mb_head;
int error;
@@ -1378,21 +1377,18 @@ fxp_start(struct ifnet *ifp)
* Advance the end of list forward.
*/
+#ifdef __alpha__
/*
* On platforms which can't access memory in 16-bit
* granularities, we must prevent the card from DMA'ing
* up the status while we update the command field.
* This could cause us to overwrite the completion status.
- *
- * This is a bit tricky, because we want to avoid using
- * atomic operations on 16bits values, since they may not
- * be available on any architecture or may be very
- * inefficient.
*/
- last = sc->fxp_desc.tx_last;
- atomic_clear_32((u_int32_t *)&last->tx_cb->cb_status,
- htobe32(bswap16(FXP_CB_COMMAND_S)));
-
+ atomic_clear_short(&sc->fxp_desc.tx_last->tx_cb->cb_command,
+ FXP_CB_COMMAND_S);
+#else
+ sc->fxp_desc.tx_last->tx_cb->cb_command &= ~FXP_CB_COMMAND_S;
+#endif /*__alpha__*/
sc->fxp_desc.tx_last = txp;
/*
OpenPOWER on IntegriCloud