f23a5f2c03
buffers (ie, >4GB on amd64.) The underlying problem was that PREREAD doesn't sync the mbuf with the DMA memory (ie, bounce buffer), so the bounce buffer may have had stale information. Thus it was always considering the buffer completed and things just went off the rails. This change does the following: * Make ath_rx_pkt() always consume the mbuf somehow; it no longer passes error mbufs (eg CRC errors, crypt errors, etc) back up to the RX path to recycle. This means that a new mbuf is always allocated each time, but it's cleaner. * Push the RX buffer map/unmap to occur in the RX path, not ath_rx_pkt(). Thus, ath_rx_pkt() now assumes (a) it has to consume the mbuf somehow, and (b) that it's already been unmapped and synced. * For the legacy path, the descriptor isn't mapped, it comes out of coherent, DMA memory anyway. So leave it there. * For the EDMA path, the RX descriptor has to be cleared before its passed to the hardware, so that when we check with a POSTREAD sync, we actually get either a blank (not finished) or a filled out descriptor (finished.) Otherwise we get stale data in the DMA memory. * .. so, for EDMA RX path, we need PREREAD|PREWRITE to sync the data -> DMA memory, then POSTREAD|POSTWRITE to finish syncing the DMA memory -> data. * Whilst we're here, make sure that in EDMA buffer setup (ie, bzero'ing the descriptor part) is done before the mbuf is map/synched. NOTE: there's been a lot of commits besides this one with regards to tidying up the busdma handling in ath(4). Please check the recent commit history. Discussed with and thanks to: scottl Tested: * AR5416 (non-EDMA) on i386, with the DMA tag for the driver set to 2^^30, not 2^^32, STA * AR9580 (EDMA) on i386, as above, STA * User - tested AR9380 on amd64 with 32GB RAM. PR: kern/177530 |
||
---|---|---|
.. | ||
ath_dfs/null | ||
ath_hal | ||
ath_rate | ||
ah_osdep.c | ||
ah_osdep.h | ||
if_ath_ahb.c | ||
if_ath_alq.c | ||
if_ath_alq.h | ||
if_ath_beacon.c | ||
if_ath_beacon.h | ||
if_ath_debug.c | ||
if_ath_debug.h | ||
if_ath_keycache.c | ||
if_ath_keycache.h | ||
if_ath_led.c | ||
if_ath_led.h | ||
if_ath_misc.h | ||
if_ath_pci.c | ||
if_ath_rx_edma.c | ||
if_ath_rx_edma.h | ||
if_ath_rx.c | ||
if_ath_rx.h | ||
if_ath_spectral.c | ||
if_ath_spectral.h | ||
if_ath_sysctl.c | ||
if_ath_sysctl.h | ||
if_ath_tdma.c | ||
if_ath_tdma.h | ||
if_ath_tsf.h | ||
if_ath_tx_edma.c | ||
if_ath_tx_edma.h | ||
if_ath_tx_ht.c | ||
if_ath_tx_ht.h | ||
if_ath_tx.c | ||
if_ath_tx.h | ||
if_ath.c | ||
if_athdfs.h | ||
if_athioctl.h | ||
if_athrate.h | ||
if_athvar.h |