Commit Graph

16 Commits

Author SHA1 Message Date
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 e3427d8f2c Call bus_dmamap_sync() properly before/after reading fcd_stats
in fxp_control_data.
2000-05-26 19:11:24 +00:00
jhawk e0292df01c sc_ih (interrupt cookie) is not pci-specific data
and needs to remain in fxp_softc rather than fxp_pci_softc;
otherwise we break cardbus.
2000-05-12 18:46:33 +00:00
jhawk 6622f20fc1 Move pci-specific data to fxp_pci_softc from fxp_pci_softc.
Add some more pci-specific data to fxp_pci_softc.
2000-05-12 03:36:18 +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
enami 01868857df Add activate routine and check device active flag also in one second
tick handler.
2000-02-12 04:05:49 +00:00
joda d40e2b51ee add detach code 2000-02-09 22:15:57 +00:00
thorpej 014cd3fcc1 Take a stab at making this work on big-endian systems. 1999-12-12 17:46:36 +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 1051ab605d G/c a flag. 1999-08-03 23:18:32 +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