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-devel

Re: [Xen-devel] Driver Architecture Changes

To: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Driver Architecture Changes
From: Stefan Berger <stefanb@xxxxxxxxxx>
Date: Thu, 17 Nov 2005 14:51:38 -0500
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 17 Nov 2005 19:51:42 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20051117172645.GC23667@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

Ewan Mellor <ewan@xxxxxxxxxxxxx> wrote on 11/17/2005 12:26:45 PM:

> On Wed, Nov 16, 2005 at 04:40:34PM -0500, Stefan Berger wrote:
>
> > Hello Ewan,
> >
> >   I am following the changes with the TPM driver pair. I was wondering
> > what causes the 'add' action to be invoked on the hotplug scripts and why
> > would one not see a remove action if a previous 'add' action was
> > encountered and it had finished successfully.
>
> The add action occurs when the device is registered with the kernel
> (xenbus_probe.c:xenbus_probe_node), and you should get a remove when the
> device is no longer referenced.  Once the frontend driver has flushed through
> and closed down, it switches to state Closed, which is seen in the backend
> driver's otherend_changed function (blkback/xenbus.c:frontend_changed for
> example).  This then calls device_unregister, which ought to be enough to
> ensure that no-one is referencing the device, and so the kernel will clean up
> the sysfs entries etc and you will get a remove hotplug event.


The mistake I had made was not to switch to the Closed state. So now I am seeing the remove as well. Thanks.

Another question: I see that the .suspend function is not used in the frontends anymore, but the structure still has that member. Is the suspend member about to be removed?

>
> If that's not happening, then there may be a bug which needs further
> investigation.


Was my bug.

  Stefan

>
> HTH,
>
> Ewan.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel