From: Gary Spiess <Gary.Spiess@Intermec.com>
To: jgarzik@pobox.com
Cc: netdev@oss.sgi.com
Subject: Re: [PATCH] natsemi: long cable, short cable
Date: Mon, 14 Feb 2005 22:35:34 -0600 [thread overview]
Message-ID: <42117C16.8010800@Intermec.com> (raw)
Jeff,
I just read your message of Feb 10th, 2005 regarding the cable problems
of natsemi.c. My investigation started late last week. On Feb 14th, I
got serious and nailed it down. I submitted a patch of my own without
realizing there was other work in progress on the same issue. Please
consider replacing the patch you didn't like with mine.
What was happening with my DP83815D was that the TSTDAT value being read
in the do_cable_magic function was near 0x1f, regardless of cable
length. The code that fixes short cable problems actually works for
short cables, but messes up long ones. The cable magic couldn't figure
out the length of the cable and always applied the fix. I went looking
for the history of this patch on the Internet and found a DP83815 Linux
driver written and maintained by National Semiconductor. I was struck
by the difference in the initialization sequences. natsemi.c always
applies the sequence documented for the DP83815B. dp83815.c applies
different sequences for chip revisions B, C, and D+. I used the D
initialization for my D chip, and again watched the values being
returned from TSTDAT in do_cable magic. A 1m cable returned something
like 0xF8 and a 90m cable return something like 0xB8. Now the register
was returning a value like it must have done with previous revisions of
the chip. The magic is properly applied in the proper situation.
Since there is no public documentation on these PHY manipulations, I
minimized the 'fix' to the setting of the DSPCFG register. If I only
turn on the bit that makes the coefficient readable, do_cable_magic now
appears to have the right information to decide the cable length
automatically.
Ain't life great?
Gary
in reply to http://oss.sgi.com/archives/netdev/2005-02/msg00396.html
--
oooooooooooooooooooooooooooooooooooooooooooooooooo
Gary Spiess (Gary.Spiess@Intermec.com)
MobileLan Wireless Products Group, Intermec Technology Corp
voice: 319 369-3580 fax: 319 369-3804
next reply other threads:[~2005-02-15 4:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-15 4:35 Gary Spiess [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-02-08 14:18 [PATCH] natsemi: long cable, short cable Olaf Kirch
2005-02-11 22:07 ` Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42117C16.8010800@Intermec.com \
--to=gary.spiess@intermec.com \
--cc=jgarzik@pobox.com \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).