2003-02-03 22:32:02

by Petr Sebor

[permalink] [raw]
Subject: VIA vt8235 headache

Hello,

since after the hw update to VIA KT400 board (MSI KT4 Ultra) I am having
a problem where I can't access any devices hanging on the secondary IDE1
channel (hdd & cdrom) The hardware does work ok on the 'other' OS
though...

This is going on on 2.4.20, 2.4.21-pre4, 2.4.21-pre4-ac1
and 2.4.21-pre4 + the patch Andre is having on kernel.org:

Uniform Multi-Platform E-IDE driver Revision: 7.00beta-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: IDE controller at PCI slot 00:11.1
PCI: Hardcoded IRQ 14 for device 00:11.1
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: VIA vt8235 (rev 00) IDE UDMA133 controller on pci00:11.1
ide0: BM-DMA at 0xfc00-0xfc07, BIOS settings: hda:DMA, hdb:pio
ide1: BM-DMA at 0xfc08-0xfc0f, BIOS settings: hdc:DMA, hdd:DMA
hda: ST340016A, ATA DISK drive
hdb: IOMEGA ZIP 100 ATAPI Floppy, ATAPI FLOPPY drive
blk: queue c02cce00, I/O limit 4095Mb (mask 0xffffffff)
hdc: QUANTUM FIREBALL CX13.0A, ATA DISK drive
hdd: 50X CD-ROM, ATAPI CD/DVD-ROM drive
blk: queue c02cd270, I/O limit 4095Mb (mask 0xffffffff)
hdd: set_drive_speed_status: status=0x00 { }
ide1: Drive 1 didn't accept speed setting. Oh, well.
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: host protected area => 1
hda: 78165360 sectors (40021 MB) w/2048KiB Cache, CHS=4865/255/63, UDMA(100)
hdc: lost interrupt
hdc: lost interrupt
hdc: lost interrupt
hdc: host protected area => 1
hdc: 25429824 sectors (13020 MB) w/418KiB Cache, CHS=25228/16/63
Partition check:
hda: hda1 hda2 hda3 hda4 < hda5 hda6 >
hdc:<3>hdc: lost interrupt
hdc: dma_timer_expiry: dma status == 0x60
hdc: DMA interrupt recovery
hdc: lost interrupt
hdc: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hdc: dma_intr: error=0x00 { }
hdc: dma_timer_expiry: dma status == 0x60
hdc: DMA interrupt recovery
hdc: lost interrupt
hdc: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hdc: dma_intr: error=0x00 { }
hdc: recal_intr: status=0xd0 { Busy }

hdc: DMA disabled
hdd: DMA disabled
ide1: reset: master: error (0x00?)
hdc: lost interrupt
hdc: lost interrupt
hdc: lost interrupt
hdc: lost interrupt
[PTBL] [1582/255/63] hdc1

The timeouts takes ages... but it will eventually boot. I can't however
access
anything on IDE1, this will result to another timeout round with no success
at the end.

If I physically remove the /dev/hdc (Quantum Fireball disc), I am
getting just
this from the cdrom:

hdd: 50X CD-ROM, ATAPI CD/DVD-ROM drive
hdd: DMA disabled
hdd: set_drive_speed_status: status=0x7f { DriveReady DeviceFault
SeekComplete DataRequest CorrectedError Index Error }
hdd: set_drive_speed_status: error=0x7f
ide1: Drive 1 didn't accept speed setting. Oh, well.
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: host protected area => 1
hda: 78165360 sectors (40021 MB) w/2048KiB Cache, CHS=4865/255/63, UDMA(100)
Partition check:
hda: hda1 hda2 hda3 hda4 < hda5 hda6 >
hdd: ATAPI 40X CD-ROM drive, 128kB Cache, (U)DMA
Uniform CD-ROM driver Revision: 3.12
hdd: irq timeout: status=0xd0 { Busy }
hdd: irq timeout: error=0x00
hdd: DMA disabled
hdd: ATAPI reset timed-out, status=0xd1
ide1: reset: master: error (0x7f?)

I'd be pleased if someone could enlighten me a little bit...

Thanks,
Petr




2003-02-04 11:06:08

by Alan

[permalink] [raw]
Subject: Re: VIA vt8235 headache

If you remove just the DVD drive what occurs ?

