From: Guenter Roeck <linux@roeck-us.net>
To: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Cc: Doug Anderson <dianders@chromium.org>,
Paul Zimmerman <Paul.Zimmerman@synopsys.com>,
Felipe Balbi <balbi@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Nick Hudson <skrll@netbsd.org>,
Linux USB List <linux-usb@vger.kernel.org>,
Minas Harutyunyan <hminas@synopsys.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/3] usb: dwc2: Fixes and improvements
Date: Thu, 14 Jan 2021 08:29:03 -0800 [thread overview]
Message-ID: <20210114162903.GA139397@roeck-us.net> (raw)
In-Reply-To: <9a8d9a57a1837fb7e0b17f19f089c55f955c98fc.camel@suse.de>
On Thu, Jan 14, 2021 at 10:26:25AM +0100, Nicolas Saenz Julienne wrote:
> Hi Guenter, Doug, thanks for having a look at this.
>
> On Wed, 2021-01-13 at 19:07 -0800, Guenter Roeck wrote:
> > On Wed, Jan 13, 2021 at 03:20:55PM -0800, Doug Anderson wrote:
> > > Hi,
> > >
> > [ ... ]
> > >
> > > It's been long enough ago that I've forgotten where this was left off,
> > > but IIRC the 3 patches that you have here are all fine to land (and
> > > have my Reviewed-by tag). However, I think Guenter was still tracking
> > > down additional problems. Guenter: does that match your recollection?
> > >
> > > It looks like there are still bugs open for this on our public bug tracker:
> > >
> > > https://issuetracker.google.com/issues/172208170
> > > https://issuetracker.google.com/issues/172216241
> > >
> > > ...but, as Guenter said, I don't think there's anyone actively working on them.
> > >
> > > I'm not really doing too much with dwc2 these days either and don't
> > > currently have good HW setup for testing, so for the most part I'll
> > > leave it to you. I wanted to at least summarize what I remembered,
> > > though! :-)
> > >
> >
> > The patches in this series still match what I had in my latest test code,
> > so it makes sense to move forward with them. I don't think I ever found
> > an acceptable version of the DMA alignment code.
>
> As for the alignment code rework, can you recall the underlying issue that
> warranted it?
>
See
https://patchwork.kernel.org/project/linux-usb/patch/20200226210414.28133-2-linux@roeck-us.net/
for details. It isn't up to date - it says that buffer alignment to
DWC2_USB_DMA_ALIGN would be acceptable. However, it turned out in testing
that buffers do have to be aligned to dma_get_cache_alignment(), at least
on some mips systems.
My latest work-in-progress patch describes the changes made as:
To simplify the code, move the old data pointer back to the beginning of
the new buffer, restoring most of the original commit. Increase buffer
alignment to dma_get_cache_alignment(). Ensure that the data pointer is
DMA aligned by using ____cacheline_aligned instead of realigning it after
allocation. Ensure that the allocated buffer is a multiple of
wMaxPacketSize to guarantee that the chip does not write beyond the end
of the buffer.
I can provide that version of the patch in case someone wants to pick it up,
but it would need thorough testing on a variety of systems before it is
applied.
Guenter
prev parent reply other threads:[~2021-01-14 16:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-13 11:20 [PATCH 0/3] usb: dwc2: Fixes and improvements Nicolas Saenz Julienne
2021-01-13 11:20 ` [PATCH 1/3] usb: dwc2: Do not update data length if it is 0 on inbound transfers Nicolas Saenz Julienne
2021-01-13 11:20 ` [PATCH 2/3] usb: dwc2: Abort transaction after errors with unknown reason Nicolas Saenz Julienne
2021-01-13 11:20 ` [PATCH 3/3] usb: dwc2: Make "trimming xfer length" a debug message Nicolas Saenz Julienne
2021-01-13 23:20 ` [PATCH 0/3] usb: dwc2: Fixes and improvements Doug Anderson
2021-01-14 3:07 ` Guenter Roeck
2021-01-14 9:26 ` Nicolas Saenz Julienne
2021-01-14 16:29 ` Guenter Roeck [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=20210114162903.GA139397@roeck-us.net \
--to=linux@roeck-us.net \
--cc=Paul.Zimmerman@synopsys.com \
--cc=balbi@ti.com \
--cc=dianders@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=hminas@synopsys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=nsaenzjulienne@suse.de \
--cc=skrll@netbsd.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.