Re: usb: dwc2: regression on bcm2835 after commit 09c96980dc72

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

 



Hi Stefan, Hi John,

On Mon, Dec 28, 2015 at 3:16:47AM -0800, Stefan Wharen wrote:
>Hi John,
>
>the commit 09c96980dc72 ("usb: dwc2: Add functions to set and clear force mode")
>in Felipe's USB repo causes a regression on Raspberry Pi B which prevents the
>probing of the dwc2 driver.

I also find a regression on Raspberry Pi.

>
>I attached a patch which fixes the regression but i'm not sure that's the right
>way.
>
>Regards
>Stefan
>
>-------------------------8<----------------------------------
>diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
>index 39a0fa8..3f5fb31 100644
>--- a/drivers/usb/dwc2/core.c
>+++ b/drivers/usb/dwc2/core.c
>@@ -572,12 +572,6 @@ static bool dwc2_force_mode(struct dwc2_hsotg *hsotg, bool
>host)
> 	set = host ? GUSBCFG_FORCEHOSTMODE : GUSBCFG_FORCEDEVMODE;
> 	clear = host ? GUSBCFG_FORCEDEVMODE : GUSBCFG_FORCEHOSTMODE;
> 
>-	/*
>-	 * If the force mode bit is already set, don't set it.
>-	 */
>-	if ((gusbcfg & set) && !(gusbcfg & clear))
>-		return false;
>-
>  	gusbcfg &= ~clear;
>  	gusbcfg |= set;
>  	dwc2_writel(gusbcfg, hsotg->regs + GUSBCFG);

I came up with the same patch, but it does not seem to fix everything. Indeed
263b7fb557f797d9d4d1dcf93fb6bb2efc3f1d46 (previous patch in patchset) seems
to break USB ethernet also.

My guess is that bcm2835 still need dwc2_core_reset_and_force_dr_mode()
before dwc2_get_hwparams().

Do you have any idea ?

Regards

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