9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] VIA Rhine II mii problems
@ 2008-04-19  7:48 Stefan Hajnoczi
  2008-04-19 14:10 ` erik quanstrom
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Hajnoczi @ 2008-04-19  7:48 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hi,
I just installed Plan 9 on a machine using a VIA Rhine II NIC.
Unfortunately the driver is not successfully initializing the device.

Placing print statements in ethervt6102.c shows that vt6102reset() is
failing when mii() returns an empty PHY mask.  The mii() function is
probing each PHY from 0 to 31, but always finds that oui == 0.  It
never finds a PHY.

Any hints?  I understand the high-level details but don't have the
knowledge to do anything other than poke around blindly now.

lspci (from Linux):
00:00.0 Host bridge: VIA Technologies, Inc. PT894 Host Bridge
00:00.1 Host bridge: VIA Technologies, Inc. PT894 Host Bridge
00:00.2 Host bridge: VIA Technologies, Inc. PT894 Host Bridge
00:00.3 Host bridge: VIA Technologies, Inc. PT890 Host Bridge
00:00.4 Host bridge: VIA Technologies, Inc. PT894 Host Bridge
00:00.5 PIC: VIA Technologies, Inc. PT894 I/O APIC Interrupt Controller
00:00.7 Host bridge: VIA Technologies, Inc. PT894 Host Bridge
00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI Bridge
00:0f.0 IDE interface: VIA Technologies, Inc. VIA VT6420 SATA RAID
Controller (rev 80)
00:0f.1 IDE interface: VIA Technologies, Inc.
VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1
Controller (rev 81)
00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1
Controller (rev 81)
00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1
Controller (rev 81)
00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1
Controller (rev 81)
00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86)
00:11.0 ISA bridge: VIA Technologies, Inc. VT8237 ISA bridge
[KT600/K8T800/K8T890 South]
00:11.5 Multimedia audio controller: VIA Technologies, Inc.
VT8233/A/8235/8237 AC97 Audio Controller (rev 60)
00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 78)
01:00.0 VGA compatible controller: nVidia Corporation NV34 [GeForce FX
5200] (rev a1)

lspci -v (from Linux):
00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 78)
	Subsystem: ASUSTeK Computer Inc. Unknown device 80ed
	Flags: bus master, medium devsel, latency 64, IRQ 17
	I/O ports at ee00 [size=256]
	Memory at febff800 (32-bit, non-prefetchable) [size=256]
	Capabilities: <access denied>
	Kernel driver in use: via-rhine
	Kernel modules: via-rhine

Thanks,
Stefan


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] VIA Rhine II mii problems
  2008-04-19  7:48 [9fans] VIA Rhine II mii problems Stefan Hajnoczi
@ 2008-04-19 14:10 ` erik quanstrom
  2008-04-19 16:12   ` Stefan Hajnoczi
  0 siblings, 1 reply; 6+ messages in thread
From: erik quanstrom @ 2008-04-19 14:10 UTC (permalink / raw)
  To: 9fans

i don't have this part (that i know of) and the datasheet didn't
immediately pop up, but the linux driver hardcodes the phy_id to 1.
the part you have claims to have an integrated phy.

you may wish to try that.

- erik

p.s. lspci -n will give you vid/did numbers.

> Hi,
> I just installed Plan 9 on a machine using a VIA Rhine II NIC.
> Unfortunately the driver is not successfully initializing the device.
>
> Placing print statements in ethervt6102.c shows that vt6102reset() is
> failing when mii() returns an empty PHY mask.  The mii() function is
> probing each PHY from 0 to 31, but always finds that oui == 0.  It
> never finds a PHY.
>
> Any hints?  I understand the high-level details but don't have the
> knowledge to do anything other than poke around blindly now.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] VIA Rhine II mii problems
  2008-04-19 14:10 ` erik quanstrom
@ 2008-04-19 16:12   ` Stefan Hajnoczi
  2008-04-19 16:36     ` Harri Haataja
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Hajnoczi @ 2008-04-19 16:12 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I initialised the mii struct to use phy 1, as mii() would have if it
had succeeded.  Unfortunately running ip/ipconfig simply sat there,
running it with the debug flag showed recv timeouts.  I could not see
any packets on the network.

