Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Jul 2002 13:49:17 -0700
From:      Peter Wemm <peter@wemm.org>
To:        Scott Long <scott_long@btc.adaptec.com>
Cc:        Dag-Erling Smorgrav <des@ofug.org>, cvs-committers@freebsd.org, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/sys/conf files.sparc64 
Message-ID:  <20020720204917.A0B23380A@overcee.wemm.org>
In-Reply-To: <20020720202832.GA43959@hollin.btc.adaptec.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Scott Long wrote:
> > Index: dev/aic7xxx/aic79xx_osm.h
> > ===================================================================
> > RCS file: /home/ncvs/src/sys/dev/aic7xxx/aic79xx_osm.h,v
> > retrieving revision 1.2
> > diff -u -r1.2 aic79xx_osm.h
> > --- dev/aic7xxx/aic79xx_osm.h	6 Jun 2002 16:35:57 -0000	1.2
> > +++ dev/aic7xxx/aic79xx_osm.h	20 Jul 2002 17:51:55 -0000
> > @@ -38,9 +38,6 @@
> >  #define _AIC79XX_FREEBSD_H_
> >  
> >  #include <opt_aic79xx.h>	/* for config options */
> > -#ifndef NPCI
> > -#include <pci.h>
> > -#endif
> >  
> >  #include <sys/param.h>
> >  #include <sys/systm.h>
> > @@ -60,10 +57,8 @@
> >  
> >  #include <sys/rman.h>
> >  
> > -#if NPCI > 0
> >  #include <pci/pcireg.h>
> >  #include <pci/pcivar.h>
> > -#endif
> >  
> >  #include <cam/cam.h>
> >  #include <cam/cam_ccb.h>
> 
> While this is probably harmless, there might be non-pci attachments in the
> future that break this.

Heh, right now it is a NOP for this device.. And see below.

> > Index: dev/aic7xxx/aic7xxx_osm.h
> > ===================================================================
> > RCS file: /home/ncvs/src/sys/dev/aic7xxx/aic7xxx_osm.h,v
> > retrieving revision 1.14
> > diff -u -r1.14 aic7xxx_osm.h
> > --- dev/aic7xxx/aic7xxx_osm.h	26 Apr 2002 22:48:20 -0000	1.14
> > +++ dev/aic7xxx/aic7xxx_osm.h	20 Jul 2002 17:52:06 -0000
> > @@ -38,9 +38,6 @@
> >  #define _AIC7XXX_FREEBSD_H_
> >  
> >  #include <opt_aic7xxx.h>	/* for config options */
> > -#ifndef NPCI
> > -#include <pci.h>
> > -#endif
> >  
> >  #include <sys/param.h>
> >  #include <sys/systm.h>
> > @@ -51,12 +48,10 @@
> >  #include <sys/malloc.h>
> >  #include <sys/queue.h>
> >  
> > -#if NPCI > 0
> >  #define AHC_PCI_CONFIG 1
> >  #ifdef AHC_ALLOW_MEMIO
> >  #include <machine/bus_memio.h>
> >  #endif
> > -#endif
> >  #include <machine/bus_pio.h>
> >  #include <machine/bus.h>
> >  #include <machine/endian.h>
> > @@ -65,10 +60,8 @@
> >  
> >  #include <sys/rman.h>
> >  
> > -#if NPCI > 0
> >  #include <pci/pcireg.h>
> >  #include <pci/pcivar.h>
> > -#endif
> >  
> >  #include <cam/cam.h>
> >  #include <cam/cam_ccb.h>
> 
> This will break the 274x and 284x cards (EISA and VLB, respectively).

No, it wont, becase there is a seperate option:

#ifdef AHC_ALLOW_MEMIO
#include <machine/bus_memio.h>
#endif

And even if AHC_ALLOW_MEMIO is specified in the kernel config, whether
it uses memio or pio is a property of the bus space handle/tag.  What having
both of the methods compiled in does is cause a runtime switch between one
or the other.  274x and 284x (I have a 2742T system still) are (at face value)
unaffected by this change.

Besides, my 2742T system has PCI as well, so NPCI *is* 1 on it, and it
Works Just Fine.  In fact, GENERIC has NPCI = 1 as well so this code is used
in 99% of freebsd installs "out there".

> Is getting rid of NPCI an urgent issue?  The aic7xxx can probably be fixed,
> but not without some effort.  I need to resurrect the work I did on
> separating the driver into descrete attachment front-ends.

This doesn't break it.

Cheers,
-Peter
--
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5


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




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