[ltp] cannot unload and reload ultra bay

Adam Sloboda linux-thinkpad@linux-thinkpad.org
Sat, 16 Jun 2007 10:18:37 +0200


On Fri, 15 Jun 2007 19:42:11 -0700
Dan Sawyer <dansawyer@earthlink.net> wrote:

> All,
> 
> The system is a T41 running 2.6.21.1 kernel. The system does not
> unload devices from the ultra bay. I booted with a hard disk carrier
> in the bay. That worked as it should have.
> 
> Then I performed an eject command and removed the drive. I then
> inserted a DVD drive. It was not recognized.

eject command won't unregister (and unmount) the devices.

> How can this be done? What are the config parameters? What am I
> missing?

If it's on SCSI bus you can unregister them

 echo 1 > /sys/class/scsi_device/0\:0\:0\:0/device/delete

and then rescan the bus when you insert them

 echo 0 0 0 > /sys/class/scsi_host/host0/scan

SCSI device/host numbers may and probably will differ.


Adam