@@ -217,6 +217,8 @@ static int tpm_tis_recv(struct tpm_chip *chip, u8 *buf, size_t count)
expected = be32_to_cpu(*(__be32 *) (buf + 2));
if (expected > count) {
+ dev_err(&chip->dev, "Response too long (wanted %zd, got %d)\n",
+ count, expected);
size = -EIO;
goto out;
}
@@ -283,6 +285,8 @@ static int tpm_tis_send_data(struct tpm_chip *chip, u8 *buf, size_t len)
&priv->int_queue, false);
status = tpm_tis_status(chip);
if (!itpm && (status & TPM_STS_DATA_EXPECT) == 0) {
+ dev_err(&chip->dev, "Chip not accepting %zd bytes\n",
+ len - count);
rc = -EIO;
goto out_err;
}
@@ -297,6 +301,7 @@ static int tpm_tis_send_data(struct tpm_chip *chip, u8 *buf, size_t len)
&priv->int_queue, false);
status = tpm_tis_status(chip);
if (!itpm && (status & TPM_STS_DATA_EXPECT) != 0) {
+ dev_err(&chip->dev, "Chip not accepting last byte\n");
rc = -EIO;
goto out_err;
}
@@ -707,8 +712,9 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
if (rc < 0)
goto out_err;
- dev_info(dev, "%s TPM (device-id 0x%X, rev-id %d)\n",
+ dev_info(dev, "%s TPM (manufacturer-id 0x%X, device-id 0x%X, rev-id %d)\n",
(chip->flags & TPM_CHIP_FLAG_TPM2) ? "2.0" : "1.2",
+ priv->manufacturer_id,
vendor >> 16, rid);
if (!(priv->flags & TPM_TIS_ITPM_POSSIBLE)) {