Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp239652lqh; Mon, 6 May 2024 18:33:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVBE78540iCvy7GG45WOu34E16aSnl5209bwnkNiS0WSnmcLViA0+YWqFlJf4JMqZuYDtMMvyf6mhv9VJWvtgEJ5fgv0zYsDxafZy7xCQ== X-Google-Smtp-Source: AGHT+IFdV/sAgOlmvOsPMfa1PPmsNV9IpgGg12YpTINVXqwVBcyM3exxOB63QmMMLL9cghk0iqA1 X-Received: by 2002:a05:6a21:6d90:b0:1af:64fb:a04c with SMTP id wl16-20020a056a216d9000b001af64fba04cmr13083663pzb.34.1715045605569; Mon, 06 May 2024 18:33:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715045605; cv=pass; d=google.com; s=arc-20160816; b=yECoV/O7GrHjtyDacgoYIvYopc/KqaWAN40YM3GzGciNtrQa3gLmT6iDaLt/5pO+1z LlVBCDXaBg5gEF3m/xHqKPTWiSNDv3osUpfzhkrWaSAFWSteZW7eIAnUcx9/dbqT+L2U 4fDLix9hDulSf6PNCOWJIgNvIKO7HfHHP6h07AkwdUXyNwIIuw2cOQvCq6rEUert1UB2 7E4I1GFTSpG21c7TRiH3y01VgVVycVHSycAwGfshudB9iC8AXJCJU2TKssPm77rT77UE xh89UAPRBqoOldtHiQ7tyA8ZWMiSgyOKpPtHCc/79rx/5KnnxVSKoyEkQh5iNgq1AGYD BQAQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=w7qpPlO1ia49EiV1A7IncpyuhlxwrR2pVKc054DktVE=; fh=hlM9Rx0thf74mJ4i+066gSlmGsESM0euS7sbdRBvoXE=; b=Qu/yNfyiKcWJ2WZYr21zpWy/y5KqbnERVShOCIeN33yWeF/wNdEU2OK/HIrP7Roxbw jepj547cLrQHRwcaZABy5SPCE08tprmjb8ch3ZKaMn6FK+PE7hidxEP+PYgQ1FHZ2tJu lGjSmUvsSBHBnKUfDbQ7Fd7YqdcjGgpgqCQH3BhBNx1e+E+qc5tl6paVwOW5trupLWsn TYRpK7K05Hp4m1o1QlXbf5vXBdbQ/TFRLF+EV9cftRDZE+ZN2s2/jpqK4bjus02hmbpp +jQE4e0jHcb7VFwLbqy/jYlFt/fdGTzmWmwb0A6shicP47Q6HhYlBzPrVNA+CmX+tPtQ MzJg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=nzViaw57; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-170545-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170545-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id w18-20020a17090aea1200b002a527dfd962si9219233pjy.40.2024.05.06.18.33.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 18:33:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170545-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=nzViaw57; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-170545-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170545-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 19FEA283DA6 for ; Tue, 7 May 2024 01:33:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ED5944696; Tue, 7 May 2024 01:33:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="nzViaw57" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 52F7D139F; Tue, 7 May 2024 01:33:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715045597; cv=none; b=sTYwZ1M/kwtIIsiKvcfRDdXcBN+g/cUTeuASwty0CRhBYq4KHmjM2bGLS8meBiBP9vc0aADBTooVVBhpnS9sQHSyOS+uB0+noFT4FL//evdeEU5k5PJt+/udoHAJoZ8AtCQMTBlfGbMUIbNxzgS8oOg6Uzu3qrmpaeVeCLzEc7M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715045597; c=relaxed/simple; bh=qPRJnYhfG3ihAcwLFlEiL3vMYD133/E5GbZFFwNXRHY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FSzgc8oQfSU1mTeJIe3xWf7Yxr1m+MZNVjo4CLy7M88mWu9jitWPcoZt6SqM0gZbyFyGN8cjwbY8ur8KjdbrnJAeUuSrT+26+ezEoqkks+E/t+uzHAiZEIecW/jG5nK1qir0EVKRp1BmEKX3Jid9ymkol5YPRvKgTej57K+AK3g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=nzViaw57; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=w7qpPlO1ia49EiV1A7IncpyuhlxwrR2pVKc054DktVE=; b=nzViaw57oJ4jG5xzUHra90T2OI qHIwcqcuZxUMtuM6QPghR6oGcnkw4kSFk6mBS548GtN8g2jMxAEulIvaDSVrbDNnzkMjp5E9cRlv/ 4YEp/uPp3UbV+S+SoXj+9cEUI0S3hmPOzYwe6ZOTBLB03PMnTHPEphnD5Um0Lg8U0uII=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1s49hV-00EoJm-1l; Tue, 07 May 2024 03:33:01 +0200 Date: Tue, 7 May 2024 03:33:01 +0200 From: Andrew Lunn To: Rengarajan S Cc: bryan.whitehead@microchip.com, UNGLinuxDriver@microchip.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, richardcochran@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v1] net: microchip: lan743x: Reduce PTP timeout on HW failure Message-ID: <01145749-30a7-47a3-a5e6-03f4d0ee1264@lunn.ch> References: <20240502050300.38689-1-rengarajan.s@microchip.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240502050300.38689-1-rengarajan.s@microchip.com> On Thu, May 02, 2024 at 10:33:00AM +0530, Rengarajan S wrote: > The PTP_CMD_CTL is a self clearing register which controls the PTP clock > values. In the current implementation driver waits for a duration of 20 > sec in case of HW failure to clear the PTP_CMD_CTL register bit. This > timeout of 20 sec is very long to recognize a HW failure, as it is > typically cleared in one clock(<16ns). Hence reducing the timeout to 1 sec > would be sufficient to conclude if there is any HW failure observed. The > usleep_range will sleep somewhere between 1 msec to 20 msec for each > iteration. By setting the PTP_CMD_CTL_TIMEOUT_CNT to 50 the max timeout > is extended to 1 sec. This patch has already been merged, so this is just for my curiosity. The hardware is dead. Does it really matter if we wait 1s or 20 seconds. It is still dead? This is a void function. Other than reporting that the hardware is dead, nothing is done. So this change seems pointless? Andrew