linux_dsm_epyc7002/drivers/usb/gadget/function
John Keeping a3acc69608 usb: f_fs: Force Reserved1=1 in OS_DESC_EXT_COMPAT
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")
Cc: <stable@vger.kernel.org>
Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2017-11-28 13:05:31 +02:00
..
f_acm.c A couple of configfs cleanups: 2017-11-14 14:44:04 -08:00
f_ecm.c A couple of configfs cleanups: 2017-11-14 14:44:04 -08:00
f_eem.c A couple of configfs cleanups: 2017-11-14 14:44:04 -08:00
f_fs.c usb: f_fs: Force Reserved1=1 in OS_DESC_EXT_COMPAT 2017-11-28 13:05:31 +02:00
f_hid.c A couple of configfs cleanups: 2017-11-14 14:44:04 -08:00
f_loopback.c A couple of configfs cleanups: 2017-11-14 14:44:04 -08:00
f_mass_storage.c A couple of configfs cleanups: 2017-11-14 14:44:04 -08:00
f_mass_storage.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
f_midi.c A couple of configfs cleanups: 2017-11-14 14:44:04 -08:00
f_ncm.c A couple of configfs cleanups: 2017-11-14 14:44:04 -08:00
f_obex.c A couple of configfs cleanups: 2017-11-14 14:44:04 -08:00
f_phonet.c A couple of configfs cleanups: 2017-11-14 14:44:04 -08:00
f_printer.c A couple of configfs cleanups: 2017-11-14 14:44:04 -08:00
f_rndis.c A couple of configfs cleanups: 2017-11-14 14:44:04 -08:00
f_serial.c A couple of configfs cleanups: 2017-11-14 14:44:04 -08:00
f_sourcesink.c A couple of configfs cleanups: 2017-11-14 14:44:04 -08:00
f_subset.c A couple of configfs cleanups: 2017-11-14 14:44:04 -08:00
f_tcm.c A couple of configfs cleanups: 2017-11-14 14:44:04 -08:00
f_uac1_legacy.c A couple of configfs cleanups: 2017-11-14 14:44:04 -08:00
f_uac1.c A couple of configfs cleanups: 2017-11-14 14:44:04 -08:00
f_uac2.c A couple of configfs cleanups: 2017-11-14 14:44:04 -08:00
f_uvc.c USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
f_uvc.h USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
g_zero.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ndis.h
rndis.c USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
rndis.h USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
storage_common.c USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
storage_common.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tcm.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
u_audio.c USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
u_audio.h USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
u_ecm.h USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
u_eem.h USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
u_ether_configfs.h USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
u_ether.c USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
u_ether.h USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
u_fs.h USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
u_gether.h USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
u_hid.h USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
u_midi.h USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
u_ncm.h USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
u_phonet.h USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
u_printer.h USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
u_rndis.h USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
u_serial.c USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
u_serial.h USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
u_tcm.h USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
u_uac1_legacy.c USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
u_uac1_legacy.h USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
u_uac1.h USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
u_uac2.h USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
u_uvc.h USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
uvc_configfs.c A couple of configfs cleanups: 2017-11-14 14:44:04 -08:00
uvc_configfs.h USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
uvc_queue.c USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
uvc_queue.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
uvc_v4l2.c USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
uvc_v4l2.h USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
uvc_video.c USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
uvc_video.h USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00
uvc.h USB: gadget: function: Remove redundant license text 2017-11-07 15:45:02 +01:00