From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [PATCH net-next 2/2] xen-netback: handle frontends that fail to transition through Closing Date: Fri, 20 Sep 2013 14:34:48 +0100 Message-ID: <20130920133448.GC457@zion.uk.xensource.com> References: <1379681791-21842-1-git-send-email-paul.durrant@citrix.com> <1379681791-21842-3-git-send-email-paul.durrant@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: , , David Vrabel , Wei Liu , Ian Campbell To: Paul Durrant Return-path: Received: from smtp.citrix.com ([66.165.176.89]:6607 "EHLO SMTP.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754655Ab3ITNet (ORCPT ); Fri, 20 Sep 2013 09:34:49 -0400 Content-Disposition: inline In-Reply-To: <1379681791-21842-3-git-send-email-paul.durrant@citrix.com> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, Sep 20, 2013 at 01:56:31PM +0100, Paul Durrant wrote: > Some old Windows frontends fail to transition through the xenbus Closing > state and move directly from Connected to Closed. Handle this case properly. > > Signed-off-by: Paul Durrant > Cc: David Vrabel > Cc: Wei Liu > Cc: Ian Campbell > --- > drivers/net/xen-netback/xenbus.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c > index a53782e..bcaa25b 100644 > --- a/drivers/net/xen-netback/xenbus.c > +++ b/drivers/net/xen-netback/xenbus.c > @@ -265,6 +265,8 @@ static void frontend_changed(struct xenbus_device *dev, > break; > > case XenbusStateClosed: > + if (dev->state == XenbusStateConnected) > + disconnect_backend(dev); Could you please add a comment above this change stating that this is a workaround for some old frontend that we cannot fix / upgrade. We would still like to later frontend goes through the normal connected -> closing -> closed path. Wei. > xenbus_switch_state(dev, XenbusStateClosed); > if (xenbus_dev_is_online(dev)) > break; > -- > 1.7.10.4