From: Shreyas Bhatewara <sbhatewara@vmware.com>
To: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, pv-drivers@vmware.com,
ronghua@vmware.com, matthieu@vmware.com
Subject: [PATCH 2.6.35-rc1] net: vmxnet3 fixes [4/5] Do not reset when the device is not opened
Date: Wed, 7 Jul 2010 02:31:39 -0700 (PDT) [thread overview]
Message-ID: <alpine.LRH.2.00.1007070229030.5939@localhost.localdomain> (raw)
In-Reply-To: <alpine.LRH.2.00.1007070202080.5939@localhost.localdomain>
commit bc8b3f0b3978d3c0a201926b2e2bd5c732e0352e
Author: Shreyas Bhatewara <sbhatewara@vmware.com>
Date: Tue Jul 6 17:00:48 2010 -0700
No reset when the device is not opened
If a reset is scheduled, and the device goes thru close and open, it
may happen that reset and open may run in parallel.
The reset code now bails out if the device is not opened.
Signed-off-by: Ronghua Zang <ronghua@vmware.com>
Signed-off-by: Matthieu Bucchianeri <matthieu@vmware.com>
Signed-off-by: Shreyas Bhatewara <sbhatewara@vmware.com>
---
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index 31a838f..01a5bb7 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -2417,8 +2417,9 @@ vmxnet3_reset_work(struct work_struct *data)
if (test_and_set_bit(VMXNET3_STATE_BIT_RESETTING, &adapter->state))
return;
- /* if the device is closed, we must leave it alone */
- if (netif_running(adapter->netdev)) {
+ /* if the device is closed or is being opened, we must leave it alone */
+ if (netif_running(adapter->netdev) &&
+ (adapter->netdev->flags & IFF_UP)) {
printk(KERN_INFO "%s: resetting\n", adapter->netdev->name);
vmxnet3_quiesce_dev(adapter);
vmxnet3_reset_dev(adapter);
diff --git a/drivers/net/vmxnet3/vmxnet3_int.h b/drivers/net/vmxnet3/vmxnet3_int.h
index 5c94afa..8e1f704 100644
--- a/drivers/net/vmxnet3/vmxnet3_int.h
+++ b/drivers/net/vmxnet3/vmxnet3_int.h
@@ -68,10 +68,10 @@
/*
* Version numbers
*/
-#define VMXNET3_DRIVER_VERSION_STRING "1.0.10.0-k"
+#define VMXNET3_DRIVER_VERSION_STRING "1.0.11.0-k"
/* a 32-bit int, each byte encode a verion number in VMXNET3_DRIVER_VERSION */
-#define VMXNET3_DRIVER_VERSION_NUM 0x01000A00
+#define VMXNET3_DRIVER_VERSION_NUM 0x01000B00
/*
next prev parent reply other threads:[~2010-07-07 9:31 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <alpine.LRH.2.00.1007070125440.4652@localhost.localdomain>
2010-07-07 9:24 ` [PATCH 2.6.35-rc1] net: vmxnet3 fixes [2/5] Interrupt control bitmap Shreyas Bhatewara
2010-07-14 0:48 ` [PATCH 2.6.35-rc1] net-next: " Shreyas Bhatewara
2010-07-14 21:04 ` David Miller
2010-07-16 1:20 ` Shreyas Bhatewara
2010-07-16 5:19 ` David Miller
2010-07-07 9:28 ` [PATCH 2.6.35-rc1] net: vmxnet3 fixes [3/5] Initialize link state at probe time Shreyas Bhatewara
2010-07-07 9:31 ` Shreyas Bhatewara [this message]
2010-07-14 0:49 ` [PATCH 2.6.35-rc1] net-next: vmxnet3 fixes [4/5] Do not reset when the device is not opened Shreyas Bhatewara
2010-07-14 21:07 ` David Miller
2010-07-16 1:20 ` Shreyas Bhatewara
2010-07-16 1:32 ` David Miller
2010-07-16 8:17 ` Shreyas Bhatewara
2010-07-17 23:35 ` David Miller
2010-07-19 17:02 ` Shreyas Bhatewara
2010-07-19 20:16 ` David Miller
2010-07-07 9:34 ` [PATCH 2.6.35-rc1] net: vmxnet3 fixes [5/5] Respect the interrupt type in VM configuration Shreyas Bhatewara
2010-07-14 0:51 ` [PATCH 2.6.35-rc1] net-next: " Shreyas Bhatewara
2010-07-14 21:11 ` David Miller
2010-07-16 1:21 ` Shreyas Bhatewara
2010-07-16 1:28 ` [PATCH 2.6.35-rc1] net-next: fix LRO feature update in vmxnet3 Shreyas Bhatewara
2010-07-16 5:17 ` David Miller
2010-07-19 20:16 ` [PATCH 2.6.35-rc1] net-next: vmxnet3 fixes [5/5] Respect the interrupt type in VM configuration David Miller
2010-07-14 0:48 ` [PATCH 2.6.35-rc1] net-next: vmxnet3 fixes [3/5] Initialize link state at probe time Shreyas Bhatewara
2010-07-14 21:10 ` David Miller
2010-07-16 1:20 ` Shreyas Bhatewara
2010-07-16 5:44 ` David Miller
2010-07-16 7:51 ` Shreyas Bhatewara
2010-07-18 21:49 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LRH.2.00.1007070229030.5939@localhost.localdomain \
--to=sbhatewara@vmware.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matthieu@vmware.com \
--cc=netdev@vger.kernel.org \
--cc=pv-drivers@vmware.com \
--cc=ronghua@vmware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox