Skip to content

Commit

Permalink
USB: g_printer required set interface request
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jonas Andersson authored and Greg Kroah-Hartman committed Apr 30, 2011
1 parent a8779ee commit a0c25c2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/usb/gadget/printer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a0c25c2

Please sign in to comment.