Subject: Re: two disks, two controlers, same bad block
To: None <tech-kern@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 03/27/2006 10:05:19
--5vNYLRcllDrimb99
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Mon, Mar 27, 2006 at 12:40:20AM -0500, George Georgalis wrote:
> 
> looks like a bad block on the disk... 268435455
> 
> [...]
> 
> wd0 and wd1 are on the SATALink 3112, and wd2 is on the VT8237.
> these are the commands and subsequent errors... note same block
> 268435455
> [...]
> 
> wd1 above is a Seagate ST3400832A8 (400GB)
> and wd2 is a ST3500641AS (500GB)
> 
> The kernel is NetBSD 3.0 (GENERIC), any idea what's wrong here?

Seagate gets it wrong. 268435455 is 0xfffffff, a valid sector number
for LBA but which is not handled properly by seagate firmwares.
The workaround is to use LBA48 for this sector number.

The attached patch should catch all seagate drives that needs it; it's in
current but not in 3.0.

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

--5vNYLRcllDrimb99
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.309
retrieving revision 1.310
diff -u -r1.309 -r1.310
--- wd.c	5 Sep 2005 20:42:37 -0000	1.309
+++ wd.c	5 Sep 2005 21:09:08 -0000	1.310
@@ -243,15 +243,9 @@
 	  WD_QUIRK_FORCE_LBA48 },
 	{ "ST3160827A*",
 	  WD_QUIRK_FORCE_LBA48 },
-	{ "ST3200822A*",
+	/* 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 },
-	{ "ST3250823A*",
-	  WD_QUIRK_FORCE_LBA48 },
-	{ "ST3200826A*",
-	  WD_QUIRK_FORCE_LBA48 },
-	{ "ST3300831A*",
-	  WD_QUIRK_FORCE_LBA48 },
-
 	{ NULL,
 	  0 }
 };

--5vNYLRcllDrimb99--