Received: by 10.223.176.5 with SMTP id f5csp1989743wra; Thu, 8 Feb 2018 06:48:13 -0800 (PST) X-Google-Smtp-Source: AH8x225eAGURJnrqrFuBu+EAq5UYoc8FOlXSHpwUgwaZ3GUW1+8NYPQZ1PRV+Vo2qd2HNNNVC4kb X-Received: by 10.99.141.200 with SMTP id z191mr705656pgd.418.1518101293406; Thu, 08 Feb 2018 06:48:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518101293; cv=none; d=google.com; s=arc-20160816; b=nPYXs1KaATw/qxvYTBHxIfHXxW9Zh+egUuHtn7E9/bn4kIctwvqv47nHxsHlAoXz2+ uG7i5kRPLhKuh97CmNHlJg8zJA2P8nErUf4sn6keYzSYv/rkB2MKnlJ0/NDm0RjN/Lbz kFCAlEANooosfiQ8zKaIUss0EzFw1UwHMe+WgfG76/PfLtm1/KdcB02IxVK7ucI4fkl8 25puJUV40wtUS4AuHFNl60dfZJbZ1ss1aokYGj6mOFS2mNzOY2F/OWo9oc+tQcqLlJO4 jvBV1BPOIiNnq911S3yzGpeVjYqrkC1pkZmRX2zrW3A+KI7Nh6JfFz8wXbUzmtIRNPW5 sQjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=8kT53w3ythhSBjT0UxM6rTv8C//i8FtZxXc+v1eIAsE=; b=0PtytP2F6DyPr58kU0nuxgASfUl8ygJRKbioQrV736BxbMJzK8uZ2WKJbrrDLeimoq yvu+AGfRfOU+v6SRxFHOdW3Qn5ZDN/vm8Gn4lwIgp+z5Hkln19r6fk//xZD3maYZzXGC lr2puReEFshpPd3l6R4ALFVQzH2Z0w9MZ1QUcQlk+rfUQBa3EUtzXr6rjt+TH82UDrgG nRue6y1pb2GWOqiXViLGMeKc1SoMks55PQ9oD8RElcqQqdwDiQQxddjG6Yp3+LkkoZ99 ATzzM+m5hXnyakkPRA/QRuLBFvTUQhNuycM60XAr1fw9eJz+pOotv4jf2tAd6tYIuOlt /o1w== 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 b89si63698pfk.163.2018.02.08.06.47.59; Thu, 08 Feb 2018 06:48:13 -0800 (PST) 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 S1752159AbeBHOrM (ORCPT + 99 others); Thu, 8 Feb 2018 09:47:12 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:37205 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751544AbeBHOrK (ORCPT ); Thu, 8 Feb 2018 09:47:10 -0500 Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=bjornoya.blackshift.org) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ejnTe-0004wz-TI; Thu, 08 Feb 2018 15:47:07 +0100 Received: from [IPv6:2001:470:7eea:1122:dc84:99c1:396c:9792] (unknown [IPv6:2001:470:7eea:1122:dc84:99c1:396c:9792]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (Client CN "mkl@blackshift.org", Issuer "StartCom Class 1 Client CA" (not verified)) (Authenticated sender: mkl@blackshift.org) by smtp.blackshift.org (Postfix) with ESMTPSA id 859BF2D9366; Thu, 8 Feb 2018 14:47:05 +0000 (UTC) Subject: Re: [PATCH v2 1/2] net, can, ifi: fix "write buffer full" error To: Heiko Schocher , linux-can@vger.kernel.org Cc: Markus Marb , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Marek Vasut , Wolfgang Grandegger References: <20180208064748.17985-1-hs@denx.de> From: Marc Kleine-Budde Message-ID: <59322f7d-4207-a5a4-89b5-dff1634e4183@pengutronix.de> Date: Thu, 8 Feb 2018 15:46:27 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180208064748.17985-1-hs@denx.de> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="IgjQZx4c8IMbn8rd8W8kueTZeypshVxNq" X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --IgjQZx4c8IMbn8rd8W8kueTZeypshVxNq Content-Type: multipart/mixed; boundary="MIZtyo0ovlOiyelZbmtVEAFouL0Lq30pA"; protected-headers="v1" From: Marc Kleine-Budde To: Heiko Schocher , linux-can@vger.kernel.org Cc: Markus Marb , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Marek Vasut , Wolfgang Grandegger Message-ID: <59322f7d-4207-a5a4-89b5-dff1634e4183@pengutronix.de> Subject: Re: [PATCH v2 1/2] net, can, ifi: fix "write buffer full" error References: <20180208064748.17985-1-hs@denx.de> In-Reply-To: <20180208064748.17985-1-hs@denx.de> --MIZtyo0ovlOiyelZbmtVEAFouL0Lq30pA Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: quoted-printable On 02/08/2018 07:47 AM, Heiko Schocher wrote: > the driver reads in the ISR first the IRQpending register, > and clears after that in a write *all* bits in it. >=20 > It could happen that the isr register raise bits between > this 2 register accesses, which leads in lost bits ... >=20 > In case it clears "TX message sent successfully", the driver > never sends any Tx data, and buffers to userspace run over. >=20 > Fixed this: > clear only the bits in the IRQpending register, the > driver had read. >=20 > Signed-off-by: Heiko Schocher > Reviewed-by: Marek Vasut Applied both to linux-can. Tnx, Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | --MIZtyo0ovlOiyelZbmtVEAFouL0Lq30pA-- --IgjQZx4c8IMbn8rd8W8kueTZeypshVxNq Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEENrCndlB/VnAEWuH5k9IU1zQoZfEFAlp8YsMACgkQk9IU1zQo ZfHnQQgApJa10e389jp6bHp3E6cB6bCLIqQ5LDunEeJ0Nlk2OCObXdZEtdcHFJvG zNe33zZP+wr+x+oSXplEkfhMrzuLjc4BmVNba58ZYKDdIa+NtuG4lvNbGKPBgE/i 9KWphlslpj+Ew8sBGBQWQjJCNqM1cZYk9EM4O1ila42kK99TmZQr7l7Tn2FqdWdR Mt8y81Dc7Y/AVe+zqxmhdWfFBcvnn00x2wTmoLVQ0kFA40qL2doKokh3m9NcUyGV BTLAy1KYGuoPk16hy/pgwuJFN2v2KwdV9CUdWX6wkZWkRGmpHySZyE9Umt0GIsJ/ uX2cDaNM1a6cooTBVk0NBq02uV5tiA== =3kXY -----END PGP SIGNATURE----- --IgjQZx4c8IMbn8rd8W8kueTZeypshVxNq--