RE: [RFC] gadget ethernet dma align fix

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

 



Hi,
> -----Original Message-----
> From: Matthieu CASTET [mailto:matthieu.castet@xxxxxxxxxx]
> Sent: Monday, January 18, 2010 6:41 PM
> To: Pandita, Vikram
> Cc: felipe.balbi@xxxxxxxxx; Gupta, Ajay Kumar; matthieu castet; linux-
> usb@xxxxxxxxxxxxxxx; Alan Stern
> Subject: Re: [RFC] gadget ethernet dma align fix
> 
> Hi,
> 
> Pandita, Vikram a écrit :
> >
> >> -----Original Message-----
> >> From: Felipe Balbi [mailto:felipe.balbi@xxxxxxxxx]
> >> Sent: Thursday, January 14, 2010 5:28 AM
> >> To: ext Matthieu CASTET
> >> Cc: Balbi Felipe (Nokia-D/Helsinki); Gupta, Ajay Kumar; Pandita,
> Vikram; matthieu castet; linux-
> >> usb@xxxxxxxxxxxxxxx; Alan Stern
> >> Subject: Re: [RFC] gadget ethernet dma align fix
> >>
> >> Hi,
> >>
> >> On Thu, Jan 14, 2010 at 09:40:43AM +0100, ext Matthieu CASTET wrote:
> >>> Do you know if it is related to the align patch ?
> >>>
> >>> May be it could be interesting to enable debug in ethernet gadget
> driver.
> >> yeah I can do that, but it seems to be related to this patch. On an
> >> older version of musb (rtl 1.4) which doesn't suffer badly from this,
> >> this script works fine.
> >>
> >> will run again and let's see what's going on.
> >
> > Not working:
> > with this alignment patch v3 [1] in g_ether,
> > ping does not go through for size >= 1471, as pointed out by Felipe and
> Ajay.
> > This needs to be root caused and obviously a problem with introducing
> memmove() in g-ether.
> >
> > Works fine:
> > With the alignment fix in the MUSB controller driver [2] rather than g-
> ether,
> > the problem with ping size >= 1471 is not observed.
> >
> I found the problem. I was on rx path were skb->len were wrong.
> 
> I attach a new patch that fix the issue.

Thanks for updated patch. It does fix the ping issue for packet size
Beyond 1470+.

I have one comment on your patch at below lines. 

> +static inline bool gadget_dma32(struct usb_gadget *gadget)
> +{
> +       if (gadget_is_musbhdrc(gadget))
> +               return true;

This alignment issue is only true for OMAP36x and __not__ for all
musb platform (OMAP35x, DaVinci, DA8xx, BlackFin).

So can you please add this check in above code, 

+	  if (cpu_is_omap3630() && gadget_is_musbhdrc(gadget))

-Ajay


> +       return false;
> +}


> 
> 
> Regards,
> 
> Matthieu
--
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