USB: EHCI Debug Port Device Gadget

This is a patch that implements an USB EHCI Debug Device using the
Gadget API. This patch applies to a 2.6.35-rc3 kernel.

The gadget needs a compliant usb controller that forwards the
USB_DEVICE_DEBUG_MODE feature to its gadget.

The gadget provides two configuration modes, one that only printk() the
received data, and one that exposes a serial device to userland
(/dev/ttyGSxxx).

The gadget has been tested on an IGEPv2 board running a 2.6.35-rc1
kernel. The debug port was fed on the host side by a 2.6.34 kernel.

Signed-off-by: Stephane Duverger <stephane.duverger@gmail.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
USB: g_serial: fix compilation.

Without that fix we have errors like:
   u_serial.c:368:4: error: 'TASK_INTERRUPTIBLE' undeclared
when selecting CONFIG_USB_G_DBGP_SERIAL.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
USB: dbgp gadget: fix return value of dbgp_setup

Current code returns 0 even if it can't handle the request.
This leads to timeouts when an unhandled request is sent:

Bus 001 Device 003: ID 0525:c0de Netchip Technology, Inc.
Device Descriptor:
[..]
can't get device qualifier: Connection timed out
[..]

change the code to return EOPNOTSUPP in such cases.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
USB: dbgp gadget: set MaxpacketSize0

The current code doesn't set it, so linux complains about
it when connected, and ignores the device:

[104611.068082] usb 1-5: new high speed USB device using ehci_hcd and address 127
[104611.088368] usb 1-5: Invalid ep0 maxpacket: 0

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
USB: dbpg gadget: dont mask out direction bit

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>
USB: musb: forward debug mode feature to gadget

This is a patch for the musb usb controller.

It allows forwarding of the debug mode feature to its gadget in order
to be able to act as an ehci debug device.

This patch has been tested on an IGEPv2 board running a 2.6.35-rc1
kernel.

Signed-off-by: Stephane Duverger <stephane.duverger@gmail.com>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Merge pull request #10 from GNUtoo/master

USB Gadget debug interface