Commit Graph

114 Commits

Author SHA1 Message Date
thorpej 9bc69fdb97 cfg1, cfg2, and swdpin are not generic properties the same way that
mac-addr is.  Prefix them with i82543-
2006-02-27 04:50:47 +00:00
gavan fc631497e1 Convert MD hook to device property reads.
Device properties, if present, take precedence over EEPROM values.
2006-02-22 00:17:43 +00:00
gavan 7600be39ae Compute the EEPROM checksum to determine the presence of valid EEPROM data.
If EEPROM data is invalid, allow a MD hook to supply EEPROM data instead.
2006-02-16 00:02:00 +00:00
thorpej deb5def967 In the receive interrupt handler, compute the packet length before resetting
m to point to the first buffer in the packet.  The bug would cause the
length of jumbo frames to be incorrect.
2006-02-07 06:20:04 +00:00
perry 93124077ae Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:27:29 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
yamt b9269a5f4f don't reset interface on rx overrun because it makes
the situation worse, if the overrun is merely a symptom of heavy load.
increament if_ierrors instead.  PR/29831.
2005-10-29 13:24:41 +00:00
yamt c4717bee9b add ipv6 tx checksum offloading support for wm driver.
reviewed by Jason Thorpe.
2005-08-10 12:59:43 +00:00
yamt 8988782aa6 wm_rxintr: ignore h/w assisted checksum results if WRX_ST_IXSM is set. 2005-08-07 05:18:42 +00:00
skrll bb9f6f5786 Fix a typo. 2005-08-04 06:17:26 +00:00
ross d4a5f77997 Fix compilation nits with WM_DEBUG. 2005-07-25 18:26:24 +00:00
yamt 330cc0a11e split IFCAP_CSUM_xxx to IFCAP_CSUM_xxx_Rx and IFCAP_CSUM_xxx_Tx. 2005-05-02 15:34:31 +00:00
scw 08c2f0bab5 In wm_stop():
- Clear the interrupt mask to ensure the device cannot assert its
   interrupt line.
 - Clear sc->sc_icr to ensure wm_intr() makes no attempt to service any
   currently pending or shared interrupt.

This should address the problem reported in both PR/29903 and PR/22493.
(wm(4) is susceptible to crashing in wm_intr() when the interface is downed)
2005-04-26 07:55:17 +00:00
tron d8de2210c0 Add support for Intel PRO/1000 GT. Change provided in private e-mail by
unex at linija dot org.
2005-03-19 11:58:03 +00:00
matt 7dfa1d8cf7 Set ip_len to 0 in the wm driver when TSO is being used. 2005-03-11 17:07:51 +00:00
matt d86d0ac991 Add TCP Segment Offload support. 2005-03-09 19:06:19 +00:00
thorpej 04c00a86d4 - Set IFCS on every data descriptor (hint from Linux driver).
- Make sure IDE is set on context descriptors.
2005-03-05 21:37:07 +00:00
thorpej d72073667c txpullup event counters are no longer needed. 2005-03-05 05:05:43 +00:00
perry f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
thorpej 2f8e8079d1 Define M_CSUM_DATA_IPv4_IPHL() and M_CSUM_DATA_IPv4_OFFSET() macros
to extract data from csum_data, rather than just open-coding it.
2005-02-21 02:12:48 +00:00
jdolecek 2bba43d247 use VLAN_* macros for VLAN tag extraction/addition
XXX the HW VLAN tagging code stays disabled, same as before
2005-02-20 15:55:54 +00:00
thorpej 846027d4f3 Re-apply changes that were mistakenly lost by the previous revision. 2005-02-18 05:58:31 +00:00
briggs b7b84489c8 Update the interrupt mitigation support.
Actually initialize the interrupt throttling register.
Actually initialize the tx and tx absolute interrupt delay timer regs.
Update default values for the rx and tx delay timers.
Inspired by Zdenek Salvet in PR kern/29373.
2005-02-18 04:32:35 +00:00
heas f5a6c8bf2f Adjust csum_data usage; mask off the high 16 bits for L4 header stuff offset
and make use of the L3 header length from the high 16 bits such that an
m_pullup is no londer necessary.
2005-02-18 01:21:02 +00:00
thorpej 505f0442e5 Eliminate use of M_HASFCS. 2005-01-30 17:33:48 +00:00
briggs 87dda823cf Minor tweak to add newline to an aprint_error(). 2004-11-30 03:08:27 +00:00
briggs 83931ac682 The 8254x apparently doesn't respond well to I/O accesses at 0. Do not
attempt to map the I/O BAR if it is 0.  This will have the side-effect
of causing the wm_reset() routine to fall back to memory BAR accesses
for those chips on which it would attempt I/O BAR accesses for the reset.

