* hang booting onboard HPT 366 with libata (PATA)
@ 2006-12-02 2:13 Ricardo Lugo
2006-12-02 11:19 ` Alan
0 siblings, 1 reply; 5+ messages in thread
From: Ricardo Lugo @ 2006-12-02 2:13 UTC (permalink / raw)
To: linux-kernel
Hi all,
With the release of libata PATA support in 2.6.19, I am trying out
libata with my HPT366 (built-on to motherboard), and it hangs at
bootup while scanning for partitions. Additionally, it complains of
abnormal status? Related information about my setup below:
- Abit BP6 motherboard running BIOS RV with HPT 1.28 (ie has
functional ACPI DSDT table), has been recapped, not overclocked
- onboard HPT366 controller functions fine with the old IDE drivers
(but only so long as I use UDMA mode <=3, mode 4 has reported
problems on BP6)
- hard drive is an 80GB seagate 7200.1-ish that supports UDMA mode 5,
partition scheme is (1-xfs, 2-swap)
- this hard drive is the only drive connected, but the kernel
discovers one empty pata_piix controller and one empty pata_hpt366
controller before it.
Related boot messages:
---
ACPI: PCI Interrup 0000:00:13.1[B] -> GSI 18 (level, low) -> IRQ 16
ata5: PATA max UDMA/66 cmd 0xE400 ctl 0xE802 bmdma 0xEC00 irq 16
ata6: PATA max UDMA/66 cmd 0x0 ctl 0x2 bmdma 0xEC08 irq 16
scsi4 : pata_hpt366
ata5.00: ATA-6, max UDMA/100, 156301488 sectors: LBA48
ata5.00: ata5: dev 0 multi count 16
ata5.00 configured for UDMA/33
scsi5 : pata_hpt366
ATA: abnormal status 0x1C on port 0x7
scsi 4:0:0:0: Direct-Access ATA ST380011A 3.06 PQ: 0
ANSI: 5
SCSI device sda: 156301488 512-byte hdwr sectors (80026 MB)
sda: Write Protect is off
SCSI device sda: drive cache: write back
SCSI device sda: 156301488 512-byte hdwr sectors (80026 MB)
sda: Write Protect is off
SCSI device sda: drive cache: write back
sda:_
---
If there is anything I can test to help fix this issue or further
diagnose it, please let me know.
- Ricardo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: hang booting onboard HPT 366 with libata (PATA)
2006-12-02 2:13 hang booting onboard HPT 366 with libata (PATA) Ricardo Lugo
@ 2006-12-02 11:19 ` Alan
2006-12-02 13:03 ` Alan
0 siblings, 1 reply; 5+ messages in thread
From: Alan @ 2006-12-02 11:19 UTC (permalink / raw)
To: Ricardo Lugo; +Cc: linux-kernel
> ACPI: PCI Interrup 0000:00:13.1[B] -> GSI 18 (level, low) -> IRQ 16
> ata5: PATA max UDMA/66 cmd 0xE400 ctl 0xE802 bmdma 0xEC00 irq 16
> ata6: PATA max UDMA/66 cmd 0x0 ctl 0x2 bmdma 0xEC08 irq 16
Ok so the underlying problem seems to be that the second channel of the
card had no I/O resource assigned to it, presumably because it wasn't in
use. We check various other "not in use" things but not that one.
I'll fix that up. I think it just needs another check in libata-sff.
Alan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: hang booting onboard HPT 366 with libata (PATA)
2006-12-02 11:19 ` Alan
@ 2006-12-02 13:03 ` Alan
2006-12-02 18:54 ` Ricardo Lugo
0 siblings, 1 reply; 5+ messages in thread
From: Alan @ 2006-12-02 13:03 UTC (permalink / raw)
To: Alan; +Cc: Ricardo Lugo, linux-kernel
On Sat, 2 Dec 2006 11:19:28 +0000
Alan <alan@lxorguk.ukuu.org.uk> wrote:
> > ACPI: PCI Interrup 0000:00:13.1[B] -> GSI 18 (level, low) -> IRQ 16
> > ata5: PATA max UDMA/66 cmd 0xE400 ctl 0xE802 bmdma 0xEC00 irq 16
> > ata6: PATA max UDMA/66 cmd 0x0 ctl 0x2 bmdma 0xEC08 irq 16
>
> Ok so the underlying problem seems to be that the second channel of the
> card had no I/O resource assigned to it, presumably because it wasn't in
> use. We check various other "not in use" things but not that one.
>
> I'll fix that up. I think it just needs another check in libata-sff.
Try the following
--- drivers/ata/libata-sff.c~ 2006-12-02 12:39:32.985707472 +0000
+++ drivers/ata/libata-sff.c 2006-12-02 12:39:32.985707472 +0000
@@ -826,6 +826,21 @@
}
#ifdef CONFIG_PCI
+
+static int ata_resources_present(struct pci_dev *pdev, int port)
+{
+ int i;
+
+ /* Check the PCI resources for this channel are enabled */
+ port = port * 2;
+ for (i = 0; i < 2; i ++) {
+ if (pci_resource_start(pdev, port + i) == 0 ||
+ pci_resource_len(pdev, port + i) == 0)
+ return 0;
+ }
+ return 1;
+}
+
/**
* ata_pci_init_native_mode - Initialize native-mode driver
* @pdev: pci device to be initialized
@@ -857,6 +872,13 @@
probe_ent->irq = pdev->irq;
probe_ent->irq_flags = IRQF_SHARED;
+
+ /* Discard disabled ports. Some controllers show their
+ unused channels this way */
+ if (ata_resources_present(pdev, 0) == 0)
+ ports &= ~ATA_PORT_PRIMARY;
+ if (ata_resources_present(pdev, 1) == 0)
+ ports &= ~ATA_PORT_SECONDARY;
if (ports & ATA_PORT_PRIMARY) {
probe_ent->port[p].cmd_addr = pci_resource_start(pdev, 0);
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: hang booting onboard HPT 366 with libata (PATA)
2006-12-02 13:03 ` Alan
@ 2006-12-02 18:54 ` Ricardo Lugo
2006-12-02 20:39 ` Alan
0 siblings, 1 reply; 5+ messages in thread
From: Ricardo Lugo @ 2006-12-02 18:54 UTC (permalink / raw)
To: linux-kernel; +Cc: Alan
On Dec 2, 2006, at 8:03 AM, Alan wrote:
> On Sat, 2 Dec 2006 11:19:28 +0000
> Alan <alan@lxorguk.ukuu.org.uk> wrote:
>
>>> ACPI: PCI Interrup 0000:00:13.1[B] -> GSI 18 (level, low) -> IRQ 16
>>> ata5: PATA max UDMA/66 cmd 0xE400 ctl 0xE802 bmdma 0xEC00 irq 16
>>> ata6: PATA max UDMA/66 cmd 0x0 ctl 0x2 bmdma 0xEC08 irq 16
>>
>> Ok so the underlying problem seems to be that the second channel
>> of the
>> card had no I/O resource assigned to it, presumably because it
>> wasn't in
>> use. We check various other "not in use" things but not that one.
>>
>> I'll fix that up. I think it just needs another check in libata-sff.
>
> Try the following
That certainly sped up the bootup process, but still hangs at the
same place. Interestingly, if I append "nosmp" to kernel params, it
hangs earlier and I get a different error. Specifics below:
ACPI: PCI Interrupt 0000:00:13.0[A] -> GSI 18 (level, low) -> IRQ 16
ata3: PATA max UDMA/66 cmd 0xD800 ctl 0xDC02 bmdma 0xE000 irq 16
scsi2: pata_hpt366
ATA: abnormal status 0x8 on port 0xD807
ACPI: PCI Interrupt 0000:00:13.1[B] -> GSI 18 (level, low) -> IRQ 16
ata4: PATA max UDMA/66 cmd 0xE400 ctl 0xE802 bmdma 0xEC00 irq 16
scsi3: pata_hpt366
ata4.00: ATA-6, max UDMA/100, 156301488 sectors: LBA48
ata4.00: configured for UDMA/33
scsi 3:0:0:0: Direct-Access ATA ST380011A 3.06 PQ: 0 ANSI: 5
SCSI device sda: 156301488 512-byte hdrwr sectors (80026 MB)
sda: Write Protect is off
SCSI device sda: drive cache: write back
SCSI device sda: 156301488 512-byte hdrwr sectors (80026 MB)
sda: Write Protect is off
SCSI device sda: drive cache: write back
sda:_
--- nosmp ---
...
ACPI: PCI Interrupt 0000:00:13.1[B] -> GSI 18 (level, low) -> IRQ 16
ata4: PATA max UDMA/66 cmd 0xE400 ctl 0xE802 bmdma 0xEC00 irq 16
scsi3: pata_hpt366
ata4.00: qc timeout (cmd 0xec)
ata4.00: failed to IDENTIFY (I/O error, err_mask=0x4)
- Rick
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: hang booting onboard HPT 366 with libata (PATA)
2006-12-02 18:54 ` Ricardo Lugo
@ 2006-12-02 20:39 ` Alan
0 siblings, 0 replies; 5+ messages in thread
From: Alan @ 2006-12-02 20:39 UTC (permalink / raw)
To: Ricardo Lugo; +Cc: linux-kernel
> ACPI: PCI Interrupt 0000:00:13.1[B] -> GSI 18 (level, low) -> IRQ 16
> ata4: PATA max UDMA/66 cmd 0xE400 ctl 0xE802 bmdma 0xEC00 irq 16
> scsi3: pata_hpt366
> ata4.00: qc timeout (cmd 0xec)
> ata4.00: failed to IDENTIFY (I/O error, err_mask=0x4)
Ok that wil need more work. I think that you are experiencing two
independant bugs here and the patch fixed only the first.
Alan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-12-02 20:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-02 2:13 hang booting onboard HPT 366 with libata (PATA) Ricardo Lugo
2006-12-02 11:19 ` Alan
2006-12-02 13:03 ` Alan
2006-12-02 18:54 ` Ricardo Lugo
2006-12-02 20:39 ` Alan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®