2006-09-27 21:05:28

by Michiel de Boer

[permalink] [raw]
Subject: [PATCH] Chipset addition for the VIA Southbridge workaround / quirk

Hi, i'm (maybe unfortunately ;) the owner of a socket 370 motherboard
by DFI. It's type number is CA63-EC REV A+. According to the manual
this is the exact chipset naming:
VIA 82C693A/82C686B AGPset

Also built in is an Creative Labs SB Live! audio device. When i was
still using windows 98, i experienced corruptions when burning DVD's,
and after lengthy investigation i discovered i had a buggy southbridge.[1]
Apparently the presence of the SB Live! audio device might even accelerate
the problem, although it does not actually disappear when this PCI card
is removed. When i moved to Linux, i decided that writing a kernel patch
based on the fixup programs i found for windows 98 would be appropriate.

However, i was pleased to discover that fixup code was already present in
drivers/pci/quirks.c . The only thing i had to do then was add my mother-
board identifier to the bottom of the code. The patch has been tried and
tested since 2.6.8, and since then it has evolved since it turned out it
contained unneccessary code patches. It has also been tested without
problems on the user base of the distro Kanotix[2], of which i'm a
co-developer. It activates as it should when it should, fixes the corrup-
tions i had when burning DVD's, and improves system behavior.
It's a very small and simple patch, but it would spare me from having
to patch the kernel source myself it it were to be included.

Regards, Michiel de Boer

[1]
http://www.theregister.co.uk/2001/04/12/datacorruption_bug_hits_via_chipsets/
http://www.realworldtech.com/page.cfm?ArticleID=RWT051401003409
http://www.tecchannel.de/ueberblick/archiv/401770/
[2] http://www.kanotix.com

Credit: Stefan Lippers-Hollmann <[email protected]>, for showing me the way
around in the kernel sources.
Signed-off-by: Michiel Lieuwe de Boer <[email protected]>

diff -Nru linux-2.6.18.orig/drivers/pci/quirks.c
linux-2.6.18/drivers/pci/quirks.c
--- linux-2.6.18.orig/drivers/pci/quirks.c 2006-09-20
05:42:06.000000000 +0200
+++ linux-2.6.18/drivers/pci/quirks.c 2006-09-27 22:43:30.000000000 +0200
@@ -172,6 +172,7 @@
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA,
PCI_DEVICE_ID_VIA_8363_0, quirk_vialatency );
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA,
PCI_DEVICE_ID_VIA_8371_1, quirk_vialatency );
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA,
PCI_DEVICE_ID_VIA_8361, quirk_vialatency );
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA,
PCI_DEVICE_ID_VIA_82C691_0, quirk_vialatency );

