Convert to ANSI C function declarations.
MFC after: 1 week
This commit is contained in:
parent
bea7a8d75c
commit
291c88bd60
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154650
@ -159,8 +159,7 @@ static struct epic_type epic_devs[] = {
|
||||
};
|
||||
|
||||
static int
|
||||
epic_probe(dev)
|
||||
device_t dev;
|
||||
epic_probe(device_t dev)
|
||||
{
|
||||
struct epic_type *t;
|
||||
|
||||
@ -175,8 +174,7 @@ epic_probe(dev)
|
||||
}
|
||||
|
||||
static struct epic_type *
|
||||
epic_devtype(dev)
|
||||
device_t dev;
|
||||
epic_devtype(device_t dev)
|
||||
{
|
||||
struct epic_type *t;
|
||||
|
||||
@ -218,8 +216,7 @@ epic_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nseg, int error)
|
||||
* Reset to known state.
|
||||
*/
|
||||
static int
|
||||
epic_attach(dev)
|
||||
device_t dev;
|
||||
epic_attach(device_t dev)
|
||||
{
|
||||
struct ifnet *ifp;
|
||||
epic_softc_t *sc;
|
||||
@ -482,8 +479,7 @@ epic_release(epic_softc_t *sc)
|
||||
* Detach driver and free resources.
|
||||
*/
|
||||
static int
|
||||
epic_detach(dev)
|
||||
device_t dev;
|
||||
epic_detach(device_t dev)
|
||||
{
|
||||
struct ifnet *ifp;
|
||||
epic_softc_t *sc;
|
||||
@ -515,8 +511,7 @@ epic_detach(dev)
|
||||
* get confused by errant DMAs when rebooting.
|
||||
*/
|
||||
static void
|
||||
epic_shutdown(dev)
|
||||
device_t dev;
|
||||
epic_shutdown(device_t dev)
|
||||
{
|
||||
epic_softc_t *sc;
|
||||
|
||||
@ -529,10 +524,7 @@ epic_shutdown(dev)
|
||||
* This is if_ioctl handler.
|
||||
*/
|
||||
static int
|
||||
epic_ifioctl(ifp, command, data)
|
||||
struct ifnet *ifp;
|
||||
u_long command;
|
||||
caddr_t data;
|
||||
epic_ifioctl(struct ifnet *ifp, u_long command, caddr_t data)
|
||||
{
|
||||
epic_softc_t *sc = ifp->if_softc;
|
||||
struct mii_data *mii;
|
||||
@ -645,8 +637,7 @@ epic_dma_map_rxbuf(void *arg, bus_dma_segment_t *segs, int nseg,
|
||||
* or queue become empty.
|
||||
*/
|
||||
static void
|
||||
epic_ifstart(ifp)
|
||||
struct ifnet * ifp;
|
||||
epic_ifstart(struct ifnet * ifp)
|
||||
{
|
||||
epic_softc_t *sc = ifp->if_softc;
|
||||
struct epic_tx_buffer *buf;
|
||||
@ -725,8 +716,7 @@ epic_ifstart(ifp)
|
||||
* Synopsis: Finish all received frames.
|
||||
*/
|
||||
static void
|
||||
epic_rx_done(sc)
|
||||
epic_softc_t *sc;
|
||||
epic_rx_done(epic_softc_t *sc)
|
||||
{
|
||||
struct ifnet *ifp = sc->ifp;
|
||||
u_int16_t len;
|
||||
@ -809,8 +799,7 @@ epic_rx_done(sc)
|
||||
* are pending or descriptor is not transmitted yet.
|
||||
*/
|
||||
static void
|
||||
epic_tx_done(sc)
|
||||
epic_softc_t *sc;
|
||||
epic_tx_done(epic_softc_t *sc)
|
||||
{
|
||||
struct epic_tx_buffer *buf;
|
||||
struct epic_tx_desc *desc;
|
||||
@ -860,8 +849,7 @@ epic_tx_done(sc)
|
||||
* Interrupt function
|
||||
*/
|
||||
static void
|
||||
epic_intr(arg)
|
||||
void *arg;
|
||||
epic_intr(void *arg)
|
||||
{
|
||||
epic_softc_t *sc;
|
||||
int status, i;
|
||||
@ -932,8 +920,7 @@ epic_intr(arg)
|
||||
* and restart the transmitter.
|
||||
*/
|
||||
static void
|
||||
epic_tx_underrun(sc)
|
||||
epic_softc_t *sc;
|
||||
epic_tx_underrun(epic_softc_t *sc)
|
||||
{
|
||||
if (sc->tx_threshold > TRANSMIT_THRESHOLD_MAX) {
|
||||
sc->txcon &= ~TXCON_EARLY_TRANSMIT_ENABLE;
|
||||
@ -964,8 +951,7 @@ epic_tx_underrun(sc)
|
||||
* if success continue to work.
|
||||
*/
|
||||
static void
|
||||
epic_ifwatchdog(ifp)
|
||||
struct ifnet *ifp;
|
||||
epic_ifwatchdog(struct ifnet *ifp)
|
||||
{
|
||||
epic_softc_t *sc;
|
||||
int x;
|
||||
@ -1020,8 +1006,7 @@ epic_stats_update(epic_softc_t * sc)
|
||||
* Set media options.
|
||||
*/
|
||||
static int
|
||||
epic_ifmedia_upd(ifp)
|
||||
struct ifnet *ifp;
|
||||
epic_ifmedia_upd(struct ifnet *ifp)
|
||||
{
|
||||
epic_softc_t *sc;
|
||||
struct mii_data *mii;
|
||||
@ -1147,9 +1132,7 @@ epic_ifmedia_upd(ifp)
|
||||
* Report current media status.
|
||||
*/
|
||||
static void
|
||||
epic_ifmedia_sts(ifp, ifmr)
|
||||
struct ifnet *ifp;
|
||||
struct ifmediareq *ifmr;
|
||||
epic_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr)
|
||||
{
|
||||
epic_softc_t *sc;
|
||||
struct mii_data *mii;
|
||||
@ -1179,8 +1162,7 @@ epic_ifmedia_sts(ifp, ifmr)
|
||||
* Callback routine, called on media change.
|
||||
*/
|
||||
static void
|
||||
epic_miibus_statchg(dev)
|
||||
device_t dev;
|
||||
epic_miibus_statchg(device_t dev)
|
||||
{
|
||||
epic_softc_t *sc;
|
||||
struct mii_data *mii;
|
||||
@ -1223,8 +1205,7 @@ epic_miibus_statchg(dev)
|
||||
}
|
||||
|
||||
static void
|
||||
epic_miibus_mediainit(dev)
|
||||
device_t dev;
|
||||
epic_miibus_mediainit(device_t dev)
|
||||
{
|
||||
epic_softc_t *sc;
|
||||
struct mii_data *mii;
|
||||
@ -1256,8 +1237,7 @@ epic_miibus_mediainit(dev)
|
||||
* Reset chip and update media.
|
||||
*/
|
||||
static void
|
||||
epic_init(xsc)
|
||||
void *xsc;
|
||||
epic_init(void *xsc)
|
||||
{
|
||||
epic_softc_t *sc = xsc;
|
||||
struct ifnet *ifp = sc->ifp;
|
||||
@ -1345,8 +1325,7 @@ epic_init(xsc)
|
||||
* access RXCON.
|
||||
*/
|
||||
static void
|
||||
epic_set_rx_mode(sc)
|
||||
epic_softc_t *sc;
|
||||
epic_set_rx_mode(epic_softc_t *sc)
|
||||
{
|
||||
u_int32_t flags;
|
||||
u_int32_t rxcon;
|
||||
@ -1368,8 +1347,7 @@ epic_set_rx_mode(sc)
|
||||
* access TXCON.
|
||||
*/
|
||||
static void
|
||||
epic_set_tx_mode(sc)
|
||||
epic_softc_t *sc;
|
||||
epic_set_tx_mode(epic_softc_t *sc)
|
||||
{
|
||||
|
||||
if (sc->txcon & TXCON_EARLY_TRANSMIT_ENABLE)
|
||||
@ -1386,8 +1364,7 @@ epic_set_tx_mode(sc)
|
||||
* Note: EPIC must be in idle state.
|
||||
*/
|
||||
static void
|
||||
epic_set_mc_table(sc)
|
||||
epic_softc_t *sc;
|
||||
epic_set_mc_table(epic_softc_t *sc)
|
||||
{
|
||||
struct ifnet *ifp;
|
||||
struct ifmultiaddr *ifma;
|
||||
@ -1433,8 +1410,7 @@ epic_set_mc_table(sc)
|
||||
* Synopsis: Start receive process and transmit one, if they need.
|
||||
*/
|
||||
static void
|
||||
epic_start_activity(sc)
|
||||
epic_softc_t *sc;
|
||||
epic_start_activity(epic_softc_t *sc)
|
||||
{
|
||||
|
||||
/* Start rx process. */
|
||||
@ -1447,8 +1423,7 @@ epic_start_activity(sc)
|
||||
* packet needs to be queued to stop Tx DMA.
|
||||
*/
|
||||
static void
|
||||
epic_stop_activity(sc)
|
||||
epic_softc_t *sc;
|
||||
epic_stop_activity(epic_softc_t *sc)
|
||||
{
|
||||
int status, i;
|
||||
|
||||
@ -1493,8 +1468,7 @@ epic_stop_activity(sc)
|
||||
* XXX the packet will then be actually sent over network...
|
||||
*/
|
||||
static int
|
||||
epic_queue_last_packet(sc)
|
||||
epic_softc_t *sc;
|
||||
epic_queue_last_packet(epic_softc_t *sc)
|
||||
{
|
||||
struct epic_tx_desc *desc;
|
||||
struct epic_frag_list *flist;
|
||||
@ -1563,8 +1537,7 @@ epic_queue_last_packet(sc)
|
||||
* Synopsis: Shut down board and deallocates rings.
|
||||
*/
|
||||
static void
|
||||
epic_stop(sc)
|
||||
epic_softc_t *sc;
|
||||
epic_stop(epic_softc_t *sc)
|
||||
{
|
||||
int s;
|
||||
|
||||
@ -1598,8 +1571,7 @@ epic_stop(sc)
|
||||
* Synopsis: This function should free all memory allocated for rings.
|
||||
*/
|
||||
static void
|
||||
epic_free_rings(sc)
|
||||
epic_softc_t *sc;
|
||||
epic_free_rings(epic_softc_t *sc)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -1645,8 +1617,7 @@ epic_free_rings(sc)
|
||||
* are bounded and aligned properly.
|
||||
*/
|
||||
static int
|
||||
epic_init_rings(sc)
|
||||
epic_softc_t *sc;
|
||||
epic_init_rings(epic_softc_t *sc)
|
||||
{
|
||||
int error, i;
|
||||
|
||||
@ -1744,9 +1715,7 @@ epic_init_rings(sc)
|
||||
* EEPROM operation functions
|
||||
*/
|
||||
static void
|
||||
epic_write_eepromreg(sc, val)
|
||||
epic_softc_t *sc;
|
||||
u_int8_t val;
|
||||
epic_write_eepromreg(epic_softc_t *sc, u_int8_t val)
|
||||
{
|
||||
u_int16_t i;
|
||||
|
||||
@ -1759,17 +1728,14 @@ epic_write_eepromreg(sc, val)
|
||||
}
|
||||
|
||||
static u_int8_t
|
||||
epic_read_eepromreg(sc)
|
||||
epic_softc_t *sc;
|
||||
epic_read_eepromreg(epic_softc_t *sc)
|
||||
{
|
||||
|
||||
return (CSR_READ_1(sc, EECTL));
|
||||
}
|
||||
|
||||
static u_int8_t
|
||||
epic_eeprom_clock(sc, val)
|
||||
epic_softc_t *sc;
|
||||
u_int8_t val;
|
||||
epic_eeprom_clock(epic_softc_t *sc, u_int8_t val)
|
||||
{
|
||||
|
||||
epic_write_eepromreg(sc, val);
|
||||
@ -1780,9 +1746,7 @@ epic_eeprom_clock(sc, val)
|
||||
}
|
||||
|
||||
static void
|
||||
epic_output_eepromw(sc, val)
|
||||
epic_softc_t *sc;
|
||||
u_int16_t val;
|
||||
epic_output_eepromw(epic_softc_t *sc, u_int16_t val)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -1795,8 +1759,7 @@ epic_output_eepromw(sc, val)
|
||||
}
|
||||
|
||||
static u_int16_t
|
||||
epic_input_eepromw(sc)
|
||||
epic_softc_t *sc;
|
||||
epic_input_eepromw(epic_softc_t *sc)
|
||||
{
|
||||
u_int16_t retval = 0;
|
||||
int i;
|
||||
@ -1810,9 +1773,7 @@ epic_input_eepromw(sc)
|
||||
}
|
||||
|
||||
static int
|
||||
epic_read_eeprom(sc, loc)
|
||||
epic_softc_t *sc;
|
||||
u_int16_t loc;
|
||||
epic_read_eeprom(epic_softc_t *sc, u_int16_t loc)
|
||||
{
|
||||
u_int16_t dataval;
|
||||
u_int16_t read_cmd;
|
||||
@ -1837,9 +1798,7 @@ epic_read_eeprom(sc, loc)
|
||||
* Here goes MII read/write routines.
|
||||
*/
|
||||
static int
|
||||
epic_read_phy_reg(sc, phy, reg)
|
||||
epic_softc_t *sc;
|
||||
int phy, reg;
|
||||
epic_read_phy_reg(epic_softc_t *sc, int phy, int reg)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -1855,9 +1814,7 @@ epic_read_phy_reg(sc, phy, reg)
|
||||
}
|
||||
|
||||
static void
|
||||
epic_write_phy_reg(sc, phy, reg, val)
|
||||
epic_softc_t *sc;
|
||||
int phy, reg, val;
|
||||
epic_write_phy_reg(epic_softc_t *sc, int phy, int reg, int val)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -1872,9 +1829,7 @@ epic_write_phy_reg(sc, phy, reg, val)
|
||||
}
|
||||
|
||||
static int
|
||||
epic_miibus_readreg(dev, phy, reg)
|
||||
device_t dev;
|
||||
int phy, reg;
|
||||
epic_miibus_readreg(device_t dev, int phy, int reg)
|
||||
{
|
||||
epic_softc_t *sc;
|
||||
|
||||
@ -1884,9 +1839,7 @@ epic_miibus_readreg(dev, phy, reg)
|
||||
}
|
||||
|
||||
static int
|
||||
epic_miibus_writereg(dev, phy, reg, data)
|
||||
device_t dev;
|
||||
int phy, reg, data;
|
||||
epic_miibus_writereg(device_t dev, int phy, int reg, int data)
|
||||
{
|
||||
epic_softc_t *sc;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user