Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Aug 1999 23:14:22 -0400 (EDT)
From:      Robert Watson <robert@cyrus.watson.org>
To:        "Matthew N. Dodd" <winter@jurai.net>
Cc:        freebsd-hardware@FreeBSD.ORG
Subject:   Re: kern/12275: Patches to add support for new chipset (fwd)
Message-ID:  <Pine.BSF.3.96.990808223916.13826B-100000@fledge.watson.org>
In-Reply-To: <Pine.BSF.4.10.9908082152120.14648-100000@sasami.jurai.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 8 Aug 1999, Matthew N. Dodd wrote:

> I may be missing something but this patch contains read_mii() and
> write_mii() but never does anything with them.

Ah--those actually went in for debugging purposes, as apparently these
cards suffer from interference due to line quality.  For example, I can
send packets around on one floor of my house fine, but when I try to send
packets along a wire that goes out via the telco's interface box, half the
packets are lost at certain times of day.  In theory, you can read in
statistics on loss, error conditions, and modify power levels and speeds
via the MII, but I could never get the card to actually read this data.
The datasheet claims it is possible, but (for example) the Linux driver
also marks this as a card not capable of MII.

You may want to strip out the read/write_mii, but they are actually quite
useful on other PCnet-style cards, just not this one :-(.

> I'm going to go out on a limb and make a guess that you really mean:
> 
> +               media = read_mii(sc, BCR49);
> ...
> +               write_mii(sc, BCR49, media);

Given that the card doesn't work without the lines as I have them, I think
that the current arrangement is actually the correct one.  See below.

> Any chance that we can identify the PHY used by these cards and make sure
> we're dealing with one of them before we go reading and writing to one
> blindly?  What if Diamond changes PHYs?

The AM79C979 datsheet (p178) defines bits 1 - 0 of BCR49 as follows: 

1-0	PHY_SEL	PHY Select.  These bits define the active PHY as follows:
		00	10BASE-T PHY
		01	HomePNA PHY
		10	External PHY
		11	Reserved/Undefined

As far as I can tell, there does not seem to be a way to probe for
available PHY's.  At least on the card I have, there is only a phone-net
port, so I'm not sure why they don't auto-assign the PHY.  I'll look into
this further though--perhaps this should be influenced by the interface
link state, or the like.  BSD/OS has a nice feature wherein (I believe) 
interfaces can generate their own lists of link types and ifconfig can be
used to dynmically list and select from among these, with custom strings.

> Anyhow, I don't see these design issues getting in the way of adding
> functionality.
> 
> Regenerate your patch and I'll commit it.  (unless someone else wants to.)

Sounds great.  I'll investigate further, but I think just hard-assigning
the PHY is the best solution for the time being.

Thanks,
Robert

> 
> On Sun, 8 Aug 1999, Robert Watson wrote:
> > Updated patches to use the Diamond HomeFree home phoneline based network
> > card (AMD Am79C978) are now available from
> > 
> > http://www.watson.org/freebsd/hardware/amd_pcnet_home_patch.txt
> > 
> > The updated version doesn't interfere with the probing of other
> > lnc-supported ethernet devices, unlike the previous patches.  They are
> > also a little cleaner.
> > 
> > I've had a number of reports that these cards+patches work for other
> > people than me, and emails interested in having them comitted.  I was
> > wondering what the procedure for doing this would be?
> > 
> >   Robert N M Watson 
> > 
> > robert@fledge.watson.org              http://www.watson.org/~robert/
> > PGP key fingerprint: AF B5 5F FF A6 4A 79 37  ED 5F 55 E9 58 04 6A B1
> > TIS Labs at Network Associates, Computing Laboratory at Cambridge University
> > Safeport Network Services
> > 
> > ---------- Forwarded message ----------
> > Date: Sun, 8 Aug 1999 14:36:03 -0400 (EDT)
> > From: Robert Watson <robert@cyrus.watson.org>
> > Reply-To: Robert Watson <robert+freebsd@cyrus.watson.org>
> > To: freebsd-gnats-submit@freebsd.org
> > Subject: Re: kern/12275: Patches to add support for new chipset
> > 
> > 
> > Attached are cleaned up patches against -current from Aug 7, and that
> > don't interfere with the existing lnc supported cards, unlike the previous
> > patches.  I've received a number of emails asking about having this added
> > to -stable and -current, and reporting success in using the driver.
> > 
> > Thanks,
> > 
> >   Robert N M Watson 
> > 
> > robert@fledge.watson.org              http://www.watson.org/~robert/
> > PGP key fingerprint: AF B5 5F FF A6 4A 79 37  ED 5F 55 E9 58 04 6A B1
> > TIS Labs at Network Associates, Computing Laboratory at Cambridge University
> > Safeport Network Services
> > 
> > 
> 
> -- 
> | Matthew N. Dodd  | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD  |
> | winter@jurai.net |       2 x '84 Volvo 245DL        | ix86,sparc,pmax |
> | http://www.jurai.net/~winter | This Space For Rent  | ISO8802.5 4ever |
> 
> 


  Robert N M Watson 

robert@fledge.watson.org              http://www.watson.org/~robert/
PGP key fingerprint: AF B5 5F FF A6 4A 79 37  ED 5F 55 E9 58 04 6A B1
TIS Labs at Network Associates, Computing Laboratory at Cambridge University
Safeport Network Services




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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.990808223916.13826B-100000>