From: Stefan Berger Subject: [TPM] Remove stale code from backend Date: Thu, 27 Jul 2006 11:19:46 -0400 Message-ID: <1154013587.24926.3.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-EECSUnVyKLhZVa2A7sgT" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Keir Fraser List-Id: xen-devel@lists.xenproject.org --=-EECSUnVyKLhZVa2A7sgT Content-Type: text/plain Content-Transfer-Encoding: 7bit This patch removes 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 --=-EECSUnVyKLhZVa2A7sgT Content-Disposition: attachment; filename=tpmback-stale.diff Content-Type: text/x-patch; name=tpmback-stale.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit Index: xen/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c =================================================================== --- xen.orig/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c +++ xen/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c @@ -55,7 +55,6 @@ struct packet { enum { PACKET_FLAG_DISCARD_RESPONSE = 1, - PACKET_FLAG_CHECK_RESPONSESTATUS = 2, }; /* local variables */ @@ -201,21 +200,6 @@ static void packet_free(struct packet *p kfree(pak); } -static int packet_set(struct packet *pak, - const unsigned char *buffer, u32 size) -{ - int rc = 0; - unsigned char *buf = kmalloc(size, GFP_KERNEL); - - if (buf) { - pak->data_buffer = buf; - memcpy(buf, buffer, size); - pak->data_len = size; - } else { - rc = -ENOMEM; - } - return rc; -} /* * Write data to the shared memory and send it to the FE. @@ -225,29 +209,6 @@ static int packet_write(struct packet *p { int rc = 0; - if ((pak->flags & PACKET_FLAG_CHECK_RESPONSESTATUS)) { -#ifdef CONFIG_XEN_TPMDEV_CLOSE_IF_VTPM_FAILS - u32 res; - - if (copy_from_buffer(&res, - &data[2 + 4], sizeof (res), - isuserbuffer)) { - return -EFAULT; - } - - if (res != 0) { - /* - * Close down this device. Should have the - * FE notified about closure. - */ - if (!pak->tpmif) { - return -EFAULT; - } - pak->tpmif->status = DISCONNECTING; - } -#endif - } - if (0 != (pak->flags & PACKET_FLAG_DISCARD_RESPONSE)) { /* Don't send a respone to this packet. Just acknowledge it. */ rc = size; Index: xen/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/Kconfig =================================================================== --- xen.orig/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/Kconfig +++ xen/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/Kconfig @@ -143,15 +143,6 @@ config XEN_TPMDEV_BACKEND help The TPM-device backend driver -config XEN_TPMDEV_CLOSE_IF_VTPM_FAILS - bool "TPM backend closes upon vTPM failure" - depends on XEN_TPMDEV_BACKEND - default n - help - The TPM backend closes the channel if the vTPM in userspace indicates - a failure. The corresponding domain's channel will be closed. - Say Y if you want this feature. - config XEN_BLKDEV_FRONTEND tristate "Block-device frontend driver" depends on XEN --=-EECSUnVyKLhZVa2A7sgT Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-EECSUnVyKLhZVa2A7sgT--