Received: by 10.213.65.68 with SMTP id h4csp862603imn; Wed, 14 Mar 2018 02:18:52 -0700 (PDT) X-Google-Smtp-Source: AG47ELsB0mzoRvVu5kAkmGfhPDAr2+Rcy4Mdf+eJWMW8L3Q2Swa7ZjRoZd2Bskh/jtCC+NvqAZn6 X-Received: by 2002:a17:902:82c2:: with SMTP id u2-v6mr3313817plz.401.1521019132754; Wed, 14 Mar 2018 02:18:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521019132; cv=none; d=google.com; s=arc-20160816; b=w4suNiPwI90/QKx+ZYUXW1IkBsORDXH+wPQpOSvbNDOFXR5HscLRn0Tao8mqo695wq gixsEbVGZpLGkR/tEpmmZnzegXKWUCoNdSOfGiJYQGJflQzjIJTrSVYODH6eP0PNc6ax Ajq886BFe5iOYw9ExifDoye6iAircH5KDIGCroagHPanbUJ+w+e1Mm4vfbk4lt3zZhmZ Qnu+9a8rWDxZDnQupuaQrZyXvw1x6BTzrDyrPsYqXUlRPCB/zUcKCc9T3M4zr8qVRV+d oB/pLv8nOikyJ8vHDddUTP1fTwevhfD1o5Kb2/AXzvvBeV2ssBfxPA3lr6WtO27ru+Y7 lVDw== 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=s6dQzcYEmRWvEcUAjbVLcJ57JtgMehtFB6AQtVw/KVg=; b=Ae3718K49FJBFq2TfKd0++Fxnp9RgFBbZI+C2RU1Pdvw9er38sk/YRsaF0/RN00vEf rZMoJB4DaCuN63PUrf8qIUrUdPENAF+8fe6Mj0YI5Q3+8GUWQIM6ZUBczQha1u5/uU1L CISXnT8hcOD8iEnDhQO22KALpByBWk8c4pKFtjh/10VnbpSIui8vId3Mm/4rAAi/MSiv wly33SgLfKK216tYkZi6c56TmlXdUQH1hI4BkIIcZYm1G8SDLJ+TPugT6NekjEQqmnR+ tZXBA0sk8+HQ30SDxqDODUEm9dQhqxjqLJFZUZ1tEBDNPqWJ/RLBdXfcPWB3repHWUSP RGtw== 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 33-v6si1664970plu.426.2018.03.14.02.18.38; Wed, 14 Mar 2018 02:18:52 -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 S1751408AbeCNJRo (ORCPT + 99 others); Wed, 14 Mar 2018 05:17:44 -0400 Received: from mailproxy03.manitu.net ([217.11.48.67]:57278 "EHLO mailproxy03.manitu.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750737AbeCNJRn (ORCPT ); Wed, 14 Mar 2018 05:17:43 -0400 X-Greylist: delayed 365 seconds by postgrey-1.27 at vger.kernel.org; Wed, 14 Mar 2018 05:17:42 EDT Received: from [192.168.178.20] (aftr-185-17-207-68.dynamic.mnet-online.de [185.17.207.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: wg@grandegger.com) by mailproxy03.manitu.net (Postfix) with ESMTPSA id 18A78D40089; Wed, 14 Mar 2018 10:17:41 +0100 (CET) Subject: Re: [PATCH v2 1/1] can: ucan: add driver for Theobroma Systems UCAN devices To: Jakob Unterwurzacher Cc: Martin Elshuber , Philipp Tomsich , Marc Kleine-Budde , linux-can@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180313173520.21257-1-jakob.unterwurzacher@theobroma-systems.com> <20180313173520.21257-2-jakob.unterwurzacher@theobroma-systems.com> <03024ab7-5386-3bcf-76f2-ef2e0e9e7a78@theobroma-systems.com> From: Wolfgang Grandegger Message-ID: <68564c40-396b-9081-8534-67fe96a6fb3f@grandegger.com> Date: Wed, 14 Mar 2018 10:17:40 +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: <03024ab7-5386-3bcf-76f2-ef2e0e9e7a78@theobroma-systems.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 14.03.2018 um 10:14 schrieb Jakob Unterwurzacher: > On 14.03.18 10:11, Wolfgang Grandegger wrote: >>> +    /* handle error frames */ >>> +    canid = le32_to_cpu(m->msg.can_msg.id); >>> +    if (canid & CAN_ERR_FLAG) { >>> +        ucan_handle_error_frame(up, m, canid); >>> +        /* drop frame if berr-reporting is off */ >>> +        if (!(up->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING)) >>> +            return; >>> +    } >> >> You still do not generate error messages for state changes, IIUC. > > The hardware generates error frames on state changes - is that what you > mean? > > In our testing, the state shows up (and updates) correctly in > >     ip -details -statistics link show can0 Counting the state changes is one thing but you should also generate error messages for them. Wolfgang.