2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-28 15:13:55 +08:00
linux-next/drivers/usb/gadget
David Brownell 01ee7d7032 USB: usb gadgets avoid le{16,32}_to_cpup()
It turns out that le16_to_cpup() and le32_to_cpup() aren't always safe
to call with pointers into packed structures, since those are inlined
functions and GCC may lose the "packed" attribute.  So those references
can become unaligned kernel accesses, which are evil on some hardware.

This patch updates uses of those routines in the gadget stack.  The
references into packed structures can just use leXX_to_cpu(*x), which
in most cases is more natural.  Some other uses in RNDIS, mostly in
debug code, were wrong in the first place; those use get_unaligned().

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-06-08 16:24:30 -07:00
..
at91_udc.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
at91_udc.h USB: at91_udc wakeup event updates 2007-02-07 15:44:37 -08:00
config.c USB: <linux/usb_ch9.h> becomes <linux/usb/ch9.h> 2007-02-07 15:44:32 -08:00
dummy_hcd.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
epautoconf.c USB: usb gadgets avoid le{16,32}_to_cpup() 2007-06-08 16:24:30 -07:00
ether.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
file_storage.c [PATCH] remove invalidate_inode_pages() 2007-02-11 10:51:31 -08:00
fsl_usb2_udc.c USB: fsl_usb2_udc: Fix UMTI_WIDE support and a compile warning 2007-05-22 23:45:49 -07:00
fsl_usb2_udc.h USB: add Freescale high-speed USB SOC device controller driver 2007-04-27 13:28:43 -07:00
gadget_chips.h USB: update gadget files for fsl_usb2_udc driver 2007-04-27 13:28:43 -07:00
gmidi.c USB: <linux/usb_ch9.h> becomes <linux/usb/ch9.h> 2007-02-07 15:44:32 -08:00
goku_udc.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
goku_udc.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
inode.c USB: usb gadgets avoid le{16,32}_to_cpup() 2007-06-08 16:24:30 -07:00
Kconfig [ARM] 4370/3: AT91: Support for Atmel AT91SAM9RL processors. 2007-05-11 21:07:54 +01:00
lh7a40x_udc.c USB: gadget driver unbind() is optional; section fixes; misc 2006-12-20 10:14:26 -08:00
lh7a40x_udc.h USB: <linux/usb_ch9.h> becomes <linux/usb/ch9.h> 2007-02-07 15:44:32 -08:00
Makefile USB: add Freescale high-speed USB SOC device controller driver 2007-04-27 13:28:43 -07:00
ndis.h [PATCH] USB: rndis updates (mostly cleanup) 2005-06-27 14:43:50 -07:00
net2280.c USB: usb gadgets avoid le{16,32}_to_cpup() 2007-06-08 16:24:30 -07:00
net2280.h USB: net2280: don't send unwanted zero-length packets 2006-12-01 14:23:36 -08:00
omap_udc.c USB: usb gadgets avoid le{16,32}_to_cpup() 2007-06-08 16:24:30 -07:00
omap_udc.h USB: omap_udc build fixes (sync with linux-omap) 2007-01-05 12:19:09 -08:00
pxa2xx_udc.c Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2007-05-06 13:20:10 -07:00
pxa2xx_udc.h [ARM] 4141/1: consolidate functions that handles gpio in pxa2xx_udc 2007-02-08 14:56:51 +00:00
rndis.c USB: usb gadgets avoid le{16,32}_to_cpup() 2007-06-08 16:24:30 -07:00
rndis.h USB gadget rndis: fix struct rndis_packet_msg_type unaligned bug 2007-04-27 13:28:40 -07:00
serial.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
usbstring.c USB: <linux/usb_ch9.h> becomes <linux/usb/ch9.h> 2007-02-07 15:44:32 -08:00
zero.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00