Skip to contentSkip to conversation

tpm_tis: Fix interrupt probing

PATCH In review Stefan Berger 3 participants 9 messages Aug 20, 2019 – Aug 30, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tpm_tis: Fix interrupt probing

From: Stefan Berger <[email protected]>

The interrupt probing of the TPM TIS was broken since we are trying to run it without an active locality and without the TPM_CHIP_FLAG_IRQ set.

---
 drivers/char/tpm/tpm_tis_core.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/char/tpm/tpm_tis_core.c +3 -0
index c3181ea9f271..270f43acbb77 100644
@@ -980,6 +980,8 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
 			goto out_err;
 		}
 
+		tpm_chip_start(chip);
+		chip->flags |= TPM_CHIP_FLAG_IRQ;
 		if (irq) {
 			tpm_tis_probe_irq_single(chip, intmask, IRQF_SHARED,
 						 irq);
@@ -989,6 +991,7 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
 		} else {
 			tpm_tis_probe_irq(chip, intmask);
 		}
+		tpm_chip_stop(chip);
 	}
 
 	rc = tpm_chip_register(chip);
Signature · 1 line
2.14.5
Reviewed-by on v1 1/1
#2 lore raw
In reply to Stefan Berger
Quoted 6 lines · Stefan Berger

From: Stefan Berger <[email protected]>

The interrupt probing of the TPM TIS was broken since we are trying to run it without an active locality and without the TPM_CHIP_FLAG_IRQ set.

Need these:

Fixes a3fbfae82b4c ("tpm: take TPM chip power gating out of tpm_transmit()")

Thank you. I'll apply this to my tree.

/Jarkko

#3 lore raw
Quoted 8 lines · Jarkko Sakkinen
Quoted 6 lines · Stefan Berger

From: Stefan Berger <[email protected]>

The interrupt probing of the TPM TIS was broken since we are trying to run it without an active locality and without the TPM_CHIP_FLAG_IRQ set.

Quoted 8 lines

Need these:

Fixes a3fbfae82b4c ("tpm: take TPM chip power gating out of tpm_transmit()")

Thank you. I'll apply this to my tree.

The commit went in the following form:

http://git.infradead.org/users/jjs/linux-tpmdd.git/commit/9b558deab2c5d7dc23d5f7a4064892ede482ad32

I refined the long description as they should be written in imperative form. I also changed it to consistently to speak about tpm_tis_core instead of using two differing spellings (tpm_tis and TPM TIS). tpm_tis is a different module than tpm_tis_core.

Unfortunately I had to drop the assignment statement because:

1. Generally speaking, two separate bug fixes should never reside in the same commit. They even need their own fixes tags in this case.
2. The commit message did not reason the assignment statement.

/Jarkko

#4 lore raw
Quoted 13 lines · Jarkko Sakkinen
Quoted 12 lines · Jarkko Sakkinen
Quoted 6 lines · Stefan Berger

From: Stefan Berger <[email protected]>

The interrupt probing of the TPM TIS was broken since we are trying to run it without an active locality and without the TPM_CHIP_FLAG_IRQ set.

Need these:

Fixes a3fbfae82b4c ("tpm: take TPM chip power gating out of tpm_transmit()")
Quoted 6 lines
Quoted 3 lines

Thank you. I'll apply this to my tree.

The commit went in the following form:

http://git.infradead.org/users/jjs/linux-tpmdd.git/commit/9b558deab2c5d7dc23d5f7a4064892ede482ad32

I saw you dropped the stetting of the IRQ flag - I needed it, otherwise it wouldn't execute certain code paths.

   Stefan

#5 lore raw
Quoted 16 lines · Stefan Berger
Quoted 15 lines · Jarkko Sakkinen
Quoted 14 lines · Jarkko Sakkinen
Quoted 6 lines · Stefan Berger

From: Stefan Berger <[email protected]>

The interrupt probing of the TPM TIS was broken since we are trying to run it without an active locality and without the TPM_CHIP_FLAG_IRQ set.

Need these:

Fixes a3fbfae82b4c ("tpm: take TPM chip power gating out of tpm_transmit()")

Thank you. I'll apply this to my tree.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

The commit went in the following form:

