]> err.no Git - linux-2.6/commitdiff
usb: fix usbtest halt check on big endian systems
authorJan Andersson <jan@gaisler.com>
Tue, 8 Jan 2008 15:39:49 +0000 (16:39 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Feb 2008 22:34:46 +0000 (14:34 -0800)
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>
drivers/usb/misc/usbtest.c

index ea3162146481fa4791a4ec750b4c1f5a6b83bc77..81755d06a41926f66180873ad4f2450d2fe33eae 100644 (file)
@@ -1151,6 +1151,7 @@ static int verify_halted (int ep, struct urb *urb)
                dbg ("ep %02x couldn't get halt status, %d", ep, retval);
                return retval;
        }
+       le16_to_cpus(&status);
        if (status != 1) {
                dbg ("ep %02x bogus status: %04x != 1", ep, status);
                return -EINVAL;