projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2685d41
)
r8152: check tx agg list before spin lock
author
hayeswang
<hayeswang@realtek.com>
Fri, 7 Mar 2014 03:04:35 +0000
(11:04 +0800)
committer
David S. Miller
<davem@davemloft.net>
Fri, 7 Mar 2014 21:24:28 +0000
(16:24 -0500)
Check tx agg list before spin lock to avoid doing spin lock every
times.
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/r8152.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/usb/r8152.c
b/drivers/net/usb/r8152.c
index 8ecb41b2df099cbfd16dbde6869222e858dfd3d1..00b3192568fe96c4aeee60e3fea7753727793476 100644
(file)
--- a/
drivers/net/usb/r8152.c
+++ b/
drivers/net/usb/r8152.c
@@
-1266,6
+1266,9
@@
static struct tx_agg *r8152_get_tx_agg(struct r8152 *tp)
struct tx_agg *agg = NULL;
unsigned long flags;
+ if (list_empty(&tp->tx_free))
+ return NULL;
+
spin_lock_irqsave(&tp->tx_lock, flags);
if (!list_empty(&tp->tx_free)) {
struct list_head *cursor;