[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180214100358.GL27191@lahna.fi.intel.com>
Date: Wed, 14 Feb 2018 12:03:58 +0200
From: Mika Westerberg <mika.westerberg@...ux.intel.com>
To: Mario.Limonciello@...l.com
Cc: linux-kernel@...r.kernel.org, andreas.noever@...il.com,
michael.jamet@...el.com, yehezkel.bernat@...el.com,
bhelgaas@...gle.com, radion.mirchevsky@...el.com
Subject: Re: [PATCH 06/18] thunderbolt: Wait a bit longer for ICM to
authenticate the active NVM
On Tue, Feb 13, 2018 at 05:21:33PM +0000, Mario.Limonciello@...l.com wrote:
> > -----Original Message-----
> > From: Mika Westerberg [mailto:mika.westerberg@...ux.intel.com]
> > Sent: Tuesday, February 13, 2018 11:00 AM
> > To: linux-kernel@...r.kernel.org
> > Cc: Andreas Noever <andreas.noever@...il.com>; Michael Jamet
> > <michael.jamet@...el.com>; Yehezkel Bernat <yehezkel.bernat@...el.com>; Bjorn
> > Helgaas <bhelgaas@...gle.com>; Limonciello, Mario
> > <Mario_Limonciello@...l.com>; Radion Mirchevsky
> > <radion.mirchevsky@...el.com>; Mika Westerberg
> > <mika.westerberg@...ux.intel.com>
> > Subject: [PATCH 06/18] thunderbolt: Wait a bit longer for ICM to authenticate the
> > active NVM
> >
> > Sometimes during cold boot ICM has not yet authenticated the active NVM
> > image leading to timeout and failing the driver probe. Allow ICM to take
> > some more time and increase the timeout to 3 seconds before we give up.
> >
> > While there fix icm_firmware_init() to return the real error code
> > without overwriting it with -ENODEV.
> >
> > Signed-off-by: Mika Westerberg <mika.westerberg@...ux.intel.com>
> > ---
> > drivers/thunderbolt/icm.c | 7 +++++--
> > 1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/thunderbolt/icm.c b/drivers/thunderbolt/icm.c
> > index 1183321586c5..611d28e8e5f2 100644
> > --- a/drivers/thunderbolt/icm.c
> > +++ b/drivers/thunderbolt/icm.c
> > @@ -736,14 +736,14 @@ static bool icm_ar_is_supported(struct tb *tb)
> > static int icm_ar_get_mode(struct tb *tb)
> > {
> > struct tb_nhi *nhi = tb->nhi;
> > - int retries = 5;
> > + int retries = 60;
> > u32 val;
> >
> > do {
> > val = ioread32(nhi->iobase + REG_FW_STS);
> > if (val & REG_FW_STS_NVM_AUTH_DONE)
> > break;
> > - msleep(30);
> > + msleep(50);
> > } while (--retries);
> >
> > if (!retries) {
> > @@ -1063,6 +1063,9 @@ static int icm_firmware_init(struct tb *tb)
> > break;
> >
> > default:
> > + if (ret < 0)
> > + return ret;
> > +
> > tb_err(tb, "ICM firmware is in wrong mode: %u\n", ret);
> > return -ENODEV;
> > }
> > --
> > 2.15.1
>
> Mika,
>
> Some of your patches in this series already have the stable tag, but I think
> especially this one is probably a good candidate to add to @stable.
You are right. I'll add stable tag for v2.
Powered by blists - more mailing lists