Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 11890
b: refs/heads/master
c: b4ed3e3
h: refs/heads/master
v: v3
  • Loading branch information
Kylene Jo Hall authored and Linus Torvalds committed Oct 31, 2005
1 parent e18f806 commit 46f6066
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 162a88f7b8539a097a088c0321ea1997cacccaea
refs/heads/master: b4ed3e3cbb312869929cf4528d71e52629a6cacb
2 changes: 1 addition & 1 deletion trunk/drivers/char/tpm/tpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static ssize_t tpm_transmit(struct tpm_chip *chip, const char *buf,

stop = jiffies + 2 * 60 * HZ;
do {
u8 status = inb(chip->vendor->base + 1);
u8 status = chip->vendor->status(chip);
if ((status & chip->vendor->req_complete_mask) ==
chip->vendor->req_complete_val) {
goto out_recv;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/char/tpm/tpm.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ struct tpm_vendor_specific {
int (*recv) (struct tpm_chip *, u8 *, size_t);
int (*send) (struct tpm_chip *, u8 *, size_t);
void (*cancel) (struct tpm_chip *);
u8 (*status) (struct tpm_chip *);
struct miscdevice miscdev;
struct attribute_group *attr_group;
};
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/char/tpm/tpm_atmel.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ static void tpm_atml_cancel(struct tpm_chip *chip)
outb(ATML_STATUS_ABORT, chip->vendor->base + 1);
}

static u8 tpm_atml_status(struct tpm_chip *chip)
{
return inb(chip->vendor->base + 1);
}

static struct file_operations atmel_ops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
Expand Down Expand Up @@ -146,6 +151,7 @@ static struct tpm_vendor_specific tpm_atmel = {
.recv = tpm_atml_recv,
.send = tpm_atml_send,
.cancel = tpm_atml_cancel,
.status = tpm_atml_status,
.req_complete_mask = ATML_STATUS_BUSY | ATML_STATUS_DATA_AVAIL,
.req_complete_val = ATML_STATUS_DATA_AVAIL,
.req_canceled = ATML_STATUS_READY,
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/char/tpm/tpm_infineon.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,11 @@ static void tpm_inf_cancel(struct tpm_chip *chip)
*/
}

static u8 tpm_inf_status(struct tpm_chip *chip)
{
return inb(chip->vendor->base + 1);
}

static DEVICE_ATTR(pubek, S_IRUGO, tpm_show_pubek, NULL);
static DEVICE_ATTR(pcrs, S_IRUGO, tpm_show_pcrs, NULL);
static DEVICE_ATTR(caps, S_IRUGO, tpm_show_caps, NULL);
Expand Down Expand Up @@ -344,6 +349,7 @@ static struct tpm_vendor_specific tpm_inf = {
.recv = tpm_inf_recv,
.send = tpm_inf_send,
.cancel = tpm_inf_cancel,
.status = tpm_inf_status,
.req_complete_mask = 0,
.req_complete_val = 0,
.attr_group = &inf_attr_grp,
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/char/tpm/tpm_nsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@ static void tpm_nsc_cancel(struct tpm_chip *chip)
outb(NSC_COMMAND_CANCEL, chip->vendor->base + NSC_COMMAND);
}

static u8 tpm_nsc_status(struct tpm_chip *chip)
{
return inb(chip->vendor->base + NSC_STATUS);
}

static struct file_operations nsc_ops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
Expand Down Expand Up @@ -248,6 +253,7 @@ static struct tpm_vendor_specific tpm_nsc = {
.recv = tpm_nsc_recv,
.send = tpm_nsc_send,
.cancel = tpm_nsc_cancel,
.status = tpm_nsc_status,
.req_complete_mask = NSC_STATUS_OBF,
.req_complete_val = NSC_STATUS_OBF,
.req_canceled = NSC_STATUS_RDY,
Expand Down

0 comments on commit 46f6066

Please sign in to comment.