linux/drivers
Ben Nizette 6aed4ee9b4 atmel_spi: fix dma addr calculation for len > BUFFER_SIZE
If len > BUFFER_LEN and !xfer->rx_buf we end up calculating the tx buffer
address as

*tx_dma = xfer->tx_dma + xfer->len - BUFFER_SIZE;

which is constant; i.e.  we just send the last BUFFER_SIZE data over again
until we've reached the right number of bytes.

This patch gets around this by using the /requested/ length when
calculating addresses.

Note there's no way len != *plen when we calculate the rx buffer address
but conceptually we should be using *plen and I don't want someone to come
through later, see the calculations for rx and tx are different and "clean
up" back to what we had.

Signed-off-by: Ben Nizette <bn@niasdigital.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2009-12-17 08:57:07 -07:00
..
accessibility
acpi Merge branch 'misc' into release 2009-10-15 00:47:13 -04:00
amba
ata sata_mv: Prevent PIO commands to be defered too long if traffic in progress. 2009-10-16 06:22:46 -04:00
atm
auxdisplay
base PM: Remove some debug messages producing too much noise 2009-11-03 11:18:18 +01:00
block loop: fix NULL dereference if mount fails 2009-10-29 07:39:27 -07:00
bluetooth
cdrom
char tty: Mark generic_serial users as BROKEN 2009-10-30 14:43:12 -07:00
clocksource
connector
cpufreq
cpuidle cpuidle: always return with interrupts enabled 2009-10-29 07:39:31 -07:00
crypto
dca
dio
dma
edac edac: i5100 fix initialization code 2009-10-29 07:39:30 -07:00
eisa
firewire Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2009-10-14 15:36:19 -07:00
firmware
gpio twl4030-gpio: remove __devexit markings from remove func 2009-10-29 07:39:30 -07:00
gpu i915: fix intel graphics suspend breakage due to resume/lid event confusion 2009-11-02 09:29:55 -08:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2009-10-13 10:10:33 -07:00
hwmon Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging 2009-10-29 08:14:58 -07:00
i2c i2c-mpc: Do not generate STOP after read. 2009-11-02 23:28:47 +00:00
ide Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6 2009-10-29 09:22:34 -07:00
idle
ieee1394 headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
ieee802154
infiniband headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
input Input: gpio-keys - use IRQF_SHARED 2009-11-02 22:12:37 -08:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2009-10-29 09:22:08 -07:00
leds
lguest headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
macintosh powerpc/pmac: Fix issues with sleep on some powerbooks 2009-10-14 16:58:35 +11:00
mca
md Merge branch 'for-linus' of git://neil.brown.name/md 2009-10-31 12:12:19 -07:00
media headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
memstick
message headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
mfd mfd: Do not dereference null pointer in twl4030 error path 2009-10-27 00:20:33 +01:00
misc headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
mmc mmc: fix missing module license declaration in of_mmc_spi.c 2009-11-04 22:43:35 -07:00
mtd UBI: fix check on unsigned long 2009-10-20 10:13:49 +03:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2009-11-03 07:44:01 -08:00
nubus
of of: Remove nested function 2009-10-15 09:58:27 -06:00
oprofile
parisc
parport
pci Revert "PCI: get larger bridge ranges when space is available" 2009-10-27 09:39:18 -07:00
pcmcia PM / yenta: Split resume into early and late parts (rev. 4) 2009-11-03 10:54:58 +01:00
platform Merge branch 'misc' into release 2009-10-15 00:47:13 -04:00
pnp
power
pps
ps3
rapidio
regulator
rtc headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
s390 Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6 2009-10-31 12:14:56 -07:00
sbus
scsi dpt_i2o: Fix typo of EINVAL 2009-10-31 12:11:38 -07:00
serial Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2009-11-03 07:44:01 -08:00
sfi
sh
sn
spi atmel_spi: fix dma addr calculation for len > BUFFER_SIZE 2009-12-17 08:57:07 -07:00
ssb
staging Staging: fix wireless drivers depends 2009-10-30 14:47:44 -07:00
tc
telephony
thermal
uio headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
usb USB: fsl_udc_core: Fix kernel oops on module removal 2009-10-30 14:57:33 -07:00
uwb headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
video
virtio virtio: order used ring after used index read 2009-10-29 08:50:37 +10:30
vlynq
w1
watchdog mpc52xx/wdt: remove obsolete old WDT implementation 2009-12-08 14:42:28 -07:00
xen
zorro
Kconfig
Makefile