mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
Merge 2c3e83538f ("usb: gadget: f_tcm: Fix Get/SetInterface return value") into android14-6.1-lts
Steps on the way to 6.1.129 Change-Id: Id44c263751cf95215390ad95c101ec68edf461ed Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -2079,9 +2079,14 @@ static void tcm_delayed_set_alt(struct work_struct *wq)
|
|||||||
|
|
||||||
static int tcm_get_alt(struct usb_function *f, unsigned intf)
|
static int tcm_get_alt(struct usb_function *f, unsigned intf)
|
||||||
{
|
{
|
||||||
if (intf == bot_intf_desc.bInterfaceNumber)
|
struct f_uas *fu = to_f_uas(f);
|
||||||
|
|
||||||
|
if (fu->iface != intf)
|
||||||
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
|
if (fu->flags & USBG_IS_BOT)
|
||||||
return USB_G_ALT_INT_BBB;
|
return USB_G_ALT_INT_BBB;
|
||||||
if (intf == uasp_intf_desc.bInterfaceNumber)
|
else if (fu->flags & USBG_IS_UAS)
|
||||||
return USB_G_ALT_INT_UAS;
|
return USB_G_ALT_INT_UAS;
|
||||||
|
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
@@ -2091,6 +2096,9 @@ static int tcm_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
|
|||||||
{
|
{
|
||||||
struct f_uas *fu = to_f_uas(f);
|
struct f_uas *fu = to_f_uas(f);
|
||||||
|
|
||||||
|
if (fu->iface != intf)
|
||||||
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
if ((alt == USB_G_ALT_INT_BBB) || (alt == USB_G_ALT_INT_UAS)) {
|
if ((alt == USB_G_ALT_INT_BBB) || (alt == USB_G_ALT_INT_UAS)) {
|
||||||
struct guas_setup_wq *work;
|
struct guas_setup_wq *work;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user