linux/drivers/usb
Patrick Mochel 273971bade [PATCH] usb: klist_node_attached() fix
The original code looks like this:

        /* if interface was already added, bind now; else let
         * the future device_add() bind it, bypassing probe()
         */
        if (!list_empty (&dev->bus_list))
                device_bind_driver(dev);

IOW, it's checking to see if the device is attached to the bus or not
and binding the driver if it is. It's checking the device's bus list,
which will only appear empty when the device has been initialized, but
not added. It depends way too much on the driver model internals, but it
seems to be the only way to do the weird crap they want to do with
interfaces.

When I converted it to use klists, I accidentally inverted the logic,
which led to bad things happening. This patch returns the check to its
orginal value.

From: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Index: gregkh-2.6/drivers/usb/core/usb.c
===================================================================
2005-06-20 15:15:28 -07:00
..
atm [PATCH] Speedtouch resync after lost signal. 2005-05-25 10:13:43 -07:00
class [PATCH] USB: kfree cleanup for drivers/usb/* - no need to check for NULL 2005-04-18 17:39:34 -07:00
core [PATCH] usb: klist_node_attached() fix 2005-06-20 15:15:28 -07:00
gadget [PATCH] USB: Spelling fixes for drivers/usb. 2005-05-03 23:31:52 -07:00
host [PATCH] USB: move the usb hcd code to use the new class code. 2005-06-20 15:15:07 -07:00
image [PATCH] USB: Spelling fixes for drivers/usb. 2005-05-03 23:31:52 -07:00
input [PATCH] USB: add Vernier devices to HID blacklist 2005-06-03 00:04:29 -07:00
media [PATCH] pwc bug fix 2005-06-12 21:05:57 -07:00
misc [PATCH] USB: Spelling fixes for drivers/usb. 2005-05-03 23:31:52 -07:00
mon Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
net [PATCH] fix for kaweth broken by changes in the networking layer 2005-06-16 09:02:59 -07:00
serial [PATCH] USB: ftdi_sio: avoid losing received data in tty-ldisc 2005-06-09 01:38:15 -07:00
storage merge by hand (fix up qla_os.c merge error) 2005-06-17 18:42:23 -05:00
Kconfig Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
README Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
usb-skeleton.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00

To understand all the Linux-USB framework, you'll use these resources:

    * This source code.  This is necessarily an evolving work, and
      includes kerneldoc that should help you get a current overview.
      ("make pdfdocs", and then look at "usb.pdf" for host side and
      "gadget.pdf" for peripheral side.)  Also, Documentation/usb has
      more information.

    * The USB 2.0 specification (from www.usb.org), with supplements
      such as those for USB OTG and the various device classes.
      The USB specification has a good overview chapter, and USB
      peripherals conform to the widely known "Chapter 9".

    * Chip specifications for USB controllers.  Examples include
      host controllers (on PCs, servers, and more); peripheral
      controllers (in devices with Linux firmware, like printers or
      cell phones); and hard-wired peripherals like Ethernet adapters.

    * Specifications for other protocols implemented by USB peripheral
      functions.  Some are vendor-specific; others are vendor-neutral
      but just standardized outside of the www.usb.org team.

Here is a list of what each subdirectory here is, and what is contained in
them.

core/		- This is for the core USB host code, including the
		  usbfs files and the hub class driver ("khubd").

host/		- This is for USB host controller drivers.  This
		  includes UHCI, OHCI, EHCI, and others that might
		  be used with more specialized "embedded" systems.

gadget/		- This is for USB peripheral controller drivers and
		  the various gadget drivers which talk to them.


Individual USB driver directories.  A new driver should be added to the
first subdirectory in the list below that it fits into.

image/		- This is for still image drivers, like scanners or
		  digital cameras.
input/		- This is for any driver that uses the input subsystem,
		  like keyboard, mice, touchscreens, tablets, etc.
media/		- This is for multimedia drivers, like video cameras,
		  radios, and any other drivers that talk to the v4l
		  subsystem.
net/		- This is for network drivers.
serial/		- This is for USB to serial drivers.
storage/	- This is for USB mass-storage drivers.
class/		- This is for all USB device drivers that do not fit
		  into any of the above categories, and work for a range
		  of USB Class specified devices. 
misc/		- This is for all USB device drivers that do not fit
		  into any of the above categories.