diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2012-08-23 10:34:26 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2012-08-23 10:34:26 +0000 |
commit | 5d08f5f9ffcaeeb829a2999aeb7b792dec799040 (patch) | |
tree | d1eca4dfff3937b08b97f803652f126468b0ef57 /sys/dev/ic/rt2661reg.h | |
parent | f12cfd0741501425174a54e5a303f740d4ce222b (diff) |
Fix a race in rt2661 Tx interrupt processing which can cause Tx processing
to get stuck with OACTIVE set, requiring 'ifconfig ral0 down up' to unwedge.
Make space in the Tx queue from the rt2661_tx_dma_intr() handler,
rather than waiting until rt2661_tx_intr() is run. The latter function
now collects AMRR statistics only. AMRR node allocation is now separated
from ieee80211_node allocation to make this possible.
This commit also brings back the separation of OACTIVE flags for management
and data Tx queues which I reverted in the previous commit.
Inspired by ral commits by sephe@dragonflybsd and patch submission to
misc@ by Roland Dreier http://marc.info/?l=openbsd-misc&m=125895269930106&w=2
Tested by myself, edd, jsg, Tobias Ulmer, Pieter Verberne, Tim van der Molen.
Diffstat (limited to 'sys/dev/ic/rt2661reg.h')
-rw-r--r-- | sys/dev/ic/rt2661reg.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/ic/rt2661reg.h b/sys/dev/ic/rt2661reg.h index 50f84f6b985..8822fc5e5cf 100644 --- a/sys/dev/ic/rt2661reg.h +++ b/sys/dev/ic/rt2661reg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2661reg.h,v 1.11 2010/02/14 09:20:34 damien Exp $ */ +/* $OpenBSD: rt2661reg.h,v 1.12 2012/08/23 10:34:25 stsp Exp $ */ /*- * Copyright (c) 2006 @@ -189,7 +189,9 @@ #define RT2661_TX_STAT_VALID (1 << 0) #define RT2661_TX_RESULT(v) (((v) >> 1) & 0x7) #define RT2661_TX_RETRYCNT(v) (((v) >> 4) & 0xf) -#define RT2661_TX_QID(v) (((v) >> 8) & 0xf) +/* Driver-private data written before TX and read back when TX completes. + * We store the driver-private ID of an AMRR node in here. */ +#define RT2661_TX_PRIV_DATA(v) (((v) >> 8) & 0xff) #define RT2661_TX_SUCCESS 0 #define RT2661_TX_RETRY_FAIL 6 @@ -245,7 +247,7 @@ struct rt2661_tx_desc { uint32_t eiv; uint8_t offset; - uint8_t qid; + uint8_t priv_data; #define RT2661_QID_MGT 13 uint8_t txpower; |