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
c0bd55ef
Commit
c0bd55ef
authored
Mar 09, 2012
by
Francois Romieu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winbond840: stop using net_device.{base_addr, irq}.
Signed-off-by:
Francois Romieu
<
romieu@fr.zoreil.com
>
parent
c0357e97
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
drivers/net/ethernet/dec/tulip/winbond-840.c
drivers/net/ethernet/dec/tulip/winbond-840.c
+8
-9
No files found.
drivers/net/ethernet/dec/tulip/winbond-840.c
View file @
c0bd55ef
...
...
@@ -400,9 +400,6 @@ static int __devinit w840_probe1 (struct pci_dev *pdev,
No hold time required! */
iowrite32
(
0x00000001
,
ioaddr
+
PCIBusCfg
);
dev
->
base_addr
=
(
unsigned
long
)
ioaddr
;
dev
->
irq
=
irq
;
np
=
netdev_priv
(
dev
);
np
->
pci_dev
=
pdev
;
np
->
chip_id
=
chip_idx
;
...
...
@@ -635,17 +632,18 @@ static int netdev_open(struct net_device *dev)
{
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
void
__iomem
*
ioaddr
=
np
->
base_addr
;
const
int
irq
=
np
->
pci_dev
->
irq
;
int
i
;
iowrite32
(
0x00000001
,
ioaddr
+
PCIBusCfg
);
/* Reset */
netif_device_detach
(
dev
);
i
=
request_irq
(
dev
->
irq
,
intr_handler
,
IRQF_SHARED
,
dev
->
name
,
dev
);
i
=
request_irq
(
irq
,
intr_handler
,
IRQF_SHARED
,
dev
->
name
,
dev
);
if
(
i
)
goto
out_err
;
if
(
debug
>
1
)
netdev_dbg
(
dev
,
"w89c840_open() irq %d
\n
"
,
dev
->
irq
);
netdev_dbg
(
dev
,
"w89c840_open() irq %d
\n
"
,
irq
);
if
((
i
=
alloc_ringdesc
(
dev
)))
goto
out_err
;
...
...
@@ -932,6 +930,7 @@ static void tx_timeout(struct net_device *dev)
{
struct
netdev_private
*
np
=
netdev_priv
(
dev
);
void
__iomem
*
ioaddr
=
np
->
base_addr
;
const
int
irq
=
np
->
pci_dev
->
irq
;
dev_warn
(
&
dev
->
dev
,
"Transmit timed out, status %08x, resetting...
\n
"
,
ioread32
(
ioaddr
+
IntrStatus
));
...
...
@@ -951,7 +950,7 @@ static void tx_timeout(struct net_device *dev)
np
->
cur_tx
,
np
->
dirty_tx
,
np
->
tx_full
,
np
->
tx_q_bytes
);
printk
(
KERN_DEBUG
"Tx Descriptor addr %xh
\n
"
,
ioread32
(
ioaddr
+
0x4C
));
disable_irq
(
dev
->
irq
);
disable_irq
(
irq
);
spin_lock_irq
(
&
np
->
lock
);
/*
* Under high load dirty_tx and the internal tx descriptor pointer
...
...
@@ -966,7 +965,7 @@ static void tx_timeout(struct net_device *dev)
init_rxtx_rings
(
dev
);
init_registers
(
dev
);
spin_unlock_irq
(
&
np
->
lock
);
enable_irq
(
dev
->
irq
);
enable_irq
(
irq
);
netif_wake_queue
(
dev
);
dev
->
trans_start
=
jiffies
;
/* prevent tx timeout */
...
...
@@ -1500,7 +1499,7 @@ static int netdev_close(struct net_device *dev)
iowrite32
(
0x0000
,
ioaddr
+
IntrEnable
);
spin_unlock_irq
(
&
np
->
lock
);
free_irq
(
dev
->
irq
,
dev
);
free_irq
(
np
->
pci_
dev
->
irq
,
dev
);
wmb
();
netif_device_attach
(
dev
);
...
...
@@ -1589,7 +1588,7 @@ static int w840_suspend (struct pci_dev *pdev, pm_message_t state)
iowrite32
(
0
,
ioaddr
+
IntrEnable
);
spin_unlock_irq
(
&
np
->
lock
);
synchronize_irq
(
dev
->
irq
);
synchronize_irq
(
np
->
pci_
dev
->
irq
);
netif_tx_disable
(
dev
);
np
->
stats
.
rx_missed_errors
+=
ioread32
(
ioaddr
+
RxMissed
)
&
0xffff
;
...
...
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