freebsd-dev/sys/arm
Bjoern A. Zeeb 9c907eb913 bcm2835_sdhci.c: exit DMA if not enough data left to avoid timeout errors
In the DMA case, given we disable the data interrupts, we never seem
to get DATA_END.  Given we are relying on DMA interrupts we are not
using the SDHCI state machine and hence only call into
sdhci_platform_will_handle() for the first check of data.
We do not call "will handle" for any following round trips of the same
transaction if block size * count > BCM_DMA_BLOCK_SIZE.
Manually check "left" in the DMA interrupt handler to see if we have at
least another full BCM_DMA_BLOCK_SIZE to handle.
Without this change we would DMA that and then even start a DMA with
left == 0 which would lead to a timeout and error.
Now we re-enable data interrupts and return and let the SDHCI generic
interrupt handler and state machine pick the SPACE_AVAIL up and then
find that it should punt to the pio_handler for the remaining bytes
or finish the data transaction.

With this change block mode seems to work beyond 7 * 64byte blocks,
which worked as it was below BCM_DMA_BLOCK_SIZE.

MFC after:		2 weeks
Differential Revision:	https://reviews.freebsd.org/D20199
2019-06-08 16:15:00 +00:00
..
allwinner arm: allwinner: Remove frac mode from NM clk 2019-05-23 17:36:55 +00:00
altera/socfpga arm: Add kern_clocksource.c directly in files.arm 2019-04-16 20:04:22 +00:00
amlogic/aml8726 Include eventhandler.h in more compilation units 2019-05-21 01:18:43 +00:00
annapurna/alpine arm: Add kern_clocksource.c directly in files.arm 2019-04-16 20:04:22 +00:00
arm Replace uses of vm_page_unwire(m, PQ_NONE) with vm_page_unwire_noq(m). 2019-06-07 18:23:29 +00:00
broadcom/bcm2835 bcm2835_sdhci.c: exit DMA if not enough data left to avoid timeout errors 2019-06-08 16:15:00 +00:00
cloudabi32 Remove sv_pagesize, originally introduced with r100384. 2019-03-01 16:16:38 +00:00
conf Remove IPSEC from GENERIC due to performance issues 2019-05-09 22:38:15 +00:00
freescale Release the bus-recovery gpio pins in detach(), so that unload then 2019-05-23 14:21:23 +00:00
include Implement the ffs and fls functions, and their longer counterparts, in 2019-05-28 15:47:00 +00:00
mv Extract eventfilter declarations to sys/_eventfilter.h 2019-05-20 00:38:23 +00:00
nvidia Replace uses of vm_page_unwire(m, PQ_NONE) with vm_page_unwire_noq(m). 2019-06-07 18:23:29 +00:00
qemu arm: Add kern_clocksource.c directly in files.arm 2019-04-16 20:04:22 +00:00
ralink arm: Add kern_clocksource.c directly in files.arm 2019-04-16 20:04:22 +00:00
rockchip Include eventhandler.h in more compilation units 2019-05-21 01:18:43 +00:00
samsung/exynos arm: Add kern_clocksource.c directly in files.arm 2019-04-16 20:04:22 +00:00
ti Include eventhandler.h in more compilation units 2019-05-21 01:18:43 +00:00
versatile Extract eventfilter declarations to sys/_eventfilter.h 2019-05-20 00:38:23 +00:00
xilinx arm: Add kern_clocksource.c directly in files.arm 2019-04-16 20:04:22 +00:00