How do I determine if my controller is in IDE or AHCI mode in Linux?

Posted by philcolbourn on Super User See other posts from Super User or by philcolbourn
Published on 2013-06-13T11:12:37Z Indexed on 2013/06/29 4:23 UTC
Read the original article Hit count: 462

Filed under:
|
|
|

I have an old MacBook Pro 4,1 (early 2008) - but I suspect an answer would apply to many MacBook Pros.

It has an Intel IDE/SATA controller (ICH8M/ICH8M-E).

I have installed a patched MBR that is supposed to put my controller into AHCI mode. It does this by setting some controller port value that I don't understand.

This seems to work as I get this from lspci:

00:1f.1 IDE interface: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) IDE Controller (rev 03)
00:1f.2 IDE interface: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] (rev 03)

Now most, perhaps all, sites that provide a solution (enabling AHCI) suggest that after a sleep/wake cycle that a controller will revert to IDE mode due to how Apple support Windows.

They recommend disabling sleep.

From author of patchedcode.bin I think

Enabling AHCI for Windows on MacBooks

NB: I do not have bootcamp installed and I do not have Windows installed.

Is there a way to prove that my controller is in IDE or AHCI mode?

Background Data

Using patchedcode.bin MBR I get this in syslog:

Jun 12 22:33:22 max kernel: [    1.860955] ahci 0000:00:1f.2: version 3.0
Jun 12 22:33:22 max kernel: [    1.861052] ahci 0000:00:1f.2: irq 45 for MSI/MSI-X
Jun 12 22:33:22 max kernel: [    1.861117] ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 3 ports 1.5 Gbps 0x1 impl SATA mode
Jun 12 22:33:22 max kernel: [    1.861120] ahci 0000:00:1f.2: flags: 64bit ncq sntf pm led clo pio slum part ccc ems 
Jun 12 22:33:22 max kernel: [    1.861130] ahci 0000:00:1f.2: setting latency timer to 64
Jun 12 22:33:22 max kernel: [    1.880880] ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)
Jun 12 22:33:22 max kernel: [    1.880983] scsi2 : ahci
Jun 12 22:33:22 max kernel: [    1.884552] scsi3 : ahci
Jun 12 22:33:22 max kernel: [    1.886932] scsi4 : ahci
Jun 12 22:33:22 max kernel: [    1.886998] ata3: SATA max UDMA/133 abar [email protected] port 0xdb504100 irq 45
Jun 12 22:33:22 max kernel: [    1.887000] ata4: DUMMY
Jun 12 22:33:22 max kernel: [    1.887002] ata5: DUMMY
Jun 12 22:33:22 max kernel: [    2.204103] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
Jun 12 22:33:22 max kernel: [    2.204656] ata3.00: ATA-8: FUJITSU MHY2200BH, 0081000D, max UDMA/100
Jun 12 22:33:22 max kernel: [    2.204662] ata3.00: 390721968 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
Jun 12 22:33:22 max kernel: [    2.205324] ata3.00: configured for UDMA/100
Jun 12 22:33:22 max kernel: [    2.205554] scsi 2:0:0:0: Direct-Access     ATA      FUJITSU MHY2200B 0081 PQ: 0 ANSI: 5

Using my original MBR I get this from syslog:

Jun 13 18:07:13 max kernel: [    0.622861] ata_piix 0000:00:1f.1: version 2.13
Jun 13 18:07:13 max kernel: [    0.622869] ata_piix 0000:00:1f.1: power state changed by ACPI to D0
Jun 13 18:07:13 max kernel: [    0.622924] ata_piix 0000:00:1f.1: setting latency timer to 64
Jun 13 18:07:13 max kernel: [    0.623339] scsi0 : ata_piix
Jun 13 18:07:13 max kernel: [    0.623730] scsi1 : ata_piix
Jun 13 18:07:13 max kernel: [    0.623765] ata1: PATA max UDMA/100 cmd 0x8108 ctl 0x811c bmdma 0x80e0 irq 21
Jun 13 18:07:13 max kernel: [    0.623767] ata2: PATA max UDMA/100 cmd 0x8100 ctl 0x8118 bmdma 0x80e8 irq 21
Jun 13 18:07:13 max kernel: [    0.623810] ata_piix 0000:00:1f.2: MAP [
Jun 13 18:07:13 max kernel: [    0.623811]  P0 -- -- -- ]
Jun 13 18:07:13 max kernel: [    0.623866] ata_piix 0000:00:1f.2: setting latency timer to 64
Jun 13 18:07:13 max kernel: [    0.624241] scsi2 : ata_piix
Jun 13 18:07:13 max kernel: [    0.624558] scsi3 : ata_piix
Jun 13 18:07:13 max kernel: [    0.624862] ata3: SATA max UDMA/133 cmd 0x80f8 ctl 0x8114 bmdma 0x8020 irq 18
Jun 13 18:07:13 max kernel: [    0.624865] ata4: SATA max UDMA/133 cmd 0x80f0 ctl 0x8110 bmdma 0x8028 irq 18
Jun 13 18:07:13 max kernel: [    1.208879] ata3.00: ATA-8: FUJITSU MHY2200BH, 0081000D, max UDMA/100
Jun 13 18:07:13 max kernel: [    1.208882] ata3.00: 390721968 sectors, multi 16: LBA48 NCQ (depth 0/32)
Jun 13 18:07:13 max kernel: [    1.208961] ata1.01: ATAPI: MATSHITA DVD+/-RW UJ-867S, 1.00, max UDMA/33
Jun 13 18:07:13 max kernel: [    1.216186] ata3.00: configured for UDMA/100
Jun 13 18:07:13 max kernel: [    1.224396] ata1.01: configured for UDMA/33

© Super User or respective owner

Related posts about linux

Related posts about sata