linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] USB: fix inefficient copy of unaligned buffers
@ 2015-04-23 14:06 Johan Hovold
  2015-04-23 14:06 ` [PATCH v2 1/3] USB: musb: " Johan Hovold
       [not found] ` <1429798012-21916-1-git-send-email-johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  0 siblings, 2 replies; 9+ messages in thread
From: Johan Hovold @ 2015-04-23 14:06 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Felipe Balbi, Alan Stern
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Stephen Warren,
	Thierry Reding, Alexandre Courbot,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Johan Hovold

These patches (for 4.1) make sure that only the received data is copied
from the temporary buffers used for unaligned transfers.

I discovered this when debugging an issue where the Beaglebone Black
would lock up on disconnect.

Turns out it was related to the transfer_buffers not being properly
aligned, causing musb to use temporary buffers for the transfers. On
transfer errors (e.g. during disconnect), the full buffer content was
still being copied, something which would alter timings enough to
prevent the disconnect from being detected and processed.

The first patch in the series works around the problem in that
particular set up, but obviously does not solve the underlying issue,
which needs to be analysed further.

I also included a corresponding patch for ehci-tegra that has been
compile tested only.

Note that the octeon-hcd driver in staging, which also uses temporary
buffers for unaligned transfers, was broken for isochronous transfers.
The third patch fixes that, but is also untested due to lack of
hardware.

Johan


v2:
 - Make sure to copy the full buffer for isochronous transfers, in which
   case the received data is not necessarily contiguous (thanks Alan).
 - Drop stable tags as this is really just an optimisation.


Johan Hovold (3):
  USB: musb: fix inefficient copy of unaligned buffers
  USB: ehci-tegra: fix inefficient copy of unaligned buffers
  staging: octeon-usb: fix unaligned isochronous transfers

 drivers/staging/octeon-usb/octeon-hcd.c | 12 +++++++++---
 drivers/usb/host/ehci-tegra.c           | 12 +++++++++---
 drivers/usb/musb/musb_host.c            |  9 +++++++--
 3 files changed, 25 insertions(+), 8 deletions(-)

-- 
2.0.5

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-04-24  6:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-23 14:06 [PATCH v2 0/3] USB: fix inefficient copy of unaligned buffers Johan Hovold
2015-04-23 14:06 ` [PATCH v2 1/3] USB: musb: " Johan Hovold
     [not found] ` <1429798012-21916-1-git-send-email-johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-04-23 14:06   ` [PATCH v2 2/3] USB: ehci-tegra: " Johan Hovold
2015-04-23 14:31     ` Frans Klaver
     [not found]       ` <CAH6sp9PFE_kQn5hpXaGhn6d_WTtKZUbfS-DpDRfRCKbBj9S4fQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-23 14:45         ` Johan Hovold
     [not found]     ` <1429798012-21916-3-git-send-email-johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-04-23 14:48       ` Alan Stern
2015-04-23 20:32     ` Stephen Warren
     [not found]       ` <553956DA.2090300-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-04-24  6:31         ` Johan Hovold
2015-04-23 14:06   ` [PATCH v2 3/3] staging: octeon-usb: fix unaligned isochronous transfers Johan Hovold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).