From: Wolfgang Grandegger <wg@grandegger.com>
To: Wolfgang Grandegger <wg@grandegger.com>
Cc: linux-can@vger.kernel.org, socketcan-users@lists.berlios.de,
Reuben Dowle <Reuben.Dowle@navico.com>
Subject: Re: [RFC PATCH 03/14] can: flexcan: only for bus error reporting enable berr interrupt
Date: Wed, 07 Dec 2011 16:08:18 +0100 [thread overview]
Message-ID: <4EDF8162.6040907@grandegger.com> (raw)
In-Reply-To: <1323269728-17491-4-git-send-email-wg@grandegger.com>
On 12/07/2011 03:55 PM, Wolfgang Grandegger wrote:
> So far, the bus error (berr) interrupt source is always enabled,
> even if bus error reporting is not requested (via ctrlmode flag
> CAN_CTRLMODE_BERR_REPORTING). This is not necessay, at least on
> the Flexcan of the i.MX28 SOC and it avoids flooding with with
> bus error interrupts. State changes interrupts do still arrive
> as documented. The function flexcan_has_and_handle_berr() has
> been removed and error state changes and bus errors are now
> packed into one error message by a common poll function, like
> for other CAN controllers.
>
> CC: Reuben Dowle <Reuben.Dowle@navico.com>
> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
... and here the subject and commit message should be:
[RFC PATCH 01/14] can: flexcan: fix irq flooding by clearing all interrupt sources
As pointed out by Reuben Dowle, the TWRN_INT, RWRN_INT, BOFF_INT
interrupt sources need to be cleared as well to avoid interrupt
flooding, at least for the Flexcan on i.MX28 SOCs.
CC: Reuben Dowle <Reuben.Dowle@navico.com>
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Sorry for the noise.
Wolfgang.
> ---
> drivers/net/can/flexcan.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
> index 0ce914a..095b74b 100644
> --- a/drivers/net/can/flexcan.c
> +++ b/drivers/net/can/flexcan.c
> @@ -705,7 +705,10 @@ static int flexcan_chip_start(struct net_device *dev)
> reg_ctrl = flexcan_read(®s->ctrl);
> reg_ctrl &= ~FLEXCAN_CTRL_TSYN;
> reg_ctrl |= FLEXCAN_CTRL_BOFF_REC | FLEXCAN_CTRL_LBUF |
> - FLEXCAN_CTRL_ERR_STATE | FLEXCAN_CTRL_ERR_MSK;
> + FLEXCAN_CTRL_ERR_STATE;
> +
> + if (priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING)
> + reg_ctrl |= FLEXCAN_CTRL_ERR_MSK;
>
> /* save for later use */
> priv->reg_ctrl_default = reg_ctrl;
next prev parent reply other threads:[~2011-12-07 15:08 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-07 14:55 [RFC PATCH 00/14] consolidate and unify state change and bus-off handling Wolfgang Grandegger
2011-12-07 14:55 ` [RFC PATCH 01/14] can: flexcan: fix irq flooding by clearing all interrupt sources Wolfgang Grandegger
[not found] ` <1323269728-17491-2-git-send-email-wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
2011-12-07 15:04 ` Wolfgang Grandegger
2011-12-07 14:55 ` [RFC PATCH 02/14] can: replace the dev_dbg/info/err/... with the new netdev_xxx macros Wolfgang Grandegger
2011-12-07 14:55 ` [RFC PATCH 03/14] can: flexcan: only for bus error reporting enable berr interrupt Wolfgang Grandegger
2011-12-07 15:08 ` Wolfgang Grandegger [this message]
2011-12-07 14:55 ` [RFC PATCH 04/14] can: bfin_can/ti_hecc/mscan: add missing do_get_berr_counter callback Wolfgang Grandegger
2011-12-07 14:55 ` [RFC PATCH 05/14] can: add error counters to the data fields of any CAN error message Wolfgang Grandegger
2011-12-07 14:55 ` [RFC PATCH 06/14] can: dev: consolidate error state change handling Wolfgang Grandegger
2011-12-07 14:55 ` [RFC PATCH 07/14] can: flexcan: consolidate error state handling Wolfgang Grandegger
2011-12-07 14:55 ` [RFC PATCH 08/14] can: flexcan: consolidate bus-off handling Wolfgang Grandegger
2011-12-07 14:55 ` [RFC PATCH 09/14] can: sja1000: consolidate error state handling Wolfgang Grandegger
2011-12-07 14:55 ` [RFC PATCH 10/14] can: sja1000: consolidate bus-off handling Wolfgang Grandegger
2011-12-07 14:55 ` [RFC PATCH 11/14] can: mscan: consolidate error state handling Wolfgang Grandegger
2011-12-07 14:55 ` [RFC PATCH 12/14] can: mscan: consolidate bus-off handling Wolfgang Grandegger
2011-12-07 14:55 ` [RFC PATCH 13/14] can: cc770: consolidate error state handling Wolfgang Grandegger
2011-12-07 14:55 ` [RFC PATCH 14/14] can: cc770: consolidate bus-off handling Wolfgang Grandegger
2011-12-07 20:30 ` [RFC PATCH 00/14] consolidate and unify state change and " Wolfgang Grandegger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EDF8162.6040907@grandegger.com \
--to=wg@grandegger.com \
--cc=Reuben.Dowle@navico.com \
--cc=linux-can@vger.kernel.org \
--cc=socketcan-users@lists.berlios.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.