/*
* VIA Apollo VP3 needs ETBF on BT848/878


2006-09-27 21:44:14

by Lee Revell

[permalink] [raw]
Subject: Re: [PATCH] Chipset addition for the VIA Southbridge workaround / quirk

On Wed, 2006-09-27 at 23:05 +0200, Michiel de Boer wrote:
> Also built in is an Creative Labs SB Live! audio device. When i was
> still using windows 98, i experienced corruptions when burning DVD's,
> and after lengthy investigation i discovered i had a buggy
> southbridge.[1]
> Apparently the presence of the SB Live! audio device might even
> accelerate the problem, although it does not actually disappear when
> this PCI card is removed. When i moved to Linux, i decided that
> writing a kernel patch based on the fixup programs i found for windows
> 98 would be appropriate.

Just FYI, the onboard "SBLive" is not a real SBLive! - it uses a newer,
cheaper, and vastly inferior chipset that moves all of the interesting
hardware features of the good old SBLive! into the (Windows) driver.

I would be surprised if it had the same issues as the original emu10k1
chipset, which generated a lot more bus traffic by implementing multiple
stream mixing in hardware.

IOW, this bug is probably unrelated to the SBLive...

Lee

2006-09-27 22:35:17

by Michiel de Boer

[permalink] [raw]
Subject: Re: [PATCH] Chipset addition for the VIA Southbridge workaround / quirk

Lee Revell wrote:
> On Wed, 2006-09-27 at 23:05 +0200, Michiel de Boer wrote:
>
>> Also built in is an Creative Labs SB Live! audio device. When i was
>> still using windows 98, i experienced corruptions when burning DVD's,
>> and after lengthy investigation i discovered i had a buggy
>> southbridge.[1]
>> Apparently the presence of the SB Live! audio device might even
>> accelerate the problem, although it does not actually disappear when
>> this PCI card is removed. When i moved to Linux, i decided that
>> writing a kernel patch based on the fixup programs i found for windows
>> 98 would be appropriate.
>>
>
> Just FYI, the onboard "SBLive" is not a real SBLive! - it uses a newer,
> cheaper, and vastly inferior chipset that moves all of the interesting
> hardware features of the good old SBLive! into the (Windows) driver.
>
> I would be surprised if it had the same issues as the original emu10k1
> chipset, which generated a lot more bus traffic by implementing multiple
> stream mixing in hardware.
>
> IOW, this bug is probably unrelated to the SBLive...
>
> Lee
>
> -
> 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/
>
>
Lee,

I might have led you to think i meant an onboard card because of my
wording, sorry.
It's a PCI extension card, here's some output from lspci:

00:09.0 Multimedia audio controller [0401]: Creative Labs SB Live!
EMU10k1 [1102:0002] (rev 08)
Subsystem: Creative Labs CT4832 SBLive! Value [1102:8027]
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
Latency: 32 (500ns min, 5000ns max)
Interrupt: pin A routed to IRQ 11
Region 0: I/O ports at dc00 [size=32]
Capabilities: [dc] Power Management version 1
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-

However, you're right, the role of this sound card in creating or
accellerating the data corruption has been
disputed. I might as well be irrelevant. When i remove it, i still have
data corruption problems when burning
DVD's. I've tested all this back when i was investigating to make sure.
The discussion, (iirc, because i can't
find the specific articles anymore) revolved around Creative
interpreting certain PCI specs wrather loosely.

Regards, Michiel de Boer

2006-09-27 22:58:47

by Lee Revell

[permalink] [raw]
Subject: Re: [PATCH] Chipset addition for the VIA Southbridge workaround / quirk

On Thu, 2006-09-28 at 00:35 +0200, Michiel de Boer wrote:
> I might have led you to think i meant an onboard card because of my
> wording, sorry.
> It's a PCI extension card, here's some output from lspci:
>
> 00:09.0 Multimedia audio controller [0401]: Creative Labs SB Live!
> EMU10k1 [1102:0002] (rev 08)

Ah, OK. Then this is going to be the old SBLive!/686B bug. Talk about
a blast from the past... :-P

Lee

2006-09-28 00:01:59

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH] Chipset addition for the VIA Southbridge workaround / quirk

On Wed, 27 Sep 2006 23:05:25 +0200
Michiel de Boer <[email protected]> wrote:

> Hi, i'm (maybe unfortunately ;) the owner of a socket 370 motherboard
> by DFI. It's type number is CA63-EC REV A+. According to the manual
> this is the exact chipset naming:
> VIA 82C693A/82C686B AGPset
>
> Also built in is an Creative Labs SB Live! audio device. When i was
> still using windows 98, i experienced corruptions when burning DVD's,
> and after lengthy investigation i discovered i had a buggy southbridge.[1]
> Apparently the presence of the SB Live! audio device might even accelerate
> the problem, although it does not actually disappear when this PCI card
> is removed. When i moved to Linux, i decided that writing a kernel patch
> based on the fixup programs i found for windows 98 would be appropriate.
>
> However, i was pleased to discover that fixup code was already present in
> drivers/pci/quirks.c . The only thing i had to do then was add my mother-
> board identifier to the bottom of the code. The patch has been tried and
> tested since 2.6.8, and since then it has evolved since it turned out it
> contained unneccessary code patches. It has also been tested without
> problems on the user base of the distro Kanotix[2], of which i'm a
> co-developer. It activates as it should when it should, fixes the corrup-
> tions i had when burning DVD's, and improves system behavior.
> It's a very small and simple patch, but it would spare me from having
> to patch the kernel source myself it it were to be included.
>
> Regards, Michiel de Boer
>
> [1]
> http://www.theregister.co.uk/2001/04/12/datacorruption_bug_hits_via_chipsets/
> http://www.realworldtech.com/page.cfm?ArticleID=RWT051401003409
> http://www.tecchannel.de/ueberblick/archiv/401770/
> [2] http://www.kanotix.com
>
> Credit: Stefan Lippers-Hollmann <[email protected]>, for showing me the way
> around in the kernel sources.
> Signed-off-by: Michiel Lieuwe de Boer <[email protected]>
>
> diff -Nru linux-2.6.18.orig/drivers/pci/quirks.c
> linux-2.6.18/drivers/pci/quirks.c
> --- linux-2.6.18.orig/drivers/pci/quirks.c 2006-09-20
> 05:42:06.000000000 +0200
> +++ linux-2.6.18/drivers/pci/quirks.c 2006-09-27 22:43:30.000000000 +0200
> @@ -172,6 +172,7 @@
> DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA,
> PCI_DEVICE_ID_VIA_8363_0, quirk_vialatency );
> DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA,
> PCI_DEVICE_ID_VIA_8371_1, quirk_vialatency );
> DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA,
> PCI_DEVICE_ID_VIA_8361, quirk_vialatency );
> +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA,
> PCI_DEVICE_ID_VIA_82C691_0, quirk_vialatency );
>

Could you please test 2.6.18-mm1, or simply
ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.18/2.6.18-mm1/broken-out/via-irq-quirk-behaviour-change.patch

Thanks.

2006-09-28 02:12:50

by Robert Hancock

[permalink] [raw]
Subject: Re: [PATCH] Chipset addition for the VIA Southbridge workaround / quirk

Andrew Morton wrote:
>
> Could you please test 2.6.18-mm1, or simply
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.18/2.6.18-mm1/broken-out/via-irq-quirk-behaviour-change.patch

This is dealing with a different (much older) quirk than that..

--
Robert Hancock Saskatoon, SK, Canada
To email, remove "nospam" from [email protected]
Home Page: http://www.roberthancock.com/

2006-09-28 13:51:54

by Sergio Monteiro Basto

[permalink] [raw]
Subject: Re: [PATCH] Chipset addition for the VIA Southbridge workaround / quirk

On Thursday 28 September 2006 03:11, Robert Hancock wrote:
> Andrew Morton wrote:
> > Could you please test 2.6.18-mm1, or simply
> > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.18/2.6.
> >18-mm1/broken-out/via-irq-quirk-behaviour-change.patch
>
> This is dealing with a different (much older) quirk than that..
where is the rest of thread ?
--
S?rgio M. B.

2006-09-29 16:00:51

by Michiel de Boer

[permalink] [raw]
Subject: Re: [PATCH] Chipset addition for the VIA Southbridge workaround / quirk

Robert Hancock wrote:
> Andrew Morton wrote:
>>
>> Could you please test 2.6.18-mm1, or simply
>> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.18/2.6.18-mm1/broken-out/via-irq-quirk-behaviour-change.patch
>>
>
> This is dealing with a different (much older) quirk than that..
>

Yes, that's correct. The code related to the patch i sent in starts
around line 114 of drivers/pci/quirks.c in 2.6.18:

/*
* VIA Apollo KT133 needs PCI latency patch
* Made according to a windows driver based patch by George E. Breese
* see PCI Latency Adjust on
http://www.viahardware.com/download/viatweak.shtm
* Also see http://www.au-ja.org/review-kt133a-1-en.phtml for
* the info on which Mr Breese based his work.
*
* Updated based on further information from the site and also on
* information provided by VIA
*/
static void __devinit quirk_vialatency(struct pci_dev *dev)
{

However i will be happy to test anything that would also fix my problem
and replaces my patch. :)

Regards, Michiel