Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next-2.6 v8 05/20] CAN : Fix warnings
From: Tomoya MORINAGA @ 2010-12-07 11:04 UTC (permalink / raw)
  To: Wolfgang Grandegger, socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: andrew.chih.howe.khor-ral2JQCrhuEAvxtiuMwx3w,
	qi.wang-ral2JQCrhuEAvxtiuMwx3w,
	margie.foster-ral2JQCrhuEAvxtiuMwx3w,
	yong.y.wang-ral2JQCrhuEAvxtiuMwx3w,
	kok.howg.ewe-ral2JQCrhuEAvxtiuMwx3w,
	joel.clark-ral2JQCrhuEAvxtiuMwx3w

Currently, in case CONFIG_PM is disabled, compiler outputs warnings.
Move six functions which are used only CONFIG_PM is enabled,
into "#ifdef CONFIG_PM" area.

Signed-off-by: Tomoya MORINAGA <tomoya-linux-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>
---
 drivers/net/can/pch_can.c |  146 ++++++++++++++++++++++----------------------
 1 files changed, 73 insertions(+), 73 deletions(-)

diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c
index d646fbc..5fc99cb 100644
--- a/drivers/net/can/pch_can.c
+++ b/drivers/net/can/pch_can.c
@@ -245,23 +245,6 @@ static void pch_can_set_optmode(struct pch_can_priv *priv)
 	iowrite32(reg_val, &priv->regs->opt);
 }
 
-static void pch_can_set_int_custom(struct pch_can_priv *priv)
-{
-	/* Clearing the IE, SIE and EIE bits of Can control register. */
-	pch_can_bit_clear(&priv->regs->cont, PCH_CTRL_IE_SIE_EIE);
-
-	/* Appropriately setting them. */
-	pch_can_bit_set(&priv->regs->cont,
-			((priv->int_enables & PCH_MSK_CTRL_IE_SIE_EIE) << 1));
-}
-
-/* This function retrieves interrupt enabled for the CAN device. */
-static void pch_can_get_int_enables(struct pch_can_priv *priv, u32 *enables)
-{
-	/* Obtaining the status of IE, SIE and EIE interrupt bits. */
-	*enables = ((ioread32(&priv->regs->cont) & PCH_CTRL_IE_SIE_EIE) >> 1);
-}
-
 static void pch_can_set_int_enables(struct pch_can_priv *priv,
 				    enum pch_can_mode interrupt_no)
 {
@@ -355,61 +338,11 @@ static void pch_can_set_tx_all(struct pch_can_priv *priv, u32 set)
 		pch_can_set_rxtx(priv, i, set, PCH_TX_IFREG);
 }
 
-static u32 pch_can_get_rxtx_ir(struct pch_can_priv *priv, u32 buff_num,
-			       enum pch_ifreg dir)
-{
-	u32 ie, enable;
-
-	if (dir)
-		ie = PCH_IF_MCONT_RXIE;
-	else
-		ie = PCH_IF_MCONT_TXIE;
-
-	iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->ifregs[dir].cmask);
-	pch_can_check_if_busy(&priv->regs->ifregs[dir].creq, buff_num);
-
-	if (((ioread32(&priv->regs->ifregs[dir].id2)) & PCH_ID_MSGVAL) &&
-			((ioread32(&priv->regs->ifregs[dir].mcont)) & ie)) {
-		enable = 1;
-	} else {
-		enable = 0;
-	}
-	return enable;
-}
-
 static int pch_can_int_pending(struct pch_can_priv *priv)
 {
 	return ioread32(&priv->regs->intr) & 0xffff;
 }
 
-static void pch_can_set_rx_buffer_link(struct pch_can_priv *priv,
-				       u32 buffer_num, u32 set)
-{
-	iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->ifregs[0].cmask);
-	pch_can_check_if_busy(&priv->regs->ifregs[0].creq, buffer_num);
-	iowrite32(PCH_CMASK_RDWR | PCH_CMASK_CTRL,
-		  &priv->regs->ifregs[0].cmask);
-	if (set == PCH_ENABLE)
-		pch_can_bit_clear(&priv->regs->ifregs[0].mcont,
-				  PCH_IF_MCONT_EOB);
-	else
-		pch_can_bit_set(&priv->regs->ifregs[0].mcont, PCH_IF_MCONT_EOB);
-
-	pch_can_check_if_busy(&priv->regs->ifregs[0].creq, buffer_num);
-}
-
-static void pch_can_get_rx_buffer_link(struct pch_can_priv *priv,
-				       u32 buffer_num, u32 *link)
-{
-	iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->ifregs[0].cmask);
-	pch_can_check_if_busy(&priv->regs->ifregs[0].creq, buffer_num);
-
-	if (ioread32(&priv->regs->ifregs[0].mcont) & PCH_IF_MCONT_EOB)
-		*link = PCH_DISABLE;
-	else
-		*link = PCH_ENABLE;
-}
-
 static void pch_can_clear_buffers(struct pch_can_priv *priv)
 {
 	int i;
@@ -583,12 +516,6 @@ static void pch_can_int_clr(struct pch_can_priv *priv, u32 mask)
 	}
 }
 
-static int pch_can_get_buffer_status(struct pch_can_priv *priv)
-{
-	return (ioread32(&priv->regs->treq1) & 0xffff) |
-	       ((ioread32(&priv->regs->treq2) & 0xffff) << 16);
-}
-
 static void pch_can_reset(struct pch_can_priv *priv)
 {
 	/* write to sw reset register */
@@ -1109,6 +1036,79 @@ static void __devexit pch_can_remove(struct pci_dev *pdev)
 }
 
 #ifdef CONFIG_PM
+static void pch_can_set_int_custom(struct pch_can_priv *priv)
+{
+	/* Clearing the IE, SIE and EIE bits of Can control register. */
+	pch_can_bit_clear(&priv->regs->cont, PCH_CTRL_IE_SIE_EIE);
+
+	/* Appropriately setting them. */
+	pch_can_bit_set(&priv->regs->cont,
+			((priv->int_enables & PCH_MSK_CTRL_IE_SIE_EIE) << 1));
+}
+
+/* This function retrieves interrupt enabled for the CAN device. */
+static void pch_can_get_int_enables(struct pch_can_priv *priv, u32 *enables)
+{
+	/* Obtaining the status of IE, SIE and EIE interrupt bits. */
+	*enables = ((ioread32(&priv->regs->cont) & PCH_CTRL_IE_SIE_EIE) >> 1);
+}
+
+static u32 pch_can_get_rxtx_ir(struct pch_can_priv *priv, u32 buff_num,
+			       enum pch_ifreg dir)
+{
+	u32 ie, enable;
+
+	if (dir)
+		ie = PCH_IF_MCONT_RXIE;
+	else
+		ie = PCH_IF_MCONT_TXIE;
+
+	iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->ifregs[dir].cmask);
+	pch_can_check_if_busy(&priv->regs->ifregs[dir].creq, buff_num);
+
+	if (((ioread32(&priv->regs->ifregs[dir].id2)) & PCH_ID_MSGVAL) &&
+			((ioread32(&priv->regs->ifregs[dir].mcont)) & ie)) {
+		enable = 1;
+	} else {
+		enable = 0;
+	}
+	return enable;
+}
+
+static void pch_can_set_rx_buffer_link(struct pch_can_priv *priv,
+				       u32 buffer_num, u32 set)
+{
+	iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->ifregs[0].cmask);
+	pch_can_check_if_busy(&priv->regs->ifregs[0].creq, buffer_num);
+	iowrite32(PCH_CMASK_RDWR | PCH_CMASK_CTRL,
+		  &priv->regs->ifregs[0].cmask);
+	if (set == PCH_ENABLE)
+		pch_can_bit_clear(&priv->regs->ifregs[0].mcont,
+				  PCH_IF_MCONT_EOB);
+	else
+		pch_can_bit_set(&priv->regs->ifregs[0].mcont, PCH_IF_MCONT_EOB);
+
+	pch_can_check_if_busy(&priv->regs->ifregs[0].creq, buffer_num);
+}
+
+static void pch_can_get_rx_buffer_link(struct pch_can_priv *priv,
+				       u32 buffer_num, u32 *link)
+{
+	iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->ifregs[0].cmask);
+	pch_can_check_if_busy(&priv->regs->ifregs[0].creq, buffer_num);
+
+	if (ioread32(&priv->regs->ifregs[0].mcont) & PCH_IF_MCONT_EOB)
+		*link = PCH_DISABLE;
+	else
+		*link = PCH_ENABLE;
+}
+
+static int pch_can_get_buffer_status(struct pch_can_priv *priv)
+{
+	return (ioread32(&priv->regs->treq1) & 0xffff) |
+	       ((ioread32(&priv->regs->treq2) & 0xffff) << 16);
+}
+
 static int pch_can_suspend(struct pci_dev *pdev, pm_message_t state)
 {
 	int i;			/* Counter variable. */
-- 
1.6.0.6

^ permalink raw reply related

* [PATCH net-next-2.6 v8 04/20] CAN : Improve rx processing.
From: Tomoya MORINAGA @ 2010-12-07 11:04 UTC (permalink / raw)
  To: Wolfgang Grandegger, socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: andrew.chih.howe.khor-ral2JQCrhuEAvxtiuMwx3w,
	qi.wang-ral2JQCrhuEAvxtiuMwx3w,
	margie.foster-ral2JQCrhuEAvxtiuMwx3w,
	yong.y.wang-ral2JQCrhuEAvxtiuMwx3w,
	kok.howg.ewe-ral2JQCrhuEAvxtiuMwx3w,
	joel.clark-ral2JQCrhuEAvxtiuMwx3w

Replace complex "goto" to "do~while".
For easy to read/understand, it divides a rx function into some functions.

Signed-off-by: Tomoya MORINAGA <tomoya-linux-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>
---
 drivers/net/can/pch_can.c |  160 +++++++++++++++++++++++----------------------
 1 files changed, 83 insertions(+), 77 deletions(-)

diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c
index b17ca0c..d646fbc 100644
--- a/drivers/net/can/pch_can.c
+++ b/drivers/net/can/pch_can.c
@@ -698,120 +698,126 @@ static irqreturn_t pch_can_interrupt(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-static int pch_can_rx_normal(struct net_device *ndev, u32 int_stat)
+static void pch_fifo_thresh(struct pch_can_priv *priv, int obj_id)
+{
+	if (obj_id < PCH_FIFO_THRESH) {
+		iowrite32(PCH_CMASK_RDWR | PCH_CMASK_CTRL |
+			  PCH_CMASK_ARB, &priv->regs->ifregs[0].cmask);
+
+		/* Clearing the Dir bit. */
+		pch_can_bit_clear(&priv->regs->ifregs[0].id2, PCH_ID2_DIR);
+
+		/* Clearing NewDat & IntPnd */
+		pch_can_bit_clear(&priv->regs->ifregs[0].mcont,
+				  PCH_IF_MCONT_INTPND);
+		pch_can_check_if_busy(&priv->regs->ifregs[0].creq, obj_id);
+	} else if (obj_id > PCH_FIFO_THRESH) {
+		pch_can_int_clr(priv, obj_id);
+	} else if (obj_id == PCH_FIFO_THRESH) {
+		int cnt;
+		for (cnt = 0; cnt < PCH_FIFO_THRESH; cnt++)
+			pch_can_int_clr(priv, cnt + 1);
+	}
+}
+
+static void pch_can_rx_msg_lost(struct net_device *ndev, int obj_id)
+{
+	struct pch_can_priv *priv = netdev_priv(ndev);
+	struct net_device_stats *stats = &(priv->ndev->stats);
+	struct sk_buff *skb;
+	struct can_frame *cf;
+
+	netdev_dbg(priv->ndev, "Msg Obj is overwritten.\n");
+	pch_can_bit_clear(&priv->regs->ifregs[0].mcont,
+			  PCH_IF_MCONT_MSGLOST);
+	iowrite32(PCH_CMASK_RDWR | PCH_CMASK_CTRL,
+		  &priv->regs->ifregs[0].cmask);
+	pch_can_check_if_busy(&priv->regs->ifregs[0].creq, obj_id);
+
+	skb = alloc_can_err_skb(ndev, &cf);
+	if (!skb)
+		return;
+
+	cf->can_id |= CAN_ERR_CRTL;
+	cf->data[1] = CAN_ERR_CRTL_RX_OVERFLOW;
+	stats->rx_over_errors++;
+	stats->rx_errors++;
+
+	netif_receive_skb(skb);
+}
+
+static int pch_can_rx_normal(struct net_device *ndev, u32 obj_num, int quota)
 {
 	u32 reg;
 	canid_t id;
-	u32 ide;
-	u32 rtr;
-	int i, k;
 	int rcv_pkts = 0;
 	struct sk_buff *skb;
 	struct can_frame *cf;
 	struct pch_can_priv *priv = netdev_priv(ndev);
 	struct net_device_stats *stats = &(priv->ndev->stats);
+	int i;
+	u32 id2;
 	u16 data_reg;
 
-	/* Reading the messsage object from the Message RAM */
-	iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->ifregs[0].cmask);
-	pch_can_check_if_busy(&priv->regs->ifregs[0].creq, int_stat);
+	do {
+		/* Reading the messsage object from the Message RAM */
+		iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->ifregs[0].cmask);
+		pch_can_check_if_busy(&priv->regs->ifregs[0].creq, obj_num);
 
-	/* Reading the MCONT register. */
-	reg = ioread32(&priv->regs->ifregs[0].mcont);
-	reg &= 0xffff;
+		/* Reading the MCONT register. */
+		reg = ioread32(&priv->regs->ifregs[0].mcont);
+
+		if (reg & PCH_IF_MCONT_EOB)
+			break;
 
-	for (k = int_stat; !(reg & PCH_IF_MCONT_EOB); k++) {
 		/* If MsgLost bit set. */
 		if (reg & PCH_IF_MCONT_MSGLOST) {
-			dev_err(&priv->ndev->dev, "Msg Obj is overwritten.\n");
-			pch_can_bit_clear(&priv->regs->ifregs[0].mcont,
-					  PCH_IF_MCONT_MSGLOST);
-			iowrite32(PCH_CMASK_RDWR | PCH_CMASK_CTRL,
-				  &priv->regs->ifregs[0].cmask);
-			pch_can_check_if_busy(&priv->regs->ifregs[0].creq, k);
-
-			skb = alloc_can_err_skb(ndev, &cf);
-			if (!skb)
-				return -ENOMEM;
-
-			priv->can.can_stats.error_passive++;
-			priv->can.state = CAN_STATE_ERROR_PASSIVE;
-			cf->can_id |= CAN_ERR_CRTL;
-			cf->data[1] |= CAN_ERR_CRTL_RX_OVERFLOW;
-			cf->data[2] |= CAN_ERR_PROT_OVERLOAD;
-			stats->rx_packets++;
-			stats->rx_bytes += cf->can_dlc;
-
-			netif_receive_skb(skb);
+			pch_can_rx_msg_lost(ndev, obj_num);
 			rcv_pkts++;
-			goto RX_NEXT;
+			quota--;
+			obj_num++;
+			continue;
+		} else if (!(reg & PCH_IF_MCONT_NEWDAT)) {
+			obj_num++;
+			continue;
 		}
-		if (!(reg & PCH_IF_MCONT_NEWDAT))
-			goto RX_NEXT;
 
 		skb = alloc_can_skb(priv->ndev, &cf);
 		if (!skb)
 			return -ENOMEM;
 
 		/* Get Received data */
-		ide = ((ioread32(&priv->regs->ifregs[0].id2)) & PCH_ID2_XTD) >>
-									     14;
-		if (ide) {
+		id2 = ioread32(&priv->regs->ifregs[0].id2);
+		if (id2 & PCH_ID2_XTD) {
 			id = (ioread32(&priv->regs->ifregs[0].id1) & 0xffff);
-			id |= (((ioread32(&priv->regs->ifregs[0].id2)) &
-					    0x1fff) << 16);
-			cf->can_id = (id & CAN_EFF_MASK) | CAN_EFF_FLAG;
+			id |= (((id2) & 0x1fff) << 16);
+			cf->can_id = id | CAN_EFF_FLAG;
 		} else {
-			id = (((ioread32(&priv->regs->ifregs[0].id2)) &
-						     (CAN_SFF_MASK << 2)) >> 2);
-			cf->can_id = (id & CAN_SFF_MASK);
+			id = (id2 >> 2) & CAN_SFF_MASK;
+			cf->can_id = id;
 		}
 
-		rtr = (ioread32(&priv->regs->ifregs[0].id2) &  PCH_ID2_DIR);
-		if (rtr) {
-			cf->can_dlc = 0;
+		if (id2 & PCH_ID2_DIR)
 			cf->can_id |= CAN_RTR_FLAG;
-		} else {
-			cf->can_dlc =
-			      ((ioread32(&priv->regs->ifregs[0].mcont)) & 0x0f);
-		}
+
+		cf->can_dlc = get_can_dlc((ioread32(&priv->regs->
+						    ifregs[0].mcont)) & 0xF);
 
 		for (i = 0; i < cf->can_dlc; i += 2) {
 			data_reg = ioread16(&priv->regs->ifregs[0].data[i / 2]);
-			cf->data[i] = data_reg & 0xff;
+			cf->data[i] = data_reg;
 			cf->data[i + 1] = data_reg >> 8;
 		}
 
 		netif_receive_skb(skb);
 		rcv_pkts++;
 		stats->rx_packets++;
+		quota--;
 		stats->rx_bytes += cf->can_dlc;
 
-		if (k < PCH_FIFO_THRESH) {
-			iowrite32(PCH_CMASK_RDWR | PCH_CMASK_CTRL |
-				  PCH_CMASK_ARB, &priv->regs->ifregs[0].cmask);
-
-			/* Clearing the Dir bit. */
-			pch_can_bit_clear(&priv->regs->ifregs[0].id2,
-					  PCH_ID2_DIR);
-
-			/* Clearing NewDat & IntPnd */
-			pch_can_bit_clear(&priv->regs->ifregs[0].mcont,
-					  PCH_IF_MCONT_INTPND);
-			pch_can_check_if_busy(&priv->regs->ifregs[0].creq, k);
-		} else if (k > PCH_FIFO_THRESH) {
-			pch_can_int_clr(priv, k);
-		} else if (k == PCH_FIFO_THRESH) {
-			int cnt;
-			for (cnt = 0; cnt < PCH_FIFO_THRESH; cnt++)
-				pch_can_int_clr(priv, cnt+1);
-		}
-RX_NEXT:
-		/* Reading the messsage object from the Message RAM */
-		iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->ifregs[0].cmask);
-		pch_can_check_if_busy(&priv->regs->ifregs[0].creq, k);
-		reg = ioread32(&priv->regs->ifregs[0].mcont);
-	}
+		pch_fifo_thresh(priv, obj_num);
+		obj_num++;
+	} while (quota > 0);
 
 	return rcv_pkts;
 }
@@ -869,7 +875,7 @@ static int pch_can_rx_poll(struct napi_struct *napi, int quota)
 		goto end;
 
 	if ((int_stat >= PCH_RX_OBJ_START) && (int_stat <= PCH_RX_OBJ_END)) {
-		rcv_pkts += pch_can_rx_normal(ndev, int_stat);
+		rcv_pkts += pch_can_rx_normal(ndev, int_stat, quota);
 		quota -= rcv_pkts;
 		if (quota < 0)
 			goto end;
-- 
1.6.0.6

^ permalink raw reply related

* [PATCH net-next-2.6 v8 03/20] CAN : Fix endianness issue.
From: Tomoya MORINAGA @ 2010-12-07 11:03 UTC (permalink / raw)
  To: Wolfgang Grandegger, socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: andrew.chih.howe.khor-ral2JQCrhuEAvxtiuMwx3w,
	qi.wang-ral2JQCrhuEAvxtiuMwx3w,
	margie.foster-ral2JQCrhuEAvxtiuMwx3w,
	yong.y.wang-ral2JQCrhuEAvxtiuMwx3w,
	kok.howg.ewe-ral2JQCrhuEAvxtiuMwx3w,
	joel.clark-ral2JQCrhuEAvxtiuMwx3w

there is endianness issue both Tx and Rx.
Currently, data is set like below.
Register:
MSB--LSB
x x D0 D1
x x D2 D3
x x D4 D5
x x D6 D7

But Data to be sent must be set like below.
Register:
MSB--LSB
x x D1 D0
x x D3 D2
x x D5 D4
x x D7 D6  (x means reserved area.)

Signed-off-by: Tomoya MORINAGA <tomoya-linux-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>
---
 drivers/net/can/pch_can.c |   47 +++++++++++++++++++-------------------------
 1 files changed, 20 insertions(+), 27 deletions(-)

diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c
index 0b6d4f4..b17ca0c 100644
--- a/drivers/net/can/pch_can.c
+++ b/drivers/net/can/pch_can.c
@@ -138,10 +138,7 @@ struct pch_can_if_regs {
 	u32 id1;
 	u32 id2;
 	u32 mcont;
-	u32 dataa1;
-	u32 dataa2;
-	u32 datab1;
-	u32 datab2;
+	u32 data[4];
 	u32 rsv[13];
 };
 
@@ -424,10 +421,10 @@ static void pch_can_clear_buffers(struct pch_can_priv *priv)
 		iowrite32(0x0, &priv->regs->ifregs[0].id1);
 		iowrite32(0x0, &priv->regs->ifregs[0].id2);
 		iowrite32(0x0, &priv->regs->ifregs[0].mcont);
-		iowrite32(0x0, &priv->regs->ifregs[0].dataa1);
-		iowrite32(0x0, &priv->regs->ifregs[0].dataa2);
-		iowrite32(0x0, &priv->regs->ifregs[0].datab1);
-		iowrite32(0x0, &priv->regs->ifregs[0].datab2);
+		iowrite32(0x0, &priv->regs->ifregs[0].data[0]);
+		iowrite32(0x0, &priv->regs->ifregs[0].data[1]);
+		iowrite32(0x0, &priv->regs->ifregs[0].data[2]);
+		iowrite32(0x0, &priv->regs->ifregs[0].data[3]);
 		iowrite32(PCH_CMASK_RDWR | PCH_CMASK_MASK |
 			  PCH_CMASK_ARB | PCH_CMASK_CTRL,
 			  &priv->regs->ifregs[0].cmask);
@@ -441,10 +438,10 @@ static void pch_can_clear_buffers(struct pch_can_priv *priv)
 		iowrite32(0x0, &priv->regs->ifregs[1].id1);
 		iowrite32(0x0, &priv->regs->ifregs[1].id2);
 		iowrite32(0x0, &priv->regs->ifregs[1].mcont);
-		iowrite32(0x0, &priv->regs->ifregs[1].dataa1);
-		iowrite32(0x0, &priv->regs->ifregs[1].dataa2);
-		iowrite32(0x0, &priv->regs->ifregs[1].datab1);
-		iowrite32(0x0, &priv->regs->ifregs[1].datab2);
+		iowrite32(0x0, &priv->regs->ifregs[1].data[0]);
+		iowrite32(0x0, &priv->regs->ifregs[1].data[1]);
+		iowrite32(0x0, &priv->regs->ifregs[1].data[2]);
+		iowrite32(0x0, &priv->regs->ifregs[1].data[3]);
 		iowrite32(PCH_CMASK_RDWR | PCH_CMASK_MASK |
 			  PCH_CMASK_ARB | PCH_CMASK_CTRL,
 			  &priv->regs->ifregs[1].cmask);
@@ -707,12 +704,13 @@ static int pch_can_rx_normal(struct net_device *ndev, u32 int_stat)
 	canid_t id;
 	u32 ide;
 	u32 rtr;
-	int i, j, k;
+	int i, k;
 	int rcv_pkts = 0;
 	struct sk_buff *skb;
 	struct can_frame *cf;
 	struct pch_can_priv *priv = netdev_priv(ndev);
 	struct net_device_stats *stats = &(priv->ndev->stats);
+	u16 data_reg;
 
 	/* Reading the messsage object from the Message RAM */
 	iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->ifregs[0].cmask);
@@ -778,12 +776,10 @@ static int pch_can_rx_normal(struct net_device *ndev, u32 int_stat)
 			      ((ioread32(&priv->regs->ifregs[0].mcont)) & 0x0f);
 		}
 
-		for (i = 0, j = 0; i < cf->can_dlc; j++) {
-			reg = ioread32(&priv->regs->ifregs[0].dataa1 + j*4);
-			cf->data[i++] = cpu_to_le32(reg & 0xff);
-			if (i == cf->can_dlc)
-				break;
-			cf->data[i++] = cpu_to_le32((reg >> 8) & 0xff);
+		for (i = 0; i < cf->can_dlc; i += 2) {
+			data_reg = ioread16(&priv->regs->ifregs[0].data[i / 2]);
+			cf->data[i] = data_reg & 0xff;
+			cf->data[i + 1] = data_reg >> 8;
 		}
 
 		netif_receive_skb(skb);
@@ -1016,10 +1012,10 @@ static int pch_close(struct net_device *ndev)
 
 static netdev_tx_t pch_xmit(struct sk_buff *skb, struct net_device *ndev)
 {
-	int i, j;
 	struct pch_can_priv *priv = netdev_priv(ndev);
 	struct can_frame *cf = (struct can_frame *)skb->data;
 	int tx_buffer_avail = 0;
+	int i;
 
 	if (can_dropped_invalid_skb(ndev, skb))
 		return NETDEV_TX_OK;
@@ -1060,13 +1056,10 @@ static netdev_tx_t pch_xmit(struct sk_buff *skb, struct net_device *ndev)
 	if (cf->can_id & CAN_RTR_FLAG)
 		pch_can_bit_clear(&priv->regs->ifregs[1].id2, PCH_ID2_DIR);
 
-	for (i = 0, j = 0; i < cf->can_dlc; j++) {
-		iowrite32(le32_to_cpu(cf->data[i++]),
-			 (&priv->regs->ifregs[1].dataa1) + j*4);
-		if (i == cf->can_dlc)
-			break;
-		iowrite32(le32_to_cpu(cf->data[i++] << 8),
-			 (&priv->regs->ifregs[1].dataa1) + j*4);
+	/* Copy data to register */
+	for (i = 0; i < cf->can_dlc; i += 2) {
+		iowrite16(cf->data[i] | (cf->data[i + 1] << 8),
+			  &priv->regs->ifregs[1].data[i / 2]);
 	}
 
 	can_put_echo_skb(skb, ndev, tx_buffer_avail - PCH_RX_OBJ_END - 1);
-- 
1.6.0.6

^ permalink raw reply related

* [PATCH net-next-2.6 v8 02/20] CAN : Divide poll function
From: Tomoya MORINAGA @ 2010-12-07 11:03 UTC (permalink / raw)
  To: Wolfgang Grandegger, socketcan-core, netdev, linux-kernel
  Cc: qi.wang, yong.y.wang, andrew.chih.howe.khor, joel.clark,
	kok.howg.ewe, margie.foster

To easy to read/understand, divide poll function into two sub-functions.

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
---
 drivers/net/can/pch_can.c |   71 ++++++++++++++++++++++-----------------------
 1 files changed, 35 insertions(+), 36 deletions(-)

diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c
index f0f1404..0b6d4f4 100644
--- a/drivers/net/can/pch_can.c
+++ b/drivers/net/can/pch_can.c
@@ -819,72 +819,71 @@ RX_NEXT:
 
 	return rcv_pkts;
 }
-static int pch_can_rx_poll(struct napi_struct *napi, int quota)
+
+static void pch_can_tx_complete(struct net_device *ndev, u32 int_stat)
 {
-	struct net_device *ndev = napi->dev;
 	struct pch_can_priv *priv = netdev_priv(ndev);
 	struct net_device_stats *stats = &(priv->ndev->stats);
 	u32 dlc;
+
+	can_get_echo_skb(ndev, int_stat - PCH_RX_OBJ_END - 1);
+	iowrite32(PCH_CMASK_RX_TX_GET | PCH_CMASK_CLRINTPND,
+		  &priv->regs->ifregs[1].cmask);
+	pch_can_check_if_busy(&priv->regs->ifregs[1].creq, int_stat);
+	dlc = get_can_dlc(ioread32(&priv->regs->ifregs[1].mcont) &
+			  PCH_IF_MCONT_DLC);
+	stats->tx_bytes += dlc;
+	stats->tx_packets++;
+	if (int_stat == PCH_TX_OBJ_END)
+		netif_wake_queue(ndev);
+}
+
+static int pch_can_rx_poll(struct napi_struct *napi, int quota)
+{
+	struct net_device *ndev = napi->dev;
+	struct pch_can_priv *priv = netdev_priv(ndev);
 	u32 int_stat;
 	int rcv_pkts = 0;
 	u32 reg_stat;
 
 	int_stat = pch_can_int_pending(priv);
 	if (!int_stat)
-		return 0;
+		goto end;
 
-INT_STAT:
-	if (int_stat == PCH_STATUS_INT) {
+	if ((int_stat == PCH_STATUS_INT) && (quota > 0)) {
 		reg_stat = ioread32(&priv->regs->stat);
 		if (reg_stat & (PCH_BUS_OFF | PCH_LEC_ALL)) {
-			if ((reg_stat & PCH_LEC_ALL) != PCH_LEC_ALL)
+			if (reg_stat & PCH_BUS_OFF ||
+			   (reg_stat & PCH_LEC_ALL) != PCH_LEC_ALL) {
 				pch_can_error(ndev, reg_stat);
+				quota--;
+			}
 		}
 
-		if (reg_stat & PCH_TX_OK) {
-			iowrite32(PCH_CMASK_RX_TX_GET,
-				  &priv->regs->ifregs[1].cmask);
-			pch_can_check_if_busy(&priv->regs->ifregs[1].creq,
-					       ioread32(&priv->regs->intr));
+		if (reg_stat & PCH_TX_OK)
 			pch_can_bit_clear(&priv->regs->stat, PCH_TX_OK);
-		}
 
 		if (reg_stat & PCH_RX_OK)
 			pch_can_bit_clear(&priv->regs->stat, PCH_RX_OK);
 
 		int_stat = pch_can_int_pending(priv);
-		if (int_stat == PCH_STATUS_INT)
-			goto INT_STAT;
 	}
 
-MSG_OBJ:
+	if (quota == 0)
+		goto end;
+
 	if ((int_stat >= PCH_RX_OBJ_START) && (int_stat <= PCH_RX_OBJ_END)) {
-		rcv_pkts = pch_can_rx_normal(ndev, int_stat);
-		if (rcv_pkts < 0)
-			return 0;
+		rcv_pkts += pch_can_rx_normal(ndev, int_stat);
+		quota -= rcv_pkts;
+		if (quota < 0)
+			goto end;
 	} else if ((int_stat >= PCH_TX_OBJ_START) &&
 		   (int_stat <= PCH_TX_OBJ_END)) {
 		/* Handle transmission interrupt */
-		can_get_echo_skb(ndev, int_stat - PCH_RX_OBJ_END - 1);
-		iowrite32(PCH_CMASK_RX_TX_GET | PCH_CMASK_CLRINTPND,
-			  &priv->regs->ifregs[1].cmask);
-		dlc = ioread32(&priv->regs->ifregs[1].mcont) &
-			       PCH_IF_MCONT_DLC;
-		pch_can_check_if_busy(&priv->regs->ifregs[1].creq, int_stat);
-		if (dlc > 8)
-			dlc = 8;
-		stats->tx_bytes += dlc;
-		stats->tx_packets++;
-		if (int_stat == PCH_TX_OBJ_END)
-			netif_wake_queue(ndev);
+		pch_can_tx_complete(ndev, int_stat);
 	}
 
-	int_stat = pch_can_int_pending(priv);
-	if (int_stat == PCH_STATUS_INT)
-		goto INT_STAT;
-	else if (int_stat >= 1 && int_stat <= 32)
-		goto MSG_OBJ;
-
+end:
 	napi_complete(napi);
 	pch_can_set_int_enables(priv, PCH_CAN_ALL);
 
-- 
1.6.0.6

^ permalink raw reply related

* [patch] econet: unlock on -EPERM path
From: Dan Carpenter @ 2010-12-07 11:01 UTC (permalink / raw)
  To: netdev; +Cc: Phil Blundell, Eric Dumazet, David S. Miller, kernel-janitors

We need to do a mutex_unlock() and a put_dev() before returning.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c
index 13992e1..f180371 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -661,8 +661,10 @@ static int ec_dev_ioctl(struct socket *sock, unsigned int cmd, void __user *arg)
 	err = 0;
 	switch (cmd) {
 	case SIOCSIFADDR:
-		if (!capable(CAP_NET_ADMIN))
-			return -EPERM;
+		if (!capable(CAP_NET_ADMIN)) {
+			err = -EPERM;
+			break;
+		}
 
 		edev = dev->ec_ptr;
 		if (edev == NULL) {

^ permalink raw reply related

* Re: [PATCH net-next-2.6 8/17 v2] can: EG20T PCH: Change Copyright and module description
From: Marc Kleine-Budde @ 2010-12-07 11:02 UTC (permalink / raw)
  To: Tomoya MORINAGA
  Cc: andrew.chih.howe.khor-ral2JQCrhuEAvxtiuMwx3w,
	qi.wang-ral2JQCrhuEAvxtiuMwx3w,
	margie.foster-ral2JQCrhuEAvxtiuMwx3w,
	netdev-u79uwXL29TY76Z2rM5mHXA, yong.y.wang-ral2JQCrhuEAvxtiuMwx3w,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
	kok.howg.ewe-ral2JQCrhuEAvxtiuMwx3w,
	joel.clark-ral2JQCrhuEAvxtiuMwx3w, Wolfgang Grandegger
In-Reply-To: <CBA434C33CC34AE6BD224B8563771B6C-c0cKtqp5df7I9507bXv2FdBPR1lH4CV8@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 633 bytes --]

On 12/07/2010 11:56 AM, Tomoya MORINAGA wrote:
> On Tuesday, December 07, 2010 7:38 PM, Marc Kleine-Budde wrote:
>> How do you send mail with thunderbord, then? I suppose you use smtp
>> there, too.
> 
> Yes,
> The same SMTP server is used when thunderbird, too.

Then check your settings, e.g. username, ssmtp, TSL, port, passwd.

cheers, Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

[-- Attachment #2: Type: text/plain, Size: 188 bytes --]

_______________________________________________
Socketcan-core mailing list
Socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org
https://lists.berlios.de/mailman/listinfo/socketcan-core

^ permalink raw reply

* [PATCH net-next-2.6 v8 01/20] CAN : Add flow control processing.
From: Tomoya MORINAGA @ 2010-12-07 11:00 UTC (permalink / raw)
  To: Wolfgang Grandegger, socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: andrew.chih.howe.khor-ral2JQCrhuEAvxtiuMwx3w,
	qi.wang-ral2JQCrhuEAvxtiuMwx3w,
	margie.foster-ral2JQCrhuEAvxtiuMwx3w,
	yong.y.wang-ral2JQCrhuEAvxtiuMwx3w,
	kok.howg.ewe-ral2JQCrhuEAvxtiuMwx3w,
	joel.clark-ral2JQCrhuEAvxtiuMwx3w

Currently, there is no flow control processing.
Thus, Add flow control processing as
when there is no empty of tx buffer,
netif_stop_queue is called.
When there is empty buffer, netif_wake_queue is called.

Signed-off-by: Tomoya MORINAGA <tomoya-linux-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>
---
 drivers/net/can/pch_can.c |   31 ++++++++++++-------------------
 1 files changed, 12 insertions(+), 19 deletions(-)

diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c
index a9b6a65..f0f1404 100644
--- a/drivers/net/can/pch_can.c
+++ b/drivers/net/can/pch_can.c
@@ -102,6 +102,10 @@
 
 #define PCH_FIFO_THRESH		16
 
+/* TxRqst2 show status of MsgObjNo.17~32 */
+#define PCH_TREQ2_TX_MASK	(((1 << PCH_TX_OBJ_NUM) - 1) <<\
+							(PCH_RX_OBJ_END - 16))
+
 enum pch_ifreg {
 	PCH_RX_IFREG,
 	PCH_TX_IFREG,
@@ -871,6 +875,8 @@ MSG_OBJ:
 			dlc = 8;
 		stats->tx_bytes += dlc;
 		stats->tx_packets++;
+		if (int_stat == PCH_TX_OBJ_END)
+			netif_wake_queue(ndev);
 	}
 
 	int_stat = pch_can_int_pending(priv);
@@ -1009,18 +1015,6 @@ static int pch_close(struct net_device *ndev)
 	return 0;
 }
 
-static int pch_get_msg_obj_sts(struct net_device *ndev, u32 obj_id)
-{
-	u32 buffer_status = 0;
-	struct pch_can_priv *priv = netdev_priv(ndev);
-
-	/* Getting the message object status. */
-	buffer_status = (u32) pch_can_get_buffer_status(priv);
-
-	return buffer_status & obj_id;
-}
-
-
 static netdev_tx_t pch_xmit(struct sk_buff *skb, struct net_device *ndev)
 {
 	int i, j;
@@ -1031,17 +1025,16 @@ static netdev_tx_t pch_xmit(struct sk_buff *skb, struct net_device *ndev)
 	if (can_dropped_invalid_skb(ndev, skb))
 		return NETDEV_TX_OK;
 
-	if (priv->tx_obj == PCH_TX_OBJ_END) { /* Point tail Obj */
-		while (pch_get_msg_obj_sts(ndev, (((1 << PCH_TX_OBJ_NUM)-1) <<
-					   PCH_RX_OBJ_NUM)))
-			udelay(500);
+	if (priv->tx_obj == PCH_TX_OBJ_END) {
+		if (ioread32(&priv->regs->treq2) & PCH_TREQ2_TX_MASK)
+			netif_stop_queue(ndev);
 
-		priv->tx_obj = PCH_TX_OBJ_START; /* Point head of Tx Obj ID */
-		tx_buffer_avail = priv->tx_obj; /* Point Tail of Tx Obj */
+		tx_buffer_avail = priv->tx_obj;
+		priv->tx_obj = PCH_TX_OBJ_START;
 	} else {
 		tx_buffer_avail = priv->tx_obj;
+		priv->tx_obj++;
 	}
-	priv->tx_obj++;
 
 	/* Reading the Msg Obj from the Msg RAM to the Interface register. */
 	iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->ifregs[1].cmask);
-- 
1.6.0.6

^ permalink raw reply related

* Re: [PATCH net-next-2.6 8/17 v2] can: EG20T PCH: Change Copyright and module description
From: Tomoya MORINAGA @ 2010-12-07 10:56 UTC (permalink / raw)
  To: Marc Kleine-Budde
  Cc: andrew.chih.howe.khor-ral2JQCrhuEAvxtiuMwx3w,
	qi.wang-ral2JQCrhuEAvxtiuMwx3w,
	margie.foster-ral2JQCrhuEAvxtiuMwx3w,
	netdev-u79uwXL29TY76Z2rM5mHXA, yong.y.wang-ral2JQCrhuEAvxtiuMwx3w,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
	kok.howg.ewe-ral2JQCrhuEAvxtiuMwx3w,
	joel.clark-ral2JQCrhuEAvxtiuMwx3w, Wolfgang Grandegger
In-Reply-To: <4CFE0E8A.8000204@pengutronix.de>

On Tuesday, December 07, 2010 7:38 PM, Marc Kleine-Budde wrote:
> How do you send mail with thunderbord, then? I suppose you use smtp
> there, too.

Yes,
The same SMTP server is used when thunderbird, too.

Thanks,
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
Tomoya Morinaga
OKI SEMICONDUCTOR CO., LTD.

----- Original Message ----- 
From: "Marc Kleine-Budde" <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: "Tomoya MORINAGA" <tomoya-linux-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>
Cc: "Wolfgang Grandegger" <wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>; 
<socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org>; <netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>; 
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>; <qi.wang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>; 
<yong.y.wang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>; <andrew.chih.howe.khor-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>; 
<joel.clark-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>; <kok.howg.ewe-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>; <margie.foster-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Sent: Tuesday, December 07, 2010 7:38 PM
Subject: Re: [PATCH net-next-2.6 8/17 v2] can: EG20T PCH: Change Copyright 
and module description

^ permalink raw reply

* Re: [PATCH net-next-2.6 v7 01/24] CAN : Separate interface register fromwhole of register structure.
From: Tomoya MORINAGA @ 2010-12-07 10:51 UTC (permalink / raw)
  To: Tomoya MORINAGA, Wolfgang Grandegger,
	socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: andrew.chih.howe.khor-ral2JQCrhuEAvxtiuMwx3w,
	qi.wang-ral2JQCrhuEAvxtiuMwx3w,
	margie.foster-ral2JQCrhuEAvxtiuMwx3w,
	yong.y.wang-ral2JQCrhuEAvxtiuMwx3w,
	kok.howg.ewe-ral2JQCrhuEAvxtiuMwx3w,
	joel.clark-ral2JQCrhuEAvxtiuMwx3w
In-Reply-To: <4CFE09C5.4030107@dsn.okisemi.com>

Sorry, the latest kernel tree have already updated.

Please ignore v7 patch.

I will release patches as v8 series.

Thanks,
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
Tomoya Morinaga
OKI SEMICONDUCTOR CO., LTD.

^ permalink raw reply

* Re: NET_NS: unregister_netdevice: waiting for lo to become free (adding ipv6 address to interface)
From: Menil Jean-Philippe @ 2010-12-07 10:40 UTC (permalink / raw)
  To: netdev
  Cc: Michael Leun, Eric W. Biederman, David Lamparter, Greg KH, davem,
	linux-kernel, Alexey Dobriyan, Patrick McHardy
In-Reply-To: <20101206234725.622a2212@xenia.leun.net>

[-- Attachment #1: Type: text/plain, Size: 37426 bytes --]

Le 06/12/2010 23:47, Michael Leun a écrit :
> On Mon, 06 Dec 2010 13:22:00 -0800
> ebiederm@xmission.com (Eric W. Biederman) wrote:
>
>> Menil Jean-Philippe<jean-philippe.menil@univ-nantes.fr>  writes:
>>
>>> Le 24/10/2010 15:15, Michael Leun a écrit :
>>>> On Fri, 22 Oct 2010 19:05:32 +0200
>>>> Michael Leun<lkml20100708@newton.leun.net>   wrote:
>>>>
>>>>> On Fri, 22 Oct 2010 14:48:58 +0200
>>>>> David Lamparter<equinox@diac24.net>   wrote:
>>>>>
>>>>>> On Thu, Oct 21, 2010 at 05:15:32PM +0200, Michael Leun wrote:
>>>>>>> unfortunately the bug described below originally reported in
>>>>>>> 2.6.35-rcX is still there in 2.6.36.
> [...]
>>> curiously, i'm facing a similar problem in 2.6.36.1
>>>
>>> in my container, when i configure ipv6 adress on the interfaces,
>>> everything seems good on the first boot of the host. If i shutdown
>>> my container (lxc), then boot it, i observe the following logs:
>>> Dec  6 17:04:12 suntory.u06.univ-nantes.prive kernel: [  368.192019]
>>> unregister_netdevice: waiting for lo to become free. Usage count = 4
>>> Dec  6 17:04:22 suntory.u06.univ-nantes.prive kernel: [  378.432018]
>>> unregister_netdevice: waiting for lo to become free. Usage count = 4
>>> Dec  6 17:04:32 suntory.u06.univ-nantes.prive kernel: [  388.672015]
>>> unregister_netdevice: waiting for lo to become free. Usage count = 4
>>> Dec  6 17:04:42 suntory.u06.univ-nantes.prive kernel: [  398.912016]
>>> unregister_netdevice: waiting for lo to become free. Usage count = 4
>>> Dec  6 17:04:53 suntory.u06.univ-nantes.prive kernel: [  409.152016]
>>> unregister_netdevice: waiting for lo to become free. Usage count = 4
>>> Dec  6 17:05:03 suntory.u06.univ-nantes.prive kernel: [  419.392018]
>>> unregister_netdevice: waiting for lo to become free. Usage count = 4
>>> Dec  6 17:05:13 suntory.u06.univ-nantes.prive kernel: [  429.632018]
>>> unregister_netdevice: waiting for lo to become free. Usage count = 4
>>> Dec  6 17:05:23 suntory.u06.univ-nantes.prive kernel: [  439.876016]
>>> unregister_netdevice: waiting for lo to become free. Usage count = 4
>>> Dec  6 17:05:34 suntory.u06.univ-nantes.prive kernel: [  450.116015]
>>> unregister_netdevice: waiting for lo to become free. Usage count = 4
>>> Dec  6 17:05:44 suntory.u06.univ-nantes.prive kernel: [  460.356019]
>>> unregister_netdevice: waiting for lo to become free. Usage count = 4
>>> Dec  6 17:05:54 suntory.u06.univ-nantes.prive kernel: [  470.596020]
>>> unregister_netdevice: waiting for lo to become free. Usage count = 4
>>> Dec  6 17:06:04 suntory.u06.univ-nantes.prive kernel: [  480.836019]
>>> unregister_netdevice: waiting for lo to become free. Usage count = 4
>>> Dec  6 17:06:05 suntory.u06.univ-nantes.prive kernel:
>>> [  481.468021] INFO: task lxc-start:3805 blocked for more than 120
>>> seconds.
>>>
>>> Then i must reboot the host.
>>> The same on kernel 2.6.34, but everything is good on a 2.6.32
>>>
>>> Some relvant informations about the kernel:
>>> root@suntory:~# cat /boot/config-2.6.36.1-dsiun-1d | grep -i sysfs
>>> # CONFIG_SYSFS_DEPRECATED_V2 is not set
>>> CONFIG_ACPI_SYSFS_POWER=y
>>> # CONFIG_WIRELESS_EXT_SYSFS is not set
>>> CONFIG_ISCSI_BOOT_SYSFS=m
>>> CONFIG_RTC_INTF_SYSFS=y
>>> CONFIG_SYSFS=y
>>> root@suntory:~# cat /boot/config-2.6.36.1-dsiun-1d | grep -i net_ns
>>> CONFIG_NET_NS=y
>>>
>>> Is there anything in my configuration, i must check in order to get
>>> ipv6 working fully in the container?
>>
>> 2.6.37-rc4 is working here.  There were problems earlier in the
>> earlier rcs. Can you try that?
>>
>> There have been a couple of different reference counting bugs between
>> 2.6.34 and the present, and I haven't tracked them, just noticed they
>> exist.
>
> Can reproduce the following still on 2.6.36.1, but NOT on 2.6.37-rc4 -
> so indeed seems to be fixed!
>
>
> Putting an ipv6 address on a device seems to be the trigger:
>
> OrigNS>  # ip link add type veth
> OrigNS>  # ip link set dev veth0 up
> OrigNS>  # unshare -n /bin/bash
> NewNS>  # echo $$
> <SomePID>
> OrigNS>  # ip link set dev veth1 netns<SomePID>  # this, of course is
> on a different terminal NewNS>  # ip link set dev veth1 up
> NewNS>  # ip -6 addr add dev veth1 fd50:dead:beef::1/64
> NewNS>  # exit
>
> Yields
>
> kernel: unregister_netdevice: waiting for veth1 to become free. Usage
> count = 3
>
>
Hi,

thanks for the info.

Unfortunately, i have another error with a kernel 2.6.37-rc5, already 
related to iov6

Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.803477] 
------------[ cut here ]------------
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.803554] 
WARNING: at net/ipv6/ip6_fib.c:1172 fib6_del+0x3e/0x2ce [ipv6]()
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.803616] 
Hardware name: PowerEdge M605
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.803673] 
Modules linked in: ipt_MASQUERADE iptable_nat nf_nat ipt_REJECT veth 
fuse xt_physdev ip6t_LOG ip6table_filter ip6_tables ipt_LOG xt_multiport 
xt_limit xt_tcpudp xt_state iptable_filter ip_tables x_tables 
nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4 nf_defrag_ipv4 
8021q bridge stp ext2 mbcache dm_round_robin dm_multipath 
nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6 snd_pcm snd_timer snd 
soundcore snd_page_alloc tpm_tis tpm psmouse tpm_bios i2c_nforce2 pcspkr 
shpchp serio_raw pci_hotplug i2c_core button joydev ghes hed evdev 
dcdbas processor thermal_sys xfs exportfs dm_mod btrfs zlib_deflate 
crc32c libcrc32c sg sr_mod cdrom usbhid hid usb_storage ses sd_mod 
enclosure megaraid_sas lpfc ohci_hcd scsi_transport_fc scsi_tgt scsi_mod 
bnx2 ehci_hcd [last unloaded: scsi_wait_scan]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.806871] 
Pid: 5, comm: kworker/u:0 Not tainted 2.6.37-rc5-dsiun-1a #2
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.806931] 
Call Trace:
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.806991] 
[<ffffffff81040f56>] ? warn_slowpath_common+0x78/0x8c
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.807057] 
[<ffffffffa02df719>] ? fib6_del+0x3e/0x2ce [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.807118] 
[<ffffffff812d69c8>] ? schedule+0x79d/0x846
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.807182] 
[<ffffffffa02df9ed>] ? fib6_clean_node+0x44/0x96 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.807247] 
[<ffffffffa02db04b>] ? fib6_ifdown+0x0/0x21 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.807311] 
[<ffffffffa02dee56>] ? fib6_walk_continue+0xaa/0x12d [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.807377] 
[<ffffffffa02def2a>] ? fib6_walk+0x51/0xa4 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.807441] 
[<ffffffffa02df006>] ? fib6_clean_all+0x89/0xb7 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.807507] 
[<ffffffffa02df9a9>] ? fib6_clean_node+0x0/0x96 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.807572] 
[<ffffffffa02db04b>] ? fib6_ifdown+0x0/0x21 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.807636] 
[<ffffffffa02de76f>] ? rt6_ifdown+0x26/0x9f [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.807700] 
[<ffffffffa02d811a>] ? addrconf_ifdown+0x5b/0x441 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.807763] 
[<ffffffff812d81ba>] ? _raw_write_lock_bh+0xe/0x26
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.807827] 
[<ffffffffa02d8e94>] ? addrconf_notify+0x6eb/0x78d [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.807892] 
[<ffffffffa02df9a9>] ? fib6_clean_node+0x0/0x96 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.807957] 
[<ffffffffa02de7fb>] ? fib6_age+0x0/0x68 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.808031] 
[<ffffffff8105ea16>] ? notifier_call_chain+0x2e/0x5b
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.808096] 
[<ffffffff812544d6>] ? dev_close+0x31/0x35
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.808155] 
[<ffffffff81254598>] ? rollback_registered_many+0xbe/0x1fa
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.808218] 
[<ffffffff812546e2>] ? unregister_netdevice_many+0xe/0x62
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.808280] 
[<ffffffff81254892>] ? default_device_exit_batch+0x9e/0xb0
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.808342] 
[<ffffffff8124eed8>] ? cleanup_net+0x0/0x190
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.808401] 
[<ffffffff8124efcf>] ? cleanup_net+0xf7/0x190
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.808461] 
[<ffffffff8105752b>] ? process_one_work+0x250/0x3ce
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.808521] 
[<ffffffff81057a4c>] ? worker_thread+0x1cf/0x34b
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.808582] 
[<ffffffff8102f5a5>] ? __wake_up_common+0x41/0x78
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.808642] 
[<ffffffff8105787d>] ? worker_thread+0x0/0x34b
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.808701] 
[<ffffffff8105787d>] ? worker_thread+0x0/0x34b
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.808761] 
[<ffffffff8105a616>] ? kthread+0x7a/0x82
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.808822] 
[<ffffffff810037a4>] ? kernel_thread_helper+0x4/0x10
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.808882] 
[<ffffffff8105a59c>] ? kthread+0x0/0x82
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.808941] 
[<ffffffff810037a0>] ? kernel_thread_helper+0x0/0x10
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.809001] 
---[ end trace 3cbd5a9c87888acb ]---
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.809058] 
fib6_clean_node: del failed: rt=ffff88045e923680@ffff88045d52dd00 err=-2
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.809061] 
------------[ cut here ]------------
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.809123] 
WARNING: at net/ipv6/ip6_fib.c:1172 fib6_del+0x3e/0x2ce [ipv6]()
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.809184] 
Hardware name: PowerEdge M605
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.809240] 
Modules linked in: ipt_MASQUERADE iptable_nat nf_nat ipt_REJECT veth 
fuse xt_physdev ip6t_LOG ip6table_filter ip6_tables ipt_LOG xt_multiport 
xt_limit xt_tcpudp xt_state iptable_filter ip_tables x_tables 
nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4 nf_defrag_ipv4 
8021q bridge stp ext2 mbcache dm_round_robin dm_multipath 
nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6 snd_pcm snd_timer snd 
soundcore snd_page_alloc tpm_tis tpm psmouse tpm_bios i2c_nforce2 pcspkr 
shpchp serio_raw pci_hotplug i2c_core button joydev ghes hed evdev 
dcdbas processor thermal_sys xfs exportfs dm_mod btrfs zlib_deflate 
crc32c libcrc32c sg sr_mod cdrom usbhid hid usb_storage ses sd_mod 
enclosure megaraid_sas lpfc ohci_hcd scsi_transport_fc scsi_tgt scsi_mod 
bnx2 ehci_hcd [last unloaded: scsi_wait_scan]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.812440] 
Pid: 5, comm: kworker/u:0 Tainted: G        W   2.6.37-rc5-dsiun-1a #2
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.812515] 
Call Trace:
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.812570] 
[<ffffffff81040f56>] ? warn_slowpath_common+0x78/0x8c
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.812635] 
[<ffffffffa02df719>] ? fib6_del+0x3e/0x2ce [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.812695] 
[<ffffffff812d5e6f>] ? printk+0x40/0x49
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.812758] 
[<ffffffffa02df9ed>] ? fib6_clean_node+0x44/0x96 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.812823] 
[<ffffffffa02db04b>] ? fib6_ifdown+0x0/0x21 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.812887] 
[<ffffffffa02dee56>] ? fib6_walk_continue+0xaa/0x12d [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.812953] 
[<ffffffffa02def2a>] ? fib6_walk+0x51/0xa4 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.813017] 
[<ffffffffa02df006>] ? fib6_clean_all+0x89/0xb7 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.813083] 
[<ffffffffa02df9a9>] ? fib6_clean_node+0x0/0x96 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.813147] 
[<ffffffffa02db04b>] ? fib6_ifdown+0x0/0x21 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.813212] 
[<ffffffffa02de76f>] ? rt6_ifdown+0x26/0x9f [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.813276] 
[<ffffffffa02d811a>] ? addrconf_ifdown+0x5b/0x441 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.813337] 
[<ffffffff812d81ba>] ? _raw_write_lock_bh+0xe/0x26
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.813401] 
[<ffffffffa02d8e94>] ? addrconf_notify+0x6eb/0x78d [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.813467] 
[<ffffffffa02df9a9>] ? fib6_clean_node+0x0/0x96 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.813532] 
[<ffffffffa02de7fb>] ? fib6_age+0x0/0x68 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.813592] 
[<ffffffff8105ea16>] ? notifier_call_chain+0x2e/0x5b
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.813653] 
[<ffffffff812544d6>] ? dev_close+0x31/0x35
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.813713] 
[<ffffffff81254598>] ? rollback_registered_many+0xbe/0x1fa
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.813775] 
[<ffffffff812546e2>] ? unregister_netdevice_many+0xe/0x62
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.813836] 
[<ffffffff81254892>] ? default_device_exit_batch+0x9e/0xb0
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.813898] 
[<ffffffff8124eed8>] ? cleanup_net+0x0/0x190
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.813957] 
[<ffffffff8124efcf>] ? cleanup_net+0xf7/0x190
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.814017] 
[<ffffffff8105752b>] ? process_one_work+0x250/0x3ce
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.819101] 
[<ffffffff81057a4c>] ? worker_thread+0x1cf/0x34b
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.819161] 
[<ffffffff8102f5a5>] ? __wake_up_common+0x41/0x78
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.819221] 
[<ffffffff8105787d>] ? worker_thread+0x0/0x34b
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.819281] 
[<ffffffff8105787d>] ? worker_thread+0x0/0x34b
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.819341] 
[<ffffffff8105a616>] ? kthread+0x7a/0x82
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.819400] 
[<ffffffff810037a4>] ? kernel_thread_helper+0x4/0x10
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.819461] 
[<ffffffff8105a59c>] ? kthread+0x0/0x82
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.819519] 
[<ffffffff810037a0>] ? kernel_thread_helper+0x0/0x10
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.819579] 
---[ end trace 3cbd5a9c87888acc ]---
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.819636] 
fib6_clean_node: del failed: rt=ffff88045e923900@ffff88085dc30380 err=-2
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.838291] 
------------[ cut here ]------------
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.838360] 
WARNING: at net/ipv6/ip6_fib.c:1172 fib6_del+0x3e/0x2ce [ipv6]()
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.838421] 
Hardware name: PowerEdge M605
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.838477] 
Modules linked in: ipt_MASQUERADE iptable_nat nf_nat ipt_REJECT veth 
fuse xt_physdev ip6t_LOG ip6table_filter ip6_tables ipt_LOG xt_multiport 
xt_limit xt_tcpudp xt_state iptable_filter ip_tables x_tables 
nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4 nf_defrag_ipv4 
8021q bridge stp ext2 mbcache dm_round_robin dm_multipath 
nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6 snd_pcm snd_timer snd 
soundcore snd_page_alloc tpm_tis tpm psmouse tpm_bios i2c_nforce2 pcspkr 
shpchp serio_raw pci_hotplug i2c_core button joydev ghes hed evdev 
dcdbas processor thermal_sys xfs exportfs dm_mod btrfs zlib_deflate 
crc32c libcrc32c sg sr_mod cdrom usbhid hid usb_storage ses sd_mod 
enclosure megaraid_sas lpfc ohci_hcd scsi_transport_fc scsi_tgt scsi_mod 
bnx2 ehci_hcd [last unloaded: scsi_wait_scan]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.841677] 
Pid: 5, comm: kworker/u:0 Tainted: G        W   2.6.37-rc5-dsiun-1a #2
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.841752] 
Call Trace:
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.841809] 
[<ffffffff81040f56>] ? warn_slowpath_common+0x78/0x8c
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.841874] 
[<ffffffffa02df719>] ? fib6_del+0x3e/0x2ce [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.841936] 
[<ffffffff81271900>] ? netlink_broadcast_filtered+0x369/0x399
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.842003] 
[<ffffffffa02ed4b7>] ? igmp6_group_dropped+0x222/0x231 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.842069] 
[<ffffffffa02dbc00>] ? __ip6_del_rt+0x47/0x66 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.842133] 
[<ffffffffa02dbd69>] ? ip6_del_rt+0x2e/0x33 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.842197] 
[<ffffffffa02d68b0>] ? __ipv6_ifa_notify+0x156/0x19d [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.842263] 
[<ffffffffa02d840e>] ? addrconf_ifdown+0x34f/0x441 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.842328] 
[<ffffffffa02d8e94>] ? addrconf_notify+0x6eb/0x78d [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.842390] 
[<ffffffff8104d5bd>] ? try_to_del_timer_sync+0xab/0xb4
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.842451] 
[<ffffffff81249a96>] ? skb_dequeue+0x54/0x5c
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.842515] 
[<ffffffffa02f7d54>] ? ip6mr_device_event+0xa2/0xb3 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.842577] 
[<ffffffff8105ea16>] ? notifier_call_chain+0x2e/0x5b
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.842639] 
[<ffffffff812545ee>] ? rollback_registered_many+0x114/0x1fa
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.842701] 
[<ffffffff812546e2>] ? unregister_netdevice_many+0xe/0x62
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.842763] 
[<ffffffff81254892>] ? default_device_exit_batch+0x9e/0xb0
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.842824] 
[<ffffffff8124eed8>] ? cleanup_net+0x0/0x190
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.842883] 
[<ffffffff8124efcf>] ? cleanup_net+0xf7/0x190
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.842943] 
[<ffffffff8105752b>] ? process_one_work+0x250/0x3ce
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.843003] 
[<ffffffff81057a4c>] ? worker_thread+0x1cf/0x34b
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.843064] 
[<ffffffff8102f5a5>] ? __wake_up_common+0x41/0x78
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.843124] 
[<ffffffff8105787d>] ? worker_thread+0x0/0x34b
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.843183] 
[<ffffffff8105787d>] ? worker_thread+0x0/0x34b
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.843243] 
[<ffffffff8105a616>] ? kthread+0x7a/0x82
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.843302] 
[<ffffffff810037a4>] ? kernel_thread_helper+0x4/0x10
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.843363] 
[<ffffffff8105a59c>] ? kthread+0x0/0x82
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.843421] 
[<ffffffff810037a0>] ? kernel_thread_helper+0x0/0x10
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.843481] 
---[ end trace 3cbd5a9c87888acd ]---
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.843629] 
V2002: port 2(dns2-lmb-serv) entering disabled state
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.846285] 
------------[ cut here ]------------
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.846352] 
WARNING: at net/ipv6/ip6_fib.c:1172 fib6_del+0x3e/0x2ce [ipv6]()
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.846414] 
Hardware name: PowerEdge M605
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.846469] 
Modules linked in: ipt_MASQUERADE iptable_nat nf_nat ipt_REJECT veth 
fuse xt_physdev ip6t_LOG ip6table_filter ip6_tables ipt_LOG xt_multiport 
xt_limit xt_tcpudp xt_state iptable_filter ip_tables x_tables 
nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4 nf_defrag_ipv4 
8021q bridge stp ext2 mbcache dm_round_robin dm_multipath 
nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6 snd_pcm snd_timer snd 
soundcore snd_page_alloc tpm_tis tpm psmouse tpm_bios i2c_nforce2 pcspkr 
shpchp serio_raw pci_hotplug i2c_core button joydev ghes hed evdev 
dcdbas processor thermal_sys xfs exportfs dm_mod btrfs zlib_deflate 
crc32c libcrc32c sg sr_mod cdrom usbhid hid usb_storage ses sd_mod 
enclosure megaraid_sas lpfc ohci_hcd scsi_transport_fc scsi_tgt scsi_mod 
bnx2 ehci_hcd [last unloaded: scsi_wait_scan]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.849680] 
Pid: 5, comm: kworker/u:0 Tainted: G        W   2.6.37-rc5-dsiun-1a #2
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.849755] 
Call Trace:
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.849813] 
[<ffffffff81040f56>] ? warn_slowpath_common+0x78/0x8c
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.849878] 
[<ffffffffa02df719>] ? fib6_del+0x3e/0x2ce [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.849940] 
[<ffffffff81271900>] ? netlink_broadcast_filtered+0x369/0x399
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.850007] 
[<ffffffffa02ed4b7>] ? igmp6_group_dropped+0x222/0x231 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.850073] 
[<ffffffffa02dbc00>] ? __ip6_del_rt+0x47/0x66 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.850137] 
[<ffffffffa02dbd69>] ? ip6_del_rt+0x2e/0x33 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.850201] 
[<ffffffffa02d68b0>] ? __ipv6_ifa_notify+0x156/0x19d [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.850267] 
[<ffffffffa02d840e>] ? addrconf_ifdown+0x34f/0x441 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.850332] 
[<ffffffffa02d8e94>] ? addrconf_notify+0x6eb/0x78d [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.850395] 
[<ffffffff8104d5bd>] ? try_to_del_timer_sync+0xab/0xb4
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.850456] 
[<ffffffff81249a96>] ? skb_dequeue+0x54/0x5c
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.850520] 
[<ffffffffa02f7d54>] ? ip6mr_device_event+0xa2/0xb3 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.850582] 
[<ffffffff8105ea16>] ? notifier_call_chain+0x2e/0x5b
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.850644] 
[<ffffffff812545ee>] ? rollback_registered_many+0x114/0x1fa
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.850706] 
[<ffffffff812546e2>] ? unregister_netdevice_many+0xe/0x62
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.850768] 
[<ffffffff81254892>] ? default_device_exit_batch+0x9e/0xb0
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.850830] 
[<ffffffff8124eed8>] ? cleanup_net+0x0/0x190
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.850889] 
[<ffffffff8124efcf>] ? cleanup_net+0xf7/0x190
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.850949] 
[<ffffffff8105752b>] ? process_one_work+0x250/0x3ce
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.851009] 
[<ffffffff81057a4c>] ? worker_thread+0x1cf/0x34b
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.851070] 
[<ffffffff8102f5a5>] ? __wake_up_common+0x41/0x78
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.851130] 
[<ffffffff8105787d>] ? worker_thread+0x0/0x34b
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.851189] 
[<ffffffff8105787d>] ? worker_thread+0x0/0x34b
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.851249] 
[<ffffffff8105a616>] ? kthread+0x7a/0x82
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.851308] 
[<ffffffff810037a4>] ? kernel_thread_helper+0x4/0x10
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.851369] 
[<ffffffff8105a59c>] ? kthread+0x0/0x82
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.851427] 
[<ffffffff810037a0>] ? kernel_thread_helper+0x0/0x10
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.851487] 
---[ end trace 3cbd5a9c87888ace ]---
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.851627] 
V2003: port 2(dns2-lmb-clus) entering disabled state
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.854386] 
------------[ cut here ]------------
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.854455] 
WARNING: at net/ipv6/ip6_fib.c:1172 fib6_del+0x3e/0x2ce [ipv6]()
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.854517] 
Hardware name: PowerEdge M605
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.854573] 
Modules linked in: ipt_MASQUERADE iptable_nat nf_nat ipt_REJECT veth 
fuse xt_physdev ip6t_LOG ip6table_filter ip6_tables ipt_LOG xt_multiport 
xt_limit xt_tcpudp xt_state iptable_filter ip_tables x_tables 
nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4 nf_defrag_ipv4 
8021q bridge stp ext2 mbcache dm_round_robin dm_multipath 
nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6 snd_pcm snd_timer snd 
soundcore snd_page_alloc tpm_tis tpm psmouse tpm_bios i2c_nforce2 pcspkr 
shpchp serio_raw pci_hotplug i2c_core button joydev ghes hed evdev 
dcdbas processor thermal_sys xfs exportfs dm_mod btrfs zlib_deflate 
crc32c libcrc32c sg sr_mod cdrom usbhid hid usb_storage ses sd_mod 
enclosure megaraid_sas lpfc ohci_hcd scsi_transport_fc scsi_tgt scsi_mod 
bnx2 ehci_hcd [last unloaded: scsi_wait_scan]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.857801] 
Pid: 5, comm: kworker/u:0 Tainted: G        W   2.6.37-rc5-dsiun-1a #2
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.857876] 
Call Trace:
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.857934] 
[<ffffffff81040f56>] ? warn_slowpath_common+0x78/0x8c
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.857999] 
[<ffffffffa02df719>] ? fib6_del+0x3e/0x2ce [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.858060] 
[<ffffffff811fbe80>] ? extract_buf+0x76/0xc2
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.858124] 
[<ffffffffa02df9ed>] ? fib6_clean_node+0x44/0x96 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.858189] 
[<ffffffffa02db04b>] ? fib6_ifdown+0x0/0x21 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.858253] 
[<ffffffffa02dee56>] ? fib6_walk_continue+0xaa/0x12d [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.858319] 
[<ffffffffa02def2a>] ? fib6_walk+0x51/0xa4 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.858383] 
[<ffffffffa02df006>] ? fib6_clean_all+0x89/0xb7 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.858449] 
[<ffffffffa02df9a9>] ? fib6_clean_node+0x0/0x96 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.858514] 
[<ffffffffa02db04b>] ? fib6_ifdown+0x0/0x21 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.858578] 
[<ffffffffa02de76f>] ? rt6_ifdown+0x26/0x9f [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.858642] 
[<ffffffffa02d811a>] ? addrconf_ifdown+0x5b/0x441 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.858708] 
[<ffffffffa02d8e94>] ? addrconf_notify+0x6eb/0x78d [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.858770] 
[<ffffffff8104d5bd>] ? try_to_del_timer_sync+0xab/0xb4
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.858832] 
[<ffffffff81249a96>] ? skb_dequeue+0x54/0x5c
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.858896] 
[<ffffffffa02f7d54>] ? ip6mr_device_event+0xa2/0xb3 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.858959] 
[<ffffffff8105ea16>] ? notifier_call_chain+0x2e/0x5b
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.859021] 
[<ffffffff812545ee>] ? rollback_registered_many+0x114/0x1fa
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.859083] 
[<ffffffff812546e2>] ? unregister_netdevice_many+0xe/0x62
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.859145] 
[<ffffffff81254892>] ? default_device_exit_batch+0x9e/0xb0
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.859207] 
[<ffffffff8124eed8>] ? cleanup_net+0x0/0x190
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.859266] 
[<ffffffff8124efcf>] ? cleanup_net+0xf7/0x190
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.859326] 
[<ffffffff8105752b>] ? process_one_work+0x250/0x3ce
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.859386] 
[<ffffffff81057a4c>] ? worker_thread+0x1cf/0x34b
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.859447] 
[<ffffffff8102f5a5>] ? __wake_up_common+0x41/0x78
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.859507] 
[<ffffffff8105787d>] ? worker_thread+0x0/0x34b
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.859567] 
[<ffffffff8105787d>] ? worker_thread+0x0/0x34b
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.859627] 
[<ffffffff8105a616>] ? kthread+0x7a/0x82
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.859686] 
[<ffffffff810037a4>] ? kernel_thread_helper+0x4/0x10
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.859747] 
[<ffffffff8105a59c>] ? kthread+0x0/0x82
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.859805] 
[<ffffffff810037a0>] ? kernel_thread_helper+0x0/0x10
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.859865] 
---[ end trace 3cbd5a9c87888acf ]---
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.859923] 
fib6_clean_node: del failed: rt=ffff88045e923680@ffff88045d52dd00 err=-2
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.859925] 
------------[ cut here ]------------
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.859987] 
WARNING: at net/ipv6/ip6_fib.c:1172 fib6_del+0x3e/0x2ce [ipv6]()
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.860065] 
Hardware name: PowerEdge M605
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.860121] 
Modules linked in: ipt_MASQUERADE iptable_nat nf_nat ipt_REJECT veth 
fuse xt_physdev ip6t_LOG ip6table_filter ip6_tables ipt_LOG xt_multiport 
xt_limit xt_tcpudp xt_state iptable_filter ip_tables x_tables 
nf_conntrack_tftp nf_conntrack_ftp nf_conntrack_ipv4 nf_defrag_ipv4 
8021q bridge stp ext2 mbcache dm_round_robin dm_multipath 
nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6 snd_pcm snd_timer snd 
soundcore snd_page_alloc tpm_tis tpm psmouse tpm_bios i2c_nforce2 pcspkr 
shpchp serio_raw pci_hotplug i2c_core button joydev ghes hed evdev 
dcdbas processor thermal_sys xfs exportfs dm_mod btrfs zlib_deflate 
crc32c libcrc32c sg sr_mod cdrom usbhid hid usb_storage ses sd_mod 
enclosure megaraid_sas lpfc ohci_hcd scsi_transport_fc scsi_tgt scsi_mod 
bnx2 ehci_hcd [last unloaded: scsi_wait_scan]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.863303] 
Pid: 5, comm: kworker/u:0 Tainted: G        W   2.6.37-rc5-dsiun-1a #2
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.863378] 
Call Trace:
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.863433] 
[<ffffffff81040f56>] ? warn_slowpath_common+0x78/0x8c
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.863498] 
[<ffffffffa02df719>] ? fib6_del+0x3e/0x2ce [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.863559] 
[<ffffffff812d5e6f>] ? printk+0x40/0x49
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.863622] 
[<ffffffffa02df9ed>] ? fib6_clean_node+0x44/0x96 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.863686] 
[<ffffffffa02db04b>] ? fib6_ifdown+0x0/0x21 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.863751] 
[<ffffffffa02dee56>] ? fib6_walk_continue+0xaa/0x12d [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.863817] 
[<ffffffffa02def2a>] ? fib6_walk+0x51/0xa4 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.863881] 
[<ffffffffa02df006>] ? fib6_clean_all+0x89/0xb7 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.863946] 
[<ffffffffa02df9a9>] ? fib6_clean_node+0x0/0x96 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.864046] 
[<ffffffffa02db04b>] ? fib6_ifdown+0x0/0x21 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.864112] 
[<ffffffffa02de76f>] ? rt6_ifdown+0x26/0x9f [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.864177] 
[<ffffffffa02d811a>] ? addrconf_ifdown+0x5b/0x441 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.864242] 
[<ffffffffa02d8e94>] ? addrconf_notify+0x6eb/0x78d [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.864303] 
[<ffffffff8104d5bd>] ? try_to_del_timer_sync+0xab/0xb4
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.864364] 
[<ffffffff81249a96>] ? skb_dequeue+0x54/0x5c
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.869452] 
[<ffffffffa02f7d54>] ? ip6mr_device_event+0xa2/0xb3 [ipv6]
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.869515] 
[<ffffffff8105ea16>] ? notifier_call_chain+0x2e/0x5b
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.869577] 
[<ffffffff812545ee>] ? rollback_registered_many+0x114/0x1fa
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.869639] 
[<ffffffff812546e2>] ? unregister_netdevice_many+0xe/0x62
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.869701] 
[<ffffffff81254892>] ? default_device_exit_batch+0x9e/0xb0
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.869762] 
[<ffffffff8124eed8>] ? cleanup_net+0x0/0x190
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.869821] 
[<ffffffff8124efcf>] ? cleanup_net+0xf7/0x190
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.869881] 
[<ffffffff8105752b>] ? process_one_work+0x250/0x3ce
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.869941] 
[<ffffffff81057a4c>] ? worker_thread+0x1cf/0x34b
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.870001] 
[<ffffffff8102f5a5>] ? __wake_up_common+0x41/0x78
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.870061] 
[<ffffffff8105787d>] ? worker_thread+0x0/0x34b
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.870121] 
[<ffffffff8105787d>] ? worker_thread+0x0/0x34b
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.870180] 
[<ffffffff8105a616>] ? kthread+0x7a/0x82
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.870239] 
[<ffffffff810037a4>] ? kernel_thread_helper+0x4/0x10
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.870300] 
[<ffffffff8105a59c>] ? kthread+0x0/0x82
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.870358] 
[<ffffffff810037a0>] ? kernel_thread_helper+0x0/0x10
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.870418] 
---[ end trace 3cbd5a9c87888ad0 ]---
Dec  7 11:36:54 suntory.u06.univ-nantes.prive kernel: [ 1454.870476] 
fib6_clean_node: del failed: rt=ffff88045e923900@ffff88085dc30380 err=-2
Dec  7 11:36:59 suntory.u06.univ-nantes.prive kernel: [ 1459.702735] 
device dns2-lmb-clus entered promiscuous mode
Dec  7 11:36:59 suntory.u06.univ-nantes.prive kernel: [ 1459.704898] 
ADDRCONF(NETDEV_UP): dns2-lmb-clus: link is not ready
Dec  7 11:36:59 suntory.u06.univ-nantes.prive kernel: [ 1459.706711] 
device dns2-lmb-serv entered promiscuous mode
Dec  7 11:36:59 suntory.u06.univ-nantes.prive kernel: [ 1459.709079] 
ADDRCONF(NETDEV_UP): dns2-lmb-serv: link is not ready
Dec  7 11:37:04 suntory.u06.univ-nantes.prive kernel: [ 1465.152018] 
unregister_netdevice: waiting for eth1 to become free. Usage count = 1
Dec  7 11:37:15 suntory.u06.univ-nantes.prive kernel: [ 1475.392020] 
unregister_netdevice: waiting for eth1 to become free. Usage count = 1
Dec  7 11:37:25 suntory.u06.univ-nantes.prive kernel: [ 1485.632020] 
unregister_netdevice: waiting for eth1 to become free. Usage count = 1


I continue my tests.

thanks for your help.

Regards.

[-- Attachment #2: jean-philippe_menil.vcf --]
[-- Type: text/x-vcard, Size: 377 bytes --]

begin:vcard
fn:Jean-Philippe Menil
n:Menil;Jean-Philippe
org;quoted-printable:Universit=C3=A9 de Nantes;IRTS
adr;quoted-printable:;;2 rue de la Houssini=C3=A8re;Nantes;;44322;France
email;internet:jean-philippe.menil@univ-nantes.fr
title:Reseau
tel;work:02 53 48 49 27
tel;fax:(33)2 51 12 58 60 
tel;cell:06 45 38 87 75
url:http://www.cri.univ-nantes.fr
version:2.1
end:vcard


^ permalink raw reply

* Re: [PATCH net-next-2.6 8/17 v2] can: EG20T PCH: Change Copyright and module description
From: Marc Kleine-Budde @ 2010-12-07 10:38 UTC (permalink / raw)
  To: Tomoya MORINAGA
  Cc: andrew.chih.howe.khor-ral2JQCrhuEAvxtiuMwx3w,
	qi.wang-ral2JQCrhuEAvxtiuMwx3w,
	margie.foster-ral2JQCrhuEAvxtiuMwx3w,
	netdev-u79uwXL29TY76Z2rM5mHXA, yong.y.wang-ral2JQCrhuEAvxtiuMwx3w,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
	kok.howg.ewe-ral2JQCrhuEAvxtiuMwx3w,
	joel.clark-ral2JQCrhuEAvxtiuMwx3w, Wolfgang Grandegger
In-Reply-To: <175BA60FBA444BE6B858D42E7B602A40-c0cKtqp5df7I9507bXv2FdBPR1lH4CV8@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 916 bytes --]

On 12/07/2010 10:50 AM, Tomoya MORINAGA wrote:
>> In case single destination address is OK, but in case multiple address
>> is set,
>> I can see the following error.
>> Relay access denied
> 
> The above was not true.
> It seems in case destination mail domain is external, (except
> "@okisemi.com"),
> this error is occurred.
> In fact, in case multiple address with internal domain,
> it is success to send patch.
> 
> Our smtp server may have restriction of something.
> 
> It seems I must use mailer "thunderbird" again.

How do you send mail with thunderbord, then? I suppose you use smtp
there, too.

cheers, Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

[-- Attachment #2: Type: text/plain, Size: 188 bytes --]

_______________________________________________
Socketcan-core mailing list
Socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org
https://lists.berlios.de/mailman/listinfo/socketcan-core

^ permalink raw reply

* Re: [PATCH net-next-2.6 8/17 v2] can: EG20T PCH: Change Copyright and module description
From: Miguel Ojeda @ 2010-12-07 10:34 UTC (permalink / raw)
  To: Tomoya MORINAGA
  Cc: Marc Kleine-Budde, Wolfgang Grandegger, socketcan-core, netdev,
	linux-kernel, qi.wang, yong.y.wang, andrew.chih.howe.khor,
	joel.clark, kok.howg.ewe, margie.foster
In-Reply-To: <175BA60FBA444BE6B858D42E7B602A40@hacdom.okisemi.com>

2010/12/7 Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>:
>> In case single destination address is OK, but in case multiple address is
>> set,
>> I can see the following error.
>> Relay access denied
>
> The above was not true.
> It seems in case destination mail domain is external, (except
> "@okisemi.com"),
> this error is occurred.
> In fact, in case multiple address with internal domain,
> it is success to send patch.
>
> Our smtp server may have restriction of something.
>
> It seems I must use mailer "thunderbird" again.

For me, Evolution worked fine (no line wrapping, etc.).

>
> Thanks,
>
> /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
> Tomoya Morinaga
> OKI SEMICONDUCTOR CO., LTD.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

^ permalink raw reply

* Re: [PATCH net-next-2.6] net: call dev_queue_xmit_nit() after skb_dst_drop()
From: Eric Dumazet @ 2010-12-07 10:30 UTC (permalink / raw)
  To: David Miller; +Cc: netdev
In-Reply-To: <1291706359.2769.17.camel@edumazet-laptop>

Le mardi 07 décembre 2010 à 08:19 +0100, Eric Dumazet a écrit :
> Avoid some atomic ops on dst refcount, calling dev_queue_xmit_nit()
> after skb_dst_drop() in dev_hard_start_xmit().
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> ---
> Next patch will perform the sk_run_filter() in dev_queue_xmit_nit(),
> before cloning skb and af_packet rcv() call.
> 
>  net/core/dev.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 55ff66f..59360ef 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -2025,9 +2025,6 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
>  	int rc = NETDEV_TX_OK;
>  
>  	if (likely(!skb->next)) {
> -		if (!list_empty(&ptype_all))
> -			dev_queue_xmit_nit(skb, dev);
> -
>  		/*
>  		 * If device doesnt need skb->dst, release it right now while
>  		 * its hot in this cpu cache
> @@ -2037,6 +2034,9 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
>  
>  		skb_orphan_try(skb);
>  
> +		if (!list_empty(&ptype_all))
> +			dev_queue_xmit_nit(skb, dev);
> +
>  		if (vlan_tx_tag_present(skb) &&
>  		    !(dev->features & NETIF_F_HW_VLAN_TX)) {
>  			skb = __vlan_put_tag(skb, vlan_tx_tag_get(skb));
> 

Hmm, this was wrong, and not what I wanted to do :

in dev_queue_xmit_nit() do following tests :

        /* Never send packets back to the socket
         * they originated from - MvS (miquels@drinkel.ow.org)
         */
        if ((ptype->dev == dev || !ptype->dev) &&
            (ptype->af_packet_priv == NULL ||
             (struct sock *)ptype->af_packet_priv != skb->sk)) {
                struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC);

So we should not move dev_queue_xmit_nit() after
skb_orphan_try(skb) or the (ptype->af_packet_priv != skb->sk) test 
is always true.

Here is V2 of patch :

[PATCH v2 net-next-2.6] net: call dev_queue_xmit_nit() after skb_dst_drop()

Avoid some atomic ops on dst refcount, calling dev_queue_xmit_nit()
after skb_dst_drop() in dev_hard_start_xmit().

When queueing a packet into af_packet socket, we drop dst anyway.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
 net/core/dev.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 55ff66f..58930e4 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2025,9 +2025,6 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
 	int rc = NETDEV_TX_OK;
 
 	if (likely(!skb->next)) {
-		if (!list_empty(&ptype_all))
-			dev_queue_xmit_nit(skb, dev);
-
 		/*
 		 * If device doesnt need skb->dst, release it right now while
 		 * its hot in this cpu cache
@@ -2035,6 +2032,9 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
 		if (dev->priv_flags & IFF_XMIT_DST_RELEASE)
 			skb_dst_drop(skb);
 
+		if (!list_empty(&ptype_all))
+			dev_queue_xmit_nit(skb, dev);
+
 		skb_orphan_try(skb);
 
 		if (vlan_tx_tag_present(skb) &&



^ permalink raw reply related

* [PATCH 0/3] xfrm: ESP Traffic Flow Confidentiality padding (v2)
From: Martin Willi @ 2010-12-07 10:29 UTC (permalink / raw)
  To: Herbert Xu; +Cc: linux-crypto, netdev

The following patchset adds Traffic Flow Confidentiality padding. The
first patch introduces a new Netlink XFRM attribute to configure TFC via
userspace. Patch two and three implement the padding logic in IPv4 and
IPv6 ESP. Padding is always done using the RFC4303 format an is clamped
to the PMTU.

Changes from v1:
  - Always clamp padding length to never exceed PMTU
  - Remove XFRM_TFC_PMTU flag, use USHRT_MAX padding length instead
  - Remove ESPv2 padding fallback due to the concerns from Herbert
  - Keep the existing ESP padlen field, as we don't mangle ESP padding

I've kept the currently unused flags in the XFRM attribute to implement
ESPv2 fallback or other extensions in the future without changing the ABI.

Martin Willi (3):
      xfrm: Add Traffic Flow Confidentiality padding XFRM attribute
      xfrm: Traffic Flow Confidentiality for IPv4 ESP
      xfrm: Traffic Flow Confidentiality for IPv6 ESP

 include/linux/xfrm.h |    6 ++++++
 include/net/xfrm.h   |    1 +
 net/ipv4/esp4.c      |   33 +++++++++++++++++++++++++--------
 net/ipv6/esp6.c      |   33 +++++++++++++++++++++++++--------
 net/xfrm/xfrm_user.c |   16 ++++++++++++++--
 5 files changed, 71 insertions(+), 18 deletions(-)


^ permalink raw reply

* [PATCH 1/3] xfrm: Add Traffic Flow Confidentiality padding XFRM attribute
From: Martin Willi @ 2010-12-07 10:29 UTC (permalink / raw)
  To: Herbert Xu; +Cc: linux-crypto, netdev
In-Reply-To: <1291717744-30111-1-git-send-email-martin@strongswan.org>

The XFRMA_TFC attribute for XFRM state installation configures
Traffic Flow Confidentiality by padding ESP packets to a specified
length.

Signed-off-by: Martin Willi <martin@strongswan.org>
---
 include/linux/xfrm.h |    6 ++++++
 include/net/xfrm.h   |    1 +
 net/xfrm/xfrm_user.c |   16 ++++++++++++++--
 3 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h
index b971e38..7cd5232 100644
--- a/include/linux/xfrm.h
+++ b/include/linux/xfrm.h
@@ -283,6 +283,7 @@ enum xfrm_attr_type_t {
 	XFRMA_KMADDRESS,        /* struct xfrm_user_kmaddress */
 	XFRMA_ALG_AUTH_TRUNC,	/* struct xfrm_algo_auth */
 	XFRMA_MARK,		/* struct xfrm_mark */
+	XFRMA_TFC,		/* struct xfrm_tfc */
 	__XFRMA_MAX
 
 #define XFRMA_MAX (__XFRMA_MAX - 1)
@@ -293,6 +294,11 @@ struct xfrm_mark {
 	__u32           m; /* mask */
 };
 
+struct xfrm_tfc {
+	__u16		pad;
+	__u16		flags;
+};
+
 enum xfrm_sadattr_type_t {
 	XFRMA_SAD_UNSPEC,
 	XFRMA_SAD_CNT,
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index bcfb6b2..03468c0 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -143,6 +143,7 @@ struct xfrm_state {
 	struct xfrm_id		id;
 	struct xfrm_selector	sel;
 	struct xfrm_mark	mark;
+	struct xfrm_tfc		tfc;
 
 	u32			genid;
 
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 8bae6b2..df6a60f 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -148,7 +148,8 @@ static int verify_newsa_info(struct xfrm_usersa_info *p,
 		     !attrs[XFRMA_ALG_AUTH_TRUNC]) ||
 		    attrs[XFRMA_ALG_AEAD]	||
 		    attrs[XFRMA_ALG_CRYPT]	||
-		    attrs[XFRMA_ALG_COMP])
+		    attrs[XFRMA_ALG_COMP]	||
+		    attrs[XFRMA_TFC])
 			goto out;
 		break;
 
@@ -172,7 +173,8 @@ static int verify_newsa_info(struct xfrm_usersa_info *p,
 		    attrs[XFRMA_ALG_AEAD]	||
 		    attrs[XFRMA_ALG_AUTH]	||
 		    attrs[XFRMA_ALG_AUTH_TRUNC]	||
-		    attrs[XFRMA_ALG_CRYPT])
+		    attrs[XFRMA_ALG_CRYPT]	||
+		    attrs[XFRMA_TFC])
 			goto out;
 		break;
 
@@ -186,6 +188,7 @@ static int verify_newsa_info(struct xfrm_usersa_info *p,
 		    attrs[XFRMA_ALG_CRYPT]	||
 		    attrs[XFRMA_ENCAP]		||
 		    attrs[XFRMA_SEC_CTX]	||
+		    attrs[XFRMA_TFC]		||
 		    !attrs[XFRMA_COADDR])
 			goto out;
 		break;
@@ -439,6 +442,9 @@ static struct xfrm_state *xfrm_state_construct(struct net *net,
 			goto error;
 	}
 
+	if (attrs[XFRMA_TFC])
+		memcpy(&x->tfc, nla_data(attrs[XFRMA_TFC]), sizeof(x->tfc));
+
 	if (attrs[XFRMA_COADDR]) {
 		x->coaddr = kmemdup(nla_data(attrs[XFRMA_COADDR]),
 				    sizeof(*x->coaddr), GFP_KERNEL);
@@ -688,6 +694,9 @@ static int copy_to_user_state_extra(struct xfrm_state *x,
 	if (x->encap)
 		NLA_PUT(skb, XFRMA_ENCAP, sizeof(*x->encap), x->encap);
 
+	if (x->tfc.pad)
+		NLA_PUT(skb, XFRMA_TFC, sizeof(x->tfc), &x->tfc);
+
 	if (xfrm_mark_put(skb, &x->mark))
 		goto nla_put_failure;
 
@@ -2122,6 +2131,7 @@ static const struct nla_policy xfrma_policy[XFRMA_MAX+1] = {
 	[XFRMA_MIGRATE]		= { .len = sizeof(struct xfrm_user_migrate) },
 	[XFRMA_KMADDRESS]	= { .len = sizeof(struct xfrm_user_kmaddress) },
 	[XFRMA_MARK]		= { .len = sizeof(struct xfrm_mark) },
+	[XFRMA_TFC]		= { .len = sizeof(struct xfrm_tfc) },
 };
 
 static struct xfrm_link {
@@ -2301,6 +2311,8 @@ static inline size_t xfrm_sa_len(struct xfrm_state *x)
 		l += nla_total_size(sizeof(*x->calg));
 	if (x->encap)
 		l += nla_total_size(sizeof(*x->encap));
+	if (x->tfc.pad)
+		l += nla_total_size(sizeof(x->tfc));
 	if (x->security)
 		l += nla_total_size(sizeof(struct xfrm_user_sec_ctx) +
 				    x->security->ctx_len);
-- 
1.7.1


^ permalink raw reply related

* [PATCH 3/3] xfrm: Traffic Flow Confidentiality for IPv6 ESP
From: Martin Willi @ 2010-12-07 10:29 UTC (permalink / raw)
  To: Herbert Xu; +Cc: linux-crypto, netdev
In-Reply-To: <1291717744-30111-1-git-send-email-martin@strongswan.org>

Add TFC padding to all packets smaller than the boundary configured
on the xfrm state. If the boundary is larger than the PMTU, limit
padding to the PMTU.

Signed-off-by: Martin Willi <martin@strongswan.org>
---
 net/ipv6/esp6.c |   33 +++++++++++++++++++++++++--------
 1 files changed, 25 insertions(+), 8 deletions(-)

diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c
index ee9b93b..8b493b0 100644
--- a/net/ipv6/esp6.c
+++ b/net/ipv6/esp6.c
@@ -49,6 +49,8 @@ struct esp_skb_cb {
 
 #define ESP_SKB_CB(__skb) ((struct esp_skb_cb *)&((__skb)->cb[0]))
 
+static u32 esp6_get_mtu(struct xfrm_state *x, int mtu);
+
 /*
  * Allocate an AEAD request structure with extra space for SG and IV.
  *
@@ -140,6 +142,8 @@ static int esp6_output(struct xfrm_state *x, struct sk_buff *skb)
 	int blksize;
 	int clen;
 	int alen;
+	int plen;
+	int tfclen;
 	int nfrags;
 	u8 *iv;
 	u8 *tail;
@@ -148,18 +152,27 @@ static int esp6_output(struct xfrm_state *x, struct sk_buff *skb)
 	/* skb is pure payload to encrypt */
 	err = -ENOMEM;
 
-	/* Round to block size */
-	clen = skb->len;
-
 	aead = esp->aead;
 	alen = crypto_aead_authsize(aead);
 
+	tfclen = 0;
+	if (x->tfc.pad && x->props.mode == XFRM_MODE_TUNNEL) {
+		struct xfrm_dst *dst = (struct xfrm_dst *)skb_dst(skb);
+		u32 mtu, padto;
+
+		mtu = esp6_get_mtu(x, dst->child_mtu_cached);
+		padto = min_t(u32, x->tfc.pad, mtu);
+		if (skb->len < padto)
+			tfclen = padto - skb->len;
+	}
 	blksize = ALIGN(crypto_aead_blocksize(aead), 4);
-	clen = ALIGN(clen + 2, blksize);
+	clen = ALIGN(skb->len + 2 + tfclen, blksize);
 	if (esp->padlen)
 		clen = ALIGN(clen, esp->padlen);
+	plen = clen - skb->len - tfclen;
 
-	if ((err = skb_cow_data(skb, clen - skb->len + alen, &trailer)) < 0)
+	err = skb_cow_data(skb, tfclen + plen + alen, &trailer);
+	if (err < 0)
 		goto error;
 	nfrags = err;
 
@@ -174,13 +187,17 @@ static int esp6_output(struct xfrm_state *x, struct sk_buff *skb)
 
 	/* Fill padding... */
 	tail = skb_tail_pointer(trailer);
+	if (tfclen) {
+		memset(tail, 0, tfclen);
+		tail += tfclen;
+	}
 	do {
 		int i;
-		for (i=0; i<clen-skb->len - 2; i++)
+		for (i = 0; i < plen - 2; i++)
 			tail[i] = i + 1;
 	} while (0);
-	tail[clen-skb->len - 2] = (clen - skb->len) - 2;
-	tail[clen - skb->len - 1] = *skb_mac_header(skb);
+	tail[plen - 2] = plen - 2;
+	tail[plen - 1] = *skb_mac_header(skb);
 	pskb_put(skb, trailer, clen - skb->len + alen);
 
 	skb_push(skb, -skb_network_offset(skb));
-- 
1.7.1

^ permalink raw reply related

* [PATCH 2/3] xfrm: Traffic Flow Confidentiality for IPv4 ESP
From: Martin Willi @ 2010-12-07 10:29 UTC (permalink / raw)
  To: Herbert Xu; +Cc: linux-crypto, netdev
In-Reply-To: <1291717744-30111-1-git-send-email-martin@strongswan.org>

Add TFC padding to all packets smaller than the boundary configured
on the xfrm state. If the boundary is larger than the PMTU, limit
padding to the PMTU.

Signed-off-by: Martin Willi <martin@strongswan.org>
---
 net/ipv4/esp4.c |   33 +++++++++++++++++++++++++--------
 1 files changed, 25 insertions(+), 8 deletions(-)

diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c
index 14ca1f1..e7784e8 100644
--- a/net/ipv4/esp4.c
+++ b/net/ipv4/esp4.c
@@ -23,6 +23,8 @@ struct esp_skb_cb {
 
 #define ESP_SKB_CB(__skb) ((struct esp_skb_cb *)&((__skb)->cb[0]))
 
+static u32 esp4_get_mtu(struct xfrm_state *x, int mtu);
+
 /*
  * Allocate an AEAD request structure with extra space for SG and IV.
  *
@@ -117,25 +119,36 @@ static int esp_output(struct xfrm_state *x, struct sk_buff *skb)
 	int blksize;
 	int clen;
 	int alen;
+	int plen;
+	int tfclen;
 	int nfrags;
 
 	/* skb is pure payload to encrypt */
 
 	err = -ENOMEM;
 
-	/* Round to block size */
-	clen = skb->len;
-
 	esp = x->data;
 	aead = esp->aead;
 	alen = crypto_aead_authsize(aead);
 
+	tfclen = 0;
+	if (x->tfc.pad && x->props.mode == XFRM_MODE_TUNNEL) {
+		struct xfrm_dst *dst = (struct xfrm_dst *)skb_dst(skb);
+		u32 mtu, padto;
+
+		mtu = esp4_get_mtu(x, dst->child_mtu_cached);
+		padto = min_t(u32, x->tfc.pad, mtu);
+		if (skb->len < padto)
+			tfclen = padto - skb->len;
+	}
 	blksize = ALIGN(crypto_aead_blocksize(aead), 4);
-	clen = ALIGN(clen + 2, blksize);
+	clen = ALIGN(skb->len + 2 + tfclen, blksize);
 	if (esp->padlen)
 		clen = ALIGN(clen, esp->padlen);
+	plen = clen - skb->len - tfclen;
 
-	if ((err = skb_cow_data(skb, clen - skb->len + alen, &trailer)) < 0)
+	err = skb_cow_data(skb, tfclen + plen + alen, &trailer);
+	if (err < 0)
 		goto error;
 	nfrags = err;
 
@@ -150,13 +163,17 @@ static int esp_output(struct xfrm_state *x, struct sk_buff *skb)
 
 	/* Fill padding... */
 	tail = skb_tail_pointer(trailer);
+	if (tfclen) {
+		memset(tail, 0, tfclen);
+		tail += tfclen;
+	}
 	do {
 		int i;
-		for (i=0; i<clen-skb->len - 2; i++)
+		for (i = 0; i < plen - 2; i++)
 			tail[i] = i + 1;
 	} while (0);
-	tail[clen - skb->len - 2] = (clen - skb->len) - 2;
-	tail[clen - skb->len - 1] = *skb_mac_header(skb);
+	tail[plen - 2] = plen - 2;
+	tail[plen - 1] = *skb_mac_header(skb);
 	pskb_put(skb, trailer, clen - skb->len + alen);
 
 	skb_push(skb, -skb_network_offset(skb));
-- 
1.7.1

^ permalink raw reply related

* [PATCH net-next-2.6 v7 01/24] CAN : Separate interface register from whole of register structure.
From: Tomoya MORINAGA @ 2010-12-07 10:17 UTC (permalink / raw)
  To: Wolfgang Grandegger, socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: andrew.chih.howe.khor-ral2JQCrhuEAvxtiuMwx3w,
	qi.wang-ral2JQCrhuEAvxtiuMwx3w,
	margie.foster-ral2JQCrhuEAvxtiuMwx3w,
	yong.y.wang-ral2JQCrhuEAvxtiuMwx3w,
	kok.howg.ewe-ral2JQCrhuEAvxtiuMwx3w,
	joel.clark-ral2JQCrhuEAvxtiuMwx3w

CAN register of Intel PCH EG20T has 2 sets of interface register.
To reduce whole of code size, separate interface register.
As a result, the number of function also can be reduced.

Signed-off-by: Tomoya MORINAGA <tomoya-linux-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>
Acked-by: Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
---
 drivers/net/can/pch_can.c |  445 ++++++++++++++++++++-------------------------
 1 files changed, 201 insertions(+), 244 deletions(-)

diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c
index 238622a..dae8ed1 100644
--- a/drivers/net/can/pch_can.c
+++ b/drivers/net/can/pch_can.c
@@ -113,6 +113,11 @@
 
 #define PCH_FIFO_THRESH		16
 
+enum pch_ifreg {
+	PCH_RX_IFREG,
+	PCH_TX_IFREG,
+};
+
 enum pch_can_mode {
 	PCH_CAN_ENABLE,
 	PCH_CAN_DISABLE,
@@ -122,6 +127,21 @@ enum pch_can_mode {
 	PCH_CAN_RUN
 };
 
+struct pch_can_if_regs {
+	u32 creq;
+	u32 cmask;
+	u32 mask1;
+	u32 mask2;
+	u32 id1;
+	u32 id2;
+	u32 mcont;
+	u32 dataa1;
+	u32 dataa2;
+	u32 datab1;
+	u32 datab2;
+	u32 rsv[13];
+};
+
 struct pch_can_regs {
 	u32 cont;
 	u32 stat;
@@ -130,38 +150,21 @@ struct pch_can_regs {
 	u32 intr;
 	u32 opt;
 	u32 brpe;
-	u32 reserve1;
-	u32 if1_creq;
-	u32 if1_cmask;
-	u32 if1_mask1;
-	u32 if1_mask2;
-	u32 if1_id1;
-	u32 if1_id2;
-	u32 if1_mcont;
-	u32 if1_dataa1;
-	u32 if1_dataa2;
-	u32 if1_datab1;
-	u32 if1_datab2;
-	u32 reserve2;
-	u32 reserve3[12];
-	u32 if2_creq;
-	u32 if2_cmask;
-	u32 if2_mask1;
-	u32 if2_mask2;
-	u32 if2_id1;
-	u32 if2_id2;
-	u32 if2_mcont;
-	u32 if2_dataa1;
-	u32 if2_dataa2;
-	u32 if2_datab1;
-	u32 if2_datab2;
-	u32 reserve4;
-	u32 reserve5[20];
+	u32 reserve;
+	struct pch_can_if_regs ifregs[2]; /* [0]=if1  [1]=if2 */
+	u32 reserve1[8];
 	u32 treq1;
 	u32 treq2;
-	u32 reserve6[2];
-	u32 reserve7[56];
-	u32 reserve8[3];
+	u32 reserve2[6];
+	u32 data1;
+	u32 data2;
+	u32 reserve3[6];
+	u32 canipend1;
+	u32 canipend2;
+	u32 reserve4[6];
+	u32 canmval1;
+	u32 canmval2;
+	u32 reserve5[37];
 	u32 srst;
 };
 
@@ -303,143 +306,87 @@ static void pch_can_check_if_busy(u32 __iomem *creq_addr, u32 num)
 		pr_err("%s:IF1 BUSY Flag is set forever.\n", __func__);
 }
 
-static void pch_can_set_rx_enable(struct pch_can_priv *priv, u32 buff_num,
-				  u32 set)
+static void pch_can_set_rxtx(struct pch_can_priv *priv, u32 buff_num,
+			     u32 set, enum pch_ifreg dir)
 {
 	unsigned long flags;
+	u32 ie;
+
+	if (dir)
+		ie = PCH_IF_MCONT_TXIE;
+	else
+		ie = PCH_IF_MCONT_RXIE;
 
 	spin_lock_irqsave(&priv->msgif_reg_lock, flags);
 	/* Reading the receive buffer data from RAM to Interface1 registers */
-	iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->if1_cmask);
-	pch_can_check_if_busy(&priv->regs->if1_creq, buff_num);
+	iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->ifregs[dir].cmask);
+	pch_can_check_if_busy(&priv->regs->ifregs[dir].creq, buff_num);
 
 	/* Setting the IF1MASK1 register to access MsgVal and RxIE bits */
 	iowrite32(PCH_CMASK_RDWR | PCH_CMASK_ARB | PCH_CMASK_CTRL,
-		  &priv->regs->if1_cmask);
+		  &priv->regs->ifregs[dir].cmask);
 
 	if (set == PCH_ENABLE) {
 		/* Setting the MsgVal and RxIE bits */
-		pch_can_bit_set(&priv->regs->if1_mcont, PCH_IF_MCONT_RXIE);
-		pch_can_bit_set(&priv->regs->if1_id2, PCH_ID_MSGVAL);
+		pch_can_bit_set(&priv->regs->ifregs[dir].mcont, ie);
+		pch_can_bit_set(&priv->regs->ifregs[dir].id2, PCH_ID_MSGVAL);
 
 	} else if (set == PCH_DISABLE) {
 		/* Resetting the MsgVal and RxIE bits */
-		pch_can_bit_clear(&priv->regs->if1_mcont, PCH_IF_MCONT_RXIE);
-		pch_can_bit_clear(&priv->regs->if1_id2, PCH_ID_MSGVAL);
+		pch_can_bit_clear(&priv->regs->ifregs[dir].mcont, ie);
+		pch_can_bit_clear(&priv->regs->ifregs[dir].id2, PCH_ID_MSGVAL);
 	}
 
-	pch_can_check_if_busy(&priv->regs->if1_creq, buff_num);
+	pch_can_check_if_busy(&priv->regs->ifregs[dir].creq, buff_num);
 	spin_unlock_irqrestore(&priv->msgif_reg_lock, flags);
 }
 
-static void pch_can_rx_enable_all(struct pch_can_priv *priv)
-{
-	int i;
-
-	/* Traversing to obtain the object configured as receivers. */
-	for (i = 0; i < PCH_OBJ_NUM; i++) {
-		if (priv->msg_obj[i] == PCH_MSG_OBJ_RX)
-			pch_can_set_rx_enable(priv, i + 1, PCH_ENABLE);
-	}
-}
 
-static void pch_can_rx_disable_all(struct pch_can_priv *priv)
+static void pch_can_set_rx_all(struct pch_can_priv *priv, u32 set)
 {
 	int i;
 
 	/* Traversing to obtain the object configured as receivers. */
 	for (i = 0; i < PCH_OBJ_NUM; i++) {
 		if (priv->msg_obj[i] == PCH_MSG_OBJ_RX)
-			pch_can_set_rx_enable(priv, i + 1, PCH_DISABLE);
-	}
-}
-
-static void pch_can_set_tx_enable(struct pch_can_priv *priv, u32 buff_num,
-				 u32 set)
-{
-	unsigned long flags;
-
-	spin_lock_irqsave(&priv->msgif_reg_lock, flags);
-	/* Reading the Msg buffer from Message RAM to Interface2 registers. */
-	iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->if2_cmask);
-	pch_can_check_if_busy(&priv->regs->if2_creq, buff_num);
-
-	/* Setting the IF2CMASK register for accessing the
-		MsgVal and TxIE bits */
-	iowrite32(PCH_CMASK_RDWR | PCH_CMASK_ARB | PCH_CMASK_CTRL,
-		 &priv->regs->if2_cmask);
-
-	if (set == PCH_ENABLE) {
-		/* Setting the MsgVal and TxIE bits */
-		pch_can_bit_set(&priv->regs->if2_mcont, PCH_IF_MCONT_TXIE);
-		pch_can_bit_set(&priv->regs->if2_id2, PCH_ID_MSGVAL);
-	} else if (set == PCH_DISABLE) {
-		/* Resetting the MsgVal and TxIE bits. */
-		pch_can_bit_clear(&priv->regs->if2_mcont, PCH_IF_MCONT_TXIE);
-		pch_can_bit_clear(&priv->regs->if2_id2, PCH_ID_MSGVAL);
-	}
-
-	pch_can_check_if_busy(&priv->regs->if2_creq, buff_num);
-	spin_unlock_irqrestore(&priv->msgif_reg_lock, flags);
-}
-
-static void pch_can_tx_enable_all(struct pch_can_priv *priv)
-{
-	int i;
-
-	/* Traversing to obtain the object configured as transmit object. */
-	for (i = 0; i < PCH_OBJ_NUM; i++) {
-		if (priv->msg_obj[i] == PCH_MSG_OBJ_TX)
-			pch_can_set_tx_enable(priv, i + 1, PCH_ENABLE);
+			pch_can_set_rxtx(priv, i + 1, set, PCH_RX_IFREG);
 	}
 }
 
-static void pch_can_tx_disable_all(struct pch_can_priv *priv)
+static void pch_can_set_tx_all(struct pch_can_priv *priv, u32 set)
 {
 	int i;
 
 	/* Traversing to obtain the object configured as transmit object. */
 	for (i = 0; i < PCH_OBJ_NUM; i++) {
 		if (priv->msg_obj[i] == PCH_MSG_OBJ_TX)
-			pch_can_set_tx_enable(priv, i + 1, PCH_DISABLE);
+			pch_can_set_rxtx(priv, i + 1, set, PCH_TX_IFREG);
 	}
 }
 
-static void pch_can_get_rx_enable(struct pch_can_priv *priv, u32 buff_num,
-				 u32 *enable)
+static u32 pch_can_get_rxtx_ir(struct pch_can_priv *priv, u32 buff_num,
+			       enum pch_ifreg dir)
 {
 	unsigned long flags;
+	u32 ie, enable;
 
-	spin_lock_irqsave(&priv->msgif_reg_lock, flags);
-	iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->if1_cmask);
-	pch_can_check_if_busy(&priv->regs->if1_creq, buff_num);
-
-	if (((ioread32(&priv->regs->if1_id2)) & PCH_ID_MSGVAL) &&
-			((ioread32(&priv->regs->if1_mcont)) &
-			PCH_IF_MCONT_RXIE))
-		*enable = PCH_ENABLE;
+	if (dir)
+		ie = PCH_IF_MCONT_RXIE;
 	else
-		*enable = PCH_DISABLE;
-	spin_unlock_irqrestore(&priv->msgif_reg_lock, flags);
-}
-
-static void pch_can_get_tx_enable(struct pch_can_priv *priv, u32 buff_num,
-				 u32 *enable)
-{
-	unsigned long flags;
+		ie = PCH_IF_MCONT_TXIE;
 
 	spin_lock_irqsave(&priv->msgif_reg_lock, flags);
-	iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->if2_cmask);
-	pch_can_check_if_busy(&priv->regs->if2_creq, buff_num);
+	iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->ifregs[dir].cmask);
+	pch_can_check_if_busy(&priv->regs->ifregs[dir].creq, buff_num);
 
-	if (((ioread32(&priv->regs->if2_id2)) & PCH_ID_MSGVAL) &&
-			((ioread32(&priv->regs->if2_mcont)) &
-			PCH_IF_MCONT_TXIE)) {
-		*enable = PCH_ENABLE;
+	if (((ioread32(&priv->regs->ifregs[dir].id2)) & PCH_ID_MSGVAL) &&
+			((ioread32(&priv->regs->ifregs[dir].mcont)) & ie)) {
+		enable = PCH_ENABLE;
 	} else {
-		*enable = PCH_DISABLE;
+		enable = PCH_DISABLE;
 	}
 	spin_unlock_irqrestore(&priv->msgif_reg_lock, flags);
+	return enable;
 }
 
 static int pch_can_int_pending(struct pch_can_priv *priv)
@@ -453,15 +400,17 @@ static void pch_can_set_rx_buffer_link(struct pch_can_priv *priv,
 	unsigned long flags;
 
 	spin_lock_irqsave(&priv->msgif_reg_lock, flags);
-	iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->if1_cmask);
-	pch_can_check_if_busy(&priv->regs->if1_creq, buffer_num);
-	iowrite32(PCH_CMASK_RDWR | PCH_CMASK_CTRL, &priv->regs->if1_cmask);
+	iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->ifregs[0].cmask);
+	pch_can_check_if_busy(&priv->regs->ifregs[0].creq, buffer_num);
+	iowrite32(PCH_CMASK_RDWR | PCH_CMASK_CTRL,
+		  &priv->regs->ifregs[0].cmask);
 	if (set == PCH_ENABLE)
-		pch_can_bit_clear(&priv->regs->if1_mcont, PCH_IF_MCONT_EOB);
+		pch_can_bit_clear(&priv->regs->ifregs[0].mcont,
+				  PCH_IF_MCONT_EOB);
 	else
-		pch_can_bit_set(&priv->regs->if1_mcont, PCH_IF_MCONT_EOB);
+		pch_can_bit_set(&priv->regs->ifregs[0].mcont, PCH_IF_MCONT_EOB);
 
-	pch_can_check_if_busy(&priv->regs->if1_creq, buffer_num);
+	pch_can_check_if_busy(&priv->regs->ifregs[0].creq, buffer_num);
 	spin_unlock_irqrestore(&priv->msgif_reg_lock, flags);
 }
 
