Commit a0c25c20 authored by Jonas Andersson's avatar Jonas Andersson Committed by Greg Kroah-Hartman

USB: g_printer required set interface request

g_printer reqiured "set interface" request from host. Not all hosts send
this request.  This patch enable the interface when it get "set
configuration" request from host.
Signed-off-by: default avatarJonas Andersson <jonas@microbit.se>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a8779ee9
......@@ -1189,6 +1189,8 @@ printer_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
else if (gadget->a_alt_hnp_support)
DBG(dev, "HNP needs a different root port\n");
value = printer_set_config(dev, wValue);
if (!value)
value = set_interface(dev, PRINTER_INTERFACE);
break;
case USB_REQ_GET_CONFIGURATION:
if (ctrl->bRequestType != USB_DIR_IN)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment