On Sat, 23 Sep 2006 17:05:31 -0700 (PDT), David Miller wrote:
>[USB]: Fix alignment of buffer passed down to ->hub_control()
>
>Implementations assume the buffer is at least 4 byte aligned.
>
>Signed-off-by: David S. Miller <[email protected]>
>
>diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
>index fb4d058..7766d7b 100644
>--- a/drivers/usb/core/hcd.c
>+++ b/drivers/usb/core/hcd.c
>@@ -344,7 +344,8 @@ static int rh_call_control (struct usb_h
> struct usb_ctrlrequest *cmd;
> u16 typeReq, wValue, wIndex, wLength;
> u8 *ubuf = urb->transfer_buffer;
>- u8 tbuf [sizeof (struct usb_hub_descriptor)];
>+ u8 tbuf [sizeof (struct usb_hub_descriptor)]
>+ __attribute__((aligned(4)));
> const u8 *bufp = tbuf;
> int len = 0;
> int patch_wakeup = 0;
>
Thanks, this eliminated the USB alignment traps in my
gcc-4.1.1 compiled sparc64 kernel.
/Mikael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]