提交 457a902b 编写于 作者: W Will McVicker 提交者: Greg Kroah-Hartman

USB: gadget: f_midi: setup SuperSpeed Plus descriptors

Needed for SuperSpeed Plus support for f_midi.  This allows the
gadget to work properly without crashing at SuperSpeed rates.

Cc: Felipe Balbi <balbi@kernel.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: NWill McVicker <willmcvicker@google.com>
Reviewed-by: NPeter Chen <peter.chen@nxp.com>
Link: https://lore.kernel.org/r/20201127140559.381351-4-gregkh@linuxfoundation.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 3ee05c20
......@@ -1048,6 +1048,12 @@ static int f_midi_bind(struct usb_configuration *c, struct usb_function *f)
f->ss_descriptors = usb_copy_descriptors(midi_function);
if (!f->ss_descriptors)
goto fail_f_midi;
if (gadget_is_superspeed_plus(c->cdev->gadget)) {
f->ssp_descriptors = usb_copy_descriptors(midi_function);
if (!f->ssp_descriptors)
goto fail_f_midi;
}
}
kfree(midi_function);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册