Skip to content

Commit 93ded9b

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* 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 ...
2 parents 6d52dcb + f756cbd commit 93ded9b

File tree

142 files changed

+11665
-8993
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+11665
-8993
lines changed

Documentation/DocBook/gadget.tmpl

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,44 @@ These utilities include endpoint autoconfiguration.
524524
<!-- !Edrivers/usb/gadget/epautoconf.c -->
525525
</sect1>
526526

527+
<sect1 id="composite"><title>Composite Device Framework</title>
528+
529+
<para>The core API is sufficient for writing drivers for composite
530+
USB devices (with more than one function in a given configuration),
531+
and also multi-configuration devices (also more than one function,
532+
but not necessarily sharing a given configuration).
533+
There is however an optional framework which makes it easier to
534+
reuse and combine functions.
535+
</para>
536+
537+
<para>Devices using this framework provide a <emphasis>struct
538+
usb_composite_driver</emphasis>, which in turn provides one or
539+
more <emphasis>struct usb_configuration</emphasis> instances.
540+
Each such configuration includes at least one
541+
<emphasis>struct usb_function</emphasis>, which packages a user
542+
visible role such as "network link" or "mass storage device".
543+
Management functions may also exist, such as "Device Firmware
544+
Upgrade".
545+
</para>
546+
547+
!Iinclude/linux/usb/composite.h
548+
!Edrivers/usb/gadget/composite.c
549+
550+
</sect1>
551+
552+
<sect1 id="functions"><title>Composite Device Functions</title>
553+
554+
<para>At this writing, a few of the current gadget drivers have
555+
been converted to this framework.
556+
Near-term plans include converting all of them, except for "gadgetfs".
557+
</para>
558+
559+
!Edrivers/usb/gadget/f_acm.c
560+
!Edrivers/usb/gadget/f_serial.c
561+
562+
</sect1>
563+
564+
527565
</chapter>
528566

529567
<chapter id="controllers"><title>Peripheral Controller Drivers</title>

Documentation/usb/gadget_serial.txt

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

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

56

67
License and Disclaimer
@@ -31,7 +32,7 @@ Prerequisites
3132
-------------
3233
Versions of the gadget serial driver are available for the
3334
2.4 Linux kernels, but this document assumes you are using
34-
version 2.0 or later of the gadget serial driver in a 2.6
35+
version 2.3 or later of the gadget serial driver in a 2.6
3536
Linux kernel.
3637

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

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

4451
Overview
4552
--------
@@ -104,15 +111,8 @@ driver. All this are listed under "USB Gadget Support" when
104111
configuring the kernel. Then rebuild and install the kernel or
105112
modules.
106113

107-
The gadget serial driver uses major number 127, for now. So you
108-
will need to create a device node for it, like this:
109-
110-
mknod /dev/ttygserial c 127 0
111-
112-
You only need to do this once.
113-
114114
Then you must load the gadget serial driver. To load it as an
115-
ACM device, do this:
115+
ACM device (recommended for interoperability), do this:
116116

117117
modprobe g_serial use_acm=1
118118

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

128+
Your system should use mdev (from busybox) or udev to make the
129+
device nodes. After this gadget driver has been set up you should
130+
then see a /dev/ttyGS0 node:
131+
132+
# ls -l /dev/ttyGS0 | cat
133+
crw-rw---- 1 root root 253, 0 May 8 14:10 /dev/ttyGS0
134+
#
135+
136+
Note that the major number (253, above) is system-specific. If
137+
you need to create /dev nodes by hand, the right numbers to use
138+
will be in the /sys/class/tty/ttyGS0/dev file.
139+
140+
When you link this gadget driver early, perhaps even statically,
141+
you may want to set up an /etc/inittab entry to run "getty" on it.
142+
The /dev/ttyGS0 line should work like most any other serial port.
143+
144+
128145
If gadget serial is loaded as an ACM device you will want to use
129146
either the Windows or Linux ACM driver on the host side. If gadget
130147
serial is loaded as a bulk in/out device, you will want to use the

Documentation/usb/persist.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,11 @@ re-enumeration shows that the device now attached to that port has the
8181
same descriptors as before, including the Vendor and Product IDs, then
8282
the kernel continues to use the same device structure. In effect, the
8383
kernel treats the device as though it had merely been reset instead of
84-
unplugged. The same thing happens if the host controller is in the
85-
expected state but a USB device was unplugged and then replugged.
84+
unplugged.
85+
86+
The same thing happens if the host controller is in the expected state
87+
but a USB device was unplugged and then replugged, or if a USB device
88+
fails to carry out a normal resume.
8689

8790
If no device is now attached to the port, or if the descriptors are
8891
different from what the kernel remembers, then the treatment is what

Documentation/usb/uhci.txt

Lines changed: 0 additions & 165 deletions
This file was deleted.

drivers/hid/usbhid/hid-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ static void hid_reset(struct work_struct *work)
122122
dev_dbg(&usbhid->intf->dev, "resetting device\n");
123123
rc = rc_lock = usb_lock_device_for_reset(hid_to_usb_dev(hid), usbhid->intf);
124124
if (rc_lock >= 0) {
125-
rc = usb_reset_composite_device(hid_to_usb_dev(hid), usbhid->intf);
125+
rc = usb_reset_device(hid_to_usb_dev(hid));
126126
if (rc_lock)
127127
usb_unlock_device(hid_to_usb_dev(hid));
128128
}

drivers/usb/atm/cxacru.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,6 @@ static int cxacru_bind(struct usbatm_data *usbatm_instance,
10521052

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

10571056
mutex_init(&instance->poll_state_serialize);
10581057
instance->poll_state = CXPOLL_STOPPED;

drivers/usb/atm/speedtch.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,6 @@ static int speedtch_bind(struct usbatm_data *usbatm,
829829
if (use_isoc) {
830830
const struct usb_host_interface *desc = data_intf->cur_altsetting;
831831
const __u8 target_address = USB_DIR_IN | usbatm->driver->isoc_in;
832-
int i;
833832

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

0 commit comments

Comments
 (0)