Bug 32118

Summary: [dc] 21143 with dc driver will not select 10baseT/UTP media
Product: Base System Reporter: Nick Sayer <nsayer>
Component: kernAssignee: Martin Blapp <mbr>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.4-RELEASE   
Hardware: Any   
OS: Any   

Description Nick Sayer 2001-11-19 23:10:00 UTC
I can connect this card to a 100baseTX full- or half-duplex port and it
will autoselect just fine. If I connect this card up to a 10baseT/UTP
hub it will never autoselect. Moreover, if I attempt to force it to
media 10baseT/UTP it will never become active, nor will either device
see a link. If I force 10baseT/UTP mediaopt full-duplex, then it does
get a link and work, but of course every collision becomes an ierr (and
a dropped packet) because it's not really a full-duplex connection.

How-To-Repeat: 
Connect an Intel 21143 chip to a 10baseT/UTP hub.
Comment 1 nsayer 2001-11-26 18:44:43 UTC
It turns out we are not reading the SROM correctly in if_dc. If I 
manually interpret the SROM and put a hack in dc_apply_fixup() with the 
values I manually picked out, then 10baseT/UTP half duplex works correctly.

The problem is twofold:

1. We are not checking the type of leaf node is present. There are 
multiple formats with different lengths and data and stuff. The Znyx 
card uses a format we are not expecting.

2. We are not using all of the data present in the SROM. For example, in 
the SIA leaf node, we only look at the ctl field, whereas we should 
first poke the ctl value, then the dat value into the upper 16 bits of 
DC_WATCHDOG. In that format of leaf node, we should also be overriding 
the contents of CSR13, 14 and 15 (DC_10BTSTAT, DC_10BTCTL and 
DC_WATCHDOG) with the values specified in the SROM (however, on my Znyx 
card, the format is a different one that only has the CTL and DAT 
values, so the present code is picking garbage data to poke in 
DC_WATCHDOG in any event).

Andrew Gallatin sent me this sample code:

http://www.tru64unix.compaq.com/docs/dev_doc/DOCUMENTATION/HTML/DDK_R2/usr/opt/OSCB505/src/usr/examples/ddk/src/pci/
Comment 2 Martin Blapp freebsd_committer freebsd_triage 2003-01-30 23:44:03 UTC
Responsible Changed
From-To: freebsd-bugs->mbr

I'll look at this.
Comment 3 Martin Blapp freebsd_committer freebsd_triage 2003-10-29 09:58:42 UTC
State Changed
From-To: open->analyzed

A fix for this problem has been committed. Can you 
confirm it ?
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2005-10-24 09:45:41 UTC
State Changed
From-To: analyzed->closed

Feedback timeout (> 1 year).