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
3bf29326
Commit
3bf29326
authored
Aug 18, 2003
by
Karol Kozimor
Committed by
Jeff Garzik
Aug 18, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[netdrvr 8139too] fix resume behavior
parent
335a69eb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
drivers/net/8139too.c
drivers/net/8139too.c
+9
-1
No files found.
drivers/net/8139too.c
View file @
3bf29326
...
@@ -566,6 +566,7 @@ struct rtl8139_private {
...
@@ -566,6 +566,7 @@ struct rtl8139_private {
void
*
mmio_addr
;
void
*
mmio_addr
;
int
drv_flags
;
int
drv_flags
;
struct
pci_dev
*
pci_dev
;
struct
pci_dev
*
pci_dev
;
u32
pci_state
[
16
];
struct
net_device_stats
stats
;
struct
net_device_stats
stats
;
unsigned
char
*
rx_ring
;
unsigned
char
*
rx_ring
;
unsigned
int
cur_rx
;
/* Index into the Rx buffer of next Rx pkt. */
unsigned
int
cur_rx
;
/* Index into the Rx buffer of next Rx pkt. */
...
@@ -2570,6 +2571,9 @@ static int rtl8139_suspend (struct pci_dev *pdev, u32 state)
...
@@ -2570,6 +2571,9 @@ static int rtl8139_suspend (struct pci_dev *pdev, u32 state)
tp
->
stats
.
rx_missed_errors
+=
RTL_R32
(
RxMissed
);
tp
->
stats
.
rx_missed_errors
+=
RTL_R32
(
RxMissed
);
RTL_W32
(
RxMissed
,
0
);
RTL_W32
(
RxMissed
,
0
);
pci_set_power_state
(
pdev
,
3
);
pci_save_state
(
pdev
,
tp
->
pci_state
);
spin_unlock_irqrestore
(
&
tp
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
tp
->
lock
,
flags
);
return
0
;
return
0
;
}
}
...
@@ -2578,11 +2582,15 @@ static int rtl8139_suspend (struct pci_dev *pdev, u32 state)
...
@@ -2578,11 +2582,15 @@ static int rtl8139_suspend (struct pci_dev *pdev, u32 state)
static
int
rtl8139_resume
(
struct
pci_dev
*
pdev
)
static
int
rtl8139_resume
(
struct
pci_dev
*
pdev
)
{
{
struct
net_device
*
dev
=
pci_get_drvdata
(
pdev
);
struct
net_device
*
dev
=
pci_get_drvdata
(
pdev
);
struct
rtl8139_private
*
tp
=
dev
->
priv
;
if
(
!
netif_running
(
dev
))
if
(
!
netif_running
(
dev
))
return
0
;
return
0
;
netif_device_attach
(
dev
);
pci_restore_state
(
pdev
,
tp
->
pci_state
);
pci_set_power_state
(
pdev
,
0
);
rtl8139_init_ring
(
dev
);
rtl8139_hw_start
(
dev
);
rtl8139_hw_start
(
dev
);
netif_device_attach
(
dev
);
return
0
;
return
0
;
}
}
...
...
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