From: Marc Kleine-Budde <mkl@pengutronix.de>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, linux-can@vger.kernel.org,
kernel@pengutronix.de, Thomas Gleixner <tglx@linutronix.de>,
Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [PATCH 16/26] can: c_can: Cleanup c_can_inval_msg_object()
Date: Fri, 25 Apr 2014 00:00:19 +0200 [thread overview]
Message-ID: <1398376829-6771-17-git-send-email-mkl@pengutronix.de> (raw)
In-Reply-To: <1398376829-6771-1-git-send-email-mkl@pengutronix.de>
From: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
drivers/net/can/c_can/c_can.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c
index e4eaa84..bf3aed4 100644
--- a/drivers/net/can/c_can/c_can.c
+++ b/drivers/net/can/c_can/c_can.c
@@ -129,6 +129,9 @@
/* Receive setup of message objects */
#define IF_COMM_RCV_SETUP (IF_COMM_MASK | IF_COMM_ARB | IF_COMM_CONTROL)
+/* Invalidation of message objects */
+#define IF_COMM_INVAL (IF_COMM_ARB | IF_COMM_CONTROL)
+
/* IFx arbitration */
#define IF_ARB_MSGVAL BIT(15)
#define IF_ARB_MSGXTD BIT(14)
@@ -447,7 +450,7 @@ static void c_can_setup_receive_object(struct net_device *dev, int iface,
c_can_object_put(dev, iface, obj, IF_COMM_RCV_SETUP);
}
-static void c_can_inval_msg_object(struct net_device *dev, int iface, int objno)
+static void c_can_inval_msg_object(struct net_device *dev, int iface, int obj)
{
struct c_can_priv *priv = netdev_priv(dev);
@@ -455,10 +458,7 @@ static void c_can_inval_msg_object(struct net_device *dev, int iface, int objno)
priv->write_reg(priv, C_CAN_IFACE(ARB2_REG, iface), 0);
priv->write_reg(priv, C_CAN_IFACE(MSGCTRL_REG, iface), 0);
- c_can_object_put(dev, iface, objno, IF_COMM_ARB | IF_COMM_CONTROL);
-
- netdev_dbg(dev, "obj no:%d, msgval:0x%08x\n", objno,
- c_can_read_reg32(priv, C_CAN_MSGVAL1_REG));
+ c_can_object_put(dev, iface, obj, IF_COMM_INVAL);
}
static inline int c_can_is_next_tx_obj_busy(struct c_can_priv *priv, int objno)
--
1.9.0.279.gdc9e3eb
next prev parent reply other threads:[~2014-04-24 22:00 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-24 22:00 pull-request: can 2014-04-24 Marc Kleine-Budde
2014-04-24 22:00 ` [PATCH 01/26] can: c_can_pci: Set the type of the IP core Marc Kleine-Budde
2014-04-24 22:00 ` [PATCH 02/26] can: c_can: Fix startup logic Marc Kleine-Budde
2014-04-29 7:29 ` Yegor Yefremov
2014-05-02 12:37 ` Marc Kleine-Budde
2014-04-24 22:00 ` [PATCH 03/26] can: c_can: Make bus off interrupt disable logic work Marc Kleine-Budde
2014-04-24 22:00 ` [PATCH 04/26] can: c_can: Do not access skb after net_receive_skb() Marc Kleine-Budde
2014-04-24 22:00 ` [PATCH 05/26] can: c_can: Handle state change correctly Marc Kleine-Budde
2014-04-24 22:00 ` [PATCH 06/26] can: c_can: Fix berr reporting Marc Kleine-Budde
2014-04-24 22:00 ` [PATCH 07/26] can: c_can: Always update error stats Marc Kleine-Budde
2014-04-24 22:00 ` [PATCH 08/26] can: c_can: Simplify buffer reenabling Marc Kleine-Budde
2014-04-24 22:00 ` [PATCH 09/26] can: c_can: Avoid status register update for D_CAN Marc Kleine-Budde
2014-04-24 22:00 ` [PATCH 10/26] can: c_can: Get rid of pointless interrupts Marc Kleine-Budde
2014-04-24 22:00 ` [PATCH 11/26] can: c_can: Disable rx split as workaround Marc Kleine-Budde
2014-04-24 22:00 ` [PATCH 12/26] can: c_can: Work around C_CAN RX wreckage Marc Kleine-Budde
2014-04-24 22:00 ` [PATCH 13/26] can: c_can: Cleanup irq enable/disable Marc Kleine-Budde
2014-04-24 22:00 ` [PATCH 14/26] can: c_can: Cleanup c_can_read_msg_object() Marc Kleine-Budde
2014-04-24 22:00 ` [PATCH 15/26] can: c_can: Cleanup setup of receive buffers Marc Kleine-Budde
2014-04-24 22:00 ` Marc Kleine-Budde [this message]
2014-04-24 22:00 ` [PATCH 17/26] can: c_can: Cleanup c_can_msg_obj_put/get() Marc Kleine-Budde
2014-04-24 22:00 ` [PATCH 18/26] can: c_can: Cleanup c_can_write_msg_object() Marc Kleine-Budde
2014-04-24 22:00 ` [PATCH 19/26] can: c_can: Use proper u32 variables in c_can_write_msg_object() Marc Kleine-Budde
2014-04-24 22:00 ` [PATCH 20/26] can: c_can: Remove tx locking Marc Kleine-Budde
2014-04-24 22:00 ` [PATCH 21/26] can: c_can: Speed up tx buffer invalidation Marc Kleine-Budde
2014-04-24 22:00 ` [PATCH 22/26] can: c_can: use proper type for 'instance' Marc Kleine-Budde
2014-04-24 22:00 ` [PATCH 23/26] can: c_can_pci: enable PCI bus master only for MSI Marc Kleine-Budde
2014-04-24 22:00 ` [PATCH 24/26] can: sja1000_isa: add locking for indirect register access mode Marc Kleine-Budde
2014-04-24 22:00 ` [PATCH 25/26] can: fix return value from can_get_bittiming() Marc Kleine-Budde
2014-04-24 22:00 ` [PATCH 26/26] can: slcan: Fix spinlock variant Marc Kleine-Budde
2014-04-24 22:04 ` pull-request: can 2014-04-24 Marc Kleine-Budde
2014-04-26 16:31 ` David Miller
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=1398376829-6771-17-git-send-email-mkl@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=davem@davemloft.net \
--cc=kernel@pengutronix.de \
--cc=linux-can@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tglx@linutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).