Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1414457ybe; Thu, 5 Sep 2019 15:20:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqzWwJeOEXBUbbYhfLOHecTA7YmbECd1QwgwwbBuwYaoZG0XM9BqNsVRLAcGT/2Bmq3s4OZJ X-Received: by 2002:a17:90a:356d:: with SMTP id q100mr6457948pjb.53.1567722008696; Thu, 05 Sep 2019 15:20:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567722008; cv=none; d=google.com; s=arc-20160816; b=auxPAkoEGa/0clm4enl9dLU0l1B8LCTbIT/YUeIFSzQKkOHL3mNJsc9Q6EujAMYLlT id4Iljl9Sb67lzn8vJT7LkMYv3hHnlWgIZR2s4fGO+bUFhloIG+8QmXwouqeVXvgAmbx HSdj7zLCOXWNZlobUntA35zZpFRmdY4B9GtpJDzajPAuEki17cQCR6ZZWfQsrt7eClst XZud2ijCuinUy4h94D4q5zmMbH/zJxSBNKsOX5fjh5n/Q0XOJPCgjfrWXpl9vEDshWEA iHlcWTdGTTyeoKaY4QIgeyQcjkyNLCuHHtTZRdiFa1Kkso0x6sl1hqUUNdw+kc51+9hq RDUQ== 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=1TIctN3jtdvc6TPalt4MWd3w4xnMDuHjNFEMV8P0zMk=; b=QPGuUhqQuHSLykFuBJcMq2qg8AFmWRJwCLP1NjPzPqU5TQlIBbKB3fcjBwGdWRAN/8 mg+Q18cyJ+wBXCFChc5FLVuIY7LGoKni7u5eR5QKmHqdvT7gezaEVHgUrnUwcgWl7eTL TgyAD5f0dLu8KVRTd31m5dt0amuU7qrQ/taZAmCp78283CmrXlhINHrMzAbCPT7BJjO7 PVyDtenn4JSrOETB6XPJkb1sffF7253FyEafImDVq1Tv37LlikSHP/OQgP98hv5s/ax+ qtWYqYUGAu79BTXDx7B3F8hPVGQsddoDDRV2HReNXnx1ONjOFAOWxLhAOQGUUuG4NqCB yNFQ== 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 f9si2828276pgf.176.2019.09.05.15.19.49; Thu, 05 Sep 2019 15:20:08 -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 S2391250AbfIESVF (ORCPT + 99 others); Thu, 5 Sep 2019 14:21:05 -0400 Received: from sauhun.de ([88.99.104.3]:59730 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730926AbfIESVC (ORCPT ); Thu, 5 Sep 2019 14:21:02 -0400 Received: from localhost (p54B335F6.dip0.t-ipconnect.de [84.179.53.246]) by pokefinder.org (Postfix) with ESMTPSA id 73A6F2C00C0; Thu, 5 Sep 2019 20:20:59 +0200 (CEST) Date: Thu, 5 Sep 2019 20:20:59 +0200 From: Wolfram Sang To: Lee Jones Cc: alokc@codeaurora.org, agross@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, bjorn.andersson@linaro.org, vkoul@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [RESEND v3 1/1] i2c: qcom-geni: Provide an option to disable DMA processing Message-ID: <20190905182058.GA5281@kunai> References: <20190905144122.5689-1-lee.jones@linaro.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zhXaljGHf11kAtnf" Content-Disposition: inline In-Reply-To: <20190905144122.5689-1-lee.jones@linaro.org> 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 --zhXaljGHf11kAtnf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 05, 2019 at 03:41:22PM +0100, Lee Jones wrote: > We have a production-level laptop (Lenovo Yoga C630) which is exhibiting > a rather horrific bug. When I2C HID devices are being scanned for at > boot-time the QCom Geni based I2C (Serial Engine) attempts to use DMA. > When it does, the laptop reboots and the user never sees the OS. $subject is still wrong. And a paragraph that you are/were debugging the root cause but to no avail so DMA gets disabled for now would be good for a hotfix this late in the cycle. >=20 > Signed-off-by: Lee Jones > --- > drivers/i2c/busses/i2c-qcom-geni.c | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) >=20 > diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-= qcom-geni.c > index a89bfce5388e..17abf60c94ae 100644 > --- a/drivers/i2c/busses/i2c-qcom-geni.c > +++ b/drivers/i2c/busses/i2c-qcom-geni.c > @@ -355,11 +355,13 @@ static int geni_i2c_rx_one_msg(struct geni_i2c_dev = *gi2c, struct i2c_msg *msg, > { > dma_addr_t rx_dma; > unsigned long time_left; > - void *dma_buf; > + void *dma_buf =3D NULL; > struct geni_se *se =3D &gi2c->se; > size_t len =3D msg->len; > =20 > - dma_buf =3D i2c_get_dma_safe_msg_buf(msg, 32); > + if (!of_machine_is_compatible("lenovo,yoga-c630")) > + dma_buf =3D i2c_get_dma_safe_msg_buf(msg, 32); > + > if (dma_buf) > geni_se_select_mode(se, GENI_SE_DMA); > else > @@ -394,11 +396,13 @@ static int geni_i2c_tx_one_msg(struct geni_i2c_dev = *gi2c, struct i2c_msg *msg, > { > dma_addr_t tx_dma; > unsigned long time_left; > - void *dma_buf; > + void *dma_buf =3D NULL; > struct geni_se *se =3D &gi2c->se; > size_t len =3D msg->len; > =20 > - dma_buf =3D i2c_get_dma_safe_msg_buf(msg, 32); > + if (!of_machine_is_compatible("lenovo,yoga-c630")) > + dma_buf =3D i2c_get_dma_safe_msg_buf(msg, 32); > + > if (dma_buf) > geni_se_select_mode(se, GENI_SE_DMA); > else > --=20 > 2.17.1 >=20 --zhXaljGHf11kAtnf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl1xUgcACgkQFA3kzBSg KbYXzA/+LjS2mPdsksvarWH8VQNQdqsoNEIn5YCxhi5qXxi0KAdEp5Z3N04ZEOk3 goSeO/4g2HCWM9myuZ9wunwRgK8ucOiSfkatKYPEKHg8buN9f3QfSlLfENIhtwKc yeNOJyakRyJnfzXpFVRmrrTWjJoLTS0ZhNgHFMPbR8cXu1sAW2tnvzYfUVLUBGP4 w+3ldwl6wzRUvg49x4K4yGmsTJ5NQFPKJnTUUYUJ0IgetTRyGD/3HoEY6k3W12oo QenoRNh3MEd/HjG+sQYH1w01/86Oz5L0N5OFQoQtFwCR5fITMP4sjy30dB1/cvyr UzXWWfzzRV5Gbz1EodWPOS2dzPj4e8f5TRzKJa86GkPYcm6Fys4ifFWTCD6yxuTe A3o2ruGJwaIZ6ALxUAzLfSjbyb3ZKsCJ+JLUeMP7hnTrOI7umYHQKxiAXkC4gL1E CzAg3CA0BefETQ0vutbyGemZfq8ThJpFktldowciXZrxo55JoPIW2PNMn9YuLE+h 7yxkc0NQB2Y1Pzzqyk8dcQrwDOS+4sEiGD2QEgAe7FdMqv181MA7XIH8C05Y/uqV gwBYxFuKCc7/dUfKBzHDi5EpWlwGIY7wGTvNzzOwn25+wmUOEidSa3SPuM6ozEnR Kc9uu4xw4ZB/1cne5zTkL0BDa14aJt4/lkcWV4TWrs7E6voy05k= =Z3pm -----END PGP SIGNATURE----- --zhXaljGHf11kAtnf--