android_kernel_samsung_a7y1.../drivers
Sowjanya Komatineni b23113f91c spi: tegra114: fix for unpacked mode transfers
[ Upstream commit 1a89ac5b91895127f7c586ec5075c3753ca25501 ]

Fixes: computation of actual bytes to fill/receive in/from FIFO in unpacked
mode when transfer length is not a multiple of requested bits per word.

unpacked mode transfers fails when the transfer includes partial bytes in
the last word.

Total words to be written/read to/from FIFO is computed based on transfer
length and bits per word. Unpacked mode includes 0 padding bytes for partial
words to align with bits per word and these extra bytes are also accounted
for calculating bytes left to transfer in the current driver.

This causes extra bytes access of tx/rx buffers along with buffer index
position crossing actual length where remain_len becomes negative and due to
unsigned type, negative value is a 32 bit representation of signed value
and transferred bytes never meets the actual transfer length resulting in
transfer timeout and a hang.

This patch fixes this with proper computation of the actual bytes to fill in
FIFO during transmit and the actual bytes to read from FIFO during receive
ignoring 0 padded bytes.

Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-07 13:41:14 +02:00
..
accessibility
acpi ACPI: PM: Avoid attaching ACPI PM domain to certain devices 2020-04-07 13:07:24 +02:00
amba
android ANDROID: binder: synchronize_rcu() when using POLLFREE. 2020-04-07 08:06:59 +02:00
ata libata: Ensure ata_port probe has completed before detach 2020-04-07 13:20:53 +02:00
atm atm: zatm: Fix empty body Clang warnings 2020-04-07 12:35:08 +02:00
auxdisplay
base x86/bugs: Add ITLB_MULTIHIT bug infrastructure 2020-04-07 12:00:26 +02:00
battery
battery_v2
bcma
block xen/blkfront: Adjust indentation in xlvbd_alloc_gendisk 2020-04-07 13:38:45 +02:00
bluetooth Bluetooth: btusb: fix PM leak in error case of setup 2020-04-07 13:24:51 +02:00
bts
bus
ccic
cdrom cdrom: respect device capabilities during opening action 2020-04-07 13:23:35 +02:00
char hwrng: omap3-rom - Call clk_disable_unprepare() on exit only if not idled 2020-04-07 13:20:24 +02:00
clk clk: armada-xp: fix refcount leak in axp_clk_init() 2020-04-07 13:40:01 +02:00
clocksource clocksource/drivers/sun5i: Fail gracefully when clock rate is unavailable 2020-04-07 13:40:44 +02:00
connector
cpufreq cpufreq: Register drivers only after CPU devices have been registered 2020-04-07 13:21:35 +02:00
cpuidle cpuidle: Do not unset the driver if it is there already 2020-04-07 13:07:18 +02:00
crypto crypto: vmx - Avoid weird build failures 2020-04-07 13:21:48 +02:00
dca
devfreq PM / devfreq: Don't fail devfreq_dev_release if not in list 2020-04-07 13:24:09 +02:00
dio
dma dmaengine: coh901318: Remove unused variable 2020-04-07 12:44:51 +02:00
dma-buf
edac EDAC/ghes: Fix grain calculation 2020-04-07 13:21:28 +02:00
eisa
extcon extcon: sm5502: Reset registers during initialization 2020-04-07 13:20:38 +02:00
fingerprint
firewire net: add annotations on hh->hh_len lockless accesses 2020-04-07 13:25:04 +02:00
firmware gsmi: Fix bug in append_to_eventlog sysfs handler 2020-04-07 12:34:33 +02:00
five
fmc
fpga
gator
gpio gpio: Fix error message on out-of-range GPIO in lookup table 2020-04-07 13:36:46 +02:00
gps
gpu drm/nouveau/pmu: don't print reply values if exec is false 2020-04-07 13:40:39 +02:00
gud
hid HID: hidraw, uhid: Always report EPOLLOUT 2020-04-07 13:36:12 +02:00
hsi
hv
hwmon hwmon: (pwm-fan) Silence error on probe deferral 2020-04-07 12:33:24 +02:00
hwspinlock
hwtracing stm class: Fix a double free of stm_source_device 2020-04-06 21:33:50 +02:00
i2c i2c: imx: don't print error message on probe defer 2020-04-07 12:45:01 +02:00
ide
idle
iio iio: imu: adis16480: assign bias value only if operation succeeded 2020-04-07 13:37:00 +02:00
infiniband RDMA/ocrdma: Fix out of bounds index check in query pkey 2020-04-07 13:40:05 +02:00
input Input: nomadik-ske-keypad - fix a loop timeout test 2020-04-07 13:39:41 +02:00
iommu iommu: Remove device link to group on failure 2020-04-07 13:36:44 +02:00
ipack
irqchip irqchip: ingenic: Error out if IRQ domain creation failed 2020-04-07 13:23:09 +02:00
isdn staging: gigaset: add endpoint-type sanity check 2020-04-07 13:06:29 +02:00
leds leds: leds-lp5562 allow firmware files up to the maximum length 2020-04-07 07:37:48 +02:00
lguest
lightnvm
macintosh macintosh/windfarm_smu_sat: Fix debug output 2020-04-07 12:35:02 +02:00
mailbox mailbox: handle failed named mailbox channel request 2020-04-06 20:13:46 +02:00
mcb
md block: fix an integer overflow in logical block size 2020-04-07 13:37:29 +02:00
media media: davinci-isif: avoid uninitialized variable use 2020-04-07 13:41:11 +02:00
memory memory: tegra: Fix integer overflow on tick value calculation 2020-04-06 18:14:02 +02:00
memstick memstick: jmb38x_ms: Fix an error handling path in 'jmb38x_ms_probe()' 2020-04-07 09:27:02 +02:00
message scsi: mptfusion: Fix double fetch bug in ioctl 2020-04-07 13:37:43 +02:00
mfd mfd: max8997: Enale irq-wakeup unconditionally 2020-04-07 12:35:27 +02:00
misc scsi: enclosure: Fix stale device oops with hot replug 2020-04-07 13:36:54 +02:00
mmc mmc: sdhci: Update the tuning failed messages to pr_debug level 2020-04-07 13:24:04 +02:00
motor
mtd mtd: spear_smi: Fix Write Burst mode 2020-04-07 13:06:47 +02:00
muic
net net: sh_eth: fix a missing check of of_get_phy_mode 2020-04-07 13:40:56 +02:00
nfc NFC: nxp-nci: Fix NULL pointer dereference after I2C communication error 2020-04-07 12:44:04 +02:00
ntb ntb: intel: fix return value for ndev_vec_mask() 2020-04-07 12:36:03 +02:00
nubus
nvdimm libnvdimm/btt: Fix a kmemdup failure check 2020-04-06 16:43:30 +02:00
nvme
nvmem nvmem: core: return error code instead of NULL from nvmem_device_get 2020-04-07 12:27:36 +02:00
of of: make PowerMac cache node search conditional on CONFIG_PPC_PMAC 2020-04-07 12:27:09 +02:00
oprofile
parisc parisc: Disable HP HSC-PCI Cards to prevent kernel crash 2020-04-07 07:39:52 +02:00
parport parport: load lowlevel driver if ports not found 2020-04-07 13:21:33 +02:00
pci PCI/MSI: Fix incorrect MSI-X masking on resume 2020-04-07 13:12:43 +02:00
pcmcia
perf
phy phy: renesas: rcar-gen2: Fix memory leak at error paths 2020-04-06 20:06:04 +02:00
pinctrl pinctrl: sh-pfc: sh73a0: Fix fsic_spdif pin groups 2020-04-07 13:40:29 +02:00
platform platform/x86: asus-wmi: Fix keyboard brightness cannot be set to 0 2020-04-07 13:36:58 +02:00
pnp
power PM / AVS: SmartReflex: NULL check before some freeing functions is not needed 2020-04-07 12:41:14 +02:00
powercap
pps drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl 2020-04-06 20:26:27 +02:00
ps3
ptp
pwm pwm: Clear chip_data in pwm_put() 2020-04-07 12:43:26 +02:00
rapidio
ras
regulator regulator: wm831x-dcdc: Fix list of wm831x_dcdc_ilim from mA to uA 2020-04-07 13:40:48 +02:00
remoteproc
reset
rpmsg
rtc rtc: pm8xxx: fix unintended sign extension 2020-04-07 13:40:22 +02:00
s390 scsi: zfcp: trace channel log even for FCP command responses 2020-04-07 13:07:37 +02:00
sbus
scsi scsi: megaraid_sas: reduce module load time 2020-04-07 13:40:52 +02:00
security/samsung/icdrv
sensorhub
sensors
sfi
sh
sn
soc soc: mediatek: pwrap: Zero initialize rdata in pwrap_init_cipher 2020-04-06 19:02:13 +02:00
spi spi: tegra114: fix for unpacked mode transfers 2020-04-07 13:41:14 +02:00
spmi
ssb ssb: Fix possible NULL pointer dereference in ssb_host_pcmcia_exit 2020-04-06 18:15:20 +02:00
staging staging: comedi: ni_mio_common: protect register write overflow 2020-04-07 13:39:16 +02:00
switch
target scsi: target: core: Fix a pr_debug() argument 2020-04-07 13:38:56 +02:00
tc
tee
thermal thermal: Fix deadlock in thermal thermal_zone_device_check 2020-04-07 12:46:09 +02:00
thunderbolt thunderbolt: Use 32-bit writes when writing ring producer/consumer 2020-04-07 09:27:58 +02:00
trace
tty tty: ipwireless: Fix potential NULL pointer dereference 2020-04-07 13:40:15 +02:00
uh
uio
usb cdc-wdm: pass return value of recover_from_urb_loss 2020-04-07 13:40:35 +02:00
uwb
vfio vfio_pci: Enable memory accesses before calling pci_map_rom 2020-04-07 13:40:33 +02:00
vhost vhost: make sure log_num < in_num 2020-04-06 21:35:05 +02:00
video fbdev: chipsfb: remove set but not used variable 'size' 2020-04-07 13:40:24 +02:00
virt drivers/virt/fsl_hypervisor.c: prevent integer overflow in ioctl 2020-04-06 17:01:49 +02:00
virtio virtio-balloon: fix managed page counts when migrating pages between zones 2020-04-07 13:06:49 +02:00
vision
vlynq
vme
w1 w1: fix the resume command API 2020-04-06 18:15:45 +02:00
watchdog watchdog: bcm2835_wdt: Fix module autoload 2020-04-06 21:33:14 +02:00
xen xen, cpu_hotplug: Prevent an out of bounds access 2020-04-07 13:40:54 +02:00
zorro
Kconfig
Makefile