Commit Graph

58112 Commits

Author SHA1 Message Date
Damien Bergamini
9a9d0e6ec3 remove depedancy with vnode_if.h.
it is no longer needed.
2006-03-12 19:06:06 +00:00
Damien Bergamini
84ca76709f sync w/ iwi:
o fix locking
o use firmware(9)
o cosmetic
2006-03-12 19:01:00 +00:00
Damien Bergamini
1b996b2a23 o don't use '-' characters in firmware names
o call firmware_put() early to release the firmware module
o on firmware panics or watchdog timeouts, schedule a task to reinitialize
  the interface (we may sleep in iwi_init())
o discard oversized rx frames
2006-03-12 18:54:40 +00:00
Andre Oppermann
83d8a7bbbe Remove comment that does not appy to FreeBSD. 2006-03-12 15:34:33 +00:00
Andre Oppermann
5e82cadbce Import of OpenBSD's sys/sys/hash.h providing generic 32bit hash functions.
Requested by:	flz (to port Open[BGP|OSPF]D)
MFC after:	3 days
2006-03-12 15:33:19 +00:00
Jeff Roberson
8db357205c - Remove the call to softdep_waitidle after suspending the filesystem.
This does not do what I wanted as all dirty buffers must be flushed
   by the call to ffs_sync and any remaining dependency work would mean
   that this failed.

Pointed out by: tegge
2006-03-12 05:26:12 +00:00
Jeff Roberson
2eedeb7e60 - Remove the call to softdep_waitidle after suspending the filesystem.
This does not do what I wanted as all dirty buffers must be flushed
   by the call to ffs_sync and any remaining dependency work would mean
   that this failed.

Pointed out by:	tegge
2006-03-12 05:24:14 +00:00
Jeff Roberson
e64df05c33 - Reorder vrele calls after vput calls to prevent lock order reversals
between leaf and directory locks.

Found by:	kris
Sponsored by:	Isilon Systems, Inc.
2006-03-12 04:59:04 +00:00
Jeff Roberson
4bf5133b1f - Define a null_getwritemount to get the mount-point for the lower
filesystem so that nullfs doesn't permit you to circumvent snapshots.

Discussed with:		tegge
Sponsored by:		Isilon Systems, Inc.
2006-03-12 04:58:18 +00:00
Christian S.J. Peron
a19fd0e766 Make sure that we are adding a path token to the audit record in open(2).
Do this by making sure we are using the AUDITVNODE1 mask in the namei flags.

Obtained from:	TrustedBSD Project
2006-03-11 17:14:05 +00:00
Poul-Henning Kamp
65cdc7a7c4 Don't be noisy in case of shared interrupts. 2006-03-11 15:39:22 +00:00
Damien Bergamini
4f5d0153e4 add dependency with firmware module.
pointed out by Martin Wilke.
2006-03-11 13:30:21 +00:00
Poul-Henning Kamp
272601f8f0 Go over calcru and friends once more.
Reintroduce the monotonicity for the normal case and make the two
special cases behave in what is belived to be the most sensible fasion.
2006-03-11 10:48:19 +00:00
Poul-Henning Kamp
d13856608d Remove last traces of disk_enumerate() 2006-03-11 10:24:50 +00:00
Søren Schmidt
3b9c3f561c Remove debug flag.
Spotted by: ru@
2006-03-11 08:42:08 +00:00
Ruslan Ermilov
0ec2de62a7 Fix build. 2006-03-11 08:36:15 +00:00
Tor Egge
ca2fa80767 Block secondary writes while expunging active unlinked files.
Fix detection of active unlinked files by checking VI_OWEINACT and
VI_DOINGINACT in addition to v_usecount.

Defer inactive handling for unlinked files if the file system is mostly
suspended (secondary writes being blocked).

Perform deferred inactive handling after the file system is resumed.
2006-03-11 01:08:37 +00:00
Philip Paeps
f3953b3844 Fix multicast support for cs89x0 chips. Just setting the RX_MULTCAST_ACCEPT
flag isn't enough - the filter needs to be set up too, or no multicast frames
are accepted.

