aboutsummaryrefslogtreecommitdiffstats
path: root/stubdom
diff options
context:
space:
mode:
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>2013-03-21 16:11:20 -0400
committerIan Campbell <ian.campbell@citrix.com>2013-04-12 14:28:17 +0100
commit368fcb52643105d80c4705afa557647c8f7114c5 (patch)
treed8b7fc9260c92ff9297ebc6303e01ac5a929ee28 /stubdom
parente66cb3294f3aa815ae6741b7030dfeb2ea801284 (diff)
downloadxen-368fcb52643105d80c4705afa557647c8f7114c5.tar.gz
xen-368fcb52643105d80c4705afa557647c8f7114c5.tar.bz2
xen-368fcb52643105d80c4705afa557647c8f7114c5.zip
mini-os/tpmback: set up callbacks before enumeration
The open/close callbacks in tpmback cannot be properly initalized in order to catch the initial enumeration events because init_tpmback clears the callbacks and then asynchronously starts the enumeration of existing tpmback devices. Fix this by passing the callbacks to init_tpmback so they can be installed before enumeration. This also removes the unused callbacks for suspend and resume. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Diffstat (limited to 'stubdom')
-rw-r--r--stubdom/vtpm/vtpm.c2
-rw-r--r--stubdom/vtpmmgr/init.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/stubdom/vtpm/vtpm.c b/stubdom/vtpm/vtpm.c
index 71aef78d17..3362ea816b 100644
--- a/stubdom/vtpm/vtpm.c
+++ b/stubdom/vtpm/vtpm.c
@@ -367,7 +367,7 @@ int main(int argc, char **argv)
}
/* Initialize devices */
- init_tpmback();
+ init_tpmback(NULL, NULL);
if((tpmfront_dev = init_tpmfront(NULL)) == NULL) {
error("Unable to initialize tpmfront device");
goto abort_posttpmfront;
diff --git a/stubdom/vtpmmgr/init.c b/stubdom/vtpmmgr/init.c
index a158020f1d..00dd9f3516 100644
--- a/stubdom/vtpmmgr/init.c
+++ b/stubdom/vtpmmgr/init.c
@@ -462,7 +462,7 @@ TPM_RESULT vtpmmgr_init(int argc, char** argv) {
}
//Setup tpmback device
- init_tpmback();
+ init_tpmback(NULL, NULL);
//Setup tpm access
switch(opts.tpmdriver) {