Message ID | C5A28EF7B98F574C85C70238C8E9ECC04E682BF171@ABGEX74E.FSC.NET (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Dec 04, 2015 at 10:10:15AM +0100, Wilck, Martin wrote: > The following simple change fixes the ACPI probing after applying your > latest series. The must have been another ACPI resource that you were > erroneously using as mem resource. Close, acpi_dev_resource_memory destroys it's output parameter when it fails :( Should be: if (acpi_dev_resource_interrupt(ares, 0, &res)) tpm_info->irq = res.start; else if (acpi_dev_resource_memory(ares, &res)) tpm_info->res = res; > The IS_ERR change() didn't fix it. I think it's not needed, although it > probably can't hurt. IS_ERR should address the oops though?? I've put all the revised patches here: https://github.com/jgunthorpe/linux/commits/for-jarkko If you are OK with them now I'll post the series. Jason ------------------------------------------------------------------------------ Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
> IS_ERR should address the oops though?? No, see my answer to Jarkko in the other part of the thread. > I've put all the revised patches here: > > https://github.com/jgunthorpe/linux/commits/for-jarkko > > If you are OK with them now I'll post the series. I haven't re-reviewed it, but the test went alright. As reported before, with "force=1", I get the error message: [ 1351.677808] tpm_tis MSFT0101:00: can't request region for resource [mem 0xfed40000-0xfed44fff] [ 1351.687431] tpm_tis: probe of MSFT0101:00 failed with error -16 This is kind of misleading because the TPM is actually working as a platform device. But I can follow your previous argument that this is acceptable because people who use "force=1" should know what they are doing, so I don't regard this as critical. Martin ------------------------------------------------------------------------------ Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
On Mon, Dec 07, 2015 at 10:59:15AM +0100, Wilck, Martin wrote: > > IS_ERR should address the oops though?? > > No, see my answer to Jarkko in the other part of the thread. I'm confused, is there an oops that still need to be fixed? > As reported before, with "force=1", I get the error message: > > [ 1351.677808] tpm_tis MSFT0101:00: can't request region for resource > [mem 0xfed40000-0xfed44fff] > [ 1351.687431] tpm_tis: probe of MSFT0101:00 failed with error -16 Great, that you so much, that is what I expected to see! > This is kind of misleading because the TPM is actually working as a > platform device. But I can follow your previous argument that this is > acceptable because people who use "force=1" should know what they are > doing, so I don't regard this as critical. Right. Jason ------------------------------------------------------------------------------ Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index a1898c8..4c65a7d 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c @@ -954,7 +954,8 @@ static int tpm_check_resource(struct acpi_resource *ares, void *data) if (acpi_dev_resource_interrupt(ares, 0, &res)) tpm_info->irq = res.start; - acpi_dev_resource_memory(ares, &tpm_info->res); + else if (acpi_dev_resource_memory(ares, &res)) + memcpy(&tpm_info->res, &res, sizeof(res)); return 1; }