Commit Graph

39 Commits

Author SHA1 Message Date
thorpej cbfe7605c9 Support ETHERCAP_VLAN_MTU by doing extra error checking upon packet
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.
2000-10-03 23:35:02 +00:00
thorpej 7ca3fb9ef0 Move the check for "promisc + unicast + not for us" into ether_input(),
and change Ethernet drivers to always pass all received frames to
ether_input() (with a few exceptions, which are documented in the
code).
2000-10-01 23:32:39 +00:00
tsutsui ab9b015dce 6 -> ETHER_ADDR_LEN 2000-09-28 10:10:14 +00:00
thorpej 756aa08443 Since the RFA is allocated in a normal mbuf, as opposed to DMA-safe
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.
2000-06-29 16:53:48 +00:00
mrg 314f1e97c5 remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h> 2000-06-28 17:12:48 +00:00
jhawk 1e59d99d28 For all network drivers that call ether_ifattach(), and also
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.
2000-05-29 17:37:12 +00:00
tsutsui 7ae8c684a8 Increase delay on EEPROM access.
CATS sometimes cannot read MAC address correctly.
2000-05-27 00:55:42 +00:00
tsutsui e3427d8f2c Call bus_dmamap_sync() properly before/after reading fcd_stats
in fxp_control_data.
2000-05-26 19:11:24 +00:00
soren c25111e4ae Make two previous changes more correct, as shown by Izumi Tsutsui. 2000-05-24 13:20:32 +00:00
soren 8922795de0 The EEPROM is little-endian. 2000-05-24 08:04:23 +00:00
soren 66083288eb Fix DMA status reading on big-endian systems. From Sanjay Lal on port-macppc. 2000-05-24 07:49:13 +00:00
soren 35bf53bd9c And a newline after error string. 2000-05-24 06:04:12 +00:00
jhawk 92f539aa66 Calibrate the timeouts from rev 1.26 by using DELAY(1) so their
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__).
2000-05-19 16:00:30 +00:00
jhawk e50925114e Catch some potentially infinite loops in while() loops if the chip happens
to "go insane" and never complete some operations (dmasync, etc.).
2000-05-12 03:35:57 +00:00
simonb 5a5c310fae Delete redundant decls of fxp_enable(), fxp_disable() - they're in
i82557var.h.
2000-03-30 02:06:17 +00:00
thorpej fc96443d15 New callout mechanism with two major improvements over the old
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.
2000-03-23 07:01:25 +00:00
thorpej 92d27d3c2e Get rid of the powerhook when we detach. 2000-03-20 07:52:58 +00:00
thorpej a6f861574a No longer necessary to futz with ifp->if_baudrate here. 2000-03-06 21:02:00 +00:00
joda c627d45cc3 (fxp_init): don't clear the FXPF_MII flag as this results in a panic
when detaching
2000-02-28 10:16:17 +00:00
enami 01868857df Add activate routine and check device active flag also in one second
tick handler.
2000-02-12 04:05:49 +00:00
enami fbc47bda30 Cosmetic changes. 2000-02-12 03:55:49 +00:00
joda d40e2b51ee add detach code 2000-02-09 22:15:57 +00:00
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 014cd3fcc1 Take a stab at making this work on big-endian systems. 1999-12-12 17:46:36 +00:00
sommerfeld 97cb535e46 change comment to mention that this driver also handles the '558 and '559 1999-12-04 02:02:30 +00:00
joda d7496546b5 try to do a better job of figuring out the EEPROM size; the old code
didn't work on (some?) 557-based cards
1999-11-19 15:19:14 +00:00
thorpej 4bdf6bd731 Call mii_down() as appropriate. 1999-11-12 18:14:17 +00:00
thorpej ca9b9a3b2e Adapt to mii_phy_probe() change. 1999-11-04 00:24:00 +00:00
sommerfeld db05febdfa Add enable/disable support and EEPROM size selection, prerequisites
for getting the cardbus fxp attachment to work.

Tested on the built-in 82559 in a VAIO Z505S.

From Johan Danielsson / PR8631; changed slightly to KNF.
1999-10-30 16:07:58 +00:00
sommerfeld 652701006d Fix suspend/resume-related problems observed on fxp0 on Sony Z505S:
Symptoms: system would crash with "data modified on free list" pool
panic from the mbuf cluster pool shortly after a resume.  The cluster
in question contained a valid 82557 receive descriptor and an IP
packet.  Happened sporadically in normal use.  Easiest way for me to
reproduce it was to run tcpdump and a flood ping and do a
suspend/resume cycle or two.

Changes:
 - in interrupt handler, if the interface isn't in IFF_RUNNING state,
just ack interrupts and return; don't try to receive packets, queue
new descriptors, etc., etc.,
 - add power control hook to take interface down on suspend,
and restart it (if it was up) on resume.
 - tweaks to fxp_stop and fxp_shutdown to avoid recursive panics due
to the (now fixed) bug.
1999-10-28 19:21:51 +00:00
thorpej 191ab2b8e4 Since we have to go through fxp_init() to properly handle IFF_ALLMULTI
anyway, take advantage of this and greatly simplify the programming
of the multicast filter.  This solves the last reported "device timeout"
problem with this driver.
1999-08-05 01:35:40 +00:00
thorpej 5ea625fe90 Almost completely rewrite the receive logic, making it as close as possible
to the EPIC/100 driver's (adjusting for the fact that Intel Ethernet chips
are from Pluto):
* Don't allocate receive buffers until the interface is actually brought
  up, and release all of them if the interface is taken down.
* Add a knob (defaults to off) which will copy an incoming packet to
  a single header mbuf if it is small enough to fit in one, rather than
  burning an entire cluster on it.  Note that this change will be mostly
  moot if/when sbcompress() is changed to handle compressing clusters.

Simplify some of the receive list logic:
* Rather than using a homegrown queue and additional software RX descriptors,
  use an ifqueue to queue receive buffers, and M_{GET,SET}CTX() to hook DMA
  maps and receive buffers together.

Clean up a bit:
* Macroize a bunch of things to make the code a bit easier to follow.
1999-08-04 05:21:18 +00:00
thorpej 11e9392b3e Only tick the MII if we are using it. 1999-08-04 00:17:28 +00:00
thorpej 0ae14b58eb Be a little less selective in the transmit interrupt path. 1999-08-04 00:14:08 +00:00
thorpej f1c6287a6e Use the Interrupt bit in the command block to generate interrupts, rather
than interrupting after every Command Unit Not Active event.
1999-08-03 23:37:14 +00:00
thorpej 5c2b83a0ad Don't bother with interrupt-driven multicast setup. 1999-08-03 23:18:09 +00:00
thorpej 3012cf91af Completely rewrite the transmit logic, making it look more like the
EPIC/100 driver's.  Also, fix the "all multicast" logic.  Also do some
general cleanup.
1999-08-03 22:43:28 +00:00
thorpej 206460244e Bus-independent back-end driver for Intel i82557 fast Ethernet chips. 1999-06-20 16:33:28 +00:00