[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1309845573.2720.41.camel@edumazet-laptop>
Date: Tue, 05 Jul 2011 07:59:33 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: Alexey Zaytsev <alexey.zaytsev@...il.com>
Cc: Michael Büsch <m@...s.ch>,
Andrew Morton <akpm@...ux-foundation.org>,
netdev@...r.kernel.org, Gary Zambrano <zambrano@...adcom.com>,
bugme-daemon@...zilla.kernel.org,
"David S. Miller" <davem@...emloft.net>,
Pekka Pietikainen <pp@...oulu.fi>,
Florian Schirmer <jolt@...box.org>,
Felix Fietkau <nbd@...nwrt.org>, Michael Buesch <mb@...sch.de>
Subject: Re: [Bugme-new] [Bug 38102] New: BUG kmalloc-2048: Poison
overwritten
Le mardi 05 juillet 2011 à 07:33 +0200, Eric Dumazet a écrit :
> Le mardi 05 juillet 2011 à 09:18 +0400, Alexey Zaytsev a écrit :
>
> > Actually, I've added a trace to show b44_init_rings and b44_free_rings
> > calls, and they are only called once, right after the driver is
> > loaded. So it can't be related to START_RFO. Will attach the diff and
> > dmesg.
>
> Thanks
>
> I was wondering if DMA could be faster if providing word aligned
> addresses, could you try :
>
> -#define RX_PKT_OFFSET (RX_HEADER_LEN + 2)
> +#define RX_PKT_OFFSET (RX_HEADER_LEN + NET_IP_ALIGN)
>
> (On x86, we now have NET_IP_ALIGN = 0 since commit ea812ca1)
>
I suspect a hardware bug.
You could force copybreak, so that b44 only touch kind of private
memory.
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index a69331e..62a0599 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -75,7 +75,7 @@
(BP)->tx_cons - (BP)->tx_prod - TX_RING_GAP(BP))
#define NEXT_TX(N) (((N) + 1) & (B44_TX_RING_SIZE - 1))
-#define RX_PKT_OFFSET (RX_HEADER_LEN + 2)
+#define RX_PKT_OFFSET (RX_HEADER_LEN + NET_IP_ALIGN)
#define RX_PKT_BUF_SZ (1536 + RX_PKT_OFFSET)
/* minimum number of free TX descriptors required to wake up TX process */
@@ -829,6 +829,7 @@ static int b44_rx(struct b44 *bp, int budget)
}
bp->rx_cons = cons;
+ wmb();
bw32(bp, B44_DMARX_PTR, cons * sizeof(struct dma_desc));
return received;
@@ -848,6 +849,7 @@ static int b44_poll(struct napi_struct *napi, int budget)
/* spin_unlock(&bp->tx_lock); */
}
if (bp->istat & ISTAT_RFO) { /* fast recovery, in ~20msec */
+ pr_err("b44: ISTAT_RFO !\n");
bp->istat &= ~ISTAT_RFO;
b44_disable_ints(bp);
ssb_device_enable(bp->sdev, 0); /* resets ISTAT_RFO */
@@ -2155,7 +2157,7 @@ static int __devinit b44_init_one(struct ssb_device *sdev,
bp = netdev_priv(dev);
bp->sdev = sdev;
bp->dev = dev;
- bp->force_copybreak = 0;
+ bp->force_copybreak = 1;
bp->msg_enable = netif_msg_init(b44_debug, B44_DEF_MSG_ENABLE);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists