From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: John Youn <johnyoun@synopsys.com>,
linux-usb@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
linux-media@vger.kernel.org
Subject: Re: [PATCH RFC] dwc2: Don't assume URB transfer_buffer are dword-aligned
Date: Wed, 29 Mar 2017 15:49:09 -0300 [thread overview]
Message-ID: <20170329154909.44d36de2@vento.lan> (raw)
In-Reply-To: <20170329095722.GC20830@kroah.com>
Em Wed, 29 Mar 2017 11:57:22 +0200
Greg Kroah-Hartman <gregkh@linuxfoundation.org> escreveu:
> On Tue, Mar 28, 2017 at 06:48:02AM -0300, Mauro Carvalho Chehab wrote:
> > Em Fri, 17 Mar 2017 10:24:15 +0900
> > Greg Kroah-Hartman <gregkh@linuxfoundation.org> escreveu:
> >
> > > On Thu, Mar 16, 2017 at 09:08:40PM -0300, Mauro Carvalho Chehab wrote:
> > > > The dwc2 hardware doesn't like to do DMA transfers without
> > > > aligning data in DWORD. The driver also assumes that, even
> > > > when there's no DMA, at dwc2_read_packet().
> > > >
> > > > That cause buffer overflows, preventing some drivers to work.
> > >
> > > Why aren't the drivers being fixed? This is a well-known (hopefully)
> > > restriction on USB data buffers, can't the uvc_driver be fixed?
> >
> > I talked to Laurent about on IRC. He told that he is willing to consider
> > that option, if the USB API explicitly states that all buffers must be
> > dword-aligned (and/or buffer sizes).
> >
> > IMHO, he has a point: if this is a restriction of for usb transfer
> > buffers, it should be documented somewhere.
> >
> > Yet, a quick check with:
> > $ git grep -i dword Documentation/usb/
> > $ git grep -i align Documentation/usb/
> >
> > Didn't hit anything related to it.
>
> Hm, most of the USB documentation is in the kerneldoc in the USB code
> itself, and is built that way. I'm pretty sure this is documented
> somewhere, but I can't seem to find it at the moment either :(
>
> Care to write a patch for that? :)
Sure. Btw, I noticed that not all USB documents were converted
yet to ReST, so I took the time to convert the core documents to ReST
too.
I kept the driver-specific documentation at Documentation/usb.
The final result is at:
http://www.infradead.org/~mchehab/kernel_docs/driver-api/usb/index.html
I'll be sending the documentation patches in a few.
Thanks,
Mauro
prev parent reply other threads:[~2017-03-29 18:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-17 0:08 [PATCH RFC] dwc2: Don't assume URB transfer_buffer are dword-aligned Mauro Carvalho Chehab
[not found] ` <20170317012415.GA31588@kroah.com>
[not found] ` <20170328064802.5ab9208c@vento.lan>
[not found] ` <20170329095722.GC20830@kroah.com>
2017-03-29 18:49 ` Mauro Carvalho Chehab [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170329154909.44d36de2@vento.lan \
--to=mchehab@s-opensource.com \
--cc=gregkh@linuxfoundation.org \
--cc=johnyoun@synopsys.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox