Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp237047pxk; Sun, 30 Aug 2020 01:10:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUx7QU5UWV8YgoXl6rG0AzhBdQ+I8/j1Q7fyQqlEP3lE5hE/OHibsEdyDx7kjEvCCdDSfW X-Received: by 2002:a05:6402:17ec:: with SMTP id t12mr3895807edy.328.1598775022317; Sun, 30 Aug 2020 01:10:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598775022; cv=none; d=google.com; s=arc-20160816; b=T/0ur9reBC+OUUgPbev0lJQbUXs63mJh4y3Y0tkKuue1ktnG9W6+WpMJ6xezDFNJo1 /TfG62pnbTwibYw+5dR+dcRwxHUYD1SN8qWvnSMl8grCpt3UqolaO10dV8Z+rK/18iOz lE+cUZW8SEPQG0R3xKJ0ByDcG2tOQdl51yLop1FTfBD14/GmKcERr5YnKL/4ejDBORKF 7RGlfziRDSvA3BH1NQMRghthxa9LeczO6V+5N3eCy2yaraN4TRGbHJtxtrC81u3lPzwg iuli6cC1ooab2DIOf/7Oegw8HrHZVyaoL4Z/+faonKaSQn8YSMzGziqCrxq7cfP2A0z1 P8bQ== 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:mime-version :message-id:date:subject:cc:to:from; bh=PK54iyjz4ao4ux6c9UtnwML+nW8ML9pdqj1dpyBmNQA=; b=sl/rlhz+C4mPqhLsKyp3N8xsekTKMLL8he9fb0Adk5cpzSOTJCRWCZ4hAkunbQnfMb KMfe9/0WVGaIBjmO0He3zgPEZ20kVQJZdMj6Bmp2eJDmypMOXxp29U3sFUNa5+LV9MA7 0LKyM8eKPDZLZqJKLUWrfg7wdDf+/QTe5D9bklMT73zeJhC3PIZj1CGJvTNpmhHeHk/w sSHtJg4hLaW7sRv5OJG54xxHBNmt+fvgwOrh92o+EsF21UoPtFRBWHvetlwJqjMNlq1f z54yGb9OCuviV9OYycRkBkXf9xzRatRql0EGFn3JDLb/GhmWl79M64336+VUJAQPV8WT a5lQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x2si2820087edj.273.2020.08.30.01.09.57; Sun, 30 Aug 2020 01:10:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726493AbgH3IJE (ORCPT + 99 others); Sun, 30 Aug 2020 04:09:04 -0400 Received: from 212.199.177.27.static.012.net.il ([212.199.177.27]:53676 "EHLO herzl.nuvoton.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725934AbgH3IIn (ORCPT ); Sun, 30 Aug 2020 04:08:43 -0400 X-Greylist: delayed 1104 seconds by postgrey-1.27 at vger.kernel.org; Sun, 30 Aug 2020 04:08:36 EDT Received: from taln60.nuvoton.co.il (ntil-fw [212.199.177.25]) by herzl.nuvoton.co.il (8.13.8/8.13.8) with ESMTP id 07U7nJ6X027387; Sun, 30 Aug 2020 10:49:19 +0300 Received: by taln60.nuvoton.co.il (Postfix, from userid 20088) id 9127C639D3; Sun, 30 Aug 2020 10:49:19 +0300 (IDT) From: Tali Perry To: kunyi@google.com, xqiu@google.com, benjaminfair@google.com, avifishman70@gmail.com, joel@jms.id.au, tmaimon77@gmail.com, wsa@the-dreams.de Cc: linux-i2c@vger.kernel.org, openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org, Tali Perry Subject: [PATCH v1] i2c: npcm7xx: bug fix timeout (usec instead of msec) Date: Sun, 30 Aug 2020 10:49:03 +0300 Message-Id: <20200830074903.176871-1-tali.perry1@gmail.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org i2c: npcm7xx: bug fix timeout (usec instead of msec) Signed-off-by: Tali Perry --- drivers/i2c/busses/i2c-npcm7xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-npcm7xx.c b/drivers/i2c/busses/i2c-npcm7xx.c index 75f07138a6fa..c118f93a2610 100644 --- a/drivers/i2c/busses/i2c-npcm7xx.c +++ b/drivers/i2c/busses/i2c-npcm7xx.c @@ -2094,7 +2094,7 @@ static int npcm_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, } /* Adaptive TimeOut: astimated time in usec + 100% margin */ - timeout_usec = (2 * 10000 / bus->bus_freq) * (2 + nread + nwrite); + timeout_usec = (2 * 10000000 / bus->bus_freq) * (2 + nread + nwrite); timeout = max(msecs_to_jiffies(35), usecs_to_jiffies(timeout_usec)); if (nwrite >= 32 * 1024 || nread >= 32 * 1024) { dev_err(bus->dev, "i2c%d buffer too big\n", bus->num); base-commit: d012a7190fc1fd72ed48911e77ca97ba4521bccd -- 2.22.0