Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 641e22e0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (29 commits)
  USB: Add support for Olimex arm-usb-ocd JTAG interface serial port
  USB: Add support for Sierra Wireless Aircard 595U
  USB: ldusb bugfix
  USB: ftdi_sio: Add USB Product Id for OpenDCC
  USB: fix ratelimit call semantics
  USB: handle errors in power/level attribute
  USB: make the autosuspend workqueue thread freezable
  USB: Fix USB OHCI Subvendor for Toshiba Portege 4000
  USB: usblp: Use correct DMA address in case of probe error
  USB: Fix debug output of ark3116
  USB: Onetouch - switch to using input_dev->dev.parent
  USB: don't try to kzalloc 0 bytes
  USB: remove short initial timeout for device descriptor fetch
  USB: Deref URB after usbmon is done with it
  USB: Remove duplicate IDs from option card driver
  USB: auerswald: fix file release handler
  USB: fsl_usb2_udc: Fix UMTI_WIDE support and a compile warning
  USB: set the correct Interrupt interval in usb_bulk_msg
  USB: New device PID for ftdi_sio driver
  USB: remove unneeded WARN_ON
  ...
parents 31f6e1bd fa91d43b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@

<toc></toc>

<chapter><title>Introduction</title>
<chapter id="intro"><title>Introduction</title>

<para>This document presents a Linux-USB "Gadget"
kernel mode
+14 −14
Original line number Diff line number Diff line
@@ -185,7 +185,7 @@

    </chapter>

<chapter><title>USB-Standard Types</title>
<chapter id="types"><title>USB-Standard Types</title>

    <para>In <filename>&lt;linux/usb/ch9.h&gt;</filename> you will find
    the USB data types defined in chapter 9 of the USB specification.
@@ -197,7 +197,7 @@

    </chapter>

<chapter><title>Host-Side Data Types and Macros</title>
<chapter id="hostside"><title>Host-Side Data Types and Macros</title>

    <para>The host side API exposes several layers to drivers, some of
    which are more necessary than others.
@@ -211,7 +211,7 @@

    </chapter>

    <chapter><title>USB Core APIs</title>
    <chapter id="usbcore"><title>USB Core APIs</title>

    <para>There are two basic I/O models in the USB API.
    The most elemental one is asynchronous:  drivers submit requests
@@ -248,7 +248,7 @@
!Edrivers/usb/core/hub.c
    </chapter>

    <chapter><title>Host Controller APIs</title>
    <chapter id="hcd"><title>Host Controller APIs</title>

    <para>These APIs are only for use by host controller drivers,
    most of which implement standard register interfaces such as
@@ -285,7 +285,7 @@
!Idrivers/usb/core/buffer.c
    </chapter>

    <chapter>
    <chapter id="usbfs">
	<title>The USB Filesystem (usbfs)</title>

	<para>This chapter presents the Linux <emphasis>usbfs</emphasis>.
@@ -317,7 +317,7 @@
	not it has a kernel driver.
	</para>

	<sect1>
	<sect1 id="usbfs-files">
	    <title>What files are in "usbfs"?</title>

	    <para>Conventionally mounted at
@@ -356,7 +356,7 @@

	</sect1>

	<sect1>
	<sect1 id="usbfs-fstab">
	    <title>Mounting and Access Control</title>

	    <para>There are a number of mount options for usbfs, which will
@@ -439,7 +439,7 @@

	</sect1>

	<sect1>
	<sect1 id="usbfs-devices">
	    <title>/proc/bus/usb/devices</title>

	    <para>This file is handy for status viewing tools in user
@@ -473,7 +473,7 @@ for (;;) {
	    </para>
	</sect1>

	<sect1>
	<sect1 id="usbfs-bbbddd">
	    <title>/proc/bus/usb/BBB/DDD</title>

	    <para>Use these files in one of these basic ways:
@@ -510,7 +510,7 @@ for (;;) {
	    </sect1>


	<sect1>
	<sect1 id="usbfs-lifecycle">
	    <title>Life Cycle of User Mode Drivers</title>

	    <para>Such a driver first needs to find a device file
@@ -565,7 +565,7 @@ for (;;) {

	    </sect1>

	<sect1><title>The ioctl() Requests</title>
	<sect1 id="usbfs-ioctl"><title>The ioctl() Requests</title>

	    <para>To use these ioctls, you need to include the following
	    headers in your userspace program:
@@ -604,7 +604,7 @@ for (;;) {
	    </para>


	    <sect2>
	    <sect2 id="usbfs-mgmt">
		<title>Management/Status Requests</title>

		<para>A number of usbfs requests don't deal very directly
@@ -736,7 +736,7 @@ usbdev_ioctl (int fd, int ifno, unsigned request, void *param)

		</sect2>

	    <sect2>
	    <sect2 id="usbfs-sync">
		<title>Synchronous I/O Support</title>

		<para>Synchronous requests involve the kernel blocking
@@ -865,7 +865,7 @@ usbdev_ioctl (int fd, int ifno, unsigned request, void *param)
		</variablelist>
	    </sect2>

	    <sect2>
	    <sect2 id="usbfs-async">
		<title>Asynchronous I/O Support</title>

		<para>As mentioned above, there are situations where it may be
+16 −0
Original line number Diff line number Diff line
@@ -91,6 +91,22 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf)
				"CDC descriptors on config\n");
	}

	/* Maybe CDC descriptors are after the endpoint?  This bug has
	 * been seen on some 2Wire Inc RNDIS-ish products.
	 */
	if (len == 0) {
		struct usb_host_endpoint	*hep;

		hep = intf->cur_altsetting->endpoint;
		if (hep) {
			buf = hep->extra;
			len = hep->extralen;
		}
		if (len)
			dev_dbg(&intf->dev,
				"CDC descriptors on endpoint\n");
	}

	/* this assumes that if there's a non-RNDIS vendor variant
	 * of cdc-acm, it'll fail RNDIS requests cleanly.
	 */
+1 −0
Original line number Diff line number Diff line
@@ -515,6 +515,7 @@ static int rndis_bind(struct usbnet *dev, struct usb_interface *intf)
		dev_err(&intf->dev,
			"dev can't take %u byte packets (max %u)\n",
			dev->hard_mtu, tmp);
		retval = -EINVAL;
		goto fail_and_release;
	}

+15 −10
Original line number Diff line number Diff line
@@ -1252,20 +1252,23 @@ EXPORT_SYMBOL_GPL(usbnet_probe);

/*-------------------------------------------------------------------------*/

/* FIXME these suspend/resume methods assume non-CDC style
 * devices, with only one interface.
/*
 * suspend the whole driver as soon as the first interface is suspended
 * resume only when the last interface is resumed
 */

int usbnet_suspend (struct usb_interface *intf, pm_message_t message)
{
	struct usbnet		*dev = usb_get_intfdata(intf);

	if (!dev->suspend_count++) {
		/* accelerate emptying of the rx and queues, to avoid
		 * having everything error out.
		 */
		netif_device_detach (dev->net);
		(void) unlink_urbs (dev, &dev->rxq);
		(void) unlink_urbs (dev, &dev->txq);
	}
	return 0;
}
EXPORT_SYMBOL_GPL(usbnet_suspend);
@@ -1274,8 +1277,10 @@ int usbnet_resume (struct usb_interface *intf)
{
	struct usbnet		*dev = usb_get_intfdata(intf);

	if (!--dev->suspend_count) {
		netif_device_attach (dev->net);
		tasklet_schedule (&dev->bh);
	}
	return 0;
}
EXPORT_SYMBOL_GPL(usbnet_resume);
Loading