debuggers.hg
changeset 10901:affe80cdb485
[TPM] Remove some stale code from the TPM backend driver. The code
used to be used for sending of vTPM control commands, but now this is
all done with the hotplug scripts.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
used to be used for sending of vTPM control commands, but now this is
all done with the hotplug scripts.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
author | kfraser@localhost.localdomain |
---|---|
date | Fri Jul 28 17:33:26 2006 +0100 (2006-07-28) |
parents | 12f75f4e2ea8 |
children | 98ee83ed9d28 |
files | linux-2.6-xen-sparse/drivers/xen/Kconfig linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c |
line diff
1.1 --- a/linux-2.6-xen-sparse/drivers/xen/Kconfig Fri Jul 28 17:25:20 2006 +0100 1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/Kconfig Fri Jul 28 17:33:26 2006 +0100 1.3 @@ -143,15 +143,6 @@ config XEN_TPMDEV_BACKEND 1.4 help 1.5 The TPM-device backend driver 1.6 1.7 -config XEN_TPMDEV_CLOSE_IF_VTPM_FAILS 1.8 - bool "TPM backend closes upon vTPM failure" 1.9 - depends on XEN_TPMDEV_BACKEND 1.10 - default n 1.11 - help 1.12 - The TPM backend closes the channel if the vTPM in userspace indicates 1.13 - a failure. The corresponding domain's channel will be closed. 1.14 - Say Y if you want this feature. 1.15 - 1.16 config XEN_BLKDEV_FRONTEND 1.17 tristate "Block-device frontend driver" 1.18 depends on XEN
2.1 --- a/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c Fri Jul 28 17:25:20 2006 +0100 2.2 +++ b/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c Fri Jul 28 17:33:26 2006 +0100 2.3 @@ -55,7 +55,6 @@ struct packet { 2.4 2.5 enum { 2.6 PACKET_FLAG_DISCARD_RESPONSE = 1, 2.7 - PACKET_FLAG_CHECK_RESPONSESTATUS = 2, 2.8 }; 2.9 2.10 /* local variables */ 2.11 @@ -201,21 +200,6 @@ static void packet_free(struct packet *p 2.12 kfree(pak); 2.13 } 2.14 2.15 -static int packet_set(struct packet *pak, 2.16 - const unsigned char *buffer, u32 size) 2.17 -{ 2.18 - int rc = 0; 2.19 - unsigned char *buf = kmalloc(size, GFP_KERNEL); 2.20 - 2.21 - if (buf) { 2.22 - pak->data_buffer = buf; 2.23 - memcpy(buf, buffer, size); 2.24 - pak->data_len = size; 2.25 - } else { 2.26 - rc = -ENOMEM; 2.27 - } 2.28 - return rc; 2.29 -} 2.30 2.31 /* 2.32 * Write data to the shared memory and send it to the FE. 2.33 @@ -225,29 +209,6 @@ static int packet_write(struct packet *p 2.34 { 2.35 int rc = 0; 2.36 2.37 - if ((pak->flags & PACKET_FLAG_CHECK_RESPONSESTATUS)) { 2.38 -#ifdef CONFIG_XEN_TPMDEV_CLOSE_IF_VTPM_FAILS 2.39 - u32 res; 2.40 - 2.41 - if (copy_from_buffer(&res, 2.42 - &data[2 + 4], sizeof (res), 2.43 - isuserbuffer)) { 2.44 - return -EFAULT; 2.45 - } 2.46 - 2.47 - if (res != 0) { 2.48 - /* 2.49 - * Close down this device. Should have the 2.50 - * FE notified about closure. 2.51 - */ 2.52 - if (!pak->tpmif) { 2.53 - return -EFAULT; 2.54 - } 2.55 - pak->tpmif->status = DISCONNECTING; 2.56 - } 2.57 -#endif 2.58 - } 2.59 - 2.60 if (0 != (pak->flags & PACKET_FLAG_DISCARD_RESPONSE)) { 2.61 /* Don't send a respone to this packet. Just acknowledge it. */ 2.62 rc = size;