On Mon, 27 Sep 2004, Aaron Gyes wrote: > > If you have included power management and ACPI in your kernel's > > configuration, you could try suspending the device before unplugging it. > > That might be close enough to disabling the port to satisfy the thing. > > Here's how: Let's say your device shows up as /dev/sda. Make sure you > > have the sysfs filesystem mounted, say on /sys. Then to suspend the > > device, you would do (as root): > > > > echo -n 2 >/sys/block/sda/device/../../../power/state > > > > (I think that's right but you should check it. The "device" entry in > > /sys/block/sda is a symbolic link, so you can't omit the "../"s.) > > > > This will only work in very recent kernels. I believe it's supported in > > 2.6.9-rc2, but I'm not even sure about that... > > I've got 2.6.9-rc2-mm3, and do have the "EXPERIMENTAL" USB > suspend/resume support enabled. It didn't work though. =(
Well, if suspending the port isn't enough, maybe sending SYNCHRONIZE CACHE will do it. Or maybe you need to do both. I don't understand why doing "rmmod uhci-hcd" worked though; as far as the device can tell there's no difference between that and suspending the port. Unfortunately there is no standard program for generating the SYNCHRONIZE CACHE command, so far as I know. There are several tools available on the Web that can do it; the one I'm familiar with is plscsi. You can download the plscsi source from http://members.aol.com/plscsi/linux/ To use it you need to have the sg driver installed, and you need to know which sg entry corresponds to your device. If you don't have any other SCSI devices it will be sg0. The command to use is then: plscsi /dev/sg0 -x '35 0 0 0 0 0 0 0 0 0' (that's 9 zeros inside the quotes). It's worth a try. If that doesn't work, I guess you'll have to rely on "rmmod uhci-hcd" for the moment. Alan Stern ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users
