summaryrefslogtreecommitdiff
path: root/packages/linux/linux-2.6.18/usb-serial-align-all-descriptors-on-a-word-boundary.patch
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2008-01-23 10:55:05 +0000
committerKoen Kooi <koen@openembedded.org>2008-01-23 10:55:05 +0000
commit1f3a0258e6e34ba036e057b5cd93f085c80f7147 (patch)
treec09da08377cea0f132d811e6cc16fb68a379f67c /packages/linux/linux-2.6.18/usb-serial-align-all-descriptors-on-a-word-boundary.patch
parent80ed869c73abee32442ead36dec94b4b84020a97 (diff)
parentf0d173cd5077621891f8298dc259476c72719bc0 (diff)
propagate from branch 'org.openembedded.dev' (head 558d7f8556530ca23dc6e4b7d687d6727d3a7397)
to branch 'org.openembedded.dev.avr32' (head d7597829fe950aa86acdfe521d11843d7277261c)
Diffstat (limited to 'packages/linux/linux-2.6.18/usb-serial-align-all-descriptors-on-a-word-boundary.patch')
-rw-r--r--packages/linux/linux-2.6.18/usb-serial-align-all-descriptors-on-a-word-boundary.patch140
1 files changed, 140 insertions, 0 deletions
diff --git a/packages/linux/linux-2.6.18/usb-serial-align-all-descriptors-on-a-word-boundary.patch b/packages/linux/linux-2.6.18/usb-serial-align-all-descriptors-on-a-word-boundary.patch
new file mode 100644
index 0000000000..f78063c9fb
--- /dev/null
+++ b/packages/linux/linux-2.6.18/usb-serial-align-all-descriptors-on-a-word-boundary.patch
@@ -0,0 +1,140 @@
+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 Serial: 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/serial.c | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+Index: linux-2.6.18-avr32/drivers/usb/gadget/serial.c
+===================================================================
+--- linux-2.6.18-avr32.orig/drivers/usb/gadget/serial.c 2006-09-11 14:36:02.000000000 +0200
++++ linux-2.6.18-avr32/drivers/usb/gadget/serial.c 2006-09-12 10:17:52.000000000 +0200
+@@ -333,7 +333,7 @@ static struct usb_gadget_strings gs_stri
+ .strings = gs_strings,
+ };
+
+-static struct usb_device_descriptor gs_device_desc = {
++static struct usb_device_descriptor __attribute__((aligned(2))) gs_device_desc = {
+ .bLength = USB_DT_DEVICE_SIZE,
+ .bDescriptorType = USB_DT_DEVICE,
+ .bcdUSB = __constant_cpu_to_le16(0x0200),
+@@ -353,7 +353,7 @@ static struct usb_otg_descriptor gs_otg_
+ .bmAttributes = USB_OTG_SRP,
+ };
+
+-static struct usb_config_descriptor gs_bulk_config_desc = {
++static struct usb_config_descriptor __attribute__((aligned(2))) gs_bulk_config_desc = {
+ .bLength = USB_DT_CONFIG_SIZE,
+ .bDescriptorType = USB_DT_CONFIG,
+ /* .wTotalLength computed dynamically */
+@@ -364,7 +364,7 @@ static struct usb_config_descriptor gs_b
+ .bMaxPower = 1,
+ };
+
+-static struct usb_config_descriptor gs_acm_config_desc = {
++static struct usb_config_descriptor __attribute__((aligned(2))) gs_acm_config_desc = {
+ .bLength = USB_DT_CONFIG_SIZE,
+ .bDescriptorType = USB_DT_CONFIG,
+ /* .wTotalLength computed dynamically */
+@@ -375,7 +375,7 @@ static struct usb_config_descriptor gs_a
+ .bMaxPower = 1,
+ };
+
+-static const struct usb_interface_descriptor gs_bulk_interface_desc = {
++static const struct usb_interface_descriptor __attribute__((aligned(2))) gs_bulk_interface_desc = {
+ .bLength = USB_DT_INTERFACE_SIZE,
+ .bDescriptorType = USB_DT_INTERFACE,
+ .bInterfaceNumber = GS_BULK_INTERFACE_ID,
+@@ -386,7 +386,7 @@ static const struct usb_interface_descri
+ .iInterface = GS_DATA_STR_ID,
+ };
+
+-static const struct usb_interface_descriptor gs_control_interface_desc = {
++static const struct usb_interface_descriptor __attribute__((aligned(2))) gs_control_interface_desc = {
+ .bLength = USB_DT_INTERFACE_SIZE,
+ .bDescriptorType = USB_DT_INTERFACE,
+ .bInterfaceNumber = GS_CONTROL_INTERFACE_ID,
+@@ -397,7 +397,7 @@ static const struct usb_interface_descri
+ .iInterface = GS_CONTROL_STR_ID,
+ };
+
+-static const struct usb_interface_descriptor gs_data_interface_desc = {
++static const struct usb_interface_descriptor __attribute__((aligned(2))) gs_data_interface_desc = {
+ .bLength = USB_DT_INTERFACE_SIZE,
+ .bDescriptorType = USB_DT_INTERFACE,
+ .bInterfaceNumber = GS_DATA_INTERFACE_ID,
+@@ -408,7 +408,7 @@ static const struct usb_interface_descri
+ .iInterface = GS_DATA_STR_ID,
+ };
+
+-static const struct usb_cdc_header_desc gs_header_desc = {
++static const struct usb_cdc_header_desc __attribute__((aligned(2))) gs_header_desc = {
+ .bLength = sizeof(gs_header_desc),
+ .bDescriptorType = USB_DT_CS_INTERFACE,
+ .bDescriptorSubType = USB_CDC_HEADER_TYPE,
+@@ -438,7 +438,7 @@ static const struct usb_cdc_union_desc g
+ .bSlaveInterface0 = 1, /* index of data interface */
+ };
+
+-static struct usb_endpoint_descriptor gs_fullspeed_notify_desc = {
++static struct usb_endpoint_descriptor __attribute__((aligned(2))) gs_fullspeed_notify_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+ .bEndpointAddress = USB_DIR_IN,
+@@ -447,14 +447,14 @@ static struct usb_endpoint_descriptor gs
+ .bInterval = 1 << GS_LOG2_NOTIFY_INTERVAL,
+ };
+
+-static struct usb_endpoint_descriptor gs_fullspeed_in_desc = {
++static struct usb_endpoint_descriptor __attribute__((aligned(2))) gs_fullspeed_in_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+ .bEndpointAddress = USB_DIR_IN,
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+ };
+
+-static struct usb_endpoint_descriptor gs_fullspeed_out_desc = {
++static struct usb_endpoint_descriptor __attribute__((aligned(2))) gs_fullspeed_out_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+ .bEndpointAddress = USB_DIR_OUT,
+@@ -484,7 +484,7 @@ static const struct usb_descriptor_heade
+ };
+
+ #ifdef CONFIG_USB_GADGET_DUALSPEED
+-static struct usb_endpoint_descriptor gs_highspeed_notify_desc = {
++static struct usb_endpoint_descriptor __attribute__((aligned(2))) gs_highspeed_notify_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+ .bEndpointAddress = USB_DIR_IN,
+@@ -493,21 +493,21 @@ static struct usb_endpoint_descriptor gs
+ .bInterval = GS_LOG2_NOTIFY_INTERVAL+4,
+ };
+
+-static struct usb_endpoint_descriptor gs_highspeed_in_desc = {
++static struct usb_endpoint_descriptor __attribute__((aligned(2))) gs_highspeed_in_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+ .wMaxPacketSize = __constant_cpu_to_le16(512),
+ };
+
+-static struct usb_endpoint_descriptor gs_highspeed_out_desc = {
++static struct usb_endpoint_descriptor __attribute__((aligned(2))) gs_highspeed_out_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+ .wMaxPacketSize = __constant_cpu_to_le16(512),
+ };
+
+-static struct usb_qualifier_descriptor gs_qualifier_desc = {
++static struct usb_qualifier_descriptor __attribute__((aligned(2))) gs_qualifier_desc = {
+ .bLength = sizeof(struct usb_qualifier_descriptor),
+ .bDescriptorType = USB_DT_DEVICE_QUALIFIER,
+ .bcdUSB = __constant_cpu_to_le16 (0x0200),