Skip to contentSkip to conversation

usb: r8a66597-udc unaligned fifo fix

PATCH Paul Mundt 1 participant 1 message Oct 5, 2009 SuperH

lore
Share & tools
lore

Paul Mundt

author Applied
#0 lore raw
Quoted 14 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Rework the r8a66597-udc fifo code to avoid unaligned accesses.

Without this patch unaligned exceptions will degrade the USB performance. The exceptions come from the fact that the usb fifo data buffers may be misaligned.

This patch updates the fifo access code to only use insl()/outsl() and insw()/outsw() in the case of properly aligned data buffers. The fallback case is that inl()/inw() are used for misaligned buffer reads together with outb() that is used for misaligned buffer writes.

Quoted 8 lines

---

Tested on kfr2r09 with CONFIG_USB_CDC_COMPOSITE=y

 drivers/usb/gadget/r8a66597-udc.h |  105 +++++++++++++++++++++----------------
 1 file changed, 62 insertions(+), 43 deletions(-)

Applied, thanks.