Sponsored by:	Philips Industrial Applications (indirectly)
MFC after:	3 days
2006-03-10 23:50:53 +00:00
Jung-uk Kim
1c9e617c34 Micro-optimize invalid UUID check. 2006-03-10 23:33:27 +00:00
Damien Bergamini
389fb0b432 o acknowledge interrupts early in the interrupt handler
o stop processing interrupts after a firmware fatal error or a radio kill
o clarify the possible values for the 'antenna' sysctl.
o by default, let the firmware do antenna diversity.
  the  firmware will periodically switch to another antenna to evaluate the
  signal quality.
2006-03-10 20:35:09 +00:00
Damien Bergamini
bef9529d24 make use of the firmware(9) subsystem.
use intel's firmware version 3.0 layout.
2006-03-10 19:59:09 +00:00
Søren Schmidt
bf86d4677b Add atausb module 2006-03-10 19:15:20 +00:00
Søren Schmidt
05b593b784 Add "device atausb" 2006-03-10 19:10:05 +00:00
Søren Schmidt
56728c9249 Module that adds support for using USB storage devices through the
ATA framework. Mainly written to be able to use USB Flash keys.
This is work in progress so use with care :)
Doesn't need CAM and cannot coexist with umass.c
2006-03-10 19:08:52 +00:00
Damien Bergamini
c56adf0a9a fix the locking. 2006-03-10 18:55:30 +00:00
Søren Schmidt
d95f23aab8 write the right unit # on verbose output. 2006-03-10 12:20:53 +00:00
Pawel Jakub Dawidek
9d793bdd46 When inserting a new component md_provsize metadata field wasn't set, which
means that old problem was triggered (when two providers end at the same
offset, eg. ad0 and ad0s1 and the wrong was is picked up by gmirror/graid3).

Reported by:	Michal Suszko <dry@dry.pl>
MFC after:	3 days
2006-03-10 07:41:31 +00:00
Sam Leffler
ad26242724 fix switching between agressive and non-agressive wmm modes
Obtained from:	atheros
MFC after:	3 days
2006-03-10 06:18:03 +00:00
David Xu
90a693f891 It is not necessary to read %gs twice. 2006-03-10 05:55:26 +00:00
David Xu
fc643048fe Fix stack offset to allow gcc's stack aligment code to work correctly.
MFC after: 3 days
2006-03-10 02:54:45 +00:00
Tor Egge
1e70cd7fc7 Remove unneeded (and broken) usage of MNT_REF()/MNT_REL(). 2006-03-10 02:31:12 +00:00
Olivier Houchard
c0e239dead MFp4: Forget the asm inlined version of in_cksum_hdr(). It doesn't work if
the pointer is unaligned, and it just doesn't worth it.
2006-03-09 23:33:59 +00:00
Jung-uk Kim
65796b26b3 - Implement serial numbers, UUID, and asset tag (turned off by default).
Use 'BOOT_SENSITIVE_INFO=YES' variable to turn them on.
- Use 'uint*_t' instead of 'u_int*_t', correct compilation warnings, and
update copyright while I am here.
2006-03-09 22:49:44 +00:00
Jung-uk Kim
0d84d9ebb5 Implement printf 'X' conversion for both libstand and kernel. 2006-03-09 22:37:34 +00:00
John Baldwin
8e8f0765ab Flip the switch and don't route interrupts to hyperthreads in a HT system.
In at least one benchmark this showed around a 20% performance increase.
If other workloads do benefit from having hyperthreads service interrupts,
we can always make this a loader tunable.

MFC after:	3 days
Tested by:	ps
2006-03-09 16:38:52 +00:00
Warner Losh
837d712d07 Don't dereference an uninitialized pointer. 2006-03-09 16:28:24 +00:00
Yaroslav Tykhiy
3546dc71f0 Avoid pulling in the whole <net/pfvar.h> by opaquely declaring
the structs pflog_packet() takes pointers to.

Approved by:	mlaier
MFC after:	3 days
2006-03-09 15:54:01 +00:00
Yaroslav Tykhiy
10dbb44a9f The pf' and pflog' sources do not depend on DEV_PF or DEV_PFLOG,
which is normal for own files of a device driver.

