diff mbox

3.7 kernel hangs when doing scp

Message ID CAOMZO5B5hv+oG+8fQYyFxRb=VLOiPmC8+0LhAFLOOzBY4z6PZA@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Fabio Estevam Dec. 20, 2012, 10:45 a.m. UTC
On Thu, Dec 20, 2012 at 8:20 AM, Fabio Estevam <festevam@gmail.com> wrote:
> Hi Peter,
>
> On Thu, Dec 20, 2012 at 2:39 AM, Peter Chen <peter.chen@freescale.com> wrote:
>
>> Please to see if the Stream mode disable (bit4, usbmode) is set or not?
>> If it is not, please try below patch
>>
>> diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
>> index c97503b..258bc02 100644
>> --- a/drivers/usb/host/ehci-hcd.c
>> +++ b/drivers/usb/host/ehci-hcd.c
>> @@ -227,6 +227,7 @@ static void tdi_reset (struct ehci_hcd *ehci)
>>
>>         tmp = ehci_readl(ehci, &ehci->regs->usbmode);
>>         tmp |= USBMODE_CM_HC;
>> +       tmp |= (1 << 4); /* disable stream mode */
>>         /* The default byte access to MMR space is LE after
>>          * controller reset. Set the required endian mode
>>          * for transfer buffers to match the host microprocessor
>
> Excellent! Your suggestion made scp work with mx6 on 3.7.
>
> I assume that this "fix" or workaround would need a better place, right?
>
> Should this fix go into the chipidea host driver instead?
>
> Also, I wonder on how "standard" this USBMODE register is. i.e. there
> is a deviation from the FSL EHCI USBMODE register.
> I found it in include/linux/usb/ehci_def.h:
>
> #define USBMODE_SDIS            (1<<3)          /* Stream disable */
>
> , which is at a different bit position from the i.MX6 Reference Manual:
>
> 4 SDIS Stream Disable Mode. (0 - Inactive [default]; 1 - Active)

Would this be the correct fix?

linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Comments

Fabio Estevam Dec. 20, 2012, 11:18 a.m. UTC | #1
On Thu, Dec 20, 2012 at 8:45 AM, Fabio Estevam <festevam@gmail.com> wrote:

> Would this be the correct fix?
>
> --- a/include/linux/usb/chipidea.h
> +++ b/include/linux/usb/chipidea.h
> @@ -18,7 +18,7 @@ struct ci13xxx_platform_data {
>  #define CI13XXX_REGS_SHARED            BIT(0)
>  #define CI13XXX_REQUIRE_TRANSCEIVER    BIT(1)
>  #define CI13XXX_PULLUP_ON_VBUS         BIT(2)
> -#define CI13XXX_DISABLE_STREAMING      BIT(3)
> +#define CI13XXX_DISABLE_STREAMING      BIT(4)

Ops, these are just the platform data flags.

I will take a look on why the chipidea driver is not properly
disabling stream mode.

Regards,

Fabio Estevam
Peter Chen Dec. 21, 2012, 2:22 a.m. UTC | #2
On Thu, Dec 20, 2012 at 09:18:43AM -0200, Fabio Estevam wrote:
> On Thu, Dec 20, 2012 at 8:45 AM, Fabio Estevam <festevam@gmail.com> wrote:
> 
> > Would this be the correct fix?
> >
> > --- a/include/linux/usb/chipidea.h
> > +++ b/include/linux/usb/chipidea.h
> > @@ -18,7 +18,7 @@ struct ci13xxx_platform_data {
> >  #define CI13XXX_REGS_SHARED            BIT(0)
> >  #define CI13XXX_REQUIRE_TRANSCEIVER    BIT(1)
> >  #define CI13XXX_PULLUP_ON_VBUS         BIT(2)
> > -#define CI13XXX_DISABLE_STREAMING      BIT(3)
> > +#define CI13XXX_DISABLE_STREAMING      BIT(4)
> 
> Ops, these are just the platform data flags.
> 
> I will take a look on why the chipidea driver is not properly
> disabling stream mode.

Current chipidea driver only considers disable stream mode at device
mode, in fact, it may be related to below chipidea bug, and needs
to consider all usb modes.

STAR 9000378958
Title: Non-Double Word Aligned Buffer Address Sometimes Causes Host to Hang on OUT Retry 
www.synopsys.com/dw/star.php?c=dwc_usb2_hs_otg_controller&fixedIn=2.20a

To fix this, we need to add CI13XXX_DISABLE_STREAMING after role->start/init.


> 
> Regards,
> 
> Fabio Estevam
>
diff mbox

Patch

--- a/include/linux/usb/chipidea.h
+++ b/include/linux/usb/chipidea.h
@@ -18,7 +18,7 @@  struct ci13xxx_platform_data {
 #define CI13XXX_REGS_SHARED            BIT(0)
 #define CI13XXX_REQUIRE_TRANSCEIVER    BIT(1)
 #define CI13XXX_PULLUP_ON_VBUS         BIT(2)
-#define CI13XXX_DISABLE_STREAMING      BIT(3)
+#define CI13XXX_DISABLE_STREAMING      BIT(4)

_______________________________________________
linux-arm-kernel mailing list