Commit Graph

144744 Commits

Author SHA1 Message Date
wkoszek
a6c32bcda6 Fix AGP debugging code:
- correct format strings
- fill opt_agp.h if AGP_DEBUG is defined
- bring AGP_DEBUG to LINT by mentioning it in NOTES

This should hopefully fix a warning that was...

Found by:	Coverity Prevent(tm)
CID:		3676
Tested on:	amd64, i386
2009-02-06 20:57:10 +00:00
jhb
d33df07e4e Add support for fifos to UDF:
- Add a separate set of vnode operations that inherits from the fifo ops
  and use it for fifo nodes.
- Add a VOP_SETATTR() method that allows setting the size (by silently
  ignoring the requests) of fifos.  This is to allow O_TRUNC opens of
  fifo devices (e.g. I/O redirection in shells using ">").
- Add a VOP_PRINT() handler while I'm here.
2009-02-06 20:09:14 +00:00
jhb
f856c6d618 Tweak the output of VOP_PRINT/vn_printf() some.
- Align the fifo output in fifo_print() with other vn_printf() output.
- Remove the leading space from lockmgr_printinfo() so its output lines up
  in vn_printf().
- lockmgr_printinfo() now ends with a newline, so remove an extra newline
  from vn_printf().
2009-02-06 20:06:48 +00:00
trasz
d102122bd0 Add KASSERTs to make it easier to debug problems like the one fixed
in r188141.

Reviewed by:	kib,attilio
Approved by:	rwatson (mentor)
Tested by:	pho
Sponsored by:	FreeBSD Foundation
2009-02-06 18:16:01 +00:00
trasz
e0aa6f81f9 When a device containing mounted UFS filesystem disappears, the type
of devvp becomes VBAD, which UFS incorrectly interprets as snapshot
vnode, which in turns causes panic.  Fix it by replacing '!= VCHR'
with '== VREG'.

With this fix in place, you should no longer be able to panic the system
by removing a device with an UFS filesystem mounted from it - assuming
you don't use softupdates.

Reviewed by:	kib
Tested by:	pho
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
2009-02-06 17:14:07 +00:00
kevlo
974ef5e843 In urtw_init() call urtw_stop(ifp, 0) rather than urtw_stop(ifp, 1)
to stop the device.
2009-02-06 15:27:40 +00:00
jhb
b11fd9c5ab Note that the slave address passed to smb(4) commands must be left-justified
(LSB is 0).  The iic(4) manpage probably needs similar language to describe
the format it expects.
2009-02-06 15:09:31 +00:00
kevlo
1029fa8a52 Regen 2009-02-06 15:04:06 +00:00
kevlo
9fbefbe96f Add the Buffalo WLI-U2-SG54HG 2009-02-06 15:03:17 +00:00
jhb
066e44b98e Add a note to document that ichsmb(4) now uses left-justified SMBus slave
addresses.
2009-02-06 15:03:14 +00:00
jhb
5dff890984 Expand the scope of the sysctllock sx lock to protect the sysctl tree itself.
Back in 1.1 of kern_sysctl.c the sysctl() routine wired the "old" userland
buffer for most sysctls (everything except kern.vnode.*).  I think to prevent
issues with wiring too much memory it used a 'memlock' to serialize all
sysctl(2) invocations, meaning that only one user buffer could be wired at
a time.  In 5.0 the 'memlock' was converted to an sx lock and renamed to
'sysctl lock'.  However, it still only served the purpose of serializing
sysctls to avoid wiring too much memory and didn't actually protect the
sysctl tree as its name suggested.  These changes expand the lock to actually
protect the tree.

Later on in 5.0, sysctl was changed to not wire buffers for requests by
default (sysctl_handle_opaque() will still wire buffers larger than a single
page, however).  As a result, user buffers are no longer wired as often.
However, many sysctl handlers still wire user buffers, so it is still
desirable to serialize userland sysctl requests.  Kernel sysctl requests
are allowed to run in parallel, however.

- Expose sysctl_lock()/sysctl_unlock() routines to exclusively lock the
  sysctl tree for a few places outside of kern_sysctl.c that manipulate
  the sysctl tree directly including the kernel linker and vfs_register().
- sysctl_register() and sysctl_unregister() require the caller to lock
  the sysctl lock using sysctl_lock() and sysctl_unlock().  The rest of
  the public sysctl API manage the locking internally.
- Add a locked variant of sysctl_remove_oid() for internal use so that
  external uses of the API do not need to be aware of locking requirements.
- The kernel linker no longer needs Giant when manipulating the sysctl
  tree.
- Add a missing break to the loop in vfs_register() so that we stop looking
  at the sysctl MIB once we have changed it.

MFC after:	1 month
2009-02-06 14:51:32 +00:00
wkoszek
59242bb1a2 Consistently use <TAB> instead of spaces as option name and file
separator.
2009-02-06 10:30:46 +00:00
imp
fdc03cf101 fix spelling error
Submitted by:	trasz
2009-02-06 09:34:17 +00:00
imp
8448edb36a Store the entire funce for disk type functions (eg CF cards and the
like).
2009-02-06 07:49:03 +00:00
rodrigc
0c3d4be2e1 Set NFSMNT_ACDIRMAX flag in fallback_mount() function. 2009-02-06 07:47:53 +00:00
rodrigc
bee75cb3e3 Set NFSMNT_ACREGMIN, NFSMNT_ACREGMAX, and NFSMNT_ACDIRMIN flags
in fallback_mount() function.
Add a comment to indicate that the fallback_mount() function
should eventually go away.

