Re: sundance DFE-580TX DL10050B patch

Philippe De Muyter (phdm@macqel.be)
Mon, 17 Mar 2003 18:40:36 +0100 (CET)


Dave Jones wrote :
> On Mon, Mar 17, 2003 at 02:56:09PM +0100, Philippe De Muyter wrote:
>
> > + writew((dev->dev_addr[i + 1] << 8) + dev->dev_addr[i],
>
> Don't you want to OR those together instead of add them ?
>
> Dave
>
You're right.

Here it is :

--- drivers/net/sundance.c Mon Mar 17 13:15:48 2003
+++ drivers/net/sundance.c Thu Feb 13 11:56:43 2003
@@ -853,8 +853,10 @@
writel(np->rx_ring_dma, ioaddr + RxListPtr);
/* The Tx list pointer is written as packets are queued. */

- for (i = 0; i < 6; i++)
- writeb(dev->dev_addr[i], ioaddr + StationAddr + i);
+ /* Station address must be written as 16 bit words with the DL10050B chip. */
+ for (i = 0; i < 6; i += 2)
+ writew((dev->dev_addr[i + 1] << 8) | dev->dev_addr[i],
+ ioaddr + StationAddr + i);

/* Initialize other registers. */
writew(dev->mtu + 14, ioaddr + MaxFrameSize);
-
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/