1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-04 09:09:56 +00:00

Use ANSI prototype to fix build with clang.

MFC after:	1 week
This commit is contained in:
Yoshihiro Takahashi 2012-11-10 14:58:06 +00:00
parent 2de04c22e5
commit 7a1cea226c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=242871
8 changed files with 119 additions and 297 deletions

View File

@ -78,9 +78,7 @@ typedef unsigned long vaddr_t;
* GENERIC MACHDEP FUNCTIONS
*********************************************************/
void
bshw_synch_setup(ct, ti)
struct ct_softc *ct;
struct targ_info *ti;
bshw_synch_setup(struct ct_softc *ct, struct targ_info *ti)
{
struct ct_bus_access_handle *chp = &ct->sc_ch;
struct ct_targ_info *cti = (void *) ti;
@ -99,8 +97,7 @@ bshw_synch_setup(ct, ti)
}
void
bshw_bus_reset(ct)
struct ct_softc *ct;
bshw_bus_reset(struct ct_softc *ct)
{
struct scsi_low_softc *slp = &ct->sc_sclow;
struct ct_bus_access_handle *chp = &ct->sc_ch;
@ -149,9 +146,7 @@ bshw_bus_reset(ct)
/* probe */
int
bshw_read_settings(chp, bs)
struct ct_bus_access_handle *chp;
struct bshw_softc *bs;
bshw_read_settings(struct ct_bus_access_handle *chp, struct bshw_softc *bs)
{
static int irq_tbl[] = { 3, 5, 6, 9, 12, 13 };
@ -183,8 +178,7 @@ static __inline void bshw_lc_smit_stop(struct ct_softc *);
static int bshw_lc_smit_fstat(struct ct_softc *, int, int);
static __inline void
bshw_lc_smit_stop(ct)
struct ct_softc *ct;
bshw_lc_smit_stop(struct ct_softc *ct)
{
struct ct_bus_access_handle *chp = &ct->sc_ch;
@ -193,10 +187,7 @@ bshw_lc_smit_stop(ct)
}
static __inline void
bshw_lc_smit_start(ct, count, direction)
struct ct_softc *ct;
int count;
u_int direction;
bshw_lc_smit_start(struct ct_softc *ct, int count, u_int direction)
{
struct ct_bus_access_handle *chp = &ct->sc_ch;
u_int8_t pval, val;
@ -212,9 +203,7 @@ bshw_lc_smit_start(ct, count, direction)
}
static int
bshw_lc_smit_fstat(ct, wc, read)
struct ct_softc *ct;
int wc, read;
bshw_lc_smit_fstat(struct ct_softc *ct, int wc, int read)
{
struct ct_bus_access_handle *chp = &ct->sc_ch;
u_int8_t stat;
@ -244,8 +233,7 @@ bshw_lc_smit_fstat(ct, wc, read)
}
void
bshw_smit_xfer_stop(ct)
struct ct_softc *ct;
bshw_smit_xfer_stop(struct ct_softc *ct)
{
struct scsi_low_softc *slp = &ct->sc_sclow;
struct bshw_softc *bs = ct->ct_hw;
@ -292,8 +280,7 @@ bshw_smit_xfer_stop(ct)
}
int
bshw_smit_xfer_start(ct)
struct ct_softc *ct;
bshw_smit_xfer_start(struct ct_softc *ct)
{
struct scsi_low_softc *slp = &ct->sc_sclow;
struct ct_bus_access_handle *chp = &ct->sc_ch;
@ -396,8 +383,7 @@ static void bshw_dmastart(struct ct_softc *);
static void bshw_dmadone(struct ct_softc *);
int
bshw_dma_xfer_start(ct)
struct ct_softc *ct;
bshw_dma_xfer_start(struct ct_softc *ct)
{
struct scsi_low_softc *slp = &ct->sc_sclow;
struct sc_p *sp = &slp->sl_scp;
@ -458,8 +444,7 @@ bshw_dma_xfer_start(ct)
}
void
bshw_dma_xfer_stop(ct)
struct ct_softc *ct;
bshw_dma_xfer_stop(struct ct_softc *ct)
{
struct scsi_low_softc *slp = &ct->sc_sclow;
struct sc_p *sp = &slp->sl_scp;
@ -523,10 +508,8 @@ bshw_dma_xfer_stop(ct)
static bus_addr_t dmapageport[4] = { 0x27, 0x21, 0x23, 0x25 };
static __inline void
bshw_dma_write_1(chp, port, val)
struct ct_bus_access_handle *chp;
bus_addr_t port;
u_int8_t val;
bshw_dma_write_1(struct ct_bus_access_handle *chp, bus_addr_t port,
u_int8_t val)
{
CT_BUS_WEIGHT(chp);
@ -534,8 +517,7 @@ bshw_dma_write_1(chp, port, val)
}
static void
bshw_dmastart(ct)
struct ct_softc *ct;
bshw_dmastart(struct ct_softc *ct)
{
struct scsi_low_softc *slp = &ct->sc_sclow;
struct bshw_softc *bs = ct->ct_hw;
@ -581,8 +563,7 @@ bshw_dmastart(ct)
}
static void
bshw_dmadone(ct)
struct ct_softc *ct;
bshw_dmadone(struct ct_softc *ct)
{
struct bshw_softc *bs = ct->ct_hw;
struct ct_bus_access_handle *chp = &ct->sc_ch;
@ -609,8 +590,7 @@ static void bshw_dma_start_elecom(struct ct_softc *);
static void bshw_dma_stop_elecom(struct ct_softc *);
static int
bshw_dma_init_texa(ct)
struct ct_softc *ct;
bshw_dma_init_texa(struct ct_softc *ct)
{
struct ct_bus_access_handle *chp = &ct->sc_ch;
u_int8_t regval;
@ -625,8 +605,7 @@ bshw_dma_init_texa(ct)
}
static int
bshw_dma_init_sc98(ct)
struct ct_softc *ct;
bshw_dma_init_sc98(struct ct_softc *ct)
{
struct ct_bus_access_handle *chp = &ct->sc_ch;
@ -652,8 +631,7 @@ bshw_dma_init_sc98(ct)
}
static void
bshw_dma_start_sc98(ct)
struct ct_softc *ct;
bshw_dma_start_sc98(struct ct_softc *ct)
{
struct ct_bus_access_handle *chp = &ct->sc_ch;
@ -662,8 +640,7 @@ bshw_dma_start_sc98(ct)
}
static void
bshw_dma_stop_sc98(ct)
struct ct_softc *ct;
bshw_dma_stop_sc98(struct ct_softc *ct)
{
struct ct_bus_access_handle *chp = &ct->sc_ch;
@ -672,8 +649,7 @@ bshw_dma_stop_sc98(ct)
}
static void
bshw_dma_start_elecom(ct)
struct ct_softc *ct;
bshw_dma_start_elecom(struct ct_softc *ct)
{
struct ct_bus_access_handle *chp = &ct->sc_ch;
u_int8_t tmp = ct_cr_read_1(chp, 0x4c);
@ -682,8 +658,7 @@ bshw_dma_start_elecom(ct)
}
static void
bshw_dma_stop_elecom(ct)
struct ct_softc *ct;
bshw_dma_stop_elecom(struct ct_softc *ct)
{
struct ct_bus_access_handle *chp = &ct->sc_ch;
u_int8_t tmp = ct_cr_read_1(chp, 0x4c);

View File

@ -164,9 +164,7 @@ struct scsi_low_funcs ct_funcs = {
* HW functions
**************************************************/
static __inline void
cthw_phase_bypass(ct, ph)
struct ct_softc *ct;
u_int8_t ph;
cthw_phase_bypass(struct ct_softc *ct, u_int8_t ph)
{
struct ct_bus_access_handle *chp = &ct->sc_ch;
@ -175,8 +173,7 @@ cthw_phase_bypass(ct, ph)
}
static void
cthw_bus_reset(ct)
struct ct_softc *ct;
cthw_bus_reset(struct ct_softc *ct)
{
/*
@ -187,10 +184,8 @@ cthw_bus_reset(ct)
}
static int
cthw_chip_reset(chp, chiprevp, chipclk, hostid)
struct ct_bus_access_handle *chp;
int *chiprevp;
int chipclk, hostid;
cthw_chip_reset(struct ct_bus_access_handle *chp, int *chiprevp, int chipclk,
int hostid)
{
#define CT_SELTIMEOUT_20MHz_REGV (0x80)
u_int8_t aux, regv;
@ -285,8 +280,7 @@ cthw_chip_reset(chp, chiprevp, chipclk, hostid)
}
static struct ct_synch_data *
ct_make_synch_table(ct)
struct ct_softc *ct;
ct_make_synch_table(struct ct_softc *ct)
{
struct ct_synch_data *sdtp, *sdp;
u_int base, i, period;
@ -329,11 +323,8 @@ ct_make_synch_table(ct)
* Attach & Probe
**************************************************/
int
ctprobesubr(chp, dvcfg, hsid, chipclk, chiprevp)
struct ct_bus_access_handle *chp;
u_int dvcfg, chipclk;
int hsid;
int *chiprevp;
ctprobesubr(struct ct_bus_access_handle *chp, u_int dvcfg, int hsid,
u_int chipclk, int *chiprevp)
{
#if 0
@ -346,8 +337,7 @@ ctprobesubr(chp, dvcfg, hsid, chipclk, chiprevp)
}
void
ctattachsubr(ct)
struct ct_softc *ct;
ctattachsubr(struct ct_softc *ct)
{
struct scsi_low_softc *slp = &ct->sc_sclow;
@ -362,8 +352,7 @@ ctattachsubr(ct)
* SCSI LOW interface functions
**************************************************/
static void
cthw_attention(ct)
struct ct_softc *ct;
cthw_attention(struct ct_softc *ct)
{
struct ct_bus_access_handle *chp = &ct->sc_ch;
@ -380,8 +369,7 @@ cthw_attention(ct)
}
static void
ct_attention(ct)
struct ct_softc *ct;
ct_attention(struct ct_softc *ct)
{
struct scsi_low_softc *slp = &ct->sc_sclow;
@ -398,10 +386,7 @@ ct_attention(ct)
}
static int
ct_targ_init(ct, ti, action)
struct ct_softc *ct;
struct targ_info *ti;
int action;
ct_targ_init(struct ct_softc *ct, struct targ_info *ti, int action)
{
struct ct_targ_info *cti = (void *) ti;
@ -438,9 +423,7 @@ ct_targ_init(ct, ti, action)
}
static int
ct_world_start(ct, fdone)
struct ct_softc *ct;
int fdone;
ct_world_start(struct ct_softc *ct, int fdone)
{
struct scsi_low_softc *slp = &ct->sc_sclow;
struct ct_bus_access_handle *chp = &ct->sc_ch;
@ -470,9 +453,7 @@ ct_world_start(ct, fdone)
}
static int
ct_start_selection(ct, cb)
struct ct_softc *ct;
struct slccb *cb;
ct_start_selection(struct ct_softc *ct, struct slccb *cb)
{
struct scsi_low_softc *slp = &ct->sc_sclow;
struct ct_bus_access_handle *chp = &ct->sc_ch;
@ -544,10 +525,7 @@ ct_start_selection(ct, cb)
}
static int
ct_msg(ct, ti, msg)
struct ct_softc *ct;
struct targ_info *ti;
u_int msg;
ct_msg(struct ct_softc *ct, struct targ_info *ti, u_int msg)
{
struct ct_bus_access_handle *chp = &ct->sc_ch;
struct ct_targ_info *cti = (void *) ti;
@ -599,11 +577,8 @@ ct_msg(ct, ti, msg)
* <DATA PHASE>
*************************************************/
static int
ct_xfer(ct, data, len, direction, statp)
struct ct_softc *ct;
u_int8_t *data;
int len, direction;
u_int *statp;
ct_xfer(struct ct_softc *ct, u_int8_t *data, int len, int direction,
u_int *statp)
{
struct ct_bus_access_handle *chp = &ct->sc_ch;
int wc;
@ -663,8 +638,7 @@ ct_xfer(ct, data, len, direction, statp)
#define CT_PADDING_BUF_SIZE 32
static void
ct_io_xfer(ct)
struct ct_softc *ct;
ct_io_xfer(struct ct_softc *ct)
{
struct scsi_low_softc *slp = &ct->sc_sclow;
struct ct_bus_access_handle *chp = &ct->sc_ch;
@ -716,9 +690,7 @@ struct ct_err ct_cmderr[] = {
};
static void
ct_phase_error(ct, scsi_status)
struct ct_softc *ct;
u_int8_t scsi_status;
ct_phase_error(struct ct_softc *ct, u_int8_t scsi_status)
{
struct scsi_low_softc *slp = &ct->sc_sclow;
struct targ_info *ti = slp->sl_Tnexus;
@ -764,9 +736,7 @@ ct_phase_error(ct, scsi_status)
* ### SCSI PHASE SEQUENCER ###
**************************************************/
static int
ct_reselected(ct, scsi_status)
struct ct_softc *ct;
u_int8_t scsi_status;
ct_reselected(struct ct_softc *ct, u_int8_t scsi_status)
{
struct scsi_low_softc *slp = &ct->sc_sclow;
struct ct_bus_access_handle *chp = &ct->sc_ch;
@ -809,9 +779,7 @@ ct_reselected(ct, scsi_status)
}
static int
ct_target_nexus_establish(ct, lun, dir)
struct ct_softc *ct;
int lun, dir;
ct_target_nexus_establish(struct ct_softc *ct, int lun, int dir)
{
struct scsi_low_softc *slp = &ct->sc_sclow;
struct ct_bus_access_handle *chp = &ct->sc_ch;
@ -831,8 +799,7 @@ ct_target_nexus_establish(ct, lun, dir)
}
static int
ct_lun_nexus_establish(ct)
struct ct_softc *ct;
ct_lun_nexus_establish(struct ct_softc *ct)
{
struct scsi_low_softc *slp = &ct->sc_sclow;
struct ct_bus_access_handle *chp = &ct->sc_ch;
@ -843,8 +810,7 @@ ct_lun_nexus_establish(ct)
}
static int
ct_ccb_nexus_establish(ct)
struct ct_softc *ct;
ct_ccb_nexus_establish(struct ct_softc *ct)
{
struct scsi_low_softc *slp = &ct->sc_sclow;
struct ct_bus_access_handle *chp = &ct->sc_ch;
@ -870,8 +836,7 @@ ct_ccb_nexus_establish(ct)
}
static int
ct_unbusy(ct)
struct ct_softc *ct;
ct_unbusy(struct ct_softc *ct)
{
struct scsi_low_softc *slp = &ct->sc_sclow;
struct ct_bus_access_handle *chp = &ct->sc_ch;
@ -894,8 +859,7 @@ ct_unbusy(ct)
}
static int
ct_catch_intr(ct)
struct ct_softc *ct;
ct_catch_intr(struct ct_softc *ct)
{
struct ct_bus_access_handle *chp = &ct->sc_ch;
int wc;
@ -913,8 +877,7 @@ ct_catch_intr(ct)
}
int
ctintr(arg)
void *arg;
ctintr(void *arg)
{
struct ct_softc *ct = arg;
struct scsi_low_softc *slp = &ct->sc_sclow;

View File

@ -367,16 +367,14 @@ ct_dmamap(void *arg, bus_dma_segment_t *seg, int nseg, int error)
}
static void
ct_isa_bus_access_weight(chp)
struct ct_bus_access_handle *chp;
ct_isa_bus_access_weight(struct ct_bus_access_handle *chp)
{
outb(0x5f, 0);
}
static void
ct_isa_dmasync_before(ct)
struct ct_softc *ct;
ct_isa_dmasync_before(struct ct_softc *ct)
{
if (need_pre_dma_flush)
@ -384,8 +382,7 @@ ct_isa_dmasync_before(ct)
}
static void
ct_isa_dmasync_after(ct)
struct ct_softc *ct;
ct_isa_dmasync_after(struct ct_softc *ct)
{
if (need_post_dma_flush)

View File

@ -90,8 +90,7 @@ static __inline void cthw_set_count
(struct ct_bus_access_handle *, u_int);
static __inline u_int8_t
ct_stat_read_1(chp)
struct ct_bus_access_handle *chp;
ct_stat_read_1(struct ct_bus_access_handle *chp)
{
u_int8_t regv;
@ -101,9 +100,7 @@ ct_stat_read_1(chp)
}
static __inline void
cthw_set_count(chp, count)
struct ct_bus_access_handle *chp;
u_int count;
cthw_set_count(struct ct_bus_access_handle *chp, u_int count)
{
bus_space_tag_t bst = chp->ch_iot;
bus_space_handle_t bsh = chp->ch_ioh;
@ -119,8 +116,7 @@ cthw_set_count(chp, count)
}
static __inline u_int
cthw_get_count(chp)
struct ct_bus_access_handle *chp;
cthw_get_count(struct ct_bus_access_handle *chp)
{
bus_space_tag_t bst = chp->ch_iot;
bus_space_handle_t bsh = chp->ch_ioh;
@ -138,10 +134,7 @@ cthw_get_count(chp)
}
static __inline void
ct_write_cmds(chp, cmd, len)
struct ct_bus_access_handle *chp;
u_int8_t *cmd;
int len;
ct_write_cmds(struct ct_bus_access_handle *chp, u_int8_t *cmd, int len)
{
bus_space_tag_t bst = chp->ch_iot;
bus_space_handle_t bsh = chp->ch_ioh;
@ -157,9 +150,7 @@ ct_write_cmds(chp, cmd, len)
}
static __inline u_int8_t
ct_cr_read_1(chp, offs)
struct ct_bus_access_handle *chp;
bus_addr_t offs;
ct_cr_read_1(struct ct_bus_access_handle *chp, bus_addr_t offs)
{
bus_space_tag_t bst = chp->ch_iot;
bus_space_handle_t bsh = chp->ch_ioh;
@ -173,10 +164,7 @@ ct_cr_read_1(chp, offs)
}
static __inline void
ct_cr_write_1(chp, offs, val)
struct ct_bus_access_handle *chp;
bus_addr_t offs;
u_int8_t val;
ct_cr_write_1(struct ct_bus_access_handle *chp, bus_addr_t offs, u_int8_t val)
{
bus_space_tag_t bst = chp->ch_iot;
bus_space_handle_t bsh = chp->ch_ioh;
@ -188,8 +176,7 @@ ct_cr_write_1(chp, offs, val)
}
static __inline u_int8_t
ct_cmdp_read_1(chp)
struct ct_bus_access_handle *chp;
ct_cmdp_read_1(struct ct_bus_access_handle *chp)
{
u_int8_t regv;
@ -199,9 +186,7 @@ ct_cmdp_read_1(chp)
}
static __inline void
ct_cmdp_write_1(chp, val)
struct ct_bus_access_handle *chp;
u_int8_t val;
ct_cmdp_write_1(struct ct_bus_access_handle *chp, u_int8_t val)
{
bus_space_write_1(chp->ch_iot, chp->ch_ioh, cmd_port, val);

View File

@ -142,10 +142,8 @@ int sncdebug = 0;
int
sncconfig(sc, media, nmedia, defmedia, myea)
struct snc_softc *sc;
int *media, nmedia, defmedia;
u_int8_t *myea;
sncconfig(struct snc_softc *sc, int *media, int nmedia, int defmedia,
u_int8_t *myea)
{
struct ifnet *ifp;
int i;
@ -195,8 +193,7 @@ sncconfig(sc, media, nmedia, defmedia, myea)
}
void
sncshutdown(arg)
void *arg;
sncshutdown(void *arg)
{
struct snc_softc *sc = arg;
@ -208,8 +205,7 @@ sncshutdown(arg)
* Media change callback.
*/
int
snc_mediachange(ifp)
struct ifnet *ifp;
snc_mediachange(struct ifnet *ifp)
{
struct snc_softc *sc = ifp->if_softc;
int error;
@ -227,9 +223,7 @@ snc_mediachange(ifp)
* Media status callback.
*/
void
snc_mediastatus(ifp, ifmr)
struct ifnet *ifp;
struct ifmediareq *ifmr;
snc_mediastatus(struct ifnet *ifp, struct ifmediareq *ifmr)
{
struct snc_softc *sc = ifp->if_softc;
@ -248,10 +242,7 @@ snc_mediastatus(ifp, ifmr)
static int
sncioctl(ifp, cmd, data)
struct ifnet *ifp;
u_long cmd;
caddr_t data;
sncioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
{
struct ifreq *ifr;
struct snc_softc *sc = ifp->if_softc;
@ -317,8 +308,7 @@ sncioctl(ifp, cmd, data)
* Encapsulate a packet of type family for the local net.
*/
static void
sncstart(ifp)
struct ifnet *ifp;
sncstart(struct ifnet *ifp)
{
struct snc_softc *sc = ifp->if_softc;
@ -328,8 +318,7 @@ sncstart(ifp)
}
static void
sncstart_locked(ifp)
struct ifnet *ifp;
sncstart_locked(struct ifnet *ifp)
{
struct snc_softc *sc = ifp->if_softc;
struct mbuf *m;
@ -390,16 +379,14 @@ sncstart_locked(ifp)
* hardware/software errors.
*/
static void
sncreset(sc)
struct snc_softc *sc;
sncreset(struct snc_softc *sc)
{
sncstop(sc);
sncinit_locked(sc);
}
static void
sncinit(xsc)
void *xsc;
sncinit(void *xsc)
{
struct snc_softc *sc = xsc;
@ -476,8 +463,7 @@ sncinit_locked(struct snc_softc *sc)
* part way through.
*/
static int
sncstop(sc)
struct snc_softc *sc;
sncstop(struct snc_softc *sc)
{
struct mtd *mtd;
@ -536,10 +522,7 @@ sncwatchdog(void *arg)
* stuff packet into sonic
*/
static u_int
sonicput(sc, m0, mtd_next)
struct snc_softc *sc;
struct mbuf *m0;
int mtd_next;
sonicput(struct snc_softc *sc, struct mbuf *m0, int mtd_next)
{
struct mtd *mtdp;
struct mbuf *m;
@ -629,8 +612,7 @@ sonicput(sc, m0, mtd_next)
* CAM support
*/
static void
caminitialise(sc)
struct snc_softc *sc;
caminitialise(struct snc_softc *sc)
{
u_int32_t v_cda = sc->v_cda;
int i;
@ -653,10 +635,7 @@ caminitialise(sc)
}
static void
camentry(sc, entry, ea)
int entry;
u_char *ea;
struct snc_softc *sc;
camentry(struct snc_softc *sc, int entry, u_char *ea)
{
u_int32_t v_cda = sc->v_cda;
int camoffset = entry * CDA_CAMDESC;
@ -670,8 +649,7 @@ camentry(sc, entry, ea)
}
static void
camprogram(sc)
struct snc_softc *sc;
camprogram(struct snc_softc *sc)
{
struct ifmultiaddr *ifma;
struct ifnet *ifp;
@ -732,8 +710,7 @@ camprogram(sc)
#ifdef SNCDEBUG
static void
camdump(sc)
struct snc_softc *sc;
camdump(struct snc_softc *sc)
{
int i;
@ -758,8 +735,7 @@ camdump(sc)
#endif
static void
initialise_tda(sc)
struct snc_softc *sc;
initialise_tda(struct snc_softc *sc)
{
struct mtd *mtd;
int i;
@ -780,8 +756,7 @@ initialise_tda(sc)
}
static void
initialise_rda(sc)
struct snc_softc *sc;
initialise_rda(struct snc_softc *sc)
{
int i;
u_int32_t vv_rda = 0;
@ -809,8 +784,7 @@ initialise_rda(sc)
}
static void
initialise_rra(sc)
struct snc_softc *sc;
initialise_rra(struct snc_softc *sc)
{
int i;
u_int v;
@ -842,8 +816,7 @@ initialise_rra(sc)
}
void
sncintr(arg)
void *arg;
sncintr(void *arg)
{
struct snc_softc *sc = (struct snc_softc *)arg;
int isr;
@ -912,8 +885,7 @@ sncintr(arg)
* Transmit interrupt routine
*/
static void
sonictxint(sc)
struct snc_softc *sc;
sonictxint(struct snc_softc *sc)
{
struct mtd *mtd;
u_int32_t txp;
@ -990,8 +962,7 @@ sonictxint(sc)
* Receive interrupt routine
*/
static void
sonicrxint(sc)
struct snc_softc *sc;
sonicrxint(struct snc_softc *sc)
{
u_int32_t rda;
int orra;
@ -1084,10 +1055,7 @@ sonicrxint(sc)
* appropriate protocol handler
*/
static int
sonic_read(sc, pkt, len)
struct snc_softc *sc;
u_int32_t pkt;
int len;
sonic_read(struct snc_softc *sc, u_int32_t pkt, int len)
{
struct ifnet *ifp = sc->sc_ifp;
struct ether_header *et;
@ -1131,10 +1099,7 @@ sonic_read(sc, pkt, len)
* munge the received packet into an mbuf chain
*/
static struct mbuf *
sonic_get(sc, pkt, datalen)
struct snc_softc *sc;
u_int32_t pkt;
int datalen;
sonic_get(struct snc_softc *sc, u_int32_t pkt, int datalen)
{
struct mbuf *m, *top, **mp;
int len;
@ -1194,8 +1159,7 @@ sonic_get(sc, pkt, datalen)
* Enable power on the interface.
*/
int
snc_enable(sc)
struct snc_softc *sc;
snc_enable(struct snc_softc *sc)
{
#ifdef SNCDEBUG
@ -1217,8 +1181,7 @@ snc_enable(sc)
* Disable power on the interface.
*/
void
snc_disable(sc)
struct snc_softc *sc;
snc_disable(struct snc_softc *sc)
{
#ifdef SNCDEBUG

View File

@ -73,9 +73,7 @@ static __inline u_int16_t snc_nec16_select_bank
* to accept packets.
*/
int
sncsetup(sc, lladdr)
struct snc_softc *sc;
u_int8_t *lladdr;
sncsetup(struct snc_softc *sc, u_int8_t *lladdr)
{
u_int32_t p, pp;
int i;
@ -172,8 +170,7 @@ sncsetup(sc, lladdr)
* check if a specified irq is acceptable.
*/
u_int8_t
snc_nec16_validate_irq(irq)
int irq;
snc_nec16_validate_irq(int irq)
{
const u_int8_t encoded_irq[16] = {
-1, -1, -1, 0, -1, 1, 2, -1, -1, 3, 4, -1, 5, 6, -1, -1
@ -186,9 +183,7 @@ snc_nec16_validate_irq(irq)
* specify irq to board.
*/
int
snc_nec16_register_irq(sc, irq)
struct snc_softc *sc;
int irq;
snc_nec16_register_irq(struct snc_softc *sc, int irq)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@ -212,8 +207,7 @@ snc_nec16_register_irq(sc, irq)
* check if a specified memory base address is acceptable.
*/
int
snc_nec16_validate_mem(maddr)
int maddr;
snc_nec16_validate_mem(int maddr)
{
/* Check on Normal mode with max range, only */
@ -230,9 +224,7 @@ snc_nec16_validate_mem(maddr)
* specify memory base address to board and map to first bank.
*/
int
snc_nec16_register_mem(sc, maddr)
struct snc_softc *sc;
int maddr;
snc_nec16_register_mem(struct snc_softc *sc, int maddr)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@ -260,11 +252,8 @@ snc_nec16_register_mem(sc, maddr)
}
int
snc_nec16_check_memory(iot, ioh, memt, memh)
bus_space_tag_t iot;
bus_space_handle_t ioh;
bus_space_tag_t memt;
bus_space_handle_t memh;
snc_nec16_check_memory(bus_space_tag_t iot, bus_space_handle_t ioh,
bus_space_tag_t memt, bus_space_handle_t memh)
{
u_int16_t val;
int i, j;
@ -341,14 +330,9 @@ snc_nec16_check_memory(iot, ioh, memt, memh)
}
int
snc_nec16_detectsubr(iot, ioh, memt, memh, irq, maddr, type)
bus_space_tag_t iot;
bus_space_handle_t ioh;
bus_space_tag_t memt;
bus_space_handle_t memh;
int irq;
int maddr;
u_int8_t type;
snc_nec16_detectsubr(bus_space_tag_t iot, bus_space_handle_t ioh,
bus_space_tag_t memt, bus_space_handle_t memh, int irq, int maddr,
u_int8_t type)
{
u_int16_t cr;
u_int8_t ident;
@ -413,8 +397,7 @@ snc_nec16_detectsubr(iot, ioh, memt, memh, irq, maddr, type)
#define SNC_NEC_SERIES_PNP_CBUS2 0x3d
u_int8_t *
snc_nec16_detect_type(myea)
u_int8_t *myea;
snc_nec16_detect_type(u_int8_t *myea)
{
u_int32_t vendor = (myea[0] << 16) | (myea[1] << 8) | myea[2];
u_int8_t series = myea[3];
@ -459,10 +442,8 @@ snc_nec16_detect_type(myea)
}
int
snc_nec16_get_enaddr(iot, ioh, myea)
bus_space_tag_t iot;
bus_space_handle_t ioh;
u_int8_t *myea;
snc_nec16_get_enaddr(bus_space_tag_t iot, bus_space_handle_t ioh,
u_int8_t *myea)
{
u_int8_t eeprom[SNEC_EEPROM_SIZE];
u_int8_t rom_sum, sum = 0x00;
@ -493,9 +474,7 @@ snc_nec16_get_enaddr(iot, ioh, myea)
* read from NEC/SONIC NIC register.
*/
u_int16_t
snc_nec16_nic_get(sc, reg)
struct snc_softc *sc;
u_int8_t reg;
snc_nec16_nic_get(struct snc_softc *sc, u_int8_t reg)
{
u_int16_t val;
@ -510,10 +489,7 @@ snc_nec16_nic_get(sc, reg)
* write to NEC/SONIC NIC register.
*/
void
snc_nec16_nic_put(sc, reg, val)
struct snc_softc *sc;
u_int8_t reg;
u_int16_t val;
snc_nec16_nic_put(struct snc_softc *sc, u_int8_t reg, u_int16_t val)
{
/* select SONIC register */
@ -527,10 +503,7 @@ snc_nec16_nic_put(sc, reg, val)
* where exists specified (internal buffer memory) offset.
*/
static __inline u_int16_t
snc_nec16_select_bank(sc, base, offset)
struct snc_softc *sc;
u_int32_t base;
u_int32_t offset;
snc_nec16_select_bank(struct snc_softc *sc, u_int32_t base, u_int32_t offset)
{
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
@ -565,11 +538,8 @@ snc_nec16_select_bank(sc, base, offset)
* write to SONIC descriptors.
*/
void
snc_nec16_writetodesc(sc, base, offset, val)
struct snc_softc *sc;
u_int32_t base;
u_int32_t offset;
u_int16_t val;
snc_nec16_writetodesc(struct snc_softc *sc, u_int32_t base, u_int32_t offset,
u_int16_t val)
{
bus_space_tag_t memt = sc->sc_memt;
bus_space_handle_t memh = sc->sc_memh;
@ -584,10 +554,7 @@ snc_nec16_writetodesc(sc, base, offset, val)
* read from SONIC descriptors.
*/
u_int16_t
snc_nec16_readfromdesc(sc, base, offset)
struct snc_softc *sc;
u_int32_t base;
u_int32_t offset;
snc_nec16_readfromdesc(struct snc_softc *sc, u_int32_t base, u_int32_t offset)
{
bus_space_tag_t memt = sc->sc_memt;
bus_space_handle_t memh = sc->sc_memh;
@ -602,11 +569,8 @@ snc_nec16_readfromdesc(sc, base, offset)
* read from SONIC data buffer.
*/
void
snc_nec16_copyfrombuf(sc, dst, offset, size)
struct snc_softc *sc;
void *dst;
u_int32_t offset;
size_t size;
snc_nec16_copyfrombuf(struct snc_softc *sc, void *dst, u_int32_t offset,
size_t size)
{
bus_space_tag_t memt = sc->sc_memt;
bus_space_handle_t memh = sc->sc_memh;
@ -644,11 +608,8 @@ snc_nec16_copyfrombuf(sc, dst, offset, size)
* write to SONIC data buffer.
*/
void
snc_nec16_copytobuf(sc, src, offset, size)
struct snc_softc *sc;
void *src;
u_int32_t offset;
size_t size;
snc_nec16_copytobuf(struct snc_softc *sc, void *src, u_int32_t offset,
size_t size)
{
bus_space_tag_t memt = sc->sc_memt;
bus_space_handle_t memh = sc->sc_memh;
@ -688,10 +649,7 @@ snc_nec16_copytobuf(sc, src, offset, size)
* write (fill) 0 to SONIC data buffer.
*/
void
snc_nec16_zerobuf(sc, offset, size)
struct snc_softc *sc;
u_int32_t offset;
size_t size;
snc_nec16_zerobuf(struct snc_softc *sc, u_int32_t offset, size_t size)
{
bus_space_tag_t memt = sc->sc_memt;
bus_space_handle_t memh = sc->sc_memh;
@ -735,10 +693,8 @@ snc_nec16_zerobuf(sc, offset, size)
#define SNEC_EEP_DELAY 1000
void
snc_nec16_read_eeprom(iot, ioh, data)
bus_space_tag_t iot;
bus_space_handle_t ioh;
u_int8_t *data;
snc_nec16_read_eeprom(bus_space_tag_t iot, bus_space_handle_t ioh,
u_int8_t *data)
{
u_int8_t n, val, bit;
@ -851,9 +807,7 @@ snc_nec16_read_eeprom(iot, ioh, data)
#ifdef SNCDEBUG
void
snc_nec16_dump_reg(iot, ioh)
bus_space_tag_t iot;
bus_space_handle_t ioh;
snc_nec16_dump_reg(bus_space_tag_t iot, bus_space_handle_t ioh)
{
u_int8_t n;
u_int16_t val;

View File

@ -66,9 +66,7 @@ devclass_t snc_devclass;
* Allocate a port resource with the given resource id.
*/
int
snc_alloc_port(dev, rid)
device_t dev;
int rid;
snc_alloc_port(device_t dev, int rid)
{
struct snc_softc *sc = device_get_softc(dev);
struct resource *res;
@ -91,9 +89,7 @@ snc_alloc_port(dev, rid)
* Allocate a memory resource with the given resource id.
*/
int
snc_alloc_memory(dev, rid)
device_t dev;
int rid;
snc_alloc_memory(device_t dev, int rid)
{
struct snc_softc *sc = device_get_softc(dev);
struct resource *res;
@ -116,10 +112,7 @@ snc_alloc_memory(dev, rid)
* Allocate an irq resource with the given resource id.
*/
int
snc_alloc_irq(dev, rid, flags)
device_t dev;
int rid;
int flags;
snc_alloc_irq(device_t dev, int rid, int flags)
{
struct snc_softc *sc = device_get_softc(dev);
struct resource *res;
@ -139,8 +132,7 @@ snc_alloc_irq(dev, rid, flags)
* Release all resources
*/
void
snc_release_resources(dev)
device_t dev;
snc_release_resources(device_t dev)
{
struct snc_softc *sc = device_get_softc(dev);
@ -170,9 +162,7 @@ snc_release_resources(dev)
****************************************************************/
int
snc_probe(dev, type)
device_t dev;
int type;
snc_probe(device_t dev, int type)
{
struct snc_softc *sc = device_get_softc(dev);
@ -188,8 +178,7 @@ snc_probe(dev, type)
****************************************************************/
int
snc_attach(dev)
device_t dev;
snc_attach(device_t dev)
{
struct snc_softc *sc = device_get_softc(dev);
u_int8_t myea[ETHER_ADDR_LEN];
@ -253,8 +242,7 @@ snc_attach(dev)
****************************************************************/
int
snc_shutdown(dev)
device_t dev;
snc_shutdown(device_t dev)
{
struct snc_softc *sc = device_get_softc(dev);

View File

@ -68,8 +68,7 @@ static struct isa_pnp_id snc_ids[] = {
};
static void
snc_isapnp_reconfig(dev)
device_t dev;
snc_isapnp_reconfig(device_t dev)
{
struct isa_device *idev = DEVTOISA(dev);
struct isa_config config;
@ -111,8 +110,7 @@ snc_isapnp_reconfig(dev)
}
static int
snc_isa_probe(dev)
device_t dev;
snc_isa_probe(device_t dev)
{
struct snc_softc *sc = device_get_softc(dev);
int type;
@ -177,8 +175,7 @@ snc_isa_probe(dev)
}
static int
snc_isa_attach(dev)
device_t dev;
snc_isa_attach(device_t dev)
{
struct snc_softc *sc = device_get_softc(dev);