linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Hang during boot in piix_init_pcs (ata_piix.c) with macbook pro
@ 2007-11-11 14:45 Thomas Rohwer
  2007-11-12 15:20 ` Tejun Heo
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Rohwer @ 2007-11-11 14:45 UTC (permalink / raw)
  To: linux-ide

Hello,

I am using kernel 2.6.23 with the driver drivers/ata/ata_piix.c on my macbook pro.
About every fourth boot hangs. I tried to narrow down the problem by putting in dome printk
statements and found (at least on 2 hangs so far) that the msleep(150) in piix_init_pcs
does not return:

static void __devinit piix_init_pcs(struct pci_dev *pdev,
                     struct ata_port_info *pinfo,
                     const struct piix_map_db *map_db)
{
     u16 pcs, new_pcs;

     printk("piix_init_pcs 1");
     pci_read_config_word(pdev, ICH5_PCS, &pcs);
     printk("piix_init_pcs 2");

     new_pcs = pcs | map_db->port_enable;

     if (new_pcs != pcs) {
         printk("updating PCS from 0x%x to 0x%x\n", pcs, new_pcs);
         DPRINTK("updating PCS from 0x%x to 0x%x\n", pcs, new_pcs);
         pci_write_config_word(pdev, ICH5_PCS, new_pcs);
         printk("updating PCS done");
         msleep(150);
         printk("updating PCS done wait");
     }
}

The "updating PCS done" is printed but the "updateing PCS done wait" is not printed.
The following is part of the dmesg output of a working boot. The hang always happens with
the SATA controller (i.e. 0000:00:1f.2):

ata_piix 0000:00:1f.1: version 2.12
ata_pci_init_one d
ata_pci_init_one e
ata_pci_init_one f
piix_init_one before ret
ata_pci_init_one a
ACPI: PCI Interrupt 0000:00:1f.1[A] -> GSI 21 (level, low) -> IRQ 18
ata_pci_init_one b
ata_pci_init_one c
PCI: Setting latency timer of device 0000:00:1f.1 to 64
ata_pci_init_one d
ata_pci_init_one e
scsi0 : ata_piix
scsi1 : ata_piix
ata1: PATA max UDMA/100 cmd 0x000101f0 ctl 0x000103f6 bmdma 0x000160e0 irq 14
ata2: PATA max UDMA/100 cmd 0x00010170 ctl 0x00010376 bmdma 0x000160e8 irq 15
ata1.00: ATAPI: HL-DT-ST DVDRW  GSA-S10N, AP09, max UDMA/33
ata1.00: configured for UDMA/33
Clocksource tsc unstable (delta = -497173580 ns)
scsi 0:0:0:0: CD-ROM            HL-DT-ST DVDRW  GSA-S10N  AP09 PQ: 0 ANSI: 5
ata_pci_init_one done
piix_init_one a
ata_piix 0000:00:1f.2: MAP [ P0 P2 P1 P3 ]
piix_init_one b
piix_init_pcs 1piix_init_pcs 2updating PCS from 0x8101 to 0x8103
updating PCS doneupdating PCS done waitpiix_init_one c
ata_pci_init_one d
ata_pci_init_one e
ata_pci_init_one f
piix_init_one before ret
ata_pci_init_one a
ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 18 (level, low) -> IRQ 19
ata_pci_init_one b
ata_pci_init_one c
PCI: Setting latency timer of device 0000:00:1f.2 to 64
ata_pci_init_one d
ata_pci_init_one e
scsi2 : ata_piix
scsi3 : ata_piix
ata3: SATA max UDMA/133 cmd 0x000160f8 ctl 0x00016116 bmdma 0x00016020 irq 19
ata4: SATA max UDMA/133 cmd 0x000160f0 ctl 0x00016112 bmdma 0x00016028 irq 19
ata3.00: ATA-8: FUJITSU MHW2120BH, 00810013, max UDMA/100
ata3.00: 234441648 sectors, multi 16: LBA48 NCQ (depth 0/32)
ata3.00: configured for UDMA/100
scsi 2:0:0:0: Direct-Access     ATA      FUJITSU MHW2120B 0081 PQ: 0 ANSI: 5
sd 2:0:0:0: [sda] 234441648 512-byte hardware sectors (120034 MB)
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 2:0:0:0: [sda] 234441648 512-byte hardware sectors (120034 MB)
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA

lspci -n for the devices is:

00:1f.1 0101: 8086:2850 (rev 03)
00:1f.2 0101: 8086:2828 (rev 03)


My next try would be to put in a custom version ich8_map_db with port_enable=1
(and possibly {P0, P2, NA, NA} in the first line of .map) and use this map
for pci id 8086:2828, because I think the notebook has only one sata port anyway.
Is this the correct way to approach the matter?


Please carbon copy me when answering, as I am not subscribed to the list.

Sincerely,

Thomas Rohwer

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-11-19 14:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-11 14:45 Hang during boot in piix_init_pcs (ata_piix.c) with macbook pro Thomas Rohwer
2007-11-12 15:20 ` Tejun Heo
2007-11-12 22:12   ` Thomas Rohwer
2007-11-18 18:00   ` Thomas Rohwer
2007-11-19  3:07     ` Tejun Heo
2007-11-19  6:35     ` Tejun Heo
2007-11-19 12:59       ` Thomas Rohwer
2007-11-19 13:05         ` Tejun Heo
2007-11-19 14:11           ` Thomas Rohwer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).