[ltp] Using ahci to access an Ultrabay SATA drive on a T60?

Henrique de Moraes Holschuh linux-thinkpad@linux-thinkpad.org
Fri, 27 Jul 2007 10:49:43 -0300


On Thu, 26 Jul 2007, Theodore Tso wrote:
> I have a T60p, and up until now, I had been using ata-piix (with the
> SATA configured in the BIOS configuration stat in "compatibility
> mode").  And in that mode, both my primary drive and my ultrabay disk
> were claimed by ata-piix:

Yes, but in compatibility mode, you have one SATA port, and one SATA port
with on-chip OS PATA emulation.  So, Linux thinks you have one SATA disk
(main bay) and one PATA disk (UltraBay).

> [   21.696079] ata1: SATA max UDMA/133 cmd 0x000101f0 ctl 0x000103f6 bmdma 0x000118b0 irq 14
> [   21.697928] ata2: PATA max UDMA/100 cmd 0x00010170 ctl 0x00010376 bmdma 0x000118b8 irq 15

Exactly like that.

> [1] Which is a 160 gig, 7200RPM, SATA 3G/s drive with a built-in G-force
> sensor which will automatically retract the hard drives without needing
> to use the battery sucking hdaps and hdapsd daemon.  Yum!

Too bad that is a SATA-only option :-)

> More recently, I wanted switch to using AHCI, based on reports that
> AHCI suspend/resume support in Linux had been worked out, and because
> the reports that the experimental AHCI's Advanced Link Power
> Management patches saved a full watt of power.  The problem is that
> after I change my BIOS configuration to using AHCI, I find that the
> ahci driver refuses to take ownership of the Ultrabay drive.  (See the
> dmesg.ahci attached in this message.)  

The ICH must be set to full AHCI mode, no compatibility mode at all.  I
don't know if the T60 BIOS gets that right, but the AHCI override patch from
Matthew might help you there if it doesn't.

AHCI does not know how to drive ICH PATA ports (or SATA ports under PATA ICH
register emulation).

Probably one will have to look at the ICH docs from Intel, and peek at PCI
config space to find out what the heck the BIOS is doing.

> Has anyone figured out how to access the Ultrabay drive via the ahci
> driver?  Given the power-saving advantages of ALPM, this is clearly
> the preferred way to go, assuming it's possible to make it work.

I think Matthew did, since he did come up with a patch to get a T43 into
AHCI mode (note that the T43 *has* a real PATA port that goes to the
UltraBay, so it is a slightly different problem.  Your T60 only have SATA
ports, but it is being programmed to emulate one of these as if it were a
PATA port for the operating system). You might want to track down his AHCI
force-enable patch and ask him about it.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh