Received: by 10.223.176.5 with SMTP id f5csp2331196wra; Thu, 8 Feb 2018 12:10:44 -0800 (PST) X-Google-Smtp-Source: AH8x226nl9Pq5F8/ocleD/Sd9HHEPKeLfbUYT0KPR4UVhiXmSs+VXxYF9iZaTmt3gugIwPbbdRmo X-Received: by 2002:a17:902:e2:: with SMTP id a89-v6mr206080pla.98.1518120644015; Thu, 08 Feb 2018 12:10:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518120643; cv=none; d=google.com; s=arc-20160816; b=oFA9dmHH3o8P7LJRrUDb5t14Pe3fRflHrQ9gESLj7HT5Qyzy9iEjJQ2P+KC+KaFhS8 C9U2yIId5BPJQnW7P20uj5nVplw87POkpfMDeduYz3TiTI5ki4ZeHOKAcE1vxU713ajg nwf0EGnP8QoIXc8kX7mHvkzvtKquPp2DYDkMIBtJIcAEAO24akndObni6+RV1vTACMrJ ZolUS+OR7mrzV9h8In5e6sSHVyK2tQKEAfshnpgidI01IB1MnjgIJNPpbWpXJ+WqM5OI Z2GAimUa9hZM+9WC7v2PIJ+qcQYvRGEeT+XNBDFD7RdVTmGfb6dFhD3rK0GF3yzsnIz7 LEOw== 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=ugF2YsB92i1xuurekao/h3RLaXUfy4X9NMWftQXgGLM=; b=KxXkrJ/WiZVn4HhzNq/Stw/je2Ift4vrHe5OP+sC2rZy8nqJTUJTpyTtAHH8VlzoNv XN6CK2aLTsdprdfvTlg/qlA41jFZOcdoA0aCwG2sEmLvBLUkiHM1MmfGvjbiSsd4u7t+ jx327knpB13YdR94qixhEipca6grIDEJNKz9lrdYhCBPqB8UCt0Hdk7mH7ilYmLbtUZS FoeeNEgZ4iNCpPZdvlcnuyNA9eVPNy/tt1C1lmHcK/aNW57tsDmrf3gIxA7Lj4TvEr7D mSwXGfTKBs3HXDxcKDrVFbkNdWYtAlbhembj5eDCS5nsip0F27hHVC6LQpkkPmrOwA+o MCmQ== 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 d4-v6si400490plo.502.2018.02.08.12.10.27; Thu, 08 Feb 2018 12:10:43 -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 S1752210AbeBHUJn (ORCPT + 99 others); Thu, 8 Feb 2018 15:09:43 -0500 Received: from mail-out.m-online.net ([212.18.0.9]:49856 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751786AbeBHUJl (ORCPT ); Thu, 8 Feb 2018 15:09:41 -0500 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3zcq6V5W1Lz1qwQK; Thu, 8 Feb 2018 21:09:38 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 3zcq6V4rxmz1qrVG; Thu, 8 Feb 2018 21:09:38 +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 ooZGuWPshmOh; Thu, 8 Feb 2018 21:09:36 +0100 (CET) X-Auth-Info: o2gjdkrS2hdGA8safKrxHmSS27Xq8fbwNJIR/H7sS/w= 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 21:09:35 +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 20:22:54 +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: <59322f7d-4207-a5a4-89b5-dff1634e4183@pengutronix.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ? Thanks! -- Best regards, Marek Vasut