From: Jan Andersson Date: Fri, 1 Feb 2008 23:16:59 +0000 (-0800) Subject: USB: fix usbtest halt check on big endian systems X-Git-Tag: v2.6.24.1~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d3d1387be1e0801ec81b23d10f2259b9a2ea387;p=thirdparty%2Fkernel%2Fstable.git 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. Signed-off-by: Jan Andersson Acked-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index ea3162146481f..81755d06a4192 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) 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;