Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp861382imj; Thu, 7 Feb 2019 13:05:46 -0800 (PST) X-Google-Smtp-Source: AHgI3IYUTeRwcKS0ULj9eFI970+ZV8IfRVt3GLXn93K3irXe5bozvhs6CYKbf68DcXmNbbpXMaWr X-Received: by 2002:a63:374e:: with SMTP id g14mr17126613pgn.59.1549573546000; Thu, 07 Feb 2019 13:05:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549573545; cv=none; d=google.com; s=arc-20160816; b=iMeB6rvFtWfuRU+GzpfrcXxlMb/E2NNyEFrT/IJmodleqIe8/YxhzK4j2ma/G9+MDU KmSd2y7YO8zvvzxTSS+zBPWj3yJ6UH0SLkbDhUJ2iPRFH9X3jVsRYkjq7hUpJnFIrOpV y0UKrIJgT4ODwRzJt6mGywIA64/ZcBJu7R3oOTLOoGfYe5R0YgWNBjNbiIxp0w096l0f cD0e8Y3wRKCw0R4WLp+jPfpQ+zSSqYTBm/mM/BuwLvl4+lGmYT5EDKmm6SmvoC2bEyVV 7u6uZcJyPeOa0OxB+NbRLNAtSEhTdPvHyV8FFmgC2/8N9UsSd6T6IshIUZkqWsaTJ5Mq UFnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=1vzs5+xO8TOrFu/AzQQL9tefJptORwmLNWErK66+mj8=; b=riybu825YA3R2cv9tmEF8BfTpvANade647kaIZrp9LHEKayrUb4X2AjDc4grGPQDeZ DTwImsFqto/z8OIPjdS07bVLjkYqyIxgNM5fjf3reRxHQme8bqhNbCEbn0q/cwmumLrK N5m6eevUarnWpw/4TFmyuZrNX9q6SziaiJ/XInTwcbVLYf1LIW+lkrng/ZfK8/P7EYCG H/NuPMogk8wW6tR9zIItOgWZ4uTrxXPKBYAeJxYFTFQrID5I0adV65HsO7JgUHfPSQmc 9fUkE+3ezjqyRBGGnlrDaMUj5Vv0m2lfIcutdC3WvOepbfz0HZdCcIPr6OI735XLoe5y a2xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="nU22U/Ml"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f9si20231pgc.85.2019.02.07.13.05.29; Thu, 07 Feb 2019 13:05:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="nU22U/Ml"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727554AbfBGVEF (ORCPT + 99 others); Thu, 7 Feb 2019 16:04:05 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:54687 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726832AbfBGVEF (ORCPT ); Thu, 7 Feb 2019 16:04:05 -0500 Received: by mail-wm1-f66.google.com with SMTP id a62so1329330wmh.4; Thu, 07 Feb 2019 13:04:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1vzs5+xO8TOrFu/AzQQL9tefJptORwmLNWErK66+mj8=; b=nU22U/MlkdWjqQ/Mok/bA6iHuoBXSWVFWF8+lnY4NfAyZOZTUFZ3m0JLpmccmHRxrN RxvlliNwlmhmHft7jdVXE2VIYATxswt7KLD2krAbz3L+JG8pAa6JI8RUbCSDxg9E40zF wtU+0q77kGa7wXqJabIESYVwPlIbpmNLTFOQbDX7dQCrASVMHnTVEzqLA5wk2UN3T2hB OBC7aXfaz4i5+oxLKK/v+RuSBIcc8/EnIAuoPng2/Ja9LoE935fyq4J8pEfwLoHBfkB9 VW2ge2C0+Nl42PuCC5+h2CUWUEVCxt8ZidGHEfq80uSMCM6wFi4a9B++36L/5SAV6szh As8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1vzs5+xO8TOrFu/AzQQL9tefJptORwmLNWErK66+mj8=; b=Vh64pScHJYIdt3Qm+NdchpVQZD0hPdiY3x+ZxMPWpllY88dtpnqIGWLqTKdRXrpwPo QPCGZDa7i9M1SA3XdlRGnQZ9rqpQeRN1jSjhp7+K6N4SBPZ2D9CLfVfelnaefijtX33U ePysCZgwQQSB/7WV0SuH+tZSUOpWUBQAadCvTKRqu/mipu/xL4eXRyUL4SpNMfMTnx5t RrsX9OZtYqYLlqnk1gdxvyw+ISq6FJczUVUns9qXjBy5VbXIVPNkC/2t4Qkcblv45SFk bSpWTmt+fqMG/wkbx4tP6bDnRreHe9aD9sVYoFY2TmJFlSlsWxAz49/C1jR3fINI//f7 xwSw== X-Gm-Message-State: AHQUAuZXLkClOd5yHVNlYV4kdSE9rYM2hNQbtHSh1LChm+m0pAVdr9UY wdPUEsSEUCMlydbr589sxowvF5lEPfVcxWxKdA+ZKsq2 X-Received: by 2002:a1c:f605:: with SMTP id w5mr9256493wmc.116.1549573443017; Thu, 07 Feb 2019 13:04:03 -0800 (PST) MIME-Version: 1.0 References: <20190207000308.7051-1-andrew.smirnov@gmail.com> <63866354-48b8-5787-39de-5c23e7471f6f@linux.intel.com> In-Reply-To: <63866354-48b8-5787-39de-5c23e7471f6f@linux.intel.com> From: Andrey Smirnov Date: Thu, 7 Feb 2019 13:03:51 -0800 Message-ID: Subject: Re: [PATCH] xhci: Convert xhci_handshake() to use readl_poll_timeout() To: Mathias Nyman Cc: linux-usb@vger.kernel.org, Mathias Nyman , Greg Kroah-Hartman , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 7, 2019 at 12:27 AM Mathias Nyman wrote: > > On 07.02.2019 02:03, Andrey Smirnov wrote: > > Xhci_handshake() implements the algorithm already captured by > > readl_poll_timeout(). Convert the former to use the latter to avoid > > repetition. > > readl_poll_timeout() doesn't really work here as it might sleep. > > iopoll.h: > > /** > * readx_poll_timeout - Periodically poll an address until a condition is met or a timeout occurs > * > ... > * Returns 0 on success and -ETIMEDOUT upon a timeout. In either > * case, the last read value at @addr is stored in @val. Must not > * be called from atomic context if sleep_us or timeout_us are used. > > -Mathias Shoot, missed this part. Will change to readl_poll_timeout_atomic() in v2. Thanks, Andrey Smirnov