From linux-kernel-owner+willy=40w.ods.org@vger.kernel.org  Mon Mar 17 14:58:34 2003
Return-Path: <linux-kernel-owner+willy=40w.ods.org@vger.kernel.org>
Received: from vax.home.local (vax [10.2.1.2])
	by alpha.home.local (8.12.4/8.12.1) with ESMTP id h2HDwYN1030410
	for <willy@w.ods.org>; Mon, 17 Mar 2003 14:58:34 +0100
Received: from vger.kernel.org (vger.kernel.org [209.116.70.75])
	by vax.home.local (8.12.2/8.12.1) with ESMTP id h2HE0n1Q012424
	for <willy@w.ods.org>; Mon, 17 Mar 2003 15:00:52 +0100 (CET)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
	id <S261659AbTCQNpS>; Mon, 17 Mar 2003 08:45:18 -0500
Received: (majordomo@vger.kernel.org) by vger.kernel.org
	id <S261662AbTCQNpS>; Mon, 17 Mar 2003 08:45:18 -0500
Received: from 39.208-78-194.adsl-fix.skynet.be ([194.78.208.39]:19313 "EHLO
	mail.macqel.be") by vger.kernel.org with ESMTP id <S261659AbTCQNpQ>;
	Mon, 17 Mar 2003 08:45:16 -0500
Received: (from phdm@localhost)
	by mail.macqel.be (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) id h2HDu9U30575
	for linux-kernel@vger.kernel.org; Mon, 17 Mar 2003 14:56:09 +0100
Message-Id: <200303171356.h2HDu9U30575@mail.macqel.be>
Subject: sundance DFE-580TX DL10050B patch
To: linux-kernel@vger.kernel.org
Date: 	Mon, 17 Mar 2003 14:56:09 +0100 (CET)
From: "Philippe De Muyter" <phdm@macqel.be>
X-Mailer: ELM [version 2.4ME+ PL60 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: linux-kernel-owner@vger.kernel.org
Precedence: bulk
X-Mailing-List: 	linux-kernel@vger.kernel.org
Content-Length: 1298
Lines: 33
Status: RO

Hello,

trying to use the bonding functionality with a DFE-580TX quad port board,
I discovered I had to change the sundance.c driver to write the station
address with word access; that's actually what the sundance technology st201
and the ic+ IP100 data sheets say, so that should be ok in the general
case.

Philippe

Philippe De Muyter  phdm@macqel.be  Tel +32 27029044
Macq Electronique SA  rue de l'Aeronef 2  B-1140 Bruxelles  Fax +32 27029077

--- a/drivers/net/sundance.c	Mon Mar 17 13:15:48 2003
+++ b/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/

