Re: [v5 1/4] mpt3sas: Separate out mpt3sas_wait_for_ioc_to_operational

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 18, 2018 at 10:10 AM Suganath Prabu Subramani
<suganath-prabu.subramani@xxxxxxxxxxxx> wrote:
> On Wed, Oct 17, 2018 at 1:49 PM Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote:
>> On Wed, Oct 17, 2018 at 11:17 AM Andy Shevchenko
>> <andy.shevchenko@xxxxxxxxx> 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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux