* [PATCH net-2.6 3/3] jme: Advance driver version number
2010-03-15 5:15 ` [PATCH net-2.6 2/3] jme: Adding lock to protect vlgrp structure cooldavid
@ 2010-03-15 5:15 ` cooldavid
0 siblings, 0 replies; 7+ messages in thread
From: cooldavid @ 2010-03-15 5:15 UTC (permalink / raw
To: David Miller; +Cc: Guo-Fu Tseng, linux-netdev, Ethan Hsiao
From: Guo-Fu Tseng <cooldavid@cooldavid.org>
Advance driver version number after some bug fix.
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
---
drivers/net/jme.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/jme.h b/drivers/net/jme.h
index 0ed4924..727a3bf 100644
--- a/drivers/net/jme.h
+++ b/drivers/net/jme.h
@@ -25,7 +25,7 @@
#define __JME_H_INCLUDED__
#define DRV_NAME "jme"
-#define DRV_VERSION "1.0.5"
+#define DRV_VERSION "1.0.6"
#define PFX DRV_NAME ": "
#define PCI_DEVICE_ID_JMICRON_JMC250 0x0250
--
1.6.4.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH net-2.6 1/3] jme: Fix VLAN memory leak
@ 2010-03-17 10:09 cooldavid
2010-03-17 10:09 ` [PATCH net-2.6 2/3] jme: Protect vlgrp structure by pause RX actions cooldavid
2010-03-19 4:14 ` [PATCH net-2.6 1/3] jme: Fix VLAN memory leak David Miller
0 siblings, 2 replies; 7+ messages in thread
From: cooldavid @ 2010-03-17 10:09 UTC (permalink / raw
To: David Miller
Cc: Guo-Fu Tseng, linux-netdev, Ethan Hsiao, Devinchiu, Hsiu-Che Chao,
stable
From: Guo-Fu Tseng <cooldavid@cooldavid.org>
Fix memory leak while receiving 8021q tagged packet which is not
registered by user.
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Cc: stable@kernel.org
---
drivers/net/jme.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/jme.c b/drivers/net/jme.c
index 0f31497..cfc7b98 100644
--- a/drivers/net/jme.c
+++ b/drivers/net/jme.c
@@ -946,6 +946,8 @@ jme_alloc_and_feed_skb(struct jme_adapter *jme, int idx)
jme->jme_vlan_rx(skb, jme->vlgrp,
le16_to_cpu(rxdesc->descwb.vlan));
NET_STAT(jme).rx_bytes += 4;
+ } else {
+ dev_kfree_skb(skb);
}
} else {
jme->jme_rx(skb);
--
1.6.4.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH net-2.6 2/3] jme: Protect vlgrp structure by pause RX actions.
2010-03-17 10:09 [PATCH net-2.6 1/3] jme: Fix VLAN memory leak cooldavid
@ 2010-03-17 10:09 ` cooldavid
2010-03-17 10:09 ` [PATCH net-2.6 3/3] jme: Advance driver version number cooldavid
2010-03-19 4:14 ` [PATCH net-2.6 2/3] jme: Protect vlgrp structure by pause RX actions David Miller
2010-03-19 4:14 ` [PATCH net-2.6 1/3] jme: Fix VLAN memory leak David Miller
1 sibling, 2 replies; 7+ messages in thread
From: cooldavid @ 2010-03-17 10:09 UTC (permalink / raw
To: David Miller
Cc: Guo-Fu Tseng, linux-netdev, Ethan Hsiao, Devinchiu, Hsiu-Che Chao,
stable
From: Guo-Fu Tseng <cooldavid@cooldavid.org>
Temporary stop the RX IRQ, and disable (sync) tasklet or napi.
And restore it after finished the vlgrp pointer assignment.
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Cc: stable@kernel.org
---
drivers/net/jme.c | 33 +++++++++++++++++++++++++++++++++
1 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/drivers/net/jme.c b/drivers/net/jme.c
index cfc7b98..c0b59a5 100644
--- a/drivers/net/jme.c
+++ b/drivers/net/jme.c
@@ -2083,12 +2083,45 @@ jme_tx_timeout(struct net_device *netdev)
jme_reset_link(jme);
}
+static inline void jme_pause_rx(struct jme_adapter *jme)
+{
+ atomic_dec(&jme->link_changing);
+
+ jme_set_rx_pcc(jme, PCC_OFF);
+ if (test_bit(JME_FLAG_POLL, &jme->flags)) {
+ JME_NAPI_DISABLE(jme);
+ } else {
+ tasklet_disable(&jme->rxclean_task);
+ tasklet_disable(&jme->rxempty_task);
+ }
+}
+
+static inline void jme_resume_rx(struct jme_adapter *jme)
+{
+ struct dynpcc_info *dpi = &(jme->dpi);
+
+ if (test_bit(JME_FLAG_POLL, &jme->flags)) {
+ JME_NAPI_ENABLE(jme);
+ } else {
+ tasklet_hi_enable(&jme->rxclean_task);
+ tasklet_hi_enable(&jme->rxempty_task);
+ }
+ dpi->cur = PCC_P1;
+ dpi->attempt = PCC_P1;
+ dpi->cnt = 0;
+ jme_set_rx_pcc(jme, PCC_P1);
+
+ atomic_inc(&jme->link_changing);
+}
+
static void
jme_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp)
{
struct jme_adapter *jme = netdev_priv(netdev);
+ jme_pause_rx(jme);
jme->vlgrp = grp;
+ jme_resume_rx(jme);
}
static void
--
1.6.4.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH net-2.6 3/3] jme: Advance driver version number
2010-03-17 10:09 ` [PATCH net-2.6 2/3] jme: Protect vlgrp structure by pause RX actions cooldavid
@ 2010-03-17 10:09 ` cooldavid
2010-03-19 4:14 ` David Miller
2010-03-19 4:14 ` [PATCH net-2.6 2/3] jme: Protect vlgrp structure by pause RX actions David Miller
1 sibling, 1 reply; 7+ messages in thread
From: cooldavid @ 2010-03-17 10:09 UTC (permalink / raw
To: David Miller
Cc: Guo-Fu Tseng, linux-netdev, Ethan Hsiao, Devinchiu, Hsiu-Che Chao
From: Guo-Fu Tseng <cooldavid@cooldavid.org>
Advance driver version number after some bug fix.
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
---
drivers/net/jme.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/jme.h b/drivers/net/jme.h
index c19db91..07ad3a4 100644
--- a/drivers/net/jme.h
+++ b/drivers/net/jme.h
@@ -25,7 +25,7 @@
#define __JME_H_INCLUDED__
#define DRV_NAME "jme"
-#define DRV_VERSION "1.0.5"
+#define DRV_VERSION "1.0.6"
#define PFX DRV_NAME ": "
#define PCI_DEVICE_ID_JMICRON_JMC250 0x0250
--
1.6.4.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net-2.6 1/3] jme: Fix VLAN memory leak
2010-03-17 10:09 [PATCH net-2.6 1/3] jme: Fix VLAN memory leak cooldavid
2010-03-17 10:09 ` [PATCH net-2.6 2/3] jme: Protect vlgrp structure by pause RX actions cooldavid
@ 2010-03-19 4:14 ` David Miller
1 sibling, 0 replies; 7+ messages in thread
From: David Miller @ 2010-03-19 4:14 UTC (permalink / raw
To: cooldavid; +Cc: netdev, ethanhsiao, devinchiu, hcchao, stable
From: cooldavid@cooldavid.org
Date: Wed, 17 Mar 2010 18:09:29 +0800
> From: Guo-Fu Tseng <cooldavid@cooldavid.org>
>
> Fix memory leak while receiving 8021q tagged packet which is not
> registered by user.
>
> Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Applied.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-2.6 2/3] jme: Protect vlgrp structure by pause RX actions.
2010-03-17 10:09 ` [PATCH net-2.6 2/3] jme: Protect vlgrp structure by pause RX actions cooldavid
2010-03-17 10:09 ` [PATCH net-2.6 3/3] jme: Advance driver version number cooldavid
@ 2010-03-19 4:14 ` David Miller
1 sibling, 0 replies; 7+ messages in thread
From: David Miller @ 2010-03-19 4:14 UTC (permalink / raw
To: cooldavid; +Cc: netdev, ethanhsiao, devinchiu, hcchao, stable
From: cooldavid@cooldavid.org
Date: Wed, 17 Mar 2010 18:09:30 +0800
> From: Guo-Fu Tseng <cooldavid@cooldavid.org>
>
> Temporary stop the RX IRQ, and disable (sync) tasklet or napi.
> And restore it after finished the vlgrp pointer assignment.
>
> Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Applied.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-2.6 3/3] jme: Advance driver version number
2010-03-17 10:09 ` [PATCH net-2.6 3/3] jme: Advance driver version number cooldavid
@ 2010-03-19 4:14 ` David Miller
0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2010-03-19 4:14 UTC (permalink / raw
To: cooldavid; +Cc: netdev, ethanhsiao, devinchiu, hcchao
From: cooldavid@cooldavid.org
Date: Wed, 17 Mar 2010 18:09:31 +0800
> From: Guo-Fu Tseng <cooldavid@cooldavid.org>
>
> Advance driver version number after some bug fix.
>
> Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Applied.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-03-19 4:14 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-17 10:09 [PATCH net-2.6 1/3] jme: Fix VLAN memory leak cooldavid
2010-03-17 10:09 ` [PATCH net-2.6 2/3] jme: Protect vlgrp structure by pause RX actions cooldavid
2010-03-17 10:09 ` [PATCH net-2.6 3/3] jme: Advance driver version number cooldavid
2010-03-19 4:14 ` David Miller
2010-03-19 4:14 ` [PATCH net-2.6 2/3] jme: Protect vlgrp structure by pause RX actions David Miller
2010-03-19 4:14 ` [PATCH net-2.6 1/3] jme: Fix VLAN memory leak David Miller
-- strict thread matches above, loose matches on Subject: below --
2010-03-15 5:15 cooldavid
2010-03-15 5:15 ` [PATCH net-2.6 2/3] jme: Adding lock to protect vlgrp structure cooldavid
2010-03-15 5:15 ` [PATCH net-2.6 3/3] jme: Advance driver version number cooldavid
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).