Commit Graph

65372 Commits

Author SHA1 Message Date
Pyun YongHyeon
fa99a6317c Setting sc->mii_anegticks to MII_ANEGTICKS_GIGE in rgephy_attach()
is redundant. mii_phy_add_media() already takes care of that.

Pointed out by:	marius
2007-10-30 00:37:35 +00:00
Robert Watson
1876fb2118 Implement per-object type consistency checks for labels passed to
'internalize' operations rather than using a single common check.

Obtained from:	TrustedBSD Project
2007-10-30 00:01:28 +00:00
Peter Wemm
c8b14fa8f0 Move nvram out of DEFAULTS. There really isn't a lot of justification
for consuming the memory.  The module works just fine in the unlikely
case that this is needed.  It can still be compiled into a custom kernel.
2007-10-29 22:19:08 +00:00
Marius Strobl
2a6a6e5ca7 - Remove MIIF_NOISOLATE; there's generally no reason to let gentbi(4)
set this flag and it was more or less just copied and pasted from
  another FreeBSD driver while porting this driver from NetBSD, whose
  gentbi(4) doesn't set MIIF_NOISOLATE either.
- Fix spelling in a comment.

OK'ed by:	yongari
MFC after:	3 months
2007-10-29 21:11:55 +00:00
Warner Losh
855f957fc1 kill commented out line of code. 2007-10-29 21:01:50 +00:00
Julian Elischer
539976ffdf fix typo in code normally not compiled in. 2007-10-29 20:45:31 +00:00
Maksim Yevmenkin
a6f3c1e3f3 Allow RFCOMM servers to bind to a ''wildcard'' RFCOMM channel
zero (0). Actual RFCOMM channel will be assigned after listen(2)
call is done on a RFCOMM socket bound to a ''wildcard'' RFCOMM
channel zero (0).

Address locking issues in ng_btsocket_rfcomm_bind()

Submitted by:	Heiko Wundram (Beenic) < wundram at beenic dot net >
MFC after:	1 week
2007-10-29 19:06:47 +00:00
Robert Watson
52f0eb2416 Merge OpenBSM 1.0 changes to src/sys/bsm:
- Remove AU_.* hard-coded audit class constants, as udit classes are now
  entirely dynamically configured using /etc/security/audit_class.

Obtained from:	TrustedBSD Project
2007-10-29 18:47:25 +00:00
Robert Watson
323f4cc31d Replace use of AU_NULL with 0 when no audit classes are in use; this
supports the removal of hard-coded audit class constants in OpenBSM
1.0.  All audit classes are now dynamically configured via the
audit_class database.

Obtained from:	TrustedBSD Project
2007-10-29 18:07:48 +00:00
Robert Watson
f03368334e Canonicalize names of local variables.
Add some missing label checks in mac_test.

Obtained from:	TrustedBSD Project
2007-10-29 15:30:47 +00:00
Robert Watson
3be4cb0b4a Merge Neterion if_nxge driver version 2.0.9.11230 with the following
changes:

  01 -  Enhanced LRO:
  LRO feature is extended to support multi-buffer mode. Previously,
  Ethernet frames received in contiguous buffers were offloaded.
  Now, frames received in multiple non-contiguous buffers can be
  offloaded, as well. The driver now supports LRO for jumbo frames.

  02 - Locks Optimization:
  The driver code was re-organized to limit the use of locks.
  Moreover, lock contention was reduced by replacing wait locks
  with try locks.

  03 - Code Optimization:
  The driver code was re-factored  to eliminate some memcpy
  operations.  Fast path loops were optimized.

  04 - Tag Creations:
  Physical Buffer Tags are now optimized based upon frame size.
  For better performance, Physical Memory Maps are now re-used.

  05 - Configuration:
  Features such as TSO, LRO, and Interrupt Mode can be configured
  either at load or at run time. Rx buffer mode (mode 1 or mode 2)
  can be configured at load time through kenv.

  06 - Driver Statistics:
  Run time statistics are enhanced to provide better visibility
  into the driver performance.

  07 - Bug Fixes:
  The driver contains fixes for the problems discovered and
  reported since last submission.

  08 - MSI support:
  Added Message Signaled Interrupt feature which currently uses 1
  message.

  09  Removed feature:
  Rx 3 buffer mode feature has been removed. Driver now supports 1,
  2 and 5 buffer modes of which 2 and 5 buffer modes can be used
  for header separation.

  10  Compiler warning:
  Fixed compiler warning when compiled for 32 bit system.

  11 Copyright notice:
  Source files are updated with the proper copyright notice.

MFC after:	3 days
Submitted by:	Alicia Pena <Alicia dot Pena at neterion dot com>,
		Muhammad Shafiq <Muhammad dot Shafiq at neterion dot com>
2007-10-29 14:19:32 +00:00
Robert Watson
eb320b0ee7 Resort TrustedBSD MAC Framework policy entry point implementations and
declarations to match the object, operation sort order in the framework
itself.

Obtained from:	TrustedBSD Project
2007-10-29 13:33:06 +00:00
Pyun YongHyeon
6fd47025e1 Add 88E1116/88E1116R PHY support code that takes the PHY out of
power-down mode.

PR:	kern/114086
MFC after:	3 days
2007-10-29 05:50:22 +00:00
Pyun YongHyeon
0bc6ff67a0 Add a newer RTL8211B(L) PHY. 2007-10-29 02:17:44 +00:00
Pyun YongHyeon
648bfbe6a7 Add support for RealTek RTL8211B(L) PHY. It's based on the patch
made by Michael Eisele and the patch was slightly modified by me.
With this change several NVIDIA ethernet controllers(e.g. MCP61)
works.

RTL8211B(L) is RealTek's new gigabit PHY. The PHY has several
features including crossover correction, polarity correction as
well as supporting triple speed(10/100/1000bps). Data transfer
between MAC and PHY is via RGMII for 1000baseT, MII for
10baseT/100baseTX.
Unfortunately, RealTek used the same model number for RTL8211B(L)
PHY so there is no way to discriminate between RTL8211B(L) and its
predecessors. ATM RTL8211B uses revision number 2 so checking the
revision number seems to be only way to identify it.

Obtained from:	Michael Eisele [1]
Tested by:	clemens fischer < ino-qc AT spotteswoode DOT de DOT eu DOT org >
2007-10-29 02:17:07 +00:00
Pyun YongHyeon
37fd5f0fed o RTL8169S/8110S integrated PHY and RTL8211B are gigabit PHYs so set
mii_anegticks to MII_ANEGTICKS_GIGE and use it. Previously it used
  to MII_ANEGTICKS which may not be enough to wait before retrying
  autonegotiation process at 1000bps.
o Reset autonegotation timer if media option is not IFM_AUTO or we
  got a valid link.
o Announce link loss right after it happends.
o Autonegiation is retried every mii_anegticks seconds.
o Report link state changes right after setting autonegotiation.
2007-10-29 02:06:15 +00:00
Julian Elischer
3c1ffc320f Fix typo in code obviously not being compiled on any of my machines.
found by: rdivacky@
2007-10-28 23:11:57 +00:00
Marius Strobl
3718612847 - Make failure to route a ISA interrupt non fatal. Apparently the
Blade 1500/SX1500 boards have inherited the firmware bug of the
  AX1105 mainboards to not include an interrupt map entry for the
  parallel port controller (for the AX1105 the heuristic code for
  E450s probably erroneously kicks in and guesses an interrupt).
- Take advantage of bus_generic_setup_intr(9).
- Fix some whitespace bugs.
2007-10-28 22:08:37 +00:00
John Baldwin
8518d50a63 - Add constants for the different memory types in the SMAP table.
- Use the SMAP types and constants from <machine/pc/bios.h> in the boot
  code rather than duplicating it.
2007-10-28 21:23:49 +00:00
Robert Watson
f10b1ebc78 Add missing mac_test labeling and sleep checks for the syncache.
Discussed with:	csjp
Obtained from:	TrustedBSD Project
2007-10-28 18:33:31 +00:00
Alexander Motin
eb4687d223 Minor debug message fix. 2007-10-28 18:05:59 +00:00
Robert Watson
2a9e17ce8e Garbage collect mac_mbuf_create_multicast_encap TrustedBSD MAC Framework
entry point, which is no longer required now that we don't support
old-style multicast tunnels.  This removes the last mbuf object class
entry point that isn't init/copy/destroy.

Obtained from:	TrustedBSD Project
2007-10-28 17:55:57 +00:00
Robert Watson
a13e21f7bc Continue to move from generic network entry points in the TrustedBSD MAC
Framework by moving from mac_mbuf_create_netlayer() to more specific
entry points for specific network services:

- mac_netinet_firewall_reply() to be used when replying to in-bound TCP
  segments in pf and ipfw (etc).

- Rename mac_netinet_icmp_reply() to mac_netinet_icmp_replyinplace() and
  add mac_netinet_icmp_reply(), reflecting that in some cases we overwrite
  a label in place, but in others we apply the label to a new mbuf.

Obtained from:	TrustedBSD Project
2007-10-28 17:12:48 +00:00
Robert Watson
b9b0dac33b Move towards more explicit support for various network protocol stacks
in the TrustedBSD MAC Framework:

- Add mac_atalk.c and add explicit entry point mac_netatalk_aarp_send()
  for AARP packet labeling, rather than using a generic link layer
  entry point.

- Add mac_inet6.c and add explicit entry point mac_netinet6_nd6_send()
  for ND6 packet labeling, rather than using a generic link layer entry
  point.

- Add expliict entry point mac_netinet_arp_send() for ARP packet
  labeling, and mac_netinet_igmp_send() for IGMP packet labeling,
  rather than using a generic link layer entry point.

- Remove previous genering link layer entry point,
  mac_mbuf_create_linklayer() as it is no longer used.

- Add implementations of new entry points to various policies, largely
  by replicating the existing link layer entry point for them; remove
  old link layer entry point implementation.

- Make MAC_IFNET_LOCK(), MAC_IFNET_UNLOCK(), and mac_ifnet_mtx global
  to the MAC Framework rather than static to mac_net.c as it is now
  needed outside of mac_net.c.

Obtained from:	TrustedBSD Project
2007-10-28 15:55:23 +00:00
Robert Watson
b0f4c777e4 Perform explicit label type checks for externalize entry points, rather than
a generic initialized test.

Obtained from:	TrustedBSD Project
2007-10-28 14:28:33 +00:00
Christian S.J. Peron
4777d3f98a Make sure we are incrementing the read count for each audit pipe read.
MFC after:	1 week
2007-10-27 22:28:01 +00:00
John Baldwin
e71f249b66 Don't return an error from resume() if execution of _DIS fails for some
reason (not all BIOSen have _DIS methods for all link devices for example).
This matches the behavior of attach() with respect to _DIS as well.

Submitted by:	njl
2007-10-27 22:14:17 +00:00
John Baldwin
9dddab6fc1 Change the roundrobin implementation in the 4BSD scheduler to trigger a
userland preemption directly from hardclock() via sched_clock() when a
thread uses up a full quantum instead of using a periodic timeout to cause
a userland preemption every so often.  This fixes a potential deadlock
when IPI_PREEMPTION isn't enabled where softclock blocks on a lock held
by a thread pinned or bound to another CPU.  The current thread on that
CPU will never be preempted while softclock is blocked.

Note that ULE already drives its round-robin userland preemption from
sched_clock() as well and always enables IPI_PREEMPT.

MFC after:	1 week
2007-10-27 22:07:40 +00:00
John Baldwin
6b76a4c77a Make the examine command honor db_pager_quit so you can use 'q' or 'x'
at the pager prompt to abort an examine command that spans multiple pages.

MFC after:	1 week
2007-10-27 20:19:11 +00:00
Yaroslav Tykhiy
68b11e74f4 Add a comment explaining why disc(4) bears the IFF_LOOPBACK flag.
It should be the final follow-up to an old yet unfinished discussion
on whether IFF_LOOPBACK is necessary for disc(4) and why.
2007-10-27 19:57:41 +00:00
Yaroslav Tykhiy
cf91120f8b if_loop doesn't need to keep the list of lo(4) interfaces. Today
a private softc list is needed neither for tracking clones in general
nor for destroying all clones before the module unload -- if_clone
takes care of all that.  (Note that some other interface drivers do
need a softc list to be able to scan it for their private purposes.)
2007-10-27 18:25:53 +00:00
Craig Rodrigues
fab2013cb7 Add the following mount options to the nfs_opts array:
noatime, noexec, suiddir, nosuid, nosymfollow, union,
noclusterr, noclusterw, multilabel, acls, force, update,
async.  These options correspond to MOPT_STDOPTS, MOPT_FORCE, MOPT_UPDATE,
and MOPT_ASYNC.

Currently, mount_nfs converts these "-o" options from strings
to MNT_ flags via getmntopts(),
and passes the flags from userspace to the kernel.
This change will allow us in future to pass these mount options
as strings directly to the kernel via nmount() when doing NFS mounts.
2007-10-27 16:28:05 +00:00
Craig Rodrigues
d2169cb67d Remove duplicate "union" from ext2_opts.
Noticed by:	bde
2007-10-27 16:14:33 +00:00
Craig Rodrigues
b4b5bf359b In nmount(), if MNT_ROOT is in the mount flags, filter it
out instead of returning an error.
(1)  This makes the behavior consistent with mount(2).
(2)  This makes update mounts on the root file system work properly.
(3)  The explicit checks for MNT_ROOTFS in src/sbin/fsck_ffs/main.c
     and src/usr.sbin/mountd/mountd.c which were put in to
     eliminate errors during update mounts on the root file system
     can be removed.

The only place were MNT_ROOTFS can be validly set
is inside the kernel, i.e. with vfs_mountroot_try().

Reviewed by:	phk
MFC after:	3 days
2007-10-27 15:59:18 +00:00
Sam Leffler
8bb84cef37 fix build 2007-10-27 15:31:50 +00:00
John Baldwin
3052da8bb3 Don't destroy an ACPI device_t for a PCI device and reassign the ACPI
handle to the PCI device_t if the ACPI device_t is already attached to a
driver.  This happens on the Tablet TC1000 which for some reason includes
two PCI-ISA bridges and treats the second bridge as an ACPI system resource
device.

Reviewed by:	njl (a while ago)
MFC after:	3 days
2007-10-27 14:54:43 +00:00
John Baldwin
54a3fb6f8f Don't test the APIC flag in the cpuid features for amd64 to see if a
local APIC is present or not.  All amd64 CPUs have a local APIC and some
BIOSen don't set the CPUID_APIC flag.

MFC after:	1 week
2007-10-27 13:34:53 +00:00
John Baldwin
2445af1a8a Don't always re-route IRQs on resume. If this link hasn't been used, then
disable it with _DIS rather than assigning it an IRQ on resume.

MFC after:	1 week
2007-10-27 13:12:29 +00:00
Robert Watson
438aeadf27 Give each posixsem MAC Framework entry point its own counter and test case
in the mac_test policy, rather than sharing a single function for all of
the access control checks.

Obtained from:	TrustedBSD Project
2007-10-27 10:38:57 +00:00
Julian Elischer
6a564b46b6 Add support for the pre-exisiting module shutdoen handshake.
Fix some comments.
2007-10-27 00:54:16 +00:00
Julian Elischer
9ef95d0105 rename the process to 'idle' and 'intr' as per jhb. 2007-10-27 00:52:26 +00:00
Julian Elischer
fbf7046447 Initialise the initial process pointer to NULL so that we know we don't
have an idle process yet.
I'm guessing that on my system this was always 0 already.

found by: Ed Schouten
2007-10-27 00:42:40 +00:00
Alan Cox
21f7958604 Change vm_page_cache_transfer() such that it does not transfer pages
that would have an offset beyond the end of the target object.  Such
pages should remain in the source object.

MFC after:	3 days
Diagnosed and reviewed by:	Kostik Belousov
Reported and tested by:		Peter Holm
2007-10-27 00:09:30 +00:00
Julian Elischer
6bc3d1dc09 If kthread_exit() is called on the last kthread in a kproc, then
all the work in kproc_exit must be done.
We don't actually have a user of this yet but why leave it to chance.
2007-10-26 22:18:20 +00:00
Julian Elischer
ca9a0ddf31 if one changes a function's arguments, one must also change the callers. 2007-10-26 22:03:19 +00:00
Robert Watson
6683b28d78 Update comment following MAC Framework entry point renaming and
reorganization.

Obtained from:	TrustedBSD Project
2007-10-26 21:16:34 +00:00
John Baldwin
fd6d060f0d Use the smaller cgbase() macro in ufsread.c if UFS_SMALL_CGBASE is
defined.  This lets each boot program choose which version of cgbase() it
wants to use rather than forcing ufsread.c to have that knowledge.

MFC after:	1 week
Discussed with:	imp
2007-10-26 21:02:31 +00:00
Ariff Abdullah
554314911c Remap and virtualize mixer controls for HP nx6110 with
AD1981B AC97 codec, unifying master volume control.

  * Remap "phout" --> SOUND_MIXER_VOLUME (internal speakers)
  * Virtual "vol" --> { "phout", "ogain" (headphone) }

Tested by:	Frederic Chardon
MFC after:	3 days
2007-10-26 20:49:59 +00:00
Ariff Abdullah
f29120c085 Enable headphone jack-sense for HP nx6100 with AD1981B AC'97 codec,
automuting internal speakers.

Tested by:	Frederic Chardon
MFC after:	3 days
2007-10-26 20:49:23 +00:00
Julian Elischer
5f66cfca51 oops, over optimised and broke non-SMP builds 2007-10-26 20:32:33 +00:00
Julian Elischer
dd1b3ff97e kthread_exit needs no stinkin argument. 2007-10-26 17:03:22 +00:00
David E. O'Brien
ef44c8d2a3 style(9) 2007-10-26 16:33:47 +00:00
John Baldwin
150b476d94 Add . to the include path so that we follow the 'machine' symlink we create
during depend on amd64.

Reported by:	rwatson
2007-10-26 15:56:22 +00:00
Warner Losh
8d7b90cdd7 The arm boot code uses this function as well. Redefining cgbase()
saves about 500 bytes in the boot code.  While the AT91RM9200 has 12k
of space for the boot loader, which is more than i386's 8k, the code
generated by gcc is a bit bigger.

I've had this in p4 for about two years now.
2007-10-26 15:00:34 +00:00
Yoshihiro Takahashi
c2a6fe6133 Disable the coretemp and nvram on pc98. 2007-10-26 13:42:17 +00:00
Yoshihiro Takahashi
b493fda6e0 MFi386: revision 1.476
Add more (commented-out) usb devices.
2007-10-26 13:38:00 +00:00
Yoshihiro Takahashi
69c40fc504 Reduce diffs against i386. 2007-10-26 13:32:01 +00:00
Robert Watson
8640764682 Rename 'mac_mbuf_create_from_firewall' to 'mac_netinet_firewall_send' as
we move towards netinet as a pseudo-object for the MAC Framework.

Rename 'mac_create_mbuf_linklayer' to 'mac_mbuf_create_linklayer' to
reflect general object-first ordering preference.

Sponsored by:	SPARTA (original patches against Mac OS X)
Obtained from:	TrustedBSD Project, Apple Computer
2007-10-26 13:18:38 +00:00
Søren Schmidt
53a8035b0f Fix the signature matching code on AHCI controllers.
Add SATA ATAPI support for AHCI controllers.
2007-10-26 09:01:06 +00:00
Søren Schmidt
13a0de8755 Update the way we get the mode pages on probe. 2007-10-26 08:59:23 +00:00
Søren Schmidt
f31e86f556 Fix treating some modern chips (mem mapped) as legacy devices. 2007-10-26 08:57:08 +00:00
Pawel Jakub Dawidek
88882dcf11 Add GEOM VIRSTOR module to the build. 2007-10-26 08:23:57 +00:00
Julian Elischer
7ab24ea3b9 Introduce a way to make pure kernal threads.
kthread_add() takes the same parameters as the old kthread_create()
plus a pointer to a process structure, and adds a kernel thread
to that process.

