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
nexedi
linux
Commits
88f0a524
Commit
88f0a524
authored
Mar 12, 2004
by
Randy Dunlap
Committed by
Jeff Garzik
Mar 12, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] use netdev_priv() in net/pcmcia/ drivers
parent
9fcdb63a
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
70 additions
and
70 deletions
+70
-70
drivers/net/pcmcia/3c574_cs.c
drivers/net/pcmcia/3c574_cs.c
+14
-14
drivers/net/pcmcia/3c589_cs.c
drivers/net/pcmcia/3c589_cs.c
+13
-13
drivers/net/pcmcia/com20020_cs.c
drivers/net/pcmcia/com20020_cs.c
+3
-3
drivers/net/pcmcia/fmvj18x_cs.c
drivers/net/pcmcia/fmvj18x_cs.c
+11
-11
drivers/net/pcmcia/ibmtr_cs.c
drivers/net/pcmcia/ibmtr_cs.c
+4
-4
drivers/net/pcmcia/smc91c92_cs.c
drivers/net/pcmcia/smc91c92_cs.c
+25
-25
No files found.
drivers/net/pcmcia/3c574_cs.c
View file @
88f0a524
...
@@ -283,7 +283,7 @@ static dev_link_t *tc574_attach(void)
...
@@ -283,7 +283,7 @@ static dev_link_t *tc574_attach(void)
dev
=
alloc_etherdev
(
sizeof
(
struct
el3_private
));
dev
=
alloc_etherdev
(
sizeof
(
struct
el3_private
));
if
(
!
dev
)
if
(
!
dev
)
return
NULL
;
return
NULL
;
lp
=
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
link
=
&
lp
->
link
;
link
=
&
lp
->
link
;
link
->
priv
=
dev
;
link
->
priv
=
dev
;
...
@@ -388,7 +388,7 @@ static void tc574_config(dev_link_t *link)
...
@@ -388,7 +388,7 @@ static void tc574_config(dev_link_t *link)
{
{
client_handle_t
handle
=
link
->
handle
;
client_handle_t
handle
=
link
->
handle
;
struct
net_device
*
dev
=
link
->
priv
;
struct
net_device
*
dev
=
link
->
priv
;
struct
el3_private
*
lp
=
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
tuple_t
tuple
;
tuple_t
tuple
;
cisparse_t
parse
;
cisparse_t
parse
;
unsigned
short
buf
[
32
];
unsigned
short
buf
[
32
];
...
@@ -733,7 +733,7 @@ static void mdio_write(ioaddr_t ioaddr, int phy_id, int location, int value)
...
@@ -733,7 +733,7 @@ static void mdio_write(ioaddr_t ioaddr, int phy_id, int location, int value)
/* Reset and restore all of the 3c574 registers. */
/* Reset and restore all of the 3c574 registers. */
static
void
tc574_reset
(
struct
net_device
*
dev
)
static
void
tc574_reset
(
struct
net_device
*
dev
)
{
{
struct
el3_private
*
lp
=
(
struct
el3_private
*
)
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
int
i
,
ioaddr
=
dev
->
base_addr
;
int
i
,
ioaddr
=
dev
->
base_addr
;
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -814,7 +814,7 @@ static void tc574_reset(struct net_device *dev)
...
@@ -814,7 +814,7 @@ static void tc574_reset(struct net_device *dev)
static
int
el3_open
(
struct
net_device
*
dev
)
static
int
el3_open
(
struct
net_device
*
dev
)
{
{
struct
el3_private
*
lp
=
(
struct
el3_private
*
)
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
dev_link_t
*
link
=
&
lp
->
link
;
dev_link_t
*
link
=
&
lp
->
link
;
if
(
!
DEV_OK
(
link
))
if
(
!
DEV_OK
(
link
))
...
@@ -837,7 +837,7 @@ static int el3_open(struct net_device *dev)
...
@@ -837,7 +837,7 @@ static int el3_open(struct net_device *dev)
static
void
el3_tx_timeout
(
struct
net_device
*
dev
)
static
void
el3_tx_timeout
(
struct
net_device
*
dev
)
{
{
struct
el3_private
*
lp
=
(
struct
el3_private
*
)
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
printk
(
KERN_NOTICE
"%s: Transmit timed out!
\n
"
,
dev
->
name
);
printk
(
KERN_NOTICE
"%s: Transmit timed out!
\n
"
,
dev
->
name
);
...
@@ -852,7 +852,7 @@ static void el3_tx_timeout(struct net_device *dev)
...
@@ -852,7 +852,7 @@ static void el3_tx_timeout(struct net_device *dev)
static
void
pop_tx_status
(
struct
net_device
*
dev
)
static
void
pop_tx_status
(
struct
net_device
*
dev
)
{
{
struct
el3_private
*
lp
=
(
struct
el3_private
*
)
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
int
i
;
int
i
;
...
@@ -877,7 +877,7 @@ static void pop_tx_status(struct net_device *dev)
...
@@ -877,7 +877,7 @@ static void pop_tx_status(struct net_device *dev)
static
int
el3_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
static
int
el3_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
{
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
struct
el3_private
*
lp
=
(
struct
el3_private
*
)
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
unsigned
long
flags
;
unsigned
long
flags
;
DEBUG
(
3
,
"%s: el3_start_xmit(length = %ld) called, "
DEBUG
(
3
,
"%s: el3_start_xmit(length = %ld) called, "
...
@@ -909,7 +909,7 @@ static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -909,7 +909,7 @@ static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev)
static
irqreturn_t
el3_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
static
irqreturn_t
el3_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
{
struct
net_device
*
dev
=
(
struct
net_device
*
)
dev_id
;
struct
net_device
*
dev
=
(
struct
net_device
*
)
dev_id
;
struct
el3_private
*
lp
=
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
,
status
;
ioaddr_t
ioaddr
,
status
;
int
work_budget
=
max_interrupt_work
;
int
work_budget
=
max_interrupt_work
;
int
handled
=
0
;
int
handled
=
0
;
...
@@ -1002,7 +1002,7 @@ static irqreturn_t el3_interrupt(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -1002,7 +1002,7 @@ static irqreturn_t el3_interrupt(int irq, void *dev_id, struct pt_regs *regs)
static
void
media_check
(
unsigned
long
arg
)
static
void
media_check
(
unsigned
long
arg
)
{
{
struct
net_device
*
dev
=
(
struct
net_device
*
)
arg
;
struct
net_device
*
dev
=
(
struct
net_device
*
)
arg
;
struct
el3_private
*
lp
=
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
unsigned
long
flags
;
unsigned
long
flags
;
unsigned
short
/* cable, */
media
,
partner
;
unsigned
short
/* cable, */
media
,
partner
;
...
@@ -1074,7 +1074,7 @@ static void media_check(unsigned long arg)
...
@@ -1074,7 +1074,7 @@ static void media_check(unsigned long arg)
static
struct
net_device_stats
*
el3_get_stats
(
struct
net_device
*
dev
)
static
struct
net_device_stats
*
el3_get_stats
(
struct
net_device
*
dev
)
{
{
struct
el3_private
*
lp
=
(
struct
el3_private
*
)
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
if
(
netif_device_present
(
dev
))
{
if
(
netif_device_present
(
dev
))
{
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -1091,7 +1091,7 @@ static struct net_device_stats *el3_get_stats(struct net_device *dev)
...
@@ -1091,7 +1091,7 @@ static struct net_device_stats *el3_get_stats(struct net_device *dev)
*/
*/
static
void
update_stats
(
struct
net_device
*
dev
)
static
void
update_stats
(
struct
net_device
*
dev
)
{
{
struct
el3_private
*
lp
=
(
struct
el3_private
*
)
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
u8
rx
,
tx
,
up
;
u8
rx
,
tx
,
up
;
...
@@ -1128,7 +1128,7 @@ static void update_stats(struct net_device *dev)
...
@@ -1128,7 +1128,7 @@ static void update_stats(struct net_device *dev)
static
int
el3_rx
(
struct
net_device
*
dev
,
int
worklimit
)
static
int
el3_rx
(
struct
net_device
*
dev
,
int
worklimit
)
{
{
struct
el3_private
*
lp
=
(
struct
el3_private
*
)
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
short
rx_status
;
short
rx_status
;
...
@@ -1190,7 +1190,7 @@ static struct ethtool_ops netdev_ethtool_ops = {
...
@@ -1190,7 +1190,7 @@ static struct ethtool_ops netdev_ethtool_ops = {
/* Provide ioctl() calls to examine the MII xcvr state. */
/* Provide ioctl() calls to examine the MII xcvr state. */
static
int
el3_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
)
static
int
el3_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
)
{
{
struct
el3_private
*
lp
=
(
struct
el3_private
*
)
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
u16
*
data
=
(
u16
*
)
&
rq
->
ifr_data
;
u16
*
data
=
(
u16
*
)
&
rq
->
ifr_data
;
int
phy
=
lp
->
phys
&
0x1f
;
int
phy
=
lp
->
phys
&
0x1f
;
...
@@ -1259,7 +1259,7 @@ static void set_rx_mode(struct net_device *dev)
...
@@ -1259,7 +1259,7 @@ static void set_rx_mode(struct net_device *dev)
static
int
el3_close
(
struct
net_device
*
dev
)
static
int
el3_close
(
struct
net_device
*
dev
)
{
{
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
struct
el3_private
*
lp
=
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
dev_link_t
*
link
=
&
lp
->
link
;
dev_link_t
*
link
=
&
lp
->
link
;
DEBUG
(
2
,
"%s: shutting down ethercard.
\n
"
,
dev
->
name
);
DEBUG
(
2
,
"%s: shutting down ethercard.
\n
"
,
dev
->
name
);
...
...
drivers/net/pcmcia/3c589_cs.c
View file @
88f0a524
...
@@ -196,7 +196,7 @@ static dev_link_t *tc589_attach(void)
...
@@ -196,7 +196,7 @@ static dev_link_t *tc589_attach(void)
dev
=
alloc_etherdev
(
sizeof
(
struct
el3_private
));
dev
=
alloc_etherdev
(
sizeof
(
struct
el3_private
));
if
(
!
dev
)
if
(
!
dev
)
return
NULL
;
return
NULL
;
lp
=
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
link
=
&
lp
->
link
;
link
=
&
lp
->
link
;
link
->
priv
=
dev
;
link
->
priv
=
dev
;
...
@@ -304,7 +304,7 @@ static void tc589_config(dev_link_t *link)
...
@@ -304,7 +304,7 @@ static void tc589_config(dev_link_t *link)
{
{
client_handle_t
handle
=
link
->
handle
;
client_handle_t
handle
=
link
->
handle
;
struct
net_device
*
dev
=
link
->
priv
;
struct
net_device
*
dev
=
link
->
priv
;
struct
el3_private
*
lp
=
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
tuple_t
tuple
;
tuple_t
tuple
;
cisparse_t
parse
;
cisparse_t
parse
;
u16
buf
[
32
],
*
phys_addr
;
u16
buf
[
32
],
*
phys_addr
;
...
@@ -526,7 +526,7 @@ static u16 read_eeprom(ioaddr_t ioaddr, int index)
...
@@ -526,7 +526,7 @@ static u16 read_eeprom(ioaddr_t ioaddr, int index)
*/
*/
static
void
tc589_set_xcvr
(
struct
net_device
*
dev
,
int
if_port
)
static
void
tc589_set_xcvr
(
struct
net_device
*
dev
,
int
if_port
)
{
{
struct
el3_private
*
lp
=
(
struct
el3_private
*
)
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
EL3WINDOW
(
0
);
EL3WINDOW
(
0
);
...
@@ -648,7 +648,7 @@ static int el3_config(struct net_device *dev, struct ifmap *map)
...
@@ -648,7 +648,7 @@ static int el3_config(struct net_device *dev, struct ifmap *map)
static
int
el3_open
(
struct
net_device
*
dev
)
static
int
el3_open
(
struct
net_device
*
dev
)
{
{
struct
el3_private
*
lp
=
(
struct
el3_private
*
)
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
dev_link_t
*
link
=
&
lp
->
link
;
dev_link_t
*
link
=
&
lp
->
link
;
if
(
!
DEV_OK
(
link
))
if
(
!
DEV_OK
(
link
))
...
@@ -672,7 +672,7 @@ static int el3_open(struct net_device *dev)
...
@@ -672,7 +672,7 @@ static int el3_open(struct net_device *dev)
static
void
el3_tx_timeout
(
struct
net_device
*
dev
)
static
void
el3_tx_timeout
(
struct
net_device
*
dev
)
{
{
struct
el3_private
*
lp
=
(
struct
el3_private
*
)
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
printk
(
KERN_WARNING
"%s: Transmit timed out!
\n
"
,
dev
->
name
);
printk
(
KERN_WARNING
"%s: Transmit timed out!
\n
"
,
dev
->
name
);
...
@@ -687,7 +687,7 @@ static void el3_tx_timeout(struct net_device *dev)
...
@@ -687,7 +687,7 @@ static void el3_tx_timeout(struct net_device *dev)
static
void
pop_tx_status
(
struct
net_device
*
dev
)
static
void
pop_tx_status
(
struct
net_device
*
dev
)
{
{
struct
el3_private
*
lp
=
(
struct
el3_private
*
)
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
int
i
;
int
i
;
...
@@ -741,7 +741,7 @@ static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -741,7 +741,7 @@ static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev)
static
irqreturn_t
el3_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
static
irqreturn_t
el3_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
{
struct
net_device
*
dev
=
(
struct
net_device
*
)
dev_id
;
struct
net_device
*
dev
=
(
struct
net_device
*
)
dev_id
;
struct
el3_private
*
lp
=
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
,
status
;
ioaddr_t
ioaddr
,
status
;
int
i
=
0
,
handled
=
1
;
int
i
=
0
,
handled
=
1
;
...
@@ -826,7 +826,7 @@ static irqreturn_t el3_interrupt(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -826,7 +826,7 @@ static irqreturn_t el3_interrupt(int irq, void *dev_id, struct pt_regs *regs)
static
void
media_check
(
unsigned
long
arg
)
static
void
media_check
(
unsigned
long
arg
)
{
{
struct
net_device
*
dev
=
(
struct
net_device
*
)(
arg
);
struct
net_device
*
dev
=
(
struct
net_device
*
)(
arg
);
struct
el3_private
*
lp
=
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
u16
media
,
errs
;
u16
media
,
errs
;
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -906,7 +906,7 @@ static void media_check(unsigned long arg)
...
@@ -906,7 +906,7 @@ static void media_check(unsigned long arg)
static
struct
net_device_stats
*
el3_get_stats
(
struct
net_device
*
dev
)
static
struct
net_device_stats
*
el3_get_stats
(
struct
net_device
*
dev
)
{
{
struct
el3_private
*
lp
=
(
struct
el3_private
*
)
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
unsigned
long
flags
;
unsigned
long
flags
;
dev_link_t
*
link
=
&
lp
->
link
;
dev_link_t
*
link
=
&
lp
->
link
;
...
@@ -928,7 +928,7 @@ static struct net_device_stats *el3_get_stats(struct net_device *dev)
...
@@ -928,7 +928,7 @@ static struct net_device_stats *el3_get_stats(struct net_device *dev)
*/
*/
static
void
update_stats
(
struct
net_device
*
dev
)
static
void
update_stats
(
struct
net_device
*
dev
)
{
{
struct
el3_private
*
lp
=
(
struct
el3_private
*
)
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
DEBUG
(
2
,
"%s: updating the statistics.
\n
"
,
dev
->
name
);
DEBUG
(
2
,
"%s: updating the statistics.
\n
"
,
dev
->
name
);
...
@@ -955,7 +955,7 @@ static void update_stats(struct net_device *dev)
...
@@ -955,7 +955,7 @@ static void update_stats(struct net_device *dev)
static
int
el3_rx
(
struct
net_device
*
dev
)
static
int
el3_rx
(
struct
net_device
*
dev
)
{
{
struct
el3_private
*
lp
=
(
struct
el3_private
*
)
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
int
worklimit
=
32
;
int
worklimit
=
32
;
short
rx_status
;
short
rx_status
;
...
@@ -1009,7 +1009,7 @@ static int el3_rx(struct net_device *dev)
...
@@ -1009,7 +1009,7 @@ static int el3_rx(struct net_device *dev)
static
void
set_multicast_list
(
struct
net_device
*
dev
)
static
void
set_multicast_list
(
struct
net_device
*
dev
)
{
{
struct
el3_private
*
lp
=
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
dev_link_t
*
link
=
&
lp
->
link
;
dev_link_t
*
link
=
&
lp
->
link
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
u16
opts
=
SetRxFilter
|
RxStation
|
RxBroadcast
;
u16
opts
=
SetRxFilter
|
RxStation
|
RxBroadcast
;
...
@@ -1024,7 +1024,7 @@ static void set_multicast_list(struct net_device *dev)
...
@@ -1024,7 +1024,7 @@ static void set_multicast_list(struct net_device *dev)
static
int
el3_close
(
struct
net_device
*
dev
)
static
int
el3_close
(
struct
net_device
*
dev
)
{
{
struct
el3_private
*
lp
=
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
dev_link_t
*
link
=
&
lp
->
link
;
dev_link_t
*
link
=
&
lp
->
link
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
...
...
drivers/net/pcmcia/com20020_cs.c
View file @
88f0a524
...
@@ -179,7 +179,7 @@ static dev_link_t *com20020_attach(void)
...
@@ -179,7 +179,7 @@ static dev_link_t *com20020_attach(void)
memset
(
info
,
0
,
sizeof
(
struct
com20020_dev_t
));
memset
(
info
,
0
,
sizeof
(
struct
com20020_dev_t
));
memset
(
link
,
0
,
sizeof
(
struct
dev_link_t
));
memset
(
link
,
0
,
sizeof
(
struct
dev_link_t
));
lp
=
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
lp
->
timeout
=
timeout
;
lp
->
timeout
=
timeout
;
lp
->
backplane
=
backplane
;
lp
->
backplane
=
backplane
;
lp
->
clockp
=
clockp
;
lp
->
clockp
=
clockp
;
...
@@ -394,7 +394,7 @@ static void com20020_config(dev_link_t *link)
...
@@ -394,7 +394,7 @@ static void com20020_config(dev_link_t *link)
goto
failed
;
goto
failed
;
}
}
lp
=
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
lp
->
card_name
=
"PCMCIA COM20020"
;
lp
->
card_name
=
"PCMCIA COM20020"
;
lp
->
card_flags
=
ARC_CAN_10MBIT
;
/* pretend all of them can 10Mbit */
lp
->
card_flags
=
ARC_CAN_10MBIT
;
/* pretend all of them can 10Mbit */
...
@@ -492,7 +492,7 @@ static int com20020_event(event_t event, int priority,
...
@@ -492,7 +492,7 @@ static int com20020_event(event_t event, int priority,
pcmcia_request_configuration
(
link
->
handle
,
&
link
->
conf
);
pcmcia_request_configuration
(
link
->
handle
,
&
link
->
conf
);
if
(
link
->
open
)
{
if
(
link
->
open
)
{
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
struct
arcnet_local
*
lp
=
(
struct
arcnet_local
*
)
dev
->
priv
;
struct
arcnet_local
*
lp
=
netdev_priv
(
dev
)
;
ARCRESET
;
ARCRESET
;
}
}
}
}
...
...
drivers/net/pcmcia/fmvj18x_cs.c
View file @
88f0a524
...
@@ -256,7 +256,7 @@ static dev_link_t *fmvj18x_attach(void)
...
@@ -256,7 +256,7 @@ static dev_link_t *fmvj18x_attach(void)
dev
=
alloc_etherdev
(
sizeof
(
local_info_t
));
dev
=
alloc_etherdev
(
sizeof
(
local_info_t
));
if
(
!
dev
)
if
(
!
dev
)
return
NULL
;
return
NULL
;
lp
=
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
link
=
&
lp
->
link
;
link
=
&
lp
->
link
;
link
->
priv
=
dev
;
link
->
priv
=
dev
;
...
@@ -394,7 +394,7 @@ static void fmvj18x_config(dev_link_t *link)
...
@@ -394,7 +394,7 @@ static void fmvj18x_config(dev_link_t *link)
{
{
client_handle_t
handle
=
link
->
handle
;
client_handle_t
handle
=
link
->
handle
;
struct
net_device
*
dev
=
link
->
priv
;
struct
net_device
*
dev
=
link
->
priv
;
local_info_t
*
lp
=
dev
->
priv
;
local_info_t
*
lp
=
netdev_priv
(
dev
)
;
tuple_t
tuple
;
tuple_t
tuple
;
cisparse_t
parse
;
cisparse_t
parse
;
u_short
buf
[
32
];
u_short
buf
[
32
];
...
@@ -803,7 +803,7 @@ module_exit(exit_fmvj18x_cs);
...
@@ -803,7 +803,7 @@ module_exit(exit_fmvj18x_cs);
static
irqreturn_t
fjn_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
static
irqreturn_t
fjn_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
{
struct
net_device
*
dev
=
dev_id
;
struct
net_device
*
dev
=
dev_id
;
local_info_t
*
lp
=
dev
->
priv
;
local_info_t
*
lp
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
;
ioaddr_t
ioaddr
;
unsigned
short
tx_stat
,
rx_stat
;
unsigned
short
tx_stat
,
rx_stat
;
...
@@ -862,7 +862,7 @@ static irqreturn_t fjn_interrupt(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -862,7 +862,7 @@ static irqreturn_t fjn_interrupt(int irq, void *dev_id, struct pt_regs *regs)
static
void
fjn_tx_timeout
(
struct
net_device
*
dev
)
static
void
fjn_tx_timeout
(
struct
net_device
*
dev
)
{
{
struct
local_info_t
*
lp
=
(
struct
local_info_t
*
)
dev
->
priv
;
struct
local_info_t
*
lp
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
printk
(
KERN_NOTICE
"%s: transmit timed out with status %04x, %s?
\n
"
,
printk
(
KERN_NOTICE
"%s: transmit timed out with status %04x, %s?
\n
"
,
...
@@ -892,7 +892,7 @@ static void fjn_tx_timeout(struct net_device *dev)
...
@@ -892,7 +892,7 @@ static void fjn_tx_timeout(struct net_device *dev)
static
int
fjn_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
static
int
fjn_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
{
struct
local_info_t
*
lp
=
(
struct
local_info_t
*
)
dev
->
priv
;
struct
local_info_t
*
lp
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
short
length
=
skb
->
len
;
short
length
=
skb
->
len
;
...
@@ -966,7 +966,7 @@ static int fjn_start_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -966,7 +966,7 @@ static int fjn_start_xmit(struct sk_buff *skb, struct net_device *dev)
static
void
fjn_reset
(
struct
net_device
*
dev
)
static
void
fjn_reset
(
struct
net_device
*
dev
)
{
{
struct
local_info_t
*
lp
=
(
struct
local_info_t
*
)
dev
->
priv
;
struct
local_info_t
*
lp
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
int
i
;
int
i
;
...
@@ -1052,7 +1052,7 @@ static void fjn_reset(struct net_device *dev)
...
@@ -1052,7 +1052,7 @@ static void fjn_reset(struct net_device *dev)
static
void
fjn_rx
(
struct
net_device
*
dev
)
static
void
fjn_rx
(
struct
net_device
*
dev
)
{
{
struct
local_info_t
*
lp
=
(
struct
local_info_t
*
)
dev
->
priv
;
struct
local_info_t
*
lp
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
int
boguscount
=
10
;
/* 5 -> 10: by agy 19940922 */
int
boguscount
=
10
;
/* 5 -> 10: by agy 19940922 */
...
@@ -1181,7 +1181,7 @@ static int fjn_config(struct net_device *dev, struct ifmap *map){
...
@@ -1181,7 +1181,7 @@ static int fjn_config(struct net_device *dev, struct ifmap *map){
static
int
fjn_open
(
struct
net_device
*
dev
)
static
int
fjn_open
(
struct
net_device
*
dev
)
{
{
struct
local_info_t
*
lp
=
(
struct
local_info_t
*
)
dev
->
priv
;
struct
local_info_t
*
lp
=
netdev_priv
(
dev
)
;
dev_link_t
*
link
=
&
lp
->
link
;
dev_link_t
*
link
=
&
lp
->
link
;
DEBUG
(
4
,
"fjn_open('%s').
\n
"
,
dev
->
name
);
DEBUG
(
4
,
"fjn_open('%s').
\n
"
,
dev
->
name
);
...
@@ -1206,7 +1206,7 @@ static int fjn_open(struct net_device *dev)
...
@@ -1206,7 +1206,7 @@ static int fjn_open(struct net_device *dev)
static
int
fjn_close
(
struct
net_device
*
dev
)
static
int
fjn_close
(
struct
net_device
*
dev
)
{
{
struct
local_info_t
*
lp
=
(
struct
local_info_t
*
)
dev
->
priv
;
struct
local_info_t
*
lp
=
netdev_priv
(
dev
)
;
dev_link_t
*
link
=
&
lp
->
link
;
dev_link_t
*
link
=
&
lp
->
link
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
...
@@ -1239,7 +1239,7 @@ static int fjn_close(struct net_device *dev)
...
@@ -1239,7 +1239,7 @@ static int fjn_close(struct net_device *dev)
static
struct
net_device_stats
*
fjn_get_stats
(
struct
net_device
*
dev
)
static
struct
net_device_stats
*
fjn_get_stats
(
struct
net_device
*
dev
)
{
{
local_info_t
*
lp
=
(
local_info_t
*
)
dev
->
priv
;
local_info_t
*
lp
=
netdev_priv
(
dev
)
;
return
&
lp
->
stats
;
return
&
lp
->
stats
;
}
/* fjn_get_stats */
}
/* fjn_get_stats */
...
@@ -1252,7 +1252,7 @@ static struct net_device_stats *fjn_get_stats(struct net_device *dev)
...
@@ -1252,7 +1252,7 @@ static struct net_device_stats *fjn_get_stats(struct net_device *dev)
static
void
set_rx_mode
(
struct
net_device
*
dev
)
static
void
set_rx_mode
(
struct
net_device
*
dev
)
{
{
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
struct
local_info_t
*
lp
=
(
struct
local_info_t
*
)
dev
->
priv
;
struct
local_info_t
*
lp
=
netdev_priv
(
dev
)
;
u_char
mc_filter
[
8
];
/* Multicast hash filter */
u_char
mc_filter
[
8
];
/* Multicast hash filter */
u_long
flags
;
u_long
flags
;
int
i
;
int
i
;
...
...
drivers/net/pcmcia/ibmtr_cs.c
View file @
88f0a524
...
@@ -178,7 +178,7 @@ static dev_link_t *ibmtr_attach(void)
...
@@ -178,7 +178,7 @@ static dev_link_t *ibmtr_attach(void)
link
=
&
info
->
link
;
link
=
&
info
->
link
;
link
->
priv
=
info
;
link
->
priv
=
info
;
info
->
ti
=
dev
->
priv
;
info
->
ti
=
netdev_priv
(
dev
);
link
->
io
.
Attributes1
=
IO_DATA_PATH_WIDTH_8
;
link
->
io
.
Attributes1
=
IO_DATA_PATH_WIDTH_8
;
link
->
io
.
NumPorts1
=
4
;
link
->
io
.
NumPorts1
=
4
;
...
@@ -256,7 +256,7 @@ static void ibmtr_detach(dev_link_t *link)
...
@@ -256,7 +256,7 @@ static void ibmtr_detach(dev_link_t *link)
unregister_netdev
(
dev
);
unregister_netdev
(
dev
);
{
{
struct
tok_info
*
ti
=
(
struct
tok_info
*
)
dev
->
priv
;
struct
tok_info
*
ti
=
netdev_priv
(
dev
)
;
del_timer_sync
(
&
(
ti
->
tr_timer
));
del_timer_sync
(
&
(
ti
->
tr_timer
));
}
}
if
(
link
->
state
&
DEV_CONFIG
)
if
(
link
->
state
&
DEV_CONFIG
)
...
@@ -287,7 +287,7 @@ static void ibmtr_config(dev_link_t *link)
...
@@ -287,7 +287,7 @@ static void ibmtr_config(dev_link_t *link)
client_handle_t
handle
=
link
->
handle
;
client_handle_t
handle
=
link
->
handle
;
ibmtr_dev_t
*
info
=
link
->
priv
;
ibmtr_dev_t
*
info
=
link
->
priv
;
struct
net_device
*
dev
=
info
->
dev
;
struct
net_device
*
dev
=
info
->
dev
;
struct
tok_info
*
ti
=
dev
->
priv
;
struct
tok_info
*
ti
=
netdev_priv
(
dev
)
;
tuple_t
tuple
;
tuple_t
tuple
;
cisparse_t
parse
;
cisparse_t
parse
;
win_req_t
req
;
win_req_t
req
;
...
@@ -412,7 +412,7 @@ static void ibmtr_release(dev_link_t *link)
...
@@ -412,7 +412,7 @@ static void ibmtr_release(dev_link_t *link)
pcmcia_release_io
(
link
->
handle
,
&
link
->
io
);
pcmcia_release_io
(
link
->
handle
,
&
link
->
io
);
pcmcia_release_irq
(
link
->
handle
,
&
link
->
irq
);
pcmcia_release_irq
(
link
->
handle
,
&
link
->
irq
);
if
(
link
->
win
)
{
if
(
link
->
win
)
{
struct
tok_info
*
ti
=
dev
->
priv
;
struct
tok_info
*
ti
=
netdev_priv
(
dev
)
;
iounmap
((
void
*
)
ti
->
mmio
);
iounmap
((
void
*
)
ti
->
mmio
);
pcmcia_release_window
(
link
->
win
);
pcmcia_release_window
(
link
->
win
);
pcmcia_release_window
(
info
->
sram_win_handle
);
pcmcia_release_window
(
info
->
sram_win_handle
);
...
...
drivers/net/pcmcia/smc91c92_cs.c
View file @
88f0a524
...
@@ -327,7 +327,7 @@ static dev_link_t *smc91c92_attach(void)
...
@@ -327,7 +327,7 @@ static dev_link_t *smc91c92_attach(void)
dev
=
alloc_etherdev
(
sizeof
(
struct
smc_private
));
dev
=
alloc_etherdev
(
sizeof
(
struct
smc_private
));
if
(
!
dev
)
if
(
!
dev
)
return
NULL
;
return
NULL
;
smc
=
dev
->
priv
;
smc
=
netdev_priv
(
dev
)
;
link
=
&
smc
->
link
;
link
=
&
smc
->
link
;
link
->
priv
=
dev
;
link
->
priv
=
dev
;
...
@@ -483,7 +483,7 @@ static int next_tuple(client_handle_t handle, tuple_t *tuple,
...
@@ -483,7 +483,7 @@ static int next_tuple(client_handle_t handle, tuple_t *tuple,
static
int
mhz_3288_power
(
dev_link_t
*
link
)
static
int
mhz_3288_power
(
dev_link_t
*
link
)
{
{
struct
net_device
*
dev
=
link
->
priv
;
struct
net_device
*
dev
=
link
->
priv
;
struct
smc_private
*
smc
=
dev
->
priv
;
struct
smc_private
*
smc
=
netdev_priv
(
dev
)
;
u_char
tmp
;
u_char
tmp
;
/* Read the ISR twice... */
/* Read the ISR twice... */
...
@@ -505,7 +505,7 @@ static int mhz_3288_power(dev_link_t *link)
...
@@ -505,7 +505,7 @@ static int mhz_3288_power(dev_link_t *link)
static
int
mhz_mfc_config
(
dev_link_t
*
link
)
static
int
mhz_mfc_config
(
dev_link_t
*
link
)
{
{
struct
net_device
*
dev
=
link
->
priv
;
struct
net_device
*
dev
=
link
->
priv
;
struct
smc_private
*
smc
=
dev
->
priv
;
struct
smc_private
*
smc
=
netdev_priv
(
dev
)
;
tuple_t
tuple
;
tuple_t
tuple
;
cisparse_t
parse
;
cisparse_t
parse
;
u_char
buf
[
255
];
u_char
buf
[
255
];
...
@@ -618,7 +618,7 @@ static int mhz_setup(dev_link_t *link)
...
@@ -618,7 +618,7 @@ static int mhz_setup(dev_link_t *link)
static
void
mot_config
(
dev_link_t
*
link
)
static
void
mot_config
(
dev_link_t
*
link
)
{
{
struct
net_device
*
dev
=
link
->
priv
;
struct
net_device
*
dev
=
link
->
priv
;
struct
smc_private
*
smc
=
dev
->
priv
;
struct
smc_private
*
smc
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
iouart
=
link
->
io
.
BasePort2
;
ioaddr_t
iouart
=
link
->
io
.
BasePort2
;
...
@@ -894,7 +894,7 @@ static void smc91c92_config(dev_link_t *link)
...
@@ -894,7 +894,7 @@ static void smc91c92_config(dev_link_t *link)
{
{
client_handle_t
handle
=
link
->
handle
;
client_handle_t
handle
=
link
->
handle
;
struct
net_device
*
dev
=
link
->
priv
;
struct
net_device
*
dev
=
link
->
priv
;
struct
smc_private
*
smc
=
dev
->
priv
;
struct
smc_private
*
smc
=
netdev_priv
(
dev
)
;
tuple_t
tuple
;
tuple_t
tuple
;
cisparse_t
parse
;
cisparse_t
parse
;
u_short
buf
[
32
];
u_short
buf
[
32
];
...
@@ -1069,7 +1069,7 @@ static void smc91c92_release(dev_link_t *link)
...
@@ -1069,7 +1069,7 @@ static void smc91c92_release(dev_link_t *link)
pcmcia_release_irq
(
link
->
handle
,
&
link
->
irq
);
pcmcia_release_irq
(
link
->
handle
,
&
link
->
irq
);
if
(
link
->
win
)
{
if
(
link
->
win
)
{
struct
net_device
*
dev
=
link
->
priv
;
struct
net_device
*
dev
=
link
->
priv
;
struct
smc_private
*
smc
=
dev
->
priv
;
struct
smc_private
*
smc
=
netdev_priv
(
dev
)
;
iounmap
(
smc
->
base
);
iounmap
(
smc
->
base
);
pcmcia_release_window
(
link
->
win
);
pcmcia_release_window
(
link
->
win
);
}
}
...
@@ -1091,7 +1091,7 @@ static int smc91c92_event(event_t event, int priority,
...
@@ -1091,7 +1091,7 @@ static int smc91c92_event(event_t event, int priority,
{
{
dev_link_t
*
link
=
args
->
client_data
;
dev_link_t
*
link
=
args
->
client_data
;
struct
net_device
*
dev
=
link
->
priv
;
struct
net_device
*
dev
=
link
->
priv
;
struct
smc_private
*
smc
=
dev
->
priv
;
struct
smc_private
*
smc
=
netdev_priv
(
dev
)
;
int
i
;
int
i
;
DEBUG
(
1
,
"smc91c92_event(0x%06x)
\n
"
,
event
);
DEBUG
(
1
,
"smc91c92_event(0x%06x)
\n
"
,
event
);
...
@@ -1240,7 +1240,7 @@ static void smc_dump(struct net_device *dev)
...
@@ -1240,7 +1240,7 @@ static void smc_dump(struct net_device *dev)
static
int
smc_open
(
struct
net_device
*
dev
)
static
int
smc_open
(
struct
net_device
*
dev
)
{
{
struct
smc_private
*
smc
=
dev
->
priv
;
struct
smc_private
*
smc
=
netdev_priv
(
dev
)
;
dev_link_t
*
link
=
&
smc
->
link
;
dev_link_t
*
link
=
&
smc
->
link
;
#ifdef PCMCIA_DEBUG
#ifdef PCMCIA_DEBUG
...
@@ -1277,7 +1277,7 @@ static int smc_open(struct net_device *dev)
...
@@ -1277,7 +1277,7 @@ static int smc_open(struct net_device *dev)
static
int
smc_close
(
struct
net_device
*
dev
)
static
int
smc_close
(
struct
net_device
*
dev
)
{
{
struct
smc_private
*
smc
=
dev
->
priv
;
struct
smc_private
*
smc
=
netdev_priv
(
dev
)
;
dev_link_t
*
link
=
&
smc
->
link
;
dev_link_t
*
link
=
&
smc
->
link
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
...
@@ -1314,7 +1314,7 @@ static int smc_close(struct net_device *dev)
...
@@ -1314,7 +1314,7 @@ static int smc_close(struct net_device *dev)
static
void
smc_hardware_send_packet
(
struct
net_device
*
dev
)
static
void
smc_hardware_send_packet
(
struct
net_device
*
dev
)
{
{
struct
smc_private
*
smc
=
dev
->
priv
;
struct
smc_private
*
smc
=
netdev_priv
(
dev
)
;
struct
sk_buff
*
skb
=
smc
->
saved_skb
;
struct
sk_buff
*
skb
=
smc
->
saved_skb
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
u_char
packet_no
;
u_char
packet_no
;
...
@@ -1379,7 +1379,7 @@ static void smc_hardware_send_packet(struct net_device * dev)
...
@@ -1379,7 +1379,7 @@ static void smc_hardware_send_packet(struct net_device * dev)
static
void
smc_tx_timeout
(
struct
net_device
*
dev
)
static
void
smc_tx_timeout
(
struct
net_device
*
dev
)
{
{
struct
smc_private
*
smc
=
dev
->
priv
;
struct
smc_private
*
smc
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
printk
(
KERN_NOTICE
"%s: SMC91c92 transmit timed out, "
printk
(
KERN_NOTICE
"%s: SMC91c92 transmit timed out, "
...
@@ -1394,7 +1394,7 @@ static void smc_tx_timeout(struct net_device *dev)
...
@@ -1394,7 +1394,7 @@ static void smc_tx_timeout(struct net_device *dev)
static
int
smc_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
static
int
smc_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
{
struct
smc_private
*
smc
=
dev
->
priv
;
struct
smc_private
*
smc
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
u_short
num_pages
;
u_short
num_pages
;
short
time_out
,
ir
;
short
time_out
,
ir
;
...
@@ -1460,7 +1460,7 @@ static int smc_start_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -1460,7 +1460,7 @@ static int smc_start_xmit(struct sk_buff *skb, struct net_device *dev)
static
void
smc_tx_err
(
struct
net_device
*
dev
)
static
void
smc_tx_err
(
struct
net_device
*
dev
)
{
{
struct
smc_private
*
smc
=
(
struct
smc_private
*
)
dev
->
priv
;
struct
smc_private
*
smc
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
int
saved_packet
=
inw
(
ioaddr
+
PNR_ARR
)
&
0xff
;
int
saved_packet
=
inw
(
ioaddr
+
PNR_ARR
)
&
0xff
;
int
packet_no
=
inw
(
ioaddr
+
FIFO_PORTS
)
&
0x7f
;
int
packet_no
=
inw
(
ioaddr
+
FIFO_PORTS
)
&
0x7f
;
...
@@ -1504,7 +1504,7 @@ static void smc_tx_err(struct net_device * dev)
...
@@ -1504,7 +1504,7 @@ static void smc_tx_err(struct net_device * dev)
static
void
smc_eph_irq
(
struct
net_device
*
dev
)
static
void
smc_eph_irq
(
struct
net_device
*
dev
)
{
{
struct
smc_private
*
smc
=
dev
->
priv
;
struct
smc_private
*
smc
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
u_short
card_stats
,
ephs
;
u_short
card_stats
,
ephs
;
...
@@ -1539,7 +1539,7 @@ static void smc_eph_irq(struct net_device *dev)
...
@@ -1539,7 +1539,7 @@ static void smc_eph_irq(struct net_device *dev)
static
irqreturn_t
smc_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
static
irqreturn_t
smc_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
{
struct
net_device
*
dev
=
dev_id
;
struct
net_device
*
dev
=
dev_id
;
struct
smc_private
*
smc
=
dev
->
priv
;
struct
smc_private
*
smc
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
;
ioaddr_t
ioaddr
;
u_short
saved_bank
,
saved_pointer
,
mask
,
status
;
u_short
saved_bank
,
saved_pointer
,
mask
,
status
;
unsigned
int
handled
=
1
;
unsigned
int
handled
=
1
;
...
@@ -1657,7 +1657,7 @@ static irqreturn_t smc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -1657,7 +1657,7 @@ static irqreturn_t smc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
static
void
smc_rx
(
struct
net_device
*
dev
)
static
void
smc_rx
(
struct
net_device
*
dev
)
{
{
struct
smc_private
*
smc
=
(
struct
smc_private
*
)
dev
->
priv
;
struct
smc_private
*
smc
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
int
rx_status
;
int
rx_status
;
int
packet_length
;
/* Caution: not frame length, rather words
int
packet_length
;
/* Caution: not frame length, rather words
...
@@ -1725,7 +1725,7 @@ static void smc_rx(struct net_device *dev)
...
@@ -1725,7 +1725,7 @@ static void smc_rx(struct net_device *dev)
static
struct
net_device_stats
*
smc_get_stats
(
struct
net_device
*
dev
)
static
struct
net_device_stats
*
smc_get_stats
(
struct
net_device
*
dev
)
{
{
struct
smc_private
*
smc
=
(
struct
smc_private
*
)
dev
->
priv
;
struct
smc_private
*
smc
=
netdev_priv
(
dev
)
;
/* Nothing to update - the 91c92 is a pretty primative chip. */
/* Nothing to update - the 91c92 is a pretty primative chip. */
return
&
smc
->
stats
;
return
&
smc
->
stats
;
}
}
...
@@ -1765,7 +1765,7 @@ static void fill_multicast_tbl(int count, struct dev_mc_list *addrs,
...
@@ -1765,7 +1765,7 @@ static void fill_multicast_tbl(int count, struct dev_mc_list *addrs,
static
void
set_rx_mode
(
struct
net_device
*
dev
)
static
void
set_rx_mode
(
struct
net_device
*
dev
)
{
{
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
struct
smc_private
*
smc
=
dev
->
priv
;
struct
smc_private
*
smc
=
netdev_priv
(
dev
)
;
u_int
multicast_table
[
2
]
=
{
0
,
};
u_int
multicast_table
[
2
]
=
{
0
,
};
unsigned
long
flags
;
unsigned
long
flags
;
u_short
rx_cfg_setting
;
u_short
rx_cfg_setting
;
...
@@ -1804,7 +1804,7 @@ static void set_rx_mode(struct net_device *dev)
...
@@ -1804,7 +1804,7 @@ static void set_rx_mode(struct net_device *dev)
static
int
s9k_config
(
struct
net_device
*
dev
,
struct
ifmap
*
map
)
static
int
s9k_config
(
struct
net_device
*
dev
,
struct
ifmap
*
map
)
{
{
struct
smc_private
*
smc
=
dev
->
priv
;
struct
smc_private
*
smc
=
netdev_priv
(
dev
)
;
if
((
map
->
port
!=
(
u_char
)(
-
1
))
&&
(
map
->
port
!=
dev
->
if_port
))
{
if
((
map
->
port
!=
(
u_char
)(
-
1
))
&&
(
map
->
port
!=
dev
->
if_port
))
{
if
(
smc
->
cfg
&
CFG_MII_SELECT
)
if
(
smc
->
cfg
&
CFG_MII_SELECT
)
return
-
EOPNOTSUPP
;
return
-
EOPNOTSUPP
;
...
@@ -1830,7 +1830,7 @@ static int s9k_config(struct net_device *dev, struct ifmap *map)
...
@@ -1830,7 +1830,7 @@ static int s9k_config(struct net_device *dev, struct ifmap *map)
*/
*/
static
void
smc_set_xcvr
(
struct
net_device
*
dev
,
int
if_port
)
static
void
smc_set_xcvr
(
struct
net_device
*
dev
,
int
if_port
)
{
{
struct
smc_private
*
smc
=
(
struct
smc_private
*
)
dev
->
priv
;
struct
smc_private
*
smc
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
u_short
saved_bank
;
u_short
saved_bank
;
...
@@ -1855,7 +1855,7 @@ static void smc_set_xcvr(struct net_device *dev, int if_port)
...
@@ -1855,7 +1855,7 @@ static void smc_set_xcvr(struct net_device *dev, int if_port)
static
void
smc_reset
(
struct
net_device
*
dev
)
static
void
smc_reset
(
struct
net_device
*
dev
)
{
{
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
struct
smc_private
*
smc
=
dev
->
priv
;
struct
smc_private
*
smc
=
netdev_priv
(
dev
)
;
int
i
;
int
i
;
DEBUG
(
0
,
"%s: smc91c92 reset called.
\n
"
,
dev
->
name
);
DEBUG
(
0
,
"%s: smc91c92 reset called.
\n
"
,
dev
->
name
);
...
@@ -1930,7 +1930,7 @@ static void smc_reset(struct net_device *dev)
...
@@ -1930,7 +1930,7 @@ static void smc_reset(struct net_device *dev)
static
void
media_check
(
u_long
arg
)
static
void
media_check
(
u_long
arg
)
{
{
struct
net_device
*
dev
=
(
struct
net_device
*
)
arg
;
struct
net_device
*
dev
=
(
struct
net_device
*
)
arg
;
struct
smc_private
*
smc
=
dev
->
priv
;
struct
smc_private
*
smc
=
netdev_priv
(
dev
)
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
u_short
i
,
media
,
saved_bank
;
u_short
i
,
media
,
saved_bank
;
u_short
link
;
u_short
link
;
...
@@ -2044,7 +2044,7 @@ static void media_check(u_long arg)
...
@@ -2044,7 +2044,7 @@ static void media_check(u_long arg)
static
int
smc_link_ok
(
struct
net_device
*
dev
)
static
int
smc_link_ok
(
struct
net_device
*
dev
)
{
{
ioaddr_t
ioaddr
=
dev
->
base_addr
;
ioaddr_t
ioaddr
=
dev
->
base_addr
;
struct
smc_private
*
smc
=
dev
->
priv
;
struct
smc_private
*
smc
=
netdev_priv
(
dev
)
;
if
(
smc
->
cfg
&
CFG_MII_SELECT
)
{
if
(
smc
->
cfg
&
CFG_MII_SELECT
)
{
return
mii_link_ok
(
&
smc
->
mii_if
);
return
mii_link_ok
(
&
smc
->
mii_if
);
...
@@ -2109,7 +2109,7 @@ static int smc_netdev_set_ecmd(struct net_device *dev, struct ethtool_cmd *ecmd)
...
@@ -2109,7 +2109,7 @@ static int smc_netdev_set_ecmd(struct net_device *dev, struct ethtool_cmd *ecmd)
static
int
smc_ethtool_ioctl
(
struct
net_device
*
dev
,
void
*
useraddr
)
static
int
smc_ethtool_ioctl
(
struct
net_device
*
dev
,
void
*
useraddr
)
{
{
u32
ethcmd
;
u32
ethcmd
;
struct
smc_private
*
smc
=
dev
->
priv
;
struct
smc_private
*
smc
=
netdev_priv
(
dev
)
;
if
(
get_user
(
ethcmd
,
(
u32
*
)
useraddr
))
if
(
get_user
(
ethcmd
,
(
u32
*
)
useraddr
))
return
-
EFAULT
;
return
-
EFAULT
;
...
@@ -2202,7 +2202,7 @@ static int smc_ethtool_ioctl (struct net_device *dev, void *useraddr)
...
@@ -2202,7 +2202,7 @@ static int smc_ethtool_ioctl (struct net_device *dev, void *useraddr)
static
int
smc_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
)
static
int
smc_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
)
{
{
struct
smc_private
*
smc
=
dev
->
priv
;
struct
smc_private
*
smc
=
netdev_priv
(
dev
)
;
struct
mii_ioctl_data
*
mii
;
struct
mii_ioctl_data
*
mii
;
int
rc
=
0
;
int
rc
=
0
;
u_short
saved_bank
;
u_short
saved_bank
;
...
...
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