Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jan 1999 06:50:01 -0800 (PST)
From:      Andrew Sherrod <btiags@ui.uis.doleta.gov>
To:        freebsd-bugs@FreeBSD.ORG
Subject:   Re: i386/9431: wd.c Does nto recognize certain LBA disks [patch attached]
Message-ID:  <199901141450.GAA20299@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 <btiags@ui.uis.doleta.gov>
To: freebsd-gnats-submit@freebsd.org, ixkatl@yahoo.com
Cc:  
Subject: Re: i386/9431: wd.c Does nto recognize certain LBA disks [patch attached]
Date: Thu, 14 Jan 1999 09:35:50 -0500

 This is a multi-part message in MIME format.
 --------------EA0D5F70CF578339B1589242
 Content-Type: text/plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
 Sorry. Wrong copy of the version 3.0 diff.
 This should have been attached above.
 (Actually, reposting both. THESE are the final versions.)
 
 Apologies for any confusion.
 
 Andrew Sherrod
 
 --------------EA0D5F70CF578339B1589242
 Content-Type: text/plain; charset=us-ascii; name="diffc2a.txt"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline; filename="diffc2a.txt"
 
 *** wd.c.2_2_8	Wed Jan 13 11:45:04 1999
 --- wd.c.original.2_2_8	Wed Jan 13 11:45:04 1999
 ***************
 *** 113,122 ****
   #define WDOPT_FORCEHD(x)	(((x)&0x0f00)>>8)
   #define WDOPT_MULTIMASK	0x00ff
   
 - /* This bit mask is used to determine if the drive supports LBA addressing. */
 - 
 - #define WDCAP_LBA		0x02
 - 
   /*
    * This biotab field doubles as a field for the physical unit number on
    * the controller.
 --- 113,118 ----
 ***************
 *** 1731,1745 ****
   	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;
 ! 
 !        /* Check for BIOS LBA flag. This should allow kernel to determine
 ! 	   actual disk geometry for diffiuclt BIOSes.  
 !  	   This will likely only be of use during initial installation, or
 !  	   perhaps when configuring a new drive. Otherwise, the disk geometry
 !  	   should already be known. -A. Sherrod 01/13/1999*/
 ! 
 ! 	if ( ( (wp->wdp_capability&WDCAP_LBA) ||
 !            (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 = 
 --- 1727,1733 ----
   	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 = 
 
 --------------EA0D5F70CF578339B1589242
 Content-Type: text/plain; charset=us-ascii; name="diffc3a.txt"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline; filename="diffc3a.txt"
 
 *** wd.c.3_0	Wed Jan 13 12:07:46 1999
 --- wd.c.original.3_0	Wed Jan 13 11:17:54 1999
 ***************
 *** 130,140 ****
    */
   #define	id_physid id_scsiid
   
 - /* This bitmask is used to determine if the BIOS flags showing LBA support
 -    are active or inactive */
 -    
 - #define WDCAP_LBA	0x02
 - 
   /*
    * Drive states.  Used to initialize drive.
    */
 --- 130,135 ----
 ***************
 *** 1954,1973 ****
   			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 BIOS specifies LBA mode is supported, but LBA flags
 ! 		   are not set, check if wdp_lbasize is larger than
 ! 		   CHS size. If so, use the lba_size. 
 ! 		   This should fix problems with certain BIOSes (e.g. Award)
 ! 		   which do not report the correct size when using only
 ! 		   CHS calculations.
 ! 		   This will not force the use of LBA mode. It is only
 ! 		   used to determine disk geometry.
 ! 		   
 ! 		   			-A. Sherrod 01/13/1999 */			
 ! 			
 ! 		if ( ( (wp->wdp_capabilities & WDCAP_LBA) ||
 ! 		     (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 = 
 --- 1949,1955 ----
   			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 = 
 
 --------------EA0D5F70CF578339B1589242--
 

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?199901141450.GAA20299>