have _detach() functions:
Ensure that softc keeps state about whether the attach succeeded,
and make the detach function return immediately if the attach did
not complete.
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.
The old timeout()/untimeout() API has been removed from the kernel.
old data in pointer fields. NOTE: we'll extend m_pkthdr field soon.
Wondering: do mbuf pre-allocation code in elink3.c really buy us much
performance? it comes with code duplicate/synchronization problem with
sys/mbuf.h...
or memspace is unexpected, failed to map iospace or failed to configure
the controller properly.
- Disestablish an interrupt handler if failed to enable card.
- Be more conservative when resetting the interface after a transmit error.
It caused the interface to totally wedge on the (somewhat common) transmit
FIFO underrun condition.
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).