Received: by 10.213.65.68 with SMTP id h4csp1036043imn; Wed, 28 Mar 2018 18:54:55 -0700 (PDT) X-Google-Smtp-Source: AIpwx48JyZna78ScS2kZETX4uzKJ2QyxI6LX+9xNVtOj3m6FCqrTSw+/UrfnSsShJXFNP85n9V7I X-Received: by 10.98.170.13 with SMTP id e13mr4720124pff.137.1522288495434; Wed, 28 Mar 2018 18:54:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522288495; cv=none; d=google.com; s=arc-20160816; b=VnSTiCbMDishOBtnIsW+FW9w/oatu8l/za4PjvQcUbPOW9QQLPDqPbAEO5DB1ziWb4 BW6mkghyuc+KPGNcuKAcp72h4BtPO/N89TJV2qP6pTzShs2G84sMR+lXlO7xjOPOs7I6 h0KcbCuYrcDB5VUWGr+r+P/Yzec1KCLfgshD4g3OvICIgbsKJVBMWlBqID4o6s/HgOnH j52won+5BNmSCGde++aYY1ISkYyrnTfLd8To98Q8BrMfxhPwru9e1NJdRm1nytU0/eLL AICFtf+RPq37Y3MHyP3lpiKFXkgeGXHXmmyUe/wl1xcZmOJ86C3xAzc5auW6uhF/46Xn qfLQ== 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:dkim-signature :arc-authentication-results; bh=0b+4G/a5mW3q43by8C5zh+B96fxiYPqV7RAWDVw/uZg=; b=pl1yfPUg3ZcV0XgfGrXgkQS+cTBndDScoaiKkwEkeLkFEMOle/B/FxfIlPwZHUZksw C+OWkxT0mW8bqir96YJWiWEt4Z7gaZabY773V5iVZD9uzvX4qLkkE5ARPy7ZFKZ0YRF7 ciIVcqwerrqaCtKi++GjZDU91krXnSk7Hhj102Nh86erwUNM+h7wJkoRaqguBUm3bAil H1HR+ii9konmftwkMkvGnAenwT5c0ToCLufstostCeLoa3HV5lG/1HLOqtLsio1SEvl1 rv/0pxhlCBYF0GBSSLwSUsNDoK3xGfuKz103njDNPKfuwu5IQ7QM9RRPGoTS6/puu/Yc 8Aqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nexus-software-ie.20150623.gappssmtp.com header.s=20150623 header.b=lXVN6vVm; 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 p184si3291100pga.700.2018.03.28.18.54.40; Wed, 28 Mar 2018 18:54:55 -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=@nexus-software-ie.20150623.gappssmtp.com header.s=20150623 header.b=lXVN6vVm; 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 S1751938AbeC2Bxs (ORCPT + 99 others); Wed, 28 Mar 2018 21:53:48 -0400 Received: from mail-wm0-f44.google.com ([74.125.82.44]:55532 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751195AbeC2Bxq (ORCPT ); Wed, 28 Mar 2018 21:53:46 -0400 Received: by mail-wm0-f44.google.com with SMTP id b127so7179863wmf.5 for ; Wed, 28 Mar 2018 18:53:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nexus-software-ie.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=0b+4G/a5mW3q43by8C5zh+B96fxiYPqV7RAWDVw/uZg=; b=lXVN6vVmeoqQJQ3D301wpYSbPdrPfByWuitDHfsejo+2qXpT+69GHs7L00V30MT+YR Eu5hXqpNlKWf28GDWUauvVFEnTlsz2CRV7o/Xm0LHesaHPP5D+ipmhMdXtts1t9l99jH HdRfOzR+ZLTNhzJSJZdzW9rbup96K7+YRScTK0jxSktXhGhhx71I0zTma6/O/YaPngTw 8Q97Inxh2sZcVbo2iwCmaGv6bXmu81Wvo60CInZypivc8VAKA8lMiP4ZRjxSgXRXp7QL jxJw/k+ggODhdz9GMwyxPUcMukwSKeNBeEJrPnrJf7WjgdS+dVZBMvUK0smXgoUPHRSh qgGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0b+4G/a5mW3q43by8C5zh+B96fxiYPqV7RAWDVw/uZg=; b=MMVO6o+CiHSRRBbdAfy/yhmDDVq01WrwvDa09FXa+OtYzwYr52xouFbFSwa2Xv+NSR ltPhnpwn60j7IkA48xh68tHfYddlMUl7dL1SYf5w7jW9k+rQ2I6JBJXVGcBX4+Yi1Mip 61cvCEC+Dccn5yiOLfrNHPuVQDtqQtw5R0EZxo5HnPuDfDX3RvMMqAxgzCYQTF9uMY1B cS544TTiLBcDRv/iT2p4+377Oh3qQ8QB26Pc1mcx99tmBRSaTGNZgQTTvMdCEuWaCtgI gWIeDqCAvAFIY8oRYS7lS9QThJLcB1jg9WXO6UFWiHUqQJl1UjJhywo59lCzCoGzs+nl olgQ== X-Gm-Message-State: AElRT7HM93ZQSAN2L8/0Z6Rs5HlrPkw7fOhG1LSUzFkcnzK4N/WYzdYu l13OWR6zskJpm5YP5KWcqKBFJg== X-Received: by 10.80.144.119 with SMTP id z52mr5363588edz.79.1522288425422; Wed, 28 Mar 2018 18:53:45 -0700 (PDT) Received: from [192.168.192.37] ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id h13sm2907594edi.91.2018.03.28.18.53.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Mar 2018 18:53:44 -0700 (PDT) Subject: Re: [RESEND] rtc: snvs: Fix usage of snvs_rtc_enable To: Trent Piepho , "linux-kernel@vger.kernel.org" , "alexandre.belloni@free-electrons.com" Cc: "shawn.guo@linaro.org" , "stefan@agner.ch" , "bianpan2016@163.com" , "a.zummo@towertech.it" , "stable@vger.kernel.org" , "guy.shapiro@mobi-wize.com" , "Frank.Li@freescale.com" , "linux-rtc@vger.kernel.org" References: <1522264445-2398-1-git-send-email-pure.logic@nexus-software.ie> <1522282337.10662.268.camel@impinj.com> From: Bryan O'Donoghue Message-ID: Date: Thu, 29 Mar 2018 02:53:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <1522282337.10662.268.camel@impinj.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 29/03/18 01:12, Trent Piepho wrote: > I sent a patch a couple weeks ago that addressed a similar issue, see > https://patchwork.ozlabs.org/patch/887090/ > > Does this also fix the problem you see? It breaks the endless loop that happens later on in the RTC read path. This patch though is about fixing the bug with not handling the enable of the snvs_rtc_enable() correctly, which is why it should be applied. The right flow is to handle the error on snvs_rtc_enable() as soon as it happens as opposed wait for read() to -ETIMEDOUT. > I think what you've done will prevent the driver from loading if the > clock is not working, but if the clock does not tick properly after > loading, there are still points (snvs_rtc_read_time for one) that will > lock up in the kernel. I'll dig out your patch and give it a review. --- bod