Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Nov 2002 15:18:33 +0100
From:      "Oliver Blasnik" <oliver.blasnik@de.tiscali.com>
To:        <freebsd-sparc@freebsd.org>
Cc:        "Mike Smith" <msmith@FreeBSD.ORG>
Subject:   Fw: [PATCH] HME (Happy Meal Ethernet) and T1/105...
Message-ID:  <007601c29168$dfdaa5f0$1d0a310a@de.tiscali.com>

next in thread | raw e-mail | index | archive | help
Hi,

i wonder why my mail from yesterdeay did not got through, possibly
attachments aren't allowed in this list? If so, I removed it and
made the file available via download (link at the end).

Mike, did YOU get the mail?
Ok, this gives me the chance to comment some lines...


From: "Oliver Blasnik" <oliver.blasnik@de.tiscali.com>
To: <freebsd-sparc@freebsd.org>
Cc: "Mike Smith" <msmith@FreeBSD.ORG>


> [CC to msmith because of the pci.c problems]
> 
> Hi there,
> 
> I'm just answering to myself, but... I've found out one mistake
> from me and some bugfixes to have BOTH onboard-NICs working.
> 
> First: my mistake:
>     Got a bunch of T1 to work with. ONE of them had a additional
>     PCI-HME, and I used that one for testing :/
> 
> Thinking of this, i began to worry:
> - if there are 3 network cards, why are only 2 detected?!
> 
> First of all I wanted to get rid of the use of "ukphy". The
> used PHY looks like a cloned NS83849 but from Lucent, so I
> added the relevant id's and codechanges into:
> 
> - dev/mii/miidevs.h (ID 601D, MOD 000C)
> - dev/mii/nsphy.c
> 
> Ok, now I get the "correct" phy attached to the miibus, looks
> better than ukphy and even: still works ;)
> 
> At second I wanted to know where my "missing" hme is. Looking at
> PCICONF did not help - it was not listed:
> 
> pcib1@pci0:1:0: class=0x060400 card=0x00000000 chip=0x5000108e
> pcib3@pci0:1:1: class=0x060400 card=0x00000000 chip=0x5000108e
> pcib2@pci2:1:0: class=0x060400 card=0x000000dc chip=0x00221011
> atapci0@pci3:14:0: class=0x01018f card=0x06461095 chip=0x06461095
> ebus0@pci1:1:0: class=0x068000 card=0x00000000 chip=0x1000108e
> hme0@pci1:1:1:  class=0x020000 card=0x00000000 chip=0x1001108e
> sym0@pci1:2:0:  class=0x010000 card=0x00000000 chip=0x000f1000
> 
> Ok, then, lets install another OS (Linux/sparc64) and check the
> PCI id's over there. It was like expected: the PCI code of Linux
> is diffrent - and found both cards. Now I wanted to see LSPCI, 
> and it shows:
> 
>   00:00.0 Host bridge: Sun Microsystems Computer Corp. Ul...
>   00:01.0 PCI bridge: Sun Microsystems Computer Corp. Sim...
>   00:01.1 PCI bridge: Sun Microsystems Computer Corp. Sim...
>   01:01.0 Bridge: Sun Microsystems Computer Corp. EBUS (r...
>   01:01.1 Ethernet controller: Sun Microsystems Computer ...
>   01:02.0 SCSI storage controller: LSI Logic Corp. / Symb...
> | 01:03.1 Ethernet controller: Sun Microsystems Computer ...
>   02:01.0 PCI bridge: Digital Equipment Corporation DECch...
>   03:0e.0 IDE interface: CMD Technology Inc PCI0646 (rev ...
> 
> I've marked it, PCI 01:03.1 is the "missing" card. What happend?
> Why did FreeBSD not detect this card? I compared the two lists
> again - and then: NO! Sun decided to do a card with a function#1,
> but NO function#0. And I KNOW FreeBSD checks for existence by
> looking at function#0.
> 
> A very quick hack at dev/pci.c to kick out this and probe ALL
> functions instead only the first -> worked.
> 
> I now have both hme cards working, looks fine at the moment.
> Btw, the hme device numbering (hme0/hme1) IS correct, but NOT
> if I insert the additionally hme PCI card back. It connects
> to PCI ID 03:0f:00 and :01 (EBUS+ETHERNET) and gets numbered
> as hme0, following hme1 and 2 (the onboard 0 and 1...).
> This is wrong and should be fixed somehow.
> 
> That "lets check from the last to the first" isn't something
> I like - if it comes to this side-effects.
> 
> I attached the three patches onto this Mail. Who is going to commit
> them - and possibly: who knows, why pci.c ONLY scans for function
> ZERO and kicks the whole device if nothing found?

This is probably because its PCI Specs ;)
Even SUN themselves said to do so: in pci(4) they write:
"For a PCI device with only one function, the Function number 
must be 0.". Bad to see that they don't follow their own
specifications. So, if this isn't in spec to scan ALL functions,
it should be added in pci.c as a quirk to scan at least function
0 AND function 1 for existence on sparc platforms to come around
this boards probe problem.

> And, to come to the end:
> The additionally PCI-HME-Card doesn't work. "Device Timeout"
> messages. It gets detected, miibus + nsphy attached - and nothing
> more. Just left in a unusable state. Anything known of this?
> 
> Oliver

Previously attached patches now available at:
http://www.jav.net/hmepatches.tar.bz2

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-sparc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?007601c29168$dfdaa5f0$1d0a310a>