ia64/xen-unstable

changeset 7054:c89485e939cc

Fix tpm split driver to follow changes in the xenbus API.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
author kaf24@firebug.cl.cam.ac.uk
date Sat Sep 24 08:58:41 2005 +0100 (2005-09-24)
parents b2928ee8ddcd
children 83fe78bb876d
files linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c	Fri Sep 23 20:10:32 2005 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c	Sat Sep 24 08:58:41 2005 +0100
     1.3 @@ -93,7 +93,8 @@ static void frontend_changed(struct xenb
     1.4  	 * Tell the front-end that we are ready to go -
     1.5  	 * unless something bad happens
     1.6  	 */
     1.7 -	err = xenbus_transaction_start(be->dev->nodename);
     1.8 +again:
     1.9 +	err = xenbus_transaction_start();
    1.10  	if (err) {
    1.11  		xenbus_dev_error(be->dev, err, "starting transaction");
    1.12  		return;
    1.13 @@ -127,7 +128,14 @@ static void frontend_changed(struct xenb
    1.14  		goto abort;
    1.15  	}
    1.16  
    1.17 -	xenbus_transaction_end(0);
    1.18 +	err = xenbus_transaction_end(0);
    1.19 +	if (err == EAGAIN)
    1.20 +		goto again;
    1.21 +	if (err) {
    1.22 +		xenbus_dev_error(be->dev, err, "end of transaction");
    1.23 +		goto abort;
    1.24 +	}
    1.25 +
    1.26  	xenbus_dev_ok(be->dev);
    1.27  	return;
    1.28  abort:
     2.1 --- a/linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.c	Fri Sep 23 20:10:32 2005 +0100
     2.2 +++ b/linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.c	Sat Sep 24 08:58:41 2005 +0100
     2.3 @@ -331,7 +331,8 @@ static int talk_to_backend(struct xenbus
     2.4  		goto out;
     2.5  	}
     2.6  
     2.7 -	err = xenbus_transaction_start(dev->nodename);
     2.8 +again:
     2.9 +	err = xenbus_transaction_start();
    2.10  	if (err) {
    2.11  		xenbus_dev_error(dev, err, "starting transaction");
    2.12  		goto destroy_tpmring;
    2.13 @@ -363,6 +364,8 @@ static int talk_to_backend(struct xenbus
    2.14  	}
    2.15  
    2.16  	err = xenbus_transaction_end(0);
    2.17 +	if (err == EAGAIN)
    2.18 +		goto again;
    2.19  	if (err) {
    2.20  		xenbus_dev_error(dev, err, "completing transaction");
    2.21  		goto destroy_tpmring;