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
184915a8
Commit
184915a8
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/ lance drivers
parent
88c0b8ea
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
84 additions
and
84 deletions
+84
-84
drivers/net/7990.c
drivers/net/7990.c
+11
-11
drivers/net/a2065.c
drivers/net/a2065.c
+13
-13
drivers/net/atari_pamsnet.c
drivers/net/atari_pamsnet.c
+6
-6
drivers/net/bagetlance.c
drivers/net/bagetlance.c
+10
-10
drivers/net/declance.c
drivers/net/declance.c
+13
-13
drivers/net/hplance.c
drivers/net/hplance.c
+5
-5
drivers/net/sun3lance.c
drivers/net/sun3lance.c
+9
-9
drivers/net/sunlance.c
drivers/net/sunlance.c
+17
-17
No files found.
drivers/net/7990.c
View file @
184915a8
...
...
@@ -99,7 +99,7 @@ static void load_csrs (struct lance_private *lp)
/* Set up the Lance Rx and Tx rings and the init block */
static
void
lance_init_ring
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_init_block
*
ib
=
lp
->
init_block
;
volatile
struct
lance_init_block
*
aib
;
/* for LANCE_ADDR computations */
int
leptr
;
...
...
@@ -216,7 +216,7 @@ static int init_restart_lance (struct lance_private *lp)
static
int
lance_reset
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
int
status
;
DECLARE_LL
;
...
...
@@ -236,7 +236,7 @@ static int lance_reset (struct net_device *dev)
static
int
lance_rx
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_init_block
*
ib
=
lp
->
init_block
;
volatile
struct
lance_rx_desc
*
rd
;
unsigned
char
bits
;
...
...
@@ -316,7 +316,7 @@ static int lance_rx (struct net_device *dev)
static
int
lance_tx
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_init_block
*
ib
=
lp
->
init_block
;
volatile
struct
lance_tx_desc
*
td
;
int
i
,
j
;
...
...
@@ -401,7 +401,7 @@ static irqreturn_t
lance_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
struct
net_device
*
dev
=
(
struct
net_device
*
)
dev_id
;
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
int
csr0
;
DECLARE_LL
;
...
...
@@ -457,7 +457,7 @@ lance_interrupt (int irq, void *dev_id, struct pt_regs *regs)
int
lance_open
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
int
res
;
DECLARE_LL
;
...
...
@@ -474,7 +474,7 @@ int lance_open (struct net_device *dev)
int
lance_close
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
DECLARE_LL
;
netif_stop_queue
(
dev
);
...
...
@@ -499,7 +499,7 @@ void lance_tx_timeout(struct net_device *dev)
int
lance_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_init_block
*
ib
=
lp
->
init_block
;
int
entry
,
skblen
,
len
;
static
int
outs
;
...
...
@@ -556,7 +556,7 @@ int lance_start_xmit (struct sk_buff *skb, struct net_device *dev)
struct
net_device_stats
*
lance_get_stats
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
return
&
lp
->
stats
;
}
...
...
@@ -564,7 +564,7 @@ struct net_device_stats *lance_get_stats (struct net_device *dev)
/* taken from the depca driver via a2065.c */
static
void
lance_load_multicast
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_init_block
*
ib
=
lp
->
init_block
;
volatile
u16
*
mcast_table
=
(
u16
*
)
&
ib
->
filter
;
struct
dev_mc_list
*
dmi
=
dev
->
mc_list
;
...
...
@@ -601,7 +601,7 @@ static void lance_load_multicast (struct net_device *dev)
void
lance_set_multicast
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_init_block
*
ib
=
lp
->
init_block
;
int
stopped
;
DECLARE_LL
;
...
...
drivers/net/a2065.c
View file @
184915a8
...
...
@@ -164,7 +164,7 @@ static void load_csrs (struct lance_private *lp)
/* Setup the Lance Rx and Tx rings */
static
void
lance_init_ring
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_init_block
*
ib
=
lp
->
init_block
;
volatile
struct
lance_init_block
*
aib
;
/* for LANCE_ADDR computations */
int
leptr
;
...
...
@@ -265,7 +265,7 @@ static int init_restart_lance (struct lance_private *lp)
static
int
lance_rx
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_init_block
*
ib
=
lp
->
init_block
;
volatile
struct
lance_regs
*
ll
=
lp
->
ll
;
volatile
struct
lance_rx_desc
*
rd
;
...
...
@@ -342,7 +342,7 @@ static int lance_rx (struct net_device *dev)
static
int
lance_tx
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_init_block
*
ib
=
lp
->
init_block
;
volatile
struct
lance_regs
*
ll
=
lp
->
ll
;
volatile
struct
lance_tx_desc
*
td
;
...
...
@@ -433,7 +433,7 @@ lance_interrupt (int irq, void *dev_id, struct pt_regs *regs)
dev
=
(
struct
net_device
*
)
dev_id
;
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
ll
=
lp
->
ll
;
ll
->
rap
=
LE_CSR0
;
/* LANCE Controller Status */
...
...
@@ -481,7 +481,7 @@ struct net_device *last_dev = 0;
static
int
lance_open
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_regs
*
ll
=
lp
->
ll
;
int
ret
;
...
...
@@ -506,7 +506,7 @@ static int lance_open (struct net_device *dev)
static
int
lance_close
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_regs
*
ll
=
lp
->
ll
;
netif_stop_queue
(
dev
);
...
...
@@ -522,7 +522,7 @@ static int lance_close (struct net_device *dev)
static
inline
int
lance_reset
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_regs
*
ll
=
lp
->
ll
;
int
status
;
...
...
@@ -545,7 +545,7 @@ static inline int lance_reset (struct net_device *dev)
static
void
lance_tx_timeout
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_regs
*
ll
=
lp
->
ll
;
printk
(
KERN_ERR
"%s: transmit timed out, status %04x, reset
\n
"
,
...
...
@@ -556,7 +556,7 @@ static void lance_tx_timeout(struct net_device *dev)
static
int
lance_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_regs
*
ll
=
lp
->
ll
;
volatile
struct
lance_init_block
*
ib
=
lp
->
init_block
;
int
entry
,
skblen
,
len
;
...
...
@@ -624,7 +624,7 @@ static int lance_start_xmit (struct sk_buff *skb, struct net_device *dev)
static
struct
net_device_stats
*
lance_get_stats
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
return
&
lp
->
stats
;
}
...
...
@@ -632,7 +632,7 @@ static struct net_device_stats *lance_get_stats (struct net_device *dev)
/* taken from the depca driver */
static
void
lance_load_multicast
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_init_block
*
ib
=
lp
->
init_block
;
volatile
u16
*
mcast_table
=
(
u16
*
)
&
ib
->
filter
;
struct
dev_mc_list
*
dmi
=
dev
->
mc_list
;
...
...
@@ -668,7 +668,7 @@ static void lance_load_multicast (struct net_device *dev)
static
void
lance_set_multicast
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_init_block
*
ib
=
lp
->
init_block
;
volatile
struct
lance_regs
*
ll
=
lp
->
ll
;
...
...
@@ -748,7 +748,7 @@ static int __devinit a2065_init_one(struct zorro_dev *z,
}
SET_MODULE_OWNER
(
dev
);
priv
=
dev
->
priv
;
priv
=
netdev_priv
(
dev
)
;
r1
->
name
=
dev
->
name
;
r2
->
name
=
dev
->
name
;
...
...
drivers/net/atari_pamsnet.c
View file @
184915a8
...
...
@@ -667,7 +667,7 @@ struct net_device * __init pamsnet_probe (int unit)
*/
static
int
pamsnet_open
(
struct
net_device
*
dev
)
{
struct
net_local
*
lp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
lp
=
netdev_priv
(
dev
)
;
if
(
pamsnet_debug
>
0
)
printk
(
"pamsnet_open
\n
"
);
...
...
@@ -696,7 +696,7 @@ pamsnet_open(struct net_device *dev) {
static
int
pamsnet_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
)
;
unsigned
long
flags
;
/* Block a timer-based transmit from overlapping. This could better be
...
...
@@ -742,7 +742,7 @@ pamsnet_send_packet(struct sk_buff *skb, struct net_device *dev) {
*/
static
void
pamsnet_poll_rx
(
struct
net_device
*
dev
)
{
struct
net_local
*
lp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
lp
=
netdev_priv
(
dev
)
;
int
boguscount
;
int
pkt_len
;
struct
sk_buff
*
skb
;
...
...
@@ -817,7 +817,7 @@ pamsnet_poll_rx(struct net_device *dev) {
static
void
pamsnet_tick
(
unsigned
long
data
)
{
struct
net_device
*
dev
=
(
struct
net_device
*
)
data
;
struct
net_local
*
lp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
lp
=
netdev_priv
(
dev
)
;
if
(
pamsnet_debug
>
0
&&
(
lp
->
open_time
++
&
7
)
==
8
)
printk
(
"pamsnet_tick: %ld
\n
"
,
lp
->
open_time
);
...
...
@@ -832,7 +832,7 @@ pamsnet_tick(unsigned long data) {
*/
static
int
pamsnet_close
(
struct
net_device
*
dev
)
{
struct
net_local
*
lp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
lp
=
netdev_priv
(
dev
)
;
if
(
pamsnet_debug
>
0
)
printk
(
"pamsnet_close, open_time=%ld
\n
"
,
lp
->
open_time
);
...
...
@@ -859,7 +859,7 @@ pamsnet_close(struct net_device *dev) {
*/
static
struct
net_device_stats
*
net_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
;
}
...
...
drivers/net/bagetlance.c
View file @
184915a8
...
...
@@ -594,7 +594,7 @@ static int __init lance_probe1( struct net_device *dev,
return
(
0
);
probe_ok:
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
MEM
=
(
struct
lance_memory
*
)
memaddr
;
IO
=
lp
->
iobase
=
(
struct
lance_ioreg
*
)
ioaddr
;
dev
->
base_addr
=
(
unsigned
long
)
ioaddr
;
/* informational only */
...
...
@@ -736,7 +736,7 @@ static int __init lance_probe1( struct net_device *dev,
static
int
lance_open
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
{
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
struct
lance_ioreg
*
IO
=
lp
->
iobase
;
int
i
;
...
...
@@ -778,7 +778,7 @@ static int lance_open( struct net_device *dev )
static
void
lance_init_ring
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
{
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
int
i
;
unsigned
offset
;
...
...
@@ -834,7 +834,7 @@ static void lance_init_ring( struct net_device *dev )
static
int
lance_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
{
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
struct
lance_ioreg
*
IO
=
lp
->
iobase
;
int
entry
,
len
;
struct
lance_tx_head
*
head
;
...
...
@@ -988,7 +988,7 @@ static irqreturn_t lance_interrupt( int irq, void *dev_id, struct pt_regs *fp)
return
IRQ_NONE
;
}
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
IO
=
lp
->
iobase
;
AREG
=
CSR0
;
...
...
@@ -1101,7 +1101,7 @@ static irqreturn_t lance_interrupt( int irq, void *dev_id, struct pt_regs *fp)
static
int
lance_rx
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
{
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
int
entry
=
lp
->
cur_rx
&
RX_RING_MOD_MASK
;
int
i
;
...
...
@@ -1225,7 +1225,7 @@ static int lance_rx( struct net_device *dev )
static
int
lance_close
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
{
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
struct
lance_ioreg
*
IO
=
lp
->
iobase
;
dev
->
start
=
0
;
...
...
@@ -1247,7 +1247,7 @@ static int lance_close( struct net_device *dev )
static
struct
net_device_stats
*
lance_get_stats
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
return
&
lp
->
stats
;
}
...
...
@@ -1261,7 +1261,7 @@ static struct net_device_stats *lance_get_stats( struct net_device *dev )
static
void
set_multicast_list
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
{
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
struct
lance_ioreg
*
IO
=
lp
->
iobase
;
if
(
!
dev
->
start
)
...
...
@@ -1303,7 +1303,7 @@ static void set_multicast_list( struct net_device *dev )
static
int
lance_set_mac_address
(
struct
net_device
*
dev
,
void
*
addr
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
{
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
struct
sockaddr
*
saddr
=
addr
;
int
i
;
...
...
drivers/net/declance.c
View file @
184915a8
...
...
@@ -433,7 +433,7 @@ void cp_from_buf(const int type, void *to, const void *from, int len)
/* Setup the Lance Rx and Tx rings */
static
void
lance_init_ring
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_init_block
*
ib
;
int
leptr
;
int
i
;
...
...
@@ -530,7 +530,7 @@ static int init_restart_lance(struct lance_private *lp)
static
int
lance_rx
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_init_block
*
ib
;
volatile
struct
lance_rx_desc
*
rd
=
0
;
unsigned
char
bits
;
...
...
@@ -617,7 +617,7 @@ static int lance_rx(struct net_device *dev)
static
void
lance_tx
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_init_block
*
ib
;
volatile
struct
lance_regs
*
ll
=
lp
->
ll
;
volatile
struct
lance_tx_desc
*
td
;
...
...
@@ -709,7 +709,7 @@ static irqreturn_t
lance_interrupt
(
const
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
struct
net_device
*
dev
=
(
struct
net_device
*
)
dev_id
;
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_regs
*
ll
=
lp
->
ll
;
int
csr0
;
...
...
@@ -757,7 +757,7 @@ struct net_device *last_dev = 0;
static
int
lance_open
(
struct
net_device
*
dev
)
{
volatile
struct
lance_init_block
*
ib
=
(
struct
lance_init_block
*
)
(
dev
->
mem_start
);
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_regs
*
ll
=
lp
->
ll
;
int
status
=
0
;
...
...
@@ -822,7 +822,7 @@ static int lance_open(struct net_device *dev)
static
int
lance_close
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_regs
*
ll
=
lp
->
ll
;
netif_stop_queue
(
dev
);
...
...
@@ -856,7 +856,7 @@ static int lance_close(struct net_device *dev)
static
inline
int
lance_reset
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_regs
*
ll
=
lp
->
ll
;
int
status
;
...
...
@@ -873,7 +873,7 @@ static inline int lance_reset(struct net_device *dev)
static
void
lance_tx_timeout
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_regs
*
ll
=
lp
->
ll
;
printk
(
KERN_ERR
"%s: transmit timed out, status %04x, reset
\n
"
,
...
...
@@ -884,7 +884,7 @@ static void lance_tx_timeout(struct net_device *dev)
static
int
lance_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_regs
*
ll
=
lp
->
ll
;
volatile
struct
lance_init_block
*
ib
=
(
struct
lance_init_block
*
)
(
dev
->
mem_start
);
int
entry
,
skblen
,
len
;
...
...
@@ -936,7 +936,7 @@ static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
static
struct
net_device_stats
*
lance_get_stats
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
return
&
lp
->
stats
;
}
...
...
@@ -982,7 +982,7 @@ static void lance_load_multicast(struct net_device *dev)
static
void
lance_set_multicast
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_init_block
*
ib
;
volatile
struct
lance_regs
*
ll
=
lp
->
ll
;
...
...
@@ -1048,7 +1048,7 @@ static int __init dec_lance_init(const int type, const int slot)
* alloc_etherdev ensures the data structures used by the LANCE
* are aligned.
*/
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
spin_lock_init
(
&
lp
->
lock
);
lp
->
type
=
type
;
...
...
@@ -1287,7 +1287,7 @@ static void __exit dec_lance_cleanup(void)
{
while
(
root_lance_dev
)
{
struct
net_device
*
dev
=
root_lance_dev
;
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
unregister_netdev
(
dev
);
#ifdef CONFIG_TC
if
(
lp
->
slot
>=
0
)
...
...
drivers/net/hplance.c
View file @
184915a8
...
...
@@ -63,7 +63,7 @@ static struct hplance_private *root_hplance_dev;
static
void
cleanup_card
(
struct
net_device
*
dev
)
{
struct
hplance_private
*
lp
=
dev
->
priv
;
struct
hplance_private
*
lp
=
netdev_priv
(
dev
)
;
dio_unconfig_board
(
lp
->
scode
);
}
...
...
@@ -97,7 +97,7 @@ struct net_device * __init hplance_probe(int unit)
dio_config_board
(
scode
);
hplance_init
(
dev
,
scode
);
if
(
!
register_netdev
(
dev
))
{
struct
hplance_private
*
lp
=
dev
->
priv
;
struct
hplance_private
*
lp
=
netdev_priv
(
dev
)
;
lp
->
next_module
=
root_hplance_dev
;
root_hplance_dev
=
lp
;
return
dev
;
...
...
@@ -141,7 +141,7 @@ static void __init hplance_init(struct net_device *dev, int scode)
printk
(
"%c%2.2x"
,
i
==
0
?
' '
:
':'
,
dev
->
dev_addr
[
i
]);
}
lp
=
(
struct
hplance_private
*
)
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
lp
->
lance
.
name
=
(
char
*
)
name
;
/* discards const, shut up gcc */
lp
->
lance
.
ll
=
(
struct
lance_regs
*
)(
va
+
HPLANCE_REGOFF
);
lp
->
lance
.
init_block
=
(
struct
lance_init_block
*
)(
va
+
HPLANCE_MEMOFF
);
/* CPU addr */
...
...
@@ -195,7 +195,7 @@ static unsigned short hplance_readrdp(void *priv)
static
int
hplance_open
(
struct
net_device
*
dev
)
{
int
status
;
struct
hplance_private
*
lp
=
(
struct
hplance_private
*
)
dev
->
priv
;
struct
hplance_private
*
lp
=
netdev_priv
(
dev
)
;
struct
hplance_reg
*
hpregs
=
(
struct
hplance_reg
*
)
lp
->
base
;
status
=
lance_open
(
dev
);
/* call generic lance open code */
...
...
@@ -209,7 +209,7 @@ static int hplance_open(struct net_device *dev)
static
int
hplance_close
(
struct
net_device
*
dev
)
{
struct
hplance_private
*
lp
=
(
struct
hplance_private
*
)
dev
->
priv
;
struct
hplance_private
*
lp
=
netdev_priv
(
dev
)
;
struct
hplance_reg
*
hpregs
=
(
struct
hplance_reg
*
)
lp
->
base
;
out_8
(
&
(
hpregs
->
status
),
8
);
/* disable interrupts at boardlevel */
lance_close
(
dev
);
...
...
drivers/net/sun3lance.c
View file @
184915a8
...
...
@@ -332,7 +332,7 @@ static int __init lance_probe( struct net_device *dev)
return
0
;
}
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
/* XXX - leak? */
MEM
=
dvma_malloc_align
(
sizeof
(
struct
lance_memory
),
0x10000
);
...
...
@@ -402,7 +402,7 @@ static int __init lance_probe( struct net_device *dev)
static
int
lance_open
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
int
i
;
DPRINTK
(
2
,
(
"%s: lance_open()
\n
"
,
dev
->
name
));
...
...
@@ -439,7 +439,7 @@ static int lance_open( struct net_device *dev )
static
void
lance_init_ring
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
int
i
;
lp
->
lock
=
0
;
...
...
@@ -499,7 +499,7 @@ static void lance_init_ring( struct net_device *dev )
static
int
lance_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
int
entry
,
len
;
struct
lance_tx_head
*
head
;
unsigned
long
flags
;
...
...
@@ -646,7 +646,7 @@ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev )
static
irqreturn_t
lance_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
fp
)
{
struct
net_device
*
dev
=
dev_id
;
struct
lance_private
*
lp
=
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
int
csr0
;
static
int
in_interrupt
;
...
...
@@ -772,7 +772,7 @@ static irqreturn_t lance_interrupt( int irq, void *dev_id, struct pt_regs *fp)
/* get packet, toss into skbuff */
static
int
lance_rx
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
int
entry
=
lp
->
new_rx
;
/* If we own the next entry, it's a new packet. Send it up. */
...
...
@@ -870,7 +870,7 @@ static int lance_rx( struct net_device *dev )
static
int
lance_close
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
netif_stop_queue
(
dev
);
...
...
@@ -888,7 +888,7 @@ static int lance_close( struct net_device *dev )
static
struct
net_device_stats
*
lance_get_stats
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
return
&
lp
->
stats
;
}
...
...
@@ -904,7 +904,7 @@ static struct net_device_stats *lance_get_stats( struct net_device *dev )
/* completely untested on a sun3 */
static
void
set_multicast_list
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
if
(
netif_queue_stopped
(
dev
))
/* Only possible if board is already started */
...
...
drivers/net/sunlance.c
View file @
184915a8
...
...
@@ -313,7 +313,7 @@ static void load_csrs(struct lance_private *lp)
/* Setup the Lance Rx and Tx rings */
static
void
lance_init_ring_dvma
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_init_block
*
ib
=
lp
->
init_block
;
dma_addr_t
aib
=
lp
->
init_block_dvma
;
__u32
leptr
;
...
...
@@ -370,7 +370,7 @@ static void lance_init_ring_dvma(struct net_device *dev)
static
void
lance_init_ring_pio
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_init_block
*
ib
=
lp
->
init_block
;
u32
leptr
;
int
i
;
...
...
@@ -500,7 +500,7 @@ static int init_restart_lance(struct lance_private *lp)
static
void
lance_rx_dvma
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_init_block
*
ib
=
lp
->
init_block
;
volatile
struct
lance_rx_desc
*
rd
;
u8
bits
;
...
...
@@ -563,7 +563,7 @@ static void lance_rx_dvma(struct net_device *dev)
static
void
lance_tx_dvma
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_init_block
*
ib
=
lp
->
init_block
;
int
i
,
j
;
...
...
@@ -673,7 +673,7 @@ static void lance_piocopy_to_skb(struct sk_buff *skb, volatile void *piobuf, int
static
void
lance_rx_pio
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_init_block
*
ib
=
lp
->
init_block
;
volatile
struct
lance_rx_desc
*
rd
;
unsigned
char
bits
;
...
...
@@ -735,7 +735,7 @@ static void lance_rx_pio(struct net_device *dev)
static
void
lance_tx_pio
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_init_block
*
ib
=
lp
->
init_block
;
int
i
,
j
;
...
...
@@ -816,7 +816,7 @@ static void lance_tx_pio(struct net_device *dev)
static
irqreturn_t
lance_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
struct
net_device
*
dev
=
(
struct
net_device
*
)
dev_id
;
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
int
csr0
;
sbus_writew
(
LE_CSR0
,
lp
->
lregs
+
RAP
);
...
...
@@ -915,7 +915,7 @@ struct net_device *last_dev = 0;
static
int
lance_open
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_init_block
*
ib
=
lp
->
init_block
;
int
status
=
0
;
...
...
@@ -968,7 +968,7 @@ static int lance_open(struct net_device *dev)
static
int
lance_close
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
netif_stop_queue
(
dev
);
del_timer_sync
(
&
lp
->
multicast_timer
);
...
...
@@ -981,7 +981,7 @@ static int lance_close(struct net_device *dev)
static
int
lance_reset
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
int
status
;
STOP_LANCE
(
lp
);
...
...
@@ -1102,7 +1102,7 @@ static void lance_piozero(volatile void *dest, int len)
static
void
lance_tx_timeout
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
printk
(
KERN_ERR
"%s: transmit timed out, status %04x, reset
\n
"
,
dev
->
name
,
sbus_readw
(
lp
->
lregs
+
RDP
));
...
...
@@ -1112,7 +1112,7 @@ static void lance_tx_timeout(struct net_device *dev)
static
int
lance_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_init_block
*
ib
=
lp
->
init_block
;
int
entry
,
skblen
,
len
;
...
...
@@ -1165,7 +1165,7 @@ static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
static
struct
net_device_stats
*
lance_get_stats
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
return
&
lp
->
stats
;
}
...
...
@@ -1173,7 +1173,7 @@ static struct net_device_stats *lance_get_stats(struct net_device *dev)
/* taken from the depca driver */
static
void
lance_load_multicast
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_init_block
*
ib
=
lp
->
init_block
;
volatile
u16
*
mcast_table
=
(
u16
*
)
&
ib
->
filter
;
struct
dev_mc_list
*
dmi
=
dev
->
mc_list
;
...
...
@@ -1223,7 +1223,7 @@ static void lance_load_multicast(struct net_device *dev)
static
void
lance_set_multicast
(
struct
net_device
*
dev
)
{
struct
lance_private
*
lp
=
(
struct
lance_private
*
)
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
volatile
struct
lance_init_block
*
ib
=
lp
->
init_block
;
u16
mode
;
...
...
@@ -1291,7 +1291,7 @@ static void lance_free_hwresources(struct lance_private *lp)
/* Ethtool support... */
static
void
sparc_lance_get_drvinfo
(
struct
net_device
*
dev
,
struct
ethtool_drvinfo
*
info
)
{
struct
lance_private
*
lp
=
dev
->
priv
;
struct
lance_private
*
lp
=
netdev_priv
(
dev
)
;
strcpy
(
info
->
driver
,
"sunlance"
);
strcpy
(
info
->
version
,
"2.02"
);
...
...
@@ -1325,7 +1325,7 @@ static int __init sparc_lance_init(struct sbus_dev *sdev,
if
(
!
dev
)
return
-
ENOMEM
;
lp
=
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
if
(
sparc_lance_debug
&&
version_printed
++
==
0
)
printk
(
KERN_INFO
"%s"
,
version
);
...
...
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