summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2005-02-08 05:59:43 +0000
committerimp <imp@FreeBSD.org>2005-02-08 05:59:43 +0000
commit92b8d4843ebd3baaf5e64c6d9d81eeb24c4c7beb (patch)
tree9346f4cd332989869cd7f440f49af6c9cdfbf0f2 /sys
parent7bb35cb182703c30113f937e43890f82e0da8cf8 (diff)
downloadFreeBSD-src-92b8d4843ebd3baaf5e64c6d9d81eeb24c4c7beb.zip
FreeBSD-src-92b8d4843ebd3baaf5e64c6d9d81eeb24c4c7beb.tar.gz
use fixed types for the calls to ed_pio_readmem, ed_pio_writemem.
Make the special hp versions match the general ones. Also use fixed types in the WD80x3_generic probe, and change callers' arrays to match. Fix a couple of minor style issues by using newstyle function definitions in a couple places.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ed/if_ed.c45
-rw-r--r--sys/dev/ed/if_ed_cbus.c2
-rw-r--r--sys/dev/ed/if_edvar.h6
3 files changed, 18 insertions, 35 deletions
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c
index 10385f4..a8bb266 100644
--- a/sys/dev/ed/if_ed.c
+++ b/sys/dev/ed/if_ed.c
@@ -93,20 +93,19 @@ static __inline void ed_xmit (struct ed_softc *);
static __inline char * ed_ring_copy(struct ed_softc *, char *, char *,
/* u_short */ int);
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_writemem (struct ed_softc *, unsigned char *,
- /* u_short */ int, /* u_short */ int);
+static void ed_hpp_readmem(struct ed_softc *, long, uint8_t *, uint16_t);
+static void ed_hpp_writemem(struct ed_softc *, uint8_t *, uint16_t,
+ uint16_t);
static u_short ed_hpp_write_mbufs(struct ed_softc *, struct mbuf *, int);
static u_short ed_pio_write_mbufs(struct ed_softc *, struct mbuf *, long);
-static void ed_setrcr (struct ed_softc *);
+static void ed_setrcr(struct ed_softc *);
/*
* Interrupt conversion table for WD/SMC ASIC/83C584
*/
-static unsigned short ed_intr_val[] = {
+static uint16_t ed_intr_val[] = {
9,
3,
5,
@@ -120,7 +119,7 @@ static unsigned short ed_intr_val[] = {
/*
* Interrupt conversion table for 83C790
*/
-static unsigned short ed_790_intr_val[] = {
+static uint16_t ed_790_intr_val[] = {
0,
9,
3,
@@ -135,7 +134,7 @@ static unsigned short ed_790_intr_val[] = {
* Interrupt conversion table for the HP PC LAN+
*/
-static unsigned short ed_hpp_intr_val[] = {
+static uint16_t ed_hpp_intr_val[] = {
0, /* 0 */
0, /* 1 */
0, /* 2 */
@@ -609,7 +608,7 @@ ed_probe_WD80x3(dev, port_rid, flags)
{
struct ed_softc *sc = device_get_softc(dev);
int error;
- static unsigned short *intr_vals[] = {ed_intr_val, ed_790_intr_val};
+ static uint16_t *intr_vals[] = {ed_intr_val, ed_790_intr_val};
error = ed_alloc_port(dev, port_rid, ED_WD_IO_PORTS);
if (error)
@@ -1291,8 +1290,8 @@ ed_probe_HP_pclanp(dev, port_rid, flags)
int memsize; /* mem on board */
u_char checksum; /* checksum of board address */
u_char irq; /* board configured IRQ */
- char test_pattern[ED_HPP_TEST_SIZE]; /* read/write areas for */
- char test_buffer[ED_HPP_TEST_SIZE]; /* probing card */
+ uint8_t test_pattern[ED_HPP_TEST_SIZE]; /* read/write areas for */
+ uint8_t test_buffer[ED_HPP_TEST_SIZE]; /* probing card */
u_long conf_maddr, conf_msize, conf_irq, junk;
error = ed_alloc_port(dev, 0, ED_HPP_IO_PORTS);
@@ -2855,11 +2854,7 @@ ed_get_packet(sc, buf, len)
* This routine is currently Novell-specific.
*/
void
-ed_pio_readmem(sc, src, dst, amount)
- struct ed_softc *sc;
- long src;
- unsigned char *dst;
- unsigned short amount;
+ed_pio_readmem(struct ed_softc *sc, long src, uint8_t *dst, uint16_t amount)
{
/* HP PC Lan+ cards need special handling */
if (sc->vendor == ED_VENDOR_HP && sc->type == ED_TYPE_HP_PCLANPLUS) {
@@ -2898,11 +2893,7 @@ ed_pio_readmem(sc, src, dst, amount)
* 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, uint8_t *src, uint16_t dst, uint16_t len)
{
int maxwait = 200; /* about 240us */
@@ -3070,11 +3061,7 @@ ed_pio_write_mbufs(sc, m, dst)
*/
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, long src, uint8_t *dst, uint16_t amount)
{
int use_32bit_access = !(sc->hpp_id & ED_HPP_ID_16_BIT_ACCESS);
@@ -3173,11 +3160,7 @@ ed_hpp_readmem(sc, src, dst, amount)
* 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, uint8_t *src, uint16_t dst, uint16_t len)
{
/* reset remote DMA complete flag */
ed_nic_outb(sc, ED_P0_ISR, ED_ISR_RDC);
diff --git a/sys/dev/ed/if_ed_cbus.c b/sys/dev/ed/if_ed_cbus.c
index 328c50e..1ca6cdb 100644
--- a/sys/dev/ed/if_ed_cbus.c
+++ b/sys/dev/ed/if_ed_cbus.c
@@ -284,7 +284,7 @@ ed_isa_attach(dev)
/*
* Interrupt conversion table for EtherEZ98
*/
-static unsigned short ed_EZ98_intr_val[] = {
+static uint16_t ed_EZ98_intr_val[] = {
0,
3,
5,
diff --git a/sys/dev/ed/if_edvar.h b/sys/dev/ed/if_edvar.h
index ff693f4..0abc95e 100644
--- a/sys/dev/ed/if_edvar.h
+++ b/sys/dev/ed/if_edvar.h
@@ -197,7 +197,7 @@ int ed_alloc_irq(device_t, int, int);
int ed_probe_generic8390(struct ed_softc *);
int ed_probe_WD80x3(device_t, int, int);
-int ed_probe_WD80x3_generic(device_t, int, unsigned short *[]);
+int ed_probe_WD80x3_generic(device_t, int, uint16_t *[]);
int ed_probe_3Com(device_t, int, int);
int ed_probe_SIC(device_t, int, int);
int ed_probe_Novell(device_t, int, int);
@@ -207,8 +207,8 @@ int ed_probe_HP_pclanp(device_t, int, int);
int ed_attach(device_t);
int ed_detach(device_t);
void ed_stop(struct ed_softc *);
-void ed_pio_readmem(struct ed_softc *, long, unsigned char *, unsigned short);
-void ed_pio_writemem(struct ed_softc *, char *, unsigned short, unsigned short);
+void ed_pio_readmem(struct ed_softc *, long, uint8_t *, uint16_t);
+void ed_pio_writemem(struct ed_softc *, uint8_t *, uint16_t, uint16_t);
#ifndef ED_NO_MIIBUS
int ed_miibus_readreg(device_t, int, int);
void ed_miibus_writereg(device_t, int, int, int);
OpenPOWER on IntegriCloud