On Sat, 19 Nov 2005, Aaron Gyes wrote:

> On Sat, 2005-11-19 at 12:15 -0800, Randy.Dunlap wrote:
> > What says "Not safe to disconnect!"?
> The device does on it's LCD.
> 
> > BTW, the device is still connected, right?
> Yes, it's still connected. I need to yank the cable to make the device
> respond.
> 
> 
> > > Any new developments?
> > 
> > | Sure, perhaps the device isn't ideal. I still think it's not so
> great
> > | that Linux is incapable of sending whatever signal Windows does.
> This
> > | can't be the only device that makes use of it.
> > 
> > What signal is that?  Is it a USB mass storage "standard" signal
> > or command?  How would we know what an iAudio M3 does or how
> > it's broken?
> 
> I don't know. Everyone here last year when I brought this up was sure
> there was some voodoo signal that Windows sent when the user went to the
> "Safely remove hardware" dialog.

I remember this.  It seemed likely that Windows was disabling the device's
USB port.  Linux doesn't do this because there's no reason to.  Unless the
device is _extremely_ badly designed, the message it displays is nothing
more than a warning.  The device knows that Windows disables the port when
you click the "unplug device" button, so it assumes that if the port isn't
disabled then you haven't clicked the button.  This heuristic is fine for
Windows but it doesn't work with Linux.

If you have Power Management and USB selective suspend/resume both
configured on in your kernel (CONFIG_PM and CONFIG_USB_SUSPEND), then you
can disable the port from the command line.  The commands you need to use
go like this:

        echo -n 3 >/sys/block/sdb/device/../../../power/state
        echo -n 3 >/sys/block/sdb/device/../../../../power/state

Vary the name of the block device to suit your setup.  Actually these
commands suspend the port instead of disabling it; as far as the device is
concerned there's no difference.  Either way no packets are sent to the
device.  The first line above tells usb-storage to suspend and the second
actually suspends the device.

If you also turn on USB verbose debugging in the configuration
(CONFIG_USB_DEBUG) then the dmesg log will show whether the port really
does get suspended.

Alan Stern



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to