Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1007002ybl; Wed, 14 Aug 2019 09:16:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzZRx024qIgw7D1NckGg7vxnCAVeKLJ67YR1Jgep07AsbkahpGyfWZvndRArFwNuTP4aj+n X-Received: by 2002:a17:90a:21c1:: with SMTP id q59mr525375pjc.6.1565799370776; Wed, 14 Aug 2019 09:16:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565799370; cv=none; d=google.com; s=arc-20160816; b=wYuWNenZRM+oSCXAP4TacO8Ld+QXwRhAO5QrZ80S04yEZv6c6aTTsB3AUg3qsHIh4s yMJnu3iaGYSieRYLiOxMIcVemga87L9NJdCZZm9Pcgu6Nqv2z0Gn7obVMlqiQAtP+rxm FzhrxzweYg8AddAsRJJl4Ux5aoskVCMtNH/jR4NSUfrP0w2F2JrOd1qD9H2JJRbYD7UB +bbx0dnNJ5iV0o0aAlXel2vaX79zR26bWv6ZwHZYhO8lp1xSPuIYRl3Zz0RWmCrHW8qV Ue1HJ9v/6BuFW3RCY0FsrvmLN010f/Ap/9mLCDQ9nSAzQ8+bxcQBERpIPOZcleTnJFb7 Qn+Q== 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; bh=XxOHIlbSoAQw47cLQmtIEIwDKlC/ZhvDRyo2oeRC3QQ=; b=rBMDQ/a/GyZTGptCVyIMMFJiTCWBIilIB+kTe+Urv2gePwISWI/vUBGlLtN9qtxjYl m0/OCnKReJeSU5yVMTVsUZWlgMO3JzEcQxPR7jJ1fbyTvrEKSdSK5NhXmw9ju00hwnKv wsgXnAcr0U2+RFm6N56geftnvrhRDGZaoHY5w7t79e95zbw/OsV0Jh0wCD/hsepJdJbc F/KQg4HYlkXSKSbwj1hkLmZ43tgoC5cvDSDaNvgmhMlzpWeW+MvE6Elp2+zZENyj/b3h TNG8Rm+i35NmMovF3PKh8hzsEspEsWwKx2jKFtHozCDDQC1/bw4woZe4aRJq+5CerblF QIRw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b2si133605pjz.29.2019.08.14.09.15.54; Wed, 14 Aug 2019 09:16:10 -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; 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 S1728219AbfHNQPS (ORCPT + 99 others); Wed, 14 Aug 2019 12:15:18 -0400 Received: from sauhun.de ([88.99.104.3]:50502 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725828AbfHNQPS (ORCPT ); Wed, 14 Aug 2019 12:15:18 -0400 Received: from localhost (p54B33326.dip0.t-ipconnect.de [84.179.51.38]) by pokefinder.org (Postfix) with ESMTPSA id B927A2C311C; Wed, 14 Aug 2019 18:15:15 +0200 (CEST) Date: Wed, 14 Aug 2019 18:15:15 +0200 From: Wolfram Sang To: lingyxu , Jean Delvare Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Wladislav Wiebe , Krzysztof Adamski Subject: Re: [PATCH] i801_smbus: clear SMBALERT status bit and disable SMBALERT interrupt Message-ID: <20190814161515.GB5816@kunai> References: <1565577634-18264-1-git-send-email-lingyan.xu@nokia-sbell.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gatW/ieO32f1wygP" Content-Disposition: inline In-Reply-To: <1565577634-18264-1-git-send-email-lingyan.xu@nokia-sbell.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --gatW/ieO32f1wygP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 12, 2019 at 10:40:34AM +0800, lingyxu wrote: > From: Lingyan Xu >=20 > In current i801 driver, SMBALERT interrupt is allowed > (Slave Command Register bit2 is 0). > But these is no handler for SMBALERT interrupt in i801_isr, > if there is SMBALERT interrupt asserted and deasserted, > i801 will have an irq flood for the related status bit is setted. >=20 > So SMBALERT interrupt handler is needed, and also, SMBALERT interrupt > will be generated from time to time if slave chip have some fault. > So disable SMBALERT interrupt is also needed. >=20 > About the solution, > please see http://www.farnell.com/datasheets/1581967.pdf > Page632 P640 for more. >=20 > Signed-off-by: Lingyan Xu Jean, this seems important if it fixes an interrupt flood. Can you review, please? > --- > drivers/i2c/busses/i2c-i801.c | 7 ++++++- > 1 files changed, 6 insertions(+), 1 deletions(-) >=20 > diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c > index f295693..033bafe 100644 > --- a/drivers/i2c/busses/i2c-i801.c > +++ b/drivers/i2c/busses/i2c-i801.c > @@ -661,9 +661,11 @@ static irqreturn_t i801_isr(int irq, void *dev_id) > * Clear irq sources and report transaction result. > * ->status must be cleared before the next transaction is started. > */ > + > + outb_p(status, SMBHSTSTS(priv)); > + > status &=3D SMBHSTSTS_INTR | STATUS_ERROR_FLAGS; > if (status) { > - outb_p(status, SMBHSTSTS(priv)); > priv->status =3D status; > wake_up(&priv->waitq); > } > @@ -1810,6 +1812,9 @@ static int i801_probe(struct pci_dev *dev, const st= ruct pci_device_id *id) > /* Default timeout in interrupt mode: 200 ms */ > priv->adapter.timeout =3D HZ / 5; > =20 > + /* Disable SMBALERT interrupt */ > + outb_p(inb_p(SMBSLVCMD(priv)) | BIT(2), SMBSLVCMD(priv)); > + > if (dev->irq =3D=3D IRQ_NOTCONNECTED) > priv->features &=3D ~FEATURE_IRQ; > =20 > --=20 > 1.7.1 >=20 --gatW/ieO32f1wygP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl1UM5MACgkQFA3kzBSg KbbKShAAgHQ//ioHF5ivdpcdozotMV3e/P41u3Se2raGd/cDF/ImlZvHh4hlOyn9 P7jp8dpeq9GfUeHXiE26jaGHZyHP9i80FMU2fO3LIludY4P7MsAV4fcTfJKzMZIC FxUmXkrgmYeqDcDnW13NU1AaSEfTGb+T08ccOF8uhpZT1JC16eXd3ILZ5dlXujmO XzwqGWRcJPof8d/xXbtl6yo3LaX//RqS7hPVz+pFAvOGE0IV2EOGGHeUgWU99UTu +a7mNXOSCa/IFsDIKMF5B9Qg942nRnQZNbleNCPfO3jOAYgvLrv3a0RrK+PIoLl9 AwSHl6ts6HjqibPkqaMFPkXkRCseXmbIgV7QCuv8jHsCE1r4cRPpuzoZTWZI3pur DYqOP5/T9gZgR8GaKkNL74DC1G7/8sRuZX077nHOwCEpDO2ckqjLpVxaOBGsIzVw pjsGIjEMVlcAXD1rZWSCw/m8HEvDbdwAwfpUVx6KJNuUfOnDM6ajPQvos86ybfzR INkMPnDAxAu7HrYEkhGy1w3yzBA8qH6vSl+Za7KcBrdmXRBQVfgtDHBI0Sfmz/Ig tJZGX7LQ9lo3aK4FuMWRKBGKnejbj4EzaGOnxqseDvmcORK+KGqD9MjbhcFjICUq bgjs3RPpIoeTGQ+3F1FmY+woRDb/bOvcAIHYNvxxCgIUAU9GrPI= =/1k8 -----END PGP SIGNATURE----- --gatW/ieO32f1wygP--