aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/usbtest.c
diff options
context:
space:
mode:
authorJan Andersson <jan@gaisler.com>2008-01-08 10:39:49 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-02-01 17:34:46 -0500
commit6ce4560a39f72e45a273c652ee116f8b0fc6386f (patch)
treeceb4ea697b566f6ce903dde22441ba5a91b7a2d1 /drivers/usb/misc/usbtest.c
parent4b24f91c24e27ec7746549d1180b9cbd18f06000 (diff)
usb: fix usbtest halt check on big endian systems
usbtest did not swap the received status information when checking for a non-zero value and failed to discover halted endpoints on big endian systems. Cc: stable <stable@kernel.org> Signed-off-by: Jan Andersson <jan@gaisler.com> Acked-by: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc/usbtest.c')
-rw-r--r--drivers/usb/misc/usbtest.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
index ea3162146481..81755d06a419 100644
--- a/drivers/usb/misc/usbtest.c
+++ b/drivers/usb/misc/usbtest.c
@@ -1151,6 +1151,7 @@ static int verify_halted (int ep, struct urb *urb)
1151 dbg ("ep %02x couldn't get halt status, %d", ep, retval); 1151 dbg ("ep %02x couldn't get halt status, %d", ep, retval);
1152 return retval; 1152 return retval;
1153 } 1153 }
1154 le16_to_cpus(&status);
1154 if (status != 1) { 1155 if (status != 1) {
1155 dbg ("ep %02x bogus status: %04x != 1", ep, status); 1156 dbg ("ep %02x bogus status: %04x != 1", ep, status);
1156 return -EINVAL; 1157 return -EINVAL;