]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoThis patch fixes a problem, which exists if you have IPSEC in your kernel
wkoszek [Mon, 27 Feb 2006 16:56:22 +0000 (16:56 +0000)]
This patch fixes a problem, which exists if you have IPSEC in your kernel
and want to have crypto support loaded as KLD. By moving zlib to separate
module and adding MODULE_DEPEND directives, it is possible to use such
configuration without complication. Otherwise, since IPSEC is linked with
zlib (just like crypto.ko) you'll get following error:

interface zlib.1 already present in the KLD 'kernel'!

Approved by: cognet (mentor)

18 years agoConnect zlib to the build.
wkoszek [Mon, 27 Feb 2006 16:50:51 +0000 (16:50 +0000)]
Connect zlib to the build.

Approved by: cognet (mentor)

18 years agoDocument how to change the polling interval for the 64-bit interface
harti [Mon, 27 Feb 2006 16:31:01 +0000 (16:31 +0000)]
Document how to change the polling interval for the 64-bit interface
counters in case an interface reports the wrong speed via if_mib.

18 years agoReconnect bsnmpd to the build. It was temporarily disable because of a
harti [Mon, 27 Feb 2006 16:17:25 +0000 (16:17 +0000)]
Reconnect bsnmpd to the build. It was temporarily disable because of a
mis-import. Thanks for fixing this to markm@.

18 years agoThis commit was generated by cvs2svn to compensate for changes in r156066,
harti [Mon, 27 Feb 2006 16:16:18 +0000 (16:16 +0000)]
This commit was generated by cvs2svn to compensate for changes in r156066,
which included commits to RCS files with non-trunk default branches.

18 years agoVirgin import of bsnmpd 1.12
harti [Mon, 27 Feb 2006 16:16:18 +0000 (16:16 +0000)]
Virgin import of bsnmpd 1.12

18 years agoFix pmccontrol(8) on Intel Xeon's running in 64 bit mode.
jkoshy [Mon, 27 Feb 2006 14:25:32 +0000 (14:25 +0000)]
Fix pmccontrol(8) on Intel Xeon's running in 64 bit mode.

PR: kern/93773

18 years agoCODA_COMPAT_5 may not be defined unconditionally in the coda5 module.
yar [Mon, 27 Feb 2006 12:04:13 +0000 (12:04 +0000)]
CODA_COMPAT_5 may not be defined unconditionally in the coda5 module.
Otherwise a kernel build would break in the coda5 module if the main
kernel conf file enabled CODA_COMPAT_5, too.  Redefined symbols are
strictly disallowed by -Werror.

To overcome this issue, introduce a different symbol indicating coda5
build, CODA5_MODULE, and translate it to CODA_COMPAT_5 appropriately
in /sys/coda/coda.h.

MFC after: 3 days

18 years agoAdd a man page for mkfilters(1) and put the corrected perl script in the
darrenr [Mon, 27 Feb 2006 11:22:20 +0000 (11:22 +0000)]
Add a man page for mkfilters(1) and put the corrected perl script in the
ipfilter usr/share directory

PR:     docs/26879

18 years agoDetect that the "audit" group is missing earlier during install.
ru [Mon, 27 Feb 2006 09:17:39 +0000 (09:17 +0000)]
Detect that the "audit" group is missing earlier during install.

18 years agoOne more grammar nit.
glebius [Mon, 27 Feb 2006 07:22:32 +0000 (07:22 +0000)]
One more grammar nit.

Submitted by: ru

18 years agoDisable custom locking in the vkbd(4) for now and make it rely on the
emax [Mon, 27 Feb 2006 06:17:48 +0000 (06:17 +0000)]
Disable custom locking in the vkbd(4) for now and make it rely on the
Giant mutex (just like the rest of keyboard drivers and syscons(4) do).

Tested by: markus
MFC after: 1 day

18 years agoAdd SWIDTH information for zh_CN.eucCN.
delphij [Mon, 27 Feb 2006 06:11:58 +0000 (06:11 +0000)]
Add SWIDTH information for zh_CN.eucCN.

Submitted by: ume
Obtained from: NetBSD
MFC Candidate.

18 years agoAdd the Tripp-Lite U209-000-R serial adapter.
iedowse [Mon, 27 Feb 2006 01:01:27 +0000 (01:01 +0000)]
Add the Tripp-Lite U209-000-R serial adapter.

PR: usb/78543, usb/93347
MFC after: 1 week

18 years agoIt has not been possible to specify a dumpdev in loader.conf since 2002,
kris [Mon, 27 Feb 2006 00:15:53 +0000 (00:15 +0000)]
It has not been possible to specify a dumpdev in loader.conf since 2002,
so don't raise false hopes here.

18 years agoFix typo in manual page reference.
wkoszek [Sun, 26 Feb 2006 23:01:11 +0000 (23:01 +0000)]
Fix typo in manual page reference.

Approved by: cognet (mentor)
MFC after: 3 days

18 years agoReference sha256(1) instead of sha256(8), which doesn't exist.
wkoszek [Sun, 26 Feb 2006 22:59:40 +0000 (22:59 +0000)]
Reference sha256(1) instead of sha256(8), which doesn't exist.

Approved by: cognet (mentor)
MFC after: 3 days

18 years agoRemove the ill-considered effect of using the type definitions as
mjacob [Sun, 26 Feb 2006 22:50:14 +0000 (22:50 +0000)]
Remove the ill-considered effect of using the type definitions as
distributed by LSI-Logic. For FreeBSD, just use the posix defines
instead of trying to figure out how wide an int is. Apologies to all.

18 years agopropagate role of device for ISP_GET_PDBINFO
mjacob [Sun, 26 Feb 2006 22:40:56 +0000 (22:40 +0000)]
propagate role of device for ISP_GET_PDBINFO

18 years agoThe UQ_OPEN_CLEARSTALL entry added in revision 1.48 is no longer
iedowse [Sun, 26 Feb 2006 22:20:45 +0000 (22:20 +0000)]
The UQ_OPEN_CLEARSTALL entry added in revision 1.48 is no longer
required now that we save the data toggle when closing a pipe.

Verified by: Fredrik Lindberg

18 years agoRemove OpenSSH and sendmail update notes; these updates were already
bmah [Sun, 26 Feb 2006 21:48:50 +0000 (21:48 +0000)]
Remove OpenSSH and sendmail update notes; these updates were already
present in 6.0-RELEASE and shouldn't be noted here.

18 years agoMove de driver to dev/de
imp [Sun, 26 Feb 2006 17:54:04 +0000 (17:54 +0000)]
Move de driver to dev/de

18 years agoRemove de driver from old location.
imp [Sun, 26 Feb 2006 17:52:51 +0000 (17:52 +0000)]
Remove de driver from old location.

18 years agoRepo copy de driver to dev/de, and adjust.
imp [Sun, 26 Feb 2006 17:52:04 +0000 (17:52 +0000)]
Repo copy de driver to dev/de, and adjust.

18 years agoMove de from pci to dev/de
imp [Sun, 26 Feb 2006 17:51:22 +0000 (17:51 +0000)]
Move de from pci to dev/de

18 years agoo Bump date (thanks ru)
imp [Sun, 26 Feb 2006 17:45:35 +0000 (17:45 +0000)]
o Bump date (thanks ru)
o Also, fdisk_pc98 appears to support -i, so add it to the man page.
o Ditto -v
o Change the name from PC partition table maintenance program to NEC PC-98x1
  partition table maintenance program, since it is possible to have a DOS MBR
  formatted disk on FreeBSD/pc98 now (although we don't install any tools for
  this).

18 years agoUse 'ipfw list' instead of 'ipfw l', since it's deprecated (and warning is
wkoszek [Sun, 26 Feb 2006 16:45:29 +0000 (16:45 +0000)]
Use 'ipfw list' instead of 'ipfw l', since it's deprecated (and warning is
printed on system startup).

Approved by: cognet (mentor)
MFC after: 3 days

18 years agoProvide SWIDTH information so that applications like tcsh(1) can properly
delphij [Sun, 26 Feb 2006 14:03:13 +0000 (14:03 +0000)]
Provide SWIDTH information so that applications like tcsh(1) can properly
handle with zh_CN.GBK locale, which is quite common for users who uses
Simplified Chinese.

MFC Candidate.

18 years ago1. Remove aio entry from lists earlier in aio_free_entry,
davidxu [Sun, 26 Feb 2006 12:56:23 +0000 (12:56 +0000)]
1. Remove aio entry from lists earlier in aio_free_entry,
   so other threads can not see it if we unlock the proc
   lock (this can happen in knlist_delete).  Don't do wakeup,
   it is not necessary.

2. Decrease kaio_buffer_count in biohelper rather than
   doing it in aio_bio_done_notify.

3. In aio_bio_done_notify, don't send notification if KAIO_RUNDOWN
   was set, because the process is already in single thread mode.

4. Use assignment to initialize aiothreadflags.

5. AIOCBLIST_RUNDOWN is not useful, axe the code using it.

6. use LIO_NOP instead of zero.

18 years agoFix several typos and trim spaces at eol.
glebius [Sun, 26 Feb 2006 11:44:28 +0000 (11:44 +0000)]
Fix several typos and trim spaces at eol.

PR: kern/93759
Submitted by: Antoine Brodin <antoine.brodin laposte.net>

18 years agoShorten the time for waiting for TMF commands to complete- let's
mjacob [Sun, 26 Feb 2006 07:46:09 +0000 (07:46 +0000)]
Shorten the time for waiting for TMF commands to complete- let's
not hang the system for 5 seconds. If a TMF doesn't complete within,
oh, say 500ms, that's enough.

Put in a printout to catch mpt_recover_commands being activated with
no commands.

18 years agoa) Delay for port enable to succeed should be 30 seconds (at least) for
mjacob [Sun, 26 Feb 2006 07:44:31 +0000 (07:44 +0000)]
a) Delay for port enable to succeed should be 30 seconds (at least) for
*both* SAS and FC, not just SAS.

b) Don't tell the chip we want it to do FIFO signalling if we actually
don't set up the address where the FIFO signal is supposed to be written
(oops).

18 years agoFixes and new features:
imp [Sun, 26 Feb 2006 07:37:10 +0000 (07:37 +0000)]
Fixes and new features:
o Merge the -I switch from i386 verison to initialize the partition table
  to use the maximum amount possible for a single FreeBSD table.
o Improve warning when the geom method fails (which I think it
  always will until geom_pc98 is updated to respond to this ctl message)
o when writing out the boot sector, we have to write out a minimum of
  1024 bytes or the sector size.  This is different than the i386 case where
  we need to write out a minimum of 512 bytes (which is also the minimum
  sector size).  We already handle this difference on reading, but didn't
  in writing, so attempting to write a new partition table would fail.
o Add MID to the -s output, since pc98 users are likely interested in
  both of these parameters.

# I can now initialize disks on my pc98 machine either by -I or by
# manually entering the parameters.  I don't know if fdisk -B works or not,
# since I'm not willing to risk my only working boot disk to test it..

18 years agoSync inet_net_pton() and inet_net_ntop() with latest BIND9's includes
ume [Sun, 26 Feb 2006 05:44:21 +0000 (05:44 +0000)]
Sync inet_net_pton() and inet_net_ntop() with latest BIND9's includes
an IPv6 support.

PR: kern/93740
Submitted by: Rudolf Cejka <cejkar__at__fit.vutbr.cz>
Obtained from: BIND9
MFC after: 1 week

18 years agoRemove &release.prev.historic;.
hrs [Sun, 26 Feb 2006 04:57:17 +0000 (04:57 +0000)]
Remove &release.prev.historic;.

18 years agoSave and restore the data toggle value when a pipe to an endpoint
iedowse [Sun, 26 Feb 2006 02:57:57 +0000 (02:57 +0000)]
Save and restore the data toggle value when a pipe to an endpoint
is closed and then reopened. This appears to be necessary now that
we no longer clear endpoint stalls every time a pipe is opened.
Previously we could assume an initial toggle value of zero because
the clear-stall operation resets the device's toggle state.

Reported by: Holger Kipp
MFC after: 3 days

18 years agoThe quot command expected all inodes contents to be valid, however
dwmalone [Sat, 25 Feb 2006 23:50:15 +0000 (23:50 +0000)]
The quot command expected all inodes contents to be valid, however
on UFS2 inodes are initialised as they are needed, rather than at
newfs time. When quot encountered these inodes it could produce
crazy results.

Now, on UFS2 filesystems, quot's get_inode function will bzero
unallicated inodes before passing them back to a caller. This is
how UFS2 initialises new inodes, so this should work OK.

Also, while I'm here, make quot exit with an error if it finds
inodes of an unknown type. This should help catch future problems
of this type.

Reviewed by: iedowse
MFC after: 1 week

18 years agoAdd SWIDTH to zh_TW.Big5 locale, to fix problem with tcsh(1)
delphij [Sat, 25 Feb 2006 23:28:19 +0000 (23:28 +0000)]
Add SWIDTH to zh_TW.Big5 locale, to fix problem with tcsh(1)

Submitted by: Rong-En Fan  <rafan at infor dot org>
PR: conf/93844

18 years agoPut a comment, explaining why kbdmux(4) had to be fixed.
emax [Sat, 25 Feb 2006 22:59:01 +0000 (22:59 +0000)]
Put a comment, explaining why kbdmux(4) had to be fixed.
While I'm here fix a couple of whitespaces.

Requested by: netchild
MFC after: 1 day

18 years agoRevert previous change for now. We traditionally add a new locale
delphij [Sat, 25 Feb 2006 22:09:37 +0000 (22:09 +0000)]
Revert previous change for now.  We traditionally add a new locale
directory when we have 10+ ports that make use of it, and now we have
only 3.  This change would come back if the tt/ usage grown up to the
level.

Knowledge provided by: krion, kris

18 years agoFix hard lockup caused by kbdmux(4) when kbdmux(4), PS/2 keyboard
emax [Sat, 25 Feb 2006 21:59:29 +0000 (21:59 +0000)]
Fix hard lockup caused by kbdmux(4) when kbdmux(4), PS/2 keyboard
(atkbd(4)) and PS/2 mouse (psm(4)) are used together.

Turns out that atkbd(4) check_char() method may return "true" while
read_char() method returns NOKEY. When this happens kbdmux(4) was
simply stuck in the dead loop. Avoid dead loop in kbdmux(4) by breaking
out of the loop if read_char() method returns NOKEY.

It almost seems like a bug in atkkbd(4), atkbd_check_char() calls
kbdc_data_ready(), and, the later will return "true" if there are
pending data in either kbd or aux queue. However, because both aux
and kbd are on the same controller, I'm not sure if this is a bug
or feature.

Tested by: markus
MFC after: 1 day

18 years agoAdd tt locale directory, since more and more ports create and use it.
delphij [Sat, 25 Feb 2006 21:10:25 +0000 (21:10 +0000)]
Add tt locale directory, since more and more ports create and use it.

18 years agoAdd a missing ohci_waitintr() call that allows polled operation of
iedowse [Sat, 25 Feb 2006 17:44:29 +0000 (17:44 +0000)]
Add a missing ohci_waitintr() call that allows polled operation of
bulk transfers to have a chance of working.

PR: usb/93720
Submitted by: Nate Nielsen
MFC after: 1 week

18 years agoFix ata_reinit so it does things in the right order to prevent panic's.
sos [Sat, 25 Feb 2006 17:27:33 +0000 (17:27 +0000)]
Fix ata_reinit so it does things in the right order to prevent panic's.
Lock the channel so master/slave setups wont trash during reinit.

18 years agoAdd definitions of SWIDTH. It fixes the problem that tcsh 6.14
ume [Sat, 25 Feb 2006 17:12:43 +0000 (17:12 +0000)]
Add definitions of SWIDTH.  It fixes the problem that tcsh 6.14
doesn't work correctly with ko_KR.eucKR locale.

Tested by: cjh at the CBUG party
Obtained from: NetBSD
MFC after: 1 week

18 years agoAlways print a newline char at the end of the line.
scottl [Sat, 25 Feb 2006 16:20:22 +0000 (16:20 +0000)]
Always print a newline char at the end of the line.

18 years agoRole a microrev of the MPI Library in preparation for target mode work.
mjacob [Sat, 25 Feb 2006 07:45:54 +0000 (07:45 +0000)]
Role a microrev of the MPI Library in preparation for target mode work.

Make my portions of the license clearer.

Thank Chris Ellsworth for his support in getting a bunch of this done.

18 years agoconsolidate calculation of capabilities ie
sam [Sat, 25 Feb 2006 05:36:43 +0000 (05:36 +0000)]
consolidate calculation of capabilities ie

Reviewed by: avatar
MFC after: 2 weeks

18 years agoAdd an alias 'unhalted-cycles' denoting cycles where the CPU is
jkoshy [Sat, 25 Feb 2006 05:34:00 +0000 (05:34 +0000)]
Add an alias 'unhalted-cycles' denoting cycles where the CPU is
not in a halt or sleep state.

18 years agoIf we specify: mount -u (update), without specifying an
rodrigc [Sat, 25 Feb 2006 05:09:47 +0000 (05:09 +0000)]
If we specify: mount -u (update),  without specifying an
additional -r (read-only) flag or or -w (read-write) flag,
then assume we want, mount -u -w.

When doing a mount update, this will implicitly pass a "noro" mount
option down to the VFS layer.
vfs_mergeopts() in vfs_mount.c will then remove the "ro" mount option
if it exists in the mount options for a mounted file system.
This means that "mount -u" works the same as "mount -u -w"
and will convert a read-only mount to read-write.

18 years agoAdd frequency-voltage tables for Intel 778, 758, 773, 753, and 733J
cperciva [Sat, 25 Feb 2006 04:55:38 +0000 (04:55 +0000)]
Add frequency-voltage tables for Intel 778, 758, 773, 753, and 733J
processors.

Obtained from: Intel Datasheet 302189-008

18 years agoUpdate text to reflect that:
rodrigc [Sat, 25 Feb 2006 00:47:53 +0000 (00:47 +0000)]
Update text to reflect that:
- mount(8) now calls the nmount(2) system call directly, not mount(2)
- specifying a filesystem type with -t will not automatically
  invoke an external /sbin/mount_XXXX program....this only happens for
  certain file system types.  For all other file system types, nmount(2)
  is called directly.

18 years agofix a race whereby a tx descriptor might get reused before the hardware
sam [Fri, 24 Feb 2006 23:10:08 +0000 (23:10 +0000)]
fix a race whereby a tx descriptor might get reused before the hardware
is finished with it; this may only occur when the tx queue is setup as
dba-gated but since the fix is cheap apply it to all queues

while here make the queue depth signed for use in assertions

Reviewed by: apatti
MFC after: 2 weeks

18 years agoFix a race condition introduced when redzones were added. Use an
deischen [Fri, 24 Feb 2006 22:03:10 +0000 (22:03 +0000)]
Fix a race condition introduced when redzones were added.  Use an
atomic operation to return and adjust the stack.

Submitted by: luoqi

18 years agoDon't to forget to unlock the rwlock on trunk before destroying it.
yar [Fri, 24 Feb 2006 17:25:16 +0000 (17:25 +0000)]
Don't to forget to unlock the rwlock on trunk before destroying it.
This should fix panic on "kldunload if_vlan" while vlanX are still there.

Reviewed by: glebius

18 years agoDecrease the value of RES_DFLRETRY from 4 to 2.
ume [Fri, 24 Feb 2006 17:00:50 +0000 (17:00 +0000)]
Decrease the value of RES_DFLRETRY from 4 to 2.

PR: bin/62139
Reported by: Rostislav Krasny <rosti.bsd__at__gmail.com>
Obtained from: BIND9
MFC after: 1 week

18 years ago- Just query 'as is', if there is a trailing dot in the name.
ume [Fri, 24 Feb 2006 16:53:42 +0000 (16:53 +0000)]
- Just query 'as is', if there is a trailing dot in the name.
- Don't query 'as is' twice.

PR: bin/62139
Reported by: Rostislav Krasny <rosti.bsd__at__gmail.com>
Tested by: Rostislav Krasny <rosti.bsd__at__gmail.com>
Obtained from: BIND9 (with some modification)
MFC after: 1 week

18 years agoRevert a minor glitch of revision 1.69
keramida [Fri, 24 Feb 2006 15:02:08 +0000 (15:02 +0000)]
Revert a minor glitch of revision 1.69

Submitted by: Andriy Tkachuk <andrit@ukr.net>
X-MFC after: RE approval

18 years agoMove the hard-coded ETHER_* options to where they belong --
yar [Fri, 24 Feb 2006 12:27:09 +0000 (12:27 +0000)]
Move the hard-coded ETHER_* options to where they belong --
inside !if defined(KERNBUILDDIR).

Utilize the fact the module will support all frames by default --
it needs no ETHER_* options unless some frames need to be disabled.

Fix the comment respectively.

Don't forget to create fake opt_ef.h if no ETHER_* are set.

MFC after: 3 days

18 years agoTrim unnecessary pointer alignment.
ariff [Fri, 24 Feb 2006 09:29:32 +0000 (09:29 +0000)]
Trim unnecessary pointer alignment.

18 years agoReplace our local UART_SIGMASK_* with the global SER_MASK_*.
marcel [Fri, 24 Feb 2006 05:40:17 +0000 (05:40 +0000)]
Replace our local UART_SIGMASK_* with the global SER_MASK_*.

18 years agoWhen we probe a SAB82532, return BUS_PROBE_GENERIC. This allows puc(4)
marcel [Fri, 24 Feb 2006 05:36:44 +0000 (05:36 +0000)]
When we probe a SAB82532, return BUS_PROBE_GENERIC. This allows puc(4)
or scc(4) to grab the device by default. In fact, we probably shouldn't
even claim the device at all...

18 years agoMFp4:
marcel [Fri, 24 Feb 2006 02:42:26 +0000 (02:42 +0000)]
MFp4:
Stop using our local UART_IPEND_* and instead use the global SER_INT_*
as defined in <sys/serial.h>.

18 years agoMFp4:
marcel [Fri, 24 Feb 2006 02:24:10 +0000 (02:24 +0000)]
MFp4:
o  Add defines for the 5 interrupt sources typical for serial devices.
   These defines can be used for more finegrained interrupt handling
   between drivers that cooperatively handle multiple serial ports.
o  Add defines for the various bitmasks applicable when all information
   is passed between drivers as a single integral.

18 years agoMFp4:
marcel [Fri, 24 Feb 2006 02:16:09 +0000 (02:16 +0000)]
MFp4:
style(9): <tab> after #define

18 years agoMFp4:
marcel [Fri, 24 Feb 2006 02:06:57 +0000 (02:06 +0000)]
MFp4:
Return BUS_PROBE_LOW_PRIORITY for a successful probe. This is in
preparation of the introduction of scc(4), which is going to handle
SCCs in the near future.

18 years agoMFp4:
marcel [Fri, 24 Feb 2006 02:03:35 +0000 (02:03 +0000)]
MFp4:
Add CHAN_A & CHAN_B for channel register offsets.
While here, fix a comment.

18 years agoRemove dev/uart/uart_if.m from the default MFILES (in kmod.mk) and
marcel [Fri, 24 Feb 2006 01:49:36 +0000 (01:49 +0000)]
Remove dev/uart/uart_if.m from the default MFILES (in kmod.mk) and
instead define MFILES appropriately for the uart(4) module build.

18 years ago- Back out 1.155. I mismerged my ancient local patch. Luckily it was
jkim [Thu, 23 Feb 2006 23:41:42 +0000 (23:41 +0000)]
- Back out 1.155.  I mismerged my ancient local patch.  Luckily it was
completely noop.
- Geometry sanitization for non-interactive mode is moved to correct place.

Reported by: Anton Yuzhaninov <citrin at citrin dot ru>
Pointyhat: me

18 years ago- Use official version strings for LMP and HCI version reporting and add
markus [Thu, 23 Feb 2006 23:19:12 +0000 (23:19 +0000)]
- Use official version strings for LMP and HCI version reporting and add
  version strings up to Bluetooth 2.0
- Update manufacturer list

Approved by: emax
MFC after: 3 days

18 years agoEliminate a race condition in timed waits (cv, mutex, and sleeps).
deischen [Thu, 23 Feb 2006 21:34:08 +0000 (21:34 +0000)]
Eliminate a race condition in timed waits (cv, mutex, and sleeps).
MFC Candidate.

PR: 93592

18 years agoThis patch fixes the problem where the current TCP code can not handle
qingli [Thu, 23 Feb 2006 21:14:34 +0000 (21:14 +0000)]
This patch fixes the problem where the current TCP code can not handle
simultaneous open. Both the bug and the patch were verified using the
ANVL test suite.

PR: kern/74935
Submitted by: qingli (before I became committer)
Reviewed by: andre
MFC after: 5 days

18 years agoFix the way in which median is calculated. If the data source has even
wkoszek [Thu, 23 Feb 2006 20:46:10 +0000 (20:46 +0000)]
Fix the way in which median is calculated. If the data source has even
number of data points, value should be calculated by adding two middle
elements and dividing them by 2.

Approved by: cognet (mentor)

18 years agoKeep the parent device (in this case the channel) around in ata_request,
sos [Thu, 23 Feb 2006 20:15:22 +0000 (20:15 +0000)]
Keep the parent device (in this case the channel) around in ata_request,
so we dont panic device removal or failure.
Clean up ata_fail_requests to prevent the queue munging to fail.

18 years agoRemove some dead code.
jhb [Thu, 23 Feb 2006 19:23:55 +0000 (19:23 +0000)]
Remove some dead code.

Coverity ID: 822
Found by: Coverity Prevent
Reviewed by: ariff
MFC after: 1 week

18 years agoUse the recently added msleep_spin() function to simplify the
jhb [Thu, 23 Feb 2006 19:13:12 +0000 (19:13 +0000)]
Use the recently added msleep_spin() function to simplify the
callout_drain() logic.  We no longer need a separate non-spin mutex to
do sleep/wakeup with, instead we can now just use the one spin mutex to
manage all the callout functionality.

18 years ago- Use callout_init_mtx() to initialize toffhandle callout using the fdc's
jhb [Thu, 23 Feb 2006 19:11:16 +0000 (19:11 +0000)]
- Use callout_init_mtx() to initialize toffhandle callout using the fdc's
  mutex.
