Subject: Re: TLP driver in generic
To: None <port-cats@netbsd.org>
From: Chris Gilbert <chris@dokein.co.uk>
List: port-cats
Date: 06/04/2005 19:02:35
This is a multi-part message in MIME format.

--Multipart=_Sat__4_Jun_2005_19_02_35_+0100_VR=9NsS5rsjGBlhG
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

(some of you might just about remember this thread)

On Sat, 8 Feb 2003 18:42:20 +0000
Chris Gilbert <chris@dokein.co.uk> wrote:

> On Sun, 9 Feb 2003 03:26:58 +0900 (JST)
> Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> wrote:
> 
> > In article <200302081804.h18I4F611076@buzzard.buzzard.freeserve.co.uk>
> > rearnsha@buzzard.freeserve.co.uk wrote:
> > 
> > > Odd, I just get:
> > > 
> > > tlp0 at pci0 dev 9 function 0: DECchip 21140A Ethernet, pass 2.2
> > > tlp0: interrupting at irq 8
> > > tlp0: Ethernet address 00:40:05:51:3b:b2
> > > tlp0: unable to configure MII
> > > tlp0: no media found!
> 
> The fun side effect there is that you can panic the kernel very easily.
> 
> > Does the card work on i386 (or other machines),
> > and what the part number of the card?
> 
> Probably will, mine does.  I've not had time to figure out why.

Well 2 and a bit years later I've mangaged to get the card to work with the tulip driver.

It appears that the MII bitbang sync code doesn't always work on cats.  I've managed to patch the mii bitbang code to do the sync slightly differently, it actually does a clock after changing direction, and then does the 32bits of 1 for the sync.  This means that the mii code actually detects the phy on this card as an lxtpty (which is correct and the same as it was in one of my x86).

I'm not sure exactly what the problem is.  I suspect that the phy/21140 needs a kick before it's used.  Looking at the de card, it actually sends 32bits of one, then 4bits of one, then 01 (start frame) then the command, so perhaps it's a known oddity of the cards.

The IEEE spec requires that 32bits of 1 are sent to allow the phy to sync, so I'm guessing that the phy doesn't think it's seen 32 bits for some reason.

The patch against -current is attached.  The problem is I don't have the kit to test the patch out.  Can people try the patch on their cats boxen (or other machines with tulip cards in)

Thanks,
Chris

--Multipart=_Sat__4_Jun_2005_19_02_35_+0100_VR=9NsS5rsjGBlhG
Content-Type: application/octet-stream;
 name="tulip.notconfigure.patch"
Content-Disposition: attachment;
 filename="tulip.notconfigure.patch"
Content-Transfer-Encoding: base64

SW5kZXg6IHN5cy9kZXYvbWlpL21paV9iaXRiYW5nLmMKPT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQpSQ1MgZmlsZTogL2N2
c3Jvb3Qvc3JjL3N5cy9kZXYvbWlpL21paV9iaXRiYW5nLmMsdgpyZXRyaWV2aW5nIHJldmlzaW9u
IDEuNgpkaWZmIC11IC1wIC1yMS42IG1paV9iaXRiYW5nLmMKLS0tIHN5cy9kZXYvbWlpL21paV9i
aXRiYW5nLmMJMjMgQXVnIDIwMDQgMDY6MTg6MzkgLTAwMDAJMS42CisrKyBzeXMvZGV2L21paS9t
aWlfYml0YmFuZy5jCTQgSnVuIDIwMDUgMTc6NTM6NDkgLTAwMDAKQEAgLTc1LDggKzc1LDEzIEBA
IG1paV9iaXRiYW5nX3N5bmMoc3RydWN0IGRldmljZSAqc2MsIG1paV8KIAlpbnQgaTsKIAl1X2lu
dDMyX3QgdjsKIAotCXYgPSBNRElSUEhZIHwgTURPOworCXYgPSBNRElSUEhZOworCVdSSVRFKHYp
OworCS8qIGNsb2NrIGluIHRoZSBjaGFuZ2UgaW4gZGlyZWN0aW9uICovCisJV1JJVEUodiB8IE1E
Qyk7CiAKKwkvKiBzZW5kIDMyYml0cyBvZiAxICovCisJdiA9IE1ESVJQSFkgfCBNRE87CiAJV1JJ
VEUodik7CiAJZm9yIChpID0gMDsgaSA8IDMyOyBpKyspIHsKIAkJV1JJVEUodiB8IE1EQyk7Cg==

--Multipart=_Sat__4_Jun_2005_19_02_35_+0100_VR=9NsS5rsjGBlhG--