Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp76270imj; Thu, 7 Feb 2019 00:29:27 -0800 (PST) X-Google-Smtp-Source: AHgI3IYTHjZVyWj4w8Se459xabKg17L+laQBzKfwgvZZMypRp9FyWQiMPGlJZondpLrhk52MGRYR X-Received: by 2002:aa7:8249:: with SMTP id e9mr1770523pfn.93.1549528167609; Thu, 07 Feb 2019 00:29:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549528167; cv=none; d=google.com; s=arc-20160816; b=nRIRrVRONdAjJyNJxjyfzp5T93Y8TOPurLCebkNY5jdwKb9VpGpUaPiCUSeDF/90gU 0BQ5gttDZhBFYqyAZgk7UBK3/mrGizDhKmk0o03NMcSvQn+Pq+kURqOlP1wDZ3zTLB9D aN5DiqY4oVN6nsJzjeOnCUlbMRtMrxlgwfvhnBbki5iUPeCwn0IDFwH80EIRw5/ZscbU seXvZQp/BN+8ReU9vXGAWkMy8C3ZwZc9IsRDeX/qDpArelTDXXlMMy+uLwVy4LcJ92pJ iiYXFTiQAkFyHw6Hu3QnLcG81V/y10MWWhn+xUXyVd4k93VYp9jCeNSNLSDkO8NuFVLB uDAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=lgdvBgHUcBxlqOjh+05Iav0Kj7/Tb7v3PxxVaHWFMkg=; b=WPf6zacmR9JI874lYP/HFqtGOUtqOcU07JutQP7+wjoL01YstjEazXXaBN0I5uco2k LnTYpiNcH9KoIQI4vlUgLBJ6T48v5eOco0deQmn5NDaDQKL0T4TKgpDRhCHS9kOaLK4t 7NHLsNvHQh2x7sqPQF9RTZ+S6Q9r2MGwlkjUXUMpEDmPYTrVMwmsYW7e3aqIJzpvQzpm vMkWxGaZid3UlXmhzBlzea8z4snRTJPFU7YuxSz5GTL0pg6+PJgMN1g6N/7YFTIqQ/6q gZSMdFldskajRWNyLwvogl+BxTX1uESqHOa4wZ/ba6Ucb2sLGonLFC2RCc5p1uHTIXJa CYTg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t4si7864513pga.83.2019.02.07.00.29.11; Thu, 07 Feb 2019 00:29:27 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727039AbfBGI1u (ORCPT + 99 others); Thu, 7 Feb 2019 03:27:50 -0500 Received: from mga14.intel.com ([192.55.52.115]:2465 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726781AbfBGI1t (ORCPT ); Thu, 7 Feb 2019 03:27:49 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Feb 2019 00:27:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,342,1544515200"; d="scan'208";a="317026112" Received: from mattu-haswell.fi.intel.com (HELO [10.237.72.164]) ([10.237.72.164]) by fmsmga006.fm.intel.com with ESMTP; 07 Feb 2019 00:27:47 -0800 Subject: Re: [PATCH] xhci: Convert xhci_handshake() to use readl_poll_timeout() To: Andrey Smirnov , linux-usb@vger.kernel.org Cc: Mathias Nyman , Greg Kroah-Hartman , linux-kernel@vger.kernel.org References: <20190207000308.7051-1-andrew.smirnov@gmail.com> From: Mathias Nyman Message-ID: <63866354-48b8-5787-39de-5c23e7471f6f@linux.intel.com> Date: Thu, 7 Feb 2019 10:32:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190207000308.7051-1-andrew.smirnov@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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