-
- Downloads
USB: Use (get|put)_unaligned for accessing wMaxPacketSize
In 97929877 Stefan describes a usecase where the previous behavior of leaving wMaxPacketSize be unaligned caused fatal problems. The initial fix for this problem was incomplete however as it showed another cases of non-aligned access that previously worked implicitly. This switches to making sure that all access of wMaxPacketSize are done via (get|put)_unaligned. In order to maintain a level of readability to the code in some cases we now use a variable for the value of wMaxPacketSize and in others, a macro. Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Remy Bohmer <linux@bohmer.net> OpenRISC: Tested-by:Stefan Kristiansson <stefan.kristiansson@saunalahti.fi> Beagleboard xM, Pandaboard run-tested, s5p_goni build-tested. Signed-off-by:
Tom Rini <trini@ti.com>
Showing
- common/cmd_usb.c 2 additions, 1 deletioncommon/cmd_usb.c
- common/usb.c 19 additions, 8 deletionscommon/usb.c
- drivers/serial/usbtty.c 6 additions, 4 deletionsdrivers/serial/usbtty.c
- drivers/usb/gadget/epautoconf.c 5 additions, 3 deletionsdrivers/usb/gadget/epautoconf.c
- drivers/usb/gadget/s3c_udc_otg.c 6 additions, 4 deletionsdrivers/usb/gadget/s3c_udc_otg.c
- include/usbdescriptors.h 1 addition, 1 deletioninclude/usbdescriptors.h
Loading
Please register or sign in to comment