8 struct transmission *current_request;
9 spinlock_t req_list_lock;
10 wait_queue_head_t req_wait_queue;
12 struct list_head queued_requests;
14 struct transmission *current_response;
15 spinlock_t resp_list_lock;
16 wait_queue_head_t resp_wait_queue; // processes waiting for responses
21 unsigned long disconnect_time;
24 * The following is a private structure of the underlying
25 * driver. It is passed as parameter in the send function.
27 struct tpm_private *tpm_private;
32 TPM_VD_STATUS_DISCONNECTED = 0x0,
33 TPM_VD_STATUS_CONNECTED = 0x1
36 /* this function is called from tpm_vtpm.c */
37 int vtpm_vd_send(struct tpm_private * tp,
38 const u8 * buf, size_t count, void *ptr);
40 /* these functions are offered by tpm_vtpm.c */
41 struct tpm_chip *init_vtpm(struct device *,
42 struct tpm_private *);
43 void cleanup_vtpm(struct device *);
44 int vtpm_vd_recv(const struct tpm_chip* chip,
45 const unsigned char *buffer, size_t count, void *ptr);
46 void vtpm_vd_status(const struct tpm_chip *, u8 status);
48 static inline struct tpm_private *tpm_private_from_dev(struct device *dev)
50 struct tpm_chip *chip = dev_get_drvdata(dev);
51 struct vtpm_state *vtpms = chip_get_private(chip);
52 return vtpms->tpm_private;