Commit Graph

44 Commits

Author SHA1 Message Date
thorpej eed75dbc26 Don't dry to diving MIIF_NOISOLATE in the PHY drivers. Instead, pass
flags down from the parent to child vi mii_attach().
2000-02-02 17:09:38 +00:00
thorpej 84dc99fdea Bring some order to the chaos which was the MII code function naming
"conventions".
2000-02-02 08:05:26 +00:00
thorpej 001748dc57 First cut at detach support; doens't fully work yet. 2000-02-01 22:54:47 +00:00
thorpej a72f993570 When possible, use ring mode for descriptors. Not only is this slightly
more efficient on genuine DEC chips, but some clones apparently Lose Badly
if you use chain mode.  To further complicate things, some clones *only*
do chain mode, so make this whole mess conditional.
2000-01-28 23:23:49 +00:00
thorpej 59fbdbb7cb Just use a regular Tx descriptor for the setup packet; don't bother with
a separate one.
2000-01-28 22:23:58 +00:00
thorpej 62fb37ba49 Some changes for the Xircom X3201-3 in 21143 emulation mode:
- The Xircom doesn't bring itself out of reset; we have to do it.
- The Xircom requires transmit buffers to be aligned to 4 bytes, too.

Partially from Rafal Boni (though the Tx buffer alignment issue is
handled much differently in this version).
2000-01-25 22:11:12 +00:00
thorpej 6aca67041c Add a chip type for the Xircom X3201-3, and centralize the declaration
of the chip names array.
2000-01-25 19:29:17 +00:00
thorpej 8f7ad1f798 When checking for a non-standard address ROM format, allow the
Cobalt Networks address ROM through.

From Soren S. Jorvang <soren@wheel.dk>
2000-01-25 03:14:12 +00:00
tsutsui b5084582c9 add one more htole32().
fixes "tlp0: filter setup timeout" on my macppc.
1999-12-15 12:23:32 +00:00
thorpej caae0e1aa1 - Don't try to run the chip in big-endian mode. Not all chips support
this consistently, and it doesn't always work even when the chip
  supports it.
- Make sure things DMA'd to the chip that the chip interprets are in
  little-endian mode.
1999-12-11 00:32:59 +00:00
thorpej ff4a32590d When checking the SROM checksum, if the standard location fails, try
the new standard location (according to the SROM format update document
for the 21143).  From Masanori Kanaoka.
1999-12-07 18:24:01 +00:00
thorpej 9ed17102f4 - Use the common MII bit-bang module.
- Add support other than 128-byte SROMs.
- Add support for the 21142/21143 MII.
1999-11-19 18:22:42 +00:00
thorpej 4bdf6bd731 Call mii_down() as appropriate. 1999-11-12 18:14:17 +00:00
thorpej 97bbad1f0b Do rd/line and rd/mult on the MX98725 and LC82C115, too. 1999-11-04 01:27:32 +00:00
thorpej e3f20e8ff1 Use Memory Read Line and Memory Read Multiple on the 21140, 21140A,
21142, and 21143, if the PCI bus says its okay.
1999-11-04 01:20:55 +00:00
thorpej ca9b9a3b2e Adapt to mii_phy_probe() change. 1999-11-04 00:24:00 +00:00
thorpej 3750d3f592 Update for ifmedia changes. 1999-11-03 23:07:10 +00:00
thorpej e017601bd3 More or less completely rewrite the way DECchip media is handled, and
add support for the DECchip 21142/21143 SIA/SYM media.  Make the Macronix
98713 behave like a 21140A, and the 98713A and later behave like a 21143.
Nuke all of the Macronix-specific Nway code, as it will be identical to
the 21143 Nway code once it is written.
1999-11-03 22:25:08 +00:00
thorpej 8bc5c71e5f Set the LED mode per the EEPROM on Macronix chips. 1999-09-30 22:28:11 +00:00
thorpej 2492ffef4c Changes to get the Lite-On/Macronix 82C115 working:
- 82C115 has a 128-bit multicast hash table, not 512-bit.
- Correct the way the MAC address is read from the SROM, after re-reading
  the MX98715A Application Note.

Other semi-related changes:
- Differentiate between MX98715 and MX98715A.
- Improve the Macronix link-up/link-down detection.
1999-09-30 17:48:24 +00:00
thorpej 61e04b2510 Add link-up/link-down detection for the Macronix NWay block. 1999-09-30 00:07:29 +00:00
thorpej 9d911ccd55 Add some optional stats gathering, and fix tx stats counting; use the last
descriptor in the packet, not the first.
1999-09-29 23:11:36 +00:00
thorpej 56fb88a64a Grumble, yet another chip-designers-and-manual-writers-disagree. Deal with
this by frobbing the 10TCTL register minimally, toggling only the bit we
care about (and hoping that link-capability advertisement happens correctly).

MX98715 can talk to the network now.
1999-09-29 22:07:47 +00:00
thorpej e3398d3647 - Get a little closer on the Macronix chips. Still some more work to do.
- Add some basic support for the ADMtek AL981 clone (which, unfortunately,
  I can't test until my sample boards arrive).
1999-09-29 18:52:19 +00:00
thorpej 0bd09380a2 Oops, Macronix MX98713A doesn't have GPIO direction bits in the SROM
because it doesn't have a GPIO port (CSR12 is the `10baseT status'
register on this chip revision).
1999-09-28 21:56:45 +00:00
thorpej a5649fe4d5 Initial support for 21140[A] GPR media. 1999-09-27 19:14:01 +00:00
thorpej 4fa51ba8bd Make tlp_read_srom() work on big-endian systems.
From a patch supplied by Luoqi Chen <luoqi@chekov.watermarkgroup.com>.
1999-09-26 03:39:01 +00:00
thorpej c999e3ca1a Add support for the DECchip 21140[A]. This currently only works with
boards which use MII for media attachment.

ISV SROM format information lifted from Matt Thomas's `de' driver.

Thanks to Dave Sainty for experimenting w/ his 21140A MII boards, and
for supplying a fix to the MII bit-bang code (PR #8382).
1999-09-25 00:27:00 +00:00
thorpej 30651e46b3 A couple more hacks for the Lite-On PNIC:
- Only use 16 longword bursts.
- Reset the interface for receive filter setups that don't come from
  the reset path.

Hi, Jason is getting really tired of broken clone chips, and really wishes
real 21140 boards were still available, because the DEC chips seem to work
Just Dandy.
1999-09-21 00:14:54 +00:00
thorpej 5ada26d247 Remove the has-mii-doesn't-have-mii OPMODE block from tlp_init(), and
let the pre-init hook and media switch routines handle it all.
1999-09-20 19:52:31 +00:00
thorpej 28b026bee1 Remove special-case 2114x-set-OPMODE_MBO; it's done in the pre-init hook
now.
1999-09-20 19:34:08 +00:00
thorpej 664d8da4f5 Add support for the DECchip 21041. This also adds some preliminary
support for the ISV SROM format used in the 2114{1,1A,2,3}.  Note, like
the 21040, auto-sense is not yet supported for the 21041.

Add a "pre-init" hook, which will be used for the 2114x and PNIC (currently)
which allows chip-specific code to set up and write OPMODE before the
chip is reset.  This is necessary in order for the chip's internal
pathways to get initialized properly for MII/SYM/PCS/SIA media attachments.

Thanks to Dave Sainty for the hint from the `de' driver that inspired the
pre-init hook.
1999-09-20 19:26:54 +00:00
thorpej 5485bcb973 Fix a buglet in tlp_reset(): don't touch the Tulip for at least 50
PCI cycles after starting the reset; it won't respond.  This will
cause a machine check on some Alpha core logic chipsets (e.g. 21071 APECS).
1999-09-19 20:51:09 +00:00
thorpej 9002796d07 If the interface is not marked as running, abort tlp_intr() early. 1999-09-17 21:57:36 +00:00
thorpej 2def4fdb50 Apparently can't really look at excessive collitions and late collisions
in completed transmit descriptors.  These seem to be set even on successful
packet transmissions on my AlphaStation 500's 21040.
1999-09-14 23:23:32 +00:00
thorpej 5c34356d4c First crack at shared ROM/shared interrupts on 21040 multi-port boards,
plus quirk identification for non-multiple-port boards.
1999-09-14 22:25:48 +00:00
thorpej 12c167b5ca Change the semantics of `sc_regshift'; it is now the shift required to
make a CSR index number into a CSR offset.  Introduce a couple of macros
to handle CSR name -> offset conversion.
1999-09-14 05:52:21 +00:00
thorpej a03bd733ca - More PNIC NWAY stuff. Still more work to do, here.
- Fix the SROM checksum routine.
- Add code to parse the old DEC Address ROM SROM format.
- Rearrange the statchg routines a bit, to make them consistent with one
  another.
- Add support for the DECchip 21040.  XXX No support for media autosense
  yet, and no support for any of the multi-port boards yet.
1999-09-14 00:55:38 +00:00
thorpej 057798e505 Snapshot of work-in-progress to support the internal NWay block on
the Lite-On PNIC chips.  Not finished yet; some other infrastructure
work left to do.
1999-09-09 21:48:18 +00:00
thorpej 8386184524 Deal with some more Winbond differences, after a more-thorough-than-before
reading of its manual.
1999-09-02 23:25:28 +00:00
thorpej cfbc8a82fb Make Tulip-style filter setup interrupt-driven. 1999-09-01 20:56:15 +00:00
thorpej e75ce8c0df Don't attempt to do transmit threshold tuning on the Lite-On PNCI; just
put it in Store-and-Forward mode right from the get-go.  This eliminates
the DMA underrun errors that prevented the receive filter setup from working
and caused smashed packets to go out onto the wire.

My NetGear FA310-TX board now works.

There are still "filter setup failed to complete" messages, however they
don't appear to indicate that the filter setup actually failed, since
unicast and multicast packet reception work fine.  I will address this
problem shortly.

Reading the log for the FreeBSD `pn' driver suggests that these chips are,
in fact, pretty crappy, riddled with hardware bugs (for which more workarounds
are coming).
1999-09-01 20:11:19 +00:00
thorpej 5d7f25011b Some of the Tulip clone chips (like the Winbond and ASIX) want the
IC bit set in the *first* descriptor of the outgoing packet.  Appease
them.
1999-09-01 05:07:03 +00:00
thorpej e293024ffa This is the long-awaited "new Tulip driver", a complete, from-scratch
rewrite of the driver for the DECchip 21x4x Ethernet chips, and a variety
of clones.

Currently, the driver supports the Winbond 89C840F (this works pretty
well), and the Lite-On PNIC (e.g. NetGear PCI boards), however Lite-On
support may be broken [I may simply have a busted test board].

Eventually, support for the Macronix and ASIX chips will filter into
this driver, and then, slowly, support for the genuine DEC chips,
and maybe even the DE-425 EISA model.
1999-09-01 00:32:41 +00:00