linux-stable/drivers
Bin Liu 4408149278 usb: musb: dsps: fix otg state machine
[ Upstream commit 6010abf2c2 ]

Due to lack of ID pin interrupt event on AM335x devices, the musb dsps
driver uses polling to detect usb device attach for dual-role port.

But in the case if a micro-A cable adapter is attached without a USB device
attached to the cable, the musb state machine gets stuck in a_wait_vrise
state waiting for the MUSB_CONNECT interrupt which won't happen due to the
usb device is not attached. The state is stuck in a_wait_vrise even after
the micro-A cable is detached, which could cause VBUS retention if then the
dual-role port is attached to a host port.

To fix the problem, make a_wait_vrise as a transient state, then move the
state to either a_wait_bcon for host port or a_idle state for dual-role
port, if no usb device is attached to the port.

Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-02-12 19:46:05 +01:00
..
accessibility
acpi ACPI: SPCR: Consider baud rate 0 as preconfigured state 2019-02-12 19:45:59 +01:00
amba
android binder: fix race that allows malicious free of live buffer 2018-12-05 19:41:26 +01:00
ata sata_rcar: fix deferred probing 2019-02-12 19:46:03 +01:00
atm
auxdisplay
base OPP: Use opp_table->regulators to verify no regulator case 2019-02-12 19:46:03 +01:00
bcma
block sunvdc: Do not spin in an infinite loop when vio_ldc_send() returns EAGAIN 2019-02-12 19:46:00 +01:00
bluetooth Bluetooth: btbcm: Add entry for BCM4335C0 UART bluetooth 2018-11-13 11:14:54 -08:00
bus bus: arm-cci: remove unnecessary unreachable() 2018-12-01 09:42:49 +01:00
cdrom cdrom: fix improper type cast, which can leat to information leak. 2018-11-21 09:24:04 +01:00
char char/mwave: fix potential Spectre v1 vulnerability 2019-01-31 08:13:43 +01:00
clk clk: imx6sl: ensure MMDC CH0 handshake is bypassed 2019-02-12 19:46:03 +01:00
clocksource clocksource/drivers/integrator-ap: Add missing of_node_put() 2019-01-26 09:37:05 +01:00
connector
cpufreq cpufreq: imx6q: add return value check for voltage scale 2018-12-01 09:42:53 +01:00
cpuidle cpuidle: big.LITTLE: fix refcount leak 2019-02-12 19:46:03 +01:00
crypto crypto: talitos - fix ablkcipher for CONFIG_VMAP_STACK 2019-01-23 08:09:48 +01:00
dax dev-dax: check_vma: ratelimit dev_info-s 2018-08-24 13:09:08 +02:00
dca
devfreq
dio
dma dmaengine: xilinx_dma: Remove __aligned attribute on zynqmp_dma_desc_ll 2019-02-12 19:45:59 +01:00
dma-buf
edac EDAC, skx_edac: Fix logical channel intermediate decoding 2018-11-13 11:15:06 -08:00
eisa
extcon extcon: Release locking when sending the notification of connector state 2018-09-09 19:55:56 +02:00
firewire
firmware firmware/efi: Add NULL pointer checks in efivars API functions 2019-02-12 19:46:01 +01:00
fmc
fpga fpga: altera-cvp: Fix registration for CvP incapable devices 2019-02-12 19:45:58 +01:00
fsi
gpio gpio: pcf857x: Fix interrupts on multiple instances 2019-02-06 17:31:35 +01:00
gpu drm: Clear state->acquire_ctx before leaving drm_atomic_helper_commit_duplicated_state() 2019-02-12 19:46:00 +01:00
hid HID: ite: Add USB id match for another ITE based keyboard rfkill key quirk 2019-01-13 10:00:56 +01:00
hsi
hv Drivers: hv: vmbus: Check for ring when getting debug info 2019-01-31 08:13:44 +01:00
hwmon hwmon: (w83795) temp4_type has writable permission 2018-12-17 09:28:49 +01:00
hwspinlock
hwtracing intel_th: msu: Fix an off-by-one in attribute store 2019-01-13 10:01:07 +01:00
i2c i2c-axxia: check for error conditions first 2019-02-12 19:46:03 +01:00
ide ide: pmac: add of_node_put() 2018-12-21 14:13:14 +01:00
idle
iio iio: accel: kxcjk1013: Add KIOX010A ACPI Hardware-ID 2019-02-12 19:45:59 +01:00
infiniband IB/hfi1: Unreserve a reserved request when it is completed 2019-02-12 19:46:02 +01:00
input Input: uinput - fix undefined behavior in uinput_validate_absinfo() 2019-01-31 08:13:45 +01:00
iommu iommu/arm-smmu-v3: Use explicit mb() when moving cons pointer 2019-02-12 19:46:03 +01:00
ipack
irqchip irqchip/gic-v3-its: Align PCI Multi-MSI allocation on their size 2019-01-31 08:13:46 +01:00
isdn isdn: fix kernel-infoleak in capi_unlocked_ioctl 2019-01-09 17:14:43 +01:00
leds
lightnvm lightnvm: pblk: fix two sleep-in-atomic-context bugs 2018-11-13 11:14:52 -08:00
macintosh macintosh/via-pmu: Add missing mmio accessors 2018-09-19 22:43:41 +02:00
mailbox mailbox: xgene-slimpro: Fix potential NULL pointer dereference 2018-09-09 19:55:54 +02:00
mcb
md md/raid5: fix 'out of memory' during raid cache recovery 2019-02-06 17:31:37 +01:00
media media: coda: fix H.264 deblocking filter controls 2019-02-12 19:46:02 +01:00
memory
memstick memstick: Prevent memstick host from getting runtime suspended during card detection 2019-02-12 19:46:04 +01:00
message
mfd mfd: tps6586x: Handle interrupts on suspend 2019-01-23 08:09:49 +01:00
misc mei: me: add denverton innovation engine device IDs 2019-01-31 08:13:42 +01:00
mmc mmc: sdhci-xenon: Fix timeout checks 2019-02-12 19:46:04 +01:00
mtd mtd: atmel-quadspi: disallow building on ebsa110 2019-01-09 17:14:47 +01:00
mux
net net/mlx5: EQ, Use the right place to store/read IRQ affinity hint 2019-02-12 19:45:59 +01:00
nfc NFC: nfcmrvl_uart: fix OF child-node lookup 2018-12-01 09:42:54 +01:00
ntb
nubus
nvdimm libnvdimm, pfn: Pad pfn namespaces relative to other regions 2018-12-13 09:18:54 +01:00
nvme nvmet-rdma: fix null dereference under heavy load 2019-01-31 08:13:47 +01:00
nvmem nvmem: Don't let a NULL cell_id for nvmem_cell_get() crash us 2018-08-24 13:09:14 +02:00
of OF: properties: add missing of_node_put 2019-01-23 08:09:49 +01:00
oprofile
parisc
parport parport: sunbpp: fix error return code 2018-09-26 08:38:12 +02:00
pci switchtec: Fix SWITCHTEC_IOCTL_EVENT_IDX_ALL flags overwrite 2019-02-12 19:46:04 +01:00
pcmcia pcmcia: Implement CLKRUN protocol disabling for Ricoh bridges 2018-11-13 11:14:46 -08:00
perf arm64: perf: Reject stand-alone CHAIN events for PMUv3 2018-10-18 09:16:24 +02:00
phy phy: sun4i-usb: add support for missing USB PHY index 2019-02-12 19:46:03 +01:00
pinctrl pinctrl: sx150x: handle failure case of devm_kstrdup 2019-02-12 19:46:02 +01:00
platform platform/chrome: don't report EC_MKBP_EVENT_SENSOR_FIFO as wakeup 2019-02-12 19:45:58 +01:00
pnp
power power: supply: olpc_battery: correct the temperature units 2019-01-13 10:01:07 +01:00
powercap
pps
ps3
ptp ptp: Fix pass zero to ERR_PTR() in ptp_clock_register 2019-02-12 19:45:59 +01:00
pwm pwm: meson: Fix mux clock names 2018-09-15 09:45:27 +02:00
rapidio
ras
regulator regulator: fix crash caused by null driver data 2018-10-03 17:00:55 -07:00
remoteproc
reset reset: make device_reset_optional() really optional 2018-12-08 13:03:40 +01:00
rpmsg rpmsg: smd: fix memory leak on channel create 2018-11-13 11:15:12 -08:00
rtc rtc: m41t80: Correct alarm month range with RTC reads 2019-01-09 17:14:52 +01:00
s390 s390/zcrypt: improve special ap message cmd handling 2019-02-12 19:46:01 +01:00
sbus drivers/sbus/char: add of_node_put() 2018-12-21 14:13:13 +01:00
scsi scsi: lpfc: Fix LOGO/PLOGI handling when triggerd by ABTS Timeout event 2019-02-12 19:45:57 +01:00
sfi
sh
sn
soc soc: bcm: brcmstb: Don't leak device tree node reference 2019-02-12 19:46:00 +01:00
spi spi: bcm2835: Unbreak the build of esoteric configs 2019-01-09 17:14:53 +01:00
spmi
ssb
staging staging: pi433: fix potential null dereference 2019-02-12 19:46:00 +01:00
target scsi: target: use consistent left-aligned ASCII INQUIRY data 2019-01-26 09:37:03 +01:00
tc TC: Set DMA masks for devices 2018-11-13 11:15:11 -08:00
tee
thermal Thermal: do not clear passive state during system sleep 2019-02-12 19:46:01 +01:00
thunderbolt
tty tty: serial: samsung: Properly set flags in autoCTS mode 2019-02-12 19:46:04 +01:00
uio uio: Fix an Oops on load 2018-11-27 16:10:51 +01:00
usb usb: musb: dsps: fix otg state machine 2019-02-12 19:46:05 +01:00
uwb uwb: hwa-rc: fix memory leak at probe 2018-10-03 17:00:46 -07:00
vfio
vhost vhost: log dirty page correctly 2019-01-31 08:13:41 +01:00
video omap2fb: Fix stack memory disclosure 2019-01-23 08:09:49 +01:00
virt
virtio virtio_balloon: fix increment of vb->num_pfns in fill_balloon() 2018-10-13 09:27:30 +02:00
vlynq
vme
w1 w1: omap-hdq: fix missing bus unregister at removal 2018-11-13 11:15:09 -08:00
watchdog watchdog: renesas_wdt: don't set divider while watchdog is running 2019-02-12 19:46:03 +01:00
xen xen: Fix x86 sched_clock() interface for xen 2019-01-31 08:13:48 +01:00
zorro
Kconfig
Makefile