public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vojtech Pavlik <vojtech@suse.cz>
To: Petr Vandrovec <vandrove@vc.cvut.cz>
Cc: vojtech@suse.cz, martin@dalecki.de, linux-kernel@vger.kernel.org
Subject: Re: VIA, 32bit PIO and 2.5.x kernel
Date: Fri, 12 Apr 2002 10:20:21 +0200	[thread overview]
Message-ID: <20020412102021.A18037@ucw.cz> (raw)
In-Reply-To: <20020412001029.GA1172@ppc.vc.cvut.cz>

On Fri, Apr 12, 2002 at 02:10:29AM +0200, Petr Vandrovec wrote:

>   last friday I found strange problem with 2.5.8-pre1 kernel
> corrupting my data. Today I tracked it down to enabled (by
> default) 32bit I/O. Problem occurs only in 2.5.x kernels
> (2.5.8-pre1, 2.5.8-pre3) and does not occur in 2.4.x
> (2.4.19-pre6, 2.4.18-pre4). My tests were done in 
> non-multicount mode:
> 
> /dev/hdc:
>  multcount    =  0 (off)
>  I/O support  =  1 (32-bit)
>  unmaskirq    =  1 (on)
>  using_dma    =  0 (off)
>  keepsettings =  0 (off)
>  nowerr       =  0 (off)
>  readonly     =  0 (off)
>  geometry     = 4865/255/63, sectors = 78165360, start = 0
>  busstate     =  1 (on)
> 
>   After looking through code up and down I found that first 
> sector is written in 32bit mode, while others in 16bit mode, 
> and VIA IDE interface does not cope with this correctly. Can 
> anybody explain me, what's wrong with patch at the end of this 
> message? As there is dozen of places where io_32bit is cleared, 
> I believe that there must be some reason for doing that... And 
> do not ask me why it worked in 2.4.x, as it cleared io_32bit
> in task_out_intr too.

It's a very unwise thing to disable 32-bit mode on VIA and AMD chipsets,
AMD even has it in their errata (VIA has no documented errata, of
course). Thanks for the good find. Martin, can we do anything about
this?

> diff -urN linux-2.5.8-pre3.dist/drivers/ide/ide-taskfile.c linux-2.5.8-pre3/drivers/ide/ide-taskfile.c
> --- linux-2.5.8-pre3.dist/drivers/ide/ide-taskfile.c	Sun Apr  7 03:43:03 2002
> +++ linux-2.5.8-pre3/drivers/ide/ide-taskfile.c	Fri Apr 12 01:50:04 2002
> @@ -602,7 +602,7 @@
>  		rq = HWGROUP(drive)->rq;
>  		pBuf = ide_map_rq(rq, &flags);
>  		DTF("write: %p, rq->current_nr_sectors: %d\n", pBuf, (int) rq->current_nr_sectors);
> -		drive->io_32bit = 0;
> +//		drive->io_32bit = 0;
>  		taskfile_output_data(drive, pBuf, SECTOR_WORDS);
>  		ide_unmap_rq(rq, pBuf, &flags);
>  		drive->io_32bit = io_32bit;

-- 
Vojtech Pavlik
SuSE Labs

  parent reply	other threads:[~2002-04-12  8:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-12  0:10 VIA, 32bit PIO and 2.5.x kernel Petr Vandrovec
2002-04-12  0:56 ` VIA and 2.5.8-pre kernels doesn't boot! Anton Altaparmakov
2002-04-12  7:46   ` Martin Dalecki
2002-04-12 10:10     ` Anton Altaparmakov
2002-04-12  8:20 ` Vojtech Pavlik [this message]
2002-04-12  8:04   ` VIA, 32bit PIO and 2.5.x kernel Martin Dalecki
2002-04-13 10:12     ` Russell King
2002-04-13 10:15       ` Vojtech Pavlik
2002-04-13 13:23       ` Martin Dalecki
2002-04-13 17:06         ` Andre Hedrick
2002-04-13 17:38           ` Alan Cox
2002-04-13 18:15             ` Andre Hedrick
2002-04-13 22:49             ` Martin Dalecki
2002-04-12  8:41 ` Jens Axboe
2002-04-12  9:15   ` Andre Hedrick
2002-04-12  8:53     ` Martin Dalecki
2002-04-12 10:16     ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020412102021.A18037@ucw.cz \
    --to=vojtech@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin@dalecki.de \
    --cc=vandrove@vc.cvut.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox