Supriya Karanth
39287076e4
usb: musb: Reselect index reg in interrupt context
...
musb INDEX register is getting modified/corrupted during temporary
un-locking in a SMP system. Set this register with proper value
after re-acquiring the lock
Scenario:
---------
CPU1 is handling a data transfer completion interrupt received for
the CLASS1 EP
CPU2 is handling a CLASS2 thread which is queuing data to musb for
transfer
Below is the error sequence:
CPU1 | CPU2
--------------------------------------------------------------------
Data transfer completion inter- |
rupt recieved. |
|
musb INDEX reg set to CLASS1 EP |
|
musb LOCK is acquired. |
|
| CLASS2 thread queues data.
|
| CLASS2 thread tries to acquire musb
| LOCK but lock is already taken by
| CLASS1, so CLASS2 thread is
| spinning.
|
From Interrupt Context musb |
giveback function is called |
|
The giveback function releases | CLASS2 thread now acquires LOCK
LOCK |
|
ClASS1 Request's completion cal-| ClASS2 schedules the data transfer and
lback is called | sets the MUSB INDEX to Class2 EP number
|
Interrupt handler for CLASS1 EP |
tries to acquire LOCK and is |
spinning |
|
Interrupt for Class1 EP acquires| Class2 completes the scheduling etc and
the MUSB LOCK | releases the musb LOCK
|
Interrupt for Class1 EP schedul-|
es the next data transfer |
but musb INDEX register is still|
set to CLASS2 EP |
Since the MUSB INDEX register is set to a different endpoint, we
read and modify the wrong registers. Hence data transfer will not
happen properly. This results in unpredictable behavior
So, the MUSB INDEX register is set to proper value again when
interrupt re-acquires the lock
Cc: stable@vger.kernel.org
Signed-off-by: Supriya Karanth <supriya.karanth@stericsson.com>
Signed-off-by: Praveena Nadahally <praveen.nadahally@stericsson.com>
Reviewed-by: srinidhi kasagar <srinidhi.kasagar@stericsson.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-24 12:23:02 +02:00
..
accessibility
module_param: make bool parameters really bool (drivers & misc)
2012-01-13 09:32:20 +10:30
acpi
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
2012-01-18 15:51:48 -08:00
amba
Merge branch 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
2012-01-08 13:10:57 -08:00
ata
[libata] ata_piix: Add Toshiba Satellite Pro A120 to the quirks list
2012-01-17 20:50:53 -05:00
atm
module_param: make bool parameters really bool (drivers & misc)
2012-01-13 09:32:20 +10:30
auxdisplay
base
Merge branch 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
2012-01-16 15:02:30 -08:00
bcma
bcma: connect the bcma bus suspend/resume to the bcma driver suspend/resume
2012-01-17 09:54:08 -05:00
block
nvme: fix merge error due to change of 'make_request_fn' fn type
2012-01-18 15:41:27 -08:00
bluetooth
module_param: make bool parameters really bool (drivers & misc)
2012-01-13 09:32:20 +10:30
cdrom
block: add and use scsi_blk_cmd_ioctl
2012-01-14 15:07:24 -08:00
char
tpm: fix (ACPI S3) suspend regression
2012-01-18 15:50:17 -08:00
clk
clocksource
Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm
2012-01-06 18:15:25 -08:00
connector
cpufreq
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
2012-01-11 18:53:33 -08:00
cpuidle
crypto
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
2012-01-10 22:01:27 -08:00
dca
devfreq
dio
dma
Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
2012-01-17 18:40:24 -08:00
edac
module_param: make bool parameters really bool (drivers & misc)
2012-01-13 09:32:20 +10:30
eisa
firewire
module_param: make bool parameters really bool (drivers & misc)
2012-01-13 09:32:20 +10:30
firmware
Merge commit ' 0706802183' into stable/for-linus-fixes-3.3
2012-01-12 11:53:55 -05:00
gpio
gpio: tps65910: Use correct offset for gpio initialization
2012-01-18 13:48:43 -07:00
gpu
nouveau: Support Optimus models for vga_switcheroo
2012-01-13 09:09:15 +00:00
hid
module_param: make bool parameters really bool (drivers & misc)
2012-01-13 09:32:20 +10:30
hv
Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
2012-01-09 12:09:47 -08:00
hwmon
hwmon: (adm1031) Fix coding style issues
2012-01-16 22:51:48 +01:00
hwspinlock
i2c
Merge branches 'for-33/i2c/eg20t' and 'for-33/i2c/omap' into for-linus/i2c-33
2012-01-17 23:30:41 +00:00
ide
block: add and use scsi_blk_cmd_ioctl
2012-01-14 15:07:24 -08:00
idle
Merge branches 'einj', 'intel_idle', 'misc', 'srat' and 'turbostat-ivb' into release
2012-01-18 01:15:54 -05:00
ieee802154
infiniband
Merge branch 'for-next-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
2012-01-18 16:29:42 -08:00
input
Autogenerated GPG tag for Rusty D1ADB8F1: 15EE 8D6C AB0E 7F0C F999 BFCB D920 0E6C D1AD B8F1
2012-01-14 12:32:16 -08:00
iommu
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu
2012-01-10 11:08:21 -08:00
isdn
Autogenerated GPG tag for Rusty D1ADB8F1: 15EE 8D6C AB0E 7F0C F999 BFCB D920 0E6C D1AD B8F1
2012-01-14 12:32:16 -08:00
leds
Autogenerated GPG tag for Rusty D1ADB8F1: 15EE 8D6C AB0E 7F0C F999 BFCB D920 0E6C D1AD B8F1
2012-01-14 12:32:16 -08:00
lguest
lguest: Make sure interrupt is allocated ok by lguest_setup_irq
2012-01-12 15:44:47 +10:30
macintosh
module_param: make bool parameters really bool (drivers & misc)
2012-01-13 09:32:20 +10:30
mca
md
Merge branch 'for-3.3/core' of git://git.kernel.dk/linux-block
2012-01-15 12:24:45 -08:00
media
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
2012-01-18 12:53:54 -08:00
memstick
module_param: make bool parameters really bool (drivers & misc)
2012-01-13 09:32:20 +10:30
message
SCSI updates for post 3.2 merge window
2012-01-10 10:36:08 -08:00
mfd
Autogenerated GPG tag for Rusty D1ADB8F1: 15EE 8D6C AB0E 7F0C F999 BFCB D920 0E6C D1AD B8F1
2012-01-14 12:32:16 -08:00
misc
Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
2012-01-17 18:40:24 -08:00
mmc
Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
2012-01-17 18:40:24 -08:00
mtd
Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
2012-01-17 18:40:24 -08:00
net
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2012-01-17 22:26:41 -08:00
nfc
Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
2012-01-07 12:03:30 -08:00
nubus
of
2nd set of device tree changes for v3.3
2012-01-14 13:25:55 -08:00
oprofile
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2012-01-06 08:02:58 -08:00
parisc
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci
2012-01-11 18:50:26 -08:00
parport
Autogenerated GPG tag for Rusty D1ADB8F1: 15EE 8D6C AB0E 7F0C F999 BFCB D920 0E6C D1AD B8F1
2012-01-14 12:32:16 -08:00
pci
Merge branch 'for-linus' of git://selinuxproject.org/~jmorris/linux-security
2012-01-14 18:36:33 -08:00
pcmcia
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
2012-01-14 13:05:21 -08:00
pinctrl
platform
module_param: make bool parameters really bool (drivers & misc)
2012-01-13 09:32:20 +10:30
pnp
PNP: work around Dell 1536/1546 BIOS MMCONFIG bug that breaks USB
2012-01-06 12:11:20 -08:00
power
module_param: make bool parameters really bool (drivers & misc)
2012-01-13 09:32:20 +10:30
pps
ps3
ptp
rapidio
regulator
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
2012-01-13 20:43:32 -08:00
rtc
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
2012-01-13 20:43:32 -08:00
s390
module_param: make bool parameters really bool (drivers & misc)
2012-01-13 09:32:20 +10:30
sbus
scsi
SCSI updates on 20120118
2012-01-18 12:35:17 -08:00
sfi
sh
SH/R-Mobile updates for 3.3 merge window.
2012-01-11 23:29:20 -08:00
sn
spi
Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
2012-01-17 18:40:24 -08:00
ssb
staging
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
2012-01-15 12:49:56 -08:00
target
tc
telephony
thermal
tty
Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
2012-01-17 18:40:24 -08:00
uio
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci
2012-01-11 18:50:26 -08:00
usb
usb: musb: Reselect index reg in interrupt context
2012-02-24 12:23:02 +02:00
uwb
Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
2012-01-09 12:09:47 -08:00
vhost
vhost-net: add module alias (v2.1)
2012-01-13 10:12:23 -08:00
video
Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
2012-01-17 18:40:24 -08:00
virt
virtio
virtio: balloon: Add freeze, restore handlers to support S4
2012-01-12 15:44:47 +10:30
vlynq
w1
watchdog
module_param: make bool parameters really bool (drivers & misc)
2012-01-13 09:32:20 +10:30
xen
xen: using EXPORT_SYMBOL requires including export.h
2012-01-18 15:37:49 -08:00
zorro
Kconfig
Makefile
mmc: sdhci-pci: add platform data
2012-01-11 23:58:47 -05:00