kproc_kthread_add() takes the parameters for kthread_add,
plus a process name and a pointer to a pointer to a process instead of just
a pointer, and if the proc * is NULL, it creates the process to the
specifications required, before adding the thread to it.

All other old kthread_xxx() calls return, but act on (struct thread *)
instead of (struct proc *). One reason to change the name is so that
any old kernel modules that are lying around and expect kthread_create()
to make a process will not just accidentally link.

fix top to show  kernel threads by their thread name in -SH mode
add a tdnam formatting option to ps to show thread names.

make all idle threads actual kthreads and put them into their own idled process.
make all interrupt threads kthreads and put them in an interd process
(mainly for aesthetic and accounting reasons)
rename proc 0 to be 'kernel' and it's swapper thread is now 'swapper'

man page fixes to follow.
2007-10-26 08:00:41 +00:00
Pawel Jakub Dawidek
b656c1b836 Save stack only when KTR_GEOM is both compiled into the kernel and enabled
in debug.ktr.mask. Because saving stack is very expensive, it's better only
to do it when one really wants to.

Reported by:	Dan Nelson
2007-10-26 06:55:00 +00:00
Warner Losh
b2068c0c18 Simplify the old compat #ifdefs. 2007-10-26 05:02:47 +00:00
Peter Wemm
d556638404 Split /dev/nvram driver out of isa/clock.c for i386 and amd64. I have not
refactored it to be a generic device.
Instead of being part of the standard kernel, there is now a 'nvram' device
for i386/amd64.  It is in DEFAULTS like io and mem, and can be turned off
with 'nodevice nvram'.  This matches the previous behavior when it was
first committed.
2007-10-26 03:23:54 +00:00
Warner Losh
47e87d5ad0 Ooops. Put back Invariants and witness
Submitted by: csjp
2007-10-26 02:35:42 +00:00
Warner Losh
97816f8e3d Add usb serial devices by default. I'm tired of telling people how to
do this that should know better :-).
2007-10-26 02:20:29 +00:00
Christian S.J. Peron
57274c513c Implement AUE_CORE, which adds process core dump support into the kernel.
This change introduces audit_proc_coredump() which is called by coredump(9)
to create an audit record for the coredump event.  When a process
dumps a core, it could be security relevant.  It could be an indicator that
a stack within the process has been overflowed with an incorrectly constructed
malicious payload or a number of other events.

The record that is generated looks like this:

header,111,10,process dumped core,0,Thu Oct 25 19:36:29 2007, + 179 msec
argument,0,0xb,signal
path,/usr/home/csjp/test.core
subject,csjp,csjp,staff,csjp,staff,1101,1095,50457,10.37.129.2
return,success,1
trailer,111

- We allocate a completely new record to make sure we arent clobbering
  the audit data associated with the syscall that produced the core
  (assuming the core is being generated in response to SIGABRT  and not
  an invalid memory access).
- Shuffle around expand_name() so we can use the coredump name at the very
  beginning of the coredump call.  Make sure we free the storage referenced
  by "name" if we need to bail out early.
- Audit both successful and failed coredump creation efforts

Obtained from:	TrustedBSD Project
Reviewed by:	rwatson
MFC after:	1 month
2007-10-26 01:23:07 +00:00
Olivier Houchard
ed0b604f1f Add an option to be able to override the value of the AT91 master clock
frequency. It'd be better to be able to calculate it at runtime, but we need
the information very early, to setup the uart.
2007-10-25 23:02:42 +00:00
Olivier Houchard
2b953358ed Move some KB920x-specific options into the KB920x file. 2007-10-25 22:57:19 +00:00
Olivier Houchard
26989574c9 Fix signedness to make gcc happy. 2007-10-25 22:50:25 +00:00
Robert Watson
179da74eb8 Sort entry points in mac_framework.h and mac_policy.h alphabetically by
primary object type, and then by secondarily by method name.  This sorts
entry points relating to particular objects, such as pipes, sockets, and
vnodes together.

Sponsored by:	SPARTA (original patches against Mac OS X)
Obtained from:	TrustedBSD Project, Apple Computer
2007-10-25 22:45:25 +00:00
Olivier Houchard
9e753c174f Oooops, get the end of the memory right. 2007-10-25 22:43:17 +00:00
Takanori Watanabe
68fb6c4858 More style nit.
Pointed out by: njl.
2007-10-25 20:02:38 +00:00
Erwin Lansing
19de7d21cb Change a tab back to a space between #define and __FreeBSD_version.
This breaks OSVERSION determination in all ports.

Reviewed by:	rodrigc
2007-10-25 17:39:19 +00:00
John Baldwin
cc75dfe70b Don't attach to the "IBM0057" ID. This ID is used by IBM machines for
the PS/2 mouse controller.  Thus, when acpi_ibm(4) claimed the mouse
device, the mouse would stop working.  The one ACPI dump of an R40 that
I've looked at includes an HKEY device with the proper "IBM0068" ID, so
I'm not sure how the "IBM0057" ID could have helped at all.

MFC after:	1 week
Approved by:	njl
2007-10-25 17:30:18 +00:00
Takanori Watanabe
1de5ce99e3 Fix variable name to be clear what it means. 2007-10-25 17:03:07 +00:00
John Baldwin
627457cd4a Break out of the I/O retry loop as soon as an I/O operation succeeds rather
than always retrying operations three times.

Submitted by:	nyan
2007-10-25 16:53:35 +00:00
Takanori Watanabe
0bfeaded17 Turn EC into poll mode before device_resume invoked . 2007-10-25 16:49:07 +00:00
Robert Watson
02be6269c3 Normalize TCP syncache-related MAC Framework entry points to match most
other entry points in the form mac_<object>_method().

Discussed with:	csjp
Obtained from:	TrustedBSD Project
2007-10-25 14:37:37 +00:00
Yoshihiro Takahashi
34b1e3506c MFi386: part of 1.52
Split the pc98_partition specific routine in bd_opendisk()
into bd_open_pc98().
2007-10-25 14:31:52 +00:00
David E. O'Brien
a9d185b2c9 Align. 2007-10-25 14:16:07 +00:00
Yoshihiro Takahashi
91dfd26985 MFi386: part of revision 1.51
Rework the read/write support in the bios disk driver some to cut down
  on duplicated code.
  - All of the bounce buffer and retry logic duplicated in bd_read() and
    bd_write() are merged into a single bd_io() routine that takes an
    extra direction argument.  bd_read() and bd_write() are now simple
    wrappers around bd_io().
2007-10-25 12:57:46 +00:00
Robert Watson
eb2cd5e1df Rename mac_associate_nfsd_label() to mac_proc_associate_nfsd(), and move
from mac_vfs.c to mac_process.c to join other functions that setup up
process labels for specific purposes.  Unlike the two proc create calls,
this call is intended to run after creation when a process registers as
the NFS daemon, so remains an _associate_ call..

Obtained from:	TrustedBSD Project
2007-10-25 12:34:14 +00:00
Robert Watson
3f1a7a9086 Consistently name functions for mac_<policy> as <policy>_whatever rather
than mac_<policy>_whatever, as this shortens the names and makes the code
a bit easier to read.

When dealing with label structures, name variables 'mb', 'ml', 'mm rather
than the longer 'mac_biba', 'mac_lomac', and 'mac_mls', likewise making
the code a little easier to read.

Obtained from:	TrustedBSD Project
2007-10-25 11:31:11 +00:00
Tom Rhodes
ededffc06b Remove some debugging code that, while useful, doesn't belong in the committed
version.  While here, expand a macro only used once.

Discussed with/oked by:	bde
2007-10-25 08:23:08 +00:00
Robert Watson
a7f3aac7cb Further MAC Framework cleanup: normalize some local variable names and
clean up some comments.

Obtained from:	TrustedBSD Project
2007-10-25 07:49:47 +00:00
Warner Losh
3e6468f751 Load the bytes into the EMAC's MAC address register in the proper
order.  The kernel used to shuffle them around to get things right,
but that was recently fixed.  This makes our boot loader match the
behavior of most other boot loaders for the atmel parts.  This bug was
inherited from the Kwikbyte loader that we started from.

This bug was discovered by Bj.ANvrn KNvnig back in June, but fell on the
floor.  He provided patches to the kernel, include backwards
compatibility options that were similar to Olivier's if_ate.c commit.
2007-10-25 07:05:38 +00:00
Olivier Houchard
cb3d8b2510 KERNBASE should really be KERNVIRTADDR there too.
MFC after:	1 week
2007-10-24 23:41:46 +00:00
Olivier Houchard
b7630a1145 In ate_get_mac(), try to get the mac address in the right order, at least
in the same order as it's set in ate_set_mac.
I remember a discussion about this on -arm, but apparently nothing was done.
Warner, is this wrong ?

X-MFC After:	proper review
2007-10-24 23:12:19 +00:00
Olivier Houchard
12e12ab1a8 Handle the case where PHYSADDR != KERNPHYSADDR (ie we do not load the kernel
at the beginning of the RAM).

MFC After:	1 week
2007-10-24 22:26:54 +00:00
Olivier Houchard
b2c9a0439a Correct a comment, this was not true anymore. 2007-10-24 22:24:32 +00:00
John Baldwin
f352a0d45f First cut at support for booting a GPT labeled disk via the BIOS bootstrap
on i386 and amd64 machines.  The overall process is that /boot/pmbr lives
in the PMBR (similar to /boot/mbr for MBR disks) and is responsible for
locating and loading /boot/gptboot.  /boot/gptboot is similar to /boot/boot
except that it groks GPT rather than MBR + bsdlabel.  Unlike /boot/boot,
/boot/gptboot lives in its own dedicated GPT partition with a new
"FreeBSD boot" type.  This partition does not have a fixed size in that
/boot/pmbr will load the entire partition into the lower 640k.  However,
it is limited in that it can only be 545k.  That's still a lot better than
the current 7.5k limit for boot2 on MBR.  gptboot mostly acts just like
boot2 in that it reads /boot.config and loads up /boot/loader.  Some more
details:
- Include uuid_equal() and uuid_is_nil() in libstand.
- Add a new 'boot' command to gpt(8) which makes a GPT disk bootable using
  /boot/pmbr and /boot/gptboot.  Note that the disk must have some free
  space for the boot partition.
  - This required exposing the backend of the 'add' function as a
    gpt_add_part() function to the rest of gpt(8).  'boot' uses this to
    create a boot partition if needed.
- Don't cripple cgbase() in the UFS boot code for /boot/gptboot so that
  it can handle a filesystem > 1.5 TB.
- /boot/gptboot has a simple loader (gptldr) that doesn't do any I/O
  unlike boot1 since /boot/pmbr loads all of gptboot up front.  The
  C portion of gptboot (gptboot.c) has been repocopied from boot2.c.
  The primary changes are to parse the GPT to find a root filesystem
  and to use 64-bit disk addresses.  Currently gptboot assumes that the
  first UFS partition on the disk is the / filesystem, but this algorithm
  will likely be improved in the future.
- Teach the biosdisk driver in /boot/loader to understand GPT tables.
  GPT partitions are identified as 'disk0pX:' (e.g. disk0p2:) which is
  similar to the /dev names the kernel uses (e.g. /dev/ad0p2).
- Add a new "freebsd-boot" alias to g_part() for the new boot UUID.

MFC after:	1 month
Discussed with:	marcel (some things might still change, but am committing
			what I have so far)
2007-10-24 21:33:00 +00:00
John Baldwin
e0f5da6d08 Update copyright attribution.
MFC after:	3 days
2007-10-24 21:16:22 +00:00
Max Laier
32d5438214 Properly drop the pf mutex around all copyout (consistency still protected
by the sx) and avoid a WITNESS panic.  Overlooked during last import.

Reported and tested by:	Max N. Boyarov
MFC after:		3 days
2007-10-24 20:57:17 +00:00
Marius Strobl
33d3fffa90 Add ABI backwards compatibility to the FreeBSD 4/5/6 versions of
the PCIOCGETCONF, PCIOCREAD and PCIOCWRITE IOCTLs, which was broken
with the introduction of PCI domain support.
As the size of struct pci_conf_io wasn't changed with that commit,
this unfortunately requires the ABI of PCIOCGETCONF to be broken
again in order to be able to provide backwards compatibility to
the old version of that IOCTL.

Requested by:	imp
Discussed with:	re (kensmith)
Reviewed by:	PCI maintainers (imp, jhb)
MFC after:	5 days
2007-10-24 20:51:44 +00:00
Sam Leffler
b161c30793 silence complaint about not loading the wlan_scan_monitor module;
it does not exist and is not needed as monitor mode operation has
always required setting the current channel

Reviewed by:	thompsa
MFC after:	1 week
2007-10-24 20:20:41 +00:00
Robert Watson
30d239bc4c Merge first in a series of TrustedBSD MAC Framework KPI changes
from Mac OS X Leopard--rationalize naming for entry points to
the following general forms:

  mac_<object>_<method/action>
  mac_<object>_check_<method/action>

