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

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.

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

HTH,

Ewan.

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