OpenCloudOS-Kernel/drivers/usb/phy
Srinivas Kandagatla 508ccea177 usb: phy: msm: Do not do runtime pm if the phy is not idle
Use case is when the phy is configured in host mode and a usb device is
attached to board before bootup. On bootup, with the existing code and
runtime pm enabled, the driver would decrement the pm usage count
without checking the current state of the phy. This pm usage count
decrement would trigger the runtime pm which than would abort the
usb enumeration which was in progress. In my case a usb stick gets
detected and then immediatly the driver goes to low power mode which is
not correct.

log:
[    1.631412] msm_hsusb_host 12520000.usb: EHCI Host Controller
[    1.636556] msm_hsusb_host 12520000.usb: new USB bus registered, assigned bus number 1
[    1.642563] msm_hsusb_host 12520000.usb: irq 220, io mem 0x12520000
[    1.658197] msm_hsusb_host 12520000.usb: USB 2.0 started, EHCI 1.00
[    1.659473] hub 1-0:1.0: USB hub found
[    1.663415] hub 1-0:1.0: 1 port detected
...
[    1.973352] usb 1-1: new high-speed USB device number 2 using msm_hsusb_host
[    2.107707] usb-storage 1-1:1.0: USB Mass Storage device detected
[    2.108993] scsi0 : usb-storage 1-1:1.0
[    2.678341] msm_otg 12520000.phy: USB in low power mode
[    3.168977] usb 1-1: USB disconnect, device number 2

This issue was detected on IFC6410 board.

This patch fixes the intial runtime pm trigger by checking the phy
state and decrementing the pm use count only when the phy state is IDLE.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30 13:23:57 -05:00
..
Kconfig phy: Enable USB PHY support for arm64 2014-05-27 15:58:13 -07:00
Makefile usb: common: rename phy-fsm-usb.c to usb-otg-fsm.c 2014-05-27 15:29:44 -07:00
am35x-phy-control.h usb: phy: Add AM335x PHY driver 2013-08-09 17:34:15 +03:00
of.c usb: add devicetree helpers for determining dr_mode and phy_type 2013-06-17 13:47:09 -07:00
phy-ab8500-usb.c usb: phy: initialize the notifier when add a new phy 2013-12-12 13:43:34 -06:00
phy-am335x-control.c usb: phy: am335x-control: wait 1ms after power-up transitions 2014-04-21 10:21:24 -05:00
phy-am335x.c usb: phy: rename <linux/usb/usb_phy_gen_xceiv.h> to <linux/usb/usb_phy_generic.h> 2014-04-21 14:07:24 -05:00
phy-fsl-usb.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
phy-fsl-usb.h usb: phy: move OTG FSM header 2013-11-26 10:58:18 -06:00
phy-generic.c usb: phy: generic: allow multiples calls to usb_phy_generic_register() 2014-04-21 14:07:25 -05:00
phy-generic.h usb: phy: rename <linux/usb/usb_phy_gen_xceiv.h> to <linux/usb/usb_phy_generic.h> 2014-04-21 14:07:24 -05:00
phy-gpio-vbus-usb.c usb: phy: initialize the notifier when add a new phy 2013-12-12 13:43:34 -06:00
phy-isp1301-omap.c ARM: OMAP: replace checks for CONFIG_USB_GADGET_OMAP 2014-05-16 14:14:25 -07:00
phy-isp1301.c usb: phy: Fix NULL pointer exception during usb_get_phy 2013-05-15 17:32:47 +03:00
phy-keystone.c usb: phy: rename <linux/usb/usb_phy_gen_xceiv.h> to <linux/usb/usb_phy_generic.h> 2014-04-21 14:07:24 -05:00
phy-msm-usb.c usb: phy: msm: Do not do runtime pm if the phy is not idle 2014-06-30 13:23:57 -05:00
phy-mv-usb.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
phy-mv-usb.h usb: otg: mv_otg: remove unused clock 2013-04-02 11:42:45 +03:00
phy-mxs-usb.c usb: phy: mxs: Add sync time after controller clear phcd 2014-03-05 14:40:09 -06:00
phy-omap-otg.c usb: omap1: OTG controller driver 2013-12-06 14:40:26 -06:00
phy-rcar-gen2-usb.c usb: phy: rcar-gen2-usb: always use 'dev' variable in probe() method 2014-03-05 09:44:48 -06:00
phy-rcar-usb.c usb: phy: use dev_get_platdata() 2013-07-30 11:18:53 +03:00
phy-samsung-usb.c usb: phy: samsung: Add support HSIC on Exynos4X12 2013-05-28 20:16:37 +03:00
phy-samsung-usb.h usb: phy: samsung: Add support HSIC on Exynos4X12 2013-05-28 20:16:37 +03:00
phy-samsung-usb2.c USB: phy: samsung: Support multiple PHYs of same type 2013-10-29 16:46:48 -07:00
phy-samsung-usb3.c USB: phy: samsung: Support multiple PHYs of same type 2013-10-29 16:46:48 -07:00
phy-tahvo.c usb: phy: tahvo: fix smatch warnings 2013-12-23 10:14:33 -06:00
phy-tegra-usb.c usb: phy-tegra-usb.c: wrong pointer check for remap UTMI 2013-12-06 14:32:15 -06:00
phy-twl6030-usb.c phy: omap-usb2: move omap_usb.h from linux/usb/ to linux/phy/ 2014-03-07 21:51:45 +05:30
phy-ulpi-viewport.c usb: Remove unnecessary semicolons 2013-10-11 16:26:46 -07:00
phy-ulpi.c usb: phy: Add SMSC USB334x PHY ID 2014-05-15 10:31:57 -05:00
phy.c usb: phy: return an error in usb_get_phy() if try_module_get() fails 2014-04-16 10:11:47 -05:00