Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Jan 1999 18:20:02 -0800 (PST)
From:      Andrew Sherrod <yaldabaoth@geocities.com>
To:        freebsd-bugs@FreeBSD.ORG
Subject:   [Modified Patch] Re: i386/9431: wd.c Does nto recognize certain LBA disks [patch attached]
Message-ID:  <199901120220.SAA03557@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR i386/9431; it has been noted by GNATS.

From: Andrew Sherrod <yaldabaoth@geocities.com>
To: freebsd-gnats-submit@freebsd.org, ixkatl@yahoo.com
Cc:  
Subject: [Modified Patch] Re: i386/9431: wd.c Does nto recognize certain LBA disks [patch attached]
Date: Mon, 11 Jan 1999 21:11:24 -0500

 This is a multi-part message in MIME format.
 --------------8FCCD93F6580F4F426E50F0A
 Content-Type: text/plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
 Correcting my own mistake here. (Never try to patch something too late
 at night.)
 
 The piece of code I changed was NOT inside the LBA flag portion.
 Insterad, it was in the "else" part
 of the "if lba_flag" code.
 
 The reason? It seems Award BIOS (at least some versions) do not return
 any flags when LBA is active.
 So, the patch still stands, it simply needs a better explanation.
 
 (I could really use the input of some disk gurus here. Any idea why the
 Award BIOS would NOT return
 any flags? And, more important, if LBA is not enabled, will any lba_size
 value be returned?Or if LBA is off
 is a null or 0 returned?)
 
 Proposed patches for 2.2.8 and 3.0.0 follow:
 
 
 --------------8FCCD93F6580F4F426E50F0A
 Content-Type: text/plain; charset=us-ascii; name="diff228.txt"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline; filename="diff228.txt"
 
 *** wd.c.2_2_8	Mon Jan 11 20:59:44 1999
 --- wd.c.original.2_2_8	Mon Jan 11 20:41:01 1999
 ***************
 *** 1727,1740 ****
   	du->dk_dd.d_nsectors = wp->wdp_sectors;  
   	du->dk_dd.d_secpercyl = du->dk_dd.d_ntracks * du->dk_dd.d_nsectors;  
   	du->dk_dd.d_secperunit = du->dk_dd.d_secpercyl * du->dk_dd.d_ncylinders;  
 !         /* It appears that Award BIOSes (At least the more recent
 !            versions) do not return an LBA flag when probed. However,
 !            as an LBA size should not be returned when LBA mode is not
 !            active, this hack seems safe.
 ! 
 !            A. Sherrod 01/11/1998   */
 ! 
 !         if(du->dk_dd.d_secperunit < wp->wdp_lbasize) {   
           	du->dk_dd.d_secperunit = wp->wdp_lbasize;  
           	du->dk_dd.d_ncylinders =   
   			du->dk_dd.d_secperunit / du->dk_dd.d_secpercyl;   
 --- 1727,1734 ----
   	du->dk_dd.d_nsectors = wp->wdp_sectors;  
   	du->dk_dd.d_secpercyl = du->dk_dd.d_ntracks * du->dk_dd.d_nsectors;  
   	du->dk_dd.d_secperunit = du->dk_dd.d_secpercyl * du->dk_dd.d_ncylinders;  
 ! 	if (wp->wdp_cylinders == 16383 &&  
 !             du->dk_dd.d_secperunit < wp->wdp_lbasize) {   
           	du->dk_dd.d_secperunit = wp->wdp_lbasize;  
           	du->dk_dd.d_ncylinders =   
   			du->dk_dd.d_secperunit / du->dk_dd.d_secpercyl;   
 
 --------------8FCCD93F6580F4F426E50F0A
 Content-Type: text/plain; charset=us-ascii; name="diff300.txt"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline; filename="diff300.txt"
 
 *** wd.c.3_0	Mon Jan 11 21:01:30 1999
 --- wd.c.original.3_0	Sun Jan 10 21:27:22 1999
 ***************
 *** 1949,1964 ****
   			du->dk_dd.d_ntracks * du->dk_dd.d_nsectors;  
   		du->dk_dd.d_secperunit =   
   			du->dk_dd.d_secpercyl * du->dk_dd.d_ncylinders;  
 !                
 ! 		/* It appears that certain Award BIOSes (newer versions
 ! 		   apparently) do not return LBA flags when LBA is
 ! 		  active. Hwoever, as LBA size should not be returned
 ! 		  when LBA is off, this hack should be safe.
 ! 
 ! 		  A. Sherrod 01/11/1998   */
 ! 
 ! 
 ! 		if(du->dk_dd.d_secperunit < wp->wdp_lbasize) {  
   			du->dk_dd.d_secperunit = wp->wdp_lbasize;  
   			du->dk_dd.d_ncylinders =   
   				du->dk_dd.d_secperunit / du->dk_dd.d_secpercyl;  
 --- 1949,1956 ----
   			du->dk_dd.d_ntracks * du->dk_dd.d_nsectors;  
   		du->dk_dd.d_secperunit =   
   			du->dk_dd.d_secpercyl * du->dk_dd.d_ncylinders;  
 ! 		if (wp->wdp_cylinders == 16383 &&  
 ! 		    du->dk_dd.d_secperunit < wp->wdp_lbasize) {  
   			du->dk_dd.d_secperunit = wp->wdp_lbasize;  
   			du->dk_dd.d_ncylinders =   
   				du->dk_dd.d_secperunit / du->dk_dd.d_secpercyl;  
 
 --------------8FCCD93F6580F4F426E50F0A--
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901120220.SAA03557>