On Thu, 18 May 2006, Alan Stern wrote:
The relevant part of the spec is 11.24.2.7.2.1, which says that the
C_PORT_CONNECTION bit is set by attach or detach detect events, implying
it is not set by power changes.
It would be good to notify the kernel that it should check for
disconnected ports when you shut off the power. Right now there's no way
to do it. However it wouldn't be hard to add a sysfs interface for such a
purpose.
You mean you would explicitely first switch power off and then notify the
kernel from your program?
Just tried switching power off and then accessing the device: the kernel
then gets a disconnect, re-enables the power, and finds a new device -
error processing works wonderfully!:-)
sda : READ CAPACITY failed.
sda : status=0, message=00, host=7, driver=00
sda : sense not available.
usb 1-1.1: USB disconnect, address 8
sda: Write Protect is off
sda: Mode Sense: 00 00 00 00
sda: assuming drive cache: write through
0:0:0:0: rejecting I/O to dead device
0:0:0:0: rejecting I/O to dead device
0:0:0:0: rejecting I/O to dead device
0:0:0:0: rejecting I/O to dead device
sda : READ CAPACITY failed.
sda : status=0, message=00, host=1, driver=00
sda : sense not available.
0:0:0:0: rejecting I/O to dead device
sda: Write Protect is off
sda: Mode Sense: 00 00 00 00
sda: assuming drive cache: write through
sda:<3> 0:0:0:0: rejecting I/O to dead device
Buffer I/O error on device sda, logical block 0
0:0:0:0: rejecting I/O to dead device
Buffer I/O error on device sda, logical block 0
unable to read partition table
usb 1-1.1: new full speed USB device using pxa27x-ohci and address 9
usb 1-1.1: configuration #1 chosen from 1 choice
scsi1 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 9
usb-storage: waiting for device to settle before scanning
Vendor: DurPower Model: CF USB20Reader Rev: 9144
Type: Direct-Access ANSI SCSI revision: 00
SCSI device sda: 31360 512-byte hdwr sectors (16 MB)
sda: Write Protect is off
sda: Mode Sense: 02 00 00 00
sda: assuming drive cache: write through
SCSI device sda: 31360 512-byte hdwr sectors (16 MB)
sda: Write Protect is off
sda: Mode Sense: 02 00 00 00
sda: assuming drive cache: write through
sda: sda1
sd 1:0:0:0: Attached scsi removable disk sda
Vendor: DurPower Model: SM USB20Reader Rev: 9144
Type: Direct-Access ANSI SCSI revision: 00
sd 1:0:0:1: Attached scsi removable disk sdb
Vendor: DurPower Model: SD USB20Reader Rev: 9144
Type: Direct-Access ANSI SCSI revision: 00
sd 1:0:0:2: Attached scsi removable disk sdc
Vendor: DurPower Model: MS USB20Reader Rev: 9144
Type: Direct-Access ANSI SCSI revision: 00
sd 1:0:0:3: Attached scsi removable disk sdd
usb-storage: device scan complete
Thanks
Guennadi
---------------------------------
Guennadi Liakhovetski, Ph.D.
DSA Daten- und Systemtechnik GmbH
Pascalstr. 28
D-52076 Aachen
Germany
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel