From mike@ducky.net  Sat Nov 18 12:43:47 2000
Return-Path: <mike@ducky.net>
Received: from ducky.net (gate.ducky.net [199.2.211.252])
	by hub.freebsd.org (Postfix) with ESMTP id 9212737B479
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 18 Nov 2000 12:43:45 -0800 (PST)
Received: (from mike@localhost)
	by ducky.net (8.11.1/8.11.1) id eAIKgmu10553;
	Sat, 18 Nov 2000 12:42:48 -0800 (PST)
	(envelope-from mike)
Message-Id: <200011182042.eAIKgmu10553@ducky.net>
Date: Sat, 18 Nov 2000 12:42:48 -0800 (PST)
From: Mike Haertel <mike@ducky.net>
Reply-To: mike@ducky.net
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: IBM 10/100 EtherJet Cardbus (Xircom X3201) gets wrong MAC addr
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         22947
>Category:       kern
>Synopsis:       IBM 10/100 EtherJet Cardbus (Xircom X3201) gets wrong MAC addr
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    andre
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 18 12:50:00 PST 2000
>Closed-Date:    Sat Dec 27 07:34:11 PST 2003
>Last-Modified:  Sat Dec 27 07:34:11 PST 2003
>Originator:     Mike Haertel
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD ducky.net 5.0-CURRENT FreeBSD 5.0-CURRENT #1: Wed Nov 15 16:14:57 PST 2000 root@ducky.net:/usr/src/sys/compile/DUCKY i386

	Toshiba Satellite 4025
	Toshiba Satellite Pro 4280

>Description:

	I have two laptops, the "old laptop", and the "new laptop".
	Inspired by the recent progress in the CardBus code, I obtained
	a pair of IBM 10/100 EtherJet Cardbus ReadyPort adapters,
	which were manufactured for IBM by Xircom, and are really
	Xircom 10/100 RealPort cards.

	First of all, both cards work (almost) fine with the if_dc driver.
	When connected to my network, either laptop alone works fine.
	But both laptops cannot be connected at the same time.

	The problem: both cards come up with the same MAC address,
	00:03:01:81:44:04.

	This MAC address *does not match* the MAC address printed on
	the outside of either card.  When the cards are used under
	Windows 98, I have verified that the MAC address used matches
	the one printed on the back of the card.

	Attempts to manually configure the MAC addresses, using
	"ifconfig ether", also did not appear to work.

	Examination of kernel messages showed that the correct MAC
	address is contained in CardBus configuration ROM for the
	card, but does not appear to be obviously marked as such.
	The relevant "dmesg" excerpt is appended.

	Summary: there appear to be two bugs.

	1.  the MAC address from CardBus configuration ROM is not getting
	    propagated to the ethernet drivers.

	2.  the if_dc driver does not appear to be able to reset its
	    MAC address to a different value than the default it somehow
	    comes up with via "ifconfig ether".

	cardbus0: reading CIS data from ROM
	Product version: 5.0
	Product name: IBM | 10/100 EtherJet CardBus Adapter with 56K Modem | IBMM56 | 1.03 | 
	TUPLE: Unknown(0x88) [4]: fd 4a bb 00
	TUPLE: Unknown(0x8a) [12]: 4a 31 35 43 46 42 42 34 41 46 44 00
	TUPLE: Unknown(0x8b) [4]: 01 00 00 00
	Manufacturer ID: a400030181
	TUPLE: DATE [4]: 42 92 7f 26
	Functions: Network Adaptor, Multi-Functioned
	Function Extension: 04060004acbb4afd
				^^^^^^^^^^^^ correct MAC address
	Function Extension: 0102
	Function Extension: 0280969800
	Function Extension: 0200e1f505
	Function Extension: 0301
	Function Extension: 0303
	Function Extension: 0501
	TUPLE: DEVICE_OC [4]: 02 4f 02 ff
	cardbus0: Opening BAR: type=MEM, bar=10, len=0080
	cardbus0: Opening BAR: type=MEM, bar=14, len=0080
	cardbus0: Opening BAR: type=MEM, bar=18, len=0100
	cardbus0: Opening BAR: type=MEM, bar=28, len=0400
	TUPLE: CONFIG_CB [7]: 03 02 03 01 00 00 ff
	TUPLE: CFTABLE_ENTRY_CB [8]: 41 b0 b0 bc 8e 0e fb 04
	TUPLE: CFTABLE_ENTRY_CB [9]: 02 b8 02 b0 bc 8e 1c fb 04
	TUPLE: NO_LINK [0]:
	dc0: <Xircom X3201 10/100BaseTX> port 0x2000-0x207f mem 0x18023400-0x180237ff,0x18023100-0x180231ff,0x18023080-0x180230ff,0x18023000-0x1802307f,0x18024000-0x18027fff,0x18022800-0x18022fff,0x18022000-0x180227ff irq 11 at device 0.0 on cardbus0
	dc0: Ethernet address: 00:03:01:81:44:04
	miibus0: <MII bus> on dc0
	tdkphy0: <TDK 78Q2120 media interface> on miibus0
	tdkphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto



>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->jon 
Responsible-Changed-By: jon 
Responsible-Changed-When: Tue Nov 28 14:35:46 PST 2000 
Responsible-Changed-Why:  
I'm playing with cardbus and CIS. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=22947 

From: Jonathan Chen <jon@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org, Mike Haertel <mike@ducky.net>
Cc:  
Subject: Re: kern/22947: IBM 10/100 EtherJet Cardbus (Xircom X3201) gets wrong MAC addr
Date: Tue, 28 Nov 2000 17:49:02 -0500

 This is broken because I had hard coded the location of the MAC address in
 the EEPROM in the dc driver.  All the other Xircom X3201 based cards that
 I've tested had the MAC address at offset 6, so I assumed it will be
 alright to hard code that in.  Right now, the CIS information you got in
 for display only and doesn't do anything.  This problem should be fixed
 once we invent a way for the dc driver to obtain CIS information such as
 MAC address.
 
State-Changed-From-To: open->analyzed 
State-Changed-By: jon 
State-Changed-When: Tue Nov 28 14:50:34 PST 2000 
State-Changed-Why:  


http://www.freebsd.org/cgi/query-pr.cgi?pr=22947 
State-Changed-From-To: analyzed->closed 
State-Changed-By: andre 
State-Changed-When: Sat Dec 27 07:31:35 PST 2003 
State-Changed-Why:  
This PR has been idle for too long.  I've checked the history 
of if_dc.c and there have been many commits which concern this 
particular area of card initialization.  The odds are very 
high that this has been fixed and I remember some discussion 
to that effect on -net or so. 


Responsible-Changed-From-To: jon->andre 
Responsible-Changed-By: andre 
Responsible-Changed-When: Sat Dec 27 07:31:35 PST 2003 
Responsible-Changed-Why:  
This PR has been idle for too long.  I've checked the history 
of if_dc.c and there have been many commits which concern this 
particular area of card initialization.  The odds are very 
high that this has been fixed and I remember some discussion 
to that effect on -net or so. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=22947 
>Unformatted:
