Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (100 commits)
  usb-storage: revert DMA-alignment change for Wireless USB
  USB: use reset_resume when normal resume fails
  usb_gadget: composite cdc gadget fault handling
  usb gadget: minor USBCV fix for composite framework
  USB: Fix bug with byte order in isp116x-hcd.c fio write/read
  USB: fix double kfree in ipaq in error case
  USB: fix build error in cdc-acm for CONFIG_PM=n
  USB: remove board-specific UP2OCR configuration from pxa27x-udc
  USB: EHCI: Reconciling USB register differences on MPC85xx vs MPC83xx
  USB: Fix pointer/int cast in USB devio code
  usb gadget: g_cdc dependso on NET
  USB: Au1xxx-usb: suspend/resume support.
  USB: Au1xxx-usb: clean up ohci/ehci bus glue sources.
  usbfs: don't store bad pointers in registration
  usbfs: fix race between open and unregister
  usbfs: simplify the lookup-by-minor routines
  usbfs: send disconnect signals when device is unregistered
  USB: Force unbinding of drivers lacking reset_resume or other methods
  USB: ohci-pnx4008: I2C cleanups and fixes
  USB: debug port converter does not accept more than 8 byte packets
  ...
  • Loading branch information
torvalds committed Jul 21, 2008
2 parents 6d52dcb + f756cbd commit 93ded9b
Show file tree
Hide file tree
Showing 142 changed files with 11,665 additions and 8,993 deletions.
38 changes: 38 additions & 0 deletions Documentation/DocBook/gadget.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,44 @@ These utilities include endpoint autoconfiguration.
<!-- !Edrivers/usb/gadget/epautoconf.c -->
</sect1>

<sect1 id="composite"><title>Composite Device Framework</title>

<para>The core API is sufficient for writing drivers for composite
USB devices (with more than one function in a given configuration),
and also multi-configuration devices (also more than one function,
but not necessarily sharing a given configuration).
There is however an optional framework which makes it easier to
reuse and combine functions.
</para>

<para>Devices using this framework provide a <emphasis>struct
usb_composite_driver</emphasis>, which in turn provides one or
more <emphasis>struct usb_configuration</emphasis> instances.
Each such configuration includes at least one
<emphasis>struct usb_function</emphasis>, which packages a user
visible role such as "network link" or "mass storage device".
Management functions may also exist, such as "Device Firmware
Upgrade".
</para>

!Iinclude/linux/usb/composite.h
!Edrivers/usb/gadget/composite.c

</sect1>

<sect1 id="functions"><title>Composite Device Functions</title>

<para>At this writing, a few of the current gadget drivers have
been converted to this framework.
Near-term plans include converting all of them, except for "gadgetfs".
</para>

!Edrivers/usb/gadget/f_acm.c
!Edrivers/usb/gadget/f_serial.c

</sect1>


</chapter>

<chapter id="controllers"><title>Peripheral Controller Drivers</title>
Expand Down
35 changes: 26 additions & 9 deletions Documentation/usb/gadget_serial.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

Linux Gadget Serial Driver v2.0
11/20/2004
(updated 8-May-2008 for v2.3)


License and Disclaimer
Expand Down Expand Up @@ -31,7 +32,7 @@ Prerequisites
-------------
Versions of the gadget serial driver are available for the
2.4 Linux kernels, but this document assumes you are using
version 2.0 or later of the gadget serial driver in a 2.6
version 2.3 or later of the gadget serial driver in a 2.6
Linux kernel.

This document assumes that you are familiar with Linux and
Expand All @@ -40,6 +41,12 @@ standard utilities, use minicom and HyperTerminal, and work with
USB and serial devices. It also assumes you configure the Linux
gadget and usb drivers as modules.

With version 2.3 of the driver, major and minor device nodes are
no longer statically defined. Your Linux based system should mount
sysfs in /sys, and use "mdev" (in Busybox) or "udev" to make the
/dev nodes matching the sysfs /sys/class/tty files.



