WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] net accel: Fix double-probe of accele

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] net accel: Fix double-probe of accelerator on suspend_cancel
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 11 Feb 2008 07:10:31 -0800
Delivery-date: Mon, 11 Feb 2008 07:11:36 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1202723725 0
# Node ID c71467ad40d13477cf06c809d59ce58e64abdfda
# Parent  9dcb40286ad4fa5e3e376e280a176655d52f9fe5
net accel: Fix double-probe of accelerator on suspend_cancel

Fixes a bug in the network acceleration stuff where an accelerator
could get probed with the same interface twice on a suspend-cancel -
once manually in the suspend_cancel handler, and once when the watch
on the accel configuration option fired after being reinstated.

Signed-off-by: Kieran Mansley <kmansley@xxxxxxxxxxxxxx>
---
 drivers/xen/netfront/accel.c |   31 +++++--------------------------
 1 files changed, 5 insertions(+), 26 deletions(-)

diff -r 9dcb40286ad4 -r c71467ad40d1 drivers/xen/netfront/accel.c
--- a/drivers/xen/netfront/accel.c      Mon Feb 11 09:52:49 2008 +0000
+++ b/drivers/xen/netfront/accel.c      Mon Feb 11 09:55:25 2008 +0000
@@ -693,32 +693,11 @@ int netfront_accelerator_suspend_cancel(
 int netfront_accelerator_suspend_cancel(struct netfront_info *np,
                                        struct xenbus_device *dev)
 {
-       struct netfront_accel_vif_state *accel_vif_state = NULL;
- 
-       mutex_lock(&accelerator_mutex);
-
-       /* Check that we've got a device that was accelerated */
-       if (np->accelerator == NULL)
-               goto out;
-
-       /* Find the vif_state from the accelerator's list */
-       list_for_each_entry(accel_vif_state, &np->accelerator->vif_states,
-                           link) {
-               if (accel_vif_state->dev == dev) {
-                       BUG_ON(accel_vif_state != &np->accel_vif_state);
- 
-                       /*
-                        * Kick things off again to restore
-                        * acceleration as it was before suspend 
-                        */
-                       accelerator_probe_new_vif(np, dev, np->accelerator);
- 
-                       break;
-               }
-       }
-       
- out:
-       mutex_unlock(&accelerator_mutex);
+       /* 
+        * Setting the watch will cause it to fire and probe the
+        * accelerator, so no need to call accelerator_probe_new_vif()
+        * directly here
+        */
        netfront_accelerator_add_watch(np);
        return 0;
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] net accel: Fix double-probe of accelerator on suspend_cancel, Xen patchbot-linux-2.6.18-xen <=