Commit Graph

64275 Commits

Author SHA1 Message Date
delphij
c990e91fd1 Enable SCTP by default for GENERIC kernels in order to give it
more exposure.  The current state of SCTP implementation is
considered to be ready for 32-bit platforms, but still need some
work/testing on 64-bit platforms.

Approved by:	re (kensmith)
Discussed with:	rrs
2007-06-14 17:14:27 +00:00
imp
9703ecd098 Expand callout compatibility macros in the main usb bridges. 2007-06-14 16:23:31 +00:00
imp
143b4d6930 Move PWR_* from usb_port.h to usb.h 2007-06-14 16:12:04 +00:00
imp
2258c7fa50 Move malloc definitions to usb.h.
Also, remove usb_malloc_type: it was unused.
Remove METHODS_NONE: it was unused.
Move include of opt_usb.h from usb_port.h to usb.h, since usb_port.h is
going away (there will be a usb_compat.h for out-of-tree drivers that want it).
2007-06-14 15:09:21 +00:00
simokawa
b325dde99b - Suppress compiler optimization so that orb[1] must be written first.
We may need an explicit memory barrier for other architectures other than i386/amd64.

MFC after: 3 days
2007-06-14 12:52:13 +00:00
ariff
b43d30ed2c Buffer optimization and locking cleanup. Don't resize/malloc
unless it is really necessary to ease down unlock/lock sequence.
2007-06-14 11:15:51 +00:00
ariff
3567d73171 Drain all callout handlers during driver detach appropriately. 2007-06-14 11:13:38 +00:00
ariff
034f58f663 Don't push too hard waiting/looping for codec detection interrupt.
Let the interrupt do the job waking us up.
2007-06-14 11:11:06 +00:00
ariff
14575cd8bb - Add option to allow sleeping malloc(9).
- Cleanup locking assertions that aren't needed anymore.
2007-06-14 11:10:21 +00:00
rwatson
680f293154 Spell statistics more correctly in comments. 2007-06-14 03:02:33 +00:00
rwatson
f938c62f4e Include priv.h to pick up suser(9) definitions, missed in an earlier
commit.

Warnings spotted by:	kris
2007-06-13 22:42:43 +00:00
jhb
9caa55ea6b Don't clobber tf_err with the eva from a page fault as the page fault
address is saved in ksi_addr already.

PR:		i386/101379
Submitted by:	Tijl Coosemans : tijl ulyssis org
2007-06-13 22:37:48 +00:00
rwatson
aa30311010 Close a very narrow race that might cause a trigger allocation to be
leaked if a trigger is delivered as the trigger device is closed.

Obtained from:	TrustedBSD Project
2007-06-13 21:17:23 +00:00
imp
c111e1c379 config_detach is just used in one place, so expand it inline. 2007-06-13 20:58:57 +00:00
jhb
af94eb296c Improve the ktrace locking somewhat to reduce overhead:
- Depessimize userret() in kernels where KTRACE is enabled by doing an
  unlocked check of the per-process queue of pending events before
  acquiring any locks.  Previously ktr_userret() unconditionally acquired
  the global ktrace_sx lock on every return to userland for every thread,
  even if ktrace wasn't enabled for the thread.
- Optimize the locking in exit() to first perform an unlocked read of
  p_traceflag to see if ktrace is enabled and only acquire locks and
  teardown ktrace if the test succeeds.  Also, explicitly disable tracing
  before draining any pending events so the pending events actually get
  written out.  The unlocked read is safe because proc lock is acquired
  earlier after single-threading so p_traceflag can't change between then
  and this check (well, it can currently due to a bug in ktrace I will fix
  next, but that race existed prior to this change as well).

Reviewed by:	rwatson
2007-06-13 20:01:42 +00:00
jhb
1c98f58fd2 Conditionally acquire Giant when dropping a reference on the ktrace vnode
during execve() when turning off tracing due to executing a setuid binary
as non-root.  Previously this could fail to acquire Giant and fail an
assertion if the ktrace file was on a non-MPSAFE filesystem and the
executable was on an MPSAFE filesystem.

MFC after:	3 days
Reported by:	kris
2007-06-13 19:41:47 +00:00
thompsa
fb74a99e0d Add the vlan tag to the bridge route table. This allows a vlan trunk to be
bridged, previously legitimate traffic was not passed as the bridge could not
tell that it was on a different Ethernet segment.

All non-tagged traffic is treated as vlan1 as per IEEE 802.1Q-2003
2007-06-13 18:58:04 +00:00
bms
9156605d19 Do not attempt to enable AHCI mode on ALi SATA controllers other
than the 5288.

It is not correctly implemented in earlier silicon, and the BIOS often
lies about AHCI capability on platforms where these chips are deployed.
With this change I am able to boot FreeBSD on the ASUS Vintage AH-1
barebones system.

Approved by:	sos
2007-06-13 17:44:49 +00:00
rrs
94bb7c7cd5 - fix bindx to check addresses against socket's protocol family 2007-06-13 14:39:41 +00:00
rwatson
20ee7c7a9b Remove IPX over IP tunneling support, which allows IPX routing over IP
tunnels, and was not MPSAFE.  The code can be easily restored in the
event that someone with an IPX over IP tunnel configuration can work
with me to test patches.

This removes one of five remaining consumers of NET_NEEDS_GIANT.

Approved by:	re (kensmith)
2007-06-13 14:01:43 +00:00
ru
7d990e0773 Remove two more instances of the USBDEV() macro. 2007-06-13 12:36:01 +00:00
mav
a015640863 Add missing ng_uncallout() on node shutdown.
Approved by:	glebius (mentor)
2007-06-13 11:01:17 +00:00
bde
43613ee4ed Unbreak high resolution profiling a little: use dummy asms to prevent
timing loops being optimized away.

Once apon a time, gcc promised not to optimize away timing loops, but
gcc started optimizing away the call to a null function in the timing
loop here some time between gcc-3.3.3 and gcc-3.4.6, and it started
optimizing away the timing loop itself some time between gcc-3.4.6
and gcc-4.2.
2007-06-13 06:17:48 +00:00
alc
0630c4e3a4 Eliminate dead code: We have not performed pageouts on the kernel object
in this millenium.
2007-06-13 06:10:10 +00:00
imp
f3564369dd Remove more unnecessary and unwanted __OtherBSD__ ifdefs. 2007-06-13 06:00:10 +00:00
imp
2c34b9a1c8 Remove more __OtherBSD__ ifdefs that don't make sense, and haven't for
some time.
2007-06-13 05:45:48 +00:00
imp
6e9a478638 Expand USB_DETACH, USB_ATTACH and USB_MATCH inline. No functional
change, and MD5's appear to be the same.
2007-06-13 05:37:59 +00:00
kmacy
ca1df96c1a - import new common code for the T304
- update to firmware version 4.1.0

- switch over to standard method for initializing cdevs (contributed by scottl@)
- break out timer_reclaim_task to be per-port
- move msix teardown into separate function
- fix bus_setup_intr for msi-x for the multi-port case so that msi-x resources
  are not corrupted on unload
- handle 10/100/1000 base-T media and auto negotiation
- bind qset to cpu even for singleq case
- white space cleanups
- remove recursive PORT_LOCK
- move mtu setting to separate function
- stop and re-init port when changing mtu
- replace all direct references to m_data with calls to mtod
- handle attach failure better by not trying to de-initialize
  taskqueues when they have not been allocated
- no longer default to jumbo frames

Sponsored by: Chelsio
MFC after: 3 days
2007-06-13 05:36:00 +00:00
marcel
0d73aaee3a Enable GEOM_PART_MBR by default. On ia64 this replaces GEOM_MBR. 2007-06-13 05:07:42 +00:00
marcel
3f70795dda Add the MBR partitioning scheme to g_part. This does not yet
support the ability to install boot code.
2007-06-13 04:27:36 +00:00
sepotvin
3ffe583f13 Options spring cleanup:
- Add and document the KVM and KVM_SUPPORT options that
are needed for the ifmcstats(3) makefile
- Garbage collect unused variables
- Add missing inclusion of bsd.own.mk where needed

Approved by: kan (mentor)
Reviewed by: ru
2007-06-13 02:08:04 +00:00
rrs
20ad8ecfb0 - Fixed cookie handling to calc an RTO when
its an INIT collision case.
- Fixed RTO calc to maintain a seperate variable to track
  if a RTO calc as been done, this allows the RTO var to be
  doubled during initial timeouts.
- Reduces the amount of stack used by process control.
- Use a constant for the peer chunk overhead.
- Name change to spell candidate correctly.
2007-06-13 01:31:53 +00:00
emax
ec70de06d6 Catch up with USB cleanups and fix the world 2007-06-13 00:32:00 +00:00
jeff
c5314fa1e0 - Include opt_sched.h for SCHED_STATS. 2007-06-12 23:27:31 +00:00
imp
bb9cd2675b Remove compat macros. md5 the same. 2007-06-12 21:35:18 +00:00
kmacy
86dad49f82 fix cassert failure by adjusting padding 2007-06-12 21:19:12 +00:00
jeff
3062565b81 - Fix kse by moving the upcalls list back out of the zero'd section.
I had tested this with the wrong libpthread.
2007-06-12 20:22:06 +00:00
gallatin
1dc9ad2cb9 Use if_capenable to allow LRO enabled drivers to bypass
the MTU check in ether_input().
2007-06-12 19:53:44 +00:00
jeff
a86c52513f - Garbage collect unused concurrency functions. 2007-06-12 19:50:31 +00:00
jeff
26422aea29 - Garbage collect unused concurrency functions.
- Remove unused kse fields from struct proc.
 - Group remaining fields and #ifdef KSE them.
 - Move some kern_kse.c only prototypes out of proc and into kern_kse.

Discussed with:	Julian
2007-06-12 19:49:39 +00:00
imp
bed92e37b9 First pass at removing __OtherBSD__. We can't blindly remove all of
them in bulk because there is at least one feature that's
unimplemented on FreeBSD that needs to be done and these are good
placeholders.
2007-06-12 19:40:20 +00:00
gallatin
ac79d73e56 Use the new IFCAP_LRO to enable/disable LRO. 2007-06-12 19:15:16 +00:00
imp
8693e2961d Don't pretend to support !BSD systems. 2007-06-12 19:01:32 +00:00
imp
e65ef3c069 Remove usb_kthread_create*. They are now unused. 2007-06-12 18:52:29 +00:00
imp
093cf2bfbf unifdef -D__FreeBSD__ -U__NetBSD__ -U__OpenBSD__
Use kthread_create directly
2007-06-12 18:52:07 +00:00
imp
48df7c2e40 Eliminate usb_thread_t. 2007-06-12 17:30:54 +00:00
imp
e834ae963f Remove USBDEV() macro. We do not need a macro that is defined as its
only argument.  It was used inconsistently in the tree, so remove it.
2007-06-12 16:52:07 +00:00
imp
fc9cb03e61 clalloc and clfree are useles. Remove them. Remove dead code that's
always been dead for years, but has been obfuscated by these macros.
2007-06-12 16:41:29 +00:00
bms
ffd77d9ba5 Import rewrite of IPv4 socket multicast layer to support source-specific
and protocol-independent host mode multicast. The code is written to
accomodate IPv6, IGMPv3 and MLDv2 with only a little additional work.

This change only pertains to FreeBSD's use as a multicast end-station and
does not concern multicast routing; for an IGMPv3/MLDv2 router
implementation, consider the XORP project.

The work is based on Wilbert de Graaf's IGMPv3 code drop for FreeBSD 4.6,
which is available at: http://www.kloosterhof.com/wilbert/igmpv3.html

Summary
 * IPv4 multicast socket processing is now moved out of ip_output.c
   into a new module, in_mcast.c.
 * The in_mcast.c module implements the IPv4 legacy any-source API in
   terms of the protocol-independent source-specific API.
 * Source filters are lazy allocated as the common case does not use them.
   They are part of per inpcb state and are covered by the inpcb lock.
 * struct ip_mreqn is now supported to allow applications to specify
   multicast joins by interface index in the legacy IPv4 any-source API.
 * In UDP, an incoming multicast datagram only requires that the source
   port matches the 4-tuple if the socket was already bound by source port.
   An unbound socket SHOULD be able to receive multicasts sent from an
   ephemeral source port.
 * The UDP socket multicast filter mode defaults to exclusive, that is,
   sources present in the per-socket list will be blocked from delivery.
 * The RFC 3678 userland functions have been added to libc: setsourcefilter,
   getsourcefilter, setipv4sourcefilter, getipv4sourcefilter.
 * Definitions for IGMPv3 are merged but not yet used.
 * struct sockaddr_storage is now referenced from <netinet/in.h>. It
   is therefore defined there if not already declared in the same way
   as for the C99 types.
 * The RFC 1724 hack (specify 0.0.0.0/8 addresses to IP_MULTICAST_IF
   which are then interpreted as interface indexes) is now deprecated.
 * A patch for the Rhyolite.com routed in the FreeBSD base system
   is available in the -net archives. This only affects individuals
   running RIPv1 or RIPv2 via point-to-point and/or unnumbered interfaces.
 * Make IPv6 detach path similar to IPv4's in code flow; functionally same.
 * Bump __FreeBSD_version to 700048; see UPDATING.

This work was financially supported by another FreeBSD committer.

Obtained from:  p4://bms_netdev
Submitted by:   Wilbert de Graaf (original work)
Reviewed by:    rwatson (locking), silence from fenner,
		net@ (but with encouragement)
2007-06-12 16:24:56 +00:00
imp
d4a700c2dc Expand USB_ATTACH_{ERROR,SUCCESS}_RETURN inline and eliminate from
usb_port.h.  They aren't needed, and are a legacy of this code's past.
2007-06-12 15:37:19 +00:00