NetBSD Problem Report #33637
From shigeya@tallac.isi.edu Fri Jun 2 23:48:43 2006
Return-Path: <shigeya@tallac.isi.edu>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 7BFA163B863
for <gnats-bugs@gnats.NetBSD.org>; Fri, 2 Jun 2006 23:48:43 +0000 (UTC)
Message-Id: <200606022238.k52McTP9018296@tallac.isi.edu>
Date: Fri, 2 Jun 2006 15:38:29 -0700 (PDT)
From: Shigeya Suzuki <shigeya@tallac.isi.edu>
Reply-To: shigeya@tallac.isi.edu
To: gnats-bugs@NetBSD.org
Cc: shigeya@wide.ad.jp
Subject: ST3500841NS (500G SATA drive) require LBA48 quirk in wd.c
X-Send-Pr-Version: 3.95
>Number: 33637
>Category: kern
>Synopsis: ST3500841NS (500G SATA drive) require LBA48 quirk in wd.c
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bouyer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jun 02 23:50:00 +0000 2006
>Closed-Date: Sat Jun 24 22:22:11 +0000 2006
>Last-Modified: Sat Jun 24 22:25:01 +0000 2006
>Originator: Shigeya Suzuki
>Release: NetBSD 3.0.0_STABLE
>Organization:
WIDE Project
>Environment:
>Description:
There LBA48 required by some of Seagate drives. Unfortunately Latest
500G SATA drive (ST3500841NS) also require this hack. There are hack to
use pmatch(9) applied v1.310 of wd.c but it can't catch this newer drive
since pattern does not match.
>How-To-Repeat:
Use ST3500841NS, then run following:
dd if=/dev/zero of=/dev/rwd1d seek=268435000 count=1000
You'll get I/O error.
>Fix:
Following fix works. Of course it is possible to merge it to other
patterns.
Index: wd.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ata/wd.c,v
retrieving revision 1.298.2.7.2.3
diff -c -r1.298.2.7.2.3 wd.c
*** wd.c 24 May 2006 02:15:21 -0000 1.298.2.7.2.3
--- wd.c 2 Jun 2006 22:30:19 -0000
***************
*** 244,249 ****
--- 244,252 ----
/* Attemp to catch all seagate drives larger than 200GB */
{ "ST3[2-9][0-9][0-9][0-9][0-9][0-9]A*",
WD_QUIRK_FORCE_LBA48 },
+ /* ST3500841NS and other */
+ { "ST3[2-9][0-9][0-9][0-9][0-9][0-9]NS",
+ WD_QUIRK_FORCE_LBA48 },
{ NULL,
0 }
};
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: kern-bug-people->bouyer
Responsible-Changed-By: bouyer@netbsd.org
Responsible-Changed-When: Mon, 05 Jun 2006 18:24:27 +0000
Responsible-Changed-Why:
I commited a fix
State-Changed-From-To: open->feedback
State-Changed-By: bouyer@netbsd.org
State-Changed-When: Mon, 05 Jun 2006 18:24:27 +0000
State-Changed-Why:
I commited a fix, will ask a pullup if it's confirmed to be OK.
From: Manuel Bouyer <bouyer@antioche.eu.org>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@NetBSD.org, gnats-admin@NetBSD.org,
netbsd-bugs@NetBSD.org
Subject: Re: kern/33637: ST3500841NS (500G SATA drive) require LBA48 quirk in wd.c
Date: Mon, 5 Jun 2006 20:23:29 +0200
--7JfCtLOvnd9MIVvH
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Fri, Jun 02, 2006 at 11:50:00PM +0000, Shigeya Suzuki wrote:
> [...]
> Index: wd.c
> ===================================================================
> RCS file: /cvsroot/src/sys/dev/ata/wd.c,v
> retrieving revision 1.298.2.7.2.3
> diff -c -r1.298.2.7.2.3 wd.c
> *** wd.c 24 May 2006 02:15:21 -0000 1.298.2.7.2.3
> --- wd.c 2 Jun 2006 22:30:19 -0000
> ***************
> *** 244,249 ****
> --- 244,252 ----
> /* Attemp to catch all seagate drives larger than 200GB */
> { "ST3[2-9][0-9][0-9][0-9][0-9][0-9]A*",
> WD_QUIRK_FORCE_LBA48 },
> + /* ST3500841NS and other */
> + { "ST3[2-9][0-9][0-9][0-9][0-9][0-9]NS",
> + WD_QUIRK_FORCE_LBA48 },
> { NULL,
> 0 }
> };
Hi,
I commited the attached patch. Can you check if it works for you ?
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--
--7JfCtLOvnd9MIVvH
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff
Index: wd.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ata/wd.c,v
retrieving revision 1.324
diff -u -r1.324 wd.c
--- wd.c 18 May 2006 19:42:09 -0000 1.324
+++ wd.c 5 Jun 2006 18:21:16 -0000
@@ -246,7 +246,7 @@
{ "ST3160827A*",
WD_QUIRK_FORCE_LBA48 },
/* Attempt to catch all seagate drives larger than 200GB */
- { "ST3[2-9][0-9][0-9][0-9][0-9][0-9]A*",
+ { "ST3[2-9][0-9][0-9][0-9][0-9][0-9][A-Z]*",
WD_QUIRK_FORCE_LBA48 },
{ NULL,
0 }
--7JfCtLOvnd9MIVvH--
From: Shigeya Suzuki <shigeya@wide.ad.jp>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/33637
Date: Tue, 20 Jun 2006 13:00:06 -0700
I tested. It's working on my server.
To make sure, I added verbose message to show whether it is installed
the quirk on the drive or not -- it shown the message.
Isn't it useful to show such quirk flags on boot message?
shigeya
From: Shigeya Suzuki <shigeya@wide.ad.jp>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/33637
Date: Tue, 20 Jun 2006 13:06:27 -0700
Forgot to mention this, but I tested this too, and working:
tallac 8# dd of=/dev/null if=/dev/rwd1d skip=268435000
count=1000 ~
1000+0 records in
1000+0 records out
512000 bytes transferred in 2.314 secs (221261 bytes/sec)
shigeya
State-Changed-From-To: feedback->closed
State-Changed-By: bouyer@netbsd.org
State-Changed-When: Sat, 24 Jun 2006 22:22:11 +0000
State-Changed-Why:
confirmed fixed. Thanks !
From: Manuel Bouyer <bouyer@antioche.eu.org>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org,
shigeya@tallac.isi.edu
Subject: Re: kern/33637
Date: Sun, 25 Jun 2006 00:24:15 +0200
On Tue, Jun 20, 2006 at 08:05:02PM +0000, Shigeya Suzuki wrote:
> The following reply was made to PR kern/33637; it has been noted by GNATS.
>
> From: Shigeya Suzuki <shigeya@wide.ad.jp>
> To: gnats-bugs@NetBSD.org
> Cc:
> Subject: Re: kern/33637
> Date: Tue, 20 Jun 2006 13:00:06 -0700
>
> I tested. It's working on my server.
Thanks !
>
> To make sure, I added verbose message to show whether it is installed
> the quirk on the drive or not -- it shown the message.
>
> Isn't it useful to show such quirk flags on boot message?
Hum, it would be marginally usefull, only used for debugging.
Maybe it could be added using aprint_verbose ?
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--
>Unformatted:
>System: NetBSD tallac.isi.edu 3.0.0_STABLE NetBSD 3.0.0_STABLE (TALLAC) #2: Fri Jun 2 14:07:50 PDT 2006 root@tallac.isi.edu:/usr/src/sys/arch/i386/compile/TALLAC i386
>Architecture: i386
>Machine: i386
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.