The previous naming scheme was inconsistent and mostly
reversed from the new scheme.  Also, make object types more
consistent and remove spaces from object types that contain
multiple parts ("posix_sem" -> "posixsem") to make mechanical
parsing easier.  Introduce a new "netinet" object type for
certain IPv4/IPv6-related methods.  Also simplify, slightly,
some entry point names.

All MAC policy modules will need to be recompiled, and modules
not updates as part of this commit will need to be modified to
conform to the new KPI.

Sponsored by:	SPARTA (original patches against Mac OS X)
Obtained from:	TrustedBSD Project, Apple Computer
2007-10-24 19:04:04 +00:00
John Baldwin
2143962647 Rework the read/write support in the bios disk driver some to cut down
on duplicated code and support 64-bit LBAs for GPT.
- The code to manage an EDD or C/H/S I/O request are now in their own
  routines.  The EDD routine now handles a full 64-bit LBA instead of
  truncating LBAs to the lower 32-bits.  (MBRs and BSD labels only
  have 32-bit LBAs anyway, so the only LBAs ever passed down were 32-bit).
- All of the bounce buffer and retry logic duplicated in bd_read() and
  bd_write() are merged into a single bd_io() routine that takes an
  extra direction argument.  bd_read() and bd_write() are now simple
  wrappers around bd_io().
- If a disk supports EDD then always use it rather than only using it if
  the cylinder is > 1023.  Other parts of the boot code already do
  something similar to this.  Also, GPT just uses LBAs, so for a GPT disk
  it's probably best to ignore C/H/S completely.  Always using EDD when
  it is supported by a disk is an easy way to accomplish this.

MFC after:	1 week
2007-10-24 12:49:55 +00:00
Yoshihiro Takahashi
1c44b03ee9 MFi386: revision 1.50
Reindent the read/write code of bd_realstrategy() so it is more readable.
2007-10-24 12:03:48 +00:00
Yoshihiro Takahashi
18a60bb546 MFi386: revision 1.41
Slightly cleanup the 'bootdev' concept on x86 by changing the various
  macros to treat the 'slice' field as a real part of the bootdev instead
  of as hack that spans two other fields (adaptor (sic) and controller)
  that are not used in any modern FreeBSD boot code.
2007-10-24 11:54:04 +00:00
John Baldwin
08981e2f6d Reindent the read/write code of bd_realstrategy() so it is more readable.
MFC after:	1 week
2007-10-24 04:13:35 +00:00
John Baldwin
5c5b5d4607 Slightly cleanup the 'bootdev' concept on x86 by changing the various
macros to treat the 'slice' field as a real part of the bootdev instead
of as hack that spans two other fields (adaptor (sic) and controller)
that are not used in any modern FreeBSD boot code.

MFC after:	1 week
2007-10-24 04:03:25 +00:00
John Baldwin
7e68ed1218 Stop disabling USB in the PAE kernel config. The USB code has been
using bus_dma(9) for quite a while now and has been used on 64-bit archs
as well.

MFC after:	1 month
2007-10-24 03:53:10 +00:00
Christian S.J. Peron
5ff3816d82 Move where we audit the PID argument such that we unconditionally
audit it at the beginning of the syscall.  This fixes a problem
where the user supplies an invalid process ID which is > 0 which
results in the PID argument not being audited.

Obtained from:	TrustedBSD Project
MFC after:	1 week
2007-10-24 00:14:19 +00:00
Christian S.J. Peron
088b56a874 Use extended process token. The in kernel process audit
state is stored in an extended subject token now.  Make sure
that we are using the extended data.  This fixes the termID
for process tokens.