DEV_FOO should be used if an unrelated kernel file needs to know of
the `foo' driver's static presence.  Obviously, module source files
should never use DEV_*.
2006-03-09 15:48:45 +00:00
Ruslan Ermilov
ceec92fe5d Don't acquire a lock before calling vlan_unconfig().
This fixes a panic when doing "ifconfig ... -vlandev".

OK'ed by:	glebius
2006-03-09 14:42:51 +00:00
Søren Schmidt
c4ee770324 Only use the channel in the request given to ata_completed if its
still present.
2006-03-09 10:25:35 +00:00
Søren Schmidt
a0f9099364 typo. 2006-03-09 10:24:03 +00:00
Poul-Henning Kamp
fef527ee73 Oops, forgot newline. 2006-03-09 09:44:10 +00:00
Poul-Henning Kamp
0f038c05ea Add slop to "backwards" cpu accounting messages, 3 usec or 1% whichever
triggers.

This should eliminate all the trivial messages which result from minor
increases in cpu_tick frequency.

Machines which don't du cpu clock fiddling shouldn't issue "backwards"
messages now.

Laptops and other machines where the initial estimate of cputicks may be
waaaay off will still issue warnings.
2006-03-09 09:33:17 +00:00
Poul-Henning Kamp
6cda760f09 silence cpu_tick calibration and notice only (under bootverbose)
when the frequency increases.
2006-03-09 09:30:33 +00:00
Poul-Henning Kamp
c8d7706e75 Ignore kenv strings which overflow the room we have, rather than pretend
we have room for them.
2006-03-09 09:29:41 +00:00
Søren Schmidt
2d7994d97e Get rid of all the "long long"/"maxint" casting around in printf's.
On all our platforms intmax == int64_t so simply using %j to print
int64_t's is safe all over, and doesn't pullute the code.
2006-03-09 08:34:44 +00:00
David Xu
7b8d5e4865 Remove _STOPEVENT call, it is already called in issignal, simplify
code for SIGKILL signal.
2006-03-09 08:31:51 +00:00
Joseph Koshy
fc9a2b80c4 When a process is de-configuring a log file, also stop all of its
PMCs that require a log file to operate.  This change should fix
PR 90269.

PR:		kern/90269
MFC after:	1 week
2006-03-09 02:08:12 +00:00
Sam Leffler
d0d425bf53 correct ni_txrate when using a fixed rate; fixes current rate reporting
MFC after:	3 days
2006-03-09 00:28:44 +00:00
Tor Egge
791dd2fade Use vn_start_secondary_write() and vn_finished_secondary_write() as a
replacement for vn_write_suspend_wait() to better account for secondary write
processing.

Close race where secondary writes could be started after ffs_sync() returned
but before the file system was marked as suspended.

Detect if secondary writes or softdep processing occurred during vnode sync
loop in ffs_sync() and retry the loop if needed.
2006-03-08 23:43:39 +00:00
Stephan Uphoff
68ff3c2445 Fix exec_map resource leaks.
Tested by: kris@
2006-03-08 20:21:54 +00:00
Simon L. B. Nielsen
fb46e061e4 When parsing an RPC request in nfsrv_dorec(), KASSERT that there
actually is an mbuf to process.  This catches the missing mbuf before it
would otherwise causes a NULL pointer dereference, which could be
triggered by a 0 length RPC record before the check for such records was
added in rev 1.97.

Approved by:	cperciva (mentor)
2006-03-08 20:21:15 +00:00
Søren Schmidt
59de60dd73 ATA_USB will need to hook into the delayed boot identify to have
interrupts running, so externalize it.
2006-03-08 16:39:01 +00:00
John Baldwin
8abafcd00f Update a DB_SET to DB_FUNC I missed yesterday. 2006-03-08 15:47:48 +00:00
Andre Oppermann
a7bd90ef93 Properly handle the case when the packet secondary zone can't allocate
further mbuf clusters to attach to mbufs.

Reported by:	kris
Tested by:	kris
Sponsored by:	TCP/IP Optimization Fundraise 2005
MFC after:	3 days
2006-03-08 14:05:38 +00:00
Søren Schmidt
d0bf5478e0 Always read the TOC in acd_read_toc even if MEDIA_CHANGED wasn't set.
Since we cannot (reliably) detect when media has been removed before we
try to touch it, this could leave stale TOC's around.
2006-03-08 10:14:39 +00:00
Søren Schmidt
de0ed44e2f Bail out of afd_sense if ENODEV. 2006-03-08 09:21:48 +00:00
Pawel Jakub Dawidek
4686187543 Allow to dump kernel to gmirror providers.
Some conditions have to be met to make it work properly. This will be
described in the manual page.

MFC after:	3 days
2006-03-08 08:27:33 +00:00
Warner Losh
62a59e8f0d Remove leading __ from __(inline|const|signed|volatile). They are
obsolete.  This should reduce diffs to NetBSD as well.
2006-03-08 06:31:46 +00:00
Tor Egge
a695d54404 Don't set IN_CHANGE and IN_UPDATE on inodes for potentially suspended
file systems.  This could cause deadlocks when creating snapshots.

Reviewed by:	jeff
2006-03-08 02:14:39 +00:00
Chuck Lever
9f5349f23d Fix a bug in NFSv3 READDIRPLUS reply processing
The client's READDIRPLUS logic skips the attributes and
filehandle of the ".." entry.  If the server doesn't send
attributes but does send a filehandle for "..", the
client's logic doesn't account for the extra "value
follows" field that indicates whether the filehandle is
present, causing the remaining entries in the reply
to be ignored.

Sponsored by:	Network Appliance, Inc.
Reviewed by:	rick, mohans
Approved by:	silby
MFC after:	2 weeks
2006-03-08 01:43:01 +00:00
Tor Egge
34ef4672d2 Ignore dirty pages owned by "dead" objects. 2006-03-08 00:51:00 +00:00
John Baldwin
88ca07e79a Style nit. 2006-03-07 22:17:26 +00:00
John Baldwin
e1e31c0e43 Clean up the way we handle auxiliary commands for a given ddb command
table.  Previously, the ddb code knew of each linker set of auxiliary
commands and which explicit command list they were tied to.  These changes
add a simple command_table struct that contains both the static list of
commands and the pointers for any auxiliary linker set of additional
commands.  This also makes it possible for other arbitrary command tables
to be defined in other parts of the kernel w/o having to edit ddb itself.

The DB_SET macro has also been trimmed down to just creating an entry in
a linker set.  A new DB_FUNC macro does what the old DB_SET did which is
to not only add an entry to the linker set but also to include a function
prototype for the function being added.  With these changes, it's now also
possible to create aliases for ddb functions using DB_SET() directly if
desired.
2006-03-07 22:17:06 +00:00
John Baldwin
0499f1d8a7 Use the Alpha PCC as a cpu ticker for process runtime accounting. This is
slightly more tricky than on x86 as although the PCC is 64-bits, it is not
a simple 64-bit counter like the TSC.  Instead, the upper 32-bits have
PAL-defined behavior and the lower 32-bits run as a free-running 32-bit
counter.  To handle this, we detect overflows by maintaining a small amount
of per-cpu state and use this to simulate the upper 32-bits of the counter
providing a full 64-bit counter to the consumers of cpu_ticks().
2006-03-07 22:12:09 +00:00
John Baldwin
28c2f17ccb - Simplify the i8254 timecounter for the alpha since we don't actually have
an interrupt handler for the i8254.  (Our clock interrupts come from
  elsewhere.)  Instead, use the same algo that i386 uses when the lapic
  timer is in use.  This lets us remove a lot of cruft that tried to handle
  the i8254 interrupts that we weren't even using or setting up a handler
  for.
- G/C a bunch of unused cruft while I'm here.
- Fix the code to not use the rpcc timecounter (similar to TSC) on SMP
  machines to only disable that timecounter if more than one CPU is in
  use by the kernel.  Previously, a UP kernel on a machine with multiple
  CPUs would needlessly disable this timecounter.

MFC after:	1 week
2006-03-07 21:44:20 +00:00
Andrew Thompson
7f2d8767e0 Further refine the bridge hack in the arp code. Only do the special arp
handling for interfaces which are actually in the bridge group, ignore all
others.

MFC after:	3 days
2006-03-07 21:40:44 +00:00
John Baldwin
67c0796ca3 For consistency sake, use >= MINCLSIZE rather than > MINCLSIZE to determine
whether or not to allocate a full mbuf cluster rather than just a plain
mbuf when adding on additional mbufs in m_getm().  In practice, there wasn't
any resulting mem trashing since m_getm() doesn't ever allocate an mbuf with
a packet header, and MINCLSIZE is the available payload in an mbuf with a
header rather than the available payload in a plain mbuf.

Discussed with: 	andre (lightly)
2006-03-07 21:31:20 +00:00
Damien Bergamini
a6991cc704 Disable 802.11e support for now. Did some cleanup while I'm here. 2006-03-07 20:48:23 +00:00
Matt Jacob
7a49a0d1fb Add a serial number for requests so we don't just depend on a request pointer
to try and do forensics on what has occurred.
2006-03-07 17:56:40 +00:00
Søren Schmidt
f09934b191 Poll device for readiness before trying to get geometry etc. 2006-03-07 16:05:38 +00:00
Søren Schmidt
a68193c985 Only look for ICRC and CORR errors on ATA devices not ATAPI. 2006-03-07 14:27:54 +00:00
Ariff Abdullah
ead3cc4315 Add another inverted amplifier sense quirk for Kvazar-Micro Senator 3592XT.
Submitted by:	[1] Alexandr Krivulya <admin at marcom-group.com>
MFC after:	3 days

[1] http://lists.freebsd.org/pipermail/freebsd-multimedia/2006-March/003773.html
2006-03-07 05:48:14 +00:00
Sam Leffler
a8eb5364fe use m_dup instead of m_copypacket when doing internal bridging
in case packets are modified (e.g. encrypted)

MFC after:	1 week
2006-03-07 03:55:05 +00:00
Sam Leffler
66ef39690f deliver an l2uf frame on sta join to prime the bridge
Obtained from:	madwifi
MFC after:	1 week
2006-03-06 17:26:16 +00:00
Sam Leffler
097131fffe when scanning channels marked passive defer probe request until
802.11 traffic is seen; fixes problems with ap's hiding their ssid

Obtained from:	atheros
MFC after:	1 week
2006-03-06 17:23:26 +00:00
Max Laier
3e3a2a7ddc Fix the build. %ju prints uintmax_t not unsigned long long (which is
actually "longer" than uintmax_t for the understanding of printf).
2006-03-06 16:02:06 +00:00
Yaroslav Tykhiy
4ffbe6ba9f MFi386 revision 1.1220: options TDFX_LINUX --> device tdfx_linux 2006-03-06 15:29:28 +00:00
Poul-Henning Kamp
6acae67129 Improve the advantech watchdog. 2006-03-06 07:43:28 +00:00
Andrew Thompson
e1457c3eb1 If we miss the LINK_UP event from the network interface then the bridge port
will remain in the disabled state until another link event happens in the
future (if at all). Add a timer to periodically check the interface state and
recover.

Reported by:	Nik Lam <freebsdnik j2d.lam.net.au>
MFC after:	3 days
2006-03-06 02:28:41 +00:00
Mike Silbersack
2017e1cbae Fix include paths to make this compile. 2006-03-05 23:27:51 +00:00
Yaroslav Tykhiy
8d96e45531 Retire NETSMBCRYPTO as a kernel option and make its functionality
enabled by default in NETSMB and smbfs.ko.

With the most of modern SMB providers requiring encryption by
default, there is little sense left in keeping the crypto part
of NETSMB optional at the build time.

This will also return smbfs.ko to its former properties users
are rather accustomed to.

Discussed with:		freebsd-stable, re (scottl)
Not objected by:	bp, tjr (silence)
MFC after:		5 days
2006-03-05 22:52:17 +00:00
Søren Schmidt
62fba1c397 Add USB modes. 2006-03-05 21:32:38 +00:00
Damien Bergamini
945bfeec5f Import microcodes for RT2561, RT2561S and RT2661 chipsets.
With permission from Ralink Technology.
2006-03-05 20:41:51 +00:00
Damien Bergamini
c128b2d129 Add support for the second (RT2561/RT2561S) and third (RT2661 MIMO XR)
generations of 802.11abg chipsets from Ralink Technology.
Get rid of the pccard front-end while I'm here since all adapters are
cardbus ones.
2006-03-05 20:38:55 +00:00
Damien Bergamini
9c6307b145 Add support for the second (RT2561/RT2561S) and third (RT2661 MIMO XR)
generations of 802.11abg chipsets from Ralink Technology.
Get rid of the pccard front-end while I'm here since all adapters are
cardbus ones.

Obtained from:	OpenBSD
2006-03-05 20:36:56 +00:00
Søren Schmidt
b83fcd52ba Update atapi-fd to support direct devices such as disks. 2006-03-05 20:30:54 +00:00
Poul-Henning Kamp
327643e3ca When we get an unknown ATAPI comand, try it even if it is not listed,
in all likelyhood just passing it through will work.
2006-03-05 17:52:32 +00:00
Søren Schmidt
64de47b35e Add two new ATAPI commands. 2006-03-05 17:43:13 +00:00
Ariff Abdullah
428feeb3b9 Add another inverted amplifier sense quirk for Sony VAIO Type T.
PR:		kern/94056
Submitted by:	Yoshihiko Sarumaru <mistral at imasy.or.jp>
MFC after:	3 days
2006-03-05 02:26:51 +00:00
Matt Jacob
1977cbd6cf turn some WARNs for unknown events into INFOs 2006-03-04 21:46:34 +00:00
David Malone
42ae38e9ec Create a mac_bsdextended_check_vp function that takes a cred, a
vnode and a mode and checks if a given access mode is permitted.
This centralises the mac_bsdextended_enabled check and the GETATTR
calls and makes the implementation of the mac policy methods simple.

This should make it easier for us to match vnodes on more complex
attributes than just uid and gid in the future, but for now there
should be no functional change.

Approved/Reviewed by:	rwatson, trhodes
MFC after:	1 month
2006-03-04 20:47:19 +00:00
Pawel Jakub Dawidek
99c889fc7d We need to check if file system size is equal to provider's size, because
sysinstall(8) still bogusly puts first partition at offset 0 instead of 16,
so glabel/ufs will find file system on slice instead of partition.

Before sysinstall is fixed, we must keep this code, which means that we
wont't be able to detect UFS file systems created with 'newfs -s ...'.

PS. bsdlabel(8) creates partitions properly.

MFC after:	3 days
2006-03-04 19:41:54 +00:00
Robert Watson
69c89e437b Count drops when the first of two pipe mallocs fails.
Obtained from:	TrustedBSD Project
2006-03-04 17:09:17 +00:00
Robert Watson
54205da01b Update src/sys/security/audit for OpenBSM 1.0 alpha 5:
- Include audit_internal.h to get definition of internal audit record
  structures, as it's no longer in audit.h.  Forward declare au_record
  in audit_private.h as not all audit_private.h consumers care about
  it.

- Remove __APPLE__ compatibility bits that are subsumed by configure
  for user space.

- Don't expose in6_addr internals (non-portable, but also cleaner
  looking).

- Avoid nested include of audit.h in audit_private.h.

Obtained from:	TrustedBSD Project
2006-03-04 17:00:55 +00:00
Robert Watson
70ea026a2b Update src/sys/bsm for OpenBSM 1.0 alpha 5 changes:
- Add new comments.
- Move private data structures from public audit.h to audit_internal.h to
  avoid exposing queue.h macros to undesiring consumers.

Obtained from:	TrustedBSD Project
2006-03-04 16:54:21 +00:00
Wojciech A. Koszek
0a0eb0e8db crypto.ko depends on zlib.
Submitted by:	Ben Kelly <bkelly at vadev.org>
Approved by:	rwatson
Point hat to:	me
MFC after:	1 day
2006-03-04 15:50:46 +00:00
SUZUKI Shinsuke
2c112cdc6d fixed a bug that an MLD report is not advertised when group-specific MLD query is received.
PR:	kern/93526
Obtained from:	KAME
MFC after:	1 day
2006-03-04 09:17:11 +00:00
Yoshihiro Takahashi
ed40c5a34d MFi386: revision 1.1220. 2006-03-04 07:31:58 +00:00
Poul-Henning Kamp
fccfcfba00 Add missing cast. 2006-03-04 06:07:26 +00:00