diff options
Diffstat (limited to 'sys/pci')
-rw-r--r-- | sys/pci/brooktree848.c | 16 | ||||
-rw-r--r-- | sys/pci/if_fpa.c | 4 | ||||
-rw-r--r-- | sys/pci/if_fxp.c | 16 | ||||
-rw-r--r-- | sys/pci/if_sr_p.c | 4 | ||||
-rw-r--r-- | sys/pci/if_tx.c | 2 | ||||
-rw-r--r-- | sys/pci/ncr.c | 6 | ||||
-rw-r--r-- | sys/pci/tek390.c | 76 |
7 files changed, 65 insertions, 59 deletions
diff --git a/sys/pci/brooktree848.c b/sys/pci/brooktree848.c index 7f9e838..fa68862 100644 --- a/sys/pci/brooktree848.c +++ b/sys/pci/brooktree848.c @@ -4131,7 +4131,7 @@ checkDBX: * IF freq: 45.75 mHz */ #define OFFSET 6.00 -int nabcst[] = { +static int nabcst[] = { 83, (int)( 45.75 * FREQFACTOR), 0, 14, (int)(471.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), 7, (int)(175.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), @@ -4154,7 +4154,7 @@ int nabcst[] = { * IF freq: 45.75 mHz */ #define OFFSET 6.00 -int irccable[] = { +static int irccable[] = { 99, (int)( 45.75 * FREQFACTOR), 0, 95, (int)( 91.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), 23, (int)(217.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), @@ -4179,7 +4179,7 @@ int irccable[] = { * IF freq: 45.75 mHz */ #define OFFSET 6.00 -int hrccable[] = { +static int hrccable[] = { 99, (int)( 45.75 * FREQFACTOR), 0, 95, (int)( 90.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), 23, (int)(216.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), @@ -4308,12 +4308,12 @@ int hrccable[] = { * 100 3890 000 IFFREQ * */ -int weurope[] = { +static int weurope[] = { 100, (int)( 38.90 * FREQFACTOR), 0, 90, (int)(231.25 * FREQFACTOR), (int)(7.00 * FREQFACTOR), 80, (int)(105.25 * FREQFACTOR), (int)(7.00 * FREQFACTOR), 74, (int)( 69.25 * FREQFACTOR), (int)(7.00 * FREQFACTOR), - 21, (int)(471.25 * FREQFACTOR), (int)(8.00 * FREQFACTOR), + 21, (int)(471.25 * FREQFACTOR), (int)(8.00 * FREQFACTOR), 17, (int)(183.25 * FREQFACTOR), (int)(9.00 * FREQFACTOR), 16, (int)(175.25 * FREQFACTOR), (int)(9.00 * FREQFACTOR), 15, (int)(82.25 * FREQFACTOR), (int)(8.50 * FREQFACTOR), @@ -4337,7 +4337,7 @@ int weurope[] = { */ #define OFFSET 6.00 #define IF_FREQ 45.75 -int jpnbcst[] = { +static int jpnbcst[] = { 62, (int)(IF_FREQ * FREQFACTOR), 0, 13, (int)(471.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), 8, (int)(193.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), @@ -4362,7 +4362,7 @@ int jpnbcst[] = { */ #define OFFSET 6.00 #define IF_FREQ 45.75 -int jpncable[] = { +static int jpncable[] = { 63, (int)(IF_FREQ * FREQFACTOR), 0, 23, (int)(223.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), 22, (int)(165.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), @@ -4375,7 +4375,7 @@ int jpncable[] = { #undef IF_FREQ #undef OFFSET -int* freqTable[] = { +static int* freqTable[] = { NULL, nabcst, irccable, diff --git a/sys/pci/if_fpa.c b/sys/pci/if_fpa.c index b0b38f0..e2e45ad 100644 --- a/sys/pci/if_fpa.c +++ b/sys/pci/if_fpa.c @@ -21,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_fpa.c,v 1.4 1997/08/02 14:33:10 bde Exp $ + * $Id: if_fpa.c,v 1.5 1998/01/08 23:42:26 eivind Exp $ * */ @@ -213,7 +213,7 @@ pdq_pci_shutdown( static u_long pdq_pci_count; -struct pci_device fpadevice = { +static struct pci_device fpadevice = { "fpa", pdq_pci_probe, pdq_pci_attach, diff --git a/sys/pci/if_fxp.c b/sys/pci/if_fxp.c index ef0a280..2e48cc9 100644 --- a/sys/pci/if_fxp.c +++ b/sys/pci/if_fxp.c @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_fxp.c,v 1.46 1997/10/28 15:59:21 bde Exp $ + * $Id: if_fxp.c,v 1.47 1998/01/08 23:42:29 eivind Exp $ */ /* @@ -176,7 +176,7 @@ struct fxp_supported_media { const int fsm_defmedia; /* default media for this PHY */ }; -const int fxp_media_standard[] = { +static const int fxp_media_standard[] = { IFM_ETHER|IFM_10_T, IFM_ETHER|IFM_10_T|IFM_FDX, IFM_ETHER|IFM_100_TX, @@ -185,12 +185,12 @@ const int fxp_media_standard[] = { }; #define FXP_MEDIA_STANDARD_DEFMEDIA (IFM_ETHER|IFM_AUTO) -const int fxp_media_default[] = { +static const int fxp_media_default[] = { IFM_ETHER|IFM_MANUAL, /* XXX IFM_AUTO ? */ }; #define FXP_MEDIA_DEFAULT_DEFMEDIA (IFM_ETHER|IFM_MANUAL) -const struct fxp_supported_media fxp_media[] = { +static const struct fxp_supported_media fxp_media[] = { { FXP_PHY_DP83840, fxp_media_standard, sizeof(fxp_media_standard) / sizeof(fxp_media_standard[0]), FXP_MEDIA_STANDARD_DEFMEDIA }, @@ -208,7 +208,7 @@ const struct fxp_supported_media fxp_media[] = { static int fxp_mediachange __P((struct ifnet *)); static void fxp_mediastatus __P((struct ifnet *, struct ifmediareq *)); -void fxp_set_media __P((struct fxp_softc *, int)); +static void fxp_set_media __P((struct fxp_softc *, int)); static inline void fxp_scb_wait __P((struct fxp_softc *)); static FXP_INTR_TYPE fxp_intr __P((void *)); static void fxp_start __P((struct ifnet *)); @@ -223,7 +223,7 @@ static void fxp_mdi_write __P((struct fxp_softc *, int, int, int)); static void fxp_read_eeprom __P((struct fxp_softc *, u_int16_t *, int, int)); static int fxp_attach_common __P((struct fxp_softc *, u_int8_t *)); -void fxp_stats_update __P((void *)); +static void fxp_stats_update __P((void *)); static void fxp_mc_setup __P((struct fxp_softc *)); /* @@ -1044,7 +1044,7 @@ rcvloop: * the DMA immediately, we don't wait - we just prepare to read * them again next time. */ -void +static void fxp_stats_update(arg) void *arg; { @@ -1361,7 +1361,7 @@ fxp_init(xsc) sc->stat_ch = timeout(fxp_stats_update, sc, hz); } -void +static void fxp_set_media(sc, media) struct fxp_softc *sc; int media; diff --git a/sys/pci/if_sr_p.c b/sys/pci/if_sr_p.c index e122c81..02a32e0 100644 --- a/sys/pci/if_sr_p.c +++ b/sys/pci/if_sr_p.c @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_sr_p.c,v 1.4 1997/02/22 09:44:07 peter Exp $ + * $Id: if_sr_p.c,v 1.5 1997/09/02 20:06:27 bde Exp $ */ #include "pci.h" @@ -59,7 +59,7 @@ static void sr_pci_attach(pcici_t config_id, int unit); static u_long src_count = NSR; -struct pci_device sr_pci_driver = +static struct pci_device sr_pci_driver = { "src", sr_pci_probe, diff --git a/sys/pci/if_tx.c b/sys/pci/if_tx.c index cd32ac3..71a9e7df 100644 --- a/sys/pci/if_tx.c +++ b/sys/pci/if_tx.c @@ -100,7 +100,7 @@ */ static u_long epic_pci_count; static epic_softc_t * epics[EPIC_MAX_DEVICES]; -struct pci_device txdevice = { +static struct pci_device txdevice = { "tx", epic_pci_probe, epic_pci_attach, diff --git a/sys/pci/ncr.c b/sys/pci/ncr.c index 55bd801..9a95889 100644 --- a/sys/pci/ncr.c +++ b/sys/pci/ncr.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: ncr.c,v 1.113 1997/12/02 22:37:58 se Exp $ +** $Id: ncr.c,v 1.114 1998/02/04 03:47:16 eivind Exp $ ** ** Device driver for the NCR 53C810 PCI-SCSI-Controller. ** @@ -1342,7 +1342,7 @@ static void ncr_attach (pcici_t tag, int unit); static char ident[] = - "\n$Id: ncr.c,v 1.113 1997/12/02 22:37:58 se Exp $\n"; + "\n$Id: ncr.c,v 1.114 1998/02/04 03:47:16 eivind Exp $\n"; static const u_long ncr_version = NCR_VERSION * 11 + (u_long) sizeof (struct ncb) * 7 @@ -1352,7 +1352,7 @@ static const u_long ncr_version = NCR_VERSION * 11 #ifdef KERNEL static const int nncr=MAX_UNITS; /* XXX to be replaced by SYSCTL */ -ncb_p ncrp [MAX_UNITS]; /* XXX to be replaced by SYSCTL */ +static ncb_p ncrp [MAX_UNITS]; /* XXX to be replaced by SYSCTL */ static int ncr_debug = SCSI_NCR_DEBUG; SYSCTL_INT(_debug, OID_AUTO, ncr_debug, CTLFLAG_RW, &ncr_debug, 0, ""); diff --git a/sys/pci/tek390.c b/sys/pci/tek390.c index 9b4bcd2..9be42e2 100644 --- a/sys/pci/tek390.c +++ b/sys/pci/tek390.c @@ -126,27 +126,28 @@ static void DC390_InvalidCmd( PACB pACB ); static void DC390_reset (PACB pACB); static PUCHAR phystovirt( PSRB pSRB, ULONG xferCnt ); -void DC390_initDCB( PACB pACB, PDCB pDCB, PSCSICMD cmd ); -void DC390_initSRB( PSRB psrb ); -void DC390_linkSRB( PACB pACB ); -void DC390_initACB( PACB pACB, ULONG io_port, UCHAR Irq, USHORT index ); -int DC390_initAdapter( PACB pACB, ULONG io_port, UCHAR Irq, USHORT index, - pcici_t config_id ); +static void DC390_initDCB( PACB pACB, PDCB pDCB, PSCSICMD cmd ); +static void DC390_initSRB( PSRB psrb ); +static void DC390_linkSRB( PACB pACB ); +static void DC390_initACB( PACB pACB, ULONG io_port, UCHAR Irq, + USHORT index ); +static int DC390_initAdapter( PACB pACB, ULONG io_port, UCHAR Irq, + USHORT index, pcici_t config_id ); void DC390_EnableCfg( USHORT mechnum, UCHAR regval ); void DC390_DisableCfg( USHORT mechnum ); UCHAR DC390_inByte( USHORT mechnum, UCHAR regval ); USHORT DC390_inWord( USHORT mechnum, UCHAR regval ); ULONG DC390_inDword(USHORT mechnum, UCHAR regval ); void DC390_OutB(USHORT mechnum, UCHAR regval, UCHAR bval ); -void DC390_EnDisableCE( UCHAR mode, USHORT mechnum, PUCHAR regval ); -void DC390_EEpromOutDI( USHORT mechnum, PUCHAR regval, USHORT Carry ); -UCHAR DC390_EEpromInDO( USHORT mechnum ); -USHORT EEpromGetData1( USHORT mechnum ); -void DC390_Prepare( USHORT mechnum, PUCHAR regval, UCHAR EEpromCmd ); -void DC390_ReadEEprom( USHORT mechnum, USHORT index ); -USHORT DC390_DefaultEEprom( USHORT mechnum, USHORT index ); -USHORT DC390_CheckEEpromCheckSum( USHORT MechNum, USHORT index ); -USHORT DC390_ToMech( USHORT Mechnum, pcici_t config_id ); +static void DC390_EnDisableCE( UCHAR mode, USHORT mechnum, PUCHAR regval ); +static void DC390_EEpromOutDI( USHORT mechnum, PUCHAR regval, USHORT Carry ); +static UCHAR DC390_EEpromInDO( USHORT mechnum ); +static USHORT EEpromGetData1( USHORT mechnum ); +static void DC390_Prepare( USHORT mechnum, PUCHAR regval, UCHAR EEpromCmd ); +static void DC390_ReadEEprom( USHORT mechnum, USHORT index ); +static USHORT DC390_DefaultEEprom( USHORT mechnum, USHORT index ); +static USHORT DC390_CheckEEpromCheckSum( USHORT MechNum, USHORT index ); +static USHORT DC390_ToMech( USHORT Mechnum, pcici_t config_id ); #ifdef KERNEL @@ -173,7 +174,7 @@ static u_int32 trmamd_info( int unit ); static u_long trmamd_count; -struct pci_device trmamd_device = { +static struct pci_device trmamd_device = { "amd", trmamd_probe, trmamd_attach, @@ -185,7 +186,7 @@ DATA_SET (pcidevice_set, trmamd_device); -struct scsi_adapter trmamd_switch = +static struct scsi_adapter trmamd_switch = { trmamd_scsi_cmd, trmamd_min_phys, @@ -200,7 +201,7 @@ struct scsi_adapter trmamd_switch = "amd", }; -struct scsi_device trmamd_dev = +static struct scsi_device trmamd_dev = { NULL, /* Use default error handler */ NULL, /* have a queue, served by this */ @@ -242,12 +243,12 @@ static PVOID DC390_phase1[]={ DC390_Nop_1, }; -UCHAR eepromBuf[MAX_ADAPTER_NUM][128]; +static UCHAR eepromBuf[MAX_ADAPTER_NUM][128]; -UCHAR clock_period1[] = {4, 5, 6, 7 ,8, 10, 13, 20}; +static UCHAR clock_period1[] = {4, 5, 6, 7 ,8, 10, 13, 20}; -UCHAR baddevname1[2][28] ={ +static UCHAR baddevname1[2][28] ={ "SEAGATE ST3390N ??? 9546", "HP C3323-300 4269"}; @@ -992,7 +993,8 @@ DC390_reset (PACB pACB) * Inputs : cmd - pointer to this scsi cmd request block structure * ***********************************************************************/ -void DC390_initDCB( PACB pACB, PDCB pDCB, PSCSICMD cmd ) +static void +DC390_initDCB( PACB pACB, PDCB pDCB, PSCSICMD cmd ) { PEEprom prom; UCHAR bval; @@ -1065,13 +1067,15 @@ void DC390_initDCB( PACB pACB, PDCB pDCB, PSCSICMD cmd ) * Inputs : psrb - pointer to this scsi request block structure * ***********************************************************************/ -void DC390_initSRB( PSRB psrb ) +static void +DC390_initSRB( PSRB psrb ) { psrb->PhysSRB = vtophys( psrb ); } -void DC390_linkSRB( PACB pACB ) +static void +DC390_linkSRB( PACB pACB ) { USHORT count, i; PSRB psrb; @@ -1098,7 +1102,8 @@ void DC390_linkSRB( PACB pACB ) * Inputs : psh - pointer to this host adapter's structure * ***********************************************************************/ -void DC390_initACB( PACB pACB, ULONG io_port, UCHAR Irq, USHORT index ) +static void +DC390_initACB( PACB pACB, ULONG io_port, UCHAR Irq, USHORT index ) { USHORT i; @@ -1155,7 +1160,8 @@ void DC390_initACB( PACB pACB, ULONG io_port, UCHAR Irq, USHORT index ) * Inputs : psh - pointer to this host adapter's structure * ***********************************************************************/ -int DC390_initAdapter( PACB pACB, ULONG io_port, UCHAR Irq, USHORT index, +static int DC390_initAdapter( PACB pACB, ULONG io_port, UCHAR Irq, + USHORT index, pcici_t config_id ) { USHORT ioport; @@ -1369,7 +1375,7 @@ DC390_OutB(USHORT mechnum, UCHAR regval, UCHAR bval ) #endif /PCI_COMPAT */ -void +static void DC390_EnDisableCE( UCHAR mode, USHORT mechnum, PUCHAR regval ) { @@ -1387,7 +1393,7 @@ DC390_EnDisableCE( UCHAR mode, USHORT mechnum, PUCHAR regval ) } -void +static void DC390_EEpromOutDI( USHORT mechnum, PUCHAR regval, USHORT Carry ) { UCHAR bval; @@ -1409,7 +1415,7 @@ DC390_EEpromOutDI( USHORT mechnum, PUCHAR regval, USHORT Carry ) } -UCHAR +static UCHAR DC390_EEpromInDO( USHORT mechnum ) { UCHAR bval,regval; @@ -1430,7 +1436,7 @@ DC390_EEpromInDO( USHORT mechnum ) } -USHORT +static USHORT EEpromGetData1( USHORT mechnum ) { UCHAR i; @@ -1448,7 +1454,7 @@ EEpromGetData1( USHORT mechnum ) } -void +static void DC390_Prepare( USHORT mechnum, PUCHAR regval, UCHAR EEpromCmd ) { UCHAR i,j; @@ -1465,7 +1471,7 @@ DC390_Prepare( USHORT mechnum, PUCHAR regval, UCHAR EEpromCmd ) } -void +static void DC390_ReadEEprom( USHORT mechnum, USHORT index ) { UCHAR regval,cmd; @@ -1486,7 +1492,7 @@ DC390_ReadEEprom( USHORT mechnum, USHORT index ) } -USHORT +static USHORT DC390_DefaultEEprom( USHORT mechnum, USHORT index ) { PUCHAR ptr; @@ -1506,7 +1512,7 @@ DC390_DefaultEEprom( USHORT mechnum, USHORT index ) } -USHORT +static USHORT DC390_CheckEEpromCheckSum( USHORT MechNum, USHORT index ) { USHORT wval, rc, *ptr; @@ -1525,7 +1531,7 @@ DC390_CheckEEpromCheckSum( USHORT MechNum, USHORT index ) } -USHORT +static USHORT DC390_ToMech( USHORT Mechnum, pcici_t config_id ) { |