Subject: Re: problems with 1.6ZE
To: Jukka Marin <jmarin@kyyhky.embedtronics.fi>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: current-users
Date: 11/02/2003 21:11:37
--RnlQjJ0d97Da+TV1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Sun, Nov 02, 2003 at 08:08:59PM +0200, Jukka Marin wrote:
> > > wd1 at atabus2 drive 0: <SAMSUNG CF/ATA>
> > > wd1: drive supports 4-sector PIO transfers, LBA addressing
> > > wd1: 124 MB, 496 cyl, 16 head, 32 sec, 512 bytes/sect x 253952 sectors
> > > 
> > > The older cards look like this:
> > > 
> > > wd1 at atabus2 drive 0: <TOSHIBA THNCF128MMA>
> > > wd1: drive supports 1-sector PIO transfers, LBA addressing
> > > wd1: 122 MB, 978 cyl, 8 head, 32 sec, 512 bytes/sect x 250368 sectors
> > > 
> > > The problem existed with an older kernel (1.6W) as well.
> > 
> > Could you try to force it to 1-sector PIO transfer ?
> > Just force wd->sc_multi to 1 in wd.c:wdattach() line 326
> 
> This fixes the problem.  So I guess the Samsung cards are lying when they
> claim to support 4-sector transfers?  Or is there a bug in the NetBSD driver
> or something?
> 
> Why doesn't this problem show up on a slower HP laptop, but only on my
> 2 GHz IBM?

Probably a timing bug in the NetBSD driver.

Can you try the attached patch ?

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 24 ans d'experience feront toujours la difference
--

--RnlQjJ0d97Da+TV1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff

Index: ata_wdc.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ata/ata_wdc.c,v
retrieving revision 1.42
diff -u -r1.42 ata_wdc.c
--- ata_wdc.c	2003/10/29 22:05:15	1.42
+++ ata_wdc.c	2003/11/02 20:10:56
@@ -503,6 +503,7 @@
 	}
 	/* If this was a write and not using DMA, push the data. */
 	if ((ata_bio->flags & ATA_READ) == 0) {
+		DELAY(1);
 		/*
 		 * we have to busy-wait here, we can't rely on running in
 		 * thread context.

--RnlQjJ0d97Da+TV1--