Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Jan 2000 23:21:34 +0100 (MET)
From:      Gerard Roudier <groudier@club-internet.fr>
To:        Peter Wemm <peter@netplex.com.au>
Cc:        "Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net>, obrien@NUXI.com, "Chris D. Faulhaber" <jedgar@fxp.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/i386/conf GENERIC LINT 
Message-ID:  <Pine.LNX.3.95.1000109224806.340A-100000@localhost>
In-Reply-To: <20000109151602.C6BAE1CC6@overcee.netplex.com.au>

index | next in thread | previous in thread | raw e-mail


On Sun, 9 Jan 2000, Peter Wemm wrote:

> Just for reference, this is the patch I am talking about and think we should
> use:
> Index: ncr.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/pci/ncr.c,v
> retrieving revision 1.141.2.4
> diff -u -r1.141.2.4 ncr.c
> --- ncr.c	1999/08/29 16:31:53	1.141.2.4
> +++ ncr.c	2000/01/09 15:10:39
> @@ -39,6 +39,8 @@
>  ***************************************************************************
>  */
>  
> +#include "sym.h"		/* for NSYM */
> +
>  #define NCR_DATE "pl30 98/1/1"
>  
>  #define NCR_VERSION	(2)
> @@ -3314,6 +3316,14 @@
>  	
>  	found = -1;
>  	for (i = 0; i < sizeof(ncr_chip_table)/sizeof(ncr_chip_table[0]); i++) {
> +#if NSYM > 0
> +		/*
> +		 *  Ignore chips that support LOAD/STORE, so the sym_hipd
> +		 *  driver will attach them without any conflict.
> +		 */
> +		if (ncr_chip_table[i].features & FE_LDSTR)
> +			continue;
> +#endif
>  		if (device_id	== ncr_chip_table[i].device_id &&
>  		    ncr_chip_table[i].minrevid <= revision_id) {
>  			if (found < 0 || 
> 

Hmmm... In fact this patch hasn't the expected effect :). I didn't provide 
a better one since nobody seems to need to configure both drivers.

The one we should want to use, if needed, looks like the below one, modulo
the '#if NSYM' and friends: 

Index: ncr.c
===================================================================
RCS file: /home/ncvs/src/sys/pci/ncr.c,v
retrieving revision 1.141.2.4
diff -u -r1.141.2.4 ncr.c
--- ncr.c	1999/08/29 16:31:53	1.141.2.4
+++ ncr.c	1999/11/20 17:15:10
@@ -3314,8 +3314,16 @@
 	
 	found = -1;
 	for (i = 0; i < sizeof(ncr_chip_table)/sizeof(ncr_chip_table[0]); i++) {
+/*
+ *  Ignore chips that support LOAD/STORE, so the sym_hipd driver will 
+ *  attach them without any conflict.
+ */
 		if (device_id	== ncr_chip_table[i].device_id &&
 		    ncr_chip_table[i].minrevid <= revision_id) {
+			if (ncr_chip_table[i].features & FE_LDSTR) {
+				found = -1;
+				continue;
+			}
 			if (found < 0 || 
 			    ncr_chip_table[found].minrevid 
 			      < ncr_chip_table[i].minrevid) {

The previous patch was broken since the ncr driver inspects the whole chip
table and use as 'best' entry the one that corresponds to the highest
minrevid field value. 

For example a 810A, will be caught by a previous entry that fits the 810
(revid < 0x10) and that hasn't the FE_LDSTR bit set.

And, by the way, I donnot bet that the second patch is quite ok.:-)
It should be fine given that the LOAD/STORE has never been dropped by 
later chip revisions once it has been supported.

Do we really need such a patch ? :)

Gérard.



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



help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.3.95.1000109224806.340A-100000>