提交 a0c25c20 编写于 作者: J Jonas Andersson 提交者: 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: NJonas Andersson <jonas@microbit.se>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册