freebsd-skq/sys/dev
adrian f4dc64af6e Delay sequence number allocation for A-MPDU until just before the frame
is queued to the hardware.

Because multiple concurrent paths can execute ath_start(), multiple
concurrent paths can push frames into the software/hardware TX queue
and since preemption/interrupting can occur, there's the possibility
that a gap in time will occur between allocating the sequence number
and queuing it to the hardware.

Because of this, it's possible that a thread will have allocated a
sequence number and then be preempted by another thread doing the same.
If the second thread sneaks the frame into the BAW, the (earlier) sequence
number of the first frame will be now outside the BAW and will result
in the frame being constantly re-added to the tail of the queue.
There it will live until the sequence numbers cycle around again.

This also creates a hole in the RX BAW tracking which can also cause
issues.

This patch delays the sequence number allocation to occur only just before
the frame is going to be added to the BAW.  I've been wanting to do this
anyway as part of a general code tidyup but I've not gotten around to it.
This fixes the PR.

However, it still makes it quite difficult to try and ensure in-order
queuing and dequeuing of frames. Since multiple copies of ath_start()
can be run at the same time (eg one TXing process thread, one TX completion
task/one RX task) the driver may end up having frames dequeued and pushed
into the hardware slightly/occasionally out of order.

And, to make matters more annoying, net80211 may have the same behaviour -
in the non-aggregation case, the TX code allocates sequence numbers
before it's thrown to the driver.  I'll open another PR to investigate
this and potentially introduce some kind of final-pass TX serialisation
before frames are thrown to the hardware.  It's also very likely worthwhile
adding some debugging code into ath(4) and net80211 to catch when/if this
does occur.

PR:		kern/166190
2012-03-20 04:50:25 +00:00
..
aac Use bus_get_dma_tag() to inherit the PCI bus' 4G boundary constraint. 2012-03-07 18:52:46 +00:00
acpi_support Add missing MODULE_DEPEND() so that acpi.ko and aibs.ko can be 2012-02-28 15:12:26 +00:00
acpica ServerWorks HT1000 HPET reported to have problems with IRQs >= 16. 2012-03-10 21:08:07 +00:00
adb Add support for special keys (volume/brightness/eject) on Apple laptops with 2011-10-16 21:01:42 +00:00
adlink
advansys Final pass at having devices use their bus parent for dma tags. The 2012-03-12 19:29:35 +00:00
ae To send a frame, controller requires a prepended TX header and 2011-11-11 19:15:32 +00:00
age Close a race where SIOCGIFMEDIA ioctl get inconsistent link status. 2011-10-17 19:49:00 +00:00
agp
aha
ahb Remove a stale comment. 2012-03-12 20:31:58 +00:00
ahci Fix names of some Marvell SATA chips. It looks like chips with proprietary 2012-03-02 08:49:07 +00:00
aic
aic7xxx Remove comments about creating DMA tags as children of the DMA tags of their 2012-03-12 19:29:32 +00:00
alc Close a race where SIOCGIFMEDIA ioctl get inconsistent link status. 2011-10-17 19:49:00 +00:00
ale Close a race where SIOCGIFMEDIA ioctl get inconsistent link status. 2011-10-17 19:49:00 +00:00
amdsbwd amdsbwd: update to support SB8xx southbridges 2011-06-07 06:18:02 +00:00
amdtemp - Add support for Family 12h, 14h and 15h processors. 2012-02-24 00:02:46 +00:00
amr Convert a number of drivers to obtaining their parent DMA tag from their 2012-03-12 08:03:51 +00:00
an Convert a number of drivers to obtaining their parent DMA tag from their 2012-03-12 08:03:51 +00:00
arcmsr Convert a number of drivers to obtaining their parent DMA tag from their 2012-03-12 08:03:51 +00:00
asmc
asr Convert a number of drivers to obtaining their parent DMA tag from their 2012-03-12 08:03:51 +00:00
ata Fix names of some Marvell SATA chips. It looks like chips with proprietary 2012-03-02 08:49:07 +00:00
ath Delay sequence number allocation for A-MPDU until just before the frame 2012-03-20 04:50:25 +00:00
atkbdc Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
auxio
bce Rework link state tracking and remove superfluous link UP/DOWN 2011-12-13 18:11:25 +00:00
bfe ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again 2012-01-07 09:41:57 +00:00
bge Make if_ierrors updated whenever any of the following counters are 2012-03-12 03:47:30 +00:00
bktr Remove a few bits of FreeBSD 2.x compatibility code. 2011-11-14 18:21:27 +00:00
bm ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again 2012-01-07 09:41:57 +00:00
buslogic Remove comments about creating DMA tags as children of the DMA tags of their 2012-03-12 19:29:32 +00:00
bwi Fix some net80211 enum nits: 2011-12-17 10:23:17 +00:00
bwn Fix some net80211 enum nits: 2011-12-17 10:23:17 +00:00
bxe Convert a number of drivers to obtaining their parent DMA tag from their 2012-03-12 08:03:51 +00:00
cardbus - Add a bus_dma tag to each PCI bus that is a child of a Host-PCI bridge. 2012-03-02 20:38:04 +00:00
cas - There's no need to overwrite the default device method with the default 2011-11-22 21:28:20 +00:00
ce Fix clang warnings in sys/dev/ce/if_ce.c and sys/dev/cp/if_cp.c, 2011-12-29 17:46:24 +00:00
cesa Final pass at having devices use their bus parent for dma tags. The 2012-03-12 19:29:35 +00:00
cfe kern cons: introduce infrastructure for console grabbing by kernel 2011-12-17 15:08:43 +00:00
cfi Merge r221614,221696,221737,221840 from largeSMP project branch: 2011-05-22 20:55:54 +00:00
ciss Convert a number of drivers to obtaining their parent DMA tag from their 2012-03-12 08:03:51 +00:00
cm Replace inline static' by static inline'. 2011-12-13 14:06:01 +00:00
cmx
coretemp #PROCHOT assertion is sticky after reading the MSR (accordingly with 2011-09-19 10:58:30 +00:00
cp Fix clang warnings in sys/dev/ce/if_ce.c and sys/dev/cp/if_cp.c, 2011-12-29 17:46:24 +00:00
cpuctl Add VIA microde update support to cpuctl(4) and cpucontrol(8). 2011-12-12 12:30:44 +00:00
cpufreq
cs Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
ct
ctau
cx
cxgb Convert a number of drivers to obtaining their parent DMA tag from their 2012-03-12 08:03:51 +00:00
cxgbe Use the non-sleeping variang of t4_wr_mbox in code that can be called 2012-02-13 18:41:32 +00:00
cy
dc Use DEVMETHOD_END. 2011-11-23 20:27:26 +00:00
dcons kern cons: introduce infrastructure for console grabbing by kernel 2011-12-17 15:08:43 +00:00
de More conversions of drivers to use the PCI parent DMA tag. 2012-03-12 18:15:08 +00:00
digi
dpms
dpt Remove comments about creating DMA tags as children of the DMA tags of their 2012-03-12 19:29:32 +00:00
drm In sys/dev/drm/radeon_state.c, use the correct printf length modifiers 2011-12-30 02:07:50 +00:00
e1000 Properly handle failures in igb_setup_msix() by returning 0 if MSI or MSI-X 2012-03-01 22:13:10 +00:00
ed Fix off by one error in mbuf access. Previously it caused panic. 2011-12-05 18:10:43 +00:00
eisa - There's no need to overwrite the default device method with the default 2011-11-22 21:28:20 +00:00
en Final pass at having devices use their bus parent for dma tags. The 2012-03-12 19:29:35 +00:00
ep ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again 2012-01-07 09:41:57 +00:00
esp s/timout/timeout 2011-12-15 06:29:13 +00:00
et style. No functional changes. 2012-01-10 20:52:02 +00:00
ex Convert files to UTF-8 2012-01-15 13:23:18 +00:00
exca
fatm
fb Do not reuse the previous address when restoring linear frame buffer. 2012-03-19 17:14:12 +00:00
fdc Replace inline static' by static inline'. 2011-12-13 14:06:01 +00:00
fdt Respect phy-handle property in Ethernet nodes of the device tree. 2012-03-04 19:22:52 +00:00
fe Improve media status reporting, when the driver knows... 2012-01-30 22:47:02 +00:00
firewire Update sbp_targ such that it can actually handle multiple CTIO's during operation 2012-01-25 23:33:50 +00:00
flash Add a couple more SPI flash device IDs found in commercial 2012-01-04 04:17:03 +00:00
fxp Do not change current media when driver is already running. If 2012-03-19 02:10:40 +00:00
gem - There's no need to overwrite the default device method with the default 2011-11-22 21:28:20 +00:00
glxiic MFC 2011-05-16 16:34:03 +00:00
glxsb More conversions of drivers to use the PCI parent DMA tag. 2012-03-12 18:15:08 +00:00
gpio Fix broken locking that I introduced in the previous commit. 2011-12-20 03:25:11 +00:00
hatm More conversions of drivers to use the PCI parent DMA tag. 2012-03-12 18:15:08 +00:00
hifn Convert a number of drivers to obtaining their parent DMA tag from their 2012-03-12 08:03:51 +00:00
hme - There's no need to overwrite the default device method with the default 2011-11-22 21:28:20 +00:00
hpt27xx Remove spurious 8bit chars, turning files into plain ASCII. 2012-01-15 13:23:33 +00:00
hptiop Convert a number of drivers to obtaining their parent DMA tag from their 2012-03-12 08:03:51 +00:00
hptmv Convert a number of drivers to obtaining their parent DMA tag from their 2012-03-12 08:03:51 +00:00
hptrr - Just use cam_calc_geometry(9) on newer version of FreeBSD rather than 2011-11-23 21:43:51 +00:00
hwpmc - Remove unncessary type casts 2012-03-14 23:46:07 +00:00
ic
ichsmb - There's no need to overwrite the default device method with the default 2011-11-22 21:28:20 +00:00
ichwd Remove use of explicit bus space tags and handles and use methods that 2012-01-05 16:27:32 +00:00
ida Convert a number of drivers to obtaining their parent DMA tag from their 2012-03-12 08:03:51 +00:00
ie Isolate v_caddr_t in the ie driver. 2012-01-31 13:00:40 +00:00
ieee488 Convert files to UTF-8 2012-01-15 13:23:43 +00:00
if_ndis Convert a number of drivers to obtaining their parent DMA tag from their 2012-03-12 08:03:51 +00:00
iicbus Fix typo. 2012-03-02 18:18:14 +00:00
iir Remove comments about creating DMA tags as children of the DMA tags of their 2012-03-12 19:29:32 +00:00
io
ipmi Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
ips Convert a number of drivers to obtaining their parent DMA tag from their 2012-03-12 08:03:51 +00:00
ipw More conversions of drivers to use the PCI parent DMA tag. 2012-03-12 18:15:08 +00:00
isci Update PCI-IDs with devices found on Intel SDP 2012-02-27 17:04:18 +00:00
iscsi/initiator Remove direct access to si_name. 2012-02-10 12:35:57 +00:00
isp Fix memset sizeof 2012-02-22 01:08:59 +00:00
ispfw
iwi Fix wrong asresp frame parsing in iwi_checkforqos(). 2012-03-10 17:08:57 +00:00
iwn On state changes from RUN to anything else the AGGR sessions are 2012-01-27 17:39:02 +00:00
ixgb More conversions of drivers to use the PCI parent DMA tag. 2012-03-12 18:15:08 +00:00
ixgbe More conversions of drivers to use the PCI parent DMA tag. 2012-03-12 18:15:08 +00:00
jme - Remove attempts to implement setting of BMCR_LOOP/MIIF_NOLOOP 2011-05-03 19:51:29 +00:00
joy
kbd Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
kbdmux Restore binary compatibility for GIO_KEYMAP and PIO_KEYMAP. 2011-07-17 08:19:19 +00:00
ksyms Get rid of D_PSEUDO. 2011-10-18 08:09:44 +00:00
le Make sparc64 compatible with NEW_PCIB and enable it: 2011-10-02 23:22:38 +00:00
led
lge ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again 2012-01-07 09:41:57 +00:00
lindev
lmc More conversions of drivers to use the PCI parent DMA tag. 2012-03-12 18:15:08 +00:00
malo Fix some net80211 enum nits: 2011-12-17 10:23:17 +00:00
mc146818
mca - There's no need to overwrite the default device method with the default 2011-11-22 21:28:20 +00:00
mcd
md Document a large number of currently undocumented sysctls. While here 2011-12-13 00:38:50 +00:00
mem
mfi Convert a number of drivers to obtaining their parent DMA tag from their 2012-03-12 08:03:51 +00:00
mge More conversions of drivers to use the PCI parent DMA tag. 2012-03-12 18:15:08 +00:00
mii Prefer RL_GMEDIASTAT register to RGEPHY_MII_SSR register to 2012-02-28 05:23:29 +00:00
mk48txx Add support for MK48T37. 2011-05-15 13:17:08 +00:00
mlx Convert a number of drivers to obtaining their parent DMA tag from their 2012-03-12 08:03:51 +00:00
mly Convert a number of drivers to obtaining their parent DMA tag from their 2012-03-12 08:03:51 +00:00
mmc Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
mn
mps Make the mps(4) module depend on the cam module. 2012-03-07 22:39:11 +00:00
mpt Fix a problem that was causing the mpt(4) driver to attach to MegaRAID 2012-03-02 22:00:40 +00:00
mse
msk ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again 2012-01-07 09:41:57 +00:00
mvs Adjust mvs(4) to handle interrupt cause reg depending on the actual number of 2012-02-01 13:39:52 +00:00
mwl Fix some net80211 enum nits: 2011-12-17 10:23:17 +00:00
mxge More conversions of drivers to use the PCI parent DMA tag. 2012-03-12 18:15:08 +00:00
my ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again 2012-01-07 09:41:57 +00:00
ncv
netmap A bunch of netmap fixes: 2012-02-27 19:05:01 +00:00
nfe ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again 2012-01-07 09:41:57 +00:00
nge - There's no need to overwrite the default device method with the default 2011-11-22 21:28:20 +00:00
nmdm Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs. 2011-11-07 06:44:47 +00:00
nsp
null Fix for PR 138526. 2012-01-11 15:00:16 +00:00
nve More conversions of drivers to use the PCI parent DMA tag. 2012-03-12 18:15:08 +00:00
nvram
nvram2env
nxge Convert files to UTF-8 2012-01-15 13:23:43 +00:00
oce Use pci_find_cap() instead of pci_find_extcap() to locate PCI 2012-03-03 18:03:50 +00:00
ofw Make ofw_bus_get_node() consistently return -1 when there is no associated 2012-03-15 22:53:39 +00:00
patm More conversions of drivers to use the PCI parent DMA tag. 2012-03-12 18:15:08 +00:00
pbio
pccard Replace inline static' by static inline'. 2011-12-13 14:06:01 +00:00
pccbb Some laptops have weak power controllers that cannot tolerate multiple 2012-01-27 21:49:02 +00:00
pcf Make ofw_bus_get_node() consistently return -1 when there is no associated 2012-03-15 22:53:39 +00:00
pci Add a PCI quirk to ignore PCI map registers from configuration space. 2012-03-14 23:25:46 +00:00
pcn Fix logic error 2012-02-27 08:57:02 +00:00
pdq
powermac_nvram
ppbus Rename device_delete_all_children() into device_delete_children(). 2011-11-22 21:56:55 +00:00
ppc Rename device_delete_all_children() into device_delete_children(). 2011-11-22 21:56:55 +00:00
pst Convert files to UTF-8 2012-01-15 13:23:18 +00:00
pty Fix whitespace inconsistencies in the TTY layer and its drivers owned by me. 2011-06-26 18:26:20 +00:00
puc - There's no need to overwrite the default device method with the default 2011-11-22 21:28:20 +00:00
qlxgb ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again 2012-01-07 09:41:57 +00:00
quicc - There's no need to overwrite the default device method with the default 2011-11-22 21:28:20 +00:00
ral Fix some net80211 enum nits: 2011-12-17 10:23:17 +00:00
random Add support for the extended FPU states on amd64, both for native 2012-01-21 17:45:27 +00:00
rc
re Prefer RL_GMEDIASTAT register to RGEPHY_MII_SSR register to 2012-02-28 05:23:29 +00:00
rndtest Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
rp
rt ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again 2012-01-07 09:41:57 +00:00
safe More conversions of drivers to use the PCI parent DMA tag. 2012-03-12 18:15:08 +00:00
sbni
scc - There's no need to overwrite the default device method with the default 2011-11-22 21:28:20 +00:00
scd
sdhci Add support for RICOH R5CE823 card reader, that can be found in 2012-02-09 10:20:41 +00:00
sec - There's no need to overwrite the default device method with the default 2011-11-22 21:28:20 +00:00
sf Remove duplicate assignment of SF_IMR_RXDQ2_DMADONE bit 2012-02-27 08:55:32 +00:00
sfxge Update recently added drivers to use the if_*addr_r*lock() wrapper 2012-01-05 18:32:37 +00:00
sge - There's no need to overwrite the default device method with the default 2011-11-22 21:28:20 +00:00
si
siba Expand the set of APIs available for locating PCI capabilities: 2012-03-03 18:08:57 +00:00
siis Rename device_delete_all_children() into device_delete_children(). 2011-11-22 21:56:55 +00:00
sio kern cons: introduce infrastructure for console grabbing by kernel 2011-12-17 15:08:43 +00:00
sis ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again 2012-01-07 09:41:57 +00:00
sk ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again 2012-01-07 09:41:57 +00:00
smbus - There's no need to overwrite the default device method with the default 2011-11-22 21:28:20 +00:00
smc - Import the common MII bitbang'ing code from NetBSD and convert drivers to 2011-11-01 16:13:59 +00:00
sn ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again 2012-01-07 09:41:57 +00:00
snc ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again 2012-01-07 09:41:57 +00:00
snp Second-to-last commit implementing Capsicum capabilities in the FreeBSD 2011-08-11 12:30:23 +00:00
sound Add driver for the RME HDSPe AIO/RayDAT sound cards -- snd_hdspe(4). 2012-03-01 13:10:18 +00:00
speaker Do not define bool/true/false if the symbols already exist. 2011-12-12 18:43:24 +00:00
spibus Replace inline static' by static inline'. 2011-12-13 14:06:01 +00:00
ste - There's no need to overwrite the default device method with the default 2011-11-22 21:28:20 +00:00
stg
stge ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again 2012-01-07 09:41:57 +00:00
streams Add the fo_chown and fo_chmod methods to struct fileops and use them 2011-08-16 20:07:47 +00:00
sym Merge from r225950: 2011-10-07 08:59:54 +00:00
syscons Convert files to UTF-8 2012-01-15 13:23:18 +00:00
tdfx Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs. 2011-11-07 06:44:47 +00:00
ti Eliminate vestiges of page coloring. 2011-12-15 05:07:16 +00:00
tl ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again 2012-01-07 09:41:57 +00:00
tpm
trm More conversions of drivers to use the PCI parent DMA tag. 2012-03-12 18:15:08 +00:00
tsec Respect phy-handle property in Ethernet nodes of the device tree. 2012-03-04 19:22:52 +00:00
twa Use bus_get_dma_tag() to inherit the 4G boundary restriction from the 2012-03-07 18:53:56 +00:00
twe Convert a number of drivers to obtaining their parent DMA tag from their 2012-03-12 08:03:51 +00:00
tws Convert a number of drivers to obtaining their parent DMA tag from their 2012-03-12 08:03:51 +00:00
tx - Remove attempts to implement setting of BMCR_LOOP/MIIF_NOLOOP 2011-05-03 19:51:29 +00:00
txp
uart Add PCI Id for the AMT SOL UART on G4x series Intel chipsets. 2012-03-14 14:01:51 +00:00
ubsec More conversions of drivers to use the PCI parent DMA tag. 2012-03-12 18:15:08 +00:00
usb Add new USB device IDs. 2012-03-08 07:22:41 +00:00
utopia
vge Remove unused variable mii 2012-02-11 08:12:52 +00:00
viawd Correctly spell my email address. 2011-12-22 15:13:32 +00:00
virtio Use pci_find_cap() instead of pci_find_extcap() to locate PCI 2012-03-03 18:03:50 +00:00
vkbd Get rid of D_PSEUDO. 2011-10-18 08:09:44 +00:00
vr Announce flow control capability to PHY drivers and enable flow 2011-11-28 19:03:59 +00:00
vte Remove unused variable mii. 2011-11-23 05:34:01 +00:00
vx ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again 2012-01-07 09:41:57 +00:00
vxge Remove spurious 8bit chars, turning files into plain ASCII. 2012-01-15 13:23:54 +00:00
watchdog
wb ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again 2012-01-07 09:41:57 +00:00
wbwd Provide wbwd(4), a driver for the watchdog timer found on various 2012-03-06 18:44:52 +00:00
wds Final pass at having devices use their bus parent for dma tags. The 2012-03-12 19:29:35 +00:00
wi If an interrupt is received with no vap attached, just fail LINK events. 2012-02-25 08:01:29 +00:00
wl
wpi Fix some net80211 enum nits: 2011-12-17 10:23:17 +00:00
wtap Remove this - it's not needed as it's defined in ieee80211_freebsd.h. 2012-03-19 13:54:15 +00:00
xe Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
xen Final pass at having devices use their bus parent for dma tags. The 2012-03-12 19:29:35 +00:00
xl Use DEVMETHOD_END. 2011-11-23 20:27:26 +00:00