Commit Graph

126 Commits

Author SHA1 Message Date
christos
4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
jmcneill
f135e0d607 Add "name" parameter to powerhook_establish, to aid debugging. No objections
on tech-kern@
2006-09-24 03:53:07 +00:00
wrstuden
1b9990ba67 Fix len=-4 issues.
When receiving a packet, if a receive buffer has length 0,
treat it the same way we treat a failed mapping.

Fix contributed by Wasabi Systems.
2006-07-05 23:51:50 +00:00
jmcneill
1404a243f2 Add powerhook for wm(4), from George Michaelson <ggm AT apnic DOT net> 2006-06-20 01:16:23 +00:00
christos
63bbcb495a re-factor the pci powestate api. reviewed by gimpy 2006-06-17 23:34:26 +00:00
msaitoh
134f8ab1f2 fix the MAC address of the second port of the 82571 2006-06-16 15:51:04 +00:00
msaitoh
bc1d1f7877 o i82573 doesn't support jumbo frame
o set PBA for i8257[123]
o set MULA when sc_type == i8257[123]
2006-06-10 14:26:52 +00:00
uebayasi
ee3581b772 KNF. 2006-06-10 08:11:47 +00:00
msaitoh
42a72ed2e5 fix compile error 2006-06-10 08:08:33 +00:00
msaitoh
ca1810089d Enable i82573!!!
TODO:
	add some code for FLASH
	fix phy stuff
2006-06-10 08:04:08 +00:00
msaitoh
52532c99c9 add support 82546GB_PCIE(PRO/100MT), 82541ER_LOM, 82547EI_MOBILE,
82571EB_COPPER, 82571EB_FIBER, 82572EI_COPPER, 82572EI_FIBER
and 82572EI(PRO/1000PT)

TODO: add i82573 support
2006-06-05 16:06:10 +00:00
thorpej
fb44a8574b Remove the devprop API and switch everthing over to the new proplib. Add
a new device_properties() accessor for device_t that returns the device's
property dictionary.
2006-05-05 18:04:41 +00:00
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