diff options
author | Peter Chen <[email protected]> | 2019-12-12 16:35:03 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2020-01-15 10:39:22 +0100 |
commit | d2450c6937018d40d4111fe830fa48d4ddceb8d0 (patch) | |
tree | af6f8a5171e0ff16d362cf1b74ab4d74430658e5 /tools/perf/scripts/python | |
parent | a02497033e8e04c30501abb78c92d862982b9912 (diff) |
usb: gadget: f_fs: set req->num_sgs as 0 for non-sg transfer
The UDC core uses req->num_sgs to judge if scatter buffer list is used.
Eg: usb_gadget_map_request_by_dev. For f_fs sync io mode, the request
is re-used for each request, so if the 1st request->length > PAGE_SIZE,
and the 2nd request->length is <= PAGE_SIZE, the f_fs uses the 1st
req->num_sgs for the 2nd request, it causes the UDC core get the wrong
req->num_sgs value (The 2nd request doesn't use sg). For f_fs async
io mode, it is not harm to initialize req->num_sgs as 0 either, in case,
the UDC driver doesn't zeroed request structure.
Cc: Jun Li <[email protected]>
Cc: stable <[email protected]>
Fixes: 772a7a724f69 ("usb: gadget: f_fs: Allow scatter-gather buffers")
Signed-off-by: Peter Chen <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions