#endif /* MULT_OEM */
/* Prototypes of external functions */
-extern void hwt_restart() ;
#ifdef AIX
extern int AIX_vpdReadByte() ;
#endif
/* Prototypes of local functions. */
-void smt_stop_watchdog() ;
+void smt_stop_watchdog(struct s_smc *smc);
#ifdef MCA
static int read_card_id() ;
/*
* FDDI card reset
*/
-static void card_start(smc)
-struct s_smc *smc ;
+static void card_start(struct s_smc *smc)
{
int i ;
#ifdef PCI
GET_PAGE(0) ; /* necessary for BOOT */
}
-void card_stop(smc)
-struct s_smc *smc ;
+void card_stop(struct s_smc *smc)
{
smt_stop_watchdog(smc) ;
smc->hw.mac_ring_is_up = 0 ; /* ring down */
}
/*--------------------------- ISR handling ----------------------------------*/
-#ifndef PCI
-void mac1_irq(smc,stu, stl)
-struct s_smc *smc ;
-u_short stu;
-u_short stl;
+void mac1_irq(struct s_smc *smc, u_short stu, u_short stl)
{
int restart_tx = 0 ;
again:
+#ifndef PCI
#ifndef ISA
/*
* FORMAC+ bug modified the queue pointer if many read/write accesses happens!?
}
#else /* PCI */
-void mac1_irq(smc,stu, stl)
-struct s_smc *smc ;
-u_short stu;
-u_short stl;
-{
- int restart_tx = 0 ;
-again:
-
/*
* parity error: note encoding error is not possible in tag mode
*/
* interrupt source= plc1
* this function is called in nwfbisr.asm
*/
-void plc1_irq(smc)
-struct s_smc *smc ;
+void plc1_irq(struct s_smc *smc)
{
u_short st = inpw(PLC(PB,PL_INTR_EVENT)) ;
* interrupt source= plc2
* this function is called in nwfbisr.asm
*/
-void plc2_irq(smc)
-struct s_smc *smc ;
+void plc2_irq(struct s_smc *smc)
{
u_short st = inpw(PLC(PA,PL_INTR_EVENT)) ;
/*
* interrupt source= timer
*/
-void timer_irq(smc)
-struct s_smc *smc ;
+void timer_irq(struct s_smc *smc)
{
hwt_restart(smc);
smc->hw.t_stop = smc->hw.t_start;
/*
* return S-port (PA or PB)
*/
-int pcm_get_s_port(smc)
-struct s_smc *smc ;
+int pcm_get_s_port(struct s_smc *smc)
{
SK_UNUSED(smc) ;
return(PS) ;
#define STATION_LABEL_PMD_OFFSET 6
#define STATION_LABEL_PORT_OFFSET 7
-void read_address(smc,mac_addr)
-struct s_smc *smc ;
-u_char *mac_addr ;
+void read_address(struct s_smc *smc, u_char *mac_addr)
{
char ConnectorType ;
char PmdType ;
/*
* FDDI card soft reset
*/
-void init_board(smc,mac_addr)
-struct s_smc *smc ;
-u_char *mac_addr ;
+void init_board(struct s_smc *smc, u_char *mac_addr)
{
card_start(smc) ;
read_address(smc,mac_addr) ;
/*
* insert or deinsert optical bypass (called by ECM)
*/
-void sm_pm_bypass_req(smc,mode)
-struct s_smc *smc ;
-int mode;
+void sm_pm_bypass_req(struct s_smc *smc, int mode)
{
#if (defined(ISA) || defined(EISA))
int csra_v ;
/*
* check if bypass connected
*/
-int sm_pm_bypass_present(smc)
-struct s_smc *smc ;
+int sm_pm_bypass_present(struct s_smc *smc)
{
#ifndef PCI
return( (inpw(CSR_A) & CS_BYSTAT) ? FALSE : TRUE ) ;
#endif
}
-void plc_clear_irq(smc,p)
-struct s_smc *smc ;
-int p ;
+void plc_clear_irq(struct s_smc *smc, int p)
{
SK_UNUSED(p) ;
* LED_Y_OFF just switch yellow LED off
* LED_Y_ON just switch yello LED on
*/
-void led_indication(smc,led_event)
-struct s_smc *smc ;
-int led_event;
+void led_indication(struct s_smc *smc, int led_event)
{
/* use smc->hw.mac_ring_is_up == TRUE
* as indication for Ring Operational
}
-void pcm_state_change(smc,plc,p_state)
-struct s_smc *smc;
-int plc;
-int p_state;
+void pcm_state_change(struct s_smc *smc, int plc, int p_state)
{
/*
* the current implementation of pcm_state_change() in the driver
}
-void rmt_indication(smc,i)
-struct s_smc *smc ;
-int i;
+void rmt_indication(struct s_smc *smc, int i)
{
/* Call a driver special function if defined */
DRV_RMT_INDICATION(smc,i) ;
/*
* llc_recover_tx called by init_tx (fplus.c)
*/
-void llc_recover_tx(smc)
-struct s_smc *smc ;
+void llc_recover_tx(struct s_smc *smc)
{
#ifdef LOAD_GEN
extern int load_gen_flag ;
/*
* init DMA
*/
-void init_dma(smc,dma)
-struct s_smc *smc;
-int dma;
+void init_dma(struct s_smc *smc, int dma)
{
SK_UNUSED(smc) ;
/*
* disable DMA
*/
-void dis_dma(smc,dma)
-struct s_smc *smc ;
-int dma;
+void dis_dma(struct s_smc *smc, int dma)
{
SK_UNUSED(smc) ;
static const int base[8] = { 0x000,0x002,0x004,0x006,0,0x0c4,0x0c8,0x0cc } ;
static const int page[8] = { 0x087,0x083,0x081,0x082,0,0x08b,0x089,0x08a } ;
-void init_dma(smc,dma)
-struct s_smc *smc ;
-int dma;
+void init_dma(struct s_smc *smc, int dma)
{
/*
* extended mode register
}
-void dis_dma(smc,dma)
-struct s_smc *smc ;
-int dma;
+void dis_dma(struct s_smc *smc, int dma)
{
SK_UNUSED(smc) ;
#endif /* EISA */
#ifdef MCA
-void init_dma(smc,dma)
-struct s_smc *smc;
-int dma;
+void init_dma(struct s_smc *smc, int dma)
{
SK_UNUSED(smc) ;
SK_UNUSED(dma) ;
}
-void dis_dma(smc,dma)
-struct s_smc *smc;
-int dma;
+
+void dis_dma(struct s_smc *smc, int dma)
{
SK_UNUSED(smc) ;
SK_UNUSED(dma) ;
#endif
#ifdef PCI
-void init_dma(smc,dma)
-struct s_smc *smc;
-int dma;
+void init_dma(struct s_smc *smc, int dma)
{
SK_UNUSED(smc) ;
SK_UNUSED(dma) ;
}
-void dis_dma(smc,dma)
-struct s_smc *smc;
-int dma;
+
+void dis_dma(struct s_smc *smc, int dma)
{
SK_UNUSED(smc) ;
SK_UNUSED(dma) ;
#endif
#ifdef MULT_OEM
-static int is_equal_num(comp1,comp2,num)
-char comp1[] ;
-char comp2[] ;
-int num ;
+static int is_equal_num(char comp1[], char comp2[], int num)
{
int i ;
* 2 data base empty
* 3 no active entry
*/
-int set_oi_id_def(smc)
-struct s_smc *smc ;
+int set_oi_id_def(struct s_smc *smc)
{
int sel_id ;
int i ;
*
************************/
#define LONG_CARD_ID(lo, hi) ((((hi) & 0xff) << 8) | ((lo) & 0xff))
-int exist_board(smc,slot)
-struct s_smc *smc ;
-int slot ;
+int exist_board(struct s_smc *smc, int slot)
{
#ifdef MULT_OEM
SK_LOC_DECL(u_char,id[2]) ;
* number is specified, the function returns zero.
*
************************/
-static int read_card_id(smc,slot)
-struct s_smc *smc ; /* Do not use. */
-int slot ;
+static int read_card_id(struct s_smc *smc, int slot)
+/* struct s_smc *smc ; Do not use. */
{
int card_id ;
* END_MANUAL_ENTRY()
*
************************/
-int get_board_para(smc,slot)
-struct s_smc *smc ;
-int slot ;
+int get_board_para(struct s_smc *smc, int slot)
{
int val ;
int i ;
}
/* Enable access to specified MCA slot. */
-static void EnableSlotAccess(smc,slot)
-struct s_smc *smc ;
-int slot ;
+static void EnableSlotAccess(struct s_smc *smc, int slot)
{
SK_UNUSED(slot) ;
}
/* Disable access to MCA slot formerly enabled via EnableSlotAccess(). */
-static void DisableSlotAccess(smc)
-struct s_smc *smc ;
+static void DisableSlotAccess(struct s_smc *smc)
{
#ifndef AIX
SK_UNUSED(smc) ;
* The smc pointer must be valid now.
*
************************/
-int exist_board(smc,slot)
-struct s_smc *smc ;
-int slot ;
+int exist_board(struct s_smc *smc, int slot)
{
int i ;
#ifdef MULT_OEM
}
-int get_board_para(smc,slot)
-struct s_smc *smc ;
-int slot ;
+int get_board_para(struct s_smc *smc, int slot)
{
int i ;
#endif /* MULT_OEM */
-int exist_board(smc,port)
-struct s_smc *smc ;
-HW_PTR port ;
+int exist_board(struct s_smc *smc, HW_PTR port)
{
int i ;
#ifdef MULT_OEM
#endif /* MULT_OEM */
}
-int get_board_para(smc,slot)
-struct s_smc *smc ;
-int slot ;
+int get_board_para(struct s_smc *smc, int slot)
{
SK_UNUSED(smc) ;
SK_UNUSED(slot) ;
#ifdef PCI
#ifdef USE_BIOS_FUN
-int exist_board(smc,slot)
-struct s_smc *smc ;
-int slot ;
+int exist_board(struct s_smc *smc, int slot)
{
u_short dev_id ;
u_short ven_id ;
#endif /* PCI */
#endif /* USE_BIOS_FUNC */
-void driver_get_bia(smc, bia_addr)
-struct s_smc *smc ;
-struct fddi_addr *bia_addr ;
+void driver_get_bia(struct s_smc *smc, struct fddi_addr *bia_addr)
{
int i ;
}
}
-void smt_start_watchdog(smc)
-struct s_smc *smc ;
+void smt_start_watchdog(struct s_smc *smc)
{
SK_UNUSED(smc) ; /* Make LINT happy. */
#endif /* DEBUG */
}
-void smt_stop_watchdog(smc)
-struct s_smc *smc ;
+void smt_stop_watchdog(struct s_smc *smc)
{
SK_UNUSED(smc) ; /* Make LINT happy. */
#ifndef DEBUG
}
#ifdef PCI
-static char get_rom_byte(smc,addr)
-struct s_smc *smc ;
-u_short addr ;
+static char get_rom_byte(struct s_smc *smc, u_short addr)
{
GET_PAGE(addr) ;
return (READ_PROM(ADDR(B2_FDP))) ;
*
* END_MANUAL_ENTRY
*/
-int mac_drv_vpd_read(smc,buf,size,image)
-struct s_smc *smc ;
-char *buf ;
-int size ;
-char image ;
+int mac_drv_vpd_read(struct s_smc *smc, char *buf, int size, char image)
{
u_short ibase ;
u_short pci_base ;
return(len) ;
}
-void mac_drv_pci_fix(smc,fix_value)
-struct s_smc *smc ;
-u_long fix_value ;
+void mac_drv_pci_fix(struct s_smc *smc, u_long fix_value)
{
smc->hw.pci_fix_value = fix_value ;
}
-void mac_do_pci_fix(smc)
-struct s_smc *smc ;
+void mac_do_pci_fix(struct s_smc *smc)
{
SK_UNUSED(smc) ;
}
#endif /* PCI */
+