Commit 54bee6e1 authored by Mikael Pettersson's avatar Mikael Pettersson Committed by Greg Kroah-Hartman

USB: Fix alignment of buffer passed down to ->hub_control()

Implementations assume the buffer is at least 4 byte aligned.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a1484827
...@@ -345,7 +345,8 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb) ...@@ -345,7 +345,8 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)
struct usb_ctrlrequest *cmd; struct usb_ctrlrequest *cmd;
u16 typeReq, wValue, wIndex, wLength; u16 typeReq, wValue, wIndex, wLength;
u8 *ubuf = urb->transfer_buffer; 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; const u8 *bufp = tbuf;
int len = 0; int len = 0;
int patch_wakeup = 0; int patch_wakeup = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment