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
49b7b788
Commit
49b7b788
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/tokenring/ drivers
parent
1ef020bf
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
124 additions
and
124 deletions
+124
-124
drivers/net/tokenring/abyss.c
drivers/net/tokenring/abyss.c
+3
-3
drivers/net/tokenring/madgemc.c
drivers/net/tokenring/madgemc.c
+3
-3
drivers/net/tokenring/proteon.c
drivers/net/tokenring/proteon.c
+2
-2
drivers/net/tokenring/skisa.c
drivers/net/tokenring/skisa.c
+2
-2
drivers/net/tokenring/smctr.c
drivers/net/tokenring/smctr.c
+87
-87
drivers/net/tokenring/tms380tr.c
drivers/net/tokenring/tms380tr.c
+27
-27
No files found.
drivers/net/tokenring/abyss.c
View file @
49b7b788
...
@@ -154,7 +154,7 @@ static int __devinit abyss_attach(struct pci_dev *pdev, const struct pci_device_
...
@@ -154,7 +154,7 @@ static int __devinit abyss_attach(struct pci_dev *pdev, const struct pci_device_
printk
(
":%2.2x"
,
dev
->
dev_addr
[
i
]);
printk
(
":%2.2x"
,
dev
->
dev_addr
[
i
]);
printk
(
"
\n
"
);
printk
(
"
\n
"
);
tp
=
dev
->
priv
;
tp
=
netdev_priv
(
dev
)
;
tp
->
setnselout
=
abyss_setnselout_pins
;
tp
->
setnselout
=
abyss_setnselout_pins
;
tp
->
sifreadb
=
abyss_sifreadb
;
tp
->
sifreadb
=
abyss_sifreadb
;
tp
->
sifreadw
=
abyss_sifreadw
;
tp
->
sifreadw
=
abyss_sifreadw
;
...
@@ -188,7 +188,7 @@ static int __devinit abyss_attach(struct pci_dev *pdev, const struct pci_device_
...
@@ -188,7 +188,7 @@ static int __devinit abyss_attach(struct pci_dev *pdev, const struct pci_device_
static
unsigned
short
abyss_setnselout_pins
(
struct
net_device
*
dev
)
static
unsigned
short
abyss_setnselout_pins
(
struct
net_device
*
dev
)
{
{
unsigned
short
val
=
0
;
unsigned
short
val
=
0
;
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
if
(
tp
->
DataRate
==
SPEED_4
)
if
(
tp
->
DataRate
==
SPEED_4
)
val
|=
0x01
;
/* Set 4Mbps */
val
|=
0x01
;
/* Set 4Mbps */
...
@@ -398,7 +398,7 @@ static void abyss_read_eeprom(struct net_device *dev)
...
@@ -398,7 +398,7 @@ static void abyss_read_eeprom(struct net_device *dev)
unsigned
short
val
;
unsigned
short
val
;
int
i
;
int
i
;
tp
=
(
struct
net_local
*
)
dev
->
priv
;
tp
=
netdev_priv
(
dev
)
;
ioaddr
=
dev
->
base_addr
;
ioaddr
=
dev
->
base_addr
;
/* Must enable glue chip first */
/* Must enable glue chip first */
...
...
drivers/net/tokenring/madgemc.c
View file @
49b7b788
...
@@ -365,7 +365,7 @@ static int __init madgemc_probe(void)
...
@@ -365,7 +365,7 @@ static int __init madgemc_probe(void)
return
0
;
return
0
;
return
-
1
;
return
-
1
;
}
}
tp
=
(
struct
net_local
*
)
dev
->
priv
;
tp
=
netdev_priv
(
dev
)
;
/*
/*
* The MC16 is physically a 32bit card. However, Madge
* The MC16 is physically a 32bit card. However, Madge
...
@@ -504,7 +504,7 @@ static irqreturn_t madgemc_interrupt(int irq, void *dev_id, struct pt_regs *regs
...
@@ -504,7 +504,7 @@ static irqreturn_t madgemc_interrupt(int irq, void *dev_id, struct pt_regs *regs
unsigned
short
madgemc_setnselout_pins
(
struct
net_device
*
dev
)
unsigned
short
madgemc_setnselout_pins
(
struct
net_device
*
dev
)
{
{
unsigned
char
reg1
;
unsigned
char
reg1
;
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
reg1
=
inb
(
dev
->
base_addr
+
MC_CONTROL_REG1
);
reg1
=
inb
(
dev
->
base_addr
+
MC_CONTROL_REG1
);
...
@@ -731,7 +731,7 @@ static int madgemc_mcaproc(char *buf, int slot, void *d)
...
@@ -731,7 +731,7 @@ static int madgemc_mcaproc(char *buf, int slot, void *d)
}
}
len
+=
sprintf
(
buf
+
len
,
"-------
\n
"
);
len
+=
sprintf
(
buf
+
len
,
"-------
\n
"
);
if
(
curcard
)
{
if
(
curcard
)
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
i
;
int
i
;
len
+=
sprintf
(
buf
+
len
,
"Card Revision: %d
\n
"
,
curcard
->
cardrev
);
len
+=
sprintf
(
buf
+
len
,
"Card Revision: %d
\n
"
,
curcard
->
cardrev
);
...
...
drivers/net/tokenring/proteon.c
View file @
49b7b788
...
@@ -158,7 +158,7 @@ static int __init setup_card(struct net_device *dev)
...
@@ -158,7 +158,7 @@ static int __init setup_card(struct net_device *dev)
printk
(
":%2.2x"
,
dev
->
dev_addr
[
j
]);
printk
(
":%2.2x"
,
dev
->
dev_addr
[
j
]);
printk
(
"
\n
"
);
printk
(
"
\n
"
);
tp
=
(
struct
net_local
*
)
dev
->
priv
;
tp
=
netdev_priv
(
dev
)
;
tp
->
setnselout
=
proteon_setnselout_pins
;
tp
->
setnselout
=
proteon_setnselout_pins
;
tp
->
sifreadb
=
proteon_sifreadb
;
tp
->
sifreadb
=
proteon_sifreadb
;
...
@@ -316,7 +316,7 @@ unsigned short proteon_setnselout_pins(struct net_device *dev)
...
@@ -316,7 +316,7 @@ unsigned short proteon_setnselout_pins(struct net_device *dev)
static
int
proteon_open
(
struct
net_device
*
dev
)
static
int
proteon_open
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
short
val
=
0
;
unsigned
short
val
=
0
;
int
i
;
int
i
;
...
...
drivers/net/tokenring/skisa.c
View file @
49b7b788
...
@@ -175,7 +175,7 @@ static int __init setup_card(struct net_device *dev)
...
@@ -175,7 +175,7 @@ static int __init setup_card(struct net_device *dev)
printk
(
":%2.2x"
,
dev
->
dev_addr
[
j
]);
printk
(
":%2.2x"
,
dev
->
dev_addr
[
j
]);
printk
(
"
\n
"
);
printk
(
"
\n
"
);
tp
=
(
struct
net_local
*
)
dev
->
priv
;
tp
=
netdev_priv
(
dev
)
;
tp
->
setnselout
=
sk_isa_setnselout_pins
;
tp
->
setnselout
=
sk_isa_setnselout_pins
;
tp
->
sifreadb
=
sk_isa_sifreadb
;
tp
->
sifreadb
=
sk_isa_sifreadb
;
...
@@ -332,7 +332,7 @@ unsigned short sk_isa_setnselout_pins(struct net_device *dev)
...
@@ -332,7 +332,7 @@ unsigned short sk_isa_setnselout_pins(struct net_device *dev)
static
int
sk_isa_open
(
struct
net_device
*
dev
)
static
int
sk_isa_open
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
short
val
=
0
;
unsigned
short
val
=
0
;
unsigned
short
oldval
;
unsigned
short
oldval
;
int
i
;
int
i
;
...
...
drivers/net/tokenring/smctr.c
View file @
49b7b788
...
@@ -327,7 +327,7 @@ static int smctr_wait_while_cbusy(struct net_device *dev);
...
@@ -327,7 +327,7 @@ static int smctr_wait_while_cbusy(struct net_device *dev);
*/
*/
static
int
smctr_alloc_shared_memory
(
struct
net_device
*
dev
)
static
int
smctr_alloc_shared_memory
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
if
(
smctr_debug
>
10
)
if
(
smctr_debug
>
10
)
printk
(
KERN_DEBUG
"%s: smctr_alloc_shared_memory
\n
"
,
dev
->
name
);
printk
(
KERN_DEBUG
"%s: smctr_alloc_shared_memory
\n
"
,
dev
->
name
);
...
@@ -454,7 +454,7 @@ static int smctr_bypass_state(struct net_device *dev)
...
@@ -454,7 +454,7 @@ static int smctr_bypass_state(struct net_device *dev)
static
int
smctr_checksum_firmware
(
struct
net_device
*
dev
)
static
int
smctr_checksum_firmware
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
__u16
i
,
checksum
=
0
;
__u16
i
,
checksum
=
0
;
if
(
smctr_debug
>
10
)
if
(
smctr_debug
>
10
)
...
@@ -480,7 +480,7 @@ static int smctr_checksum_firmware(struct net_device *dev)
...
@@ -480,7 +480,7 @@ static int smctr_checksum_firmware(struct net_device *dev)
static
int
__init
smctr_chk_mca
(
struct
net_device
*
dev
)
static
int
__init
smctr_chk_mca
(
struct
net_device
*
dev
)
{
{
#ifdef CONFIG_MCA
#ifdef CONFIG_MCA
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
current_slot
;
int
current_slot
;
__u8
r1
,
r2
,
r3
,
r4
,
r5
;
__u8
r1
,
r2
,
r3
,
r4
,
r5
;
...
@@ -631,7 +631,7 @@ static int __init smctr_chk_mca(struct net_device *dev)
...
@@ -631,7 +631,7 @@ static int __init smctr_chk_mca(struct net_device *dev)
static
int
smctr_chg_rx_mask
(
struct
net_device
*
dev
)
static
int
smctr_chg_rx_mask
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
err
=
0
;
int
err
=
0
;
if
(
smctr_debug
>
10
)
if
(
smctr_debug
>
10
)
...
@@ -694,7 +694,7 @@ static int smctr_chg_rx_mask(struct net_device *dev)
...
@@ -694,7 +694,7 @@ static int smctr_chg_rx_mask(struct net_device *dev)
static
int
smctr_clear_int
(
struct
net_device
*
dev
)
static
int
smctr_clear_int
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
outb
((
tp
->
trc_mask
|
CSR_CLRTINT
),
dev
->
base_addr
+
CSR
);
outb
((
tp
->
trc_mask
|
CSR_CLRTINT
),
dev
->
base_addr
+
CSR
);
...
@@ -716,7 +716,7 @@ static int smctr_clear_trc_reset(int ioaddr)
...
@@ -716,7 +716,7 @@ static int smctr_clear_trc_reset(int ioaddr)
*/
*/
static
int
smctr_close
(
struct
net_device
*
dev
)
static
int
smctr_close
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
int
err
;
int
err
;
...
@@ -752,7 +752,7 @@ static int smctr_close(struct net_device *dev)
...
@@ -752,7 +752,7 @@ static int smctr_close(struct net_device *dev)
static
int
smctr_decode_firmware
(
struct
net_device
*
dev
)
static
int
smctr_decode_firmware
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
short
bit
=
0x80
,
shift
=
12
;
short
bit
=
0x80
,
shift
=
12
;
DECODE_TREE_NODE
*
tree
;
DECODE_TREE_NODE
*
tree
;
short
branch
,
tsize
;
short
branch
,
tsize
;
...
@@ -823,7 +823,7 @@ static int smctr_disable_16bit(struct net_device *dev)
...
@@ -823,7 +823,7 @@ static int smctr_disable_16bit(struct net_device *dev)
*/
*/
static
int
smctr_disable_adapter_ctrl_store
(
struct
net_device
*
dev
)
static
int
smctr_disable_adapter_ctrl_store
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
if
(
smctr_debug
>
10
)
if
(
smctr_debug
>
10
)
...
@@ -837,7 +837,7 @@ static int smctr_disable_adapter_ctrl_store(struct net_device *dev)
...
@@ -837,7 +837,7 @@ static int smctr_disable_adapter_ctrl_store(struct net_device *dev)
static
int
smctr_disable_bic_int
(
struct
net_device
*
dev
)
static
int
smctr_disable_bic_int
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
tp
->
trc_mask
=
CSR_MSK_ALL
|
CSR_MSKCBUSY
tp
->
trc_mask
=
CSR_MSK_ALL
|
CSR_MSKCBUSY
...
@@ -849,7 +849,7 @@ static int smctr_disable_bic_int(struct net_device *dev)
...
@@ -849,7 +849,7 @@ static int smctr_disable_bic_int(struct net_device *dev)
static
int
smctr_enable_16bit
(
struct
net_device
*
dev
)
static
int
smctr_enable_16bit
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
__u8
r
;
__u8
r
;
if
(
tp
->
adapter_bus
==
BUS_ISA16_TYPE
)
if
(
tp
->
adapter_bus
==
BUS_ISA16_TYPE
)
...
@@ -869,7 +869,7 @@ static int smctr_enable_16bit(struct net_device *dev)
...
@@ -869,7 +869,7 @@ static int smctr_enable_16bit(struct net_device *dev)
*/
*/
static
int
smctr_enable_adapter_ctrl_store
(
struct
net_device
*
dev
)
static
int
smctr_enable_adapter_ctrl_store
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
if
(
smctr_debug
>
10
)
if
(
smctr_debug
>
10
)
...
@@ -900,7 +900,7 @@ static int smctr_enable_adapter_ram(struct net_device *dev)
...
@@ -900,7 +900,7 @@ static int smctr_enable_adapter_ram(struct net_device *dev)
static
int
smctr_enable_bic_int
(
struct
net_device
*
dev
)
static
int
smctr_enable_bic_int
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
__u8
r
;
__u8
r
;
...
@@ -926,7 +926,7 @@ static int smctr_enable_bic_int(struct net_device *dev)
...
@@ -926,7 +926,7 @@ static int smctr_enable_bic_int(struct net_device *dev)
static
int
__init
smctr_chk_isa
(
struct
net_device
*
dev
)
static
int
__init
smctr_chk_isa
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
__u8
r1
,
r2
,
b
,
chksum
=
0
;
__u8
r1
,
r2
,
b
,
chksum
=
0
;
__u16
r
;
__u16
r
;
...
@@ -1155,7 +1155,7 @@ static int __init smctr_chk_isa(struct net_device *dev)
...
@@ -1155,7 +1155,7 @@ static int __init smctr_chk_isa(struct net_device *dev)
static
int
__init
smctr_get_boardid
(
struct
net_device
*
dev
,
int
mca
)
static
int
__init
smctr_get_boardid
(
struct
net_device
*
dev
,
int
mca
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
__u8
r
,
r1
,
IdByte
;
__u8
r
,
r1
,
IdByte
;
__u16
BoardIdMask
;
__u16
BoardIdMask
;
...
@@ -1273,7 +1273,7 @@ static int smctr_get_functional_address(struct net_device *dev)
...
@@ -1273,7 +1273,7 @@ static int smctr_get_functional_address(struct net_device *dev)
*/
*/
static
unsigned
int
smctr_get_num_rx_bdbs
(
struct
net_device
*
dev
)
static
unsigned
int
smctr_get_num_rx_bdbs
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
int
mem_used
=
0
;
unsigned
int
mem_used
=
0
;
/* Allocate System Control Blocks. */
/* Allocate System Control Blocks. */
...
@@ -1358,7 +1358,7 @@ static int smctr_get_physical_drop_number(struct net_device *dev)
...
@@ -1358,7 +1358,7 @@ static int smctr_get_physical_drop_number(struct net_device *dev)
static
__u8
*
smctr_get_rx_pointer
(
struct
net_device
*
dev
,
short
queue
)
static
__u8
*
smctr_get_rx_pointer
(
struct
net_device
*
dev
,
short
queue
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
BDBlock
*
bdb
;
BDBlock
*
bdb
;
bdb
=
(
BDBlock
*
)((
__u32
)
tp
->
ram_access
bdb
=
(
BDBlock
*
)((
__u32
)
tp
->
ram_access
...
@@ -1382,7 +1382,7 @@ static int smctr_get_station_id(struct net_device *dev)
...
@@ -1382,7 +1382,7 @@ static int smctr_get_station_id(struct net_device *dev)
*/
*/
static
struct
net_device_stats
*
smctr_get_stats
(
struct
net_device
*
dev
)
static
struct
net_device_stats
*
smctr_get_stats
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
return
((
struct
net_device_stats
*
)
&
tp
->
MacStat
);
return
((
struct
net_device_stats
*
)
&
tp
->
MacStat
);
}
}
...
@@ -1390,7 +1390,7 @@ static struct net_device_stats *smctr_get_stats(struct net_device *dev)
...
@@ -1390,7 +1390,7 @@ static struct net_device_stats *smctr_get_stats(struct net_device *dev)
static
FCBlock
*
smctr_get_tx_fcb
(
struct
net_device
*
dev
,
__u16
queue
,
static
FCBlock
*
smctr_get_tx_fcb
(
struct
net_device
*
dev
,
__u16
queue
,
__u16
bytes_count
)
__u16
bytes_count
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
FCBlock
*
pFCB
;
FCBlock
*
pFCB
;
BDBlock
*
pbdb
;
BDBlock
*
pbdb
;
unsigned
short
alloc_size
;
unsigned
short
alloc_size
;
...
@@ -1513,7 +1513,7 @@ static int smctr_hardware_send_packet(struct net_device *dev,
...
@@ -1513,7 +1513,7 @@ static int smctr_hardware_send_packet(struct net_device *dev,
static
int
smctr_init_acbs
(
struct
net_device
*
dev
)
static
int
smctr_init_acbs
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
int
i
;
unsigned
int
i
;
ACBlock
*
acb
;
ACBlock
*
acb
;
...
@@ -1557,7 +1557,7 @@ static int smctr_init_acbs(struct net_device *dev)
...
@@ -1557,7 +1557,7 @@ static int smctr_init_acbs(struct net_device *dev)
static
int
smctr_init_adapter
(
struct
net_device
*
dev
)
static
int
smctr_init_adapter
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
err
;
int
err
;
if
(
smctr_debug
>
10
)
if
(
smctr_debug
>
10
)
...
@@ -1640,7 +1640,7 @@ static int smctr_init_adapter(struct net_device *dev)
...
@@ -1640,7 +1640,7 @@ static int smctr_init_adapter(struct net_device *dev)
static
int
smctr_init_card_real
(
struct
net_device
*
dev
)
static
int
smctr_init_card_real
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
err
=
0
;
int
err
=
0
;
if
(
smctr_debug
>
10
)
if
(
smctr_debug
>
10
)
...
@@ -1716,7 +1716,7 @@ static int smctr_init_card_real(struct net_device *dev)
...
@@ -1716,7 +1716,7 @@ static int smctr_init_card_real(struct net_device *dev)
static
int
smctr_init_rx_bdbs
(
struct
net_device
*
dev
)
static
int
smctr_init_rx_bdbs
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
int
i
,
j
;
unsigned
int
i
,
j
;
BDBlock
*
bdb
;
BDBlock
*
bdb
;
__u16
*
buf
;
__u16
*
buf
;
...
@@ -1768,7 +1768,7 @@ static int smctr_init_rx_bdbs(struct net_device *dev)
...
@@ -1768,7 +1768,7 @@ static int smctr_init_rx_bdbs(struct net_device *dev)
static
int
smctr_init_rx_fcbs
(
struct
net_device
*
dev
)
static
int
smctr_init_rx_fcbs
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
int
i
,
j
;
unsigned
int
i
,
j
;
FCBlock
*
fcb
;
FCBlock
*
fcb
;
...
@@ -1818,7 +1818,7 @@ static int smctr_init_rx_fcbs(struct net_device *dev)
...
@@ -1818,7 +1818,7 @@ static int smctr_init_rx_fcbs(struct net_device *dev)
static
int
smctr_init_shared_memory
(
struct
net_device
*
dev
)
static
int
smctr_init_shared_memory
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
int
i
;
unsigned
int
i
;
__u32
*
iscpb
;
__u32
*
iscpb
;
...
@@ -1876,7 +1876,7 @@ static int smctr_init_shared_memory(struct net_device *dev)
...
@@ -1876,7 +1876,7 @@ static int smctr_init_shared_memory(struct net_device *dev)
static
int
smctr_init_tx_bdbs
(
struct
net_device
*
dev
)
static
int
smctr_init_tx_bdbs
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
int
i
,
j
;
unsigned
int
i
,
j
;
BDBlock
*
bdb
;
BDBlock
*
bdb
;
...
@@ -1906,7 +1906,7 @@ static int smctr_init_tx_bdbs(struct net_device *dev)
...
@@ -1906,7 +1906,7 @@ static int smctr_init_tx_bdbs(struct net_device *dev)
static
int
smctr_init_tx_fcbs
(
struct
net_device
*
dev
)
static
int
smctr_init_tx_fcbs
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
int
i
,
j
;
unsigned
int
i
,
j
;
FCBlock
*
fcb
;
FCBlock
*
fcb
;
...
@@ -1945,7 +1945,7 @@ static int smctr_init_tx_fcbs(struct net_device *dev)
...
@@ -1945,7 +1945,7 @@ static int smctr_init_tx_fcbs(struct net_device *dev)
static
int
smctr_internal_self_test
(
struct
net_device
*
dev
)
static
int
smctr_internal_self_test
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
err
;
int
err
;
if
((
err
=
smctr_issue_test_internal_rom_cmd
(
dev
)))
if
((
err
=
smctr_issue_test_internal_rom_cmd
(
dev
)))
...
@@ -1998,7 +1998,7 @@ static irqreturn_t smctr_interrupt(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -1998,7 +1998,7 @@ static irqreturn_t smctr_interrupt(int irq, void *dev_id, struct pt_regs *regs)
}
}
ioaddr
=
dev
->
base_addr
;
ioaddr
=
dev
->
base_addr
;
tp
=
(
struct
net_local
*
)
dev
->
priv
;
tp
=
netdev_priv
(
dev
)
;
if
(
tp
->
status
==
NOT_INITIALIZED
)
if
(
tp
->
status
==
NOT_INITIALIZED
)
...
@@ -2471,7 +2471,7 @@ static irqreturn_t smctr_interrupt(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -2471,7 +2471,7 @@ static irqreturn_t smctr_interrupt(int irq, void *dev_id, struct pt_regs *regs)
static
int
smctr_issue_enable_int_cmd
(
struct
net_device
*
dev
,
static
int
smctr_issue_enable_int_cmd
(
struct
net_device
*
dev
,
__u16
interrupt_enable_mask
)
__u16
interrupt_enable_mask
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
err
;
int
err
;
if
((
err
=
smctr_wait_while_cbusy
(
dev
)))
if
((
err
=
smctr_wait_while_cbusy
(
dev
)))
...
@@ -2487,7 +2487,7 @@ static int smctr_issue_enable_int_cmd(struct net_device *dev,
...
@@ -2487,7 +2487,7 @@ static int smctr_issue_enable_int_cmd(struct net_device *dev,
static
int
smctr_issue_int_ack
(
struct
net_device
*
dev
,
__u16
iack_code
,
__u16
ibits
)
static
int
smctr_issue_int_ack
(
struct
net_device
*
dev
,
__u16
iack_code
,
__u16
ibits
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
if
(
smctr_wait_while_cbusy
(
dev
))
if
(
smctr_wait_while_cbusy
(
dev
))
return
(
-
1
);
return
(
-
1
);
...
@@ -2503,7 +2503,7 @@ static int smctr_issue_int_ack(struct net_device *dev, __u16 iack_code, __u16 ib
...
@@ -2503,7 +2503,7 @@ static int smctr_issue_int_ack(struct net_device *dev, __u16 iack_code, __u16 ib
static
int
smctr_issue_init_timers_cmd
(
struct
net_device
*
dev
)
static
int
smctr_issue_init_timers_cmd
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
int
i
;
unsigned
int
i
;
int
err
;
int
err
;
__u16
*
pTimer_Struc
=
(
__u16
*
)
tp
->
misc_command_data
;
__u16
*
pTimer_Struc
=
(
__u16
*
)
tp
->
misc_command_data
;
...
@@ -2660,7 +2660,7 @@ static int smctr_issue_init_timers_cmd(struct net_device *dev)
...
@@ -2660,7 +2660,7 @@ static int smctr_issue_init_timers_cmd(struct net_device *dev)
static
int
smctr_issue_init_txrx_cmd
(
struct
net_device
*
dev
)
static
int
smctr_issue_init_txrx_cmd
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
int
i
;
unsigned
int
i
;
int
err
;
int
err
;
void
**
txrx_ptrs
=
(
void
*
)
tp
->
misc_command_data
;
void
**
txrx_ptrs
=
(
void
*
)
tp
->
misc_command_data
;
...
@@ -2748,7 +2748,7 @@ static int smctr_issue_read_word_cmd(struct net_device *dev, __u16 aword_cnt)
...
@@ -2748,7 +2748,7 @@ static int smctr_issue_read_word_cmd(struct net_device *dev, __u16 aword_cnt)
static
int
smctr_issue_remove_cmd
(
struct
net_device
*
dev
)
static
int
smctr_issue_remove_cmd
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
err
;
int
err
;
if
((
err
=
smctr_wait_while_cbusy
(
dev
)))
if
((
err
=
smctr_wait_while_cbusy
(
dev
)))
...
@@ -2764,7 +2764,7 @@ static int smctr_issue_remove_cmd(struct net_device *dev)
...
@@ -2764,7 +2764,7 @@ static int smctr_issue_remove_cmd(struct net_device *dev)
static
int
smctr_issue_resume_acb_cmd
(
struct
net_device
*
dev
)
static
int
smctr_issue_resume_acb_cmd
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
err
;
int
err
;
if
((
err
=
smctr_wait_while_cbusy
(
dev
)))
if
((
err
=
smctr_wait_while_cbusy
(
dev
)))
...
@@ -2782,7 +2782,7 @@ static int smctr_issue_resume_acb_cmd(struct net_device *dev)
...
@@ -2782,7 +2782,7 @@ static int smctr_issue_resume_acb_cmd(struct net_device *dev)
static
int
smctr_issue_resume_rx_bdb_cmd
(
struct
net_device
*
dev
,
__u16
queue
)
static
int
smctr_issue_resume_rx_bdb_cmd
(
struct
net_device
*
dev
,
__u16
queue
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
err
;
int
err
;
if
((
err
=
smctr_wait_while_cbusy
(
dev
)))
if
((
err
=
smctr_wait_while_cbusy
(
dev
)))
...
@@ -2802,7 +2802,7 @@ static int smctr_issue_resume_rx_bdb_cmd(struct net_device *dev, __u16 queue)
...
@@ -2802,7 +2802,7 @@ static int smctr_issue_resume_rx_bdb_cmd(struct net_device *dev, __u16 queue)
static
int
smctr_issue_resume_rx_fcb_cmd
(
struct
net_device
*
dev
,
__u16
queue
)
static
int
smctr_issue_resume_rx_fcb_cmd
(
struct
net_device
*
dev
,
__u16
queue
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
if
(
smctr_debug
>
10
)
if
(
smctr_debug
>
10
)
printk
(
KERN_DEBUG
"%s: smctr_issue_resume_rx_fcb_cmd
\n
"
,
dev
->
name
);
printk
(
KERN_DEBUG
"%s: smctr_issue_resume_rx_fcb_cmd
\n
"
,
dev
->
name
);
...
@@ -2824,7 +2824,7 @@ static int smctr_issue_resume_rx_fcb_cmd(struct net_device *dev, __u16 queue)
...
@@ -2824,7 +2824,7 @@ static int smctr_issue_resume_rx_fcb_cmd(struct net_device *dev, __u16 queue)
static
int
smctr_issue_resume_tx_fcb_cmd
(
struct
net_device
*
dev
,
__u16
queue
)
static
int
smctr_issue_resume_tx_fcb_cmd
(
struct
net_device
*
dev
,
__u16
queue
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
if
(
smctr_debug
>
10
)
if
(
smctr_debug
>
10
)
printk
(
KERN_DEBUG
"%s: smctr_issue_resume_tx_fcb_cmd
\n
"
,
dev
->
name
);
printk
(
KERN_DEBUG
"%s: smctr_issue_resume_tx_fcb_cmd
\n
"
,
dev
->
name
);
...
@@ -2893,7 +2893,7 @@ static int smctr_issue_tri_loopback_cmd(struct net_device *dev)
...
@@ -2893,7 +2893,7 @@ static int smctr_issue_tri_loopback_cmd(struct net_device *dev)
static
int
smctr_issue_write_byte_cmd
(
struct
net_device
*
dev
,
static
int
smctr_issue_write_byte_cmd
(
struct
net_device
*
dev
,
short
aword_cnt
,
void
*
byte
)
short
aword_cnt
,
void
*
byte
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
int
iword
,
ibyte
;
unsigned
int
iword
,
ibyte
;
int
err
;
int
err
;
...
@@ -2917,7 +2917,7 @@ static int smctr_issue_write_byte_cmd(struct net_device *dev,
...
@@ -2917,7 +2917,7 @@ static int smctr_issue_write_byte_cmd(struct net_device *dev,
static
int
smctr_issue_write_word_cmd
(
struct
net_device
*
dev
,
static
int
smctr_issue_write_word_cmd
(
struct
net_device
*
dev
,
short
aword_cnt
,
void
*
word
)
short
aword_cnt
,
void
*
word
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
int
i
,
err
;
unsigned
int
i
,
err
;
if
((
err
=
smctr_wait_while_cbusy
(
dev
)))
if
((
err
=
smctr_wait_while_cbusy
(
dev
)))
...
@@ -2947,7 +2947,7 @@ static int smctr_join_complete_state(struct net_device *dev)
...
@@ -2947,7 +2947,7 @@ static int smctr_join_complete_state(struct net_device *dev)
static
int
smctr_link_tx_fcbs_to_bdbs
(
struct
net_device
*
dev
)
static
int
smctr_link_tx_fcbs_to_bdbs
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
int
i
,
j
;
unsigned
int
i
,
j
;
FCBlock
*
fcb
;
FCBlock
*
fcb
;
BDBlock
*
bdb
;
BDBlock
*
bdb
;
...
@@ -2971,7 +2971,7 @@ static int smctr_link_tx_fcbs_to_bdbs(struct net_device *dev)
...
@@ -2971,7 +2971,7 @@ static int smctr_link_tx_fcbs_to_bdbs(struct net_device *dev)
static
int
smctr_load_firmware
(
struct
net_device
*
dev
)
static
int
smctr_load_firmware
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
__u16
i
,
checksum
=
0
;
__u16
i
,
checksum
=
0
;
int
err
=
0
;
int
err
=
0
;
...
@@ -3071,7 +3071,7 @@ static int smctr_load_node_addr(struct net_device *dev)
...
@@ -3071,7 +3071,7 @@ static int smctr_load_node_addr(struct net_device *dev)
*/
*/
static
int
smctr_lobe_media_test
(
struct
net_device
*
dev
)
static
int
smctr_lobe_media_test
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
int
i
,
perror
=
0
;
unsigned
int
i
,
perror
=
0
;
unsigned
short
saved_rcv_mask
;
unsigned
short
saved_rcv_mask
;
...
@@ -3146,7 +3146,7 @@ static int smctr_lobe_media_test(struct net_device *dev)
...
@@ -3146,7 +3146,7 @@ static int smctr_lobe_media_test(struct net_device *dev)
static
int
smctr_lobe_media_test_cmd
(
struct
net_device
*
dev
)
static
int
smctr_lobe_media_test_cmd
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
err
;
int
err
;
if
(
smctr_debug
>
10
)
if
(
smctr_debug
>
10
)
...
@@ -3230,7 +3230,7 @@ static int smctr_make_8025_hdr(struct net_device *dev,
...
@@ -3230,7 +3230,7 @@ static int smctr_make_8025_hdr(struct net_device *dev,
static
int
smctr_make_access_pri
(
struct
net_device
*
dev
,
MAC_SUB_VECTOR
*
tsv
)
static
int
smctr_make_access_pri
(
struct
net_device
*
dev
,
MAC_SUB_VECTOR
*
tsv
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
tsv
->
svi
=
AUTHORIZED_ACCESS_PRIORITY
;
tsv
->
svi
=
AUTHORIZED_ACCESS_PRIORITY
;
tsv
->
svl
=
S_AUTHORIZED_ACCESS_PRIORITY
;
tsv
->
svl
=
S_AUTHORIZED_ACCESS_PRIORITY
;
...
@@ -3255,7 +3255,7 @@ static int smctr_make_addr_mod(struct net_device *dev, MAC_SUB_VECTOR *tsv)
...
@@ -3255,7 +3255,7 @@ static int smctr_make_addr_mod(struct net_device *dev, MAC_SUB_VECTOR *tsv)
static
int
smctr_make_auth_funct_class
(
struct
net_device
*
dev
,
static
int
smctr_make_auth_funct_class
(
struct
net_device
*
dev
,
MAC_SUB_VECTOR
*
tsv
)
MAC_SUB_VECTOR
*
tsv
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
tsv
->
svi
=
AUTHORIZED_FUNCTION_CLASS
;
tsv
->
svi
=
AUTHORIZED_FUNCTION_CLASS
;
tsv
->
svl
=
S_AUTHORIZED_FUNCTION_CLASS
;
tsv
->
svl
=
S_AUTHORIZED_FUNCTION_CLASS
;
...
@@ -3280,7 +3280,7 @@ static int smctr_make_corr(struct net_device *dev,
...
@@ -3280,7 +3280,7 @@ static int smctr_make_corr(struct net_device *dev,
static
int
smctr_make_funct_addr
(
struct
net_device
*
dev
,
MAC_SUB_VECTOR
*
tsv
)
static
int
smctr_make_funct_addr
(
struct
net_device
*
dev
,
MAC_SUB_VECTOR
*
tsv
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
smctr_get_functional_address
(
dev
);
smctr_get_functional_address
(
dev
);
...
@@ -3298,7 +3298,7 @@ static int smctr_make_funct_addr(struct net_device *dev, MAC_SUB_VECTOR *tsv)
...
@@ -3298,7 +3298,7 @@ static int smctr_make_funct_addr(struct net_device *dev, MAC_SUB_VECTOR *tsv)
static
int
smctr_make_group_addr
(
struct
net_device
*
dev
,
MAC_SUB_VECTOR
*
tsv
)
static
int
smctr_make_group_addr
(
struct
net_device
*
dev
,
MAC_SUB_VECTOR
*
tsv
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
smctr_get_group_address
(
dev
);
smctr_get_group_address
(
dev
);
...
@@ -3324,7 +3324,7 @@ static int smctr_make_group_addr(struct net_device *dev, MAC_SUB_VECTOR *tsv)
...
@@ -3324,7 +3324,7 @@ static int smctr_make_group_addr(struct net_device *dev, MAC_SUB_VECTOR *tsv)
static
int
smctr_make_phy_drop_num
(
struct
net_device
*
dev
,
static
int
smctr_make_phy_drop_num
(
struct
net_device
*
dev
,
MAC_SUB_VECTOR
*
tsv
)
MAC_SUB_VECTOR
*
tsv
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
smctr_get_physical_drop_number
(
dev
);
smctr_get_physical_drop_number
(
dev
);
...
@@ -3355,7 +3355,7 @@ static int smctr_make_product_id(struct net_device *dev, MAC_SUB_VECTOR *tsv)
...
@@ -3355,7 +3355,7 @@ static int smctr_make_product_id(struct net_device *dev, MAC_SUB_VECTOR *tsv)
static
int
smctr_make_station_id
(
struct
net_device
*
dev
,
MAC_SUB_VECTOR
*
tsv
)
static
int
smctr_make_station_id
(
struct
net_device
*
dev
,
MAC_SUB_VECTOR
*
tsv
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
smctr_get_station_id
(
dev
);
smctr_get_station_id
(
dev
);
...
@@ -3393,7 +3393,7 @@ static int smctr_make_ring_station_status(struct net_device *dev,
...
@@ -3393,7 +3393,7 @@ static int smctr_make_ring_station_status(struct net_device *dev,
static
int
smctr_make_ring_station_version
(
struct
net_device
*
dev
,
static
int
smctr_make_ring_station_version
(
struct
net_device
*
dev
,
MAC_SUB_VECTOR
*
tsv
)
MAC_SUB_VECTOR
*
tsv
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
tsv
->
svi
=
RING_STATION_VERSION_NUMBER
;
tsv
->
svi
=
RING_STATION_VERSION_NUMBER
;
tsv
->
svl
=
S_RING_STATION_VERSION_NUMBER
;
tsv
->
svl
=
S_RING_STATION_VERSION_NUMBER
;
...
@@ -3433,7 +3433,7 @@ static int smctr_make_tx_status_code(struct net_device *dev,
...
@@ -3433,7 +3433,7 @@ static int smctr_make_tx_status_code(struct net_device *dev,
static
int
smctr_make_upstream_neighbor_addr
(
struct
net_device
*
dev
,
static
int
smctr_make_upstream_neighbor_addr
(
struct
net_device
*
dev
,
MAC_SUB_VECTOR
*
tsv
)
MAC_SUB_VECTOR
*
tsv
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
smctr_get_upstream_neighbor_addr
(
dev
);
smctr_get_upstream_neighbor_addr
(
dev
);
...
@@ -3485,7 +3485,7 @@ static int smctr_open(struct net_device *dev)
...
@@ -3485,7 +3485,7 @@ static int smctr_open(struct net_device *dev)
/* Interrupt driven open of Token card. */
/* Interrupt driven open of Token card. */
static
int
smctr_open_tr
(
struct
net_device
*
dev
)
static
int
smctr_open_tr
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
long
flags
;
unsigned
long
flags
;
int
err
;
int
err
;
...
@@ -3618,7 +3618,7 @@ struct net_device __init *smctr_probe(int unit)
...
@@ -3618,7 +3618,7 @@ struct net_device __init *smctr_probe(int unit)
return
dev
;
return
dev
;
out1:
out1:
#ifdef CONFIG_MCA
#ifdef CONFIG_MCA
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
{
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
if
(
tp
->
slot_num
)
if
(
tp
->
slot_num
)
mca_mark_as_unused
(
tp
->
slot_num
);
mca_mark_as_unused
(
tp
->
slot_num
);
}
}
...
@@ -3634,7 +3634,7 @@ struct net_device __init *smctr_probe(int unit)
...
@@ -3634,7 +3634,7 @@ struct net_device __init *smctr_probe(int unit)
static
int
__init
smctr_probe1
(
struct
net_device
*
dev
,
int
ioaddr
)
static
int
__init
smctr_probe1
(
struct
net_device
*
dev
,
int
ioaddr
)
{
{
static
unsigned
version_printed
;
static
unsigned
version_printed
;
struct
net_local
*
tp
=
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
err
;
int
err
;
__u32
*
ram
;
__u32
*
ram
;
...
@@ -3654,7 +3654,7 @@ static int __init smctr_probe1(struct net_device *dev, int ioaddr)
...
@@ -3654,7 +3654,7 @@ static int __init smctr_probe1(struct net_device *dev, int ioaddr)
}
}
}
}
tp
=
(
struct
net_local
*
)
dev
->
priv
;
tp
=
netdev_priv
(
dev
)
;
dev
->
mem_start
=
tp
->
ram_base
;
dev
->
mem_start
=
tp
->
ram_base
;
dev
->
mem_end
=
dev
->
mem_start
+
0x10000
;
dev
->
mem_end
=
dev
->
mem_start
+
0x10000
;
ram
=
(
__u32
*
)
phys_to_virt
(
dev
->
mem_start
);
ram
=
(
__u32
*
)
phys_to_virt
(
dev
->
mem_start
);
...
@@ -3696,7 +3696,7 @@ static int __init smctr_probe1(struct net_device *dev, int ioaddr)
...
@@ -3696,7 +3696,7 @@ static int __init smctr_probe1(struct net_device *dev, int ioaddr)
static
int
smctr_process_rx_packet
(
MAC_HEADER
*
rmf
,
__u16
size
,
static
int
smctr_process_rx_packet
(
MAC_HEADER
*
rmf
,
__u16
size
,
struct
net_device
*
dev
,
__u16
rx_status
)
struct
net_device
*
dev
,
__u16
rx_status
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
__u16
rcode
,
correlator
;
__u16
rcode
,
correlator
;
int
err
=
0
;
int
err
=
0
;
...
@@ -3917,7 +3917,7 @@ static int smctr_process_rx_packet(MAC_HEADER *rmf, __u16 size,
...
@@ -3917,7 +3917,7 @@ static int smctr_process_rx_packet(MAC_HEADER *rmf, __u16 size,
/* Adapter RAM test. Incremental word ODD boundary data test. */
/* Adapter RAM test. Incremental word ODD boundary data test. */
static
int
smctr_ram_memory_test
(
struct
net_device
*
dev
)
static
int
smctr_ram_memory_test
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
__u16
page
,
pages_of_ram
,
start_pattern
=
0
,
word_pattern
=
0
,
__u16
page
,
pages_of_ram
,
start_pattern
=
0
,
word_pattern
=
0
,
word_read
=
0
,
err_word
=
0
,
err_pattern
=
0
;
word_read
=
0
,
err_word
=
0
,
err_pattern
=
0
;
unsigned
int
err_offset
;
unsigned
int
err_offset
;
...
@@ -4310,7 +4310,7 @@ static int smctr_rcv_unknown(struct net_device *dev, MAC_HEADER *rmf,
...
@@ -4310,7 +4310,7 @@ static int smctr_rcv_unknown(struct net_device *dev, MAC_HEADER *rmf,
*/
*/
static
int
smctr_reset_adapter
(
struct
net_device
*
dev
)
static
int
smctr_reset_adapter
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
/* Reseting the NIC will put it in a halted and un-initialized state. */
smctr_set_trc_reset
(
ioaddr
);
/* Reseting the NIC will put it in a halted and un-initialized state. */
smctr_set_trc_reset
(
ioaddr
);
...
@@ -4329,7 +4329,7 @@ static int smctr_reset_adapter(struct net_device *dev)
...
@@ -4329,7 +4329,7 @@ static int smctr_reset_adapter(struct net_device *dev)
static
int
smctr_restart_tx_chain
(
struct
net_device
*
dev
,
short
queue
)
static
int
smctr_restart_tx_chain
(
struct
net_device
*
dev
,
short
queue
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
err
=
0
;
int
err
=
0
;
if
(
smctr_debug
>
10
)
if
(
smctr_debug
>
10
)
...
@@ -4347,7 +4347,7 @@ static int smctr_restart_tx_chain(struct net_device *dev, short queue)
...
@@ -4347,7 +4347,7 @@ static int smctr_restart_tx_chain(struct net_device *dev, short queue)
static
int
smctr_ring_status_chg
(
struct
net_device
*
dev
)
static
int
smctr_ring_status_chg
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
if
(
smctr_debug
>
10
)
if
(
smctr_debug
>
10
)
printk
(
KERN_DEBUG
"%s: smctr_ring_status_chg
\n
"
,
dev
->
name
);
printk
(
KERN_DEBUG
"%s: smctr_ring_status_chg
\n
"
,
dev
->
name
);
...
@@ -4449,7 +4449,7 @@ static int smctr_ring_status_chg(struct net_device *dev)
...
@@ -4449,7 +4449,7 @@ static int smctr_ring_status_chg(struct net_device *dev)
static
int
smctr_rx_frame
(
struct
net_device
*
dev
)
static
int
smctr_rx_frame
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
__u16
queue
,
status
,
rx_size
,
err
=
0
;
__u16
queue
,
status
,
rx_size
,
err
=
0
;
__u8
*
pbuff
;
__u8
*
pbuff
;
...
@@ -4516,7 +4516,7 @@ static int smctr_rx_frame(struct net_device *dev)
...
@@ -4516,7 +4516,7 @@ static int smctr_rx_frame(struct net_device *dev)
static
int
smctr_send_dat
(
struct
net_device
*
dev
)
static
int
smctr_send_dat
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
int
i
,
err
;
unsigned
int
i
,
err
;
MAC_HEADER
*
tmf
;
MAC_HEADER
*
tmf
;
FCBlock
*
fcb
;
FCBlock
*
fcb
;
...
@@ -4596,7 +4596,7 @@ static void smctr_timeout(struct net_device *dev)
...
@@ -4596,7 +4596,7 @@ static void smctr_timeout(struct net_device *dev)
*/
*/
static
int
smctr_send_packet
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
static
int
smctr_send_packet
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
if
(
smctr_debug
>
10
)
if
(
smctr_debug
>
10
)
printk
(
KERN_DEBUG
"%s: smctr_send_packet
\n
"
,
dev
->
name
);
printk
(
KERN_DEBUG
"%s: smctr_send_packet
\n
"
,
dev
->
name
);
...
@@ -4621,7 +4621,7 @@ static int smctr_send_packet(struct sk_buff *skb, struct net_device *dev)
...
@@ -4621,7 +4621,7 @@ static int smctr_send_packet(struct sk_buff *skb, struct net_device *dev)
static
int
smctr_send_lobe_media_test
(
struct
net_device
*
dev
)
static
int
smctr_send_lobe_media_test
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
MAC_SUB_VECTOR
*
tsv
;
MAC_SUB_VECTOR
*
tsv
;
MAC_HEADER
*
tmf
;
MAC_HEADER
*
tmf
;
FCBlock
*
fcb
;
FCBlock
*
fcb
;
...
@@ -4917,7 +4917,7 @@ static int smctr_send_rsp(struct net_device *dev, MAC_HEADER *rmf,
...
@@ -4917,7 +4917,7 @@ static int smctr_send_rsp(struct net_device *dev, MAC_HEADER *rmf,
static
int
smctr_send_rq_init
(
struct
net_device
*
dev
)
static
int
smctr_send_rq_init
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
MAC_HEADER
*
tmf
;
MAC_HEADER
*
tmf
;
MAC_SUB_VECTOR
*
tsv
;
MAC_SUB_VECTOR
*
tsv
;
FCBlock
*
fcb
;
FCBlock
*
fcb
;
...
@@ -5001,7 +5001,7 @@ static int smctr_send_rq_init(struct net_device *dev)
...
@@ -5001,7 +5001,7 @@ static int smctr_send_rq_init(struct net_device *dev)
static
int
smctr_send_tx_forward
(
struct
net_device
*
dev
,
MAC_HEADER
*
rmf
,
static
int
smctr_send_tx_forward
(
struct
net_device
*
dev
,
MAC_HEADER
*
rmf
,
__u16
*
tx_fstatus
)
__u16
*
tx_fstatus
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
FCBlock
*
fcb
;
FCBlock
*
fcb
;
unsigned
int
i
;
unsigned
int
i
;
int
err
;
int
err
;
...
@@ -5065,7 +5065,7 @@ static int smctr_send_tx_forward(struct net_device *dev, MAC_HEADER *rmf,
...
@@ -5065,7 +5065,7 @@ static int smctr_send_tx_forward(struct net_device *dev, MAC_HEADER *rmf,
static
int
smctr_set_auth_access_pri
(
struct
net_device
*
dev
,
static
int
smctr_set_auth_access_pri
(
struct
net_device
*
dev
,
MAC_SUB_VECTOR
*
rsv
)
MAC_SUB_VECTOR
*
rsv
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
if
(
rsv
->
svl
!=
S_AUTHORIZED_ACCESS_PRIORITY
)
if
(
rsv
->
svl
!=
S_AUTHORIZED_ACCESS_PRIORITY
)
return
(
E_SUB_VECTOR_LENGTH_ERROR
);
return
(
E_SUB_VECTOR_LENGTH_ERROR
);
...
@@ -5078,7 +5078,7 @@ static int smctr_set_auth_access_pri(struct net_device *dev,
...
@@ -5078,7 +5078,7 @@ static int smctr_set_auth_access_pri(struct net_device *dev,
static
int
smctr_set_auth_funct_class
(
struct
net_device
*
dev
,
static
int
smctr_set_auth_funct_class
(
struct
net_device
*
dev
,
MAC_SUB_VECTOR
*
rsv
)
MAC_SUB_VECTOR
*
rsv
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
if
(
rsv
->
svl
!=
S_AUTHORIZED_FUNCTION_CLASS
)
if
(
rsv
->
svl
!=
S_AUTHORIZED_FUNCTION_CLASS
)
return
(
E_SUB_VECTOR_LENGTH_ERROR
);
return
(
E_SUB_VECTOR_LENGTH_ERROR
);
...
@@ -5139,7 +5139,7 @@ static int smctr_set_frame_forward(struct net_device *dev,
...
@@ -5139,7 +5139,7 @@ static int smctr_set_frame_forward(struct net_device *dev,
static
int
smctr_set_local_ring_num
(
struct
net_device
*
dev
,
static
int
smctr_set_local_ring_num
(
struct
net_device
*
dev
,
MAC_SUB_VECTOR
*
rsv
)
MAC_SUB_VECTOR
*
rsv
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
if
(
rsv
->
svl
!=
S_LOCAL_RING_NUMBER
)
if
(
rsv
->
svl
!=
S_LOCAL_RING_NUMBER
)
return
(
E_SUB_VECTOR_LENGTH_ERROR
);
return
(
E_SUB_VECTOR_LENGTH_ERROR
);
...
@@ -5153,7 +5153,7 @@ static int smctr_set_local_ring_num(struct net_device *dev,
...
@@ -5153,7 +5153,7 @@ static int smctr_set_local_ring_num(struct net_device *dev,
static
unsigned
short
smctr_set_ctrl_attention
(
struct
net_device
*
dev
)
static
unsigned
short
smctr_set_ctrl_attention
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
if
(
tp
->
bic_type
==
BIC_585_CHIP
)
if
(
tp
->
bic_type
==
BIC_585_CHIP
)
...
@@ -5177,7 +5177,7 @@ static void smctr_set_multicast_list(struct net_device *dev)
...
@@ -5177,7 +5177,7 @@ static void smctr_set_multicast_list(struct net_device *dev)
static
int
smctr_set_page
(
struct
net_device
*
dev
,
__u8
*
buf
)
static
int
smctr_set_page
(
struct
net_device
*
dev
,
__u8
*
buf
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
__u8
amask
;
__u8
amask
;
__u32
tptr
;
__u32
tptr
;
...
@@ -5207,7 +5207,7 @@ static int smctr_set_phy_drop(struct net_device *dev, MAC_SUB_VECTOR *rsv)
...
@@ -5207,7 +5207,7 @@ static int smctr_set_phy_drop(struct net_device *dev, MAC_SUB_VECTOR *rsv)
*/
*/
static
int
smctr_set_ring_speed
(
struct
net_device
*
dev
)
static
int
smctr_set_ring_speed
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
err
;
int
err
;
if
(
tp
->
media_type
==
MEDIA_UTP_16
)
if
(
tp
->
media_type
==
MEDIA_UTP_16
)
...
@@ -5235,7 +5235,7 @@ static int smctr_set_ring_speed(struct net_device *dev)
...
@@ -5235,7 +5235,7 @@ static int smctr_set_ring_speed(struct net_device *dev)
static
int
smctr_set_rx_look_ahead
(
struct
net_device
*
dev
)
static
int
smctr_set_rx_look_ahead
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
__u16
sword
,
rword
;
__u16
sword
,
rword
;
if
(
smctr_debug
>
10
)
if
(
smctr_debug
>
10
)
...
@@ -5278,7 +5278,7 @@ static int smctr_set_trc_reset(int ioaddr)
...
@@ -5278,7 +5278,7 @@ static int smctr_set_trc_reset(int ioaddr)
static
int
smctr_setup_single_cmd
(
struct
net_device
*
dev
,
static
int
smctr_setup_single_cmd
(
struct
net_device
*
dev
,
__u16
command
,
__u16
subcommand
)
__u16
command
,
__u16
subcommand
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
int
err
;
unsigned
int
err
;
if
(
smctr_debug
>
10
)
if
(
smctr_debug
>
10
)
...
@@ -5305,7 +5305,7 @@ static int smctr_setup_single_cmd(struct net_device *dev,
...
@@ -5305,7 +5305,7 @@ static int smctr_setup_single_cmd(struct net_device *dev,
static
int
smctr_setup_single_cmd_w_data
(
struct
net_device
*
dev
,
static
int
smctr_setup_single_cmd_w_data
(
struct
net_device
*
dev
,
__u16
command
,
__u16
subcommand
)
__u16
command
,
__u16
subcommand
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
tp
->
acb_head
->
cmd_done_status
=
ACB_COMMAND_NOT_DONE
;
tp
->
acb_head
->
cmd_done_status
=
ACB_COMMAND_NOT_DONE
;
tp
->
acb_head
->
cmd
=
command
;
tp
->
acb_head
->
cmd
=
command
;
...
@@ -5318,7 +5318,7 @@ static int smctr_setup_single_cmd_w_data(struct net_device *dev,
...
@@ -5318,7 +5318,7 @@ static int smctr_setup_single_cmd_w_data(struct net_device *dev,
static
char
*
smctr_malloc
(
struct
net_device
*
dev
,
__u16
size
)
static
char
*
smctr_malloc
(
struct
net_device
*
dev
,
__u16
size
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
char
*
m
;
char
*
m
;
m
=
(
char
*
)(
tp
->
ram_access
+
tp
->
sh_mem_used
);
m
=
(
char
*
)(
tp
->
ram_access
+
tp
->
sh_mem_used
);
...
@@ -5329,7 +5329,7 @@ static char *smctr_malloc(struct net_device *dev, __u16 size)
...
@@ -5329,7 +5329,7 @@ static char *smctr_malloc(struct net_device *dev, __u16 size)
static
int
smctr_status_chg
(
struct
net_device
*
dev
)
static
int
smctr_status_chg
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
if
(
smctr_debug
>
10
)
if
(
smctr_debug
>
10
)
printk
(
KERN_DEBUG
"%s: smctr_status_chg
\n
"
,
dev
->
name
);
printk
(
KERN_DEBUG
"%s: smctr_status_chg
\n
"
,
dev
->
name
);
...
@@ -5365,7 +5365,7 @@ static int smctr_status_chg(struct net_device *dev)
...
@@ -5365,7 +5365,7 @@ static int smctr_status_chg(struct net_device *dev)
static
int
smctr_trc_send_packet
(
struct
net_device
*
dev
,
FCBlock
*
fcb
,
static
int
smctr_trc_send_packet
(
struct
net_device
*
dev
,
FCBlock
*
fcb
,
__u16
queue
)
__u16
queue
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
err
=
0
;
int
err
=
0
;
if
(
smctr_debug
>
10
)
if
(
smctr_debug
>
10
)
...
@@ -5386,7 +5386,7 @@ static int smctr_trc_send_packet(struct net_device *dev, FCBlock *fcb,
...
@@ -5386,7 +5386,7 @@ static int smctr_trc_send_packet(struct net_device *dev, FCBlock *fcb,
static
__u16
smctr_tx_complete
(
struct
net_device
*
dev
,
__u16
queue
)
static
__u16
smctr_tx_complete
(
struct
net_device
*
dev
,
__u16
queue
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
__u16
status
,
err
=
0
;
__u16
status
,
err
=
0
;
int
cstatus
;
int
cstatus
;
...
@@ -5441,7 +5441,7 @@ static __u16 smctr_tx_complete(struct net_device *dev, __u16 queue)
...
@@ -5441,7 +5441,7 @@ static __u16 smctr_tx_complete(struct net_device *dev, __u16 queue)
static
unsigned
short
smctr_tx_move_frame
(
struct
net_device
*
dev
,
static
unsigned
short
smctr_tx_move_frame
(
struct
net_device
*
dev
,
struct
sk_buff
*
skb
,
__u8
*
pbuff
,
unsigned
int
bytes
)
struct
sk_buff
*
skb
,
__u8
*
pbuff
,
unsigned
int
bytes
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
int
ram_usable
;
unsigned
int
ram_usable
;
__u32
flen
,
len
,
offset
=
0
;
__u32
flen
,
len
,
offset
=
0
;
__u8
*
frag
,
*
page
;
__u8
*
frag
,
*
page
;
...
@@ -5482,7 +5482,7 @@ static unsigned short smctr_tx_move_frame(struct net_device *dev,
...
@@ -5482,7 +5482,7 @@ static unsigned short smctr_tx_move_frame(struct net_device *dev,
/* Update the error statistic counters for this adapter. */
/* Update the error statistic counters for this adapter. */
static
int
smctr_update_err_stats
(
struct
net_device
*
dev
)
static
int
smctr_update_err_stats
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
struct
tr_statistics
*
tstat
=
&
tp
->
MacStat
;
struct
tr_statistics
*
tstat
=
&
tp
->
MacStat
;
if
(
tstat
->
internal_errors
)
if
(
tstat
->
internal_errors
)
...
@@ -5524,7 +5524,7 @@ static int smctr_update_err_stats(struct net_device *dev)
...
@@ -5524,7 +5524,7 @@ static int smctr_update_err_stats(struct net_device *dev)
static
int
smctr_update_rx_chain
(
struct
net_device
*
dev
,
__u16
queue
)
static
int
smctr_update_rx_chain
(
struct
net_device
*
dev
,
__u16
queue
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
FCBlock
*
fcb
;
FCBlock
*
fcb
;
BDBlock
*
bdb
;
BDBlock
*
bdb
;
__u16
size
,
len
;
__u16
size
,
len
;
...
@@ -5562,7 +5562,7 @@ static int smctr_update_rx_chain(struct net_device *dev, __u16 queue)
...
@@ -5562,7 +5562,7 @@ static int smctr_update_rx_chain(struct net_device *dev, __u16 queue)
static
int
smctr_update_tx_chain
(
struct
net_device
*
dev
,
FCBlock
*
fcb
,
static
int
smctr_update_tx_chain
(
struct
net_device
*
dev
,
FCBlock
*
fcb
,
__u16
queue
)
__u16
queue
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
if
(
smctr_debug
>
20
)
if
(
smctr_debug
>
20
)
printk
(
KERN_DEBUG
"smctr_update_tx_chain
\n
"
);
printk
(
KERN_DEBUG
"smctr_update_tx_chain
\n
"
);
...
@@ -5598,7 +5598,7 @@ static int smctr_update_tx_chain(struct net_device *dev, FCBlock *fcb,
...
@@ -5598,7 +5598,7 @@ static int smctr_update_tx_chain(struct net_device *dev, FCBlock *fcb,
static
int
smctr_wait_cmd
(
struct
net_device
*
dev
)
static
int
smctr_wait_cmd
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
int
loop_count
=
0x20000
;
unsigned
int
loop_count
=
0x20000
;
if
(
smctr_debug
>
10
)
if
(
smctr_debug
>
10
)
...
@@ -5623,7 +5623,7 @@ static int smctr_wait_cmd(struct net_device *dev)
...
@@ -5623,7 +5623,7 @@ static int smctr_wait_cmd(struct net_device *dev)
static
int
smctr_wait_while_cbusy
(
struct
net_device
*
dev
)
static
int
smctr_wait_while_cbusy
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
int
timeout
=
0x20000
;
unsigned
int
timeout
=
0x20000
;
int
ioaddr
=
dev
->
base_addr
;
int
ioaddr
=
dev
->
base_addr
;
__u8
r
;
__u8
r
;
...
@@ -5686,7 +5686,7 @@ static struct net_device *setup_card(int n)
...
@@ -5686,7 +5686,7 @@ static struct net_device *setup_card(int n)
return
dev
;
return
dev
;
out1:
out1:
#ifdef CONFIG_MCA
#ifdef CONFIG_MCA
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
{
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
if
(
tp
->
slot_num
)
if
(
tp
->
slot_num
)
mca_mark_as_unused
(
tp
->
slot_num
);
mca_mark_as_unused
(
tp
->
slot_num
);
}
}
...
@@ -5726,7 +5726,7 @@ void cleanup_module(void)
...
@@ -5726,7 +5726,7 @@ void cleanup_module(void)
unregister_netdev
(
dev
);
unregister_netdev
(
dev
);
#ifdef CONFIG_MCA
#ifdef CONFIG_MCA
{
struct
net_local
*
tp
=
dev
->
priv
;
{
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
if
(
tp
->
slot_num
)
if
(
tp
->
slot_num
)
mca_mark_as_unused
(
tp
->
slot_num
);
mca_mark_as_unused
(
tp
->
slot_num
);
}
}
...
...
drivers/net/tokenring/tms380tr.c
View file @
49b7b788
...
@@ -243,7 +243,7 @@ static int madgemc_sifprobe(struct net_device *dev)
...
@@ -243,7 +243,7 @@ static int madgemc_sifprobe(struct net_device *dev)
*/
*/
int
tms380tr_open
(
struct
net_device
*
dev
)
int
tms380tr_open
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
err
;
int
err
;
/* init the spinlock */
/* init the spinlock */
...
@@ -313,7 +313,7 @@ int tms380tr_open(struct net_device *dev)
...
@@ -313,7 +313,7 @@ int tms380tr_open(struct net_device *dev)
static
void
tms380tr_timer_end_wait
(
unsigned
long
data
)
static
void
tms380tr_timer_end_wait
(
unsigned
long
data
)
{
{
struct
net_device
*
dev
=
(
struct
net_device
*
)
data
;
struct
net_device
*
dev
=
(
struct
net_device
*
)
data
;
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
if
(
tp
->
Sleeping
)
if
(
tp
->
Sleeping
)
{
{
...
@@ -329,7 +329,7 @@ static void tms380tr_timer_end_wait(unsigned long data)
...
@@ -329,7 +329,7 @@ static void tms380tr_timer_end_wait(unsigned long data)
*/
*/
static
int
tms380tr_chipset_init
(
struct
net_device
*
dev
)
static
int
tms380tr_chipset_init
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
err
;
int
err
;
tms380tr_init_ipb
(
tp
);
tms380tr_init_ipb
(
tp
);
...
@@ -364,7 +364,7 @@ static int tms380tr_chipset_init(struct net_device *dev)
...
@@ -364,7 +364,7 @@ static int tms380tr_chipset_init(struct net_device *dev)
*/
*/
static
void
tms380tr_init_net_local
(
struct
net_device
*
dev
)
static
void
tms380tr_init_net_local
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
i
;
int
i
;
dma_addr_t
dmabuf
;
dma_addr_t
dmabuf
;
...
@@ -492,7 +492,7 @@ static void tms380tr_init_opb(struct net_device *dev)
...
@@ -492,7 +492,7 @@ static void tms380tr_init_opb(struct net_device *dev)
unsigned
short
BufferSize
=
BUFFER_SIZE
;
unsigned
short
BufferSize
=
BUFFER_SIZE
;
int
i
;
int
i
;
tp
=
(
struct
net_local
*
)
dev
->
priv
;
tp
=
netdev_priv
(
dev
)
;
tp
->
ocpl
.
OPENOptions
=
0
;
tp
->
ocpl
.
OPENOptions
=
0
;
tp
->
ocpl
.
OPENOptions
|=
ENABLE_FULL_DUPLEX_SELECTION
;
tp
->
ocpl
.
OPENOptions
|=
ENABLE_FULL_DUPLEX_SELECTION
;
...
@@ -531,7 +531,7 @@ static void tms380tr_init_opb(struct net_device *dev)
...
@@ -531,7 +531,7 @@ static void tms380tr_init_opb(struct net_device *dev)
*/
*/
static
void
tms380tr_open_adapter
(
struct
net_device
*
dev
)
static
void
tms380tr_open_adapter
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
if
(
tp
->
OpenCommandIssued
)
if
(
tp
->
OpenCommandIssued
)
return
;
return
;
...
@@ -569,7 +569,7 @@ static void tms380tr_enable_interrupts(struct net_device *dev)
...
@@ -569,7 +569,7 @@ static void tms380tr_enable_interrupts(struct net_device *dev)
*/
*/
static
void
tms380tr_exec_cmd
(
struct
net_device
*
dev
,
unsigned
short
Command
)
static
void
tms380tr_exec_cmd
(
struct
net_device
*
dev
,
unsigned
short
Command
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
tp
->
CMDqueue
|=
Command
;
tp
->
CMDqueue
|=
Command
;
tms380tr_chk_outstanding_cmds
(
dev
);
tms380tr_chk_outstanding_cmds
(
dev
);
...
@@ -596,7 +596,7 @@ static void tms380tr_timeout(struct net_device *dev)
...
@@ -596,7 +596,7 @@ static void tms380tr_timeout(struct net_device *dev)
*/
*/
static
int
tms380tr_send_packet
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
static
int
tms380tr_send_packet
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
int
err
;
int
err
;
err
=
tms380tr_hardware_send_packet
(
skb
,
dev
);
err
=
tms380tr_hardware_send_packet
(
skb
,
dev
);
...
@@ -616,7 +616,7 @@ static int tms380tr_hardware_send_packet(struct sk_buff *skb, struct net_device
...
@@ -616,7 +616,7 @@ static int tms380tr_hardware_send_packet(struct sk_buff *skb, struct net_device
unsigned
long
flags
;
unsigned
long
flags
;
int
i
;
int
i
;
dma_addr_t
dmabuf
,
newbuf
;
dma_addr_t
dmabuf
,
newbuf
;
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
/* Try to get a free TPL from the chain.
/* Try to get a free TPL from the chain.
*
*
...
@@ -715,7 +715,7 @@ static void tms380tr_chk_src_addr(unsigned char *frame, unsigned char *hw_addr)
...
@@ -715,7 +715,7 @@ static void tms380tr_chk_src_addr(unsigned char *frame, unsigned char *hw_addr)
static
void
tms380tr_timer_chk
(
unsigned
long
data
)
static
void
tms380tr_timer_chk
(
unsigned
long
data
)
{
{
struct
net_device
*
dev
=
(
struct
net_device
*
)
data
;
struct
net_device
*
dev
=
(
struct
net_device
*
)
data
;
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
if
(
tp
->
HaltInProgress
)
if
(
tp
->
HaltInProgress
)
return
;
return
;
...
@@ -755,7 +755,7 @@ irqreturn_t tms380tr_interrupt(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -755,7 +755,7 @@ irqreturn_t tms380tr_interrupt(int irq, void *dev_id, struct pt_regs *regs)
return
IRQ_NONE
;
return
IRQ_NONE
;
}
}
tp
=
(
struct
net_local
*
)
dev
->
priv
;
tp
=
netdev_priv
(
dev
)
;
irq_type
=
SIFREADW
(
SIFSTS
);
irq_type
=
SIFREADW
(
SIFSTS
);
...
@@ -843,7 +843,7 @@ irqreturn_t tms380tr_interrupt(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -843,7 +843,7 @@ irqreturn_t tms380tr_interrupt(int irq, void *dev_id, struct pt_regs *regs)
*/
*/
static
void
tms380tr_reset_interrupt
(
struct
net_device
*
dev
)
static
void
tms380tr_reset_interrupt
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
SSB
*
ssb
=
&
tp
->
ssb
;
SSB
*
ssb
=
&
tp
->
ssb
;
/*
/*
...
@@ -929,7 +929,7 @@ static unsigned char tms380tr_chk_ssb(struct net_local *tp, unsigned short IrqTy
...
@@ -929,7 +929,7 @@ static unsigned char tms380tr_chk_ssb(struct net_local *tp, unsigned short IrqTy
*/
*/
static
void
tms380tr_cmd_status_irq
(
struct
net_device
*
dev
)
static
void
tms380tr_cmd_status_irq
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
short
ssb_cmd
,
ssb_parm_0
;
unsigned
short
ssb_cmd
,
ssb_parm_0
;
unsigned
short
ssb_parm_1
;
unsigned
short
ssb_parm_1
;
char
*
open_err
=
"Open error -"
;
char
*
open_err
=
"Open error -"
;
...
@@ -1126,7 +1126,7 @@ static void tms380tr_cmd_status_irq(struct net_device *dev)
...
@@ -1126,7 +1126,7 @@ static void tms380tr_cmd_status_irq(struct net_device *dev)
*/
*/
int
tms380tr_close
(
struct
net_device
*
dev
)
int
tms380tr_close
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
netif_stop_queue
(
dev
);
netif_stop_queue
(
dev
);
del_timer
(
&
tp
->
timer
);
del_timer
(
&
tp
->
timer
);
...
@@ -1172,7 +1172,7 @@ int tms380tr_close(struct net_device *dev)
...
@@ -1172,7 +1172,7 @@ int tms380tr_close(struct net_device *dev)
*/
*/
static
struct
net_device_stats
*
tms380tr_get_stats
(
struct
net_device
*
dev
)
static
struct
net_device_stats
*
tms380tr_get_stats
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
return
((
struct
net_device_stats
*
)
&
tp
->
MacStat
);
return
((
struct
net_device_stats
*
)
&
tp
->
MacStat
);
}
}
...
@@ -1182,7 +1182,7 @@ static struct net_device_stats *tms380tr_get_stats(struct net_device *dev)
...
@@ -1182,7 +1182,7 @@ static struct net_device_stats *tms380tr_get_stats(struct net_device *dev)
*/
*/
static
void
tms380tr_set_multicast_list
(
struct
net_device
*
dev
)
static
void
tms380tr_set_multicast_list
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
int
OpenOptions
;
unsigned
int
OpenOptions
;
OpenOptions
=
tp
->
ocpl
.
OPENOptions
&
OpenOptions
=
tp
->
ocpl
.
OPENOptions
&
...
@@ -1275,7 +1275,7 @@ static void tms380tr_exec_sifcmd(struct net_device *dev, unsigned int WriteValue
...
@@ -1275,7 +1275,7 @@ static void tms380tr_exec_sifcmd(struct net_device *dev, unsigned int WriteValue
*/
*/
static
int
tms380tr_reset_adapter
(
struct
net_device
*
dev
)
static
int
tms380tr_reset_adapter
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
short
*
fw_ptr
;
unsigned
short
*
fw_ptr
;
unsigned
short
count
,
c
,
count2
;
unsigned
short
count
,
c
,
count2
;
const
struct
firmware
*
fw_entry
=
NULL
;
const
struct
firmware
*
fw_entry
=
NULL
;
...
@@ -1428,7 +1428,7 @@ static int tms380tr_bringup_diags(struct net_device *dev)
...
@@ -1428,7 +1428,7 @@ static int tms380tr_bringup_diags(struct net_device *dev)
*/
*/
static
int
tms380tr_init_adapter
(
struct
net_device
*
dev
)
static
int
tms380tr_init_adapter
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
const
unsigned
char
SCB_Test
[
6
]
=
{
0x00
,
0x00
,
0xC1
,
0xE2
,
0xD4
,
0x8B
};
const
unsigned
char
SCB_Test
[
6
]
=
{
0x00
,
0x00
,
0xC1
,
0xE2
,
0xD4
,
0x8B
};
const
unsigned
char
SSB_Test
[
8
]
=
{
0xFF
,
0xFF
,
0xD1
,
0xD7
,
const
unsigned
char
SSB_Test
[
8
]
=
{
0xFF
,
0xFF
,
0xD1
,
0xD7
,
...
@@ -1541,7 +1541,7 @@ static int tms380tr_init_adapter(struct net_device *dev)
...
@@ -1541,7 +1541,7 @@ static int tms380tr_init_adapter(struct net_device *dev)
*/
*/
static
void
tms380tr_chk_outstanding_cmds
(
struct
net_device
*
dev
)
static
void
tms380tr_chk_outstanding_cmds
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
long
Addr
=
0
;
unsigned
long
Addr
=
0
;
if
(
tp
->
CMDqueue
==
0
)
if
(
tp
->
CMDqueue
==
0
)
...
@@ -1713,7 +1713,7 @@ static void tms380tr_chk_outstanding_cmds(struct net_device *dev)
...
@@ -1713,7 +1713,7 @@ static void tms380tr_chk_outstanding_cmds(struct net_device *dev)
*/
*/
static
void
tms380tr_ring_status_irq
(
struct
net_device
*
dev
)
static
void
tms380tr_ring_status_irq
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
tp
->
CurrentRingStatus
=
be16_to_cpu
((
unsigned
short
)
tp
->
ssb
.
Parm
[
0
]);
tp
->
CurrentRingStatus
=
be16_to_cpu
((
unsigned
short
)
tp
->
ssb
.
Parm
[
0
]);
...
@@ -1785,7 +1785,7 @@ static void tms380tr_chk_irq(struct net_device *dev)
...
@@ -1785,7 +1785,7 @@ static void tms380tr_chk_irq(struct net_device *dev)
{
{
int
i
;
int
i
;
unsigned
short
AdapterCheckBlock
[
4
];
unsigned
short
AdapterCheckBlock
[
4
];
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
tp
->
AdapterOpenFlag
=
0
;
/* Adapter closed now */
tp
->
AdapterOpenFlag
=
0
;
/* Adapter closed now */
...
@@ -1941,7 +1941,7 @@ static void tms380tr_chk_irq(struct net_device *dev)
...
@@ -1941,7 +1941,7 @@ static void tms380tr_chk_irq(struct net_device *dev)
*/
*/
static
int
tms380tr_read_ptr
(
struct
net_device
*
dev
)
static
int
tms380tr_read_ptr
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
short
adapterram
;
unsigned
short
adapterram
;
tms380tr_read_ram
(
dev
,
(
unsigned
char
*
)
&
tp
->
intptrs
.
BurnedInAddrPtr
,
tms380tr_read_ram
(
dev
,
(
unsigned
char
*
)
&
tp
->
intptrs
.
BurnedInAddrPtr
,
...
@@ -2031,7 +2031,7 @@ static void tms380tr_cancel_tx_queue(struct net_local* tp)
...
@@ -2031,7 +2031,7 @@ static void tms380tr_cancel_tx_queue(struct net_local* tp)
*/
*/
static
void
tms380tr_tx_status_irq
(
struct
net_device
*
dev
)
static
void
tms380tr_tx_status_irq
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
char
HighByte
,
HighAc
,
LowAc
;
unsigned
char
HighByte
,
HighAc
,
LowAc
;
TPL
*
tpl
;
TPL
*
tpl
;
...
@@ -2102,7 +2102,7 @@ static void tms380tr_tx_status_irq(struct net_device *dev)
...
@@ -2102,7 +2102,7 @@ static void tms380tr_tx_status_irq(struct net_device *dev)
*/
*/
static
void
tms380tr_rcv_status_irq
(
struct
net_device
*
dev
)
static
void
tms380tr_rcv_status_irq
(
struct
net_device
*
dev
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
unsigned
char
*
ReceiveDataPtr
;
unsigned
char
*
ReceiveDataPtr
;
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
unsigned
int
Length
,
Length2
;
unsigned
int
Length
,
Length2
;
...
@@ -2293,7 +2293,7 @@ static void tms380tr_update_rcv_stats(struct net_local *tp, unsigned char DataPt
...
@@ -2293,7 +2293,7 @@ static void tms380tr_update_rcv_stats(struct net_local *tp, unsigned char DataPt
static
int
tms380tr_set_mac_address
(
struct
net_device
*
dev
,
void
*
addr
)
static
int
tms380tr_set_mac_address
(
struct
net_device
*
dev
,
void
*
addr
)
{
{
struct
net_local
*
tp
=
(
struct
net_local
*
)
dev
->
priv
;
struct
net_local
*
tp
=
netdev_priv
(
dev
)
;
struct
sockaddr
*
saddr
=
addr
;
struct
sockaddr
*
saddr
=
addr
;
if
(
tp
->
AdapterOpenFlag
||
tp
->
AdapterVirtOpenFlag
)
{
if
(
tp
->
AdapterOpenFlag
||
tp
->
AdapterVirtOpenFlag
)
{
...
@@ -2327,7 +2327,7 @@ void tmsdev_term(struct net_device *dev)
...
@@ -2327,7 +2327,7 @@ void tmsdev_term(struct net_device *dev)
{
{
struct
net_local
*
tp
;
struct
net_local
*
tp
;
tp
=
(
struct
net_local
*
)
dev
->
priv
;
tp
=
netdev_priv
(
dev
)
;
pci_unmap_single
(
tp
->
pdev
,
tp
->
dmabuffer
,
sizeof
(
struct
net_local
),
pci_unmap_single
(
tp
->
pdev
,
tp
->
dmabuffer
,
sizeof
(
struct
net_local
),
PCI_DMA_BIDIRECTIONAL
);
PCI_DMA_BIDIRECTIONAL
);
}
}
...
@@ -2338,7 +2338,7 @@ int tmsdev_init(struct net_device *dev, unsigned long dmalimit,
...
@@ -2338,7 +2338,7 @@ int tmsdev_init(struct net_device *dev, unsigned long dmalimit,
struct
net_local
*
tms_local
;
struct
net_local
*
tms_local
;
memset
(
dev
->
priv
,
0
,
sizeof
(
struct
net_local
));
memset
(
dev
->
priv
,
0
,
sizeof
(
struct
net_local
));
tms_local
=
(
struct
net_local
*
)
dev
->
priv
;
tms_local
=
netdev_priv
(
dev
)
;
init_waitqueue_head
(
&
tms_local
->
wait_for_tok_int
);
init_waitqueue_head
(
&
tms_local
->
wait_for_tok_int
);
tms_local
->
dmalimit
=
dmalimit
;
tms_local
->
dmalimit
=
dmalimit
;
tms_local
->
pdev
=
pdev
;
tms_local
->
pdev
=
pdev
;
...
...
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