Obtained from:	TrustedBSD Project
Discussed with:	rwatson
MFC after:	1 week
2007-10-24 00:05:52 +00:00
Julian Elischer
e9271f5376 Take out the single-threading code in fork.
After discussions with jeff, alc, (various Ironport people), david Xu,
and mostly Alfred (who found the problem) it has been demonstrated that this
is not needed for our implementations of threads and represents a real
(as in we've seen it happen a lot) deadlock danger.

Several points:
 Since forking multiple threads is not allowed, and posix states that
 any mutexes owned by othre threads wilol be owned in the child by
 phantom threads, and therads shouldn't ba accessing shared structures without
 protection, It can be proved that if this leads to the child process accessing
 inconsistent data, it's a programming error.

 The mode of thread_single() being used in fork() is the wrong one.
 It is using SINGLE_NO_EXIT when it should be using SINGLE_BOUNDARY.

 Even if this we used, System processes have no need to do it as they have
 no userland to get inconsistent.

  This commmit first fixes the above bugs to get tehm correct in CVS.
  then removes them with #ifdef.
  This is so that history contains the corrected version should it
  be needed in the future.
  This code may be needed if we implement the forkall() syscall from
  Solaris. It may be needed for other non-posix thread libraries
  at some time in the future, so let the code sit for a short while
  while I do some work on it anyhow.

This removes a reproducible lockup in NFS.
It may be argued that maybe doing a fork while holding a vnode lock may
not be the best idea in th efirst place but it shouldn't cause a deadlock.
The removal has been running under soak test for several days now.

This removal should be seriously considered for 7.0 and RELENG_6.

Note. There is code in the core-dumping code that may have a similar problem
with coredumping threaded processes

MFC After: 4 days
2007-10-23 17:54:15 +00:00
Robert Watson
1cb99cfc25 Bump MAC_VERSION to 4 and add an 8.x line in the version table. Version 4
will include significant synchronization to the Mac OS X Leopard version
of the MAC Framework.

Obtained from:	TrustedBSD Project
2007-10-23 14:12:16 +00:00
Kevin Lo
e3e2d9bf7c - Use pci_enable_busmaster() to turn on busmaster.
- Don't test memory/port status and emit an error message; the PCI bus
  will do this.

Reviewed by: sam
2007-10-23 04:25:43 +00:00
Peter Grehan
cbdd62ad04 Cut over to ULE on PowerPC
kern/sched_ule.c - Add __powerpc__ to the list of supported architectures

powerpc/conf/GENERIC - Swap SCHED_4BSD with SCHED_ULE

powerpc/powerpc/genassym.c - Export TD_LOCK field of thread struct

powerpc/powerpc/swtch.S - Handle new 3rd parameter to cpu_switch() by
 updating the old thread's lock. Note: uniprocessor-only, will require
 modification for MP support.

powerpc/powerpc/vm_machdep.c - Set 3rd param of cpu_switch to mutex of
old thread's lock, making the call a no-op.

Reviewed by:	marcel, jeffr (slightly older version)
2007-10-23 00:52:25 +00:00
John Baldwin
21b415b212 Close a race when trying to lookup a gateway route in rt_check().
Specifically, if two threads were doing concurrent lookups and the existing
gateway was marked down, the the first thread would drop a reference on the
gateway route and then unlock the "root" route while it tried to allocate
a new route.  The second thread could then also drop a reference on the
same gateway route resulting in a reference underflow.  Fix this by
clearing the gateway route pointer after dropping the reference count but
before dropping the lock.  Secondly, in this same case, the second thread
would overwrite the gateway route pointer w/o free'ing a reference to the
route installed by the first thread.  In practice this would probably just
fix a lost reference that would result in a route never being freed.

This fixes panics observed in rt_check() and rtexpunge().

MFC after:	1 week
PR:		kern/112490
Insight from:	mehuljv at yahoo.com
Reviewed by:	ru (found the "not-setting it to NULL" part)
Tested by:	several
2007-10-22 19:01:26 +00:00
Xin LI
3247c9ddcc Fixes to msdosfs dirtyflag related stuff:
- markvoldirty() needs to write to underlying GEOM provider.  We
   have to do that *before* g_access() which sets the GEOM provider
   to read-only.
 - Remove dirty flag before free'ing iconv related resources.  The
   dirty flag removal could fail, and it is hard to revert the
   iconv-free after the fail.
 - Mark volume as dirty if we have failed to mark it clean for safe.
 - Other style fixes to the touched functions.
2007-10-22 17:43:43 +00:00
Alexander Motin
11bfc2922d Add one of HTC Smartphone/PocketPC device IDs.
Tested with Qtek S200 (HTC Prophet).
2007-10-22 08:28:24 +00:00
Alan Cox
0ab3c7a594 Correct an error of omission in the reimplementation of the page
cache: vnode_pager_setsize() must handle the case where a file is
truncated to a non-page-size-aligned boundary and there is a cached
page underlying the new end of file.

Reported by:	kris, tegge
Tested by:	kris
MFC after:	3 days
2007-10-22 06:23:46 +00:00
Alan Cox
7b0e72d184 Correct an error in vm_map_sync(), nee vm_map_clean(), that has existed
since revision 1.1.  Specifically, neither traversal of the vm map checks
whether the end of the vm map has been reached.  Consequently, the first
traversal can wrap around and bogusly return an error.

This error has gone unnoticed for so long because no one had ever before
tried msync(2)ing a region above the stack.

Reported by:	peter
MFC after:	1 week
2007-10-22 05:21:05 +00:00
John Birrell
1676805c18 Add the full module path name to the kld_file_stat structure
for kldstat(2).

This allows libdtrace to determine the exact file from which
a kernel module was loaded without having to guess.

The kldstat(2) API is versioned with the size of the
kld_file_stat structure, so this change creates version 2.

Add the pathname to the verbose output of kldstat(8) too.

MFC: 3 days
2007-10-22 04:12:57 +00:00
Robert Watson
e41966dc35 Add PRIV_VFS_STAT privilege, which will allow overriding policy limits on
the right to stat() a file, such as in mac_bsdextended.

Obtained from:	TrustedBSD Project
MFC after:	3 months
2007-10-21 22:50:11 +00:00
Marcel Moolenaar
a1fedf914f Add the freebsd-zfs alias. Both APM and GPT have ZFS partition
types.
2007-10-21 20:02:57 +00:00
Marcel Moolenaar
d4ffc7ac35 Add a partition type for ZFS. 2007-10-21 17:29:06 +00:00
Marcel Moolenaar
a6ef2fb2da Add a UUID for ZFS file systems.
UUID reused from: Craig Boston
2007-10-21 16:38:49 +00:00
Max Laier
19ed78ce27 Additions from libpcap 0.9.8 unbreak the build.
Pointy hat to:	mlaier
X-MFC after:	RELENG_7 buildworld
2007-10-21 13:23:32 +00:00
Robert Watson
fe09513e7d Canonicalize naming of local variables for struct ksem and associated
labels to 'ks' and 'kslabel' to reflect the convention in posix_sem.c.

MFC after:	3 days
Obtained from:	TrustedBSD Project
2007-10-21 11:11:07 +00:00
Julian Elischer
e1ff3d508a fix up some code for older systems changed by accident in the last commit
this whole support for systems earlier than 5.0 should probably be removed
but I'll at least FIX it before removing it, so that CVS has it right.
2007-10-21 04:11:13 +00:00
Julian Elischer
17e45937ab Mark the point where kthread_xxx disappeared and kproc_xxx appeared 2007-10-21 04:04:09 +00:00
Julian Elischer
b3ee16fcd8 Remove out of date comments 2007-10-21 03:31:40 +00:00
Julian Elischer
3745c395ec Rename the kthread_xxx (e.g. kthread_create()) calls
to kproc_xxx as they actually make whole processes.
Thos makes way for us to add REAL kthread_create() and friends
that actually make theads. it turns out that most of these
calls actually end up being moved back to the thread version
when it's added. but we need to make this cosmetic change first.

I'd LOVE to do this rename in 7.0  so that we can eventually MFC the
new kthread_xxx() calls.
2007-10-20 23:23:23 +00:00
Bjoern A. Zeeb
2b3e7485f6 Fold multiple asm statements into one so that the compiler at a certain
optimization level (-march=pentium-mmx for example) does not insert
intermediate ops which would trash the carry.

Change both sys/i386/i386/in_cksum.c[1] and sys/i386/include/in_cksum.h.

To my best understanding the same problem was addressed in rev. 1.16
of src/sys/i386/include/in_cksum.h for just a single function 3y ago.

Reviewed by:  jhb
Submitted by: Zhouyi ZHOU <zhouzhouyi FreeBSD.org> (intial version of [1])
MFC after:    5 days
PR:           115678, 69257
2007-10-20 22:18:42 +00:00
Pawel Jakub Dawidek
51662691fd Remove redundant prototypes. 2007-10-20 09:41:55 +00:00
Andrew Thompson
544f714198 Use ETHER_BPF_MTAP so that the vlan tags are visible to bpf(4) when stacked
under a vlan.

MFC after:	3 days
2007-10-20 02:43:23 +00:00
Andrew Thompson
3565f9bc31 Use ETHER_BPF_MTAP so that the vlan tags are visible to bpf(4) when bridging a
vlan trunk.

Discussed with:		csjp
MFC after:		3 days
2007-10-20 02:10:10 +00:00
Ruslan Ermilov
857304e6f1 Fix build with NETGRAPH_DEBUG. 2007-10-19 20:09:58 +00:00
Ed Maste
7188e3c834 Put comments about syscalls by the correct ones, and use the correct syscall
number in the comment.
2007-10-19 19:17:53 +00:00
Sam Leffler
df8a38f46a fix an incorrect setting of `retry times' in case of zd1211b, we
should set the ZYD_MACB_MAX_RETRY register instead of ZYD_MAC_RETRY

Submitted by:	Weongyo Jeong
MFC after:	1 week
2007-10-19 16:33:31 +00:00
Ariff Abdullah
fd0a47907c - Gigabyte G33-S2H fixup, due to the present of multiple competing
codecs. Codec at address 0 seems purely digital, or perhaps an HDMI
  interface. Let the driver skip it and continue scanning the codecs
  starting with address 2 (Realtek ALC885).
  * Due to possibilities of future similar cases, put enough logic
    in hdac_scan_codecs() to force codec scanning starting from
    XX address via tunable "hint.pcm.%d.codec_index".

  Reported / Tested by:	Toomas Pelberg <toomasp@gmx.net>

- Trivial headphone / speaker automute fixup for Fujitsu-Siemens
  AMILO Si 1848 laptop.

  Reported / Tested by:	Ed <ed@bsd.it>

- Trivial headphone / speaker automute fixup for Fujitsu-Siemens
  Lifebook S7020D laptop.

  Reported / Tested by: Jaromir Dvoracek <jarek@ataxo.com>

- Some smart vendor trying to create interplanetary wormhole by
  screwing pci config space during their BIOS update. The side effects
  of their failure attempt includes mutilated hardware id, broken
  speaker automuting and loosing the entire analog CD connectivity,
  thus causing enough collateral damages to collapse the entire
  universe.  Move along with it.

  Please exercise extra cautious when applying BIOS updates.

  Reported / Tested by:	Pietro Cerutti <gahr@gahr.ch>
                       	- assembled laptop, based on the MSI-1034
                          (662) which is now becoming MSI-034A.

- Fix no sound issues (on headphones) for Lenovo ThinkCentre A55 due
  to global automute table entry which is not applicable for
  non-laptops.

  Reported / Tested by:	Piotr Smyrak <piotr.smyrak@heron.pl>

- Speaker mute control for HP DC7700 since the front headphone jack
  does not generate any interesting unsolicited signal/response.

  Reported / Tested by:	tyop @ irc.freenode.net

Approved by:	re (kensmith)
MFC after:	3 days
2007-10-19 15:49:39 +00:00
Alexander Motin
e088dd4c44 Implement new apply callback mechanism to handle item forwarding.
When item forwarded refence counter is incremented, when item
processed, counter decremented. When counter reaches zero,
apply handler is getting called.
Now it allows to report right connect() call status from user-level
at the right time.
2007-10-19 15:04:17 +00:00
Rui Paulo
bf37f5b05f Remove IPTOS_CE and IPTOS_ECT constants. They were defined in RFC 2481
but later obsoleted by RFC 3168.
Discussed on freebsd-net with no objections.

Approved by: njl (mentor), rwatson
2007-10-19 12:46:15 +00:00
Ken Smith
95b55771b2 Switch over to ULE as the default scheduler for amd64 and i386
architectures.
2007-10-19 12:30:33 +00:00
Bruce Evans
cb65c1ee29 Implement the async (really, delayed-write) mount option for msdosfs.
This is much simpler than for ffs since there are many fewer places
where we need to choose between a delayed write and a sync write --
just 5 in msdosfs and more than 30 in ffs.

This is more complete and correct than in ffs.  Several places in ffs
are are still missing the choice.  ffs_update() has a layering violation
that breaks callers which want to force a sync update (mainly fsync(2)
and O_SYNC write(2)).

However, fsync(2) and O_SYNC write(2) are still more broken than in
ffs, since they are broken for default (non-sync non-async) mounts
too.  Both fail to sync the FAT in all cases, and both fail to sync
the directory entry in some cases after losing a race.  Async everything
is probably safer than the half-baked sync of metadata given by default
mounts.
2007-10-19 12:23:25 +00:00
Mike Silbersack
9b3bc6bf83 Pick the smallest possible TCP window scaling factor that will still allow
us to scale up to sb_max, aka kern.ipc.maxsockbuf.

We do this because there are broken firewalls that will corrupt the window
scale option, leading to the other endpoint believing that our advertised
window is unscaled.  At scale factors larger than 5 the unscaled window will
drop below 1500 bytes, leading to serious problems when traversing these
broken firewalls.

With the default maxsockbuf of 256K, a scale factor of 3 will be chosen by
this algorithm.  Those who choose a larger maxsockbuf should watch out
for the compatiblity problems mentioned above.

Reviewed by:	andre
2007-10-19 08:53:14 +00:00
Alan Cox
2573269111 The previous revision, updating vm_object_page_remove() for the new page
cache, did not account for the case where the vm object has nothing but
cached pages.

Reported by:	kris, tegge
Reviewed by:	tegge
MFC after:	3 days
2007-10-18 23:02:18 +00:00
Peter Wemm
c899450b21 Fix cosmetic bug in stale copy of msync_args. 'len' is size_t, not int. 2007-10-18 22:47:39 +00:00
Andrew Thompson
a0cf818670 Use a uint16_t type for the vlan tag rather an int. 2007-10-18 21:52:31 +00:00
Darren Reed
e86e344222 Pullup IPFilter 4.1.28 from the vendor branch into HEAD.
MFC after:	7 days
2007-10-18 21:52:14 +00:00
Darren Reed
9a214eca1f This commit was generated by cvs2svn to compensate for changes in r172771,
which included commits to RCS files with non-trunk default branches.
2007-10-18 21:42:51 +00:00
Darren Reed
e8e48c1c7b Import IPFilter 4.1.28 2007-10-18 21:42:51 +00:00
Andrew Thompson
60e87ca8df The bridging output function puts the mbuf directly on the interfaces send
queue so the output network card must support the same tagging mechanism as
how the frame was input (prepended Ethernet header tag or stripped HW mflag).

Now the vlan Ethernet header is _always_ stripped in ether_input and the mbuf
flagged, only only network cards with VLAN_HWTAGGING enabled would properly
re-tag any outgoing vlan frames.

If the outgoing interface does not support hardware tagging then readd the vlan
header to the front of the frame. Move the common vlan encapsulation in to
ether_vlanencap().

Reported by:	Erik Osterholm, Jon Otterholm
MFC after:	1 week
2007-10-18 21:22:15 +00:00
John Baldwin
813947b737 Add a -z flag to nfsstat which zeros the NFS statistics after displaying
them.

MFC after:	1 week
Requested by:	ps
Submitted by:	ps (6 years ago)
2007-10-18 16:38:07 +00:00
Bruce Evans
9e916c3163 Add noclusterr and noclusterw options to the options list. I forgot these
when I implemented clustering.
2007-10-18 16:25:47 +00:00
Bruce Evans
7c3fc9de5c Fix some style bugs in the mount options list. Mainly, sort the list,
leaving space for adding missing options.  Negative options are sorted
after removing their "no" prefix, and generic options are sorted before
msdosfs-specific ones.
2007-10-18 15:48:10 +00:00