Overview
--------
Expand Down Expand Up @@ -104,15 +111,8 @@ driver. All this are listed under "USB Gadget Support" when
configuring the kernel. Then rebuild and install the kernel or
modules.

The gadget serial driver uses major number 127, for now. So you
will need to create a device node for it, like this:

mknod /dev/ttygserial c 127 0

You only need to do this once.

Then you must load the gadget serial driver. To load it as an
ACM device, do this:
ACM device (recommended for interoperability), do this:

modprobe g_serial use_acm=1

Expand All @@ -125,6 +125,23 @@ controller driver. This must be done each time you reboot the gadget
side Linux system. You can add this to the start up scripts, if
desired.

Your system should use mdev (from busybox) or udev to make the
device nodes. After this gadget driver has been set up you should
then see a /dev/ttyGS0 node:

# ls -l /dev/ttyGS0 | cat
crw-rw---- 1 root root 253, 0 May 8 14:10 /dev/ttyGS0
#

Note that the major number (253, above) is system-specific. If
you need to create /dev nodes by hand, the right numbers to use
will be in the /sys/class/tty/ttyGS0/dev file.

When you link this gadget driver early, perhaps even statically,
you may want to set up an /etc/inittab entry to run "getty" on it.
The /dev/ttyGS0 line should work like most any other serial port.


If gadget serial is loaded as an ACM device you will want to use
either the Windows or Linux ACM driver on the host side. If gadget
serial is loaded as a bulk in/out device, you will want to use the
Expand Down
7 changes: 5 additions & 2 deletions Documentation/usb/persist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,11 @@ re-enumeration shows that the device now attached to that port has the
same descriptors as before, including the Vendor and Product IDs, then
the kernel continues to use the same device structure. In effect, the
kernel treats the device as though it had merely been reset instead of
unplugged. The same thing happens if the host controller is in the
expected state but a USB device was unplugged and then replugged.
unplugged.

The same thing happens if the host controller is in the expected state
but a USB device was unplugged and then replugged, or if a USB device
fails to carry out a normal resume.

If no device is now attached to the port, or if the descriptors are
different from what the kernel remembers, then the treatment is what
Expand Down
165 changes: 0 additions & 165 deletions Documentation/usb/uhci.txt

This file was deleted.

2 changes: 1 addition & 1 deletion drivers/hid/usbhid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ static void hid_reset(struct work_struct *work)
dev_dbg(&usbhid->intf->dev, "resetting device\n");
rc = rc_lock = usb_lock_device_for_reset(hid_to_usb_dev(hid), usbhid->intf);
if (rc_lock >= 0) {
rc = usb_reset_composite_device(hid_to_usb_dev(hid), usbhid->intf);
rc = usb_reset_device(hid_to_usb_dev(hid));
if (rc_lock)
usb_unlock_device(hid_to_usb_dev(hid));
}
Expand Down
1 change: 0 additions & 1 deletion drivers/usb/atm/cxacru.c
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,6 @@ static int cxacru_bind(struct usbatm_data *usbatm_instance,

instance->usbatm = usbatm_instance;
instance->modem_type = (struct cxacru_modem_type *) id->driver_info;
memset(instance->card_info, 0, sizeof(instance->card_info));

mutex_init(&instance->poll_state_serialize);
instance->poll_state = CXPOLL_STOPPED;
Expand Down
1 change: 0 additions & 1 deletion drivers/usb/atm/speedtch.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,6 @@ static int speedtch_bind(struct usbatm_data *usbatm,
if (use_isoc) {
const struct usb_host_interface *desc = data_intf->cur_altsetting;
const __u8 target_address = USB_DIR_IN | usbatm->driver->isoc_in;
int i;

use_isoc = 0; /* fall back to bulk if endpoint not found */

Expand Down
Loading

0 comments on commit 93ded9b

Please sign in to comment.