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
816fd404
Commit
816fd404
authored
Feb 28, 2006
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-jeff' of
git://electric-eye.fr.zoreil.com/home/romieu/linux-2.6
parents
ec72070b
576cfa93
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
16 deletions
+24
-16
drivers/net/8139cp.c
drivers/net/8139cp.c
+21
-16
drivers/net/via-velocity.c
drivers/net/via-velocity.c
+3
-0
No files found.
drivers/net/8139cp.c
View file @
816fd404
...
@@ -1118,13 +1118,18 @@ static int cp_refill_rx (struct cp_private *cp)
...
@@ -1118,13 +1118,18 @@ static int cp_refill_rx (struct cp_private *cp)
return
-
ENOMEM
;
return
-
ENOMEM
;
}
}
static
void
cp_init_rings_index
(
struct
cp_private
*
cp
)
{
cp
->
rx_tail
=
0
;
cp
->
tx_head
=
cp
->
tx_tail
=
0
;
}
static
int
cp_init_rings
(
struct
cp_private
*
cp
)
static
int
cp_init_rings
(
struct
cp_private
*
cp
)
{
{
memset
(
cp
->
tx_ring
,
0
,
sizeof
(
struct
cp_desc
)
*
CP_TX_RING_SIZE
);
memset
(
cp
->
tx_ring
,
0
,
sizeof
(
struct
cp_desc
)
*
CP_TX_RING_SIZE
);
cp
->
tx_ring
[
CP_TX_RING_SIZE
-
1
].
opts1
=
cpu_to_le32
(
RingEnd
);
cp
->
tx_ring
[
CP_TX_RING_SIZE
-
1
].
opts1
=
cpu_to_le32
(
RingEnd
);
cp
->
rx_tail
=
0
;
cp_init_rings_index
(
cp
);
cp
->
tx_head
=
cp
->
tx_tail
=
0
;
return
cp_refill_rx
(
cp
);
return
cp_refill_rx
(
cp
);
}
}
...
@@ -1886,30 +1891,30 @@ static int cp_suspend (struct pci_dev *pdev, pm_message_t state)
...
@@ -1886,30 +1891,30 @@ static int cp_suspend (struct pci_dev *pdev, pm_message_t state)
spin_unlock_irqrestore
(
&
cp
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
cp
->
lock
,
flags
);
if
(
cp
->
pdev
&&
cp
->
wol_enabled
)
{
pci_save_state
(
pdev
);
pci_save_state
(
cp
->
pdev
);
pci_enable_wake
(
pdev
,
pci_choose_state
(
pdev
,
state
),
cp
->
wol_enabled
);
cp_set_d3_state
(
cp
);
pci_set_power_state
(
pdev
,
pci_choose_state
(
pdev
,
state
));
}
return
0
;
return
0
;
}
}
static
int
cp_resume
(
struct
pci_dev
*
pdev
)
static
int
cp_resume
(
struct
pci_dev
*
pdev
)
{
{
struct
net_device
*
dev
;
struct
net_device
*
dev
=
pci_get_drvdata
(
pdev
)
;
struct
cp_private
*
cp
;
struct
cp_private
*
cp
=
netdev_priv
(
dev
)
;
unsigned
long
flags
;
unsigned
long
flags
;
dev
=
pci_get_drvdata
(
pdev
);
if
(
!
netif_running
(
dev
))
cp
=
netdev_priv
(
dev
)
;
return
0
;
netif_device_attach
(
dev
);
netif_device_attach
(
dev
);
if
(
cp
->
pdev
&&
cp
->
wol_enabled
)
{
pci_set_power_state
(
pdev
,
PCI_D0
);
pci_set_power_state
(
cp
->
pdev
,
PCI_D0
);
pci_restore_state
(
pdev
);
pci_restore_state
(
cp
->
pdev
);
pci_enable_wake
(
pdev
,
PCI_D0
,
0
);
}
/* FIXME: sh*t may happen if the Rx ring buffer is depleted */
cp_init_rings_index
(
cp
);
cp_init_hw
(
cp
);
cp_init_hw
(
cp
);
netif_start_queue
(
dev
);
netif_start_queue
(
dev
);
...
...
drivers/net/via-velocity.c
View file @
816fd404
...
@@ -1106,6 +1106,9 @@ static void velocity_free_rd_ring(struct velocity_info *vptr)
...
@@ -1106,6 +1106,9 @@ static void velocity_free_rd_ring(struct velocity_info *vptr)
for
(
i
=
0
;
i
<
vptr
->
options
.
numrx
;
i
++
)
{
for
(
i
=
0
;
i
<
vptr
->
options
.
numrx
;
i
++
)
{
struct
velocity_rd_info
*
rd_info
=
&
(
vptr
->
rd_info
[
i
]);
struct
velocity_rd_info
*
rd_info
=
&
(
vptr
->
rd_info
[
i
]);
struct
rx_desc
*
rd
=
vptr
->
rd_ring
+
i
;
memset
(
rd
,
0
,
sizeof
(
*
rd
));
if
(
!
rd_info
->
skb
)
if
(
!
rd_info
->
skb
)
continue
;
continue
;
...
...
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