Subject: kern/33637: ST3500841NS (500G SATA drive) require LBA48 quirk in wd.c
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Shigeya Suzuki <shigeya@tallac.isi.edu>
List: netbsd-bugs
Date: 06/02/2006 23:50:00
>Number:         33637
>Category:       kern
>Synopsis:       ST3500841NS (500G SATA drive) require LBA48 quirk in wd.c
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 02 23:50:00 +0000 2006
>Originator:     Shigeya Suzuki
>Release:        NetBSD 3.0.0_STABLE
>Organization:
WIDE Project
>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 }
  };

>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