Also update the comments about why we attempt the I/O BAR accesses for
the reset in favor of the memory BAR accesses.
2004-11-24 15:14:13 +00:00
thorpej 38f94c5d99 Don't bother caching the checksum context. Other drivers for this chip
don't, and it seems as though doing it may cause some problems.
2004-11-24 00:02:50 +00:00
thorpej 978214ebe8 If we have to do an m_pullup() when setting up offload parameters,
make sure that the pullup was done into trailing space at the end of
the existing first-mbuf-in-chain.  If not, log an error and drop the
packet, because the mbuf chain no longer corresponds to the DMA map,
and we are already committed to transmitting the packet.
2004-11-23 23:05:33 +00:00
thorpej 0d16742b72 Also toggle the second port's Ethernet address lsb on the WM_T_82546_3. 2004-11-23 21:36:38 +00:00
thorpej 0d68f66da9 Use log() instead of printf(). 2004-11-22 19:28:37 +00:00
thorpej e9818f5b5e When adding/deleting multicast addresses, only whack the address
filter if the interface is marked RUNNING.

Fixes kern/27678.
2004-10-30 18:08:34 +00:00
thorpej 57024fd924 Define a WM_MAXTXDMA constant to represent the largest Tx DMA any given
packet will require.
2004-10-06 05:29:51 +00:00
thorpej 7ee6d38e39 Sync the Tx DMA map after offload stuff has been dealt with, since the
offload set-up digs into the packet.
2004-10-06 05:23:05 +00:00
thorpej eeee37654e Restructure the loop in wm_start() that passes over the DMA map segments
slightly to make it easier to drop in errata work-arounds that require
adding extra descriptors onto the end of the packet.
2004-10-06 00:04:01 +00:00
thorpej 09421fe870 Largest Tx descriptor buffer size is actually 4K. 2004-10-05 21:29:56 +00:00
thorpej d1c33ede84 Work around another problem (that causes horrible performance) on the 82547:
- Change the Tx:Rx on-chip RAM allocation ratio based on MTU:
  => 82547: > 8192 18K:22K, else 10K:30K
  => others: > 8192 24K:40K, else 16K:48K
  Values derived from Linux driver.
- On the 82547, keep track of how much of the Tx FIFO has been used.
  When in half-duplex mode, don't let packets wrap around the FIFO ring
  buffer, because that causes the chip to croak.  Detect this, stall the
  Tx queue, use a timer to wait for the packets to drain from the Tx FIFO,
  reset the internal FIFO pointers, and restart the Tx queue.  Basic
  algorithm (and some magic numbers) derived from FreeBSD and Linux drivers.
2004-10-05 20:14:52 +00:00
simonb 35817977ee Remove an unused event counter. 2004-09-14 08:40:26 +00:00
thorpej 383b485d9a Make the product table static. 2004-08-21 22:23:13 +00:00
thorpej 867e9734f2 - Dump the mbuf chain if we encounter a "too many DMA segments" error
on transmit.
- On 82544 and up, allocate 4096 Tx descriptors rather than just 256.
  82543 and down must still use 256, due to errata.
- Allow up to 256 DMA segments per packet.  I have observed some truly
  pathological mbuf chains under certain (admittedly uncommon) workloads
  when jumbo frames are in use.
2004-08-05 19:11:11 +00:00
tron 0237ca34a7 Reduce transmit queue len to 16 for the Intel i82547 to avoid FIFO
overruns. This fixes the horrible send performance reported in
PR kern/23782. Reviewed by Frank van der Linden and Jason R. Thorpe.
2004-07-15 15:21:57 +00:00
tron 742e1a4221 The Intel i82547EI gigabit ethernet controller isn't really a PCI
device. So instead trying to find and print out the PCI bus properties
mark it as a CSA device.
2004-07-13 07:29:37 +00:00
tron 7df6314408 Make this build if WM_DEBUG is defined. 2004-07-12 14:04:36 +00:00
thorpej 47e9c860d9 Add flow control support, based on work by HITOSHI Osada. 2004-05-16 02:34:47 +00:00
ragge f62c3ab365 Remove the "panic("wm_init: MCLBYTES > 2048 not supported.");" stuff,
the driver works very well with larger MCLBYTES.
2004-05-06 10:06:50 +00:00
thorpej c235249183 Add support for 64-bit PCI DMA addressing. 2004-04-09 17:51:18 +00:00
thorpej 816a869868 s/WTC_DTYP_D/WTX_DTYP_D/ 2004-02-19 05:19:52 +00:00
thorpej 881b8b9966 Fix typo in debug message. From Jeffrey Hsu. 2004-02-19 05:18:47 +00:00
thorpej fd4acf29d4 Add missing txseg20 counter name. Pointed out by Jeffrey Hsu. 2004-02-19 02:13:23 +00:00
tsutsui 6353b12d1a Fix hardware cksum problem on big endian machines.
Tested on macppc by HATANO Hiromichi.

Note I guess this bug could be fixed only adding one htole32(),
but I'd rather clean up endianness handling:
- Use htole32() only to accesses against DMA descriptors.
- Don't use uint32_t union member  with htole32()/le32toh()
  to access uint8_t/uint16_t descriptors.
- Add le32toh() in some DPRINTF.
  (XXX: strictly speaking, bus_dmamap_sync() is needed for these DPRINTF)
2004-01-14 14:29:48 +00:00