on the following PRO/100 chips:
* i82558 step A4
* i82558 step B0
* i82559 step A0
* i82559S step A
* i82550
* i82550 step C
The interrupt delay is configurable on all microcodable chips. The
maximum "bundle" size (packet count) is configurable on all but the
i82558.
The microcode is enabled by setting IFF_LINK0 on the interface.
Derived from code in FreeBSD.
The ICH on-board Ethernet and some i82559 chips have a bug which
will cause a PCI protocol violation if the chip receives a CU_RESUME
command as it is entering the IDLE state by deasserting #CLKRUN.
(This is the so-called "resume bug" that we previously had an incomplete
work-around for on ICH chipsets.)
The work-around is to disable Dynamic Standby Mode, such that the
chip will never deasert #CLKRUN. Dynamic Standby Mode is disabled
by clearing a bit in the EEPROM and updating the EEPROM (and EEPROM
checksum).
Unfortunately, the chip will only consult the EEPROM setting after
a PCI bus reset, so a system reboot is required once the EEPROM
has been updated (the EEPROM update only needs to happen once,
and the driver usses a warning instructing the user to reboot the
system once the work-around has been applied).
Issue pointed out by David Brownlee, and code more-or-less lifted
from FreeBSD.
- Add some additional config block bits for the i82558/i82559.
- Change the config block template to only fill in the must-be-one
reserved bits, leave fxp_init() to fill in all the important things.
- On the i82558/i82559, we can use "Receive Long Frames" rather than
"Save Bad Frames" to support the VLAN MTU.
- Use 802.3x flow control on the i82558/i82559. This is all handled
transparently by the hardware. When in promiscuous mode, allow
wire-watchers to see the flow control frames.
- Use the Extended TxCB format on the i82558/i82559. This places two
Transmit Buffer Descriptors directly in the TxCB, which should cover
the vast majority of packets transmitted. This saves PCI transactions
that would otherwise be required to fetch the TBD list.
With the tansmit queue length changes from yesterday, this gets us up to
11.5MB/s TCP transmit speed, out of an absolute maximum of 12MB/s possible
on a 100Mb/s link.
reception and saving other "bad frames" (i.e. ones that are larger
than the standard Ethernet frame length) if we have VLANs configured
on the interface.
memory that is explicitly mapped in a DMA-coherent manner, we must
make sure to PREREAD sync the RFA after noticing a clear "complete"
bit. Without this, the clear bit will linger in the cache, and the
CPU will not notice when the chip updates the bit via DMA later.
From Izumi Tsutsui on port-arm32@netbsd.org.
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.
values are less machine-dependant. Fixes port-i386/10141, where
spurrious timeouts were being seen.
Also note the line numbers of the timeouts so it can be determined
which is being seen (via __LINE__).
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.