Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
867240f7
Commit
867240f7
authored
Jul 03, 2008
by
Krzysztof Hałasa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WAN: Use u32 type instead of u_int32_t in LMC driver.
Signed-off-by:
Krzysztof Hałasa
<
khc@pm.waw.pl
>
parent
d507911c
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
139 additions
and
143 deletions
+139
-143
drivers/net/wan/lmc/lmc.h
drivers/net/wan/lmc/lmc.h
+5
-6
drivers/net/wan/lmc/lmc_debug.c
drivers/net/wan/lmc/lmc_debug.c
+3
-4
drivers/net/wan/lmc/lmc_debug.h
drivers/net/wan/lmc/lmc_debug.h
+3
-3
drivers/net/wan/lmc/lmc_main.c
drivers/net/wan/lmc/lmc_main.c
+8
-7
drivers/net/wan/lmc/lmc_media.c
drivers/net/wan/lmc/lmc_media.c
+3
-6
drivers/net/wan/lmc/lmc_var.h
drivers/net/wan/lmc/lmc_var.h
+117
-117
No files found.
drivers/net/wan/lmc/lmc.h
View file @
867240f7
...
...
@@ -11,12 +11,12 @@ unsigned lmc_mii_readreg(lmc_softc_t * const sc, unsigned
devaddr
,
unsigned
regno
);
void
lmc_mii_writereg
(
lmc_softc_t
*
const
sc
,
unsigned
devaddr
,
unsigned
regno
,
unsigned
data
);
void
lmc_led_on
(
lmc_softc_t
*
const
,
u
_int32_t
);
void
lmc_led_off
(
lmc_softc_t
*
const
,
u
_int32_t
);
void
lmc_led_on
(
lmc_softc_t
*
const
,
u
32
);
void
lmc_led_off
(
lmc_softc_t
*
const
,
u
32
);
unsigned
lmc_mii_readreg
(
lmc_softc_t
*
const
,
unsigned
,
unsigned
);
void
lmc_mii_writereg
(
lmc_softc_t
*
const
,
unsigned
,
unsigned
,
unsigned
);
void
lmc_gpio_mkinput
(
lmc_softc_t
*
const
sc
,
u
_int32_t
bits
);
void
lmc_gpio_mkoutput
(
lmc_softc_t
*
const
sc
,
u
_int32_t
bits
);
void
lmc_gpio_mkinput
(
lmc_softc_t
*
const
sc
,
u
32
bits
);
void
lmc_gpio_mkoutput
(
lmc_softc_t
*
const
sc
,
u
32
bits
);
int
lmc_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
ifr
,
int
cmd
);
...
...
@@ -26,8 +26,7 @@ extern lmc_media_t lmc_t1_media;
extern
lmc_media_t
lmc_hssi_media
;
#ifdef _DBG_EVENTLOG
static
void
lmcEventLog
(
u_int32_t
EventNum
,
u_int32_t
arg2
,
u_int32_t
arg3
);
static
void
lmcEventLog
(
u32
EventNum
,
u32
arg2
,
u32
arg3
);
#endif
#endif
drivers/net/wan/lmc/lmc_debug.c
View file @
867240f7
#include <linux/types.h>
#include <linux/netdevice.h>
#include <linux/interrupt.h>
...
...
@@ -48,10 +47,10 @@ void lmcConsoleLog(char *type, unsigned char *ucData, int iLen)
#endif
#ifdef DEBUG
u
_int32_t
lmcEventLogIndex
=
0
;
u
_int32_t
lmcEventLogBuf
[
LMC_EVENTLOGSIZE
*
LMC_EVENTLOGARGS
];
u
32
lmcEventLogIndex
;
u
32
lmcEventLogBuf
[
LMC_EVENTLOGSIZE
*
LMC_EVENTLOGARGS
];
void
lmcEventLog
(
u_int32_t
EventNum
,
u_int32_t
arg2
,
u_int32_t
arg3
)
void
lmcEventLog
(
u32
EventNum
,
u32
arg2
,
u32
arg3
)
{
lmcEventLogBuf
[
lmcEventLogIndex
++
]
=
EventNum
;
lmcEventLogBuf
[
lmcEventLogIndex
++
]
=
arg2
;
...
...
drivers/net/wan/lmc/lmc_debug.h
View file @
867240f7
...
...
@@ -38,15 +38,15 @@
#ifdef DEBUG
extern
u
_int32_t
lmcEventLogIndex
;
extern
u
_int32_t
lmcEventLogBuf
[
LMC_EVENTLOGSIZE
*
LMC_EVENTLOGARGS
];
extern
u
32
lmcEventLogIndex
;
extern
u
32
lmcEventLogBuf
[
LMC_EVENTLOGSIZE
*
LMC_EVENTLOGARGS
];
#define LMC_EVENT_LOG(x, y, z) lmcEventLog((x), (y), (z))
#else
#define LMC_EVENT_LOG(x,y,z)
#endif
/* end ifdef _DBG_EVENTLOG */
void
lmcConsoleLog
(
char
*
type
,
unsigned
char
*
ucData
,
int
iLen
);
void
lmcEventLog
(
u_int32_t
EventNum
,
u_int32_t
arg2
,
u_int32_t
arg3
);
void
lmcEventLog
(
u32
EventNum
,
u32
arg2
,
u32
arg3
);
void
lmc_trace
(
struct
net_device
*
dev
,
char
*
msg
);
#endif
drivers/net/wan/lmc/lmc_main.c
View file @
867240f7
...
...
@@ -310,7 +310,8 @@ int lmc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/
ret
=
-
EFAULT
;
break
;
}
if
(
copy_to_user
(
ifr
->
ifr_data
+
sizeof
(
u32
),
lmcEventLogBuf
,
sizeof
(
lmcEventLogBuf
)))
if
(
copy_to_user
(
ifr
->
ifr_data
+
sizeof
(
u32
),
lmcEventLogBuf
,
sizeof
(
lmcEventLogBuf
)))
ret
=
-
EFAULT
;
else
ret
=
0
;
...
...
@@ -624,7 +625,7 @@ static void lmc_watchdog (unsigned long data) /*fold00*/
struct
net_device
*
dev
=
(
struct
net_device
*
)
data
;
lmc_softc_t
*
sc
=
dev_to_sc
(
dev
);
int
link_status
;
u
_int32_t
ticks
;
u
32
ticks
;
unsigned
long
flags
;
lmc_trace
(
dev
,
"lmc_watchdog in"
);
...
...
@@ -1899,7 +1900,7 @@ static void lmc_softreset (lmc_softc_t * const sc) /*fold00*/
lmc_trace
(
sc
->
lmc_device
,
"lmc_softreset out"
);
}
void
lmc_gpio_mkinput
(
lmc_softc_t
*
const
sc
,
u
_int32_t
bits
)
/*fold00*/
void
lmc_gpio_mkinput
(
lmc_softc_t
*
const
sc
,
u
32
bits
)
/*fold00*/
{
lmc_trace
(
sc
->
lmc_device
,
"lmc_gpio_mkinput in"
);
sc
->
lmc_gpio_io
&=
~
bits
;
...
...
@@ -1907,7 +1908,7 @@ void lmc_gpio_mkinput(lmc_softc_t * const sc, u_int32_t bits) /*fold00*/
lmc_trace
(
sc
->
lmc_device
,
"lmc_gpio_mkinput out"
);
}
void
lmc_gpio_mkoutput
(
lmc_softc_t
*
const
sc
,
u
_int32_t
bits
)
/*fold00*/
void
lmc_gpio_mkoutput
(
lmc_softc_t
*
const
sc
,
u
32
bits
)
/*fold00*/
{
lmc_trace
(
sc
->
lmc_device
,
"lmc_gpio_mkoutput in"
);
sc
->
lmc_gpio_io
|=
bits
;
...
...
@@ -1915,7 +1916,7 @@ void lmc_gpio_mkoutput(lmc_softc_t * const sc, u_int32_t bits) /*fold00*/
lmc_trace
(
sc
->
lmc_device
,
"lmc_gpio_mkoutput out"
);
}
void
lmc_led_on
(
lmc_softc_t
*
const
sc
,
u
_int32_t
led
)
/*fold00*/
void
lmc_led_on
(
lmc_softc_t
*
const
sc
,
u
32
led
)
/*fold00*/
{
lmc_trace
(
sc
->
lmc_device
,
"lmc_led_on in"
);
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*/
lmc_trace
(
sc
->
lmc_device
,
"lmc_led_on out"
);
}
void
lmc_led_off
(
lmc_softc_t
*
const
sc
,
u
_int32_t
led
)
/*fold00*/
void
lmc_led_off
(
lmc_softc_t
*
const
sc
,
u
32
led
)
/*fold00*/
{
lmc_trace
(
sc
->
lmc_device
,
"lmc_led_off in"
);
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*/
static
void
lmc_dec_reset
(
lmc_softc_t
*
const
sc
)
/*fold00*/
{
u
_int32_t
val
;
u
32
val
;
lmc_trace
(
sc
->
lmc_device
,
"lmc_dec_reset in"
);
/*
...
...
drivers/net/wan/lmc/lmc_media.c
View file @
867240f7
...
...
@@ -93,8 +93,7 @@ static void lmc_dummy_set_1 (lmc_softc_t * const, int);
static
void
lmc_dummy_set2_1
(
lmc_softc_t
*
const
,
lmc_ctl_t
*
);
static
inline
void
write_av9110_bit
(
lmc_softc_t
*
,
int
);
static
void
write_av9110
(
lmc_softc_t
*
,
u_int32_t
,
u_int32_t
,
u_int32_t
,
u_int32_t
,
u_int32_t
);
static
void
write_av9110
(
lmc_softc_t
*
,
u32
,
u32
,
u32
,
u32
,
u32
);
lmc_media_t
lmc_ds3_media
=
{
lmc_ds3_init
,
/* special media init stuff */
...
...
@@ -679,7 +678,7 @@ static int
lmc_ssi_get_link_status
(
lmc_softc_t
*
const
sc
)
{
u16
link_status
;
u
_int32_t
ticks
;
u
32
ticks
;
int
ret
=
1
;
int
hw_hdsk
=
1
;
...
...
@@ -835,9 +834,7 @@ write_av9110_bit (lmc_softc_t * sc, int c)
LMC_CSR_WRITE
(
sc
,
csr_gp
,
sc
->
lmc_gpio
);
}
static
void
write_av9110
(
lmc_softc_t
*
sc
,
u_int32_t
n
,
u_int32_t
m
,
u_int32_t
v
,
u_int32_t
x
,
u_int32_t
r
)
static
void
write_av9110
(
lmc_softc_t
*
sc
,
u32
n
,
u32
m
,
u32
v
,
u32
x
,
u32
r
)
{
int
i
;
...
...
drivers/net/wan/lmc/lmc_var.h
View file @
867240f7
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment