Commit Graph

16348 Commits

Author SHA1 Message Date
Pyun YongHyeon
1c88901672 Increase a maximum segment size of DMA to 4096. Previously it used
MCLBYTES for the segment size but it used too many Tx descriptors in
TSO case.
While I'm here adjust maximum size of the sum of all segment lengths
in a given DMA mapping to 65535, the maximum size, in bytes, of a IP
packet.
2007-06-12 02:35:01 +00:00
Pyun YongHyeon
1464ddfac0 Allow nfe(4) override nve(4). 2007-06-12 02:21:02 +00:00
Pyun YongHyeon
aab5582f0a Bring overhauled nfe(4) into tree.
o s/printf/device_printf/g
o Nuke OpenBSDism.
o Nuke NetBSD/OpenBSD specific DMA sync operations.(we don't have a way
   to sync a single descriptor within a DMA map.)
o Remove recursive mutex.
o bus_dma(9) clean up.
o 40bit DMA address support.
o Add protection for Rx map load failure.
o Fix a long standing bug for watchdog timeout. [1]
o Add additional protections, missing Tx completion interrupt, losing
   start Tx command, for watchdog timeout.
o Switch to taskqueue(9) API to handle interrupts.
o Use our own timer for watchdog instead of if_watchdog/if_timer
   interface.
o Advertise VLAN header length/capability correctly to upper layer.
o Remove excessive kernel stack consumption in nfe_encap().
o Handle highly fragmented mbuf chains correctly.
o Enable etherenet address reprogramming with ifconfig(8).
o Add ALTQ/TSO, MSI/MSIX support.
o Increased Rx ring to 256 descriptors from 128.
o Align Tx/Rx descriptor ring on sizeof(struct nfe_desc64) boundary.
o Remove alignment restrictions on Tx/Rx buffers.
o Rewritten jumbo frame support code.
o Add support for hardware assistend VLAN tag insertion/stripping.
o Add support for Tx/Rx flow control based on patches from Peer Chen. [2]
o Add a routine that detects whether ethernet address swap routines is
   required. [3]
o Add a workaround that take MAC/PHY out of power down mode.
o Add suspend/resume support.
o style(9) and code clean up.

Special thanks to Shigeaki Tagashira, the original porter of nfe(4),
who submitted lots of patches, performed uncountable number of
regression tests and maintained nfe(4) for a long time. Without his
enthusiastic help and support I could never have completed this
overhauling task.

The only weak point of nfe(4) compared to nve(4) is instability of
manual half-duplex media selection on certain hardwares(auto sensing
media type should work for all cases, though). This was a long
standing bug of nfe(4) and I still have no idea why it doesn't work
on some hardwares.

Obtained from:	OpenBSD [1]
Submitted by:	Peer Chen < pchen at nvidia dot com > [2], [3]
Reviewed by:	Shigeaki Tagashira < shigeaki AT se DOT hiroshima-u DOT ac DOT jp >
Tested by:	Shigeaki Tagashira, current
Discussed with:	current
Silence from:	obrien
2007-06-12 02:16:02 +00:00
Matt Jacob
511ced9b7c Remove some ioctls that were ill-thought out. There is no user
impact as no softwware using these ioctls was ever committed.

Redo locking for ispioctl.
2007-06-11 19:15:49 +00:00
Andrew Gallatin
56b8f0b02d Back out the previous commit which added an M_LRO mbuf flag
to defeat the mtu check in ether_input.  Mbuf flags are too scarce.
Discussed with: sam
2007-06-11 18:26:25 +00:00
Matt Jacob
9b434ede5c Only try and set a segment lim size to 1 << 32 iff bus_size_t > 4. 2007-06-11 17:56:17 +00:00
Andrew Gallatin
b6af0abdc4 Allow drivers, such as cxgb and mxge, which support LRO to bypass
the MTU check in ether_input() on LRO merged frames.

Discussed with: kmacy
2007-06-11 14:59:56 +00:00
Andrew Gallatin
276edd10ac Small LRO related fixes for mxge:
- Allow LRO to be enabled / disabled at runtime
- Fix a double-free at module unload time.
- Only update timestamp in lro merge when it is present in the frame
Sponsored by: Myricom
2007-06-11 14:01:10 +00:00
Andrew Thompson
8d399898ec MFp4 (missed in net80211 megaupdate)
- Use a seperate taskqueue+thread for reset tasks since iwi_ops will
   block.
 - Return from iwi_ops if the interface has been downed
 - The firmware will fail if we are already associated
 - Add myself to the copyright
2007-06-11 10:56:06 +00:00
Warner Losh
930ed6f61b Expand DECLARE_USB_DMA_T inline in the one place it is used and eliminate
from usb_port.h.
2007-06-11 06:21:50 +00:00
Warner Losh
c02f7d824d Eliminate USB_ATTACH_SETUP and USB_MATCH_SETUP. They are no longer in
the tree.
2007-06-11 06:18:34 +00:00
Warner Losh
2a88b253af Prefer device_printf over printf. 2007-06-11 06:14:42 +00:00
Warner Losh
478124e645 Minor tweak. 2007-06-11 06:03:32 +00:00
Warner Losh
339075ea3d Prefer device_printf to printf
Eliminate rue_unit from softc

# saves ~200 bytes
2007-06-11 06:01:05 +00:00
Warner Losh
9b1defb041 Prefer device_printf to printf
Remove keu_unit from softc

# this change saves about 180 bytes in the module, all in text
2007-06-11 05:50:47 +00:00
Warner Losh
b4b82058d3 Get rid of useless devinfo stuff
Kill bogus bzero
prefer device_printf to printf

Reviewed by: alfred@
2007-06-11 05:44:28 +00:00
Warner Losh
68069d1337 Prefer device_printf to printf where sane.
Elimiante cue_unit from softc.
2007-06-11 05:42:47 +00:00
Hidetoshi Shimokawa
40ca0d5755 - Don't force to be the GDB port since dcons(4) is in GENERIC now.
To enable the GDB port of dcons(4), you need to put
  dcons_gdb=1
in /boot/loader.conf.
2007-06-11 04:08:50 +00:00
Sam Leffler
68e8e04e93 Update 802.11 wireless support:
o major overhaul of the way channels are handled: channels are now
  fully enumerated and uniquely identify the operating characteristics;
  these changes are visible to user applications which require changes
o make scanning support independent of the state machine to enable
  background scanning and roaming
o move scanning support into loadable modules based on the operating
  mode to enable different policies and reduce the memory footprint
  on systems w/ constrained resources
o add background scanning in station mode (no support for adhoc/ibss
  mode yet)
o significantly speedup sta mode scanning with a variety of techniques
o add roaming support when background scanning is supported; for now
  we use a simple algorithm to trigger a roam: we threshold the rssi
  and tx rate, if either drops too low we try to roam to a new ap
o add tx fragmentation support
o add first cut at 802.11n support: this code works with forthcoming
  drivers but is incomplete; it's included now to establish a baseline
  for other drivers to be developed and for user applications
o adjust max_linkhdr et. al. to reflect 802.11 requirements; this eliminates
  prepending mbufs for traffic generated locally
o add support for Atheros protocol extensions; mainly the fast frames
  encapsulation (note this can be used with any card that can tx+rx
  large frames correctly)
o add sta support for ap's that beacon both WPA1+2 support
o change all data types from bsd-style to posix-style
o propagate noise floor data from drivers to net80211 and on to user apps
o correct various issues in the sta mode state machine related to handling
  authentication and association failures
o enable the addition of sta mode power save support for drivers that need
  net80211 support (not in this commit)
o remove old WI compatibility ioctls (wicontrol is officially dead)
o change the data structures returned for get sta info and get scan
  results so future additions will not break user apps
o fixed tx rate is now maintained internally as an ieee rate and not an
  index into the rate set; this needs to be extended to deal with
  multi-mode operation
o add extended channel specifications to radiotap to enable 11n sniffing

Drivers:
o ath: add support for bg scanning, tx fragmentation, fast frames,
       dynamic turbo (lightly tested), 11n (sniffing only and needs
       new hal)
o awi: compile tested only
o ndis: lightly tested
o ipw: lightly tested
o iwi: add support for bg scanning (well tested but may have some
       rough edges)
o ral, ural, rum: add suppoort for bg scanning, calibrate rssi data
o wi: lightly tested

This work is based on contributions by Atheros, kmacy, sephe, thompsa,
mlaier, kevlo, and others.  Much of the scanning work was supported by
Atheros.  The 11n work was supported by Marvell.
2007-06-11 03:36:55 +00:00
Pyun YongHyeon
78679427f6 Add icsphy(4), Integrated Circuit Systems PHY driver, ported from
NetBSD. ATM the only consumer of the PHY is XBox with nfe(4) driver.

Submitted by:	Ed Schouten <ed@fxq.nl>
Tested by:	Ed Schouten <ed@fxq.nl>
2007-06-11 02:04:50 +00:00
Pyun YongHyeon
fcb11bb3f9 Add ICS1889/ICS1892/ICS1893 PHY.
Submitted by:	Ed Schouten <ed@fxq.nl>
2007-06-11 02:02:20 +00:00
Pyun YongHyeon
8b51df84e9 Increase a maximum segment size of DMA to 4096. Previously it used
MCLBYTES for the segment size but it used too many Tx descriptors in
TSO case.
While I'm here adjust maximum size of the sum of all segment lengths
in a given DMA mapping to 65535, the maximum size, in bytes, of a IP
packet.
2007-06-11 02:00:50 +00:00
Pyun YongHyeon
cf7a67bf4b Disable automatic IP ID increment. Due to a hardware bug the automatic
IP ID increment in TSO case generated corrupted IP packets.
This change brings back TSO capability.
2007-06-11 01:55:09 +00:00
Ariff Abdullah
bdfbdcec6a Filter/compress the amount of channel trigger. This should reduce
much of lock/unlock contentions within the interrupt handler. Most
of these drivers only need PCMTRIG_START or STOP (ABORT).

Discussed with:		scottl
2007-06-11 00:49:46 +00:00
Ariff Abdullah
f6cdab92db - Add codec id for ALC660 [1]
- Add codec id for AD1988B, along with fixing its line-in and other
  issues (with proper quirks). [2]

Submitted by:	[1] barbara.xxx1975@libero.it
             	[2] Oliver Brandmueller ob@e-Gitt.NET
MFC after:	3 days
2007-06-10 23:01:40 +00:00
Matt Jacob
adb0d36d03 Cast len to be a uintmax_t and make format in KASSERT match so as
to avoid different sizes on different platforms types of complaints.

Reviewed by:	Ariff
2007-06-10 15:46:34 +00:00
Matt Jacob
471f8f34b5 Remove const type qualifier from a function- gcc4.2 doesn't accept it.
Reviewed by:	Ariff
2007-06-10 15:45:29 +00:00
Warner Losh
ab8c137045 Prefer device_printf over printf
Eliminate cdce_unit from softc.
2007-06-10 07:33:48 +00:00
Warner Losh
ed6ed00ed0 Prefer device_printf over printf. Eliminate axe_unit as it is no
longer required.
2007-06-10 07:24:32 +00:00
Matt Jacob
fc2ca23fa3 Remove unused variable. 2007-06-10 04:51:03 +00:00
Matt Jacob
16ccae5559 Complete an initialization to make gcc 4.2 happy. 2007-06-10 01:28:55 +00:00
Matt Jacob
cffc6c3fe1 Initialize devname. 2007-06-10 01:28:26 +00:00
Ruslan Ermilov
1f082787d4 Make this compile. 2007-06-09 11:07:07 +00:00
Warner Losh
8d58ce651f Expand USB_ATTACH_SETUP inline + devinfo tweaks
# looks like there's a chance that uaudio might compile on otherBSD, so leave
# those #defines alone as well as make this change in a compatible way.
2007-06-09 06:49:05 +00:00
Warner Losh
a5b1cb0cd0 Remove devinfo junk.
Remove bogus bzero/memset
Expand USB_ATTACH_SETUP
Minor nits
2007-06-09 06:42:19 +00:00
Warner Losh
07f51bab6d Remove lots of extra junk:
o other bsd defines, there's no way this would work there
o devinfo junk
2007-06-09 06:40:17 +00:00
Warner Losh
80170fd0c4 Kill devinfo stuff. It is no longer needed.
Kill bogus bzero as necessary.
Minor tidy.
Expand USB_ATTACH_SETUP inline where needed.
2007-06-09 06:39:43 +00:00
Warner Losh
7f5ede5819 Kill USB_MATCH_SETUP, since this is the only place it was used in the tree.
While I'm here, kill devinfo junk.
2007-06-09 06:38:19 +00:00
Warner Losh
e491a67b63 Try to set the data multiplexed feature, but don't care if there's an
error doing so.  It seems an increasing number of phones have this
quirk, and we're not keeping up.  There appears to be nothing bad that
happens for non-quirked phones.

Minor cleanups:
o prefer device_printf over printf
o kill devinfo stuff
o minor other preening.
2007-06-09 06:37:17 +00:00
Warner Losh
e591b223d8 The devinfo stuff has been moved up into the parent bus. There's no
need to do it at all anymore.  Remove it from here.  Expand
USB_ATTACH_SETUP inline now that it is one line and we're moving away
from the compat macros.  Remove some bzero calls that turn out not be
be necessary.
2007-06-09 06:31:07 +00:00
Warner Losh
58ba374e3d Cleanup messages printed on attach. Since the description gets set to
what we print, don't print it anymore.  And don't compute it anymore.
And don't malloc/free memory for it anymore.  While I'm here, prefer
device_printf where appropriate.
2007-06-08 22:25:09 +00:00
Doug White
d9306f7610 Don't cast the command argument to ether_ioctl() to an int since its not an
int anymore. This was causing all sorts of bad behavior when booting a system
with an nve interface present.
2007-06-08 22:00:56 +00:00
Hidetoshi Shimokawa
c59557f5d4 Timestamp after sent. 2007-06-08 09:04:30 +00:00
Hidetoshi Shimokawa
55f84274e3 Don't invalidate dcons buffer on shutdown.
We would like to keep connection after halt.
2007-06-08 08:23:14 +00:00
Hidetoshi Shimokawa
7acf69638a Fix a race after a bus reset.
- We are in FWBUSINIT state just after SID interrupt.
- Do not pass normal xfers before bus probe is done.
2007-06-08 07:53:59 +00:00
Hidetoshi Shimokawa
293b847542 Add the address of IDT in the configuration ROM. (i386/amd64 only)
A change to dconschat(8) will follow so that it can bomb
this address over FireWire to reset a wedged system.

Though this method is just a hack and far from perfection,
it should be useful if you don't want to go machine room
just to reset or to power-cycle a machine without
remote-managed power supply.  And much better than doing:
# fwcontrol -m target-eui64
# dd if=/dev/zero of=/dev/fwmem0.2 bs=1m
2007-06-08 04:33:25 +00:00
Warner Losh
17ee700be6 gcc 4.2 thinks that tupleid is uninitialized. Or might be used
uninitialized.  It gets passed into other routines that initialize
it...  Cope by initializing.

Submitted by: mjacob
2007-06-08 04:03:57 +00:00
Hidetoshi Shimokawa
c8dde64562 Replace breakpoint() with kdb_enter(). 2007-06-08 03:05:57 +00:00
David Christensen
599741f908 - Fixed a problem that caused autonegotiation failures.
Submitted by:	tor.egge@cvsup.no.freebsd.org
MFC after:	4 weeks
2007-06-08 02:34:44 +00:00
Matt Jacob
208f1b3bd4 Propagae volatile qualifier. 2007-06-08 01:54:22 +00:00