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
a2ef64a3
Commit
a2ef64a3
authored
Nov 19, 2002
by
David S. Miller
Committed by
Jeff Garzik
Nov 19, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TG3]: Use spin_lock_irq{save,restore} on tx_lock.
parent
fefb5d38
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
drivers/net/tg3.c
drivers/net/tg3.c
+8
-6
No files found.
drivers/net/tg3.c
View file @
a2ef64a3
...
...
@@ -2371,6 +2371,7 @@ static int tg3_start_xmit_4gbug(struct sk_buff *skb, struct net_device *dev)
unsigned
int
i
;
u32
len
,
entry
,
base_flags
,
mss
;
int
would_hit_hwbug
;
unsigned
long
flags
;
len
=
(
skb
->
len
-
skb
->
data_len
);
...
...
@@ -2393,12 +2394,12 @@ static int tg3_start_xmit_4gbug(struct sk_buff *skb, struct net_device *dev)
* So we really do need to disable interrupts when taking
* tx_lock here.
*/
spin_lock_irq
(
&
tp
->
tx_lock
);
spin_lock_irq
save
(
&
tp
->
tx_lock
,
flags
);
/* This is a hard error, log it. */
if
(
unlikely
(
TX_BUFFS_AVAIL
(
tp
)
<=
(
skb_shinfo
(
skb
)
->
nr_frags
+
1
)))
{
netif_stop_queue
(
dev
);
spin_unlock_irq
(
&
tp
->
tx_lock
);
spin_unlock_irq
restore
(
&
tp
->
tx_lock
,
flags
);
printk
(
KERN_ERR
PFX
"%s: BUG! Tx Ring full when queue awake!
\n
"
,
dev
->
name
);
return
1
;
...
...
@@ -2550,7 +2551,7 @@ static int tg3_start_xmit_4gbug(struct sk_buff *skb, struct net_device *dev)
netif_stop_queue
(
dev
);
out_unlock:
spin_unlock_irq
(
&
tp
->
tx_lock
);
spin_unlock_irq
restore
(
&
tp
->
tx_lock
,
flags
);
dev
->
trans_start
=
jiffies
;
...
...
@@ -2562,6 +2563,7 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
struct
tg3
*
tp
=
dev
->
priv
;
dma_addr_t
mapping
;
u32
len
,
entry
,
base_flags
,
mss
;
unsigned
long
flags
;
len
=
(
skb
->
len
-
skb
->
data_len
);
...
...
@@ -2584,12 +2586,12 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
* So we really do need to disable interrupts when taking
* tx_lock here.
*/
spin_lock_irq
(
&
tp
->
tx_lock
);
spin_lock_irq
save
(
&
tp
->
tx_lock
,
flags
);
/* This is a hard error, log it. */
if
(
unlikely
(
TX_BUFFS_AVAIL
(
tp
)
<=
(
skb_shinfo
(
skb
)
->
nr_frags
+
1
)))
{
netif_stop_queue
(
dev
);
spin_unlock_irq
(
&
tp
->
tx_lock
);
spin_unlock_irq
restore
(
&
tp
->
tx_lock
,
flags
);
printk
(
KERN_ERR
PFX
"%s: BUG! Tx Ring full when queue awake!
\n
"
,
dev
->
name
);
return
1
;
...
...
@@ -2695,7 +2697,7 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
if
(
TX_BUFFS_AVAIL
(
tp
)
<=
(
MAX_SKB_FRAGS
+
1
))
netif_stop_queue
(
dev
);
spin_unlock_irq
(
&
tp
->
tx_lock
);
spin_unlock_irq
restore
(
&
tp
->
tx_lock
,
flags
);
dev
->
trans_start
=
jiffies
;
...
...
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