<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/usb/core/usb.h, branch linux-2.6.30.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.30.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.30.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2009-01-28T00:15:32Z</updated>
<entry>
<title>USB: fix char-device disconnect handling</title>
<updated>2009-01-28T00:15:32Z</updated>
<author>
<name>Alan Stern</name>
</author>
<published>2009-01-13T16:33:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=501950d846218ed80a776d2aae5aed9c8b92e778'/>
<id>urn:sha1:501950d846218ed80a776d2aae5aed9c8b92e778</id>
<content type='text'>
This patch (as1198) fixes a conceptual bug: Somewhere along the line
we managed to confuse USB class devices with USB char devices.  As a
result, the code to send a disconnect signal to userspace would not be
built if both CONFIG_USB_DEVICE_CLASS and CONFIG_USB_DEVICEFS were
disabled.

The usb_fs_classdev_common_remove() routine has been renamed to
usbdev_remove() and it is now called whenever any USB device is
removed, not just when a class device is unregistered.  The notifier
registration and unregistration calls are no longer conditionally
compiled.  And since the common removal code will always be called as
part of the char device interface, there's no need to call it again as
part of the usbfs interface; thus the invocation of
usb_fs_classdev_common_remove() has been taken out of
usbfs_remove_device().

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-by: Alon Bar-Lev &lt;alon.barlev@gmail.com&gt;
Tested-by: Alon Bar-Lev &lt;alon.barlev@gmail.com&gt;
Cc: stable &lt;stable@kernel.org&gt;


</content>
</entry>
<entry>
<title>USB: fix toggle mismatch in disable_endpoint paths</title>
<updated>2009-01-28T00:15:32Z</updated>
<author>
<name>Alan Stern</name>
</author>
<published>2009-01-15T22:03:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ddeac4e75f2527a340f9dc655bde49bb2429b39b'/>
<id>urn:sha1:ddeac4e75f2527a340f9dc655bde49bb2429b39b</id>
<content type='text'>
This patch (as1200) finishes some fixes that were left incomplete by
an earlier patch.

Although nobody has addressed this issue in the past, it turns out
that we need to distinguish between two different modes of disabling
and enabling endpoints.  In one mode only the data structures in
usbcore are affected, and in the other mode the host controller and
device hardware states are affected as well.

The earlier patch added an extra argument to the routines in the
enable_endpoint pathways to reflect this difference.  This patch adds
corresponding arguments to the disable_endpoint pathways.  Without
this change, the endpoint toggle state can get out of sync between
the host and the device.  The exact mechanism depends on the details
of the host controller (whether or not it stores its own copy of the
toggle values).

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-by: Dan Streetman &lt;ddstreet@ieee.org&gt;
Tested-by: Dan Streetman &lt;ddstreet@ieee.org&gt;
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
</entry>
<entry>
<title>USB: re-enable interface after driver unbinds</title>
<updated>2009-01-07T18:00:13Z</updated>
<author>
<name>Alan Stern</name>
</author>
<published>2008-12-31T16:31:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2caf7fcdb8532045680f06b67b9e63f0c9613aaa'/>
<id>urn:sha1:2caf7fcdb8532045680f06b67b9e63f0c9613aaa</id>
<content type='text'>
This patch (as1197) fixes an error introduced recently.  Since a
significant number of devices can't handle Set-Interface requests, we
no longer call usb_set_interface() when a driver unbinds from an
interface, provided the interface is already in altsetting 0.  However
the interface still does get disabled, and the call to
usb_set_interface() was the only thing re-enabling it.  Since the
interface doesn't get re-enabled, further attempts to use it fail.

So the patch adds a call to usb_enable_interface() when a driver
unbinds and the interface is in altsetting 0.  For this to work
right, the interface's endpoints have to be re-enabled but their
toggles have to be left alone.  Therefore an additional argument is
added to usb_enable_endpoint() and usb_enable_interface(), a flag
indicating whether or not the endpoint toggles should be reset.

This is a forward-ported version of a patch which fixes Bugzilla
#12301.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-by: David Roka &lt;roka@dawid.hu&gt;
Reported-by: Erik Ekman &lt;erik@kryo.se&gt;
Tested-by: Erik Ekman &lt;erik@kryo.se&gt;
Tested-by: Alon Bar-Lev &lt;alon.barlev@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: utilize the bus notifiers</title>
<updated>2009-01-07T18:00:08Z</updated>
<author>
<name>Alan Stern</name>
</author>
<published>2008-12-05T19:10:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3b23dd6f8a718e5339de4f7d86ce76a078b5f771'/>
<id>urn:sha1:3b23dd6f8a718e5339de4f7d86ce76a078b5f771</id>
<content type='text'>
This patch (as1185) makes usbcore take advantage of the bus
notifications sent out by the driver core.  Now we can create all our
device and interface attribute files before the device or interface
uevent is broadcast.

