netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* pull-request: can 2014-05-19
@ 2014-05-19  7:33 Marc Kleine-Budde
  2014-05-19  7:33 ` [PATCH] can: c_can: remove obsolete STRICT_FRAME_ORDERING Kconfig option Marc Kleine-Budde
  2014-05-21  5:59 ` pull-request: can 2014-05-19 David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Marc Kleine-Budde @ 2014-05-19  7:33 UTC (permalink / raw)
  To: netdev; +Cc: davem, linux-can, kernel

Hello David,

this is a pull request for net/master, for the v3.15 release cycle, with a
single patch.

Oliver Hartkopp's patch removes a Kconfig option in the c_can driver, which was
added as a workaround during the v3.15 development. With all cleanup patches
this workaround is not needed anymore.

regards,
Marc

---

The following changes since commit 4f337ed5c014752b000f593182fdcfa3ecf0d166:

  MAINTAINERS: Pravin Shelar is Open vSwitch maintainer. (2014-05-18 21:04:39 -0400)

are available in the git repository at:

  git://gitorious.org/linux-can/linux-can.git tags/linux-can-fixes-for-3.15-20140519

for you to fetch changes up to 524369e2391f4b422d0efdd11d526a373a11a43a:

  can: c_can: remove obsolete STRICT_FRAME_ORDERING Kconfig option (2014-05-19 09:03:06 +0200)

----------------------------------------------------------------
linux-can-fixes-for-3.15-20140519

----------------------------------------------------------------
Oliver Hartkopp (1):
      can: c_can: remove obsolete STRICT_FRAME_ORDERING Kconfig option

 drivers/net/can/c_can/Kconfig |  7 -------
 drivers/net/can/c_can/c_can.c | 36 ------------------------------------
 2 files changed, 43 deletions(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] can: c_can: remove obsolete STRICT_FRAME_ORDERING Kconfig option
  2014-05-19  7:33 pull-request: can 2014-05-19 Marc Kleine-Budde
@ 2014-05-19  7:33 ` Marc Kleine-Budde
  2014-05-21  5:59 ` pull-request: can 2014-05-19 David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Marc Kleine-Budde @ 2014-05-19  7:33 UTC (permalink / raw)
  To: netdev; +Cc: davem, linux-can, kernel, Oliver Hartkopp, Marc Kleine-Budde

From: Oliver Hartkopp <socketcan@hartkopp.net>

In 2b9aecdce2 ("can: c_can: Disable rx split as workaround") a new Kconfig
option was introduced as a workaround. The tests performed by Alexander Stein
confirmed this option to be obsolete with all the other cleanups and fixes
that had been discussed that time:
http://marc.info/?l=linux-can&m=139746476821294&w=2

Both (author and tester) agreed to remove this Kconfig option again:
http://marc.info/?l=linux-can&m=139883820714229&w=2

As some more cleanups took place since then a simple revert is not possible.
This patch removes the entire option as it would behave when disabled.
Further beautification’s can be done later.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Tested-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/c_can/Kconfig |  7 -------
 drivers/net/can/c_can/c_can.c | 36 ------------------------------------
 2 files changed, 43 deletions(-)

diff --git a/drivers/net/can/c_can/Kconfig b/drivers/net/can/c_can/Kconfig
index 8ab7103..61ffc12 100644
--- a/drivers/net/can/c_can/Kconfig
+++ b/drivers/net/can/c_can/Kconfig
@@ -14,13 +14,6 @@ config CAN_C_CAN_PLATFORM
 	  SPEAr1310 and SPEAr320 evaluation boards & TI (www.ti.com)
 	  boards like am335x, dm814x, dm813x and dm811x.
 
-config CAN_C_CAN_STRICT_FRAME_ORDERING
-	bool "Force a strict RX CAN frame order (may cause frame loss)"
-	---help---
-	  The RX split buffer prevents packet reordering but can cause packet
-	  loss. Only enable this option when you accept to lose CAN frames
-	  in favour of getting the received CAN frames in the correct order.
-
 config CAN_C_CAN_PCI
 	tristate "Generic PCI Bus based C_CAN/D_CAN driver"
 	depends on PCI
diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c
index a2ca820..95e04e2 100644
--- a/drivers/net/can/c_can/c_can.c
+++ b/drivers/net/can/c_can/c_can.c
@@ -732,26 +732,12 @@ static u32 c_can_adjust_pending(u32 pend)
 static inline void c_can_rx_object_get(struct net_device *dev,
 				       struct c_can_priv *priv, u32 obj)
 {
-#ifdef CONFIG_CAN_C_CAN_STRICT_FRAME_ORDERING
-	if (obj < C_CAN_MSG_RX_LOW_LAST)
-		c_can_object_get(dev, IF_RX, obj, IF_COMM_RCV_LOW);
-	else
-#endif
 		c_can_object_get(dev, IF_RX, obj, priv->comm_rcv_high);
 }
 
 static inline void c_can_rx_finalize(struct net_device *dev,
 				     struct c_can_priv *priv, u32 obj)
 {
-#ifdef CONFIG_CAN_C_CAN_STRICT_FRAME_ORDERING
-	if (obj < C_CAN_MSG_RX_LOW_LAST)
-		priv->rxmasked |= BIT(obj - 1);
-	else if (obj == C_CAN_MSG_RX_LOW_LAST) {
-		priv->rxmasked = 0;
-		/* activate all lower message objects */
-		c_can_activate_all_lower_rx_msg_obj(dev, IF_RX);
-	}
-#endif
 	if (priv->type != BOSCH_D_CAN)
 		c_can_object_get(dev, IF_RX, obj, IF_COMM_CLR_NEWDAT);
 }
@@ -799,9 +785,6 @@ static inline u32 c_can_get_pending(struct c_can_priv *priv)
 {
 	u32 pend = priv->read_reg(priv, C_CAN_NEWDAT1_REG);
 
-#ifdef CONFIG_CAN_C_CAN_STRICT_FRAME_ORDERING
-	pend &= ~priv->rxmasked;
-#endif
 	return pend;
 }
 
@@ -814,25 +797,6 @@ static inline u32 c_can_get_pending(struct c_can_priv *priv)
  * has arrived. To work-around this issue, we keep two groups of message
  * objects whose partitioning is defined by C_CAN_MSG_OBJ_RX_SPLIT.
  *
- * If CONFIG_CAN_C_CAN_STRICT_FRAME_ORDERING = y
- *
- * To ensure in-order frame reception we use the following
- * approach while re-activating a message object to receive further
- * frames:
- * - if the current message object number is lower than
- *   C_CAN_MSG_RX_LOW_LAST, do not clear the NEWDAT bit while clearing
- *   the INTPND bit.
- * - if the current message object number is equal to
- *   C_CAN_MSG_RX_LOW_LAST then clear the NEWDAT bit of all lower
- *   receive message objects.
- * - if the current message object number is greater than
- *   C_CAN_MSG_RX_LOW_LAST then clear the NEWDAT bit of
- *   only this message object.
- *
- * This can cause packet loss!
- *
- * If CONFIG_CAN_C_CAN_STRICT_FRAME_ORDERING = n
- *
  * We clear the newdat bit right away.
  *
  * This can result in packet reordering when the readout is slow.
-- 
2.0.0.rc2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: pull-request: can 2014-05-19
  2014-05-19  7:33 pull-request: can 2014-05-19 Marc Kleine-Budde
  2014-05-19  7:33 ` [PATCH] can: c_can: remove obsolete STRICT_FRAME_ORDERING Kconfig option Marc Kleine-Budde
@ 2014-05-21  5:59 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-05-21  5:59 UTC (permalink / raw)
  To: mkl; +Cc: netdev, linux-can, kernel

From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Mon, 19 May 2014 09:33:01 +0200

> this is a pull request for net/master, for the v3.15 release cycle, with a
> single patch.
> 
> Oliver Hartkopp's patch removes a Kconfig option in the c_can driver, which was
> added as a workaround during the v3.15 development. With all cleanup patches
> this workaround is not needed anymore.

Pulled, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-21  5:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-19  7:33 pull-request: can 2014-05-19 Marc Kleine-Budde
2014-05-19  7:33 ` [PATCH] can: c_can: remove obsolete STRICT_FRAME_ORDERING Kconfig option Marc Kleine-Budde
2014-05-21  5:59 ` pull-request: can 2014-05-19 David Miller

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).