1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-01 12:19:28 +00:00
freebsd/sys/dev
Adrian Chadd 629ce2188a Implement "holding buffers" per TX queue rather than globally.
When working on TDMA, Sam Leffler found that the MAC DMA hardware
would re-read the last TX descriptor when getting ready to transmit
the next one.  Thus the whole ATH_BUF_BUSY came into existance -
the descriptor must be left alone (very specifically the link pointer
must be maintained) until the hardware has moved onto the next frame.

He saw this in TDMA because the MAC would be frequently stopping during
active transmit (ie, when it wasn't its turn to transmit.)

Fast-forward to today.  It turns out that this is a problem not with
a single MAC DMA instance, but with each QCU (from 0->9).  They each
maintain separate descriptor pointers and will re-read the last
descriptor when starting to transmit the next.

So when your AP is busy transmitting from multiple TX queues, you'll
(more) frequently see one QCU stopped, waiting for a higher-priority QCU
to finsh transmitting, before it'll go ahead and continue.  If you mess
up the descriptor (ie by freeing it) then you're short of luck.

Thanks to rpaulo for sticking with me whilst I diagnosed this issue
that he was quite reliably triggering in his environment.

This is a reimplementation; it doesn't have anything in common with
the ath9k or the Qualcomm Atheros reference driver.

Now - it in theory doesn't apply on the EDMA chips, as long as you
push one complete frame into the FIFO at a time.  But the MAC can DMA
from a list of frames pushed into the hardware queue (ie, you concat
'n' frames together with link pointers, and then push the head pointer
into the TXQ FIFO.)  Since that's likely how I'm going to implement
CABQ handling in hostap mode, it's likely that I will end up teaching
the EDMA TX completion code about busy buffers, just to be "sure"
this doesn't creep up.

Tested - iperf ap->sta and sta->ap (with both sides running this code):

* AR5416 STA
* AR9160/AR9220 hostap

To validate that it doesn't break the EDMA (FIFO) chips:

* AR9380, AR9485, AR9462 STA

Using iperf with the -S <tos byte decimal value> to set the TCP client
side DSCP bits, mapping to different TIDs and thus different TX queues.

TODO:

* Make this work on the EDMA chips, if we end up pushing lists of frames
  to the hardware (eg how we eventually will handle cabq in hostap/ibss
  mode.)
2013-03-14 06:20:02 +00:00
..
aac Initialize count in order to appease clang. 2013-03-01 22:09:08 +00:00
acpi_support Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
acpica Add "else" missed at r248154. 2013-03-11 17:29:09 +00:00
adb Use uiomove return value instead of returning 0. 2012-11-13 06:03:43 +00:00
adlink Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
advansys Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
ae
age Rework jumbo frame handling. QAC confirmed that the controller 2013-02-05 00:37:45 +00:00
agp Switch the vm_object mutex to be a rwlock. This will enable in the 2013-03-09 02:32:23 +00:00
aha Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
ahb Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
ahci Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
aic Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
aic7xxx Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
alc Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
ale Make sure to stop both TX and RX MACs in ale_stop_mac(). Previously 2012-12-17 06:01:57 +00:00
altera MFP4 change 219820 2013-01-22 18:51:14 +00:00
amdsbwd Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
amdtemp Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
amr Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
an Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
arcmsr Refresh vendor driver version which adds ARC-1224 support. 2013-02-28 04:16:47 +00:00
asmc
asr
ata Fix command timeout caused by data underrun during fetching ATAPI sense 2013-02-22 21:43:21 +00:00
ath Implement "holding buffers" per TX queue rather than globally. 2013-03-14 06:20:02 +00:00
atkbdc Pass the device_t into atkbd_{probe,attach}_unit and get the 2013-01-11 21:42:23 +00:00
auxio Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
bce Initialize count in order to appease clang. 2013-03-01 22:05:20 +00:00
bfe Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
bge r241438 broke IPMI access on Sun Fire X2200 M2(BCM5715). 2013-03-13 01:40:01 +00:00
bktr Clean some 'svn:executable' properties in the tree. 2013-01-26 22:08:21 +00:00
bm Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
buslogic Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
bvm
bwi Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
bwn Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
bxe This fixes a out-of-order problem with several 2013-02-07 15:20:54 +00:00
cardbus
cas - Move reporting of failures to disable RX/TX MAC under bootverbose as at 2013-03-01 20:51:53 +00:00
ce Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
cesa
cfe
cfi Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
ciss The 5300 series ciss(4) board does not work in performant mode with our 2013-02-25 19:22:56 +00:00
cm Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
cmx
coretemp Mark the coretemp(4) sysctls as MPSAFE, ensuring that Giant won't be held 2013-02-18 22:47:16 +00:00
cp Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
cpuctl
cpufreq Add a quirk to disable this driver for certain older laptops with an ICH2 2013-02-26 18:30:47 +00:00
cs Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
ct
ctau Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
cx Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
cxgb Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
cxgbe cxgbe(4): Report unusual out of band errors from the firmware. 2013-02-26 21:25:17 +00:00
cy
dc Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
dcons MFcalloutng: 2013-02-19 18:22:25 +00:00
de Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
digi Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
dpms
dpt Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
drm Switch the vm_object mutex to be a rwlock. This will enable in the 2013-03-09 02:32:23 +00:00
drm2 Switch the vm_object mutex to be a rwlock. This will enable in the 2013-03-09 02:32:23 +00:00
e1000 Refresh on the shared code for the E1000 drivers. 2013-02-21 00:25:45 +00:00
ed Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
eisa
en Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
ep Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
esp
et Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
etherswitch
ex Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
exca
fatm Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
fb
fdc Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
fdt Bump per-device interrupt limit to more reasonable default. 2013-02-23 22:58:04 +00:00
fe Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
filemon
firewire bus_dmamap_load_ccb doesn't exist on earlier versions of FreeBSD or 2013-02-21 17:50:21 +00:00
flash
fxp Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
gem Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
glxiic
glxsb
gpio Style fixes 2012-11-23 19:20:38 +00:00
gxemul Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
hatm Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
hifn Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
hme Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
hpt27xx Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
hptiop Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
hptmv Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
hptrr Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
hwpmc Switch the vm_object mutex to be a rwlock. This will enable in the 2013-03-09 02:32:23 +00:00
ic Add support for A10 uart. 2013-03-01 01:42:31 +00:00
ichsmb Add Intel Lynx Point PCH SMBus Device IDs 2013-01-02 22:01:26 +00:00
ichwd Don't log a message when the watchdog is reloaded. It's not useful to do so 2013-03-09 15:04:44 +00:00
ida
ie Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
ieee488
if_ndis Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
iicbus Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
iir Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
io
ipmi
ips
ipw Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
isci Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
iscsi/initiator Finish r243882: mechanically substitute flags from historic mbuf 2013-03-12 08:59:51 +00:00
isf Merge Perforce changeset 219952 to head: 2013-01-13 16:57:11 +00:00
isp Remove redundant xpt_alloc_ccb in isp_target_thread that was causing leakage. 2013-02-26 21:37:12 +00:00
ispfw
iwi Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
iwn Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
ixgb Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
ixgbe Fix a small, but important bug, a task drain was mistakenly 2013-03-04 23:15:07 +00:00
jme Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
joy
kbd
kbdmux
ksyms
le Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
led MFcalloutng: 2013-02-19 19:25:50 +00:00
lge Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
lindev
lmc Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
malo Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
mc146818
mca
mcd The other giant locked storage drivers have removed splbio(), for the 2013-02-21 02:34:04 +00:00
md Switch the vm_object mutex to be a rwlock. This will enable in the 2013-03-09 02:32:23 +00:00
mem
mfi Fix a typo in mfi_stp_cmd() that would give wrong assignment. 2013-03-01 23:18:20 +00:00
mge Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
mii Recognize 5720S PHY and treat it as 5708S PHY. 2012-12-20 05:02:12 +00:00
mk48txx
mlx
mly Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
mmc Fix highest voltage detection 2013-01-21 23:24:16 +00:00
mn Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
mps Replace the TDP_NOSLEEPING flag with a counter so that the 2013-03-01 22:03:31 +00:00
mpt Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
mse
msk RX checksum offloading on old Yukon controllers seem to cause more 2013-02-27 05:03:35 +00:00
mvs Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
mwl Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
mxge Several cleanups and fixes to mxge: 2013-02-25 16:22:40 +00:00
my Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
nand Add the chip used in recent GlobalScale Technologies *Plug computers 2013-01-27 00:16:36 +00:00
ncv
netmap Switch the vm_object mutex to be a rwlock. This will enable in the 2013-03-09 02:32:23 +00:00
nfe Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
nge Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
nmdm
nsp
null
nvd
nve Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
nvme Fix GCC build: 2013-03-07 22:54:28 +00:00
nvram
nvram2env Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
nxge Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
oce Eliminate excessive $FreeBSD$ headers. 2013-03-08 18:08:12 +00:00
ofw
patm Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
pbio
pccard
pccbb
pcf
pci - Complete r231621 by also blacklisting the bridge used by VMware for PCIe 2013-03-02 15:54:02 +00:00
pcn Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
pdq Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
powermac_nvram
ppbus
ppc Fix build. 2013-02-21 12:40:52 +00:00
pst
pty
puc - Apparently, r186520 was just wrong and the clock of Oxford OX16PCI958 is 2013-03-01 20:16:06 +00:00
qlxgb Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
quicc
ral Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
random MFcalloutng (r236314 by mav): 2013-03-04 16:16:23 +00:00
rc
re Disable TX IP header checksum offloading on RL_HWREV_8168CP. The 2013-03-13 02:11:45 +00:00
rndtest
rp
rt Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
safe Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
sbni Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
scc
scd
sdhci Add hooks for plugging platform-provided transfer backend. 2013-02-28 19:43:14 +00:00
sec
sf Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
sfxge Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
sge Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
si Remove incorrect comment about splsoftclock. 2013-02-21 07:19:50 +00:00
siba
siis Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
sio Add support for CIR1000 - Cirrus Logic V34 to the sio driver 2012-11-13 20:38:55 +00:00
sis Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
sk Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
smbus
smc Disable interrupts in filter in order to avoid interrupt storm and 2012-12-13 03:33:01 +00:00
sn Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
snc Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
snp
sound Add quirk for Lenovo T530 headphone redirection. 2013-03-13 20:35:51 +00:00
speaker
spibus
ste Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
stg
stge Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
streams
sym Don't try and negotiate sync mode if either period or offset are zero. 2013-02-25 14:06:24 +00:00
syscons MFcalloutng (r244249, r244306 by mav): 2013-03-04 14:00:58 +00:00
tdfx
terasic Merge Perforce changeset 219952 to head: 2013-01-13 16:57:11 +00:00
ti Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
tl Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
tpm
trm Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
tsec Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
twa Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
twe
tws Fix typo. 2013-03-01 15:48:31 +00:00
tx Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
txp Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
uart Add support for A10 uart. 2013-03-01 01:42:31 +00:00
ubsec Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
usb Fix typo. 2013-03-13 15:42:04 +00:00
utopia
vge Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
viawd
virtio Only set the barrier flag if the feature was negotiated 2013-03-05 07:00:05 +00:00
vkbd
vr Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
vte Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
vx Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
vxge Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
watchdog watchdogd(8) and watchdog(4) enhancements. 2013-02-27 19:03:31 +00:00
wb Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
wbwd Add ID for Nuvoton WPCM450RA0BX found on Supermicro X9SCA-F motherboards. 2013-01-11 10:22:09 +00:00
wds Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
wi Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
wl Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
wpi Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
wtap wtap should not set the IEEE80211_F_DATAPAD flag; 2012-12-18 16:15:20 +00:00
xe Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00
xen Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
xl Mechanically substitute flags from historic mbuf allocator with 2012-12-04 09:32:43 +00:00