A side effect is that we no longer create the endpoint "pseudo"
devices at the same time as a device or interface is registered -- it
seems like a bad idea to try registering an endpoint before the
registration of its parent is complete.  So the routines for creating
and removing endpoint devices have been split out and renamed, and
they are called explicitly when needed.  A new bitflag is used for
keeping track of whether or not the interface's endpoint devices have
been created, since (just as with the interface attributes) they vary
with the altsetting and hence can be changed at random times.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: Enhance usage of pm_message_t</title>
<updated>2009-01-07T18:00:03Z</updated>
<author>
<name>Alan Stern</name>
</author>
<published>2008-11-25T21:39:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=65bfd2967c906ca322a4bb69a285fe0de8916ac6'/>
<id>urn:sha1:65bfd2967c906ca322a4bb69a285fe0de8916ac6</id>
<content type='text'>
This patch (as1177) modifies the USB core suspend and resume
routines.  The resume functions now will take a pm_message_t argument,
so they will know what sort of resume is occurring.  The new argument
is also passed to the port suspend/resume and bus suspend/resume
routines (although they don't use it for anything but debugging).

In addition, special pm_message_t values are used for user-initiated,
device-initiated (i.e., remote wakeup), and automatic suspend/resume.
By testing these values, drivers can tell whether or not a particular
suspend was an autosuspend.  Unfortunately, they can't do the same for
resumes -- not until the pm_message_t argument is also passed to the
drivers' resume methods.  That will require a bigger change.

IMO, the whole Power Management framework should have been set up this
way in the first place.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: add asynchronous autosuspend/autoresume support</title>
<updated>2009-01-07T17:59:53Z</updated>
<author>
<name>Alan Stern</name>
</author>
<published>2008-11-12T21:19:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9ac39f28b5237a629e41ccfc1f73d3a55723045c'/>
<id>urn:sha1:9ac39f28b5237a629e41ccfc1f73d3a55723045c</id>
<content type='text'>
This patch (as1160b) adds support routines for asynchronous autosuspend
and autoresume, with accompanying documentation updates.  There
already are several potential users of this interface, and others are
likely to arise as autosuspend support becomes more widespread.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: Add new PM callback methods for USB</title>
<updated>2008-08-21T17:26:37Z</updated>
<author>
<name>Alan Stern</name>
</author>
<published>2008-08-12T18:34:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f2189c477c986db47ac7f9cc32d05f6df18bfe9e'/>
<id>urn:sha1:f2189c477c986db47ac7f9cc32d05f6df18bfe9e</id>
<content type='text'>
This patch (as1129) adds support for the new PM callbacks to usbcore.
The new callbacks merely invoke the same old USB power management
routines as the old ones did.

A minor improvement is that the callbacks are present only in the
"USB-device" device_type structure, rather than in the bus_type
structure.  This way they will be invoked only for USB devices, not
for USB interfaces.  The core USB PM routines automatically handle
suspending and resuming interfaces along with their devices.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>usbfs: send disconnect signals when device is unregistered</title>
<updated>2008-07-21T22:16:40Z</updated>
<author>
<name>Alan Stern</name>
</author>
<published>2008-06-24T18:47:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cd9f03759d3eb588e185b04e1854c778b050833e'/>
<id>urn:sha1:cd9f03759d3eb588e185b04e1854c778b050833e</id>
<content type='text'>
USB device files are accessible in two ways: as files in usbfs and as
character device nodes.  The two paths are supposed to behave
identically, but they don't.  When the underlying USB device is
unplugged, disconnect signals are sent to processes with open usbfs
files (if they requested these signals) but not to processes with open
device node files.

This patch (as1104) fixes the bug by moving the disconnect-signalling
code into a common subroutine which is called from both paths.
Putting this subroutine in devio.c removes the only out-of-file
reference to struct dev_state, and so the structure's declaration can
be moved from usb.h into devio.c.

Finally, the new subroutine performs one extra action: It kills all
the outstanding async URBs.  (I'd kill the outstanding synchronous
URBs too, if there was any way to do it.)  In the past this hasn't
mattered much, because devices were unregistered from usbfs only
when they were disconnected.  But now the unregistration can also
occur whenever devices are unbound from the usb_generic driver.  At
any rate, killing URBs when a device is unregistered from usbfs seems
like a good thing to do.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: Force unbinding of drivers lacking reset_resume or other methods</title>
<updated>2008-07-21T22:16:40Z</updated>
<author>
<name>Alan Stern</name>
</author>
<published>2008-06-23T20:00:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=78d9a487ee961c356e1a934d9a92eca38ffb3a70'/>
<id>urn:sha1:78d9a487ee961c356e1a934d9a92eca38ffb3a70</id>
<content type='text'>
This patch (as1024) takes care of a FIXME issue: Drivers that don't
have the necessary suspend, resume, reset_resume, pre_reset, or
post_reset methods will be unbound and their interface reprobed when
one of the unsupported events occurs.

This is made slightly more difficult by the fact that bind operations
won't work during a system sleep transition.  So instead the code has
to defer the operation until the transition ends.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: create attributes before sending uevent</title>
<updated>2008-05-14T17:00:26Z</updated>
<author>
<name>Alan Stern</name>
</author>
<published>2008-04-30T19:37:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2e5f10e4f0a9649186d8a8c793822b2e0dae8373'/>
<id>urn:sha1:2e5f10e4f0a9649186d8a8c793822b2e0dae8373</id>
<content type='text'>
This patch (as1087d) fixes a long-standing problem in usbcore: Device,
interface, and endpoint attributes aren't added until _after_ the
creation uevent has already been broadcast.

Unfortunately there are a few attributes which cannot be created that
early.  The "descriptors" attribute is binary and so must be created
separately.  The power-management attributes can't be created until
the dev/power/ group exists.  And the interface string can vary from
one altsetting to another, so it has to be created dynamically.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
</feed>
