Re: [PATCH RESEND] usb: phy: mxs: Suggest passing "usbcore.autosuspend=-1" for mx23/mx28

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 24, 2016 at 8:32 AM, Felipe Balbi <balbi@xxxxxxxxxx> wrote:

> Then that's the problem. You should _always_ implement your runtime_pm
> callbacks otherwise driver model will assume you don't need to do
> ANYTHING for runtime pm and runtime suspend you unconditionally.
>
> As a test, try setting the flag but just returning -EBUSY from the top
> of runtime_suspend in chipidea.

Here are the changes as suggested:

--- a/drivers/usb/chipidea/ci_hdrc_imx.c
+++ b/drivers/usb/chipidea/ci_hdrc_imx.c
@@ -33,7 +33,8 @@ static const struct ci_hdrc_imx_platform_flag imx27_usb_data =

 static const struct ci_hdrc_imx_platform_flag imx28_usb_data = {
        .flags = CI_HDRC_IMX28_WRITE_FIX |
-               CI_HDRC_TURN_VBUS_EARLY_ON,
+               CI_HDRC_TURN_VBUS_EARLY_ON |
+               CI_HDRC_SUPPORTS_RUNTIME_PM,
 };

 static const struct ci_hdrc_imx_platform_flag imx6q_usb_data = {
@@ -317,6 +318,10 @@ static int ci_hdrc_imx_runtime_suspend(struct device *dev)
        struct ci_hdrc_imx_data *data = dev_get_drvdata(dev);
        int ret;

+       pr_err("************** Calling ci_hdrc_imx_runtime_suspend\n");
+       /* Quick test */
+       return -EBUSY;
+
        if (data->in_lpm) {
                WARN_ON(1);
                return 0;

and this is the result:

[    3.104883] hub 2-1:1.0: USB hub found
[    3.109226] hub 2-1:1.0: 2 ports detected
[    3.635138] usb 2-1: USB disconnect, device number 2
[    3.656231] usb usb2-port1: cannot reset (err = -32)
[    3.661500] usb usb2-port1: cannot reset (err = -32)
[    3.667074] usb usb2-port1: cannot reset (err = -32)
[    3.672329] usb usb2-port1: cannot reset (err = -32)
[    3.677712] usb usb2-port1: cannot reset (err = -32)
[    3.682722] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?
[    3.690996] usb usb2-port1: cannot reset (err = -32)
[    3.696495] usb usb2-port1: cannot reset (err = -32)
[    3.701745] usb usb2-port1: cannot reset (err = -32)
[    3.707242] usb usb2-port1: cannot reset (err = -32)
[    3.712495] usb usb2-port1: cannot reset (err = -32)
[    3.717618] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?
[    3.725122] usb usb2-port1: cannot reset (err = -32)
[    3.730380] usb usb2-port1: cannot reset (err = -32)
[    3.735762] usb usb2-port1: cannot reset (err = -32)
[    3.741015] usb usb2-port1: cannot reset (err = -32)
[    3.746501] usb usb2-port1: cannot reset (err = -32)
[    3.751510] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?
[    3.758981] usb usb2-port1: cannot reset (err = -32)
[    3.764468] usb usb2-port1: cannot reset (err = -32)
[    3.769730] usb usb2-port1: cannot reset (err = -32)
[    3.775100] usb usb2-port1: cannot reset (err = -32)
[    3.780351] usb usb2-port1: cannot reset (err = -32)
[    3.785509] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?
[    3.792544] usb usb2-port1: unable to enumerate USB device
[    5.195776] ************** Calling ci_hdrc_imx_runtime_suspend
[    6.057095] fec 800f0000.ethernet eth0: Link is Up - 100Mbps/Full - flow conx
[    6.084367] Sending DHCP requests ., OK

.....

[    7.156524] uart-pl011 80074000.serial: no DMA platform data
[    7.228624] VFS: Mounted root (nfs filesystem) readonly on device 0:14.
[    7.240462] devtmpfs: mounted
[    7.245817] Freeing unused kernel memory: 248K (c070a000 - c0748000)
[    7.586576] ci_hdrc ci_hdrc.0: timeout waiting for 00000800 in 11
[    7.593451] ************** Calling ci_hdrc_imx_runtime_suspend
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux