Received: by 10.223.176.5 with SMTP id f5csp2421469wra; Thu, 8 Feb 2018 13:54:26 -0800 (PST) X-Google-Smtp-Source: AH8x227OU/cjX2q8YFxQ5VETa/LeR2SEQNrqihNwvSbPdEHD1c/eLzz/LgZDPMSVZeqwUqqTeMsP X-Received: by 2002:a17:902:8e86:: with SMTP id bg6-v6mr421329plb.402.1518126866516; Thu, 08 Feb 2018 13:54:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518126866; cv=none; d=google.com; s=arc-20160816; b=K7yzy2rWu05sWbSuM0C3oNiB3iHJ+SNSrGrcNx7jflv5N3/VlpaynLyw40LfUoe10u PR/WTQo2qK06W8nBPEK5Ds9dQMl0t3RlOpf0lwRNB8ve3nuzCrUsdqjXELyKQkTIrGNG 4Re93Twxq7BpK9Qi528bdfFmCEQqMDYPHY4NTFmx/+RPTVXZo0BTKdzTJfJ9e7o9B2Vq zBg2yS+oXcZZDQ9lAQmJPv/5jDa7l5LzjC+z/AtRS2eWisu0FEAQKaPbXTIu/obq5WJg W0Q6FKM/6vuAM3yLRTGdVfa2kA7bT+ZnYdOV/8xhXHsLN/6ASAeVHzHh/Pre6z7m3Utq 9LMQ== 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:arc-authentication-results; bh=kJl3kPUd4GJAUEQjZuNP8q3imQjuNPK+r0oL7ePid84=; b=bsmXf7KIuUGpw2KfAcYg47NaH54a+TNG8T2T/2WDfg6bxO+1MV5dlJjEEtwfSJizMB H+8PhqPGBRWJPe/YRL1LDnxO0RAzZcGRZTei0RYRIx7zijcr65M8K38j2hYNIUSAgKkG abdVe0d6qbYX3dnv828buMVbNntv+ZfL9C2XqBSv6H0J7+skBhp3S6ZXV3qvbz+k0cR8 1m2BbF6Y3Yb6C2bY59gHOj4ObCGLbZJ6PMoGu014iXN4lzlMe13tS2/l+HclZFHkYMEg +AmzR7M0bMCA/GnX2xIblfwrlPXB8OsPCnzAQ2IrPR+RA6KYxSQ3xwWiAftrYPvV3e1n m5AA== 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 j15si476688pgt.173.2018.02.08.13.54.10; Thu, 08 Feb 2018 13:54:26 -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 S1752356AbeBHVxF (ORCPT + 99 others); Thu, 8 Feb 2018 16:53:05 -0500 Received: from mail-out.m-online.net ([212.18.0.10]:54096 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752126AbeBHVxD (ORCPT ); Thu, 8 Feb 2018 16:53:03 -0500 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3zcsPn6Wmcz1qsWH; Thu, 8 Feb 2018 22:53:01 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 3zcsPn5xRNz1qqkn; Thu, 8 Feb 2018 22:53:01 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id XsxptsY8NvIe; Thu, 8 Feb 2018 22:53:00 +0100 (CET) X-Auth-Info: WnoivQky53usfjDs8rxL7JSMQCNkuoeOI1RjffCpOqE= Received: from [IPv6:::1] (unknown [195.140.253.167]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Thu, 8 Feb 2018 22:53:00 +0100 (CET) Subject: Re: [PATCH v2 1/2] net, can, ifi: fix "write buffer full" error To: Marc Kleine-Budde , Heiko Schocher , linux-can@vger.kernel.org Cc: Markus Marb , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Wolfgang Grandegger References: <20180208064748.17985-1-hs@denx.de> <59322f7d-4207-a5a4-89b5-dff1634e4183@pengutronix.de> From: Marek Vasut Message-ID: Date: Thu, 8 Feb 2018 22:44:58 +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: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/08/2018 10:33 PM, Marc Kleine-Budde wrote: > On 02/08/2018 08:22 PM, Marek Vasut wrote: >> On 02/08/2018 03:46 PM, Marc Kleine-Budde wrote: >>> 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. >>>> >>>> It could happen that the isr register raise bits between >>>> this 2 register accesses, which leads in lost bits ... >>>> >>>> In case it clears "TX message sent successfully", the driver >>>> never sends any Tx data, and buffers to userspace run over. >>>> >>>> Fixed this: >>>> clear only the bits in the IRQpending register, the >>>> driver had read. >>>> >>>> Signed-off-by: Heiko Schocher >>>> Reviewed-by: Marek Vasut >>> >>> Applied both to linux-can. >> >> Can you also apply them to stable, so they get into 4.9.x etc ? > > I've already added stable on Cc, so they will be picked up by the stable > maintainers. Thanks! -- Best regards, Marek Vasut