From nobody@FreeBSD.org  Mon Jan 26 08:19:01 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
Received: from www.freebsd.org (localhost [127.0.0.1])
Received: (from nobody@localhost)
Message-Id: <200401261545.i0QFjnRP075973@www.freebsd.org>
Date: Mon, 26 Jan 2004 07:45:49 -0800 (PST)
From: Hirokazu WATANABE <wnabe@par.odn.ne.jp>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [Patch] BigDrive support for PC-98 architecture (ata(4) driver)
X-Send-Pr-Version: www-2.0

>Number:         61960
>Category:       kern
>Synopsis:       [ata] [patch] BigDrive support for PC-98 architecture (ata(4) driver)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    linimon
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 26 08:20:06 PST 2004
>Closed-Date:    Sat Aug 28 10:38:20 UTC 2010
>Last-Modified:  Sat Aug 28 10:38:20 UTC 2010
>Originator:     Hirokazu WATANABE
>Release:        FreeBSD/pc98 5.2-RELEASE
>Organization:
>Environment:
FreeBSD hebe.fb98.dyndns.org 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Sun Jan 25 14:06:12 JST 2004 watanabe@proteus.fb98.dyndns.org:/usr/src/sys/pc98/compile/GENERIC  i386

>Description:
PC-98's slice table managed by CHS geometry. And the ata(4) driver is 
using the head/sector value acquired from HDD. However, in 32GB or more 
of HDD, since a cylinder value overflows, it cannot be used normally.
(Some interfaces for PC-98x1 works over 8GB HDDs. But there are still 
manages in CHS geometry.)

PC-98's slice table max values are followd(maybe)...
Cylinder: 65534(=65535)
Heads:    255(=256)
Sectors:  255