@@ -471,10 +420,10 @@ static void pch_can_get_rx_buffer_link(struct pch_can_priv *priv,
 	unsigned long flags;
 
 	spin_lock_irqsave(&priv->msgif_reg_lock, flags);
-	iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->if1_cmask);
-	pch_can_check_if_busy(&priv->regs->if1_creq, buffer_num);
+	iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->ifregs[0].cmask);
+	pch_can_check_if_busy(&priv->regs->ifregs[0].creq, buffer_num);
 
-	if (ioread32(&priv->regs->if1_mcont) & PCH_IF_MCONT_EOB)
+	if (ioread32(&priv->regs->ifregs[0].mcont) & PCH_IF_MCONT_EOB)
 		*link = PCH_DISABLE;
 	else
 		*link = PCH_ENABLE;
@@ -486,37 +435,37 @@ static void pch_can_clear_buffers(struct pch_can_priv *priv)
 	int i;
 
 	for (i = 0; i < PCH_RX_OBJ_NUM; i++) {
-		iowrite32(PCH_CMASK_RX_TX_SET, &priv->regs->if1_cmask);
-		iowrite32(0xffff, &priv->regs->if1_mask1);
-		iowrite32(0xffff, &priv->regs->if1_mask2);
-		iowrite32(0x0, &priv->regs->if1_id1);
-		iowrite32(0x0, &priv->regs->if1_id2);
-		iowrite32(0x0, &priv->regs->if1_mcont);
-		iowrite32(0x0, &priv->regs->if1_dataa1);
-		iowrite32(0x0, &priv->regs->if1_dataa2);
-		iowrite32(0x0, &priv->regs->if1_datab1);
-		iowrite32(0x0, &priv->regs->if1_datab2);
+		iowrite32(PCH_CMASK_RX_TX_SET, &priv->regs->ifregs[0].cmask);
+		iowrite32(0xffff, &priv->regs->ifregs[0].mask1);
+		iowrite32(0xffff, &priv->regs->ifregs[0].mask2);
+		iowrite32(0x0, &priv->regs->ifregs[0].id1);
+		iowrite32(0x0, &priv->regs->ifregs[0].id2);
+		iowrite32(0x0, &priv->regs->ifregs[0].mcont);
+		iowrite32(0x0, &priv->regs->ifregs[0].dataa1);
+		iowrite32(0x0, &priv->regs->ifregs[0].dataa2);
+		iowrite32(0x0, &priv->regs->ifregs[0].datab1);
+		iowrite32(0x0, &priv->regs->ifregs[0].datab2);
 		iowrite32(PCH_CMASK_RDWR | PCH_CMASK_MASK |
 			  PCH_CMASK_ARB | PCH_CMASK_CTRL,
-			  &priv->regs->if1_cmask);
-		pch_can_check_if_busy(&priv->regs->if1_creq, i+1);
+			  &priv->regs->ifregs[0].cmask);
+		pch_can_check_if_busy(&priv->regs->ifregs[0].creq, i+1);
 	}
 
 	for (i = i;  i < PCH_OBJ_NUM; i++) {
-		iowrite32(PCH_CMASK_RX_TX_SET, &priv->regs->if2_cmask);
-		iowrite32(0xffff, &priv->regs->if2_mask1);
-		iowrite32(0xffff, &priv->regs->if2_mask2);
-		iowrite32(0x0, &priv->regs->if2_id1);
-		iowrite32(0x0, &priv->regs->if2_id2);
-		iowrite32(0x0, &priv->regs->if2_mcont);
-		iowrite32(0x0, &priv->regs->if2_dataa1);
-		iowrite32(0x0, &priv->regs->if2_dataa2);
-		iowrite32(0x0, &priv->regs->if2_datab1);
-		iowrite32(0x0, &priv->regs->if2_datab2);
+		iowrite32(PCH_CMASK_RX_TX_SET, &priv->regs->ifregs[1].cmask);
+		iowrite32(0xffff, &priv->regs->ifregs[1].mask1);
+		iowrite32(0xffff, &priv->regs->ifregs[1].mask2);
+		iowrite32(0x0, &priv->regs->ifregs[1].id1);
+		iowrite32(0x0, &priv->regs->ifregs[1].id2);
+		iowrite32(0x0, &priv->regs->ifregs[1].mcont);
+		iowrite32(0x0, &priv->regs->ifregs[1].dataa1);
+		iowrite32(0x0, &priv->regs->ifregs[1].dataa2);
+		iowrite32(0x0, &priv->regs->ifregs[1].datab1);
+		iowrite32(0x0, &priv->regs->ifregs[1].datab2);
 		iowrite32(PCH_CMASK_RDWR | PCH_CMASK_MASK |
 			  PCH_CMASK_ARB | PCH_CMASK_CTRL,
-			  &priv->regs->if2_cmask);
-		pch_can_check_if_busy(&priv->regs->if2_creq, i+1);
+			  &priv->regs->ifregs[1].cmask);
+		pch_can_check_if_busy(&priv->regs->ifregs[1].creq, i+1);
 	}
 }
 