- Don't use callout_drain() to stop the toffhandle callout while holding the
  fdc mutex (this could deadlock) in functions called from softclock
  (callouts aren't allowed to do voluntary sleeps).  Instead, use
  callout_stop().  Note that since we hold the associated mutex and are now
  using callout_init_mtx(), callout_stop() is just as effective as
  callout_drain().  (Though callout_drain() is still needed in detach to
  make sure softclock isn't contesting on our mutex before we destroy the
  mutex.)
- Remove unused callout 'tohandle' from softc.

MFC after: 1 week

18 years agoIn ata_cmd_allocate() only call ata_pci_allocate once.
sos [Thu, 23 Feb 2006 18:52:15 +0000 (18:52 +0000)]
In ata_cmd_allocate() only call ata_pci_allocate once.

found by: jhb@

18 years agoFix typo
julian [Thu, 23 Feb 2006 18:51:02 +0000 (18:51 +0000)]
Fix typo

18 years agoCheck the return value of copyin() and return an error if it fails.
jhb [Thu, 23 Feb 2006 18:05:38 +0000 (18:05 +0000)]
Check the return value of copyin() and return an error if it fails.

Coverity ID: 839
Found by: Coverity Prevent
MFC after: 1 week
Reviewed by: ps, scottl

18 years agoUnhook myri10ge from build in preparation for rename
gallatin [Thu, 23 Feb 2006 12:30:39 +0000 (12:30 +0000)]
Unhook myri10ge from build in preparation for rename

18 years ago1. Refine kern_sigtimedwait() to remove redundant code.
davidxu [Thu, 23 Feb 2006 09:24:19 +0000 (09:24 +0000)]
1. Refine kern_sigtimedwait() to remove redundant code.
2. Fix a bug, if thread got a SIGKILL signal, call sigexit() to kill
   its process.

MFC after: 3 days

18 years agoUpdate version numbers in &release.*;.
hrs [Thu, 23 Feb 2006 06:15:56 +0000 (06:15 +0000)]
Update version numbers in &release.*;.

18 years agoCode cleanup, simply compare with curproc.
davidxu [Thu, 23 Feb 2006 05:50:55 +0000 (05:50 +0000)]
Code cleanup, simply compare with curproc.

18 years ago - Use vfs_ref/rel to protect a mountpoint from going away while VFS_STATFS
jeff [Thu, 23 Feb 2006 05:18:07 +0000 (05:18 +0000)]
 - Use vfs_ref/rel to protect a mountpoint from going away while VFS_STATFS
   is being called.  Be sure to grab the ref before we unlock the vnode to
   prevent the mount from disappearing.

Tested by: kris

18 years ago - Release the mount ref once the vnode has been recycled rather than once
jeff [Thu, 23 Feb 2006 05:15:37 +0000 (05:15 +0000)]
 - Release the mount ref once the vnode has been recycled rather than once
   the last reference is dropped.  I forgot that vnodes can stick around
   for a very long time until processes discover that they are dead.  This
   means that a vnode reference is not sufficient to keep the mount
   referenced and even more code will be required to ref mount points.

Discovered by: kris

18 years agoMove comments to more accurate place.
davidxu [Thu, 23 Feb 2006 03:42:17 +0000 (03:42 +0000)]
Move comments to more accurate place.

18 years agoFix a sleep queue race for KSE thread.
davidxu [Thu, 23 Feb 2006 00:13:58 +0000 (00:13 +0000)]
Fix a sleep queue race for KSE thread.

Reviewed by: jhb

18 years agocleanup line break formatting
sam [Thu, 23 Feb 2006 00:07:10 +0000 (00:07 +0000)]
cleanup line break formatting

MFC after: 1 week

18 years agoAdd myself as a new src commiter:
wkoszek [Wed, 22 Feb 2006 22:02:04 +0000 (22:02 +0000)]
Add myself as a new src commiter:
+ extend calendar with my birth date

Approved by:    cognet (mentor)
Reviewed by:    cognet (mentor)

18 years agotest program to check cpu counting
sam [Wed, 22 Feb 2006 21:51:09 +0000 (21:51 +0000)]
test program to check cpu counting

MFC after: 1 week

18 years agoG/C unused variable.
jhb [Wed, 22 Feb 2006 21:47:04 +0000 (21:47 +0000)]
G/C unused variable.

18 years agoguard function decls with _KERNEL so user code can include this file
sam [Wed, 22 Feb 2006 21:38:33 +0000 (21:38 +0000)]
guard function decls with _KERNEL so user code can include this file

MFC after: 1 week

18 years agoallow timo to be 0 when mtx is not NULL (KASSERT allowed this as
jmg [Wed, 22 Feb 2006 20:50:33 +0000 (20:50 +0000)]
allow timo to be 0 when mtx is not NULL (KASSERT allowed this as
pointed out by jhb)

Reviewed by: jhb
MFC after: 3 days

18 years agoFixup some comments. Mutexes's are locked, not entered for several years
jhb [Wed, 22 Feb 2006 20:46:10 +0000 (20:46 +0000)]
Fixup some comments.  Mutexes's are locked, not entered for several years
now and msleep blocks threads rather than processes.

18 years agoClose some races between procfs/ptrace and exit(2):
jhb [Wed, 22 Feb 2006 18:57:50 +0000 (18:57 +0000)]
Close some races between procfs/ptrace and exit(2):
- Reorder the events in exit(2) slightly so that we trigger the S_EXIT
  stop event earlier.  After we have signalled that, we set P_WEXIT and
  then wait for any processes with a hold on the vmspace via PHOLD to
  release it.  PHOLD now KASSERT()'s that P_WEXIT is clear when it is
  invoked, and PRELE now does a wakeup if P_WEXIT is set and p_lock drops
  to zero.
- Change proc_rwmem() to require that the processing read from has its
  vmspace held via PHOLD by the caller and get rid of all the junk to
  screw around with the vmspace reference count as we no longer need it.
- In ptrace() and pseudofs(), treat a process with P_WEXIT set as if it
  doesn't exist.
- Only do one PHOLD in kern_ptrace() now, and do it earlier so it covers
  FIX_SSTEP() (since on alpha at least this can end up calling proc_rwmem()
  to clear an earlier single-step simualted via a breakpoint).  We only
  do one to avoid races.  Also, by making the EINVAL error for unknown
  requests be part of the default: case in the switch, the various
  switch cases can now just break out to return which removes a _lot_ of
  duplicated PRELE and proc unlocks, etc.  Also, it fixes at least one bug
  where a LWP ptrace command could return EINVAL with the proc lock still
  held.
- Changed the locking for ptrace_single_step(), ptrace_set_pc(), and
  ptrace_clear_single_step() to always be called with the proc lock
  held (it was a mixed bag previously).  Alpha and arm have to drop
  the lock while the mess around with breakpoints, but other archs
  avoid extra lock release/acquires in ptrace().  I did have to fix a
  couple of other consumers in kern_kse and a few other places to
  hold the proc lock and PHOLD.

Tested by: ps (1 mostly, but some bits of 2-4 as well)
MFC after: 1 week

18 years ago- Use bus_setup_intr() and bus_teardown_intr() to register device driver
jhb [Wed, 22 Feb 2006 18:16:26 +0000 (18:16 +0000)]
- Use bus_setup_intr() and bus_teardown_intr() to register device driver
  interrupt handlers rather than BUS_SETUP_INTR() and BUS_TEARDOWN_INTR().
  Uses of the BUS_*() versions in the implementation of foo_intr methods
  in bus drivers were not changed.  Mostly this just means that some
  drivers might start printing diagnostic messages like [FAST] when
  appropriate as well as honoring mpsafenet=0.
- Fix two more of the ppbus drivers' identify routines to function
  correctly in the mythical case of a machine with more than one ppbus.

18 years agoChange pfs_visible() to optionally return a pointer to the process
jhb [Wed, 22 Feb 2006 17:24:54 +0000 (17:24 +0000)]
Change pfs_visible() to optionally return a pointer to the process
associated with the passed in pfs_node.  If it does return a pointer, it
keeps the process locked.  This allows a lot of places that were calling
pfind() again right after pfs_visible() to not have to do that and avoids
races since we don't drop the proc lock just to turn around and lock it
again.  This will become more important with future changes to fix races
between procfs/ptrace and exit(2).  Also, removed a duplicate pfs_visible()
call in pfs_getextattr().

Reviewed by: des
MFC after: 1 week

18 years agoDon't do a PHOLD() in kthread_create() w/o a matching PRELE() in
jhb [Wed, 22 Feb 2006 17:21:45 +0000 (17:21 +0000)]
Don't do a PHOLD() in kthread_create() w/o a matching PRELE() in
kthread_exit().  Rather than add the missing PRELE() I chose to just
axe the PHOLD() since it was redundant with the P_SYSTEM flag.

MFC after: 1 week

18 years agoHold the proc lock while calling proc_sstep() since the function asserts
jhb [Wed, 22 Feb 2006 17:20:37 +0000 (17:20 +0000)]
Hold the proc lock while calling proc_sstep() since the function asserts
it and remove a PRELE() that didn't have a matching PHOLD().  The calling
code already has a PHOLD anyway.

MFC after: 1 week