diff options
| author | Koen Kooi <koen@openembedded.org> | 2007-09-14 07:43:03 +0000 |
|---|---|---|
| committer | Koen Kooi <koen@openembedded.org> | 2007-09-14 07:43:03 +0000 |
| commit | 2019b37bac10cff32469452eb3061e6e8e8aaad4 (patch) | |
| tree | 79aa76f03f001988977386a9c13e59cebfe7c57b /packages/linux/linux-2.6.18/usb-zero-align-all-descriptors-on-a-word-boundary.patch | |
| parent | 7a5c873a58cdc4130eb4a14c5af0960f8ec6d81a (diff) | |
| parent | a50f3c05fc84d7d914e6a8287c82581462302bbe (diff) | |
propagate from branch 'org.openembedded.dev' (head bbdff51149f19a443ea4c897e2b4eb81eec6283a)
to branch 'org.openembedded.dev.avr32' (head ef59785d9aa6d25f6cf33266a65b61426e620f71)
Diffstat (limited to 'packages/linux/linux-2.6.18/usb-zero-align-all-descriptors-on-a-word-boundary.patch')
| -rw-r--r-- | packages/linux/linux-2.6.18/usb-zero-align-all-descriptors-on-a-word-boundary.patch | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/packages/linux/linux-2.6.18/usb-zero-align-all-descriptors-on-a-word-boundary.patch b/packages/linux/linux-2.6.18/usb-zero-align-all-descriptors-on-a-word-boundary.patch new file mode 100644 index 0000000000..e9143eec58 --- /dev/null +++ b/packages/linux/linux-2.6.18/usb-zero-align-all-descriptors-on-a-word-boundary.patch @@ -0,0 +1,107 @@ +From nobody Mon Sep 17 00:00:00 2001 +From: HÃ¥vard Skinnemoen <hskinnemoen@atmel.com> +Date: Tue Feb 28 08:51:18 2006 +0100 +Subject: [PATCH] USB Zero: Align all descriptors on a word boundary + +Seems like gcc has problems with packed structs, so we'll just align +them explicitly. + +--- + + drivers/usb/gadget/zero.c | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +Index: linux-2.6.18-avr32/drivers/usb/gadget/zero.c +=================================================================== +--- linux-2.6.18-avr32.orig/drivers/usb/gadget/zero.c 2006-09-11 14:36:02.000000000 +0200 ++++ linux-2.6.18-avr32/drivers/usb/gadget/zero.c 2006-09-12 10:19:02.000000000 +0200 +@@ -221,7 +221,7 @@ module_param (loopdefault, bool, S_IRUGO + #define CONFIG_LOOPBACK 2 + + static struct usb_device_descriptor +-device_desc = { ++device_desc __attribute__((aligned(2))) = { + .bLength = sizeof device_desc, + .bDescriptorType = USB_DT_DEVICE, + +@@ -237,7 +237,7 @@ device_desc = { + }; + + static struct usb_config_descriptor +-source_sink_config = { ++source_sink_config __attribute__((aligned(2))) = { + .bLength = sizeof source_sink_config, + .bDescriptorType = USB_DT_CONFIG, + +@@ -250,7 +250,7 @@ source_sink_config = { + }; + + static struct usb_config_descriptor +-loopback_config = { ++loopback_config __attribute__((aligned(2))) = { + .bLength = sizeof loopback_config, + .bDescriptorType = USB_DT_CONFIG, + +@@ -273,7 +273,7 @@ otg_descriptor = { + /* one interface in each configuration */ + + static const struct usb_interface_descriptor +-source_sink_intf = { ++source_sink_intf __attribute__((aligned(2))) = { + .bLength = sizeof source_sink_intf, + .bDescriptorType = USB_DT_INTERFACE, + +@@ -283,7 +283,7 @@ source_sink_intf = { + }; + + static const struct usb_interface_descriptor +-loopback_intf = { ++loopback_intf __attribute__((aligned(2))) = { + .bLength = sizeof loopback_intf, + .bDescriptorType = USB_DT_INTERFACE, + +@@ -295,7 +295,7 @@ loopback_intf = { + /* two full speed bulk endpoints; their use is config-dependent */ + + static struct usb_endpoint_descriptor +-fs_source_desc = { ++fs_source_desc __attribute__((aligned(2))) = { + .bLength = USB_DT_ENDPOINT_SIZE, + .bDescriptorType = USB_DT_ENDPOINT, + +@@ -304,7 +304,7 @@ fs_source_desc = { + }; + + static struct usb_endpoint_descriptor +-fs_sink_desc = { ++fs_sink_desc __attribute__((aligned(2))) = { + .bLength = USB_DT_ENDPOINT_SIZE, + .bDescriptorType = USB_DT_ENDPOINT, + +@@ -340,7 +340,7 @@ static const struct usb_descriptor_heade + */ + + static struct usb_endpoint_descriptor +-hs_source_desc = { ++hs_source_desc __attribute__((aligned(2))) = { + .bLength = USB_DT_ENDPOINT_SIZE, + .bDescriptorType = USB_DT_ENDPOINT, + +@@ -349,7 +349,7 @@ hs_source_desc = { + }; + + static struct usb_endpoint_descriptor +-hs_sink_desc = { ++hs_sink_desc __attribute__((aligned(2))) = { + .bLength = USB_DT_ENDPOINT_SIZE, + .bDescriptorType = USB_DT_ENDPOINT, + +@@ -358,7 +358,7 @@ hs_sink_desc = { + }; + + static struct usb_qualifier_descriptor +-dev_qualifier = { ++dev_qualifier __attribute__((aligned(2))) = { + .bLength = sizeof dev_qualifier, + .bDescriptorType = USB_DT_DEVICE_QUALIFIER, + |