@@ -530,58 +479,60 @@ static void pch_can_config_rx_tx_buffers(struct pch_can_priv *priv)
 	for (i = 0; i < PCH_OBJ_NUM; i++) {
 		if (priv->msg_obj[i] == PCH_MSG_OBJ_RX) {
 			iowrite32(PCH_CMASK_RX_TX_GET,
-				&priv->regs->if1_cmask);
-			pch_can_check_if_busy(&priv->regs->if1_creq, i+1);
+				&priv->regs->ifregs[0].cmask);
+			pch_can_check_if_busy(&priv->regs->ifregs[0].creq, i+1);
 
-			iowrite32(0x0, &priv->regs->if1_id1);
-			iowrite32(0x0, &priv->regs->if1_id2);
+			iowrite32(0x0, &priv->regs->ifregs[0].id1);
+			iowrite32(0x0, &priv->regs->ifregs[0].id2);
 
-			pch_can_bit_set(&priv->regs->if1_mcont,
+			pch_can_bit_set(&priv->regs->ifregs[0].mcont,
 					PCH_IF_MCONT_UMASK);
 
 			/* Set FIFO mode set to 0 except last Rx Obj*/
-			pch_can_bit_clear(&priv->regs->if1_mcont,
+			pch_can_bit_clear(&priv->regs->ifregs[0].mcont,
 					  PCH_IF_MCONT_EOB);
 			/* In case FIFO mode, Last EoB of Rx Obj must be 1 */
 			if (i == (PCH_RX_OBJ_NUM - 1))
-				pch_can_bit_set(&priv->regs->if1_mcont,
+				pch_can_bit_set(&priv->regs->ifregs[0].mcont,
 						  PCH_IF_MCONT_EOB);
 
-			iowrite32(0, &priv->regs->if1_mask1);
-			pch_can_bit_clear(&priv->regs->if1_mask2,
+			iowrite32(0, &priv->regs->ifregs[0].mask1);
+			pch_can_bit_clear(&priv->regs->ifregs[0].mask2,
 					  0x1fff | PCH_MASK2_MDIR_MXTD);
 
 			/* Setting CMASK for writing */
 			iowrite32(PCH_CMASK_RDWR | PCH_CMASK_MASK |
 				  PCH_CMASK_ARB | PCH_CMASK_CTRL,
-				  &priv->regs->if1_cmask);
+				  &priv->regs->ifregs[0].cmask);
 
-			pch_can_check_if_busy(&priv->regs->if1_creq, i+1);
+			pch_can_check_if_busy(&priv->regs->ifregs[0].creq, i+1);
 		} else if (priv->msg_obj[i] == PCH_MSG_OBJ_TX) {
 			iowrite32(PCH_CMASK_RX_TX_GET,
-				&priv->regs->if2_cmask);
-			pch_can_check_if_busy(&priv->regs->if2_creq, i+1);
+				&priv->regs->ifregs[1].cmask);
+			pch_can_check_if_busy(&priv->regs->ifregs[1].creq, i+1);
 
 			/* Resetting DIR bit for reception */
-			iowrite32(0x0, &priv->regs->if2_id1);
-			iowrite32(0x0, &priv->regs->if2_id2);
-			pch_can_bit_set(&priv->regs->if2_id2, PCH_ID2_DIR);
+			iowrite32(0x0, &priv->regs->ifregs[1].id1);
+			iowrite32(0x0, &priv->regs->ifregs[1].id2);
+			pch_can_bit_set(&priv->regs->ifregs[1].id2,
+					PCH_ID2_DIR);
 
 			/* Setting EOB bit for transmitter */
-			iowrite32(PCH_IF_MCONT_EOB, &priv->regs->if2_mcont);
+			iowrite32(PCH_IF_MCONT_EOB,
+				  &priv->regs->ifregs[1].mcont);
 
-			pch_can_bit_set(&priv->regs->if2_mcont,
+			pch_can_bit_set(&priv->regs->ifregs[1].mcont,
 					PCH_IF_MCONT_UMASK);
 
-			iowrite32(0, &priv->regs->if2_mask1);
-			pch_can_bit_clear(&priv->regs->if2_mask2, 0x1fff);
+			iowrite32(0, &priv->regs->ifregs[1].mask1);
+			pch_can_bit_clear(&priv->regs->ifregs[1].mask2, 0x1fff);
 
 			/* Setting CMASK for writing */
 			iowrite32(PCH_CMASK_RDWR | PCH_CMASK_MASK |
 				  PCH_CMASK_ARB | PCH_CMASK_CTRL,
-				  &priv->regs->if2_cmask);
+				  &priv->regs->ifregs[1].cmask);
 
-			pch_can_check_if_busy(&priv->regs->if2_creq, i+1);
+			pch_can_check_if_busy(&priv->regs->ifregs[1].creq, i+1);
 		}
 	}
 	spin_unlock_irqrestore(&priv->msgif_reg_lock, flags);
@@ -611,10 +562,10 @@ static void pch_can_release(struct pch_can_priv *priv)
 	pch_can_set_int_enables(priv, PCH_CAN_NONE);
 
 	/* Disabling all the receive object. */
-	pch_can_rx_disable_all(priv);
+	pch_can_set_rx_all(priv, 0);
 
 	/* Disabling all the transmit object. */
-	pch_can_tx_disable_all(priv);
+	pch_can_set_tx_all(priv, 0);
 }
 
 /* This function clears interrupt(s) from the CAN device. */
@@ -630,31 +581,31 @@ static void pch_can_int_clr(struct pch_can_priv *priv, u32 mask)
 		/* Setting CMASK for clearing interrupts for
 					 frame transmission. */
 		iowrite32(PCH_CMASK_RDWR | PCH_CMASK_CTRL | PCH_CMASK_ARB,
-			  &priv->regs->if2_cmask);
+			  &priv->regs->ifregs[1].cmask);
 
 		/* Resetting the ID registers. */
-		pch_can_bit_set(&priv->regs->if2_id2,
+		pch_can_bit_set(&priv->regs->ifregs[1].id2,
 			       PCH_ID2_DIR | (0x7ff << 2));
-		iowrite32(0x0, &priv->regs->if2_id1);
+		iowrite32(0x0, &priv->regs->ifregs[1].id1);
 
 		/* Claring NewDat, TxRqst & IntPnd */
-		pch_can_bit_clear(&priv->regs->if2_mcont,
+		pch_can_bit_clear(&priv->regs->ifregs[1].mcont,
 				  PCH_IF_MCONT_NEWDAT | PCH_IF_MCONT_INTPND |
 				  PCH_IF_MCONT_TXRQXT);
-		pch_can_check_if_busy(&priv->regs->if2_creq, mask);
+		pch_can_check_if_busy(&priv->regs->ifregs[1].creq, mask);
 	} else if (priv->msg_obj[mask - 1] == PCH_MSG_OBJ_RX) {
 		/* Setting CMASK for clearing the reception interrupts. */
 		iowrite32(PCH_CMASK_RDWR | PCH_CMASK_CTRL | PCH_CMASK_ARB,
-			  &priv->regs->if1_cmask);
+			  &priv->regs->ifregs[0].cmask);
 
 		/* Clearing the Dir bit. */
-		pch_can_bit_clear(&priv->regs->if1_id2, PCH_ID2_DIR);
+		pch_can_bit_clear(&priv->regs->ifregs[0].id2, PCH_ID2_DIR);
 
 		/* Clearing NewDat & IntPnd */
-		pch_can_bit_clear(&priv->regs->if1_mcont,
+		pch_can_bit_clear(&priv->regs->ifregs[0].mcont,
 				  PCH_IF_MCONT_NEWDAT | PCH_IF_MCONT_INTPND);
 
-		pch_can_check_if_busy(&priv->regs->if1_creq, mask);
+		pch_can_check_if_busy(&priv->regs->ifregs[0].creq, mask);
 	}
 }
 
@@ -685,8 +636,8 @@ static void pch_can_error(struct net_device *ndev, u32 status)
 		return;
 
 	if (status & PCH_BUS_OFF) {
-		pch_can_tx_disable_all(priv);
-		pch_can_rx_disable_all(priv);
+		pch_can_set_tx_all(priv, 0);
+		pch_can_set_rx_all(priv, 0);
 		state = CAN_STATE_BUS_OFF;
 		cf->can_id |= CAN_ERR_BUSOFF;
 		can_bus_off(ndev);
@@ -783,22 +734,22 @@ static int pch_can_rx_normal(struct net_device *ndev, u32 int_stat)
 	struct net_device_stats *stats = &(priv->ndev->stats);
 
 	/* Reading the messsage object from the Message RAM */
-	iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->if1_cmask);
-	pch_can_check_if_busy(&priv->regs->if1_creq, int_stat);
+	iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->ifregs[0].cmask);
+	pch_can_check_if_busy(&priv->regs->ifregs[0].creq, int_stat);
 
 	/* Reading the MCONT register. */
-	reg = ioread32(&priv->regs->if1_mcont);
+	reg = ioread32(&priv->regs->ifregs[0].mcont);
 	reg &= 0xffff;
 
 	for (k = int_stat; !(reg & PCH_IF_MCONT_EOB); k++) {
 		/* If MsgLost bit set. */
 		if (reg & PCH_IF_MCONT_MSGLOST) {
 			dev_err(&priv->ndev->dev, "Msg Obj is overwritten.\n");
-			pch_can_bit_clear(&priv->regs->if1_mcont,
+			pch_can_bit_clear(&priv->regs->ifregs[0].mcont,
 					  PCH_IF_MCONT_MSGLOST);
 			iowrite32(PCH_CMASK_RDWR | PCH_CMASK_CTRL,
-				  &priv->regs->if1_cmask);
-			pch_can_check_if_busy(&priv->regs->if1_creq, k);
+				  &priv->regs->ifregs[0].cmask);
+			pch_can_check_if_busy(&priv->regs->ifregs[0].creq, k);
 
 			skb = alloc_can_err_skb(ndev, &cf);
 			if (!skb)
@@ -824,29 +775,30 @@ static int pch_can_rx_normal(struct net_device *ndev, u32 int_stat)
 			return -ENOMEM;
 
 		/* Get Received data */
-		ide = ((ioread32(&priv->regs->if1_id2)) & PCH_ID2_XTD) >> 14;
+		ide = ((ioread32(&priv->regs->ifregs[0].id2)) & PCH_ID2_XTD) >>
+									     14;
 		if (ide) {
-			id = (ioread32(&priv->regs->if1_id1) & 0xffff);
-			id |= (((ioread32(&priv->regs->if1_id2)) &
+			id = (ioread32(&priv->regs->ifregs[0].id1) & 0xffff);
+			id |= (((ioread32(&priv->regs->ifregs[0].id2)) &
 					    0x1fff) << 16);
 			cf->can_id = (id & CAN_EFF_MASK) | CAN_EFF_FLAG;
 		} else {
-			id = (((ioread32(&priv->regs->if1_id2)) &
-					  (CAN_SFF_MASK << 2)) >> 2);
+			id = (((ioread32(&priv->regs->ifregs[0].id2)) &
+						     (CAN_SFF_MASK << 2)) >> 2);
 			cf->can_id = (id & CAN_SFF_MASK);
 		}
 
-		rtr = (ioread32(&priv->regs->if1_id2) &  PCH_ID2_DIR);
+		rtr = (ioread32(&priv->regs->ifregs[0].id2) &  PCH_ID2_DIR);
 		if (rtr) {
 			cf->can_dlc = 0;
 			cf->can_id |= CAN_RTR_FLAG;
 		} else {
-			cf->can_dlc = ((ioread32(&priv->regs->if1_mcont)) &
-						   0x0f);
+			cf->can_dlc = ((ioread32(&priv->regs->ifregs[0].mcont))
+						 & 0x0f);
 		}
 
 		for (i = 0, j = 0; i < cf->can_dlc; j++) {
-			reg = ioread32(&priv->regs->if1_dataa1 + j*4);
+			reg = ioread32(&priv->regs->ifregs[0].dataa1 + j*4);
 			cf->data[i++] = cpu_to_le32(reg & 0xff);
 			if (i == cf->can_dlc)
 				break;
@@ -860,15 +812,16 @@ static int pch_can_rx_normal(struct net_device *ndev, u32 int_stat)
 
 		if (k < PCH_FIFO_THRESH) {
 			iowrite32(PCH_CMASK_RDWR | PCH_CMASK_CTRL |
-				  PCH_CMASK_ARB, &priv->regs->if1_cmask);
+				  PCH_CMASK_ARB, &priv->regs->ifregs[0].cmask);
 
 			/* Clearing the Dir bit. */
-			pch_can_bit_clear(&priv->regs->if1_id2, PCH_ID2_DIR);
+			pch_can_bit_clear(&priv->regs->ifregs[0].id2,
+					  PCH_ID2_DIR);
 
 			/* Clearing NewDat & IntPnd */
-			pch_can_bit_clear(&priv->regs->if1_mcont,
+			pch_can_bit_clear(&priv->regs->ifregs[0].mcont,
 					  PCH_IF_MCONT_INTPND);
-			pch_can_check_if_busy(&priv->regs->if1_creq, k);
+			pch_can_check_if_busy(&priv->regs->ifregs[0].creq, k);
 		} else if (k > PCH_FIFO_THRESH) {
 			pch_can_int_clr(priv, k);
 		} else if (k == PCH_FIFO_THRESH) {
@@ -878,9 +831,9 @@ static int pch_can_rx_normal(struct net_device *ndev, u32 int_stat)
 		}
 RX_NEXT:
 		/* Reading the messsage object from the Message RAM */
-		iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->if1_cmask);
-		pch_can_check_if_busy(&priv->regs->if1_creq, k + 1);
-		reg = ioread32(&priv->regs->if1_mcont);
+		iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->ifregs[0].cmask);
+		pch_can_check_if_busy(&priv->regs->ifregs[0].creq, k + 1);
+		reg = ioread32(&priv->regs->ifregs[0].mcont);
 	}
 
 	return rcv_pkts;
@@ -910,8 +863,9 @@ INT_STAT:
 
 		if (reg_stat & PCH_TX_OK) {
 			spin_lock_irqsave(&priv->msgif_reg_lock, flags);
-			iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->if2_cmask);
-			pch_can_check_if_busy(&priv->regs->if2_creq,
+			iowrite32(PCH_CMASK_RX_TX_GET,
+				  &priv->regs->ifregs[1].cmask);
+			pch_can_check_if_busy(&priv->regs->ifregs[1].creq,
 					       ioread32(&priv->regs->intr));
 			spin_unlock_irqrestore(&priv->msgif_reg_lock, flags);
 			pch_can_bit_clear(&priv->regs->stat, PCH_TX_OK);
@@ -938,10 +892,11 @@ MSG_OBJ:
 			can_get_echo_skb(ndev, int_stat - PCH_RX_OBJ_NUM - 1);
 			spin_lock_irqsave(&priv->msgif_reg_lock, flags);
 			iowrite32(PCH_CMASK_RX_TX_GET | PCH_CMASK_CLRINTPND,
-				  &priv->regs->if2_cmask);
-			dlc = ioread32(&priv->regs->if2_mcont) &
+				  &priv->regs->ifregs[1].cmask);
+			dlc = ioread32(&priv->regs->ifregs[1].mcont) &
 				       PCH_IF_MCONT_DLC;
-			pch_can_check_if_busy(&priv->regs->if2_creq, int_stat);
+			pch_can_check_if_busy(&priv->regs->ifregs[1].creq,
+					      int_stat);
 			spin_unlock_irqrestore(&priv->msgif_reg_lock, flags);
 			if (dlc > 8)
 				dlc = 8;
@@ -996,8 +951,8 @@ static void pch_can_start(struct net_device *ndev)
 	pch_set_bittiming(ndev);
 	pch_can_set_optmode(priv);
 
-	pch_can_tx_enable_all(priv);
-	pch_can_rx_enable_all(priv);
+	pch_can_set_tx_all(priv, 1);
+	pch_can_set_rx_all(priv, 1);
 
 	/* Setting the CAN to run mode. */
 	pch_can_set_run_mode(priv, PCH_CAN_RUN);
@@ -1125,54 +1080,55 @@ static netdev_tx_t pch_xmit(struct sk_buff *skb, struct net_device *ndev)
 	spin_lock_irqsave(&priv->msgif_reg_lock, flags);
 
 	/* Reading the Msg Obj from the Msg RAM to the Interface register. */
-	iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->if2_cmask);
-	pch_can_check_if_busy(&priv->regs->if2_creq, tx_buffer_avail);
+	iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->ifregs[1].cmask);
+	pch_can_check_if_busy(&priv->regs->ifregs[1].creq, tx_buffer_avail);
 
 	/* Setting the CMASK register. */
