2002-12-19 10:18:56

by Vojtech Pavlik

[permalink] [raw]
Subject: vt8235 fix, hopefully last variant

Hi!

Can you guys try out this last take on a fix for your ATAPI device
problems? Applies against clean 2.4.20.

Please report failure/success.

Thanks.

--
Vojtech Pavlik
SuSE Labs


Attachments:
(No filename) (183.00 B)
vt8235-atapi (1.30 kB)
Download all attachments

2002-12-19 13:24:25

by HayArms

[permalink] [raw]
Subject: Re: vt8235 fix, hopefully last variant

Vojtech Pavlik wrote:

>Hi!
>
>Can you guys try out this last take on a fix for your ATAPI device
>problems? Applies against clean 2.4.20.
>
>Please report failure/success.
>
>Thanks.
>
>
>
>------------------------------------------------------------------------
>
>[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);
>
>
>
It said that 2 of 3 hunks are failed. I don't know why. Error in patch again

Bye

Marcello

2002-12-19 17:36:50

by John Reiser

[permalink] [raw]
Subject: Re: vt8235 fix, hopefully last variant

--- linux/drivers/ide/via82cxxx.c.orig Thu Dec 19 08:35:20 2002
+++ linux/drivers/ide/via82cxxx.c Thu Dec 19 08:43:10 2002
@@ -1,5 +1,5 @@
/*
- * Version 3.35
+ * Version 3.36jreiser
*
* VIA IDE driver for Linux. Supported southbridges:
*
@@ -129,7 +129,7 @@

via_print("----------VIA BusMastering IDE Configuration----------------");

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

pci_read_config_byte(isa_dev, PCI_REVISION_ID, &t);
@@ -295,6 +295,10 @@
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);

if (!drive->init_speed)


Attachments:
vt8235-atapi-jreiser.patch (870.00 B)

2002-12-20 20:03:29

by Patrick Petermair

[permalink] [raw]
Subject: Re: vt8235 fix, hopefully last variant

Hi!

Sorry for not replying this week, but I was not at home...now back to
business:

I tried the last patch, but it didn't work - I got Hunk messages:

starbase:/usr/src/linux-2.4.20# patch -p1 < vt8235-atapi
patching file drivers/ide/via82cxxx.c
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 141.
Hunk #3 succeeded at 283 (offset -57 lines).
2 out of 3 hunks FAILED -- saving rejects to file
drivers/ide/via82cxxx.c.rej
starbase:/usr/src/linux-2.4.20# cat drivers/ide/via82cxxx.c.rej
***************
*** 1,16 ****
/*
- * $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
*
* VIA IDE driver for Linux. Supported southbridges:
*
--- 1,5 ----
/*
+ * Version 3.36
*
* VIA IDE driver for Linux. Supported southbridges:
*
***************
*** 152,158 ****
via_print("----------VIA BusMastering IDE Configuration"
"----------------");

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

--- 141,147 ----
via_print("----------VIA BusMastering IDE Configuration"
"----------------");

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

starbase:/usr/src/linux-2.4.20#

MSI KT3Ultra2, TOSHIBA DVD-ROM SD-M1302
So far my kernel is running your first patch and it works fine. Would
love to get the final patch running too, but I don't know what that
messages in via82cxxx.c.rej mean and how to modify the patch so that it
works - ah, btw: I tried to apply it to a clean 2.4.20 kernel source.

Thanks so far for your great work.

Patrick


2002-12-21 00:13:19

by Christian Seidemann

[permalink] [raw]
Subject: Re: vt8235 fix, hopefully last variant

Vojtech Pavlik wrote:

> Hi!
>
> Can you guys try out this last take on a fix for your ATAPI device
> problems? Applies against clean 2.4.20.
>
> Please report failure/success.
>
> Thanks.

I also tried the vt8235-atapi patch and it works for me.
MSI KT3 Ultra2 mainboard (KT333), vt8235.
LG DVD-ROM DRD-8160B

Thanks
Christian

2002-12-21 09:13:26

by Vojtech Pavlik

[permalink] [raw]
Subject: Re: vt8235 fix, hopefully last variant

On Fri, Dec 20, 2002 at 09:12:58PM +0100, Patrick Petermair wrote:
> Hi!
>
> Sorry for not replying this week, but I was not at home...now back to
> business:
>
> I tried the last patch, but it didn't work - I got Hunk messages:
>
> starbase:/usr/src/linux-2.4.20# patch -p1 < vt8235-atapi
> patching file drivers/ide/via82cxxx.c
> Hunk #1 FAILED at 1.
> Hunk #2 FAILED at 141.
> Hunk #3 succeeded at 283 (offset -57 lines).
> 2 out of 3 hunks FAILED -- saving rejects to file
> starbase:/usr/src/linux-2.4.20#

Since they're in comments only, you can ignore them.

> MSI KT3Ultra2, TOSHIBA DVD-ROM SD-M1302
> So far my kernel is running your first patch and it works fine. Would
> love to get the final patch running too, but I don't know what that
> messages in via82cxxx.c.rej mean and how to modify the patch so that it
> works - ah, btw: I tried to apply it to a clean 2.4.20 kernel source.

Sorry, then I probably made a mistake in generating it.

> Thanks so far for your great work.

Can you please try even when the first two hunks failed? Only the third
one really matters.

--
Vojtech Pavlik
SuSE Labs

2002-12-21 10:42:14

by Patrick Petermair

[permalink] [raw]
Subject: Re: vt8235 fix, hopefully last variant

Vojtech Pavlik:

> > starbase:/usr/src/linux-2.4.20# patch -p1 < vt8235-atapi
> > patching file drivers/ide/via82cxxx.c
> > Hunk #1 FAILED at 1.
> > Hunk #2 FAILED at 141.
> > Hunk #3 succeeded at 283 (offset -57 lines).
> > 2 out of 3 hunks FAILED -- saving rejects to file
> > starbase:/usr/src/linux-2.4.20#
>
> Since they're in comments only, you can ignore them.
>
> Can you please try even when the first two hunks failed? Only the
> third one really matters.

I patched the clean 2.4.20 source and it boots just fine after
compiling. DMA works fine too.
It's now my default kernel so I'll test it a bit more....

MSI KT3Ultra2, TOSHIBA DVD-ROM SD-M1302

Thanks,
Patrick




2002-12-21 11:52:36

by Vojtech Pavlik

[permalink] [raw]
Subject: Re: vt8235 fix, hopefully last variant

On Sat, Dec 21, 2002 at 11:51:50AM +0100, Patrick Petermair wrote:
> Vojtech Pavlik:
>
> > > starbase:/usr/src/linux-2.4.20# patch -p1 < vt8235-atapi
> > > patching file drivers/ide/via82cxxx.c
> > > Hunk #1 FAILED at 1.
> > > Hunk #2 FAILED at 141.
> > > Hunk #3 succeeded at 283 (offset -57 lines).
> > > 2 out of 3 hunks FAILED -- saving rejects to file
> > > starbase:/usr/src/linux-2.4.20#
> >
> > Since they're in comments only, you can ignore them.
> >
> > Can you please try even when the first two hunks failed? Only the
> > third one really matters.
>
> I patched the clean 2.4.20 source and it boots just fine after
> compiling. DMA works fine too.
> It's now my default kernel so I'll test it a bit more....

Thanks a lot for the report. If it keeps working, I'll send the patch to
Marcello.

--
Vojtech Pavlik
SuSE Labs

2002-12-21 17:55:01

by John Reiser

[permalink] [raw]
Subject: Re: vt8235 fix, hopefully last variant

Looking at the important piece:
-----
> + /* Always use 4 address setup clocks on ATAPI devices */
> + if (drive->media != ide_disk)
> + t.setup = 4;
-----
it seems to me that using 4 for t.setup also should be done unless _all_ devices
on that cable are ide_disk. In particular, if one device is ide_disk but the
other is not, then "t.setup = 4;" should be used even when talking to the ide_disk.
Otherwise the non-ide_disk device might get confused, respond when it should not,
and garble the transaction. Or, is such a bad thing prevented in some other way?

