>-----Original Message----- >From: Matthieu CASTET [mailto:matthieu.castet@xxxxxxxxxx] >Sent: Friday, January 08, 2010 10:15 AM >To: Pandita, Vikram >Cc: matthieu castet; linux-usb@xxxxxxxxxxxxxxx; Alan Stern >Subject: Re: [RFC] gadget ethernet dma align fix > >Hi, > >Pandita, Vikram a écrit : >> Matthieu >> >>> -----Original Message----- >>> From: linux-usb-owner@xxxxxxxxxxxxxxx [mailto:linux-usb-owner@xxxxxxxxxxxxxxx] On Behalf Of >matthieu >>> castet >>> Sent: Wednesday, December 23, 2009 2:11 PM >>> To: linux-usb@xxxxxxxxxxxxxxx >>> Cc: Alan Stern >>> Subject: [RFC] gadget ethernet dma align fix >>> >>> Hi, >>> >>> I attach a patch that should allow to use gadget ethernet with driver >>> not supporting dma on unaligned address. >>> >>> This is untested on real hardware. >> >> Gave a first round of test on real hardware. >> >> 1) patch did not compile >> a) missing ; >> b) a typecast was needed like: ((unsigned long)skb->data & 3) >> c) WARN_ON() getting hit multiple times, thereby generating un-managable amount of logs: so >disable WARN_ON() >That's not normal. We drop all these packets. That should explain why >"Ping from device side hangs" is not working. > >What's the value of skb_headroom in this case. >May be the check should be >if ( (skb_headroom(skb) < ((unsigned long)skb->data & 3) )) Yes that’s the check that was needed. So now I have working v3 of the patch(attached) with: a) added more comments b) tx alignment added a gadget_dma32() check This works perfectly fine for ping from both sides (host/device). Maybe we finally have a solution. Can we get a round of review on usb list? Regards, Vikram
Attachment:
usb-g-ether-align-v3.patch
Description: usb-g-ether-align-v3.patch