Skip to content

Commit

Permalink
USB: dbpg gadget: dont mask out direction bit
Browse files Browse the repository at this point in the history
Stripping the direction bit off will produce an
invalid descriptor.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Sven Schnelle authored and Greg Kroah-Hartman committed Apr 30, 2011
1 parent 83b7201 commit a8779ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/gadget/dbgp.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,8 @@ static int __init dbgp_configure_endpoints(struct usb_gadget *gadget)
o_desc.wMaxPacketSize =
__constant_cpu_to_le16(USB_DEBUG_MAX_PACKET_SIZE);

dbg_desc.bDebugInEndpoint = i_desc.bEndpointAddress & 0x7f;
dbg_desc.bDebugOutEndpoint = o_desc.bEndpointAddress & 0x7f;
dbg_desc.bDebugInEndpoint = i_desc.bEndpointAddress;
dbg_desc.bDebugOutEndpoint = o_desc.bEndpointAddress;

#ifdef CONFIG_USB_G_DBGP_SERIAL
dbgp.serial->in = dbgp.i_ep;
Expand Down

0 comments on commit a8779ee

Please sign in to comment.