http://git.infradead.org/users/jjs/linux-tpmdd.git/commit/9b558deab2c5d7dc23d5f7a4064892ede482ad32

I saw you dropped the stetting of the IRQ flag - I needed it, otherwise it wouldn't execute certain code paths.

I explained why I removed that part. There was no any reasoning for it. Also, it cannot be in the same commit if it fixes a diffent issue.

/Jarkko

#6 lore raw
Quoted 20 lines · Jarkko Sakkinen
Quoted 19 lines · Stefan Berger
Quoted 18 lines · Jarkko Sakkinen
Quoted 7 lines · Jarkko Sakkinen
Quoted 6 lines · Stefan Berger

From: Stefan Berger <[email protected]>

The interrupt probing of the TPM TIS was broken since we are trying to run it without an active locality and without the TPM_CHIP_FLAG_IRQ set.

Quoted 8 lines

Need these:

Fixes a3fbfae82b4c ("tpm: take TPM chip power gating out of tpm_transmit()")

Thank you. I'll apply this to my tree.

The commit went in the following form:

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

http://git.infradead.org/users/jjs/linux-tpmdd.git/commit/9b558deab2c5d7dc23d5f7a4064892ede482ad32

I saw you dropped the stetting of the IRQ flag - I needed it, otherwise it wouldn't execute certain code paths.

I explained why I removed that part. There was no any reasoning for it. Also, it cannot be in the same commit if it fixes a diffent issue.

AFAIK they go with different fixes-tags.

/Jarkko

#7 lore raw
Quoted 21 lines · Jarkko Sakkinen
Quoted 20 lines · Jarkko Sakkinen
Quoted 19 lines · Stefan Berger
Quoted 18 lines · Jarkko Sakkinen
Quoted 7 lines · Jarkko Sakkinen
Quoted 6 lines · Stefan Berger

From: Stefan Berger <[email protected]>

The interrupt probing of the TPM TIS was broken since we are trying to run it without an active locality and without the TPM_CHIP_FLAG_IRQ set.

Quoted 8 lines

Need these:

Fixes a3fbfae82b4c ("tpm: take TPM chip power gating out of tpm_transmit()")

Thank you. I'll apply this to my tree.

The commit went in the following form:

Quoted 7 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line

http://git.infradead.org/users/jjs/linux-tpmdd.git/commit/9b558deab2c5d7dc23d5f7a4064892ede482ad32

I saw you dropped the stetting of the IRQ flag - I needed it, otherwise it wouldn't execute certain code paths.

I explained why I removed that part. There was no any reasoning for it. Also, it cannot be in the same commit if it fixes a diffent issue.

AFAIK they go with different fixes-tags.

I sent a separate patch for this. It looks like this bug goes back to when the TPM_CHIP_FLAG_IRQ was introduced in March 2019?!

   Stefan

Reviewed-by
#8 lore raw
Quoted 25 lines · Stefan Berger
Quoted 24 lines · Jarkko Sakkinen
Quoted 23 lines · Jarkko Sakkinen
Quoted 22 lines · Stefan Berger
Quoted 13 lines · Jarkko Sakkinen
Quoted 12 lines · Jarkko Sakkinen
Quoted 6 lines · Stefan Berger

From: Stefan Berger <[email protected]>

The interrupt probing of the TPM TIS was broken since we are trying to run it without an active locality and without the TPM_CHIP_FLAG_IRQ set.

Need these:

Fixes a3fbfae82b4c ("tpm: take TPM chip power gating out of tpm_transmit()")
Quoted 6 lines
Quoted 3 lines

Thank you. I'll apply this to my tree.

The commit went in the following form:

http://git.infradead.org/users/jjs/linux-tpmdd.git/commit/9b558deab2c5d7dc23d5f7a4064892ede482ad32

I saw you dropped the stetting of the IRQ flag - I needed it, otherwise it wouldn't execute certain code paths.

Quoted 7 lines
Quoted 4 lines
Quoted 3 lines

I explained why I removed that part. There was no any reasoning for it. Also, it cannot be in the same commit if it fixes a diffent issue.

AFAIK they go with different fixes-tags.

I sent a separate patch for this. It looks like this bug goes back to when the TPM_CHIP_FLAG_IRQ was introduced in March 2019?!

Thank you!

/Jarkko