Also do you have ACPI support enabled, as that breaks a lot of systems

2003-02-04 20:32:49

by Vojtech Pavlik

[permalink] [raw]
Subject: Re: VIA vt8235 headache

On Tue, Feb 04, 2003 at 12:12:27PM +0000, Alan Cox wrote:

> If you remove just the DVD drive what occurs ?

The more reports I get the more i think this is a vt8235 hw-bug. Or
the vt8235 registers are different from all its predecessors.

I'll send a patch soonish to fix this. (it's the address setup
timing - it must be set to 0xff on a vt8235 or problems happen with
ATAPI devices).

> Also do you have ACPI support enabled, as that breaks a lot of systems
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

--
Vojtech Pavlik
SuSE Labs

2003-02-04 21:37:30

by Petr Sebor

[permalink] [raw]
Subject: Re: VIA vt8235 headache

Vojtech Pavlik wrote:
> On Tue, Feb 04, 2003 at 12:12:27PM +0000, Alan Cox wrote:
>>If you remove just the DVD drive what occurs ?

With the cdrom removed I am getting nice clean boot with
no timeouts, errors or lost interrupts:

Uniform Multi-Platform E-IDE driver Revision: 7.00beta-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: IDE controller at PCI slot 00:11.1
PCI: Hardcoded IRQ 14 for device 00:11.1
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: VIA vt8235 (rev 00) IDE UDMA133 controller on pci00:11.1
ide0: BM-DMA at 0xfc00-0xfc07, BIOS settings: hda:DMA, hdb:pio
ide1: BM-DMA at 0xfc08-0xfc0f, BIOS settings: hdc:DMA, hdd:pio
hda: ST340016A, ATA DISK drive
hdb: IOMEGA ZIP 100 ATAPI Floppy, ATAPI FLOPPY drive
blk: queue c02cce00, I/O limit 4095Mb (mask 0xffffffff)
hdc: QUANTUM FIREBALL CX13.0A, ATA DISK drive
blk: queue c02cd270, I/O limit 4095Mb (mask 0xffffffff)
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: host protected area => 1
hda: 78165360 sectors (40021 MB) w/2048KiB Cache, CHS=4865/255/63, UDMA(100)
hdc: host protected area => 1
hdc: 25429824 sectors (13020 MB) w/418KiB Cache, CHS=25228/16/63
Partition check:
hda: hda1 hda2 hda3 hda4 < hda5 hda6 >
hdc:<6> [PTBL] [1582/255/63] hdc1

...but when trying to actually mount the disk, I'll get this:

hdc: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hdc: dma_intr: error=0x00 { }
hdc: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hdc: dma_intr: error=0x00 { }
hdc: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hdc: dma_intr: error=0x00 { }
hdc: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hdc: dma_intr: error=0x00 { }
hdc: DMA disabled
ide1: reset: master: error (0x00?)
hdc: lost interrupt
hdc: lost interrupt

... and the mount fails.

>>Also do you have ACPI support enabled, as that breaks a lot of systems

ACPI was enabled, but disabling it (recompiling with ACPI disabled)
does not have any effect.

> The more reports I get the more i think this is a vt8235 hw-bug. Or
> the vt8235 registers are different from all its predecessors.
>
> I'll send a patch soonish to fix this. (it's the address setup
> timing - it must be set to 0xff on a vt8235 or problems happen with
> ATAPI devices).

I am still unable to access the disk on IDE1 even with the cdrom
removed on that channel. (though from the dmesg it looks like the
cdrom makes things even worse)

I have also tried Alan's new 2.4.21-pre4-ac2 (btw: extraversion is
still -ac1), with no difference.

I am looking forward to try the patch!

Best regards,
Petr

2003-02-05 02:51:18

by sven.kissner

[permalink] [raw]
Subject: Re: VIA vt8235 headache

hi petr,

i had the same errors (although i never experienced any issues with hd,
but this seems to be because i'm running them on primary while having my
atapu devices on secondary). i fixed them the following:

- using 2.4.21pre4 (pre3 worked either)
- applying the following patch from vojteck:

<--
[email protected], 2002-12-19 11:23:11+01:00, [email protected]
VIA IDE: Always use slow address setup timings for ATAPI devices.


