linux/drivers/usb/core
Alan Stern 253e05724f USB: add a "remove hardware" sysfs attribute
This patch (as1297) adds a "remove" attribute to each USB device's
directory in sysfs.  Writing to this attribute causes the device to be
deconfigured (the same as writing 0 to the "bConfigurationValue"
attribute) and then tells the hub driver to disable the device's
upstream port.  The device remains locked during these activities so
there is no possibility of it getting reconfigured in between.  The
port will remain disabled until after the device is unplugged.

The purpose of this is to provide a means for user programs to imitate
the "Safely remove hardware" applet in Windows.  Some devices do
expect their ports to be disabled before they are unplugged, and they
provide visual feedback to users indicating when they can safely be
unplugged.

The security implications are minimal.  Writing to the "remove"
attribute is no more dangerous than writing to the
"bConfigurationValue" attribute.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: David Zeuthen <davidz@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 11:55:18 -08:00
..
buffer.c USB: pass mem_flags to dma_alloc_coherent 2009-04-23 14:15:28 -07:00
config.c USB: Fix SS endpoint companion descriptor parsing. 2009-09-23 06:46:18 -07:00
devices.c USB: add missing class descriptions used in usb/devices file 2009-07-12 15:16:39 -07:00
devio.c USB: usbfs: add USBDEVFS_URB_BULK_CONTINUATION flag 2009-09-23 06:46:39 -07:00
driver.c USB: fix missing error check in probing 2009-09-23 06:46:39 -07:00
endpoint.c driver model: constify attribute groups 2009-09-15 09:50:47 -07:00
file.c Driver-Core: extend devnode callbacks to provide permissions 2009-09-19 12:50:38 -07:00
generic.c USB: Convert a dev_info to a dev_dbg 2009-12-11 11:55:13 -08:00
hcd-pci.c USB: new flag for resume-from-hibernation 2009-06-15 21:44:44 -07:00
hcd.c USB: Clean up root hub string descriptors 2009-09-23 06:46:37 -07:00
hcd.h USB: Add hub descriptor update hook for xHCI 2009-09-23 06:46:40 -07:00
hub.c USB: add a "remove hardware" sysfs attribute 2009-12-11 11:55:18 -08:00
hub.h USB: fix the clear_tt_buffer interface 2009-07-12 15:16:38 -07:00
inode.c const: mark remaining super_operations const 2009-09-22 07:17:24 -07:00
Kconfig Revert USB: usbfs: deprecate and hide option for !embedded 2009-07-12 15:16:39 -07:00
Makefile USB: add the usbfs devices file to debugfs 2009-06-15 21:44:43 -07:00
message.c USB: make urb scatter-gather support more generic 2009-12-11 11:55:14 -08:00
notify.c
otg_whitelist.h USB: fix codingstyle issues in drivers/usb/core/*.h 2008-02-01 14:35:07 -08:00
quirks.c USB: add quirk to avoid config and interface strings 2009-03-24 16:20:25 -07:00
sysfs.c USB: add a "remove hardware" sysfs attribute 2009-12-11 11:55:18 -08:00
urb.c USB: allow interrupt transfers to WUSB devices 2009-12-11 11:55:14 -08:00
usb.c USB: xhci: Set route string for all devices. 2009-09-23 06:46:40 -07:00
usb.h USB: add a "remove hardware" sysfs attribute 2009-12-11 11:55:18 -08:00