-	pch_can_bit_set(&priv->regs->if2_cmask, PCH_CMASK_ALL);
+	pch_can_bit_set(&priv->regs->ifregs[1].cmask, PCH_CMASK_ALL);
 
 	/* If ID extended is set. */
-	pch_can_bit_clear(&priv->regs->if2_id1, 0xffff);
-	pch_can_bit_clear(&priv->regs->if2_id2, 0x1fff | PCH_ID2_XTD);
+	pch_can_bit_clear(&priv->regs->ifregs[1].id1, 0xffff);
+	pch_can_bit_clear(&priv->regs->ifregs[1].id2, 0x1fff | PCH_ID2_XTD);
 	if (cf->can_id & CAN_EFF_FLAG) {
-		pch_can_bit_set(&priv->regs->if2_id1, cf->can_id & 0xffff);
-		pch_can_bit_set(&priv->regs->if2_id2,
+		pch_can_bit_set(&priv->regs->ifregs[1].id1,
+				cf->can_id & 0xffff);
+		pch_can_bit_set(&priv->regs->ifregs[1].id2,
 				((cf->can_id >> 16) & 0x1fff) | PCH_ID2_XTD);
 	} else {
-		pch_can_bit_set(&priv->regs->if2_id1, 0);
-		pch_can_bit_set(&priv->regs->if2_id2,
+		pch_can_bit_set(&priv->regs->ifregs[1].id1, 0);
+		pch_can_bit_set(&priv->regs->ifregs[1].id2,
 				(cf->can_id & CAN_SFF_MASK) << 2);
 	}
 
 	/* If remote frame has to be transmitted.. */
 	if (cf->can_id & CAN_RTR_FLAG)
-		pch_can_bit_clear(&priv->regs->if2_id2, PCH_ID2_DIR);
+		pch_can_bit_clear(&priv->regs->ifregs[1].id2, PCH_ID2_DIR);
 
 	for (i = 0, j = 0; i < cf->can_dlc; j++) {
 		iowrite32(le32_to_cpu(cf->data[i++]),
-			 (&priv->regs->if2_dataa1) + j*4);
+			 (&priv->regs->ifregs[1].dataa1) + j*4);
 		if (i == cf->can_dlc)
 			break;
 		iowrite32(le32_to_cpu(cf->data[i++] << 8),
-			 (&priv->regs->if2_dataa1) + j*4);
+			 (&priv->regs->ifregs[1].dataa1) + j*4);
 	}
 
 	can_put_echo_skb(skb, ndev, tx_buffer_avail - PCH_RX_OBJ_NUM - 1);
 
 	/* Updating the size of the data. */
-	pch_can_bit_clear(&priv->regs->if2_mcont, 0x0f);
-	pch_can_bit_set(&priv->regs->if2_mcont, cf->can_dlc);
+	pch_can_bit_clear(&priv->regs->ifregs[1].mcont, 0x0f);
+	pch_can_bit_set(&priv->regs->ifregs[1].mcont, cf->can_dlc);
 
 	/* Clearing IntPend, NewDat & TxRqst */
-	pch_can_bit_clear(&priv->regs->if2_mcont,
+	pch_can_bit_clear(&priv->regs->ifregs[1].mcont,
 			  PCH_IF_MCONT_NEWDAT | PCH_IF_MCONT_INTPND |
 			  PCH_IF_MCONT_TXRQXT);
 
 	/* Setting NewDat, TxRqst bits */
-	pch_can_bit_set(&priv->regs->if2_mcont,
+	pch_can_bit_set(&priv->regs->ifregs[1].mcont,
 			PCH_IF_MCONT_NEWDAT | PCH_IF_MCONT_TXRQXT);
 
-	pch_can_check_if_busy(&priv->regs->if2_creq, tx_buffer_avail);
+	pch_can_check_if_busy(&priv->regs->ifregs[1].creq, tx_buffer_avail);
 
 	spin_unlock_irqrestore(&priv->msgif_reg_lock, flags);
 
@@ -1234,25 +1190,25 @@ static int pch_can_suspend(struct pci_dev *pdev, pm_message_t state)
 	/* Save Tx buffer enable state */
 	for (i = 0; i < PCH_OBJ_NUM; i++) {
 		if (priv->msg_obj[i] == PCH_MSG_OBJ_TX)
-			pch_can_get_tx_enable(priv, i + 1,
-					      &(priv->tx_enable[i]));
+			priv->tx_enable[i] = pch_can_get_rxtx_ir(priv, i + 1,
+								 PCH_TX_IFREG);
 	}
 
 	/* Disable all Transmit buffers */
-	pch_can_tx_disable_all(priv);
+	pch_can_set_tx_all(priv, 0);
 
 	/* Save Rx buffer enable state */
 	for (i = 0; i < PCH_OBJ_NUM; i++) {
 		if (priv->msg_obj[i] == PCH_MSG_OBJ_RX) {
-			pch_can_get_rx_enable(priv, i + 1,
-						&(priv->rx_enable[i]));
+			priv->rx_enable[i] = pch_can_get_rxtx_ir(priv, i + 1,
+						PCH_RX_IFREG);
 			pch_can_get_rx_buffer_link(priv, i + 1,
 						&(priv->rx_link[i]));
 		}
 	}
 
 	/* Disable all Receive buffers */
-	pch_can_rx_disable_all(priv);
+	pch_can_set_rx_all(priv, 0);
 	retval = pci_save_state(pdev);
 	if (retval) {
 		dev_err(&pdev->dev, "pci_save_state failed.\n");
@@ -1301,10 +1257,9 @@ static int pch_can_resume(struct pci_dev *pdev)
 
 	/* Enabling the transmit buffer. */
 	for (i = 0; i < PCH_OBJ_NUM; i++) {
-		if (priv->msg_obj[i] == PCH_MSG_OBJ_TX) {
-			pch_can_set_tx_enable(priv, i + 1,
-					      priv->tx_enable[i]);
-		}
+		if (priv->msg_obj[i] == PCH_MSG_OBJ_TX)
+			pch_can_set_rxtx(priv, i, priv->tx_enable[i],
+					 PCH_TX_IFREG);
 	}
 
 	/* Configuring the receive buffer and enabling them. */
@@ -1315,7 +1270,9 @@ static int pch_can_resume(struct pci_dev *pdev)
 						   priv->rx_link[i]);
 
 			/* Restore buffer enables */
-			pch_can_set_rx_enable(priv, i + 1, priv->rx_enable[i]);
+			pch_can_set_rxtx(priv, i, priv->rx_enable[i],
+					 PCH_RX_IFREG);
+
 		}
 	}
 
-- 
1.6.0.6

^ permalink raw reply related

* Re: [PATCH net-next-2.6 8/17 v2] can: EG20T PCH: Change Copyright and module description
From: Tomoya MORINAGA @ 2010-12-07  9:50 UTC (permalink / raw)
  To: Marc Kleine-Budde
  Cc: andrew.chih.howe.khor-ral2JQCrhuEAvxtiuMwx3w,
	qi.wang-ral2JQCrhuEAvxtiuMwx3w,
	margie.foster-ral2JQCrhuEAvxtiuMwx3w,
	netdev-u79uwXL29TY76Z2rM5mHXA, yong.y.wang-ral2JQCrhuEAvxtiuMwx3w,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
	kok.howg.ewe-ral2JQCrhuEAvxtiuMwx3w,
	joel.clark-ral2JQCrhuEAvxtiuMwx3w, Wolfgang Grandegger

> In case single destination address is OK, but in case multiple address is 
> set,
> I can see the following error.
> Relay access denied

The above was not true.
It seems in case destination mail domain is external, (except 
"@okisemi.com"),
this error is occurred.
In fact, in case multiple address with internal domain,
it is success to send patch.

Our smtp server may have restriction of something.

It seems I must use mailer "thunderbird" again.

Thanks,

/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
Tomoya Morinaga
OKI SEMICONDUCTOR CO., LTD. 

^ permalink raw reply

* Re: [PATCH] xfrm: Fix xfrm_state_migrate leak
From: Herbert Xu @ 2010-12-07  9:31 UTC (permalink / raw)
  To: Steffen Klassert; +Cc: David Miller, Thomas Egerer, netdev
In-Reply-To: <20101207092856.GL4639@secunet.com>

On Tue, Dec 07, 2010 at 10:28:56AM +0100, Steffen Klassert wrote:
> From: Thomas Egerer <thomas.egerer@secunet.com>
> 
> xfrm_state_migrate calls kfree instead of xfrm_state_put to free
> a failed state. According to git commit 553f9118 this can cause
> memory leaks.
> 
> Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>

Acked-by: Herbert Xu <herbert@gondor.apana.org.au>

Good catch.  Thanks!
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply

* [PATCH] xfrm: Fix xfrm_state_migrate leak
From: Steffen Klassert @ 2010-12-07  9:28 UTC (permalink / raw)
  To: David Miller; +Cc: Herbert Xu, Thomas Egerer, netdev

From: Thomas Egerer <thomas.egerer@secunet.com>

xfrm_state_migrate calls kfree instead of xfrm_state_put to free
a failed state. According to git commit 553f9118 this can cause
memory leaks.

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
 net/xfrm/xfrm_state.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index eb96ce5..220ebc0 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -1268,7 +1268,7 @@ struct xfrm_state * xfrm_state_migrate(struct xfrm_state *x,
 
 	return xc;
 error:
-	kfree(xc);
+	xfrm_state_put(xc);
 	return NULL;
 }
 EXPORT_SYMBOL(xfrm_state_migrate);
-- 
1.7.0.4


^ permalink raw reply related

* Re: [PATCH net-next-2.6 8/17 v2] can: EG20T PCH: Change Copyright and module description
From: Tomoya MORINAGA @ 2010-12-07  8:32 UTC (permalink / raw)
  To: Marc Kleine-Budde
  Cc: Wolfgang Grandegger, Wolfram Sang, Christian Pellegrin,
	Barry Song, Samuel Ortiz, socketcan-core, netdev, linux-kernel,
	David S. Miller, qi.wang, yong.y.wang, andrew.chih.howe.khor,
	joel.clark, kok.howg.ewe, margie.foster
In-Reply-To: <4CFDEA1A.6020806@pengutronix.de>

On Tuesday, December 07, 2010 5:02 PM, Marc Kleine-Budde wrote:

> According to my man page it's:

> --cc=<address>
> --to=<address>

As to the above, I had already done.
But, issue remains to be seen.

Thanks
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
Tomoya Morinaga
OKI SEMICONDUCTOR CO., LTD.

^ permalink raw reply

* Re: [PATCH net-next-2.6 8/17 v2] can: EG20T PCH: Change Copyright and module description
From: Marc Kleine-Budde @ 2010-12-07  8:02 UTC (permalink / raw)
  To: Tomoya MORINAGA
  Cc: andrew.chih.howe.khor-ral2JQCrhuEAvxtiuMwx3w, Samuel Ortiz,
	margie.foster-ral2JQCrhuEAvxtiuMwx3w,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
	yong.y.wang-ral2JQCrhuEAvxtiuMwx3w,
	kok.howg.ewe-ral2JQCrhuEAvxtiuMwx3w, Wolfgang Grandegger,
	joel.clark-ral2JQCrhuEAvxtiuMwx3w, David S. Miller,
	Christian Pellegrin, qi.wang-ral2JQCrhuEAvxtiuMwx3w
In-Reply-To: <EA73672426864370BC8119DE78037132-c0cKtqp5df7I9507bXv2FdBPR1lH4CV8@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 1409 bytes --]

On 12/07/2010 01:46 AM, Tomoya MORINAGA wrote:
> On Wednesday, November 24, 2010 7:51 PM, Marc Kleine-Budde wrote:
>> Did your mailer spawn some extra spaces here? The header of your mail
>> tells me:
>> "User-Agent: Mozilla/5.0 (X11; U; Linux i686; ja; rv:1.9.1.15)
>> Gecko/20101027 Thunderbird/3.0.10"
>> I strongly suggest to use git send-email.
> 
> At last, I can use "git send-email".
> However, I have faced issue.
> In case single destination address is OK, but in case multiple address
> is set,
> I can see the following error.
> 
> Relay access denied
> 
> I show my failure command.
> git send-email --smtp-server xxx.com --smtp-server-port yyy --smtp-ssl
> -to aaa.com -to bbb.com -to ccc.com
> -cc ccc.com -cc ddd.com -cc eee.com -bcc fff.com -bcc ggg.com *.patch

According to my man page it's:

--cc=<address>
--to=<address>

> Do you have any information about the issue ?

Try the above parameter format, if it doesn't work talk to your IT guys.
Have the time stamp and involved addresses (to,cc,smtp-server) of a
working and not working git send-email attempt ready.

cheers, Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

[-- Attachment #2: Type: text/plain, Size: 188 bytes --]

_______________________________________________
Socketcan-core mailing list
Socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org
https://lists.berlios.de/mailman/listinfo/socketcan-core

^ permalink raw reply

* Re: [PATCH] atm: correct sysfs 'device' link creation and parent relationships
From: Kay Sievers @ 2010-12-07  7:35 UTC (permalink / raw)
  To: Dan Williams; +Cc: netdev, Duncan Sands, linux-usb, Chas Williams
In-Reply-To: <1291587480.17538.12.camel@dcbw.foobar.com>

On Sun, Dec 5, 2010 at 23:17, Dan Williams <dcbw@redhat.com> wrote:
> The ATM subsystem was incorrectly creating the 'device' link for ATM
> nodes in sysfs.  This led to incorrect device/parent relationships
> exposed by sysfs and udev.  Instead of rolling the 'device' link by hand
> in the generic ATM code, pass each ATM driver's bus device down to the
> sysfs code and let sysfs do this stuff correctly.

Looks good to me.

It's wrong for any subsystem to ever create a file or link named
"device". It's a built-in driver-core managed property which appears
automatically as soon as the parent-device relations are correctly
established.

Udev/libudev intentionally refuses to follow any devices pointed to by
"broken" device links. So this patch is needed to make ATM devices
working properly with usual userspace tools.

Thanks,
Kay

^ permalink raw reply

* [PATCH net-next-2.6] net: call dev_queue_xmit_nit() after skb_dst_drop()
From: Eric Dumazet @ 2010-12-07  7:19 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

Avoid some atomic ops on dst refcount, calling dev_queue_xmit_nit()
after skb_dst_drop() in dev_hard_start_xmit().

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
Next patch will perform the sk_run_filter() in dev_queue_xmit_nit(),
before cloning skb and af_packet rcv() call.

 net/core/dev.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 55ff66f..59360ef 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2025,9 +2025,6 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
 	int rc = NETDEV_TX_OK;
 
 	if (likely(!skb->next)) {
-		if (!list_empty(&ptype_all))
-			dev_queue_xmit_nit(skb, dev);
-
 		/*
 		 * If device doesnt need skb->dst, release it right now while
 		 * its hot in this cpu cache
@@ -2037,6 +2034,9 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
 
 		skb_orphan_try(skb);
 
+		if (!list_empty(&ptype_all))
+			dev_queue_xmit_nit(skb, dev);
+
 		if (vlan_tx_tag_present(skb) &&
 		    !(dev->features & NETIF_F_HW_VLAN_TX)) {
 			skb = __vlan_put_tag(skb, vlan_tx_tag_get(skb));



^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox