DragonFly submit List (threaded) for 2005-09
[
Date Prev][
Date Next]
[
Thread Prev][Thread Next]
[
Date Index][
Thread Index]
Style cleanup for if_ed
He,
style(9) cleanup for sys/dev/netif/if_ed/. I converted the old style to
ANSI style. Compiles clean.
Matthias
diff -urN sys.orig/dev/netif/ed/if_ed.c sys/dev/netif/ed/if_ed.c
--- sys.orig/dev/netif/ed/if_ed.c 2005-09-30 11:12:18.000000000 +0200
+++ sys/dev/netif/ed/if_ed.c 2005-09-30 17:15:33.000000000 +0200
@@ -91,17 +91,17 @@
static void ds_getmcaf (struct ed_softc *, u_int32_t *);
-static void ed_get_packet (struct ed_softc *, char *, /* u_short */ int);
+static void ed_get_packet (struct ed_softc *, char *, u_short);
static __inline void ed_rint (struct ed_softc *);
static __inline void ed_xmit (struct ed_softc *);
static __inline char * ed_ring_copy (struct ed_softc *, char *, char *,
- /* u_short */ int);
+ u_short);
static void ed_hpp_set_physical_link (struct ed_softc *);
-static void ed_hpp_readmem (struct ed_softc *, int, unsigned char *,
- /* u_short */ int);
+static void ed_hpp_readmem (struct ed_softc *, unsigned short,
+ unsigned char *, unsigned short);
static void ed_hpp_writemem (struct ed_softc *, unsigned char *,
- /* u_short */ int, /* u_short */ int);
+ u_short, u_short);
static u_short ed_hpp_write_mbufs (struct ed_softc *, struct mbuf *,
int);
@@ -189,8 +189,7 @@
*/
int
-ed_probe_generic8390(sc)
- struct ed_softc *sc;
+ed_probe_generic8390(struct ed_softc *sc)
{
if ((ed_nic_inb(sc, ED_P0_CR) &
(ED_CR_RD2 | ED_CR_TXP | ED_CR_STA | ED_CR_STP)) !=
@@ -206,10 +205,7 @@
* Probe and vendor-specific initialization routine for SMC/WD80x3 boards
*/
int
-ed_probe_WD80x3_generic(dev, flags, intr_vals)
- device_t dev;
- int flags;
- unsigned short *intr_vals[];
+ed_probe_WD80x3_generic(device_t dev, int flags, unsigned short *intr_vals[])
{
struct ed_softc *sc = device_get_softc(dev);
int error;
@@ -613,10 +609,7 @@
}
int
-ed_probe_WD80x3(dev, port_rid, flags)
- device_t dev;
- int port_rid;
- int flags;
+ed_probe_WD80x3(device_t dev, int port_rid, int flags)
{
struct ed_softc *sc = device_get_softc(dev);
int error;
@@ -636,10 +629,7 @@
* Probe and vendor-specific initialization routine for 3Com 3c503 boards
*/
int
-ed_probe_3Com(dev, port_rid, flags)
- device_t dev;
- int port_rid;
- int flags;
+ed_probe_3Com(device_t dev, int port_rid, int flags)
{
struct ed_softc *sc = device_get_softc(dev);
int error;
@@ -923,10 +913,7 @@
* Probe and vendor-specific initialization routine for SIC boards
*/
int
-ed_probe_SIC(dev, port_rid, flags)
- device_t dev;
- int port_rid;
- int flags;
+ed_probe_SIC(device_t dev, int port_rid, int flags)
{
struct ed_softc *sc = device_get_softc(dev);
int error;
@@ -1037,9 +1024,7 @@
* Probe and vendor-specific initialization routine for NE1000/2000 boards
*/
int
-ed_probe_Novell_generic(dev, flags)
- device_t dev;
- int flags;
+ed_probe_Novell_generic(device_t dev, int flags)
{
struct ed_softc *sc = device_get_softc(dev);
u_int memsize, n;
@@ -1247,10 +1232,7 @@
}
int
-ed_probe_Novell(dev, port_rid, flags)
- device_t dev;
- int port_rid;
- int flags;
+ed_probe_Novell(device_t dev, int port_rid, int flags)
{
struct ed_softc *sc = device_get_softc(dev);
int error;
@@ -1290,10 +1272,7 @@
* command line.
*/
int
-ed_probe_HP_pclanp(dev, port_rid, flags)
- device_t dev;
- int port_rid;
- int flags;
+ed_probe_HP_pclanp(device_t dev, int port_rid, int flags)
{
struct ed_softc *sc = device_get_softc(dev);
int error;
@@ -1606,10 +1585,7 @@
* Allocate a port resource with the given resource id.
*/
int
-ed_alloc_port(dev, rid, size)
- device_t dev;
- int rid;
- int size;
+ed_alloc_port(device_t dev, int rid, int size)
{
struct ed_softc *sc = device_get_softc(dev);
struct resource *res;
@@ -1630,10 +1606,7 @@
* Allocate a memory resource with the given resource id.
*/
int
-ed_alloc_memory(dev, rid, size)
- device_t dev;
- int rid;
- int size;
+ed_alloc_memory(device_t dev, int rid, int size)
{
struct ed_softc *sc = device_get_softc(dev);
struct resource *res;
@@ -1654,10 +1627,7 @@
* Allocate an irq resource with the given resource id.
*/
int
-ed_alloc_irq(dev, rid, flags)
- device_t dev;
- int rid;
- int flags;
+ed_alloc_irq(device_t dev, int rid, int flags)
{
struct ed_softc *sc = device_get_softc(dev);
struct resource *res;
@@ -1677,8 +1647,7 @@
* Release all resources
*/
void
-ed_release_resources(dev)
- device_t dev;
+ed_release_resources(device_t dev)
{
struct ed_softc *sc = device_get_softc(dev);
@@ -1786,8 +1755,7 @@
* Reset interface.
*/
static void
-ed_reset(ifp)
- struct ifnet *ifp;
+ed_reset(struct ifnet *ifp)
{
struct ed_softc *sc = ifp->if_softc;
@@ -1811,8 +1779,7 @@
* Take interface offline.
*/
void
-ed_stop(sc)
- struct ed_softc *sc;
+ed_stop(struct ed_softc *sc)
{
int n = 5000;
@@ -1840,8 +1807,7 @@
* generate an interrupt after a transmit has been started on it.
*/
static void
-ed_watchdog(ifp)
- struct ifnet *ifp;
+ed_watchdog(struct ifnet *ifp)
{
struct ed_softc *sc = ifp->if_softc;
@@ -1855,8 +1821,7 @@
#ifndef ED_NO_MIIBUS
static void
-ed_tick(arg)
- void *arg;
+ed_tick(void *arg)
{
struct ed_softc *sc = arg;
struct mii_data *mii;
@@ -1883,8 +1848,7 @@
* Initialize device.
*/
static void
-ed_init(xsc)
- void *xsc;
+ed_init(void *xsc)
{
struct ed_softc *sc = xsc;
struct ifnet *ifp = &sc->arpcom.ac_if;
@@ -2048,8 +2012,7 @@
* This routine actually starts the transmission on the interface
*/
static __inline void
-ed_xmit(sc)
- struct ed_softc *sc;
+ed_xmit(struct ed_softc *sc)
{
struct ifnet *ifp = (struct ifnet *)sc;
unsigned short len;
@@ -2104,8 +2067,7 @@
* (i.e. that the output part of the interface is idle)
*/
static void
-ed_start(ifp)
- struct ifnet *ifp;
+ed_start(struct ifnet *ifp)
{
struct ed_softc *sc = ifp->if_softc;
struct mbuf *m0, *m;
@@ -2253,8 +2215,7 @@
* Ethernet interface receiver interrupt.
*/
static __inline void
-ed_rint(sc)
- struct ed_softc *sc;
+ed_rint(struct ed_softc *sc)
{
struct ifnet *ifp = &sc->arpcom.ac_if;
u_char boundry;
@@ -2388,8 +2349,7 @@
* Ethernet interface interrupt processor
*/
void
-edintr(arg)
- void *arg;
+edintr(void *arg)
{
struct ed_softc *sc = (struct ed_softc*) arg;
struct ifnet *ifp = (struct ifnet *)sc;
@@ -2656,11 +2616,7 @@
* pretty ugly.
*/
static int
-ed_ioctl(ifp, command, data, cr)
- struct ifnet *ifp;
- u_long command;
- caddr_t data;
- struct ucred *cr;
+ed_ioctl(struct ifnet *ifp, u_long command, caddr_t data, struct ucred *cr)
{
struct ed_softc *sc = ifp->if_softc;
#ifndef ED_NO_MIIBUS
@@ -2752,11 +2708,7 @@
* ring-wrap.
*/
static __inline char *
-ed_ring_copy(sc, src, dst, amount)
- struct ed_softc *sc;
- char *src;
- char *dst;
- u_short amount;
+ed_ring_copy(struct ed_softc *sc, char *src, char *dst, u_short amount)
{
u_short tmp_amount;
@@ -2787,10 +2739,7 @@
* ether_input().
*/
static void
-ed_get_packet(sc, buf, len)
- struct ed_softc *sc;
- char *buf;
- u_short len;
+ed_get_packet(struct ed_softc *sc, char *buf, u_short len)
{
struct ifnet *ifp = &sc->arpcom.ac_if;
struct ether_header *eh;
@@ -2855,11 +2804,7 @@
* This routine is currently Novell-specific.
*/
void
-ed_pio_readmem(sc, src, dst, amount)
- struct ed_softc *sc;
- int src;
- unsigned char *dst;
- unsigned short amount;
+ed_pio_readmem(struct ed_softc *sc, int src, unsigned char *dst, unsigned short amount)
{
/* HP PC Lan+ cards need special handling */
if (sc->vendor == ED_VENDOR_HP && sc->type == ED_TYPE_HP_PCLANPLUS) {
@@ -2898,11 +2843,8 @@
* be even.
*/
void
-ed_pio_writemem(sc, src, dst, len)
- struct ed_softc *sc;
- char *src;
- unsigned short dst;
- unsigned short len;
+ed_pio_writemem(struct ed_softc *sc, char *src, unsigned short dst,
+ unsigned short len)
{
int maxwait = 200; /* about 240us */
@@ -2944,10 +2886,7 @@
* programmed I/O.
*/
static u_short
-ed_pio_write_mbufs(sc, m, dst)
- struct ed_softc *sc;
- struct mbuf *m;
- int dst;
+ed_pio_write_mbufs(struct ed_softc *sc, struct mbuf *m, int dst)
{
struct ifnet *ifp = (struct ifnet *)sc;
unsigned short total_len, dma_len;
@@ -3070,11 +3009,8 @@
*/
static void
-ed_hpp_readmem(sc, src, dst, amount)
- struct ed_softc *sc;
- unsigned short src;
- unsigned char *dst;
- unsigned short amount;
+ed_hpp_readmem(struct ed_softc *sc, unsigned short src, unsigned char *dst,
+ unsigned short amount)
{
int use_32bit_access = !(sc->hpp_id & ED_HPP_ID_16_BIT_ACCESS);
@@ -3173,11 +3109,8 @@
* be even.
*/
static void
-ed_hpp_writemem(sc, src, dst, len)
- struct ed_softc *sc;
- unsigned char *src;
- unsigned short dst;
- unsigned short len;
+ed_hpp_writemem(struct ed_softc *sc, unsigned char *src, unsigned short dst,
+ unsigned short len)
{
/* reset remote DMA complete flag */
ed_nic_outb(sc, ED_P0_ISR, ED_ISR_RDC);
@@ -3346,9 +3279,7 @@
* MII bus support routines.
*/
int
-ed_miibus_readreg(dev, phy, reg)
- device_t dev;
- int phy, reg;
+ed_miibus_readreg(device_t dev, int phy, int reg)
{
struct ed_softc *sc = device_get_softc(dev);
int failed, val;
@@ -3376,9 +3307,7 @@
}
void
-ed_miibus_writereg(dev, phy, reg, data)
- device_t dev;
- int phy, reg, data;
+ed_miibus_writereg(device_t dev, int phy, int reg, int data)
{
struct ed_softc *sc = device_get_softc(dev);
@@ -3402,8 +3331,7 @@
}
int
-ed_ifmedia_upd(ifp)
- struct ifnet *ifp;
+ed_ifmedia_upd(struct ifnet *ifp)
{
struct ed_softc *sc;
struct mii_data *mii;
@@ -3417,9 +3345,7 @@
}
void
-ed_ifmedia_sts(ifp, ifmr)
- struct ifnet *ifp;
- struct ifmediareq *ifmr;
+ed_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr)
{
struct ed_softc *sc;
struct mii_data *mii;
@@ -3435,9 +3361,7 @@
}
void
-ed_child_detached(dev, child)
- device_t dev;
- device_t child;
+ed_child_detached(device_t dev, device_t child)
{
struct ed_softc *sc;
@@ -3448,8 +3372,7 @@
#endif
static void
-ed_setrcr(sc)
- struct ed_softc *sc;
+ed_setrcr(struct ed_softc *sc)
{
struct ifnet *ifp = (struct ifnet *)sc;
int i;
@@ -3528,8 +3451,7 @@
* Compute crc for ethernet address
*/
static uint32_t
-ds_mchash(addr)
- const uint8_t *addr;
+ds_mchash(const uint8_t *addr)
{
#define ED_POLYNOMIAL 0x04c11db6
uint32_t crc = 0xffffffff;
@@ -3553,9 +3475,7 @@
* list of multicast addresses we need to listen to.
*/
static void
-ds_getmcaf(sc, mcaf)
- struct ed_softc *sc;
- u_int32_t *mcaf;
+ds_getmcaf(struct ed_softc *sc, u_int32_t *mcaf)
{
u_int32_t index;
u_char *af = (u_char *) mcaf;
diff -urN sys.orig/dev/netif/ed/if_ed_isa.c sys/dev/netif/ed/if_ed_isa.c
--- sys.orig/dev/netif/ed/if_ed_isa.c 2005-09-30 11:12:18.000000000 +0200
+++ sys/dev/netif/ed/if_ed_isa.c 2005-09-30 17:18:23.000000000 +0200
@@ -63,10 +63,8 @@
};
static int
-ed_isa_probe(dev)
- device_t dev;
+ed_isa_probe(device_t dev)
{
- struct ed_softc *sc = device_get_softc(dev);
int flags = device_get_flags(dev);
int error = 0;
@@ -119,8 +117,7 @@
}
static int
-ed_isa_attach(dev)
- device_t dev;
+ed_isa_attach(device_t dev)
{
struct ed_softc *sc = device_get_softc(dev);
int error;
diff -urN sys.orig/dev/netif/ed/if_ed_pccard.c sys/dev/netif/ed/if_ed_pccard.c
--- sys.orig/dev/netif/ed/if_ed_pccard.c 2005-09-30 11:12:18.000000000 +0200
+++ sys/dev/netif/ed/if_ed_pccard.c 2005-09-30 17:17:50.000000000 +0200
@@ -442,8 +442,7 @@
ed_asic_inb(sc, ED_DLINK_MIIBUS) & ~(x))
static void
-ed_pccard_dlink_mii_reset(sc)
- struct ed_softc *sc;
+ed_pccard_dlink_mii_reset(struct ed_softc *sc)
{
ed_asic_outb(sc, ED_DLINK_MIIBUS, 0);
DELAY(10);
@@ -458,10 +457,7 @@
}
static void
-ed_pccard_dlink_mii_writebits(sc, val, nbits)
- struct ed_softc *sc;
- u_int val;
- int nbits;
+ed_pccard_dlink_mii_writebits(struct ed_softc *sc, u_int val, int nbits)
{
int i;
@@ -481,9 +477,7 @@
}
static u_int
-ed_pccard_dlink_mii_readbits(sc, nbits)
- struct ed_softc *sc;
- int nbits;
+ed_pccard_dlink_mii_readbits(struct ed_softc *sc, int nbits)
{
int i;
u_int val = 0;
[
Date Prev][
Date Next]
[
Thread Prev][Thread Next]
[
Date Index][
Thread Index]