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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4b24f91c24
commit
6ce4560a39
@@ -1151,6 +1151,7 @@ static int verify_halted (int ep, struct urb *urb)
|
|||||||
dbg ("ep %02x couldn't get halt status, %d", ep, retval);
|
dbg ("ep %02x couldn't get halt status, %d", ep, retval);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
le16_to_cpus(&status);
|
||||||
if (status != 1) {
|
if (status != 1) {
|
||||||
dbg ("ep %02x bogus status: %04x != 1", ep, status);
|
dbg ("ep %02x bogus status: %04x != 1", ep, status);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
Reference in New Issue
Block a user