--
John Reiser, [email protected]

2002-12-21 18:19:58

by Vojtech Pavlik

[permalink] [raw]
Subject: Re: vt8235 fix, hopefully last variant

On Sat, Dec 21, 2002 at 09:57:42AM -0800, John Reiser wrote:

> Looking at the important piece:
> -----
> > + /* Always use 4 address setup clocks on ATAPI devices */
> > + if (drive->media != ide_disk)
> > + t.setup = 4;
> -----
> it seems to me that using 4 for t.setup also should be done unless _all_ devices
> on that cable are ide_disk. In particular, if one device is ide_disk but the
> other is not, then "t.setup = 4;" should be used even when talking to the ide_disk.
> Otherwise the non-ide_disk device might get confused, respond when it should not,
> and garble the transaction. Or, is such a bad thing prevented in some other way?

Good idea.

--
Vojtech Pavlik
SuSE Labs

2002-12-23 19:20:37

by HayArms

[permalink] [raw]
Subject: Re: vt8235 fix, hopefully last variant

Christian Seidemann wrote:

>Vojtech Pavlik wrote:
>
>
>
>>Hi!
>>
>>Can you guys try out this last take on a fix for your ATAPI device
>>problems? Applies against clean 2.4.20.
>>
>>Please report failure/success.
>>
>>Thanks.
>>
>>
>
>I also tried the vt8235-atapi patch and it works for me.
>MSI KT3 Ultra2 mainboard (KT333), vt8235.
>LG DVD-ROM DRD-8160B
>
>Thanks
>Christian
>-
>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/
>
>
>
For me this doesn't seems to work :(


