lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3d34a25b-5311-e660-a724-b1c11bbaf5fc@quicinc.com>
Date:   Thu, 23 Mar 2023 03:38:31 -0700
From:   "Bao D. Nguyen" <quic_nguyenb@...cinc.com>
To:     John Garry <john.g.garry@...cle.com>, <quic_asutoshd@...cinc.com>,
        <quic_cang@...cinc.com>, <bvanassche@....org>, <mani@...nel.org>,
        <stanley.chu@...iatek.com>, <adrian.hunter@...el.com>,
        <beanhuo@...ron.com>, <avri.altman@....com>,
        <martin.petersen@...cle.com>
CC:     <linux-scsi@...r.kernel.org>,
        Alim Akhtar <alim.akhtar@...sung.com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        Arthur Simchaev <Arthur.Simchaev@....com>,
        Eric Biggers <ebiggers@...gle.com>,
        Kiwoong Kim <kwmad.kim@...sung.com>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH v3 1/5] ufs: mcq: Add supporting functions for mcq
 abort

On 3/23/2023 3:07 AM, John Garry wrote:
> On 23/03/2023 09:53, Bao D. Nguyen wrote:
>> +static int ufshcd_mcq_poll_register(void __iomem *reg, u32 mask,
>> +            u32 val, unsigned long timeout_ms)
>> +{
>> +    unsigned long timeout = jiffies + msecs_to_jiffies(timeout_ms);
>> +    int err = 0;
>> +
>> +    /* ignore bits that we don't intend to wait on */
>> +    val = val & mask;
>> +
>> +    while ((readl(reg) & mask) != val) {
>> +        usleep_range(10, 50);
>> +        if (time_after(jiffies, timeout)) {
>> +            err = -ETIMEDOUT;
>> +            break;
>> +        }
>
> This looks just like readl_poll_timeout()
I will make the change in the next revision. Thanks John.
>
>> +    }
>> +
>> +    return err;
>> +}
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