From mboxrd@z Thu Jan 1 00:00:00 1970 From: Akshay Bhat Subject: Re: [PATCH v2 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver Date: Thu, 16 Mar 2017 13:06:55 -0400 Message-ID: <54d9a104-8ed1-4bb3-666e-042d3781dbfb@timesys.com> References: <1484680922-25813-1-git-send-email-akshay.bhat@timesys.com> <1484680922-25813-2-git-send-email-akshay.bhat@timesys.com> <234d9e75-0083-b8b4-c781-add653fdb550@grandegger.com> <3dbf8748-9d04-0f21-0e95-448d7a72e7d5@timesys.com> <41439729-42d0-d883-2801-2d3607f2aeab@grandegger.com> <3dba0948-ffcb-8e80-fb32-62bb0aca6627@grandegger.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <3dba0948-ffcb-8e80-fb32-62bb0aca6627-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Wolfgang Grandegger , Akshay Bhat Cc: mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org, linux-can-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-can.vger.kernel.org Hi Wolfgang, On 03/15/2017 05:42 AM, Wolfgang Grandegger wrote: > Hello Akshay, > ..snip.. >> >> So here is my plan: >> - Have the bus error interrupt always enabled >> - If berr-reporting off, then have the isr checks/reports state changes > > Error state change messages should always be there. These are the > important one. > >> - if berr-reporting on, then have the isr checks/reports bus errors >> and state changes (Does it make sense packing the error message, if >> the ISR finds both bus and state changes?) > > If berr-reporting is off, simply do not create an error message for bus > errors, and only if the state changed. If it's "on" create an additional > bus error message. > > http://lxr.free-electrons.com/source/drivers/net/can/flexcan.c#L334 > > I have fixed the driver to handle the error reporting. Also thanks for your tip for generating bus-off by setting the host device at a different CAN bit rate! Below are logs with the updated driver. Let me know if you have any concerns, if not I will submit the v4 patch. berr-reporting on case: http://pastebin.com/qDRLERmW berr-reporting off case: http://pastebin.com/fUn3j7qU Thanks, Akshay -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752311AbdCPRHm (ORCPT ); Thu, 16 Mar 2017 13:07:42 -0400 Received: from mail-qk0-f169.google.com ([209.85.220.169]:34321 "EHLO mail-qk0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751855AbdCPRHi (ORCPT ); Thu, 16 Mar 2017 13:07:38 -0400 Subject: Re: [PATCH v2 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver To: Wolfgang Grandegger , Akshay Bhat References: <1484680922-25813-1-git-send-email-akshay.bhat@timesys.com> <1484680922-25813-2-git-send-email-akshay.bhat@timesys.com> <234d9e75-0083-b8b4-c781-add653fdb550@grandegger.com> <3dbf8748-9d04-0f21-0e95-448d7a72e7d5@timesys.com> <41439729-42d0-d883-2801-2d3607f2aeab@grandegger.com> <3dba0948-ffcb-8e80-fb32-62bb0aca6627@grandegger.com> Cc: mkl@pengutronix.de, linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org From: Akshay Bhat Message-ID: <54d9a104-8ed1-4bb3-666e-042d3781dbfb@timesys.com> Date: Thu, 16 Mar 2017 13:06:55 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <3dba0948-ffcb-8e80-fb32-62bb0aca6627@grandegger.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Wolfgang, On 03/15/2017 05:42 AM, Wolfgang Grandegger wrote: > Hello Akshay, > ..snip.. >> >> So here is my plan: >> - Have the bus error interrupt always enabled >> - If berr-reporting off, then have the isr checks/reports state changes > > Error state change messages should always be there. These are the > important one. > >> - if berr-reporting on, then have the isr checks/reports bus errors >> and state changes (Does it make sense packing the error message, if >> the ISR finds both bus and state changes?) > > If berr-reporting is off, simply do not create an error message for bus > errors, and only if the state changed. If it's "on" create an additional > bus error message. > > http://lxr.free-electrons.com/source/drivers/net/can/flexcan.c#L334 > > I have fixed the driver to handle the error reporting. Also thanks for your tip for generating bus-off by setting the host device at a different CAN bit rate! Below are logs with the updated driver. Let me know if you have any concerns, if not I will submit the v4 patch. berr-reporting on case: http://pastebin.com/qDRLERmW berr-reporting off case: http://pastebin.com/fUn3j7qU Thanks, Akshay