Stefan

On Sat, Apr 19, 2008 at 3:10 PM, erik quanstrom <quanstro@quanstro.net> wrote:
> i don't have this part (that i know of) and the datasheet didn't
>  immediately pop up, but the linux driver hardcodes the phy_id to 1.
>  the part you have claims to have an integrated phy.
>
>  you may wish to try that.
>
>  - erik
>
>  p.s. lspci -n will give you vid/did numbers.
>
>
>
>  > Hi,
>  > I just installed Plan 9 on a machine using a VIA Rhine II NIC.
>  > Unfortunately the driver is not successfully initializing the device.
>  >
>  > Placing print statements in ethervt6102.c shows that vt6102reset() is
>  > failing when mii() returns an empty PHY mask.  The mii() function is
>  > probing each PHY from 0 to 31, but always finds that oui == 0.  It
>  > never finds a PHY.
>  >
>  > Any hints?  I understand the high-level details but don't have the
>  > knowledge to do anything other than poke around blindly now.
>
>
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] VIA Rhine II mii problems
  2008-04-19 16:12   ` Stefan Hajnoczi
@ 2008-04-19 16:36     ` Harri Haataja
  2008-04-19 17:16       ` Stefan Hajnoczi
  0 siblings, 1 reply; 6+ messages in thread
From: Harri Haataja @ 2008-04-19 16:36 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 19/04/2008, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> I initialised the mii struct to use phy 1, as mii() would have if it
>  had succeeded.  Unfortunately running ip/ipconfig simply sat there,
>  running it with the debug flag showed recv timeouts.  I could not see
>  any packets on the network.

On the slight chance that this is useful, I have never seen a VIA chip
that worked reliably (never tried their processors, though).
Especially the Rhine based pci cards my then employer once had would
periodically freeze and require a full power cycle before they'd work
for a while again if at all. This happened under several windows
versions on PC, Linux, possibly some BSD. Varied drivers and other
hardware anyway. We quickly decided it wasn't worth even trying and
went with another chip since eth cards aren't hugely expensive.

Finns can also cheerfully call anything with a VIA chip "viallinen",
which literally meens "something with via" while being a word meaning
"defective". It's pretty much true on both counts.

--
I appear to be temporarily using gmail's horrible interface. I
apologise for any failure in my part in trying to make it do the right
thing with post formatting.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] VIA Rhine II mii problems
  2008-04-19 16:36     ` Harri Haataja
@ 2008-04-19 17:16       ` Stefan Hajnoczi
  2008-04-20 16:03         ` erik quanstrom
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Hajnoczi @ 2008-04-19 17:16 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Just got this sucker working.  I added a bit of initialization magic
from the gPXE VIA Rhine II driver.  See "D-Link provided reset code":
http://git.etherboot.org/?p=gpxe.git;a=blob;f=src/drivers/net/via-rhine.c;h=81350091b7d1c6ddc4e3330615833916264ce9ef;hb=HEAD

(This card's revision ID is 0x78.)

I will do a cleanup and remove debugging.  Is there interest in a
patch?  Can't say I understand what the IO instructions do.

Stefan


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] VIA Rhine II mii problems
  2008-04-19 17:16       ` Stefan Hajnoczi
@ 2008-04-20 16:03         ` erik quanstrom
  0 siblings, 0 replies; 6+ messages in thread
From: erik quanstrom @ 2008-04-20 16:03 UTC (permalink / raw)
  To: 9fans

> I will do a cleanup and remove debugging.  Is there interest in a
> patch?  Can't say I understand what the IO instructions do.
>
> Stefan

i'm sure there is.

- erik



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-04-20 16:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-19  7:48 [9fans] VIA Rhine II mii problems Stefan Hajnoczi
2008-04-19 14:10 ` erik quanstrom
2008-04-19 16:12   ` Stefan Hajnoczi
2008-04-19 16:36     ` Harri Haataja
2008-04-19 17:16       ` Stefan Hajnoczi
2008-04-20 16:03         ` erik quanstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).