Typical PC-98's geometry:
under 4.3GB:                    heads=8,   sectors=17
4.3GB to 32GB:                  heads=16,  sectors=63(=HDD's geometry)
32GB to 128GB:                  heads=16,  sectors=255(*1)
128GB to 2TB:                   heads=255, sectors=255(*2,*3,*4)
over 2TB:      cylinders=65534, heads=255, sectors=255(*2,*3)

(*1) PK98-Mistress9[atacbus's add-on BIOS] and UIDE-133/98(PCI-ATA) only
(*2) UIDE-133/98 only
(*3) PK98-Mistress9 is cylinders=65534, heads=16, sectors=255
(*4) over 128GB or supports 48bit LBA

>How-To-Repeat:
FreeBSD/pc98 5.2-RELEASE installed, and use fdisk_pc98(8) for 
over-32GB-HDD. Then, fdisk_pc98 cannot handle its geometry.
This is because cylinder of HDD is over 16bit.

>Fix:
ata(4) use BIOS geometry, or it changes not with the value acquired from HDDs but with the fixed value(heads/sectors). 

A patch which solves this problem is appended to below.
(http://fb98.dyndns.org/FreeBSD/bignadrive-20040126.diff.gz)

begin 644 bignadrive.diff.gz
M'XL(")W.%$```V)I9VYA9')I=F4N9&EF9@"]6/USVD83_AG^BHT[3<$@T!>?
MKDF(33.\$\<98[_O3-,,(Z23N3%(C#ZHT\;_^[M[^D`2"#OMM(PMT-WMWN[>
ML\_=WM2QV.,0?,]LK_B"_BWN/[3-I>'<LY99/?_[G^K-Q0QLOF)#:"_=-6L[
MYM9OE\W8W%8]%GB<;;ES#QY^^=QU0&FI>M7BM@U2"))'KY`:*4E2J0<5I0,?
MW2VHLJR"H@U5?:@.0)+Q4Q%*&XU&N;#:A?\8#@GK(.M#11G*G4BX^O8M2+K<
M[$$#GXH";]]6H<)MJ)$&:;3@KC\WOZY@!(JLZO4J_,`<=``'57S#87`.\EFU
M\0.W+6;#IXM!O]HHBB\M&)V#VNG6<2!;^6Q_!AH"2C1@7SUDU>_)^LP,T@G(
MG5ZOV85&7VFJFG`G55EPZ1RB!G,9.@^^-/+Y'PS:-/6>^E/(&5M_SF52_S-T
M.QV-?*I4$`NAYZ`4OK1/8>S[X9K!W?1R(BF:UA[TI3%<+(W5BN&">?!N>CT#
MN37HJ\H%;`S/6+,`FT_;*%XTC1SOG.4[,)SG&,Y"ZQ&?&R_S^3O=?#=]+SF&
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IR%F=(5,%.2:Q_Z4$%=X\@?M[3QBIM:$!=V<]J8/O,O9\`;
M#2K9HP&-\WQW=*U7N-V5TFHP>_=\'MTQTJG2RM\89YNR%\&T"W^7*A0ZH@MB
5"!]4^7T:NWJL4*#]_T4X_!BY&```
`
end

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->sos 
Responsible-Changed-By: nyan 
Responsible-Changed-When: Mon Jan 26 16:05:09 PST 2004 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=61960 
State-Changed-From-To: open->analyzed 
State-Changed-By: sos 
State-Changed-When: Mon Apr 11 11:28:53 GMT 2005 
State-Changed-Why:  
These issue are being dealt with in -current. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=61960 
State-Changed-From-To: analyzed->closed 
State-Changed-By: sos 
State-Changed-When: Wed Jan 4 22:13:49 UTC 2006 
State-Changed-Why:  
I think this has been taken as far as possible in 6.0 forward. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=61960 

From: Takahashi Yoshihiro <nyan@jp.FreeBSD.org>
To: bug-followup@FreeBSD.org, wnabe@par.odn.ne.jp, sos@FreeBSD.org
Cc:  
Subject: Re: kern/61960: [ata] [patch] BigDrive support for PC-98
 architecture (ata(4) driver)
Date: Sat, 07 Jan 2006 14:44:19 +0900 (JST)

 > I think this has been taken as far as possible in 6.0 forward.
 
 ATA/ATAPI-6 and later disks don't work yet.
 
 ---
 TAKAHASHI Yoshihiro <nyan@jp.FreeBSD.org>
State-Changed-From-To: closed-> 
State-Changed-By: sos 
State-Changed-When: Sat Jan 7 13:25:39 UTC 2006 
State-Changed-Why:  
Please define don't work.. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=61960 

From: Takahashi Yoshihiro <nyan@jp.FreeBSD.org>
To: bug-followup@FreeBSD.org, wnabe@par.odn.ne.jp, sos@FreeBSD.org,
        imp@FreeBSD.org
Cc:  
Subject: Re: kern/61960: [ata] [patch] BigDrive support for PC-98
 architecture (ata(4) driver)
Date: Sun, 08 Jan 2006 12:37:34 +0900 (JST)

 > Please define don't work..
 
 Current ata driver recognizes a geometry for ATA/ATAPI-6 disk as
 16 heads and 63 sectors.  But it's wrong on pc98.  it should be
 255 heads and 255 sectors.
 
 Please remember discussions when ATA-mkIII was developed.
 
From: "M. Warner Losh" <imp@bsdimp.com>
To: nyan@jp.FreeBSD.org
Cc: bug-followup@FreeBSD.org, wnabe@par.odn.ne.jp, sos@FreeBSD.org
Subject: Re: kern/61960: [ata] [patch] BigDrive support for PC-98
 architecture (ata(4) driver)
Date: Sat, 07 Jan 2006 21:30:23 -0700 (MST)

 In message: <20060108.123734.74730896.nyan@jp.FreeBSD.org>
             Takahashi Yoshihiro <nyan@jp.FreeBSD.org> writes:
 : > Please define don't work..
 : 
 : Current ata driver recognizes a geometry for ATA/ATAPI-6 disk as
 : 16 heads and 63 sectors.  But it's wrong on pc98.  it should be
 : 255 heads and 255 sectors.
 : 
 : Please remember discussions when ATA-mkIII was developed.
 
 I have patches in my tree that try to correct this problem.  They do
 not complicate the ata code beyond one line...
 
 Warner
 
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Mon May 11 21:49:22 UTC 2009 
State-Changed-Why:  
To submitter: is this still a problem? 


Responsible-Changed-From-To: sos->linimon 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon May 11 21:49:22 UTC 2009 
Responsible-Changed-Why:  
sos@ is not actively working on ATA-related PRs. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=61960 
State-Changed-From-To: feedback->closed 
State-Changed-By: linimon 
State-Changed-When: Sat Aug 28 10:37:31 UTC 2010 
State-Changed-Why:  
Feedback timeout ( > 1 year).  To submitter: please let us know if this 
is still a problem and we can reopen it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=61960 
>Unformatted:
