the correct "read eeprom" opcode on the RoadRunner (which has a larger
EEPROM, and thus needs a different opcode to make room for the larger
offsets).
- Reset and enable the MII before probing for PHYs, and reset and enable
the MII in epinit().
- Be more conservative when resetting the interface after a transmit error.
Based on PR #8331, from Ryoji KATO.
Closer on 3c574, probably will work fine with the 3CCFEM556BI (which
won't have an older rev TDK Semi PHY, and which was tested by the author
of the PR).
directly, call the function pointer (*if_input)(ifp, m). The input routine
expects the packet header to be at the head of the packet, and will adjust
as necessary. Privatize the layer 2 input and output routines, allowing
*_ifattach() to set them up as appropriate.
per-packet discard of every received packet increases latency and
decrease throughput. INstead, Spin on S_COMMAND_IN_PROGESS for enough
iterations as the expected time to completion. Only do DELAY()/poll
loops (as suggested by Jason Thorpe) if spinning fails.
Take PCI as fastest case and compute worst-case estimate.
Shorten DELAY() in S_COMMAND_COMPLETE polling-loop up 10, loop-count
down. to speed up epreset() completion (m/c filter change, ifup/ipdown, etc).
* Clear the `enabled' bit in the softc so late hardware interrupts
(e.g., just after the full reset) done as part of shutdown) are dropped.
* Eliminate loops that poll forever on S_COMMAND_IN_PROGRESS to complete.
Add inline function with bounded loopcount plus small delay, to avoid
bugs in EISA hardware which never sets S_COMMAND_IN_PROGRESS.
Use for both TX_RESET/RX_RESET/GLOBAL_RESET cmds, and polling for
discard-Rx completion
Big-endian CPUs should use bus_space_{read,write}_multi_stream methods
to PIO packet data to NIC in 16-bit or 32-bit chunks.
Make it so.
Since we don't have stream methods on all ports yet (esp. i386), use
the bus_space_{read,write}_multi methods if the compile-time
stream-method feature-test macro is not set.
Originally from tsubai@netbsd.org, via HAYAKAWA koichi's cardbus patches.
in epsetmedia() if full-duplex is selected (new feature on these cards!)
On MII Boomerangs, set the full-duplex bit in MAC CONTROL in the statchg
callback from the MII layer. Should fix full-duplex on these cards.
the 3Com 3c905-TX and 3c905-T4. Fix handling of the MII on the
3c595-MII and 3c597-MII (can't talk to the PHYs on these cards; just
use "manual" for the external MII port).
Fixes kern/4782 (Chris Demetriou).
* epinit() had both explicit xcvr selection for 3c589 and a call
to epsetmedia(). The first is redundant; delete it, and EP_COAX_DEFAULT.
* Update comments to reflect 3c589 and 3c509B fixes. Fix typos.
Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.
For the detailed change history, look at the commit log entries for
the is-newarp branch.
to prepare for if_media, and to support EISA 3c59x cards:
* change epconfig() to take a short that encodes the chipset
type (3c509, or Demon/Vortex/Boomerang).
* add distinct 3c509 and Demon/Vortex/Boomerang media-sense
functions to back end.
* Add EISA match/attach support for the 3c592 and 3c597
(Demon) cards as well as the 3c509-comatibl EISA 3c509/3c579.
* Assume that ISA and ISA PnP cards are 3c509-style, until
proof to the contrary (e.g. large packet support).
Tested on 3c595, 3c590, and 3c509b. Not tested on 3c515 or Demon.
(RX_RESET, TX_RESET, GLOBAL_RESET).
Commands issued while a reset is in progress may be dropped. The driver
must wait until resets are complete; ep_complete_cmd() does so.
* Change RX_RESET, TX_RESET, GLOBAL_RESET to use ep_complete_cmd().
* Revert epconfig() to use inline RX_RESET, TX_RESET.
That avoids accidentally setting IFF_UP, which breaks both diskless boot,
and "halt" commands issued before the interface is brought up.
Newer boards (e.g., Vortex) take time to reset, and wedge on some machines.
Polling on S_COMMAND_IN_PROGRESS would be better, but that doesn't
work with xx_RESET commands on 3c509s.
CONFIG_CNTRL bits by making the "conn" argument to epconfig()
a u_int, not a u_int16_t, and by defining 100mbit media
bits in the upper 16 bits.
A redesigned interface that fixes this properly is in the pipeline.
comments in pr port-i386/2358: "if_ep/3C590 no longer working"
* Only call Vortex media-config code on PCI-attached devices, until
we know if it works on ISA and EISA large-packet devices also.
* Fix typo in printf of MAC address
look for 100mbit Xcvrs, print their names, add to ep_connectors.
* Print 10baseT as 10baseT, since media name (utp) is no longer a unique
transceiver type.
* Redo FIFO memory size printing, also show Tx/Rx split (xxx isa 3c509?).
* Print MAC address on a separate line, with 100Mbit media and fifo-ram
info it no longer fits on the same line as media types.
* Comment the fact that the "connection" media-selection code just doesn't
grok 100Mbit media.
* add code to look for 3c59x/3c90x media-select and autoconfig bits, though
we don't yet dynamically probe media when the autoconfig bit is set
(see previous bullet).
* XXX the whole connector/media code should be redone, perhaps a' la
the BSDI ifmedia design.
Add newline to `Interface disabled' printf and clean up formatting.
Change packet read/write code to align all reads and writes into
memory to an appropriate boundary for the I/O size. This also fixes
a bug where the trailing unaligned bytes (1-3 of them) would be
put in an additional mbuf even if there was enough space for them
in the one we were currently filling.
This has been tested on a 3c905 in an Alpha (32-bit I/O, alignment
required), a 3c905 in an i386 (32-bit I/O, alignment not required)
and a 3c509 in an i386 (16-bit I/O, alignment not required). It
should be tested on a 3c509 in an Alpha with an ISA bus, if somone
can manage to get the two items together.
There are still some bugs in the driver relating to initialisation;
on my Alpha with a 3c905 you need to do an `ifconfig ep0 down;
ifconfig ep0 up' after the initial ifconfig to make it start working.
Apparently there are also some problems with a 3c579 in an i386,
although a 3c905 in an i386 works just fine.