Files
linux/drivers
John Keeping 112b8a8f55 usb: f_fs: Force Reserved1=1 in OS_DESC_EXT_COMPAT
commit a3acc69608 upstream.

The specification says that the Reserved1 field in OS_DESC_EXT_COMPAT
must have the value "1", but when this feature was first implemented we
rejected any non-zero values.

This was adjusted to accept all non-zero values (while now rejecting
zero) in commit 53642399aa ("usb: gadget: f_fs: Fix wrong check on
reserved1 of OS_DESC_EXT_COMPAT"), but that breaks any userspace
programs that worked previously by returning EINVAL when Reserved1 == 0
which was previously the only value that succeeded!

If we just set the field to "1" ourselves, both old and new userspace
programs continue to work correctly and, as a bonus, old programs are
now compliant with the specification without having to fix anything
themselves.

Fixes: 53642399aa ("usb: gadget: f_fs: Fix wrong check on reserved1 of OS_DESC_EXT_COMPAT")
Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-14 09:28:15 +01:00
..
2016-12-05 14:53:46 -05:00
2017-11-24 08:33:42 +01:00
2017-12-09 22:01:53 +01:00
2017-10-18 09:35:38 +02:00
2017-10-12 11:51:24 +02:00
2017-09-09 17:39:41 +02:00
2016-09-20 20:57:12 +10:00
2017-11-21 09:23:25 +01:00