via82cxxx.c | 19 ++++++-------------
1 files changed, 6 insertions(+), 13 deletions(-)


diff -Nru a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c
--- a/drivers/ide/pci/via82cxxx.c Thu Dec 19 11:23:42 2002
+++ b/drivers/ide/pci/via82cxxx.c Thu Dec 19 11:23:42 2002
@@ -1,16 +1,5 @@
/*
- * $Id: via82cxxx.c,v 3.35-ac2 2002/09/111 Alan Exp $
- *
- * Copyright (c) 2000-2001 Vojtech Pavlik
- *
- * Based on the work of:
- * Michel Aubry
- * Jeff Garzik
- * Andre Hedrick
- */
-
-/*
- * Version 3.35
+ * Version 3.36
*
* VIA IDE driver for Linux. Supported southbridges:
*
@@ -152,7 +141,7 @@
via_print("----------VIA BusMastering IDE Configuration"
"----------------");

- via_print("Driver Version: 3.35-ac");
+ via_print("Driver Version: 3.36");
via_print("South Bridge: VIA %s",
via_config->name);

@@ -351,6 +340,10 @@
ide_timing_compute(peer, peer->current_speed, &p, T, UT);
ide_timing_merge(&p, &t, &t, IDE_TIMING_8BIT);
}
+
+ /* Always use 4 address setup clocks on ATAPI devices */
+ if (drive->media != ide_disk)
+ t.setup = 4;

via_set_speed(HWIF(drive)->pci_dev, drive->dn, &t);
-->

keep on rockin'
sven


2003-02-05 21:27:57

by Petr Sebor

[permalink] [raw]
Subject: Re: VIA vt8235 headache

Hi,

with this patch applied over the 2.4.21-pre4-ac2, the CDROM on IDE1 now
works ok, no more error messages.

The harddrive on /dev/hdc is still choking though...

hdc: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hdc: dma_intr: error=0x00 { }
hdc: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hdc: dma_intr: error=0x00 { }
hdc: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hdc: dma_intr: error=0x00 { }
hdc: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hdc: dma_intr: error=0x00 { }
hdc: DMA disabled
ide1: reset: master: error (0x00?)
hdc: lost interrupt

Regards,
Petr

sven kissner wrote:

> hi petr,
>
> i had the same errors (although i never experienced any issues with hd,
> but this seems to be because i'm running them on primary while having my
> atapu devices on secondary). i fixed them the following:
>
> - using 2.4.21pre4 (pre3 worked either)
> - applying the following patch from vojteck:
>
> <--
> [email protected], 2002-12-19 11:23:11+01:00, [email protected]
> VIA IDE: Always use slow address setup timings for ATAPI devices.
>
>
> via82cxxx.c | 19 ++++++-------------
> 1 files changed, 6 insertions(+), 13 deletions(-)
>
>
> diff -Nru a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c
> --- a/drivers/ide/pci/via82cxxx.c Thu Dec 19 11:23:42 2002
> +++ b/drivers/ide/pci/via82cxxx.c Thu Dec 19 11:23:42 2002
> @@ -1,16 +1,5 @@
> /*
> - * $Id: via82cxxx.c,v 3.35-ac2 2002/09/111 Alan Exp $
> - *
> - * Copyright (c) 2000-2001 Vojtech Pavlik
> - *
> - * Based on the work of:
> - * Michel Aubry
> - * Jeff Garzik
> - * Andre Hedrick
> - */
> -
> -/*
> - * Version 3.35
> + * Version 3.36
> *
> * VIA IDE driver for Linux. Supported southbridges:
> *
> @@ -152,7 +141,7 @@
> via_print("----------VIA BusMastering IDE Configuration"
> "----------------");
>
> - via_print("Driver Version: 3.35-ac");
> + via_print("Driver Version: 3.36");
> via_print("South Bridge: VIA %s",
> via_config->name);
>
> @@ -351,6 +340,10 @@
> ide_timing_compute(peer, peer->current_speed, &p, T, UT);
> ide_timing_merge(&p, &t, &t, IDE_TIMING_8BIT);
> }
> +
> + /* Always use 4 address setup clocks on ATAPI devices */
> + if (drive->media != ide_disk)
> + t.setup = 4;
>
> via_set_speed(HWIF(drive)->pci_dev, drive->dn, &t);
> -->