android_kernel_samsung_a7y1.../drivers
Lukas Wunner 3c2fbce8d1 net: ks8851: Dequeue RX packets explicitly
[ Upstream commit 536d3680fd2dab5c39857d62a3e084198fc74ff9 ]

The ks8851 driver lets the chip auto-dequeue received packets once they
have been read in full. It achieves that by setting the ADRFE flag in
the RXQCR register ("Auto-Dequeue RXQ Frame Enable").

However if allocation of a packet's socket buffer or retrieval of the
packet over the SPI bus fails, the packet will not have been read in
full and is not auto-dequeued. Such partial retrieval of a packet
confuses the chip's RX queue management:  On the next RX interrupt,
the first packet read from the queue will be the one left there
previously and this one can be retrieved without issues. But for any
newly received packets, the frame header status and byte count registers
(RXFHSR and RXFHBCR) contain bogus values, preventing their retrieval.

The chip allows explicitly dequeueing a packet from the RX queue by
setting the RRXEF flag in the RXQCR register ("Release RX Error Frame").
This could be used to dequeue the packet in case of an error, but if
that error is a failed SPI transfer, it is unknown if the packet was
transferred in full and was auto-dequeued or if it was only transferred
in part and requires an explicit dequeue. The safest approach is thus
to always dequeue packets explicitly and forgo auto-dequeueing.

Without this change, I've witnessed packet retrieval break completely
when an SPI DMA transfer fails, requiring a chip reset. Explicit
dequeueing magically fixes this and makes packet retrieval absolutely
robust for me.

The chip's documentation suggests auto-dequeuing and uses the RRXEF
flag only to dequeue error frames which the driver doesn't want to
retrieve. But that seems to be a fair-weather approach.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Cc: Frank Pavlic <f.pavlic@kunbus.de>
Cc: Ben Dooks <ben.dooks@codethink.co.uk>
Cc: Tristram Ha <Tristram.Ha@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin (Microsoft) <sashal@kernel.org>
2020-04-06 16:41:22 +02:00
..
accessibility A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
acpi ACPI / SBS: Fix GPE storm on recent MacBookPro's 2020-04-06 15:20:26 +02:00
amba A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
android A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ata A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
atm A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
auxdisplay A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
base A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
battery A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
battery_v2 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bcma A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
block Revert "block/loop: Use global lock for ioctl() operation." 2020-04-06 16:40:42 +02:00
bluetooth A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bts A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bus A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ccic A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cdrom cdrom: Fix race condition in cdrom_sysctl_register 2020-04-06 14:51:44 +02:00
char tpm/tpm_i2c_atmel: Return -E2BIG when the transfer is incomplete 2020-04-06 15:49:13 +02:00
clk A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
clocksource A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
connector A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpufreq A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpuidle A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
crypto crypto: crypto4xx - properly set IV after de- and encrypt 2020-04-06 15:49:07 +02:00
dca A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
devfreq A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dio A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dma dmaengine: tegra: avoid overflow of byte tracking 2020-04-06 14:52:41 +02:00
dma-buf A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
edac A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
eisa A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
extcon extcon: usb-gpio: Don't miss event during suspend/resume 2020-04-06 11:16:41 +02:00
fingerprint A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
firewire A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
firmware A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
five A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fmc A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fpga A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
gator A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
gpio gpio: gpio-omap: fix level interrupt idling 2020-04-06 14:22:12 +02:00
gps A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
gpu drm/dp/mst: Configure no_stop_bit correctly for remote i2c xfers 2020-04-06 14:52:43 +02:00
gud A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hid A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hsi A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hv A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hwmon A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hwspinlock A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hwtracing intel_th: gth: Fix an off-by-one in output unassigning 2020-04-06 16:40:30 +02:00
i2c i2c: core-smbus: prevent stack corruption on read I2C_BLOCK_DATA 2020-04-06 14:02:20 +02:00
ide A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
idle A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
iio io: accel: kxcjk1013: restore the range after resume. 2020-04-06 15:49:23 +02:00
infiniband IB/mlx4: Fix race condition between catas error reset and aliasguid flows 2020-04-06 15:17:00 +02:00
input A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
iommu iommu/dmar: Fix buffer overflow during PCI bus notification 2020-04-06 15:20:35 +02:00
ipack A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
irqchip A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
isdn mISDN: hfcpci: Test both vendor & device ID for Digium HFC4S 2020-04-06 12:57:02 +02:00
leds leds: lp55xx: fix null deref on firmware load failure 2020-04-06 14:51:15 +02:00
lguest A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lightnvm A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
macintosh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mailbox A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mcb A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
md bcache: improve sysfs_strtoul_clamp() 2020-04-06 14:51:38 +02:00
media media: s5p-jpeg: Check for fmt_ver_flag when doing fmt enumeration 2020-04-06 14:52:30 +02:00
memory A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
memstick A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
message A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mfd A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
misc A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mmc mmc: davinci: remove extraneous __init annotation 2020-04-06 15:17:03 +02:00
motor A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mtd A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
muic A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
net net: ks8851: Dequeue RX packets explicitly 2020-04-06 16:41:22 +02:00
nfc A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ntb A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nubus A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nvdimm A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nvme A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nvmem A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
of A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
oprofile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
parisc A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
parport A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pci PCI: Add function 1 DMA alias quirk for Marvell 9170 SATA controller 2020-04-06 15:16:46 +02:00
pcmcia A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
perf A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
phy A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pinctrl A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
platform A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pnp A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
power A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
powercap A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pps A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ps3 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ptp A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pwm A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
rapidio A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ras A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
regulator regulator: act8865: Fix act8600_sudcdc_voltage_ranges setting 2020-04-06 14:52:33 +02:00
remoteproc A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
reset A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
rpmsg A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
rtc rtc: Fix overflow when converting time64_t to rtc_time 2020-04-06 11:45:55 +02:00
s390 scsi: zfcp: fix scsi_eh host reset with port_forced ERP for non-NPIV FCP devices 2020-04-06 13:01:06 +02:00
sbus A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
scsi scsi: megaraid_sas: return error when create DMA pool failed 2020-04-06 14:50:51 +02:00
security/samsung/icdrv A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sensorhub A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sensors A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sfi A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sn A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
soc soc/tegra: fuse: Fix illegal free of IO base address 2020-04-06 14:52:17 +02:00
spi A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
spmi A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ssb A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
staging staging: comedi: ni_usb6501: Fix possible double-free of ->usb_rx_buf 2020-04-06 15:49:31 +02:00
switch A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
target A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tc A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tee A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
thermal thermal/int340x_thermal: fix mode setting 2020-04-06 15:17:09 +02:00
thunderbolt A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tty sc16is7xx: missing unregister/delete driver on error in sc16is7xx_init() 2020-04-06 16:41:13 +02:00
uh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
uio A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
usb usb: gadget: net2272: Fix net2272_dequeue() 2020-04-06 16:41:19 +02:00
uwb A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
vfio A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
vhost A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
video fbdev: fbmem: fix memory access if logo is bigger than the screen 2020-04-06 14:51:41 +02:00
virt A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
virtio A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
vision A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
vlynq A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
vme A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
w1 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
watchdog A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xen A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
zorro A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30