Submitted by:	Jaakko Heinonen <jh saunalahti fi>
2009-02-06 07:42:21 +00:00
wkoszek
3d93b85eb4 Remove unused variable.
Found with:	Coverity Prevent(tm)
CID:		4138
2009-02-06 00:55:19 +00:00
wkoszek
d2a92510f2 Make config -x <kernel> only return non-zero characters,
so that:

	config -x <kernel> | grep <something>

just works.

Reported by:	Danny Braniss <danny@cs.huji.ac.il>
2009-02-06 00:50:21 +00:00
sam
d40450f670 add PSB channels to the calibration list 2009-02-06 00:48:56 +00:00
wkoszek
4d019c63b6 Bring consistent debugging output for all values that are supposed
to be printed in a hexadecimal format. Otherwise, '270' doesn't say
much.

Reviewed by:	imp
2009-02-05 23:51:11 +00:00
sam
49edf8abc4 for adhoc and ahdemo modes try to find the "bss node": use the bssid
unless it's not setup or zero's; this may not work as the bssid of
the ibss isn't certain to the "right mac address" but for many cases
it is
2009-02-05 23:15:39 +00:00
jhb
fa654c58a4 Drop the kernel linker lock while running SYSUNINIT routines and removing
sysctls during a linker file unload.  We drop the lock when doing similar
operations during a linker file load.  To close races, clear the LINKED
flag before dropping the lock so that the linker file is no longer visible
to userland.

MFC after:	1 week
2009-02-05 23:01:36 +00:00
sam
d9be247f47 make -o handling like athstats 2009-02-05 22:17:10 +00:00
sam
27217791ed unbreak -o 2009-02-05 22:16:09 +00:00
kmacy
ce680c3b4b halt APs on reboot 2009-02-05 21:41:27 +00:00
kmacy
49b89940c8 reboot instance on reset 2009-02-05 21:35:40 +00:00
kmacy
f8d6e74e3a fix non-witness compile 2009-02-05 21:18:39 +00:00
sam
336cb9e99f eliminate gainFCorrection; just have ar5212GetGainFCorrection return
the calculated value as it's only used in one place
2009-02-05 21:13:31 +00:00
sam
2187c7fab7 add new stats and missing tx_raw stat 2009-02-05 21:09:46 +00:00
sam
18819a0562 Minor packet drop improvements:
o change tdma packet drop msg when ack required to ATH_DEBUG_TDMA
  (ATH_DEBUG_XMIT is too noisy)
o add a debug msg for raw packet drop due to interface down/invalid
o add stats for these two cases
o explain how another drop case is handled
2009-02-05 21:02:40 +00:00
sam
5b2183aa12 improve IQ cal debug msgs; in particular don't scare people by screaming
"MISGATED IQ CAL!" when it's not
2009-02-05 20:56:33 +00:00
sam
d9b4eedcd5 fill in ar5212ResetCalValid; reset the IQ valid flag on the channel
so IQ calibration will be started on the next periodic cal
2009-02-05 20:51:53 +00:00
sam
3eb0ca6204 style 2009-02-05 20:49:13 +00:00
sam
1434b839c9 replace r/w idiom with OS_REG_SET_BIT (to match other code) 2009-02-05 20:48:30 +00:00
imp
0129b996aa Don't check for mapping above 4GB on 32-bit platforms. 2009-02-05 20:44:06 +00:00
sam
c1fbfec8ba o fix identification of ahdemo mode
o split out code to get the bssid for use in the future
o include more information in error diags when unable to collect sta info/stats
2009-02-05 20:39:53 +00:00
sam
6c8a518fd3 o change _db_show_key to always dump the contents instead of checking
IEEE80211_KEY_DEVKEY
o fix channel power printing (they are signed values)
o add show statab to dump a node table and automatically dump the sta
  table of a com structure with /s
2009-02-05 20:26:53 +00:00
imp
5370f72626 do_product_lookup should return a const struct pccard_product *. 2009-02-05 19:39:07 +00:00
imp
7730d077dc Fix parameter types for set_res_flags and read_ivars 2009-02-05 19:38:31 +00:00
imp
3a5200e02e shutdown returns an int 2009-02-05 19:37:49 +00:00
imp
519fc8678e shutdown returns an int 2009-02-05 19:36:14 +00:00
imp
c3297b3cc4 writereg returns an int. 2009-02-05 19:33:35 +00:00
imp
1ce99eeccb writereg returns an int. 2009-02-05 19:33:20 +00:00
imp
49862b4836 Make iclear return int, since that matches all function definitions of it. 2009-02-05 19:32:34 +00:00
imp
10f81d10bb reset_epp and ecp_sync both return int. 2009-02-05 19:31:55 +00:00
imp
41dda7f4c2 Shutdown returns an int. 2009-02-05 19:30:55 +00:00
imp
6388654b8d identify routine takes driver_t *, not device_t *. 2009-02-05 19:30:28 +00:00
sam
451a1d6071 o add IEEE80211_KEY_BITS for %b printing of wk_flags
o replace hand-rolled code to print wk_flags
o add display of ni_ucastkey in show sta
o fix \n in _db_show_key
2009-02-05 19:20:34 +00:00
imp
1d8d2a7ac9 Add some additional debugging for the memory code. 2009-02-05 18:51:14 +00:00
imp
062d78912f device_shutdown returns an int. 2009-02-05 18:43:13 +00:00