Commit Graph

155 Commits

Author SHA1 Message Date
rafal
c1fc4aa545 Request DMA-coherent memory for the rx/tx descriptors. Makes this work on
sgimips (tested on my O2).  Hint re: descriptor size << cacheline size from
Tsutsui-san; thanks!
2008-02-23 06:12:30 +00:00
dyoung
2ccede0a9c Start patching up the kernel so that a network driver always has
the opportunity to handle an ioctl before generic ifioctl handling
occurs.  This will ease extending the kernel and sharing of code
between drivers.

First steps:  Make the signature of ifioctl_common() match struct
ifinet->if_ioctl.  Convert SIOCSIFCAP and SIOCSIFMTU to the new
ifioctl() regime, throughout the kernel.
2008-02-07 01:21:52 +00:00
tls
16a9229cf8 Sigh. What was meant here was an ITR register value of 1500, for 2604
interrupts/sec -- not the other way around.  Caught by yamt.

When I can confirm that it won't lock the chip up on the models claimed
to be problematic, I'll probably adjust the packet timers a bit further
to see if I can get latency down under low load.  But this should be
better.
2008-01-29 20:24:41 +00:00
dyoung
b480b62270 Make many ethernet drivers share the common code for MII media
handling, ether_mediastatus() and ether_mediachange().  Check for
a non-ENXIO error return from mii_mediachg().  (ENXIO indicates
that a PHY is suspended.)

This patch shrinks the source code size by 979 lines.  There was
a 5100-byte savings on the NetBSD/i386 kernel configuration, ALL.

I have made a few miscellaneous changes, too:

gem(4): use LIST_EMPTY(), LIST_FOREACH().
mtd(4): handle media ioctls, for a change!
axe(4): do not track link status in sc->axe_link any longer
nfe(4), aue(4), axe(4), udav(4), url(4): do not reset all PHYs
        on a change of media

Except for the change to mtd(4), no functional changes are intended.

XXX This patch affects more architectures than I can feasibly
XXX compile and run.  I have compiled macppc, sparc64, i386.  I
XXX have run the patches on i386 boxen with bnx(4) and sip(4).
XXX Compiling and running on evbmips (MERAKI, ADM5120) is in
XXX progress.
2008-01-19 22:10:14 +00:00
ragge
1d93d6da72 Add entry to match the "Intel® PRO/1000 PT Quad Port Server Adapter". 2008-01-11 13:04:39 +00:00
tls
9fcd272fb5 Adjust interrupt moderation for newer chips to be saner according to the
82571 manual and Intel Application Note 450.  Previously, we were setting
RADV and TIDV/TADV values that didn't make any sense given the enormous
ITR value we were setting (well outside the range recommended by Intel
and quite possibly rejected silently by the chip as junk) and setting
RADV without setting RDTR, which is explicitly documented as having no
effect.

A considerable performance improvement is achieved for TCP and UDP at
gigabit speed.  I need to revisit this to deal with the timer ticks
being 4X as long when the chip's in 100mbit mode, and to set values
for the older chips' interrupt timers that are more like what the
appnote recommends.  This should help for 82543 and newer, though.
2007-12-14 00:23:49 +00:00
jmcneill
4c1d81b2b5 Merge jmcneill-pm branch. 2007-12-09 20:27:42 +00:00
simonb
916b0a21f9 Some space-to-tab changes.
XXX: All the recently added ich8 support functions use 4-space indent,
     not touching that...
2007-10-30 07:49:40 +00:00
ad
a2a3828545 machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +00:00
msaitoh
a4237aa2b7 Add more work for the EEPROM reaload sequence.
Fix typo.
2007-08-30 05:48:50 +00:00
msaitoh
b7d1c5d613 EECD_EE_AUTORD is only for 8257{123},80003,ICH{89}.
Will fix "auto read from eeprom failed to complete" problem.
2007-08-30 03:02:23 +00:00
msaitoh
86b9b947e1 add ICH9
need more work?
2007-08-28 01:10:34 +00:00
dyoung
71e77a61b4 Constify: LLADDR -> CLLADDR. I'm aiming here to make it easier to
identify sockaddr_dl abuse that remains in the kernel, especially
the potential for overwriting memory past the end of a sockaddr_dl
with, e.g., memcpy(LLADDR(), ...).
2007-08-26 22:45:55 +00:00
ad
88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
simonb
9dc083f73e Fix a tyop. 2007-05-29 07:17:23 +00:00
simonb
815c7faa9e Restore $NetBSD$ tag. 2007-04-30 01:26:35 +00:00
bouyer
4b495bb053 Add support for ICH8 (i82801H) LAN, from FreeBSD.
Should work on:
i82801H IFE (GT) LAN Controller
i82801H IFE (G) LAN Controller
i82801H (M_AMT) LAN Controller
i82801H (AMT) LAN Controller
i82801H LAN Controller
i82801H (IFE) LAN Controller
i82801H (M) LAN Controller

tested with: Intel i82801H (AMT) LAN Controller, rev. 2
2007-04-29 20:35:21 +00:00
salo
1eaca7c5df fix typos in last, Eratta->Errata 2007-03-27 13:13:49 +00:00
msaitoh
f727e5ef27 Workaround for 82541 Eratta 29 and 82547 Eratta 28.
These devices have to reset the PHY before reset the MAC.

Reported and tested by salo.
2007-03-27 01:56:41 +00:00
msaitoh
5d9d95c736 KNF 2007-03-13 06:33:54 +00:00
christos
53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
msaitoh
7db9e02335 fix media link issues with fiber-based card
fixes PR#35797
2007-02-23 08:22:06 +00:00
msaitoh
f0a2eb28e5 fix some negotiation problems on wm(4).
will fix PR#30078, PR#30490, PR#30906, PR#33429, PR#35386.
2007-02-23 03:03:10 +00:00
thorpej
dd962f8680 Pick up some additional files that were missed before due to conflicts
with newlock2 merge:

Replace the Mach-derived boolean_t type with the C99 bool type.  A
future commit will replace use of TRUE and FALSE with true and false.
2007-02-21 23:48:10 +00:00
yamt
809ec70bcf implement ipv6 TSO.
partly from Matthias Scheler.  tested by him.
2006-11-23 19:41:58 +00:00
yamt
f93e215353 wm: add IPv6 rx tcp/udp checksum offloading. 2006-11-16 06:07:54 +00:00
yamt
6de2ee76e8 wm_tx_offload: in the case of "txtsopain",
m_copyback ip header to the correct offset.
2006-11-16 04:30:02 +00:00
yamt
ba0d5d1560 remove __unused from function parameters. 2006-11-15 10:30:17 +00:00
bouyer
154d613f0b Add support for the Intel 80003 Gigabit Ethernet controller (found e.g. in
newer server chipsets) to wm(4), from the FreeBSD em(4) driver.
While there, add a few other Intel Ethernet controller that should work as
is.
Properly update the RX error and TX collision counters.
Add ikphy(4), a driver for the Intel i82563 Kumeran 10/100/1000 Ethernet PHYs
2006-10-21 14:10:32 +00:00
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