Bye

Marcello

2002-12-23 22:43:36

by Patrick Petermair

[permalink] [raw]
Subject: Re: vt8235 fix, hopefully last variant

AnonimoVeneziano:

> For me this doesn't seems to work :(

What is it exactly that doesn't work? The patching, compiling, booting,
dma,...?

Patrick


2002-12-23 23:59:43

by HayArms

[permalink] [raw]
Subject: Re: vt8235 fix, hopefully last variant

Patrick Petermair wrote:

>AnonimoVeneziano:
>
>
>
>>For me this doesn't seems to work :(
>>
>>
>
>What is it exactly that doesn't work? The patching, compiling, booting,
>dma,...?
>
>Patrick
>
>
>-
>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/
>
>
>
The patching .... it said something about HUNKS failed....

Bye

Marcello

2002-12-24 00:16:49

by Patrick Petermair

[permalink] [raw]
Subject: Re: vt8235 fix, hopefully last variant

AnonimoVeneziano:

> >What is it exactly that doesn't work? The patching, compiling,
> > booting, dma,...?
> >
> The patching .... it said something about HUNKS failed....

It's normal that Hunk 1 and 2 fail... Hunk 3 is the important one. So
you can compile the kernel even with Hunks 1&2 failing.

Quote from Vojtech:
-----

> I tried the last patch, but it didn't work - I got Hunk messages:
>
> starbase:/usr/src/linux-2.4.20# patch -p1 < vt8235-atapi
> patching file drivers/ide/via82cxxx.c
> Hunk #1 FAILED at 1.
> Hunk #2 FAILED at 141.
> Hunk #3 succeeded at 283 (offset -57 lines).
> 2 out of 3 hunks FAILED -- saving rejects to file
> starbase:/usr/src/linux-2.4.20#

Since they're in comments only, you can ignore them.

-----

Patrick

2002-12-24 00:23:46

by HayArms

[permalink] [raw]
Subject: Re: vt8235 fix, hopefully last variant

Patrick Petermair wrote:

>AnonimoVeneziano:
>
>
>
>>>What is it exactly that doesn't work? The patching, compiling,
>>>booting, dma,...?
>>>
>>>
>>>
>>The patching .... it said something about HUNKS failed....
>>
>>
>
>It's normal that Hunk 1 and 2 fail... Hunk 3 is the important one. So
>you can compile the kernel even with Hunks 1&2 failing.
>
>Quote from Vojtech:
>-----
>
>
>
>>I tried the last patch, but it didn't work - I got Hunk messages:
>>
>>starbase:/usr/src/linux-2.4.20# patch -p1 < vt8235-atapi
>>patching file drivers/ide/via82cxxx.c
>>Hunk #1 FAILED at 1.
>>Hunk #2 FAILED at 141.
>>Hunk #3 succeeded at 283 (offset -57 lines).
>>2 out of 3 hunks FAILED -- saving rejects to file
>>starbase:/usr/src/linux-2.4.20#
>>
>>
>
>Since they're in comments only, you can ignore them.
>
>-----
>
>Patrick
>
>
>
>
Ah, ok, thank you very much, tomorrow I'll try to compile.I've tried to
compile the patch vt8235-min (with 2 hunks failed) but It wasn't work.
With vt8235-atapi I haven't tried at all when I've saw the failed hunks.
I haven't compile.

Thank you

Bye

Marcello