[ltp] Hot swap between IDE CD-Rom and Sata drive in Z61p
(2.6.22)
Marc MERLIN
linux-thinkpad@linux-thinkpad.org
Tue, 25 Dec 2007 21:13:57 -0800
On Wed, Dec 19, 2007 at 08:48:16PM +0100, Adam Sloboda wrote:
> > Howdy.
> >
> > So, is it even possible? Anyone doing this on a Z or a mostly equivalent
> > T60/T61?
>
> I have Z61m and have no problems with ejecting and reloading DVD
> writer. I'm using 2.6.22-rc7-hrt1 (x86_64) on Debian. I tried to
> describe it on my wiki:
>
> http://wiki.disorder.sk/howto:debian_setup_for_z61m
Thanks for that, I had a look at it.
So, I built 2.6.22.15-hdaps-tpacpi0.18-p4smp-preempt-1khz-noticks-marc7
along with the "\\_SB.PCI0.IDE0.PRIM.MSTR", patch from Ted T'so, and
the tp_smapi modules (without which hdaps will indeed not work)
Speaking of hdaps, I still get:
Dec 25 20:53:35 gandalf kernel: scsi_protect_queue(): head NOT parked!..
Dec 25 20:53:35 gandalf kernel: scsi_unprotect_queue(): No pending I/O,
re-enabling power management..
despite:
gandalf:/usr/src/linux# echo unload > /sys/block/sda/queue/protect_method
But at least, the sensors work now, it's just a matter of figure out
why my HD won't park (hints welcome) (I used the 'Latest sata/ide disk
protection patch for 2.6.22.9 and 2.6.23-rc9' disk-protect-2.6.22.9-2.patch
from http://www.thinkwiki.org/wiki/HDAPS#Disk_head_parking)
But back to the problem at hand: bay swapping.
I built just about everyting as a module, including ata_piix and
ata_disk, which are both used on my laptop.
Actually, in previous (bad) build, I think I had ata_piix built-in,
and it caused my ultrabay to show up as sdb (i.e. under the control of
ata_piix I guess), but now that everythind is a module again, ide_cd and
ide_disk are in charge.
Bad news is, if I unload ide_disk, it reloads right away, and keeps
showing:
kernel: hda: max request size: 512KiB
kernel: hda: 195371568 sectors (100030 MB) w/8192KiB Cache, CHS=16383/255/63, UDMA(100)
kernel: hda: cache flushes supported
kernel: hda: hda1
kernel: hda: max request size: 512KiB
kernel: hda: 195371568 sectors (100030 MB) w/8192KiB Cache, CHS=16383/255/63, UDMA(100)
kernel: hda: cache flushes supported
and if I echo eject > /proc/acpi/ibm/bay and remove the drive, I then get
IDE errors in the kernel.
I tried to get and build
http://www.thinkwiki.org/wiki/Lt_hotswap#lt_hotswap
but it doesn't seem to be meant for my kernel, I get a bunch of missing
symbols that I can't find in 2.6.22.15
make -C /lib/modules/`uname -r`/build SUBDIRS=/usr/src/lt_hotswap-0.3.6 modules
make[1]: Entering directory `/usr/src/linux-2.6.22.15'
CC [M] /usr/src/lt_hotswap-0.3.6/lt_hotswap.o
/usr/src/lt_hotswap-0.3.6/lt_hotswap.c: In function 'lths_scan_ide':
/usr/src/lt_hotswap-0.3.6/lt_hotswap.c:476: warning: implicit declaration of function 'create_proc_ide_interfaces'
/usr/src/lt_hotswap-0.3.6/lt_hotswap.c: In function 'ide_get_or_set_dma_base':
/usr/src/lt_hotswap-0.3.6/lt_hotswap.c:840: error: 'DEFAULT_BMALIBA' undeclared (first use in this function)
/usr/src/lt_hotswap-0.3.6/lt_hotswap.c:840: error: (Each undeclared identifier is reported only once
/usr/src/lt_hotswap-0.3.6/lt_hotswap.c:840: error: for each function it appears in.)
/usr/src/lt_hotswap-0.3.6/lt_hotswap.c:842: error: 'DEFAULT_BMCRBA' undeclared (first use in this function)
/usr/src/lt_hotswap-0.3.6/lt_hotswap.c:844: error: 'DEFAULT_BMIBA' undeclared (first use in this function)
make[2]: *** [/usr/src/lt_hotswap-0.3.6/lt_hotswap.o] Error 1
make[1]: *** [_module_/usr/src/lt_hotswap-0.3.6] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.22.15'
So, does someone know how to make this work with ide-disk, or how to switch
to ata_piix if that'll give me a better chance? (although I'm not sure ata_piix
will drive my cd-rom)
http://www.thinkwiki.org/wiki/Problems_with_SATA_and_Linux
hints towards loading ide-disk with "hda=noprobe hda=none"
but I'm not sure how that would work for my CD-Rom anyway.
> > The details are below, but it looks like the ultrabay makes my 2nd sata
> > drive look like an IDE drive.
>
> Well, this is problem if you need to hotswap. It always appeared as
> SCSI device here. But I hadn't any chance to swap disks.
I think it's the ata_piix vs ide-disk thing.
If you have further suggestions, I'm all ears.
Thanks
Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
.... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/