[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vd63Ss3WBuAA0euutGboUuOzS0EJ3J-365b5QOTz98NqQ@mail.gmail.com>
Date: Thu, 18 Oct 2018 10:22:00 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Suganath Prabu Subramani <suganath-prabu.subramani@...adcom.com>
Cc: Bjorn Helgaas <helgaas@...nel.org>, Lukas Wunner <lukas@...ner.de>,
linux-scsi <linux-scsi@...r.kernel.org>,
linux-pci@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
ruscur@...sell.cc, sbobroff@...ux.ibm.com,
Oliver <oohall@...il.com>,
Sathya Prakash <Sathya.Prakash@...adcom.com>,
Sreekanth Reddy <sreekanth.reddy@...adcom.com>
Subject: Re: [v5 1/4] mpt3sas: Separate out mpt3sas_wait_for_ioc_to_operational
On Thu, Oct 18, 2018 at 10:10 AM Suganath Prabu Subramani
<suganath-prabu.subramani@...adcom.com> wrote:
> On Wed, Oct 17, 2018 at 1:49 PM Andy Shevchenko <andy.shevchenko@...il.com> wrote:
>> On Wed, Oct 17, 2018 at 11:17 AM Andy Shevchenko
>> <andy.shevchenko@...il.com> wrote:
>> > I understand this is part of existing code, but can you consider to
>> > modify it to something like
>> >
>> > do {
>> > ioc_state = mpt3sas_base_get_iocstate(ioc, 1);
>> > if (ioc_state == MPI2_IOC_STATE_OPERATIONAL)
>> > break;
>>
>> Forgot ssleep(1); here.
>>
>> > ioc_info(ioc, "%s: waiting for operational state(count=%d)\n",
>> > __func__, ++wait_state_count);
>> > while (timeout--);
Just noticed this should be --timeout.
>> > if (!timeout) {
>> > ioc_err(ioc, "%s: failed due to ioc not operational\n", __func__);
>> > return -EFAULT;
>> > }
>> > Less lines, more understandable in my view.
>
> Yes, We 'll take this change and resend.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists