aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKrzysztof Hałasa <khc@pm.waw.pl>2008-07-02 18:39:46 -0400
committerKrzysztof Hałasa <khc@pm.waw.pl>2008-07-23 17:05:56 -0400
commit867240f7b2a37b1be4ba37d904a9064a96c82099 (patch)
treeb8d659842fa9062aeebcaaa47920c68619beae01 /drivers
parentd507911c3a451986b3501417c78b568f3850b8ef (diff)
WAN: Use u32 type instead of u_int32_t in LMC driver.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wan/lmc/lmc.h11
-rw-r--r--drivers/net/wan/lmc/lmc_debug.c7
-rw-r--r--drivers/net/wan/lmc/lmc_debug.h6
-rw-r--r--drivers/net/wan/lmc/lmc_main.c15
-rw-r--r--drivers/net/wan/lmc/lmc_media.c9
-rw-r--r--drivers/net/wan/lmc/lmc_var.h234
6 files changed, 139 insertions, 143 deletions
diff --git a/drivers/net/wan/lmc/lmc.h b/drivers/net/wan/lmc/lmc.h
index 882e58c1bfd7..4ced7ac16c2c 100644
--- a/drivers/net/wan/lmc/lmc.h
+++ b/drivers/net/wan/lmc/lmc.h
@@ -11,12 +11,12 @@ unsigned lmc_mii_readreg(lmc_softc_t * const sc, unsigned
11 devaddr, unsigned regno); 11 devaddr, unsigned regno);
12void lmc_mii_writereg(lmc_softc_t * const sc, unsigned devaddr, 12void lmc_mii_writereg(lmc_softc_t * const sc, unsigned devaddr,
13 unsigned regno, unsigned data); 13 unsigned regno, unsigned data);
14void lmc_led_on(lmc_softc_t * const, u_int32_t); 14void lmc_led_on(lmc_softc_t * const, u32);
15void lmc_led_off(lmc_softc_t * const, u_int32_t); 15void lmc_led_off(lmc_softc_t * const, u32);
16unsigned lmc_mii_readreg(lmc_softc_t * const, unsigned, unsigned); 16unsigned lmc_mii_readreg(lmc_softc_t * const, unsigned, unsigned);
17void lmc_mii_writereg(lmc_softc_t * const, unsigned, unsigned, unsigned); 17void lmc_mii_writereg(lmc_softc_t * const, unsigned, unsigned, unsigned);
18void lmc_gpio_mkinput(lmc_softc_t * const sc, u_int32_t bits); 18void lmc_gpio_mkinput(lmc_softc_t * const sc, u32 bits);
19void lmc_gpio_mkoutput(lmc_softc_t * const sc, u_int32_t bits); 19void lmc_gpio_mkoutput(lmc_softc_t * const sc, u32 bits);
20 20
21int lmc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); 21int lmc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
22 22
@@ -26,8 +26,7 @@ extern lmc_media_t lmc_t1_media;
26extern lmc_media_t lmc_hssi_media; 26extern lmc_media_t lmc_hssi_media;
27 27
28#ifdef _DBG_EVENTLOG 28#ifdef _DBG_EVENTLOG
29static void lmcEventLog( u_int32_t EventNum, u_int32_t arg2, u_int32_t arg3 ); 29static void lmcEventLog(u32 EventNum, u32 arg2, u32 arg3);
30#endif 30#endif
31 31
32#endif 32#endif
33
diff --git a/drivers/net/wan/lmc/lmc_debug.c b/drivers/net/wan/lmc/lmc_debug.c
index 3b94352b0d03..15049d711f47 100644
--- a/drivers/net/wan/lmc/lmc_debug.c
+++ b/drivers/net/wan/lmc/lmc_debug.c
@@ -1,4 +1,3 @@
1
2#include <linux/types.h> 1#include <linux/types.h>
3#include <linux/netdevice.h> 2#include <linux/netdevice.h>
4#include <linux/interrupt.h> 3#include <linux/interrupt.h>
@@ -48,10 +47,10 @@ void lmcConsoleLog(char *type, unsigned char *ucData, int iLen)
48#endif 47#endif
49 48
50#ifdef DEBUG 49#ifdef DEBUG
51u_int32_t lmcEventLogIndex = 0; 50u32 lmcEventLogIndex;
52u_int32_t lmcEventLogBuf[LMC_EVENTLOGSIZE * LMC_EVENTLOGARGS]; 51u32 lmcEventLogBuf[LMC_EVENTLOGSIZE * LMC_EVENTLOGARGS];
53 52
54void lmcEventLog (u_int32_t EventNum, u_int32_t arg2, u_int32_t arg3) 53void lmcEventLog(u32 EventNum, u32 arg2, u32 arg3)
55{ 54{
56 lmcEventLogBuf[lmcEventLogIndex++] = EventNum; 55 lmcEventLogBuf[lmcEventLogIndex++] = EventNum;
57 lmcEventLogBuf[lmcEventLogIndex++] = arg2; 56 lmcEventLogBuf[lmcEventLogIndex++] = arg2;
diff --git a/drivers/net/wan/lmc/lmc_debug.h b/drivers/net/wan/lmc/lmc_debug.h
index cf3563859bf3..2d46f121549f 100644
--- a/drivers/net/wan/lmc/lmc_debug.h
+++ b/drivers/net/wan/lmc/lmc_debug.h
@@ -38,15 +38,15 @@
38 38
39 39
40#ifdef DEBUG 40#ifdef DEBUG
41extern u_int32_t lmcEventLogIndex; 41extern u32 lmcEventLogIndex;
42extern u_int32_t lmcEventLogBuf[LMC_EVENTLOGSIZE * LMC_EVENTLOGARGS]; 42extern u32 lmcEventLogBuf[LMC_EVENTLOGSIZE * LMC_EVENTLOGARGS];
43#define LMC_EVENT_LOG(x, y, z) lmcEventLog((x), (y), (z)) 43#define LMC_EVENT_LOG(x, y, z) lmcEventLog((x), (y), (z))
44#else 44#else
45#define LMC_EVENT_LOG(x,y,z) 45#define LMC_EVENT_LOG(x,y,z)
46#endif /* end ifdef _DBG_EVENTLOG */ 46#endif /* end ifdef _DBG_EVENTLOG */
47 47
48void lmcConsoleLog(char *type, unsigned char *ucData, int iLen); 48void lmcConsoleLog(char *type, unsigned char *ucData, int iLen);
49void lmcEventLog (u_int32_t EventNum, u_int32_t arg2, u_int32_t arg3); 49void lmcEventLog(u32 EventNum, u32 arg2, u32 arg3);
50void lmc_trace(struct net_device *dev, char *msg); 50void lmc_trace(struct net_device *dev, char *msg);
51 51
52#endif 52#endif
diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c
index f64f4ca80b55..f80640f5a744 100644
--- a/drivers/net/wan/lmc/lmc_main.c
+++ b/drivers/net/wan/lmc/lmc_main.c
@@ -310,7 +310,8 @@ int lmc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/
310 ret = -EFAULT; 310 ret = -EFAULT;
311 break; 311 break;
312 } 312 }
313 if (copy_to_user(ifr->ifr_data + sizeof (u32), lmcEventLogBuf, sizeof (lmcEventLogBuf))) 313 if (copy_to_user(ifr->ifr_data + sizeof(u32), lmcEventLogBuf,
314 sizeof(lmcEventLogBuf)))
314 ret = -EFAULT; 315 ret = -EFAULT;
315 else 316 else
316 ret = 0; 317 ret = 0;
@@ -624,7 +625,7 @@ static void lmc_watchdog (unsigned long data) /*fold00*/
624 struct net_device *dev = (struct net_device *)data; 625 struct net_device *dev = (struct net_device *)data;
625 lmc_softc_t *sc = dev_to_sc(dev); 626 lmc_softc_t *sc = dev_to_sc(dev);
626 int link_status; 627 int link_status;
627 u_int32_t ticks; 628 u32 ticks;
628 unsigned long flags; 629 unsigned long flags;
629 630
630 lmc_trace(dev, "lmc_watchdog in"); 631 lmc_trace(dev, "lmc_watchdog in");
@@ -1899,7 +1900,7 @@ static void lmc_softreset (lmc_softc_t * const sc) /*fold00*/
1899 lmc_trace(sc->lmc_device, "lmc_softreset out"); 1900 lmc_trace(sc->lmc_device, "lmc_softreset out");
1900} 1901}
1901 1902
1902void lmc_gpio_mkinput(lmc_softc_t * const sc, u_int32_t bits) /*fold00*/ 1903void lmc_gpio_mkinput(lmc_softc_t * const sc, u32 bits) /*fold00*/
1903{ 1904{
1904 lmc_trace(sc->lmc_device, "lmc_gpio_mkinput in"); 1905 lmc_trace(sc->lmc_device, "lmc_gpio_mkinput in");
1905 sc->lmc_gpio_io &= ~bits; 1906 sc->lmc_gpio_io &= ~bits;
@@ -1907,7 +1908,7 @@ void lmc_gpio_mkinput(lmc_softc_t * const sc, u_int32_t bits) /*fold00*/
1907 lmc_trace(sc->lmc_device, "lmc_gpio_mkinput out"); 1908 lmc_trace(sc->lmc_device, "lmc_gpio_mkinput out");
1908} 1909}
1909 1910
1910void lmc_gpio_mkoutput(lmc_softc_t * const sc, u_int32_t bits) /*fold00*/ 1911void lmc_gpio_mkoutput(lmc_softc_t * const sc, u32 bits) /*fold00*/
1911{ 1912{
1912 lmc_trace(sc->lmc_device, "lmc_gpio_mkoutput in"); 1913 lmc_trace(sc->lmc_device, "lmc_gpio_mkoutput in");
1913 sc->lmc_gpio_io |= bits; 1914 sc->lmc_gpio_io |= bits;
@@ -1915,7 +1916,7 @@ void lmc_gpio_mkoutput(lmc_softc_t * const sc, u_int32_t bits) /*fold00*/
1915 lmc_trace(sc->lmc_device, "lmc_gpio_mkoutput out"); 1916 lmc_trace(sc->lmc_device, "lmc_gpio_mkoutput out");
1916} 1917}
1917 1918
1918void lmc_led_on(lmc_softc_t * const sc, u_int32_t led) /*fold00*/ 1919void lmc_led_on(lmc_softc_t * const sc, u32 led) /*fold00*/
1919{ 1920{
1920 lmc_trace(sc->lmc_device, "lmc_led_on in"); 1921 lmc_trace(sc->lmc_device, "lmc_led_on in");
1921 if((~sc->lmc_miireg16) & led){ /* Already on! */ 1922 if((~sc->lmc_miireg16) & led){ /* Already on! */
@@ -1928,7 +1929,7 @@ void lmc_led_on(lmc_softc_t * const sc, u_int32_t led) /*fold00*/
1928 lmc_trace(sc->lmc_device, "lmc_led_on out"); 1929 lmc_trace(sc->lmc_device, "lmc_led_on out");
1929} 1930}
1930 1931
1931void lmc_led_off(lmc_softc_t * const sc, u_int32_t led) /*fold00*/ 1932void lmc_led_off(lmc_softc_t * const sc, u32 led) /*fold00*/
1932{ 1933{
1933 lmc_trace(sc->lmc_device, "lmc_led_off in"); 1934 lmc_trace(sc->lmc_device, "lmc_led_off in");
1934 if(sc->lmc_miireg16 & led){ /* Already set don't do anything */ 1935 if(sc->lmc_miireg16 & led){ /* Already set don't do anything */
@@ -1984,7 +1985,7 @@ static void lmc_reset(lmc_softc_t * const sc) /*fold00*/
1984 1985
1985static void lmc_dec_reset(lmc_softc_t * const sc) /*fold00*/ 1986static void lmc_dec_reset(lmc_softc_t * const sc) /*fold00*/
1986{ 1987{
1987 u_int32_t val; 1988 u32 val;
1988 lmc_trace(sc->lmc_device, "lmc_dec_reset in"); 1989 lmc_trace(sc->lmc_device, "lmc_dec_reset in");
1989 1990
1990 /* 1991 /*
diff --git a/drivers/net/wan/lmc/lmc_media.c b/drivers/net/wan/lmc/lmc_media.c
index 2e0711a956cc..f327674fc93a 100644
--- a/drivers/net/wan/lmc/lmc_media.c
+++ b/drivers/net/wan/lmc/lmc_media.c
@@ -93,8 +93,7 @@ static void lmc_dummy_set_1 (lmc_softc_t * const, int);
93static void lmc_dummy_set2_1 (lmc_softc_t * const, lmc_ctl_t *); 93static void lmc_dummy_set2_1 (lmc_softc_t * const, lmc_ctl_t *);
94 94
95static inline void write_av9110_bit (lmc_softc_t *, int); 95static inline void write_av9110_bit (lmc_softc_t *, int);
96static void write_av9110 (lmc_softc_t *, u_int32_t, u_int32_t, u_int32_t, 96static void write_av9110(lmc_softc_t *, u32, u32, u32, u32, u32);
97 u_int32_t, u_int32_t);
98 97
99lmc_media_t lmc_ds3_media = { 98lmc_media_t lmc_ds3_media = {
100 lmc_ds3_init, /* special media init stuff */ 99 lmc_ds3_init, /* special media init stuff */
@@ -679,7 +678,7 @@ static int
679lmc_ssi_get_link_status (lmc_softc_t * const sc) 678lmc_ssi_get_link_status (lmc_softc_t * const sc)
680{ 679{
681 u16 link_status; 680 u16 link_status;
682 u_int32_t ticks; 681 u32 ticks;
683 int ret = 1; 682 int ret = 1;
684 int hw_hdsk = 1; 683 int hw_hdsk = 1;
685 684
@@ -835,9 +834,7 @@ write_av9110_bit (lmc_softc_t * sc, int c)
835 LMC_CSR_WRITE (sc, csr_gp, sc->lmc_gpio); 834 LMC_CSR_WRITE (sc, csr_gp, sc->lmc_gpio);
836} 835}
837 836
838static void 837static void write_av9110(lmc_softc_t *sc, u32 n, u32 m, u32 v, u32 x, u32 r)
839write_av9110 (lmc_softc_t * sc, u_int32_t n, u_int32_t m, u_int32_t v,
840 u_int32_t x, u_int32_t r)
841{ 838{
842 int i; 839 int i;
843 840
diff --git a/drivers/net/wan/lmc/lmc_var.h b/drivers/net/wan/lmc/lmc_var.h
index 52e044209d50..65d01978e784 100644
--- a/drivers/net/wan/lmc/lmc_var.h
+++ b/drivers/net/wan/lmc/lmc_var.h
@@ -100,45 +100,45 @@ struct lmc_regfile_t {
100 * used to define bits in the second tulip_desc_t field (length) 100 * used to define bits in the second tulip_desc_t field (length)
101 * for the transmit descriptor -baz */ 101 * for the transmit descriptor -baz */
102 102
103#define LMC_TDES_FIRST_BUFFER_SIZE ((u_int32_t)(0x000007FF)) 103#define LMC_TDES_FIRST_BUFFER_SIZE ((u32)(0x000007FF))
104#define LMC_TDES_SECOND_BUFFER_SIZE ((u_int32_t)(0x003FF800)) 104#define LMC_TDES_SECOND_BUFFER_SIZE ((u32)(0x003FF800))
105#define LMC_TDES_HASH_FILTERING ((u_int32_t)(0x00400000)) 105#define LMC_TDES_HASH_FILTERING ((u32)(0x00400000))
106#define LMC_TDES_DISABLE_PADDING ((u_int32_t)(0x00800000)) 106#define LMC_TDES_DISABLE_PADDING ((u32)(0x00800000))
107#define LMC_TDES_SECOND_ADDR_CHAINED ((u_int32_t)(0x01000000)) 107#define LMC_TDES_SECOND_ADDR_CHAINED ((u32)(0x01000000))
108#define LMC_TDES_END_OF_RING ((u_int32_t)(0x02000000)) 108#define LMC_TDES_END_OF_RING ((u32)(0x02000000))
109#define LMC_TDES_ADD_CRC_DISABLE ((u_int32_t)(0x04000000)) 109#define LMC_TDES_ADD_CRC_DISABLE ((u32)(0x04000000))
110#define LMC_TDES_SETUP_PACKET ((u_int32_t)(0x08000000)) 110#define LMC_TDES_SETUP_PACKET ((u32)(0x08000000))
111#define LMC_TDES_INVERSE_FILTERING ((u_int32_t)(0x10000000)) 111#define LMC_TDES_INVERSE_FILTERING ((u32)(0x10000000))
112#define LMC_TDES_FIRST_SEGMENT ((u_int32_t)(0x20000000)) 112#define LMC_TDES_FIRST_SEGMENT ((u32)(0x20000000))
113#define LMC_TDES_LAST_SEGMENT ((u_int32_t)(0x40000000)) 113#define LMC_TDES_LAST_SEGMENT ((u32)(0x40000000))
114#define LMC_TDES_INTERRUPT_ON_COMPLETION ((u_int32_t)(0x80000000)) 114#define LMC_TDES_INTERRUPT_ON_COMPLETION ((u32)(0x80000000))
115 115
116#define TDES_SECOND_BUFFER_SIZE_BIT_NUMBER 11 116#define TDES_SECOND_BUFFER_SIZE_BIT_NUMBER 11
117#define TDES_COLLISION_COUNT_BIT_NUMBER 3 117#define TDES_COLLISION_COUNT_BIT_NUMBER 3
118 118
119/* Constants for the RCV descriptor RDES */ 119/* Constants for the RCV descriptor RDES */
120 120
121#define LMC_RDES_OVERFLOW ((u_int32_t)(0x00000001)) 121#define LMC_RDES_OVERFLOW ((u32)(0x00000001))
122#define LMC_RDES_CRC_ERROR ((u_int32_t)(0x00000002)) 122#define LMC_RDES_CRC_ERROR ((u32)(0x00000002))
123#define LMC_RDES_DRIBBLING_BIT ((u_int32_t)(0x00000004)) 123#define LMC_RDES_DRIBBLING_BIT ((u32)(0x00000004))
124#define LMC_RDES_REPORT_ON_MII_ERR ((u_int32_t)(0x00000008)) 124#define LMC_RDES_REPORT_ON_MII_ERR ((u32)(0x00000008))
125#define LMC_RDES_RCV_WATCHDOG_TIMEOUT ((u_int32_t)(0x00000010)) 125#define LMC_RDES_RCV_WATCHDOG_TIMEOUT ((u32)(0x00000010))
126#define LMC_RDES_FRAME_TYPE ((u_int32_t)(0x00000020)) 126#define LMC_RDES_FRAME_TYPE ((u32)(0x00000020))
127#define LMC_RDES_COLLISION_SEEN ((u_int32_t)(0x00000040)) 127#define LMC_RDES_COLLISION_SEEN ((u32)(0x00000040))
128#define LMC_RDES_FRAME_TOO_LONG ((u_int32_t)(0x00000080)) 128#define LMC_RDES_FRAME_TOO_LONG ((u32)(0x00000080))
129#define LMC_RDES_LAST_DESCRIPTOR ((u_int32_t)(0x00000100)) 129#define LMC_RDES_LAST_DESCRIPTOR ((u32)(0x00000100))
130#define LMC_RDES_FIRST_DESCRIPTOR ((u_int32_t)(0x00000200)) 130#define LMC_RDES_FIRST_DESCRIPTOR ((u32)(0x00000200))
131#define LMC_RDES_MULTICAST_FRAME ((u_int32_t)(0x00000400)) 131#define LMC_RDES_MULTICAST_FRAME ((u32)(0x00000400))
132#define LMC_RDES_RUNT_FRAME ((u_int32_t)(0x00000800)) 132#define LMC_RDES_RUNT_FRAME ((u32)(0x00000800))
133#define LMC_RDES_DATA_TYPE ((u_int32_t)(0x00003000)) 133#define LMC_RDES_DATA_TYPE ((u32)(0x00003000))
134#define LMC_RDES_LENGTH_ERROR ((u_int32_t)(0x00004000)) 134#define LMC_RDES_LENGTH_ERROR ((u32)(0x00004000))
135#define LMC_RDES_ERROR_SUMMARY ((u_int32_t)(0x00008000)) 135#define LMC_RDES_ERROR_SUMMARY ((u32)(0x00008000))
136#define LMC_RDES_FRAME_LENGTH ((u_int32_t)(0x3FFF0000)) 136#define LMC_RDES_FRAME_LENGTH ((u32)(0x3FFF0000))
137#define LMC_RDES_OWN_BIT ((u_int32_t)(0x80000000)) 137#define LMC_RDES_OWN_BIT ((u32)(0x80000000))
138 138
139#define RDES_FRAME_LENGTH_BIT_NUMBER 16 139#define RDES_FRAME_LENGTH_BIT_NUMBER 16
140 140
141#define LMC_RDES_ERROR_MASK ( (u_int32_t)( \ 141#define LMC_RDES_ERROR_MASK ( (u32)( \
142 LMC_RDES_OVERFLOW \ 142 LMC_RDES_OVERFLOW \
143 | LMC_RDES_DRIBBLING_BIT \ 143 | LMC_RDES_DRIBBLING_BIT \
144 | LMC_RDES_REPORT_ON_MII_ERR \ 144 | LMC_RDES_REPORT_ON_MII_ERR \
@@ -150,32 +150,32 @@ struct lmc_regfile_t {
150 */ 150 */
151 151
152typedef struct { 152typedef struct {
153 u_int32_t n; 153 u32 n;
154 u_int32_t m; 154 u32 m;
155 u_int32_t v; 155 u32 v;
156 u_int32_t x; 156 u32 x;
157 u_int32_t r; 157 u32 r;
158 u_int32_t f; 158 u32 f;
159 u_int32_t exact; 159 u32 exact;
160} lmc_av9110_t; 160} lmc_av9110_t;
161 161
162/* 162/*
163 * Common structure passed to the ioctl code. 163 * Common structure passed to the ioctl code.
164 */ 164 */
165struct lmc___ctl { 165struct lmc___ctl {
166 u_int32_t cardtype; 166 u32 cardtype;
167 u_int32_t clock_source; /* HSSI, T1 */ 167 u32 clock_source; /* HSSI, T1 */
168 u_int32_t clock_rate; /* T1 */ 168 u32 clock_rate; /* T1 */
169 u_int32_t crc_length; 169 u32 crc_length;
170 u_int32_t cable_length; /* DS3 */ 170 u32 cable_length; /* DS3 */
171 u_int32_t scrambler_onoff; /* DS3 */ 171 u32 scrambler_onoff; /* DS3 */
172 u_int32_t cable_type; /* T1 */ 172 u32 cable_type; /* T1 */
173 u_int32_t keepalive_onoff; /* protocol */ 173 u32 keepalive_onoff; /* protocol */
174 u_int32_t ticks; /* ticks/sec */ 174 u32 ticks; /* ticks/sec */
175 union { 175 union {
176 lmc_av9110_t ssi; 176 lmc_av9110_t ssi;
177 } cardspec; 177 } cardspec;
178 u_int32_t circuit_type; /* T1 or E1 */ 178 u32 circuit_type; /* T1 or E1 */
179}; 179};
180 180
181 181
@@ -224,52 +224,52 @@ struct lmc___media {
224 224
225struct lmc_extra_statistics 225struct lmc_extra_statistics
226{ 226{
227 u_int32_t version_size; 227 u32 version_size;
228 u_int32_t lmc_cardtype; 228 u32 lmc_cardtype;
229 229
230 u_int32_t tx_ProcTimeout; 230 u32 tx_ProcTimeout;
231 u_int32_t tx_IntTimeout; 231 u32 tx_IntTimeout;
232 u_int32_t tx_NoCompleteCnt; 232 u32 tx_NoCompleteCnt;
233 u_int32_t tx_MaxXmtsB4Int; 233 u32 tx_MaxXmtsB4Int;
234 u_int32_t tx_TimeoutCnt; 234 u32 tx_TimeoutCnt;
235 u_int32_t tx_OutOfSyncPtr; 235 u32 tx_OutOfSyncPtr;
236 u_int32_t tx_tbusy0; 236 u32 tx_tbusy0;
237 u_int32_t tx_tbusy1; 237 u32 tx_tbusy1;
238 u_int32_t tx_tbusy_calls; 238 u32 tx_tbusy_calls;
239 u_int32_t resetCount; 239 u32 resetCount;
240 u_int32_t lmc_txfull; 240 u32 lmc_txfull;
241 u_int32_t tbusy; 241 u32 tbusy;
242 u_int32_t dirtyTx; 242 u32 dirtyTx;
243 u_int32_t lmc_next_tx; 243 u32 lmc_next_tx;
244 u_int32_t otherTypeCnt; 244 u32 otherTypeCnt;
245 u_int32_t lastType; 245 u32 lastType;
246 u_int32_t lastTypeOK; 246 u32 lastTypeOK;
247 u_int32_t txLoopCnt; 247 u32 txLoopCnt;
248 u_int32_t usedXmtDescripCnt; 248 u32 usedXmtDescripCnt;
249 u_int32_t txIndexCnt; 249 u32 txIndexCnt;
250 u_int32_t rxIntLoopCnt; 250 u32 rxIntLoopCnt;
251 251
252 u_int32_t rx_SmallPktCnt; 252 u32 rx_SmallPktCnt;
253 u_int32_t rx_BadPktSurgeCnt; 253 u32 rx_BadPktSurgeCnt;
254 u_int32_t rx_BuffAllocErr; 254 u32 rx_BuffAllocErr;
255 u_int32_t tx_lossOfClockCnt; 255 u32 tx_lossOfClockCnt;
256 256
257 /* T1 error counters */ 257 /* T1 error counters */
258 u_int32_t framingBitErrorCount; 258 u32 framingBitErrorCount;
259 u_int32_t lineCodeViolationCount; 259 u32 lineCodeViolationCount;
260 260
261 u_int32_t lossOfFrameCount; 261 u32 lossOfFrameCount;
262 u_int32_t changeOfFrameAlignmentCount; 262 u32 changeOfFrameAlignmentCount;
263 u_int32_t severelyErroredFrameCount; 263 u32 severelyErroredFrameCount;
264 264
265 u_int32_t check; 265 u32 check;
266}; 266};
267 267
268typedef struct lmc_xinfo { 268typedef struct lmc_xinfo {
269 u_int32_t Magic0; /* BEEFCAFE */ 269 u32 Magic0; /* BEEFCAFE */
270 270
271 u_int32_t PciCardType; 271 u32 PciCardType;
272 u_int32_t PciSlotNumber; /* PCI slot number */ 272 u32 PciSlotNumber; /* PCI slot number */
273 273
274 u16 DriverMajorVersion; 274 u16 DriverMajorVersion;
275 u16 DriverMinorVersion; 275 u16 DriverMinorVersion;
@@ -282,9 +282,9 @@ typedef struct lmc_xinfo {
282 u16 t1_alarm2_status; 282 u16 t1_alarm2_status;
283 283
284 int link_status; 284 int link_status;
285 u_int32_t mii_reg16; 285 u32 mii_reg16;
286 286
287 u_int32_t Magic1; /* DEADBEEF */ 287 u32 Magic1; /* DEADBEEF */
288} LMC_XINFO; 288} LMC_XINFO;
289 289
290 290
@@ -298,16 +298,16 @@ struct lmc___softc {
298 struct net_device *lmc_device; 298 struct net_device *lmc_device;
299 299
300 int hang, rxdesc, bad_packet, some_counter; 300 int hang, rxdesc, bad_packet, some_counter;
301 u_int32_t txgo; 301 u32 txgo;
302 struct lmc_regfile_t lmc_csrs; 302 struct lmc_regfile_t lmc_csrs;
303 volatile u_int32_t lmc_txtick; 303 volatile u32 lmc_txtick;
304 volatile u_int32_t lmc_rxtick; 304 volatile u32 lmc_rxtick;
305 u_int32_t lmc_flags; 305 u32 lmc_flags;
306 u_int32_t lmc_intrmask; /* our copy of csr_intr */ 306 u32 lmc_intrmask; /* our copy of csr_intr */
307 u_int32_t lmc_cmdmode; /* our copy of csr_cmdmode */ 307 u32 lmc_cmdmode; /* our copy of csr_cmdmode */
308 u_int32_t lmc_busmode; /* our copy of csr_busmode */ 308 u32 lmc_busmode; /* our copy of csr_busmode */
309 u_int32_t lmc_gpio_io; /* state of in/out settings */ 309 u32 lmc_gpio_io; /* state of in/out settings */
310 u_int32_t lmc_gpio; /* state of outputs */ 310 u32 lmc_gpio; /* state of outputs */
311 struct sk_buff* lmc_txq[LMC_TXDESCS]; 311 struct sk_buff* lmc_txq[LMC_TXDESCS];
312 struct sk_buff* lmc_rxq[LMC_RXDESCS]; 312 struct sk_buff* lmc_rxq[LMC_RXDESCS];
313 volatile 313 volatile
@@ -323,37 +323,37 @@ struct lmc___softc {
323 int lmc_ok; 323 int lmc_ok;
324 int last_link_status; 324 int last_link_status;
325 int lmc_cardtype; 325 int lmc_cardtype;
326 u_int32_t last_frameerr; 326 u32 last_frameerr;
327 lmc_media_t *lmc_media; 327 lmc_media_t *lmc_media;
328 struct timer_list timer; 328 struct timer_list timer;
329 lmc_ctl_t ictl; 329 lmc_ctl_t ictl;
330 u_int32_t TxDescriptControlInit; 330 u32 TxDescriptControlInit;
331 331
332 int tx_TimeoutInd; /* additional driver state */ 332 int tx_TimeoutInd; /* additional driver state */
333 int tx_TimeoutDisplay; 333 int tx_TimeoutDisplay;
334 unsigned int lastlmc_taint_tx; 334 unsigned int lastlmc_taint_tx;
335 int lasttx_packets; 335 int lasttx_packets;
336 u_int32_t tx_clockState; 336 u32 tx_clockState;
337 u_int32_t lmc_crcSize; 337 u32 lmc_crcSize;
338 LMC_XINFO lmc_xinfo; 338 LMC_XINFO lmc_xinfo;
339 char lmc_yel, lmc_blue, lmc_red; /* for T1 and DS3 */ 339 char lmc_yel, lmc_blue, lmc_red; /* for T1 and DS3 */
340 char lmc_timing; /* for HSSI and SSI */ 340 char lmc_timing; /* for HSSI and SSI */
341 int got_irq; 341 int got_irq;
342 342
343 char last_led_err[4]; 343 char last_led_err[4];
344 344
345 u32 last_int; 345 u32 last_int;
346 u32 num_int; 346 u32 num_int;
347 347
348 spinlock_t lmc_lock; 348 spinlock_t lmc_lock;
349 u16 if_type; /* HDLC/PPP or NET */ 349 u16 if_type; /* HDLC/PPP or NET */
350 350
351 /* Failure cases */ 351 /* Failure cases */
352 u8 failed_ring; 352 u8 failed_ring;
353 u8 failed_recv_alloc; 353 u8 failed_recv_alloc;
354 354
355 /* Structure check */ 355 /* Structure check */
356 u32 check; 356 u32 check;
357}; 357};
358 358
359#define LMC_PCI_TIME 1 359#define LMC_PCI_TIME 1
@@ -449,8 +449,8 @@ struct lmc___softc {
449 | TULIP_STS_TXUNDERFLOW\ 449 | TULIP_STS_TXUNDERFLOW\
450 | TULIP_STS_RXSTOPPED ) 450 | TULIP_STS_RXSTOPPED )
451 451
452#define DESC_OWNED_BY_SYSTEM ((u_int32_t)(0x00000000)) 452#define DESC_OWNED_BY_SYSTEM ((u32)(0x00000000))
453#define DESC_OWNED_BY_DC21X4 ((u_int32_t)(0x80000000)) 453#define DESC_OWNED_BY_DC21X4 ((u32)(0x80000000))
454 454
455#ifndef TULIP_CMD_RECEIVEALL 455#ifndef TULIP_CMD_RECEIVEALL
456#define TULIP_CMD_RECEIVEALL 0x40000000L 456#define TULIP_CMD_RECEIVEALL 0x40000000L