Re: [PATCH v3] powerpc/usb: fix bug of CPU hang when missing USB PHY clock

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

 



On Sep 21, 2012, at 11:43 AM, Greg KH wrote:

> On Tue, Sep 18, 2012 at 04:52:39PM +0800, Shengzhou Liu wrote:
>> when missing USB PHY clock, kernel booting up will hang during USB
>> initialization. We should check USBGP[PHY_CLK_VALID] bit to avoid
>> CPU hanging in this case.
>> 
>> Signed-off-by: Shengzhou Liu <Shengzhou.Liu@xxxxxxxxxxxxx>
>> ---
>> v3 change: no check for UTMI PHY.
>> v2 change: use spin_event_timeout() instead.
>> 
>> drivers/usb/host/ehci-fsl.c |   57 +++++++++++++++++++++++++++++-------------
>> drivers/usb/host/ehci-fsl.h |    1 +
>> include/linux/fsl_devices.h |    1 +
>> 3 files changed, 41 insertions(+), 18 deletions(-)
> 
> This is already applied, right?
> 
> greg k-h

It appears that v2 of the patch is applied to your usb-next branch.

in drivers/usb/host/ehci-fsl.c

V2:
@@ -262,23 +266,34 @@ static void ehci_fsl_setup_phy(struct usb_hcd *hcd,
        case FSL_USB2_PHY_NONE:
                break;
        }
+
+       if ((pdata->controller_ver) && ((phy_mode == FSL_USB2_PHY_ULPI) ||
+                       (phy_mode == FSL_USB2_PHY_UTMI))) {

V3:

@@ -262,23 +266,33 @@  static void ehci_fsl_setup_phy(struct usb_hcd *hcd,

 	case FSL_USB2_PHY_NONE:
 		break;
 	}

+
+	if (pdata->controller_ver && (phy_mode == FSL_USB2_PHY_ULPI)) {
+		/* check PHY_CLK_VALID to get phy clk valid */


- k--
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