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
88c0b8ea
Commit
88c0b8ea
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 3com net drivers
parent
9e86d35e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
78 additions
and
78 deletions
+78
-78
drivers/net/3c501.c
drivers/net/3c501.c
+8
-8
drivers/net/3c507.c
drivers/net/3c507.c
+9
-9
drivers/net/3c509.c
drivers/net/3c509.c
+17
-17
drivers/net/3c527.c
drivers/net/3c527.c
+19
-19
drivers/net/3c59x.c
drivers/net/3c59x.c
+25
-25
No files found.
drivers/net/3c501.c
View file @
88c0b8ea
...
@@ -306,7 +306,7 @@ static int __init el1_probe1(struct net_device *dev, int ioaddr)
...
@@ -306,7 +306,7 @@ static int __init el1_probe1(struct net_device *dev, int ioaddr)
printk
(
KERN_DEBUG
"%s"
,
version
);
printk
(
KERN_DEBUG
"%s"
,
version
);
memset
(
dev
->
priv
,
0
,
sizeof
(
struct
net_local
));
memset
(
dev
->
priv
,
0
,
sizeof
(
struct
net_local
));
lp
=
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
spin_lock_init
(
&
lp
->
lock
);
spin_lock_init
(
&
lp
->
lock
);
/*
/*
...
@@ -341,7 +341,7 @@ static int el_open(struct net_device *dev)
...
@@ -341,7 +341,7 @@ static int el_open(struct net_device *dev)
{
{
int
retval
;
int
retval
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
struct
net_local
*
lp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
lp
=
netdev_priv
(
dev
)
;
unsigned
long
flags
;
unsigned
long
flags
;
if
(
el_debug
>
2
)
if
(
el_debug
>
2
)
...
@@ -371,7 +371,7 @@ static int el_open(struct net_device *dev)
...
@@ -371,7 +371,7 @@ static int el_open(struct net_device *dev)
static
void
el_timeout
(
struct
net_device
*
dev
)
static
void
el_timeout
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
lp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
lp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
if
(
el_debug
)
if
(
el_debug
)
...
@@ -411,7 +411,7 @@ static void el_timeout(struct net_device *dev)
...
@@ -411,7 +411,7 @@ static void el_timeout(struct net_device *dev)
static
int
el_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
static
int
el_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
{
struct
net_local
*
lp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
lp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -524,7 +524,7 @@ static irqreturn_t el_interrupt(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -524,7 +524,7 @@ static irqreturn_t el_interrupt(int irq, void *dev_id, struct pt_regs *regs)
int
axsr
;
/* Aux. status reg. */
int
axsr
;
/* Aux. status reg. */
ioaddr
=
dev
->
base_addr
;
ioaddr
=
dev
->
base_addr
;
lp
=
(
struct
net_local
*
)
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
spin_lock
(
&
lp
->
lock
);
spin_lock
(
&
lp
->
lock
);
...
@@ -698,7 +698,7 @@ static irqreturn_t el_interrupt(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -698,7 +698,7 @@ static irqreturn_t el_interrupt(int irq, void *dev_id, struct pt_regs *regs)
static
void
el_receive
(
struct
net_device
*
dev
)
static
void
el_receive
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
lp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
lp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
int
pkt_len
;
int
pkt_len
;
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
...
@@ -764,7 +764,7 @@ static void el_receive(struct net_device *dev)
...
@@ -764,7 +764,7 @@ static void el_receive(struct net_device *dev)
static
void
el_reset
(
struct
net_device
*
dev
)
static
void
el_reset
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
lp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
lp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
if
(
el_debug
>
2
)
if
(
el_debug
>
2
)
...
@@ -828,7 +828,7 @@ static int el1_close(struct net_device *dev)
...
@@ -828,7 +828,7 @@ static int el1_close(struct net_device *dev)
static
struct
net_device_stats
*
el1_get_stats
(
struct
net_device
*
dev
)
static
struct
net_device_stats
*
el1_get_stats
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
lp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
lp
=
netdev_priv
(
dev
)
;
return
&
lp
->
stats
;
return
&
lp
->
stats
;
}
}
...
...
drivers/net/3c507.c
View file @
88c0b8ea
...
@@ -441,7 +441,7 @@ static int __init el16_probe1(struct net_device *dev, int ioaddr)
...
@@ -441,7 +441,7 @@ static int __init el16_probe1(struct net_device *dev, int ioaddr)
if
(
net_debug
)
if
(
net_debug
)
printk
(
version
);
printk
(
version
);
lp
=
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
memset
(
lp
,
0
,
sizeof
(
*
lp
));
memset
(
lp
,
0
,
sizeof
(
*
lp
));
spin_lock_init
(
&
lp
->
lock
);
spin_lock_init
(
&
lp
->
lock
);
...
@@ -471,7 +471,7 @@ static int el16_open(struct net_device *dev)
...
@@ -471,7 +471,7 @@ static int el16_open(struct net_device *dev)
static
void
el16_tx_timeout
(
struct
net_device
*
dev
)
static
void
el16_tx_timeout
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
lp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
lp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
unsigned
long
shmem
=
dev
->
mem_start
;
unsigned
long
shmem
=
dev
->
mem_start
;
...
@@ -501,7 +501,7 @@ static void el16_tx_timeout (struct net_device *dev)
...
@@ -501,7 +501,7 @@ static void el16_tx_timeout (struct net_device *dev)
static
int
el16_send_packet
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
static
int
el16_send_packet
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
{
struct
net_local
*
lp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
lp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
unsigned
long
flags
;
unsigned
long
flags
;
short
length
=
ETH_ZLEN
<
skb
->
len
?
skb
->
len
:
ETH_ZLEN
;
short
length
=
ETH_ZLEN
<
skb
->
len
?
skb
->
len
:
ETH_ZLEN
;
...
@@ -546,7 +546,7 @@ static irqreturn_t el16_interrupt(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -546,7 +546,7 @@ static irqreturn_t el16_interrupt(int irq, void *dev_id, struct pt_regs *regs)
}
}
ioaddr
=
dev
->
base_addr
;
ioaddr
=
dev
->
base_addr
;
lp
=
(
struct
net_local
*
)
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
shmem
=
dev
->
mem_start
;
shmem
=
dev
->
mem_start
;
spin_lock
(
&
lp
->
lock
);
spin_lock
(
&
lp
->
lock
);
...
@@ -660,7 +660,7 @@ static int el16_close(struct net_device *dev)
...
@@ -660,7 +660,7 @@ static int el16_close(struct net_device *dev)
closed. */
closed. */
static
struct
net_device_stats
*
el16_get_stats
(
struct
net_device
*
dev
)
static
struct
net_device_stats
*
el16_get_stats
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
lp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
lp
=
netdev_priv
(
dev
)
;
/* ToDo: decide if there are any useful statistics from the SCB. */
/* ToDo: decide if there are any useful statistics from the SCB. */
...
@@ -670,7 +670,7 @@ static struct net_device_stats *el16_get_stats(struct net_device *dev)
...
@@ -670,7 +670,7 @@ static struct net_device_stats *el16_get_stats(struct net_device *dev)
/* Initialize the Rx-block list. */
/* Initialize the Rx-block list. */
static
void
init_rx_bufs
(
struct
net_device
*
dev
)
static
void
init_rx_bufs
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
lp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
lp
=
netdev_priv
(
dev
)
;
unsigned
long
write_ptr
;
unsigned
long
write_ptr
;
unsigned
short
SCB_base
=
SCB_BASE
;
unsigned
short
SCB_base
=
SCB_BASE
;
...
@@ -713,7 +713,7 @@ static void init_rx_bufs(struct net_device *dev)
...
@@ -713,7 +713,7 @@ static void init_rx_bufs(struct net_device *dev)
static
void
init_82586_mem
(
struct
net_device
*
dev
)
static
void
init_82586_mem
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
lp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
lp
=
netdev_priv
(
dev
)
;
short
ioaddr
=
dev
->
base_addr
;
short
ioaddr
=
dev
->
base_addr
;
unsigned
long
shmem
=
dev
->
mem_start
;
unsigned
long
shmem
=
dev
->
mem_start
;
...
@@ -771,7 +771,7 @@ static void init_82586_mem(struct net_device *dev)
...
@@ -771,7 +771,7 @@ static void init_82586_mem(struct net_device *dev)
static
void
hardware_send_packet
(
struct
net_device
*
dev
,
void
*
buf
,
short
length
,
short
pad
)
static
void
hardware_send_packet
(
struct
net_device
*
dev
,
void
*
buf
,
short
length
,
short
pad
)
{
{
struct
net_local
*
lp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
lp
=
netdev_priv
(
dev
)
;
short
ioaddr
=
dev
->
base_addr
;
short
ioaddr
=
dev
->
base_addr
;
ushort
tx_block
=
lp
->
tx_head
;
ushort
tx_block
=
lp
->
tx_head
;
unsigned
long
write_ptr
=
dev
->
mem_start
+
tx_block
;
unsigned
long
write_ptr
=
dev
->
mem_start
+
tx_block
;
...
@@ -820,7 +820,7 @@ static void hardware_send_packet(struct net_device *dev, void *buf, short length
...
@@ -820,7 +820,7 @@ static void hardware_send_packet(struct net_device *dev, void *buf, short length
static
void
el16_rx
(
struct
net_device
*
dev
)
static
void
el16_rx
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
lp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
lp
=
netdev_priv
(
dev
)
;
unsigned
long
shmem
=
dev
->
mem_start
;
unsigned
long
shmem
=
dev
->
mem_start
;
ushort
rx_head
=
lp
->
rx_head
;
ushort
rx_head
=
lp
->
rx_head
;
ushort
rx_tail
=
lp
->
rx_tail
;
ushort
rx_tail
=
lp
->
rx_tail
;
...
...
drivers/net/3c509.c
View file @
88c0b8ea
...
@@ -304,7 +304,7 @@ static int nopnp;
...
@@ -304,7 +304,7 @@ static int nopnp;
static
int
__init
el3_common_init
(
struct
net_device
*
dev
)
static
int
__init
el3_common_init
(
struct
net_device
*
dev
)
{
{
struct
el3_private
*
lp
=
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
short
i
;
short
i
;
int
err
;
int
err
;
...
@@ -355,7 +355,7 @@ static int __init el3_common_init(struct net_device *dev)
...
@@ -355,7 +355,7 @@ static int __init el3_common_init(struct net_device *dev)
static
void
el3_common_remove
(
struct
net_device
*
dev
)
static
void
el3_common_remove
(
struct
net_device
*
dev
)
{
{
struct
el3_private
*
lp
=
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
(
void
)
lp
;
/* Keep gcc quiet... */
(
void
)
lp
;
/* Keep gcc quiet... */
#ifdef CONFIG_PM
#ifdef CONFIG_PM
...
@@ -575,7 +575,7 @@ static int __init el3_probe(int card_idx)
...
@@ -575,7 +575,7 @@ static int __init el3_probe(int card_idx)
dev
->
base_addr
=
ioaddr
;
dev
->
base_addr
=
ioaddr
;
dev
->
irq
=
irq
;
dev
->
irq
=
irq
;
dev
->
if_port
=
if_port
;
dev
->
if_port
=
if_port
;
lp
=
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
#if defined(__ISAPNP__) && !defined(CONFIG_X86_PC9800)
#if defined(__ISAPNP__) && !defined(CONFIG_X86_PC9800)
lp
->
dev
=
&
idev
->
dev
;
lp
->
dev
=
&
idev
->
dev
;
#endif
#endif
...
@@ -671,7 +671,7 @@ static int __init el3_mca_probe(struct device *device) {
...
@@ -671,7 +671,7 @@ static int __init el3_mca_probe(struct device *device) {
dev
->
base_addr
=
ioaddr
;
dev
->
base_addr
=
ioaddr
;
dev
->
irq
=
irq
;
dev
->
irq
=
irq
;
dev
->
if_port
=
if_port
;
dev
->
if_port
=
if_port
;
lp
=
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
lp
->
dev
=
device
;
lp
->
dev
=
device
;
lp
->
type
=
EL3_MCA
;
lp
->
type
=
EL3_MCA
;
device
->
driver_data
=
dev
;
device
->
driver_data
=
dev
;
...
@@ -732,7 +732,7 @@ static int __init el3_eisa_probe (struct device *device)
...
@@ -732,7 +732,7 @@ static int __init el3_eisa_probe (struct device *device)
dev
->
base_addr
=
ioaddr
;
dev
->
base_addr
=
ioaddr
;
dev
->
irq
=
irq
;
dev
->
irq
=
irq
;
dev
->
if_port
=
if_port
;
dev
->
if_port
=
if_port
;
lp
=
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
lp
->
dev
=
device
;
lp
->
dev
=
device
;
lp
->
type
=
EL3_EISA
;
lp
->
type
=
EL3_EISA
;
eisa_set_drvdata
(
edev
,
dev
);
eisa_set_drvdata
(
edev
,
dev
);
...
@@ -829,7 +829,7 @@ el3_open(struct net_device *dev)
...
@@ -829,7 +829,7 @@ el3_open(struct net_device *dev)
static
void
static
void
el3_tx_timeout
(
struct
net_device
*
dev
)
el3_tx_timeout
(
struct
net_device
*
dev
)
{
{
struct
el3_private
*
lp
=
(
struct
el3_private
*
)
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
/* Transmitter timeout, serious problems. */
/* Transmitter timeout, serious problems. */
...
@@ -849,7 +849,7 @@ el3_tx_timeout (struct net_device *dev)
...
@@ -849,7 +849,7 @@ el3_tx_timeout (struct net_device *dev)
static
int
static
int
el3_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
el3_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
{
struct
el3_private
*
lp
=
(
struct
el3_private
*
)
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -943,7 +943,7 @@ el3_interrupt(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -943,7 +943,7 @@ el3_interrupt(int irq, void *dev_id, struct pt_regs *regs)
return
IRQ_NONE
;
return
IRQ_NONE
;
}
}
lp
=
(
struct
el3_private
*
)
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
spin_lock
(
&
lp
->
lock
);
spin_lock
(
&
lp
->
lock
);
ioaddr
=
dev
->
base_addr
;
ioaddr
=
dev
->
base_addr
;
...
@@ -975,7 +975,7 @@ el3_interrupt(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -975,7 +975,7 @@ el3_interrupt(int irq, void *dev_id, struct pt_regs *regs)
outw
(
AckIntr
|
RxEarly
,
ioaddr
+
EL3_CMD
);
outw
(
AckIntr
|
RxEarly
,
ioaddr
+
EL3_CMD
);
}
}
if
(
status
&
TxComplete
)
{
/* Really Tx error. */
if
(
status
&
TxComplete
)
{
/* Really Tx error. */
struct
el3_private
*
lp
=
(
struct
el3_private
*
)
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
short
tx_status
;
short
tx_status
;
int
i
=
4
;
int
i
=
4
;
...
@@ -1022,7 +1022,7 @@ el3_interrupt(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -1022,7 +1022,7 @@ el3_interrupt(int irq, void *dev_id, struct pt_regs *regs)
static
struct
net_device_stats
*
static
struct
net_device_stats
*
el3_get_stats
(
struct
net_device
*
dev
)
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
;
/*
/*
...
@@ -1043,7 +1043,7 @@ el3_get_stats(struct net_device *dev)
...
@@ -1043,7 +1043,7 @@ 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
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
if
(
el3_debug
>
5
)
if
(
el3_debug
>
5
)
...
@@ -1073,7 +1073,7 @@ static void update_stats(struct net_device *dev)
...
@@ -1073,7 +1073,7 @@ static void update_stats(struct net_device *dev)
static
int
static
int
el3_rx
(
struct
net_device
*
dev
)
el3_rx
(
struct
net_device
*
dev
)
{
{
struct
el3_private
*
lp
=
(
struct
el3_private
*
)
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
short
rx_status
;
short
rx_status
;
...
@@ -1145,7 +1145,7 @@ static void
...
@@ -1145,7 +1145,7 @@ static void
set_multicast_list
(
struct
net_device
*
dev
)
set_multicast_list
(
struct
net_device
*
dev
)
{
{
unsigned
long
flags
;
unsigned
long
flags
;
struct
el3_private
*
lp
=
(
struct
el3_private
*
)
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
if
(
el3_debug
>
1
)
{
if
(
el3_debug
>
1
)
{
...
@@ -1172,7 +1172,7 @@ static int
...
@@ -1172,7 +1172,7 @@ static int
el3_close
(
struct
net_device
*
dev
)
el3_close
(
struct
net_device
*
dev
)
{
{
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
struct
el3_private
*
lp
=
(
struct
el3_private
*
)
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
if
(
el3_debug
>
2
)
if
(
el3_debug
>
2
)
printk
(
"%s: Shutting down ethercard.
\n
"
,
dev
->
name
);
printk
(
"%s: Shutting down ethercard.
\n
"
,
dev
->
name
);
...
@@ -1317,7 +1317,7 @@ static int
...
@@ -1317,7 +1317,7 @@ static int
netdev_ethtool_ioctl
(
struct
net_device
*
dev
,
void
*
useraddr
)
netdev_ethtool_ioctl
(
struct
net_device
*
dev
,
void
*
useraddr
)
{
{
u32
ethcmd
;
u32
ethcmd
;
struct
el3_private
*
lp
=
dev
->
priv
;
struct
el3_private
*
lp
=
netdev_priv
(
dev
)
;
/* dev_ioctl() in ../../net/core/dev.c has already checked
/* dev_ioctl() in ../../net/core/dev.c has already checked
capable(CAP_NET_ADMIN), so don't bother with that here. */
capable(CAP_NET_ADMIN), so don't bother with that here. */
...
@@ -1558,7 +1558,7 @@ el3_suspend(struct pm_dev *pdev)
...
@@ -1558,7 +1558,7 @@ el3_suspend(struct pm_dev *pdev)
return
-
EINVAL
;
return
-
EINVAL
;
dev
=
(
struct
net_device
*
)
pdev
->
data
;
dev
=
(
struct
net_device
*
)
pdev
->
data
;
lp
=
(
struct
el3_private
*
)
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
ioaddr
=
dev
->
base_addr
;
ioaddr
=
dev
->
base_addr
;
spin_lock_irqsave
(
&
lp
->
lock
,
flags
);
spin_lock_irqsave
(
&
lp
->
lock
,
flags
);
...
@@ -1585,7 +1585,7 @@ el3_resume(struct pm_dev *pdev)
...
@@ -1585,7 +1585,7 @@ el3_resume(struct pm_dev *pdev)
return
-
EINVAL
;
return
-
EINVAL
;
dev
=
(
struct
net_device
*
)
pdev
->
data
;
dev
=
(
struct
net_device
*
)
pdev
->
data
;
lp
=
(
struct
el3_private
*
)
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
ioaddr
=
dev
->
base_addr
;
ioaddr
=
dev
->
base_addr
;
spin_lock_irqsave
(
&
lp
->
lock
,
flags
);
spin_lock_irqsave
(
&
lp
->
lock
,
flags
);
...
...
drivers/net/3c527.c
View file @
88c0b8ea
...
@@ -226,7 +226,7 @@ static struct ethtool_ops netdev_ethtool_ops;
...
@@ -226,7 +226,7 @@ static struct ethtool_ops netdev_ethtool_ops;
static
void
cleanup_card
(
struct
net_device
*
dev
)
static
void
cleanup_card
(
struct
net_device
*
dev
)
{
{
struct
mc32_local
*
lp
=
dev
->
priv
;
struct
mc32_local
*
lp
=
netdev_priv
(
dev
)
;
unsigned
slot
=
lp
->
slot
;
unsigned
slot
=
lp
->
slot
;
mca_mark_as_unused
(
slot
);
mca_mark_as_unused
(
slot
);
mca_set_adapter_name
(
slot
,
NULL
);
mca_set_adapter_name
(
slot
,
NULL
);
...
@@ -307,7 +307,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
...
@@ -307,7 +307,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
int
i
,
err
;
int
i
,
err
;
u8
POS
;
u8
POS
;
u32
base
;
u32
base
;
struct
mc32_local
*
lp
=
dev
->
priv
;
struct
mc32_local
*
lp
=
netdev_priv
(
dev
)
;
static
u16
mca_io_bases
[]
=
{
static
u16
mca_io_bases
[]
=
{
0x7280
,
0x7290
,
0x7280
,
0x7290
,
0x7680
,
0x7690
,
0x7680
,
0x7690
,
...
@@ -573,7 +573,7 @@ static inline void mc32_ready_poll(struct net_device *dev)
...
@@ -573,7 +573,7 @@ static inline void mc32_ready_poll(struct net_device *dev)
static
int
mc32_command_nowait
(
struct
net_device
*
dev
,
u16
cmd
,
void
*
data
,
int
len
)
static
int
mc32_command_nowait
(
struct
net_device
*
dev
,
u16
cmd
,
void
*
data
,
int
len
)
{
{
struct
mc32_local
*
lp
=
(
struct
mc32_local
*
)
dev
->
priv
;
struct
mc32_local
*
lp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
int
ret
=
-
1
;
int
ret
=
-
1
;
...
@@ -619,7 +619,7 @@ static int mc32_command_nowait(struct net_device *dev, u16 cmd, void *data, int
...
@@ -619,7 +619,7 @@ static int mc32_command_nowait(struct net_device *dev, u16 cmd, void *data, int
static
int
mc32_command
(
struct
net_device
*
dev
,
u16
cmd
,
void
*
data
,
int
len
)
static
int
mc32_command
(
struct
net_device
*
dev
,
u16
cmd
,
void
*
data
,
int
len
)
{
{
struct
mc32_local
*
lp
=
(
struct
mc32_local
*
)
dev
->
priv
;
struct
mc32_local
*
lp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
int
ret
=
0
;
int
ret
=
0
;
...
@@ -671,7 +671,7 @@ static int mc32_command(struct net_device *dev, u16 cmd, void *data, int len)
...
@@ -671,7 +671,7 @@ static int mc32_command(struct net_device *dev, u16 cmd, void *data, int len)
static
void
mc32_start_transceiver
(
struct
net_device
*
dev
)
{
static
void
mc32_start_transceiver
(
struct
net_device
*
dev
)
{
struct
mc32_local
*
lp
=
(
struct
mc32_local
*
)
dev
->
priv
;
struct
mc32_local
*
lp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
/* Ignore RX overflow on device closure */
/* Ignore RX overflow on device closure */
...
@@ -706,7 +706,7 @@ static void mc32_start_transceiver(struct net_device *dev) {
...
@@ -706,7 +706,7 @@ static void mc32_start_transceiver(struct net_device *dev) {
static
void
mc32_halt_transceiver
(
struct
net_device
*
dev
)
static
void
mc32_halt_transceiver
(
struct
net_device
*
dev
)
{
{
struct
mc32_local
*
lp
=
(
struct
mc32_local
*
)
dev
->
priv
;
struct
mc32_local
*
lp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
mc32_ready_poll
(
dev
);
mc32_ready_poll
(
dev
);
...
@@ -743,7 +743,7 @@ static void mc32_halt_transceiver(struct net_device *dev)
...
@@ -743,7 +743,7 @@ static void mc32_halt_transceiver(struct net_device *dev)
static
int
mc32_load_rx_ring
(
struct
net_device
*
dev
)
static
int
mc32_load_rx_ring
(
struct
net_device
*
dev
)
{
{
struct
mc32_local
*
lp
=
(
struct
mc32_local
*
)
dev
->
priv
;
struct
mc32_local
*
lp
=
netdev_priv
(
dev
)
;
int
i
;
int
i
;
u16
rx_base
;
u16
rx_base
;
volatile
struct
skb_header
*
p
;
volatile
struct
skb_header
*
p
;
...
@@ -792,7 +792,7 @@ static int mc32_load_rx_ring(struct net_device *dev)
...
@@ -792,7 +792,7 @@ static int mc32_load_rx_ring(struct net_device *dev)
static
void
mc32_flush_rx_ring
(
struct
net_device
*
dev
)
static
void
mc32_flush_rx_ring
(
struct
net_device
*
dev
)
{
{
struct
mc32_local
*
lp
=
(
struct
mc32_local
*
)
dev
->
priv
;
struct
mc32_local
*
lp
=
netdev_priv
(
dev
)
;
int
i
;
int
i
;
for
(
i
=
0
;
i
<
RX_RING_LEN
;
i
++
)
for
(
i
=
0
;
i
<
RX_RING_LEN
;
i
++
)
...
@@ -824,7 +824,7 @@ static void mc32_flush_rx_ring(struct net_device *dev)
...
@@ -824,7 +824,7 @@ static void mc32_flush_rx_ring(struct net_device *dev)
static
void
mc32_load_tx_ring
(
struct
net_device
*
dev
)
static
void
mc32_load_tx_ring
(
struct
net_device
*
dev
)
{
{
struct
mc32_local
*
lp
=
(
struct
mc32_local
*
)
dev
->
priv
;
struct
mc32_local
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
skb_header
*
p
;
volatile
struct
skb_header
*
p
;
int
i
;
int
i
;
u16
tx_base
;
u16
tx_base
;
...
@@ -861,7 +861,7 @@ static void mc32_load_tx_ring(struct net_device *dev)
...
@@ -861,7 +861,7 @@ static void mc32_load_tx_ring(struct net_device *dev)
static
void
mc32_flush_tx_ring
(
struct
net_device
*
dev
)
static
void
mc32_flush_tx_ring
(
struct
net_device
*
dev
)
{
{
struct
mc32_local
*
lp
=
(
struct
mc32_local
*
)
dev
->
priv
;
struct
mc32_local
*
lp
=
netdev_priv
(
dev
)
;
int
i
;
int
i
;
for
(
i
=
0
;
i
<
TX_RING_LEN
;
i
++
)
for
(
i
=
0
;
i
<
TX_RING_LEN
;
i
++
)
...
@@ -899,7 +899,7 @@ static void mc32_flush_tx_ring(struct net_device *dev)
...
@@ -899,7 +899,7 @@ static void mc32_flush_tx_ring(struct net_device *dev)
static
int
mc32_open
(
struct
net_device
*
dev
)
static
int
mc32_open
(
struct
net_device
*
dev
)
{
{
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
struct
mc32_local
*
lp
=
(
struct
mc32_local
*
)
dev
->
priv
;
struct
mc32_local
*
lp
=
netdev_priv
(
dev
)
;
u8
one
=
1
;
u8
one
=
1
;
u8
regs
;
u8
regs
;
u16
descnumbuffs
[
2
]
=
{
TX_RING_LEN
,
RX_RING_LEN
};
u16
descnumbuffs
[
2
]
=
{
TX_RING_LEN
,
RX_RING_LEN
};
...
@@ -1022,7 +1022,7 @@ static void mc32_timeout(struct net_device *dev)
...
@@ -1022,7 +1022,7 @@ static void mc32_timeout(struct net_device *dev)
static
int
mc32_send_packet
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
static
int
mc32_send_packet
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
{
struct
mc32_local
*
lp
=
(
struct
mc32_local
*
)
dev
->
priv
;
struct
mc32_local
*
lp
=
netdev_priv
(
dev
)
;
u32
head
=
atomic_read
(
&
lp
->
tx_ring_head
);
u32
head
=
atomic_read
(
&
lp
->
tx_ring_head
);
volatile
struct
skb_header
*
p
,
*
np
;
volatile
struct
skb_header
*
p
,
*
np
;
...
@@ -1092,7 +1092,7 @@ static int mc32_send_packet(struct sk_buff *skb, struct net_device *dev)
...
@@ -1092,7 +1092,7 @@ static int mc32_send_packet(struct sk_buff *skb, struct net_device *dev)
static
void
mc32_update_stats
(
struct
net_device
*
dev
)
static
void
mc32_update_stats
(
struct
net_device
*
dev
)
{
{
struct
mc32_local
*
lp
=
(
struct
mc32_local
*
)
dev
->
priv
;
struct
mc32_local
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
mc32_stats
*
st
=
lp
->
stats
;
volatile
struct
mc32_stats
*
st
=
lp
->
stats
;
u32
rx_errors
=
0
;
u32
rx_errors
=
0
;
...
@@ -1143,7 +1143,7 @@ static void mc32_update_stats(struct net_device *dev)
...
@@ -1143,7 +1143,7 @@ static void mc32_update_stats(struct net_device *dev)
static
void
mc32_rx_ring
(
struct
net_device
*
dev
)
static
void
mc32_rx_ring
(
struct
net_device
*
dev
)
{
{
struct
mc32_local
*
lp
=
dev
->
priv
;
struct
mc32_local
*
lp
=
netdev_priv
(
dev
);
volatile
struct
skb_header
*
p
;
volatile
struct
skb_header
*
p
;
u16
rx_ring_tail
;
u16
rx_ring_tail
;
u16
rx_old_tail
;
u16
rx_old_tail
;
...
@@ -1236,7 +1236,7 @@ static void mc32_rx_ring(struct net_device *dev)
...
@@ -1236,7 +1236,7 @@ static void mc32_rx_ring(struct net_device *dev)
static
void
mc32_tx_ring
(
struct
net_device
*
dev
)
static
void
mc32_tx_ring
(
struct
net_device
*
dev
)
{
{
struct
mc32_local
*
lp
=
(
struct
mc32_local
*
)
dev
->
priv
;
struct
mc32_local
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
skb_header
*
np
;
volatile
struct
skb_header
*
np
;
/*
/*
...
@@ -1333,7 +1333,7 @@ static irqreturn_t mc32_interrupt(int irq, void *dev_id, struct pt_regs * regs)
...
@@ -1333,7 +1333,7 @@ static irqreturn_t mc32_interrupt(int irq, void *dev_id, struct pt_regs * regs)
}
}
ioaddr
=
dev
->
base_addr
;
ioaddr
=
dev
->
base_addr
;
lp
=
(
struct
mc32_local
*
)
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
/* See whats cooking */
/* See whats cooking */
...
@@ -1450,7 +1450,7 @@ static irqreturn_t mc32_interrupt(int irq, void *dev_id, struct pt_regs * regs)
...
@@ -1450,7 +1450,7 @@ static irqreturn_t mc32_interrupt(int irq, void *dev_id, struct pt_regs * regs)
static
int
mc32_close
(
struct
net_device
*
dev
)
static
int
mc32_close
(
struct
net_device
*
dev
)
{
{
struct
mc32_local
*
lp
=
(
struct
mc32_local
*
)
dev
->
priv
;
struct
mc32_local
*
lp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
u8
regs
;
u8
regs
;
...
@@ -1499,7 +1499,7 @@ static int mc32_close(struct net_device *dev)
...
@@ -1499,7 +1499,7 @@ static int mc32_close(struct net_device *dev)
static
struct
net_device_stats
*
mc32_get_stats
(
struct
net_device
*
dev
)
static
struct
net_device_stats
*
mc32_get_stats
(
struct
net_device
*
dev
)
{
{
struct
mc32_local
*
lp
=
(
struct
mc32_local
*
)
dev
->
priv
;
struct
mc32_local
*
lp
=
netdev_priv
(
dev
)
;
mc32_update_stats
(
dev
);
mc32_update_stats
(
dev
);
return
&
lp
->
net_stats
;
return
&
lp
->
net_stats
;
...
@@ -1531,7 +1531,7 @@ static struct net_device_stats *mc32_get_stats(struct net_device *dev)
...
@@ -1531,7 +1531,7 @@ static struct net_device_stats *mc32_get_stats(struct net_device *dev)
static
void
do_mc32_set_multicast_list
(
struct
net_device
*
dev
,
int
retry
)
static
void
do_mc32_set_multicast_list
(
struct
net_device
*
dev
,
int
retry
)
{
{
struct
mc32_local
*
lp
=
(
struct
mc32_local
*
)
dev
->
priv
;
struct
mc32_local
*
lp
=
netdev_priv
(
dev
)
;
u16
filt
=
(
1
<<
2
);
/* Save Bad Packets, for stats purposes */
u16
filt
=
(
1
<<
2
);
/* Save Bad Packets, for stats purposes */
if
(
dev
->
flags
&
IFF_PROMISC
)
if
(
dev
->
flags
&
IFF_PROMISC
)
...
...
drivers/net/3c59x.c
View file @
88c0b8ea
...
@@ -1013,7 +1013,7 @@ static int vortex_eisa_remove (struct device *device)
...
@@ -1013,7 +1013,7 @@ static int vortex_eisa_remove (struct device *device)
BUG
();
BUG
();
}
}
vp
=
dev
->
priv
;
vp
=
netdev_priv
(
dev
)
;
ioaddr
=
dev
->
base_addr
;
ioaddr
=
dev
->
base_addr
;
unregister_netdev
(
dev
);
unregister_netdev
(
dev
);
...
@@ -1115,7 +1115,7 @@ static int __devinit vortex_probe1(struct device *gendev,
...
@@ -1115,7 +1115,7 @@ static int __devinit vortex_probe1(struct device *gendev,
}
}
SET_MODULE_OWNER
(
dev
);
SET_MODULE_OWNER
(
dev
);
SET_NETDEV_DEV
(
dev
,
gendev
);
SET_NETDEV_DEV
(
dev
,
gendev
);
vp
=
dev
->
priv
;
vp
=
netdev_priv
(
dev
)
;
option
=
global_options
;
option
=
global_options
;
...
@@ -1516,7 +1516,7 @@ static void
...
@@ -1516,7 +1516,7 @@ static void
vortex_up
(
struct
net_device
*
dev
)
vortex_up
(
struct
net_device
*
dev
)
{
{
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
struct
vortex_private
*
vp
=
(
struct
vortex_private
*
)
dev
->
priv
;
struct
vortex_private
*
vp
=
netdev_priv
(
dev
)
;
unsigned
int
config
;
unsigned
int
config
;
int
i
;
int
i
;
...
@@ -1714,7 +1714,7 @@ vortex_up(struct net_device *dev)
...
@@ -1714,7 +1714,7 @@ vortex_up(struct net_device *dev)
static
int
static
int
vortex_open
(
struct
net_device
*
dev
)
vortex_open
(
struct
net_device
*
dev
)
{
{
struct
vortex_private
*
vp
=
(
struct
vortex_private
*
)
dev
->
priv
;
struct
vortex_private
*
vp
=
netdev_priv
(
dev
)
;
int
i
;
int
i
;
int
retval
;
int
retval
;
...
@@ -1772,7 +1772,7 @@ static void
...
@@ -1772,7 +1772,7 @@ static void
vortex_timer
(
unsigned
long
data
)
vortex_timer
(
unsigned
long
data
)
{
{
struct
net_device
*
dev
=
(
struct
net_device
*
)
data
;
struct
net_device
*
dev
=
(
struct
net_device
*
)
data
;
struct
vortex_private
*
vp
=
(
struct
vortex_private
*
)
dev
->
priv
;
struct
vortex_private
*
vp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
int
next_tick
=
60
*
HZ
;
int
next_tick
=
60
*
HZ
;
int
ok
=
0
;
int
ok
=
0
;
...
@@ -1898,7 +1898,7 @@ vortex_timer(unsigned long data)
...
@@ -1898,7 +1898,7 @@ vortex_timer(unsigned long data)
static
void
vortex_tx_timeout
(
struct
net_device
*
dev
)
static
void
vortex_tx_timeout
(
struct
net_device
*
dev
)
{
{
struct
vortex_private
*
vp
=
(
struct
vortex_private
*
)
dev
->
priv
;
struct
vortex_private
*
vp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
printk
(
KERN_ERR
"%s: transmit timed out, tx_status %2.2x status %4.4x.
\n
"
,
printk
(
KERN_ERR
"%s: transmit timed out, tx_status %2.2x status %4.4x.
\n
"
,
...
@@ -1968,7 +1968,7 @@ static void vortex_tx_timeout(struct net_device *dev)
...
@@ -1968,7 +1968,7 @@ static void vortex_tx_timeout(struct net_device *dev)
static
void
static
void
vortex_error
(
struct
net_device
*
dev
,
int
status
)
vortex_error
(
struct
net_device
*
dev
,
int
status
)
{
{
struct
vortex_private
*
vp
=
(
struct
vortex_private
*
)
dev
->
priv
;
struct
vortex_private
*
vp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
int
do_tx_reset
=
0
,
reset_mask
=
0
;
int
do_tx_reset
=
0
,
reset_mask
=
0
;
unsigned
char
tx_status
=
0
;
unsigned
char
tx_status
=
0
;
...
@@ -2070,7 +2070,7 @@ vortex_error(struct net_device *dev, int status)
...
@@ -2070,7 +2070,7 @@ vortex_error(struct net_device *dev, int status)
static
int
static
int
vortex_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
vortex_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
{
struct
vortex_private
*
vp
=
(
struct
vortex_private
*
)
dev
->
priv
;
struct
vortex_private
*
vp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
/* Put out the doubleword header... */
/* Put out the doubleword header... */
...
@@ -2125,7 +2125,7 @@ vortex_start_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -2125,7 +2125,7 @@ vortex_start_xmit(struct sk_buff *skb, struct net_device *dev)
static
int
static
int
boomerang_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
boomerang_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
{
struct
vortex_private
*
vp
=
(
struct
vortex_private
*
)
dev
->
priv
;
struct
vortex_private
*
vp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
/* Calculate the next Tx descriptor entry. */
/* Calculate the next Tx descriptor entry. */
int
entry
=
vp
->
cur_tx
%
TX_RING_SIZE
;
int
entry
=
vp
->
cur_tx
%
TX_RING_SIZE
;
...
@@ -2225,7 +2225,7 @@ static irqreturn_t
...
@@ -2225,7 +2225,7 @@ static irqreturn_t
vortex_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
vortex_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
{
struct
net_device
*
dev
=
dev_id
;
struct
net_device
*
dev
=
dev_id
;
struct
vortex_private
*
vp
=
(
struct
vortex_private
*
)
dev
->
priv
;
struct
vortex_private
*
vp
=
netdev_priv
(
dev
)
;
long
ioaddr
;
long
ioaddr
;
int
status
;
int
status
;
int
work_done
=
max_interrupt_work
;
int
work_done
=
max_interrupt_work
;
...
@@ -2330,7 +2330,7 @@ static irqreturn_t
...
@@ -2330,7 +2330,7 @@ static irqreturn_t
boomerang_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
boomerang_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
{
struct
net_device
*
dev
=
dev_id
;
struct
net_device
*
dev
=
dev_id
;
struct
vortex_private
*
vp
=
(
struct
vortex_private
*
)
dev
->
priv
;
struct
vortex_private
*
vp
=
netdev_priv
(
dev
)
;
long
ioaddr
;
long
ioaddr
;
int
status
;
int
status
;
int
work_done
=
max_interrupt_work
;
int
work_done
=
max_interrupt_work
;
...
@@ -2455,7 +2455,7 @@ boomerang_interrupt(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -2455,7 +2455,7 @@ boomerang_interrupt(int irq, void *dev_id, struct pt_regs *regs)
static
int
vortex_rx
(
struct
net_device
*
dev
)
static
int
vortex_rx
(
struct
net_device
*
dev
)
{
{
struct
vortex_private
*
vp
=
(
struct
vortex_private
*
)
dev
->
priv
;
struct
vortex_private
*
vp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
int
i
;
int
i
;
short
rx_status
;
short
rx_status
;
...
@@ -2525,7 +2525,7 @@ static int vortex_rx(struct net_device *dev)
...
@@ -2525,7 +2525,7 @@ static int vortex_rx(struct net_device *dev)
static
int
static
int
boomerang_rx
(
struct
net_device
*
dev
)
boomerang_rx
(
struct
net_device
*
dev
)
{
{
struct
vortex_private
*
vp
=
(
struct
vortex_private
*
)
dev
->
priv
;
struct
vortex_private
*
vp
=
netdev_priv
(
dev
)
;
int
entry
=
vp
->
cur_rx
%
RX_RING_SIZE
;
int
entry
=
vp
->
cur_rx
%
RX_RING_SIZE
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
int
rx_status
;
int
rx_status
;
...
@@ -2627,7 +2627,7 @@ static void
...
@@ -2627,7 +2627,7 @@ static void
rx_oom_timer
(
unsigned
long
arg
)
rx_oom_timer
(
unsigned
long
arg
)
{
{
struct
net_device
*
dev
=
(
struct
net_device
*
)
arg
;
struct
net_device
*
dev
=
(
struct
net_device
*
)
arg
;
struct
vortex_private
*
vp
=
(
struct
vortex_private
*
)
dev
->
priv
;
struct
vortex_private
*
vp
=
netdev_priv
(
dev
)
;
spin_lock_irq
(
&
vp
->
lock
);
spin_lock_irq
(
&
vp
->
lock
);
if
((
vp
->
cur_rx
-
vp
->
dirty_rx
)
==
RX_RING_SIZE
)
/* This test is redundant, but makes me feel good */
if
((
vp
->
cur_rx
-
vp
->
dirty_rx
)
==
RX_RING_SIZE
)
/* This test is redundant, but makes me feel good */
...
@@ -2642,7 +2642,7 @@ rx_oom_timer(unsigned long arg)
...
@@ -2642,7 +2642,7 @@ rx_oom_timer(unsigned long arg)
static
void
static
void
vortex_down
(
struct
net_device
*
dev
)
vortex_down
(
struct
net_device
*
dev
)
{
{
struct
vortex_private
*
vp
=
(
struct
vortex_private
*
)
dev
->
priv
;
struct
vortex_private
*
vp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
netif_stop_queue
(
dev
);
netif_stop_queue
(
dev
);
...
@@ -2678,7 +2678,7 @@ vortex_down(struct net_device *dev)
...
@@ -2678,7 +2678,7 @@ vortex_down(struct net_device *dev)
static
int
static
int
vortex_close
(
struct
net_device
*
dev
)
vortex_close
(
struct
net_device
*
dev
)
{
{
struct
vortex_private
*
vp
=
(
struct
vortex_private
*
)
dev
->
priv
;
struct
vortex_private
*
vp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
int
i
;
int
i
;
...
@@ -2740,7 +2740,7 @@ static void
...
@@ -2740,7 +2740,7 @@ static void
dump_tx_ring
(
struct
net_device
*
dev
)
dump_tx_ring
(
struct
net_device
*
dev
)
{
{
if
(
vortex_debug
>
0
)
{
if
(
vortex_debug
>
0
)
{
struct
vortex_private
*
vp
=
(
struct
vortex_private
*
)
dev
->
priv
;
struct
vortex_private
*
vp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
if
(
vp
->
full_bus_master_tx
)
{
if
(
vp
->
full_bus_master_tx
)
{
...
@@ -2773,7 +2773,7 @@ dump_tx_ring(struct net_device *dev)
...
@@ -2773,7 +2773,7 @@ dump_tx_ring(struct net_device *dev)
static
struct
net_device_stats
*
vortex_get_stats
(
struct
net_device
*
dev
)
static
struct
net_device_stats
*
vortex_get_stats
(
struct
net_device
*
dev
)
{
{
struct
vortex_private
*
vp
=
(
struct
vortex_private
*
)
dev
->
priv
;
struct
vortex_private
*
vp
=
netdev_priv
(
dev
)
;
unsigned
long
flags
;
unsigned
long
flags
;
if
(
netif_device_present
(
dev
))
{
/* AKPM: Used to be netif_running */
if
(
netif_device_present
(
dev
))
{
/* AKPM: Used to be netif_running */
...
@@ -2793,7 +2793,7 @@ static struct net_device_stats *vortex_get_stats(struct net_device *dev)
...
@@ -2793,7 +2793,7 @@ static struct net_device_stats *vortex_get_stats(struct net_device *dev)
*/
*/
static
void
update_stats
(
long
ioaddr
,
struct
net_device
*
dev
)
static
void
update_stats
(
long
ioaddr
,
struct
net_device
*
dev
)
{
{
struct
vortex_private
*
vp
=
(
struct
vortex_private
*
)
dev
->
priv
;
struct
vortex_private
*
vp
=
netdev_priv
(
dev
)
;
int
old_window
=
inw
(
ioaddr
+
EL3_CMD
);
int
old_window
=
inw
(
ioaddr
+
EL3_CMD
);
if
(
old_window
==
0xffff
)
/* Chip suspended or ejected. */
if
(
old_window
==
0xffff
)
/* Chip suspended or ejected. */
...
@@ -2834,7 +2834,7 @@ static void update_stats(long ioaddr, struct net_device *dev)
...
@@ -2834,7 +2834,7 @@ static void update_stats(long ioaddr, struct net_device *dev)
static
void
vortex_get_drvinfo
(
struct
net_device
*
dev
,
static
void
vortex_get_drvinfo
(
struct
net_device
*
dev
,
struct
ethtool_drvinfo
*
info
)
struct
ethtool_drvinfo
*
info
)
{
{
struct
vortex_private
*
vp
=
dev
->
priv
;
struct
vortex_private
*
vp
=
netdev_priv
(
dev
)
;
strcpy
(
info
->
driver
,
DRV_NAME
);
strcpy
(
info
->
driver
,
DRV_NAME
);
strcpy
(
info
->
version
,
DRV_VERSION
);
strcpy
(
info
->
version
,
DRV_VERSION
);
...
@@ -2855,7 +2855,7 @@ static struct ethtool_ops vortex_ethtool_ops = {
...
@@ -2855,7 +2855,7 @@ static struct ethtool_ops vortex_ethtool_ops = {
static
int
vortex_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
)
static
int
vortex_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
)
{
{
struct
vortex_private
*
vp
=
(
struct
vortex_private
*
)
dev
->
priv
;
struct
vortex_private
*
vp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
struct
mii_ioctl_data
*
data
=
(
struct
mii_ioctl_data
*
)
&
rq
->
ifr_data
;
struct
mii_ioctl_data
*
data
=
(
struct
mii_ioctl_data
*
)
&
rq
->
ifr_data
;
int
phy
=
vp
->
phys
[
0
]
&
0x1f
;
int
phy
=
vp
->
phys
[
0
]
&
0x1f
;
...
@@ -2942,7 +2942,7 @@ static void mdio_sync(long ioaddr, int bits)
...
@@ -2942,7 +2942,7 @@ static void mdio_sync(long ioaddr, int bits)
static
int
mdio_read
(
struct
net_device
*
dev
,
int
phy_id
,
int
location
)
static
int
mdio_read
(
struct
net_device
*
dev
,
int
phy_id
,
int
location
)
{
{
struct
vortex_private
*
vp
=
(
struct
vortex_private
*
)
dev
->
priv
;
struct
vortex_private
*
vp
=
netdev_priv
(
dev
)
;
int
i
;
int
i
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
int
read_cmd
=
(
0xf6
<<
10
)
|
(
phy_id
<<
5
)
|
location
;
int
read_cmd
=
(
0xf6
<<
10
)
|
(
phy_id
<<
5
)
|
location
;
...
@@ -2976,7 +2976,7 @@ static int mdio_read(struct net_device *dev, int phy_id, int location)
...
@@ -2976,7 +2976,7 @@ static int mdio_read(struct net_device *dev, int phy_id, int location)
static
void
mdio_write
(
struct
net_device
*
dev
,
int
phy_id
,
int
location
,
int
value
)
static
void
mdio_write
(
struct
net_device
*
dev
,
int
phy_id
,
int
location
,
int
value
)
{
{
struct
vortex_private
*
vp
=
(
struct
vortex_private
*
)
dev
->
priv
;
struct
vortex_private
*
vp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
int
write_cmd
=
0x50020000
|
(
phy_id
<<
23
)
|
(
location
<<
18
)
|
value
;
int
write_cmd
=
0x50020000
|
(
phy_id
<<
23
)
|
(
location
<<
18
)
|
value
;
long
mdio_addr
=
ioaddr
+
Wn4_PhysicalMgmt
;
long
mdio_addr
=
ioaddr
+
Wn4_PhysicalMgmt
;
...
@@ -3010,7 +3010,7 @@ static void mdio_write(struct net_device *dev, int phy_id, int location, int val
...
@@ -3010,7 +3010,7 @@ static void mdio_write(struct net_device *dev, int phy_id, int location, int val
/* Set Wake-On-LAN mode and put the board into D3 (power-down) state. */
/* Set Wake-On-LAN mode and put the board into D3 (power-down) state. */
static
void
acpi_set_WOL
(
struct
net_device
*
dev
)
static
void
acpi_set_WOL
(
struct
net_device
*
dev
)
{
{
struct
vortex_private
*
vp
=
(
struct
vortex_private
*
)
dev
->
priv
;
struct
vortex_private
*
vp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
/* Power up on: 1==Downloaded Filter, 2==Magic Packets, 4==Link Status. */
/* Power up on: 1==Downloaded Filter, 2==Magic Packets, 4==Link Status. */
...
@@ -3036,7 +3036,7 @@ static void __devexit vortex_remove_one (struct pci_dev *pdev)
...
@@ -3036,7 +3036,7 @@ static void __devexit vortex_remove_one (struct pci_dev *pdev)
BUG
();
BUG
();
}
}
vp
=
dev
->
priv
;
vp
=
netdev_priv
(
dev
)
;
/* AKPM: FIXME: we should have
/* AKPM: FIXME: we should have
* if (vp->cb_fn_base) iounmap(vp->cb_fn_base);
* if (vp->cb_fn_base) iounmap(vp->cb_fn_base);
...
...
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