Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp4624887imd; Tue, 30 Oct 2018 05:09:35 -0700 (PDT) X-Google-Smtp-Source: AJdET5dZyjTYKK5BhLGDAcbyDsNOHA6Esg6dlNlTWRVxCVLbo5L7l0mXF4eAU8j4J3wgnMQc2wmK X-Received: by 2002:a65:638a:: with SMTP id h10-v6mr17789052pgv.136.1540901375147; Tue, 30 Oct 2018 05:09:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540901375; cv=none; d=google.com; s=arc-20160816; b=BridmqSBy/CbJqPsoyLocJL0/tE6u31ni8m+g+YVmUVgrmAHJjPUFdtQnT98yVyqI9 DLr/AA6zhEzAIYVDkfiKOXOYlSxbVb3aKCcfk3pK1jmhcJoh+hNsA+OHaHcL9xsQAWJx 8VQvdY8lCzCV3VN2HoNSVMO0i8IMGl67pV/GWhsFZr/axtQojN7FcdGp6ar+ZgR7DCBp itbWO2BevTVzdFWR3BMVoEjTA38vvbdlXAkQqo8DWKQvCkHBQXHFtuUsFPklZeAwSGFH Zd5ibvNiJUnBXhJ41hKJ1HcwUVJDfk7t/S+C8Q3OvqpyxLPjlir3P1OhYuOSV2Yybl8H I+ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Bkql3OanxwRX/WQ4VqurxgcX/dmjrBLqATGz8Np2/9s=; b=z4vYuAwdi9NZdj9KzD3hJFBBpKZh4om9y+55qjT3XCIVlI9FJianUvZ/VLi9N17dKv +/C+x2jAyfbH4dtRG49CM+mtMITU7VkE0epVdi+6ey1zkxKGvlEEzjuZS9Jsy2E5ySNQ 8XDMpZBf1+RYOjzvirdOOglX9JOxgtCnrk/jDCDtObMTou6LVq1Rs/2FjeK7c5RozywI HX3Ch2wTj+T6bjp3fLsTMntI/GEg5ZFABU3YC7YQM0UV8b0znBawZ7icegVP/Alveri/ X8KTLftyUrXRT2jCyePzmVsOfBxojLqkE+jPaznDa5iy1SMWDUgtx5XrkKVKwospHWsM mZoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=dKqPdoPu; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m65-v6si28013176pfc.75.2018.10.30.05.09.18; Tue, 30 Oct 2018 05:09:35 -0700 (PDT) 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=@lunn.ch header.s=20171124 header.b=dKqPdoPu; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727981AbeJ3VB6 (ORCPT + 99 others); Tue, 30 Oct 2018 17:01:58 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:46048 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726225AbeJ3VB6 (ORCPT ); Tue, 30 Oct 2018 17:01:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=Bkql3OanxwRX/WQ4VqurxgcX/dmjrBLqATGz8Np2/9s=; b=dKqPdoPuaIhaivsRUHGcYPWAgHev4aqlrUHHHZXg/hC5vy2UBmU82KjhO4g+FUEcBLF1HjLWNCyKnkQEF78h55dJsLHUp//YUyE0ydVAEz4U0Z/wU6qixxxRLzDhvsX8y8X4p3gFtku40IQUu7/loKDHbdx9WZSODevVJPr6bJ4=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1gHSox-0007R8-FQ; Tue, 30 Oct 2018 13:08:31 +0100 Date: Tue, 30 Oct 2018 13:08:31 +0100 From: Andrew Lunn To: Kurt Kanzenbach Cc: Anirudha Sarangi , John Linn , "David S. Miller" , Michal Simek , Radhey Shyam Pandey , YueHaibing , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/2] net: xlinx: mdio: recheck condition after timeout Message-ID: <20181030120831.GC27873@lunn.ch> References: <20181030093139.10226-1-kurt@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181030093139.10226-1-kurt@linutronix.de> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 30, 2018 at 10:31:37AM +0100, Kurt Kanzenbach wrote: > Hi, > > the Xilinx mdio wait functions may return false positives under certain > circumstances: If the functions get preempted between reading the corresponding > mdio register and checking for the timeout, they could falsely indicate a > timeout. Hi Kurt I wonder if it would be possible to add a readx_poll_timeout() which passes two parameters to op()? I keep seeing this basic problem in various drivers, and try to point people towards readx_poll_timeout(), but it is not the best of fit. Otherwise, could you add a axienet_ior_read_mcr(lp), and use readx_poll_timeout() as is? Andrew