Skip to contentSkip to conversation

[Fwd: Re: Re: First post-xenbus-change USB patch]

PATCH New harry 1 participant 1 message Nov 15, 2005

lore
Share & tools
lore

harry

author
#0 lore raw

PATCH 1/1 [Fwd: Re: Re: First post-xenbus-change USB patch]

Sorry, forgot to copy the list on this.

Quoted 5 lines · Ewan Mellor
Quoted 1 line · harry

I'd like the otherend_changed entrypoint to be optional please.

No problem. I'm sure you could whizz up a patch for us.

Patch attached for making otherend_changed optional.

Quoted 5 lines
Quoted 4 lines

I did a quick bit of testing and managed to mount the USB key again etc but had a few problems with module unload and reload. I think I maybe got hit by the unregister_watch deadlock then

Quoted 7 lines

Yes, we really need to address that one. The code says

	/* Flush any currently-executing callback, unless we are it. :-) */

(IIRC, that's the deadlock point that Rusty highlighted) but I don't really know what this means. Can you shed some light here on what we ought to be doing?

What Rusty said was that the code only worked if you unregistered a watch from the watch callback and that it hadn't been tested and would deadlock if you unregistered a watch from outside a watch callback. So what needs to be done is test to make sure it works under all circumstances and fix if really broken. That's all I know I'm afraid.

Quoted 5 lines
Quoted 3 lines

after I killed the FE domain, the new xenbus code gave an error message when I tried to unload and reload the BE.

Which error message?

start xend
load BE driver
xm create FE
load FE driver
kill FE domain
unload BE driver
load BE driver

error message:

xenbus_probe: talk_to_otherend on backend/usb/1/0 failed.
usb: probe of usb-1-0 failed with error -2

Quoted 10 lines

Cheers,

Ewan.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c +2 -2
diff -r 595ef1ab007c -r 2089b7edcada linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
@@ -299,8 +299,8 @@
 
 	DPRINTK("state is %d, %s, %s",
 		state, dev->otherend_watch.node, vec[XS_WATCH_PATH]);
-
-	drv->otherend_changed(dev, state);
+	if (drv->otherend_changed)
+		drv->otherend_changed(dev, state);
 }
 
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel