Commit Graph

72161 Commits

Author SHA1 Message Date
Rick Macklem
933a30b6b7 Change the semantics of i_modrev/va_filerev to what is required for
the nfsv4 Change attribute. There are 2 changes:
 	1 - The value now changes on metadata changes as well as data
 	    modifications (incremented for IN_CHANGE instead of IN_UPDATE).
 	2 - It is now saved in spare space in the on-disk i-node so that it
 	    survives a crash.
 	Since va_filerev is not passed out into user space, the only current
 	use of va_filerev is in the nfs server, which uses it as the directory
 	cookie verifier. Since this verifier is only passed back to the server
 	by a client verbatim and then the server doesn't check it, changing the
 	semantics should not break anything currently in FreeBSD.

Reviewed by:	bde
Approved by:	kib (mentor)
2009-04-27 16:46:16 +00:00
Doug Ambrisko
a18c284294 Start to convert this over to the new tty layer. These changes allow
this driver to compile and limp along with the new layer.  These changes
do not deal with proper locking around access to the HW.  This is only
a starting point.  I have not tested modem control but tip seems to work
okay and I can send and receive characters which I needed for one of my
-current boxes.  I have not tied this driver back up to the build since
I don't want people to think it is ready for prime time.  If anyone
else has some cycles to work on this feel free to!

Also add support for a 16 port PCI interface I have at work.

Glanced at by:	ed
2009-04-27 15:58:38 +00:00
Andrew Gallatin
c6cb3e3fe8 Updates to mxge for multiple tx/rx rings:
- Update mxge to use if_transmit(), and the new buf_ring
  interfaces, so as to enable multiple transmit queues.
  Use of if_transmit() is conditional on IFNET_BUF_RING,
  and is enabled by default (as in if_em).

- Record a flow id on receive if receive hashing is active.
  I currently only record the rx ring id (0..8) rather than
  the 32-bit topelitz hash result, as doing the latter would
  require shifting the driver to use a larger rx return ring.

Sponsored by:  Myricom, Inc.
2009-04-27 15:45:54 +00:00
Sam Leffler
f2a6a13c3b add IEEE80211_FEXT_4ADDR to indicate ieee80211_encap should do 4-address
encapsulation when relaying frames; this reduces the cost of the test and
enables use for situations other than "sta vap + dwds"
2009-04-26 23:11:22 +00:00
Sam Leffler
0510acbded don't depend on includes to get definitions of struct ieee80211_tx_ampdu
and ieee80211_rx_ampdu; these should've been part of r191552
2009-04-26 23:04:35 +00:00
Sam Leffler
168f582e2e hoist ampdu tx aggregation setup from ieee80211_encap to ieee80211_start
where it was meant all along (the code was in encap because ampdu was
implemented pre vaps)
2009-04-26 23:02:17 +00:00
Sam Leffler
51b5aba2d6 allow drivers to hook ampdu rx start/stop 2009-04-26 22:54:51 +00:00
Sam Leffler
7f6a5468a6 improvements:
o formatting
o more rx ampdu state
o tdma state
o show ifnet names
o show auth policy name
2009-04-26 22:49:25 +00:00
Sam Leffler
7ebe9c0e2e stash the node pointer in the mbuf before doing ff aggregration so this
is done in only one place
2009-04-26 22:45:21 +00:00
Sam Leffler
ec4313cb78 whitespace 2009-04-26 22:44:23 +00:00
Marko Zec
093f25f8c8 In preparation for turning on options VIMAGE in next commits,
rearrange / replace / adjust several INIT_VNET_* initializer
macros, all of which currently resolve to whitespace.

Reviewed by:	bz (an older version of the patch)
Approved by:	julian (mentor)
2009-04-26 22:06:42 +00:00
Sam Leffler
dc7bf546c8 print both fc bytes when hitting a protocol version mismatch 2009-04-26 21:50:21 +00:00
Sam Leffler
49eae5f79e add iv_recv_ctl method to allow hooking rx ctl frame handling 2009-04-26 21:46:04 +00:00
Sam Leffler
e9cfc1f500 don't fragment ampdu aggregates 2009-04-26 21:37:02 +00:00
Sam Leffler
9e80b1df7e uniformly mark mbufs that pass through the tx path with M_MCAST; drivers
can now use this flag instead of inspecting the contents
2009-04-26 21:34:53 +00:00
Alan Cox
a80982c113 Eliminate an errant comment.
Discussed with:	tegge
2009-04-26 21:24:50 +00:00
Sam Leffler
90f8f6d883 o add missing 802.3 bpf tap
o add 802.11 bpf tap to output path now that it's removed from ieee80211_encap
2009-04-26 21:21:48 +00:00
Sam Leffler
dc72796759 add missing DLT_IEEE802_11 tap 2009-04-26 21:21:07 +00:00
Sam Leffler
525ae70f94 add missing part of r191537 that should have read: hoist DLT_IEEE802_11
bpf tap from ieee80211_encap up to ieee80211_start
2009-04-26 21:16:29 +00:00
Robert Watson
d02add54ea Improve approximation of style(9). 2009-04-26 21:16:03 +00:00
Sam Leffler
fad788b1dc fix comment 2009-04-26 21:13:18 +00:00
Sam Leffler
77825c77d7 add missing DLT_IEEE802_11 bpf tap in ieee80211_start 2009-04-26 21:12:19 +00:00
Sam Leffler
0e910c9412 fixup ieee80211_output handling:
o correct bpf handling, send 'em to the right tap
o do accouting
o mark mbufs holding multicast frames
2009-04-26 21:11:12 +00:00
Ed Schouten
63aa259b14 Remove the unused insque() and remque() functions.
We have no code in the tree that uses these anymore. New code should
just use the regular queue(3) macros.
2009-04-26 21:06:11 +00:00
Sam Leffler
8bbd3e4119 o use shared code to handle bpf tap and mbuf cleanup
o swap conditional order to put the cheapest first
2009-04-26 21:03:29 +00:00
Ed Schouten
cb8e440466 Make the SPX code use its own copies of insque()/remque().
Instead of using the antique insque()/remque() functions from
sys/queue.h, make this code use its own versions. Eventually the code
should just use the regular TAILQ/LIST macros.
2009-04-26 21:03:27 +00:00
Sam Leffler
7cd89f6474 correct bssid reporting for wds vaps 2009-04-26 20:55:31 +00:00
Alan Cox
78cfe1f7bd Eliminate an archaic band-aid. The immediately preceding comment already
explains why the band-aid is unnecessary.

Suggested by:	tegge
2009-04-26 20:54:57 +00:00
Bjoern A. Zeeb
4c4917ba97 Whitespace (use tabs like for all other lines).
MFC after:	 1 month
2009-04-26 19:15:19 +00:00
Robert Watson
db091502fb Acquire IF_ADDR_LOCK() around most iterations over ifp->if_addrhead
(colloquially known as if_addrlist).  Currently not acquired around
interface address loops that call out to the routing code due to
potential lock order issues.

MFC after:	3 weeks
2009-04-26 19:05:40 +00:00
Ed Schouten
e439bf9ccc Remove unneeded device index from unit number.
We only use the unit number to determine whether we should rewind the
device upon closure.
2009-04-26 09:21:37 +00:00
Marko Zec
aef8f3445b In preparation to make options VIMAGE operational, where needed,
initialize / release netgraph related state in iattach() / idetach()
functions called via the vnet module registration / initialization
framework, instead of initialization / cleanups being done in
mod_event handlers.

While here, introduce a crude hack aimed at preventing ng_ether to
autoattach to ng_eiface ifnets, which are also netgraph nodes already.

Reviewed by:	bz
Approved by:	julian (mentor)
2009-04-26 07:14:50 +00:00
Marko Zec
5624194730 Extend the vnet module registration / initialization framework
first introduced @ r190909 with a vnet module deregistration
service.

kldunloadable modules, which are currently using vnet_mod_register()
to attach their per-vnet initialization routines to the vnet
initialization framework, should call vnet_mod_deregister() before
acknowledging MOD_UNLOAD requests in their mod_event handlers.  Such
changes to the existing code base will follow in subsequent commits.

vnet_mod_deregister() does not check whether departing vnet modules
are registered as prerequisites for another module(s), so it should
be used with care.  Currently I'm only aware of vnet modules which
are leafs on module dependency graphs that are kldunloadable.

This change also introduces per-vnet module destructor handler, which
calls vnet's module cleanup function, which (if required) has to be
registered in vnet module's vnet_modinfo_t structure .vmi_idetach
field.  Once options VIMAGE becomes operational, the framework will
take care that module's cleanup function become invoked for each
active vnet instance, and that the memory allocated for each instance
gets freed.  Currently calls to destructor handlers must always
succeed.
2009-04-26 07:09:39 +00:00
Robert Watson
588885f2f5 Expand coverage of IF_ADDR_LOCK() in in_control() from point of initial
lookup of 'ia' from if_addrhead through most use.  Note that we
currently have to drop it prematurely in some cases due to calls out to
the routing and interface code while using 'ia', but this closes many
races.  Annotate several potential races that persist after this change.
Move to using M_NOWAIT for allocating new interface addresses due to
lock(s) being held.

MFC after:	3 weeks
2009-04-25 23:02:57 +00:00
Andrew Thompson
4d4fa6edd4 Make the state string descriptions public. 2009-04-25 21:25:52 +00:00
Andrew Thompson
bd21677868 Track the usb device state as its powered on, addressed and configured. This helps
to avoid touching the device when it is not going to respond and would otherwise
timeout.

Implement the suspend tracking as a udev state too.
2009-04-25 21:10:06 +00:00
Ed Schouten
ccfd3aab30 Turn MAXPTSDEVS into a sysctl tunable.
This allows users to increase the maximum amount of pseudo-terminals
without changing any source code. Users must increase UT_LINESIZE before
attempting to increase kern.pts_maxdev.
2009-04-25 10:05:55 +00:00
Alan Cox
016a3c93b2 Eliminate unnecessary calls to pmap_clear_modify(). Specifically, calling
pmap_clear_modify() on a page is pointless if that page is not mapped or
it is only mapped for read access.  Instead, assert that the page is not
mapped or not mapped for write access as appropriate.

Eliminate unnecessary clearing of a page's dirty mask.  Instead, assert
that the page's dirty mask is clear.
2009-04-25 02:59:06 +00:00
Robert Watson
07cde5e92c In in_purgemaddrs(), remove the inm being freed from the address list
before freeing it, rather than vice version, to avoid potential use
after free.

Reviewed by:	bms
2009-04-24 22:11:53 +00:00
Warner Losh
1c51765e41 Add Surecom EP-427X. 2009-04-24 17:28:12 +00:00
Warner Losh
a5a8a1c8fe Another PC Card that needs the CIS strings for the Surecom EP-427X,
which really is just a rebadged OEM card...  Plus a tiny whitespace
nit.
2009-04-24 17:27:45 +00:00
Robert Watson
cf7b18f15e Relocate permissions checking code in in_control() to before the body
of the implementation of ioctls.  This makes the mapping of ioctls to
specific privileges more explicit, and also simplifies the
implementation by reducing the use of FALLTHROUGH handling in switch.

While this is not intended to be a functional change, it does mean
that certain privilege checks are now performed earlier, so EPERM
might be returned in preference to EADDRNOTAVAIL for management
ioctls that could have failed for both reasons.

MFC after:	3 weeks
2009-04-24 09:54:46 +00:00
Rafal Jaworowski
6a5f0fd39d Zero PCB during early AIM PowerPC init.
When memory is not zero'ed by firmware, uninitialized PCB can have bogus
contents, which appear as a saved onfault condition, Altivec context to
restore etc. and lead to corruption/crashes. This commit fixes such issues.

Submitted by:	Michal Mazur arg ! semihalf dot com
Tested by:	Andreas Tobler andreast-list ! fgznet dot ch
2009-04-24 08:57:54 +00:00
Marcel Moolenaar
ac741ae511 Add suppport for ISA and ISA interrupts to make the ATA
controller in the VIA southbridge functional in the CDS
(Configurable Development System) for MPC85XX.
The embedded USB controllers look operational but the
interrupt steering is still wrong.
2009-04-24 03:51:11 +00:00
Marcel Moolenaar
23815def34 Remove isa_irq_pending(). It's not used. 2009-04-24 03:43:20 +00:00
Marcel Moolenaar
5a7189f8b9 Reimplement bs_be_rs_{1|2|4} and bs_le_rs_{1|2|4} by not
calling the inline functions in <machine/pio.h> and do
not add synchronization. Implement bs_gen_barrier() as
eieio and sync.
2009-04-24 03:06:32 +00:00
Marcel Moolenaar
c2085d04d3 Remove PTE_FAKE and PTE_ISFAKE(). 2009-04-24 02:55:20 +00:00
Marcel Moolenaar
d6a8fa0577 Remove PTE_ISFAKE. While here remove code
between "#if 0" and "#endif".
2009-04-24 02:53:38 +00:00
Rui Paulo
d4f7b23302 Remove spurious 'or'. 2009-04-23 22:08:44 +00:00
Robert Watson
bbb3fb6194 Reorganize in_control() so that invariants are more obvious, and so
that it is easier to lock:

- Handle the unsupported ioctl case at the beginning of in_control(),
  handing off to ifp->if_ioctl, rather than looking up interfaces and
  addresses unnecessarily in this case.

- Make it an invariant that ifp is always non-NULL when running
  in_control()-implemented ioctls, simplifying the code structure.

MFC after:	3 weeks
2009-04-23 21:41:37 +00:00