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: Jonas Andersson <jonas@microbit.se> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
a8779ee94e
commit
a0c25c2050
|
@ -1189,6 +1189,8 @@ printer_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
|
||||||
else if (gadget->a_alt_hnp_support)
|
else if (gadget->a_alt_hnp_support)
|
||||||
DBG(dev, "HNP needs a different root port\n");
|
DBG(dev, "HNP needs a different root port\n");
|
||||||
value = printer_set_config(dev, wValue);
|
value = printer_set_config(dev, wValue);
|
||||||
|
if (!value)
|
||||||
|
value = set_interface(dev, PRINTER_INTERFACE);
|
||||||
break;
|
break;
|
||||||
case USB_REQ_GET_CONFIGURATION:
|
case USB_REQ_GET_CONFIGURATION:
|
||||||
if (ctrl->bRequestType != USB_DIR_IN)
|
if (ctrl->bRequestType != USB_DIR_IN)
|
||||||
|
|
Loading…
Reference in New Issue