Commit 92164c5d authored by David Miller's avatar David Miller Committed by Greg Kroah-Hartman

[PATCH] USB: OHCI hub code unaligned access

I noticed this while debugging something unrelated on
sparc64.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Acked-by: default avatarDavid Brownell <david-b@pacbell.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c0f8d561
...@@ -581,14 +581,14 @@ static int ohci_hub_control ( ...@@ -581,14 +581,14 @@ static int ohci_hub_control (
break; break;
case GetHubStatus: case GetHubStatus:
temp = roothub_status (ohci) & ~(RH_HS_CRWE | RH_HS_DRWE); temp = roothub_status (ohci) & ~(RH_HS_CRWE | RH_HS_DRWE);
*(__le32 *) buf = cpu_to_le32 (temp); put_unaligned(cpu_to_le32 (temp), (__le32 *) buf);
break; break;
case GetPortStatus: case GetPortStatus:
if (!wIndex || wIndex > ports) if (!wIndex || wIndex > ports)
goto error; goto error;
wIndex--; wIndex--;
temp = roothub_portstatus (ohci, wIndex); temp = roothub_portstatus (ohci, wIndex);
*(__le32 *) buf = cpu_to_le32 (temp); put_unaligned(cpu_to_le32 (temp), (__le32 *) buf);
#ifndef OHCI_VERBOSE_DEBUG #ifndef OHCI_VERBOSE_DEBUG
if (*(u16*)(buf+2)) /* only if wPortChange is interesting */ if (*(u16*)(buf+2)) /* only if wPortChange is interesting */
......
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