]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoRemove (c) line.
ivoras [Sun, 23 Aug 2009 18:15:13 +0000 (18:15 +0000)]
Remove (c) line.

Requested by: pjd
Approved by: gnn (mentor)
MFC after: 1 month

14 years ago- Add AS lookup functionality to traceroute6(8) as well.
ume [Sun, 23 Aug 2009 17:00:16 +0000 (17:00 +0000)]
- Add AS lookup functionality to traceroute6(8) as well.
- Support for IPv6 transport for AS lookup.
- Introduce $RA_SERVER to set whois server.
- Support for 4 byte ASN.
- ANSIfy function declaration in as.c.

Tested by: IHANet folks.

14 years agoMerge DTLS fixes from vendor-crypto/openssl/dist:
simon [Sun, 23 Aug 2009 16:29:47 +0000 (16:29 +0000)]
Merge DTLS fixes from vendor-crypto/openssl/dist:

- Fix memory consumption bug with "future epoch" DTLS records.
- Fix fragment handling memory leak.
- Do not access freed data structure.
- Fix DTLS fragment bug - out-of-sequence message handling which could
  result in NULL pointer dereference in
  dtls1_process_out_of_seq_message().

Note that this will not get FreeBSD Security Advisory as DTLS is
experimental in OpenSSL.

MFC after: 1 week
Security: CVE-2009-1377 CVE-2009-1378 CVE-2009-1379 CVE-2009-1387

14 years agoEnable _DIRENT_HAVE_D_TYPE so wpa_cli scans directories properly
sam [Sun, 23 Aug 2009 16:04:10 +0000 (16:04 +0000)]
Enable _DIRENT_HAVE_D_TYPE so wpa_cli scans directories properly
for it's unix domain socket.  Before this change wpa_cli would take
the first file in the directory that was not "." or "..".

Submitted by: Brandon Gooch <jamesbrandongooch@gmail.com>
MFC after: 3 days

14 years agoAdd GET_PARAM support for Z pipes.
rnoland [Sun, 23 Aug 2009 15:02:58 +0000 (15:02 +0000)]
Add GET_PARAM support for Z pipes.

This is needed for occulsion queries on rv530 chips.

MFC after: 2 weeks

14 years agoAdd kernel support for Radeon R6/7xx 3D.
rnoland [Sun, 23 Aug 2009 14:55:57 +0000 (14:55 +0000)]
Add kernel support for Radeon R6/7xx 3D.

You will still need Mesa from git and possibly an updated DDX driver,
but this is working fairly well now.

MFC after: 2 weeks

14 years agoUse a more appropriate choice of words.
jkoshy [Sun, 23 Aug 2009 14:48:25 +0000 (14:48 +0000)]
Use a more appropriate choice of words.

Submitted by: danfe

14 years agoAdd a read only sysctl tracking the hw.drm.msi tunable.
rnoland [Sun, 23 Aug 2009 14:33:12 +0000 (14:33 +0000)]
Add a read only sysctl tracking the hw.drm.msi tunable.

MFC after: 2 weeks

14 years agoClean up the handling of device minors
rnoland [Sun, 23 Aug 2009 14:31:20 +0000 (14:31 +0000)]
Clean up the handling of device minors

Submitted by: Ed
MFC after: 2 weeks

14 years agoClean up the locking in drm_alloc_resource()
rnoland [Sun, 23 Aug 2009 14:27:46 +0000 (14:27 +0000)]
Clean up the locking in drm_alloc_resource()

MFC after: 2 weeks

14 years agoFix the conformance of poll(2) for sockets after r195423 by
kib [Sun, 23 Aug 2009 12:44:15 +0000 (12:44 +0000)]
Fix the conformance of poll(2) for sockets after r195423 by
returning POLLHUP instead of POLLIN for several cases. Now, the
tools/regression/poll results for FreeBSD are closer to that of the
Solaris and Linux.

Also, improve the POSIX conformance by explicitely clearing POLLOUT
when POLLHUP is reported in pollscan(), making the fix global.

Submitted by: bde
Reviewed by: rwatson
MFC after: 1 week

14 years agoAdd support for diffs generated by Perforce.
ed [Sun, 23 Aug 2009 12:23:24 +0000 (12:23 +0000)]
Add support for diffs generated by Perforce.

It basically picks the filenames from the "====" line and strips off the
# revision number.

14 years ago- Hide ZFS kernel threads under zfskern process.
pjd [Sun, 23 Aug 2009 11:33:46 +0000 (11:33 +0000)]
- Hide ZFS kernel threads under zfskern process.
- Use better (shorter) threads names:
'zvol:worker zvol/tank/vol00' -> 'zvol tank/vol00'
'vdev:worker da0' -> 'vdev da0'

14 years agoSet priority of vdev_geom threads and zvol threads to PRIBIO.
pjd [Sun, 23 Aug 2009 11:27:08 +0000 (11:27 +0000)]
Set priority of vdev_geom threads and zvol threads to PRIBIO.

14 years ago- Give minclsyspri and maxclsyspri real values (consulted with kmacy).
pjd [Sun, 23 Aug 2009 11:22:46 +0000 (11:22 +0000)]
- Give minclsyspri and maxclsyspri real values (consulted with kmacy).
- Honour 'pri' argument for thread_create().

14 years agoMake dev.asmc.N.light.control writable by everyone.
rpaulo [Sun, 23 Aug 2009 09:58:06 +0000 (09:58 +0000)]
Make dev.asmc.N.light.control writable by everyone.

Submitted by: Patrick Lamaiziere <patfbsd at davenulle.org>
MFC after: 1 week

14 years agoConstify prime numbers.
rpaulo [Sun, 23 Aug 2009 09:55:06 +0000 (09:55 +0000)]
Constify prime numbers.

14 years agoFix another typo right next to the previous one, that amazingly, I did
julian [Sun, 23 Aug 2009 08:49:32 +0000 (08:49 +0000)]
Fix another typo right next to the previous one, that amazingly, I did
not see before.

MFC after:  1 week

14 years agoAdd ttydisc_rint_simple().
ed [Sun, 23 Aug 2009 08:04:40 +0000 (08:04 +0000)]
Add ttydisc_rint_simple().

I noticed several drivers in our tree don't actually care about parity
and framing, such as pts(4), snp(4) (and my partially finished console
driver). Instead of duplicating a lot of code, I think we'd better add a
utility function for those drivers to quickly process a buffer of input.

Also change pts(4) and snp(4) to use this function.

14 years agoFix typo in comment that has been bugging me for days.
julian [Sun, 23 Aug 2009 07:59:28 +0000 (07:59 +0000)]
Fix typo in comment that has been bugging me for days.

MFC after: 1 week

14 years agoAdd claraifications to the kproc and kthread manpages and link
julian [Sun, 23 Aug 2009 07:48:11 +0000 (07:48 +0000)]
Add claraifications to the kproc and kthread manpages and link
the kthread_create(9) man page to the kproc(9) page as it had migrated and
people looking for it may need a hand to find its new name.

MFC after: 1 week

14 years agoUse US spellings, fix typos.
jkoshy [Sun, 23 Aug 2009 07:32:30 +0000 (07:32 +0000)]
Use US spellings, fix typos.

14 years agoFix typos.
jkoshy [Sun, 23 Aug 2009 07:31:10 +0000 (07:31 +0000)]
Fix typos.

14 years agoFix a typo.
jkoshy [Sun, 23 Aug 2009 07:30:12 +0000 (07:30 +0000)]
Fix a typo.

14 years agoFix typos, use American English spellings.
jkoshy [Sun, 23 Aug 2009 07:29:34 +0000 (07:29 +0000)]
Fix typos, use American English spellings.

14 years agoFix typos.
jkoshy [Sun, 23 Aug 2009 07:24:39 +0000 (07:24 +0000)]
Fix typos.

14 years agoUpdate name of INDEX file as part of 8.0 -> 9.0 transition.
kensmith [Sun, 23 Aug 2009 06:30:14 +0000 (06:30 +0000)]
Update name of INDEX file as part of 8.0 -> 9.0 transition.

14 years agoCorrect typos.
jkoshy [Sun, 23 Aug 2009 06:22:31 +0000 (06:22 +0000)]
Correct typos.

14 years agoCorrect grammar.
jkoshy [Sun, 23 Aug 2009 06:19:02 +0000 (06:19 +0000)]
Correct grammar.

14 years agoFix the typo mentioned in the PR, and one additional.
dougb [Sun, 23 Aug 2009 05:56:54 +0000 (05:56 +0000)]
Fix the typo mentioned in the PR, and one additional.
Fix caps while I'm here.

PR: conf/138087
Submitted by: Chris Petrik <c.petrik.sosa@gmail.com>

14 years agoFix a typo.
jkoshy [Sun, 23 Aug 2009 05:49:12 +0000 (05:49 +0000)]
Fix a typo.

Reported by: John McCullough <jmccullo at cs.ucsd.edu>

14 years agoFix typos.
jkoshy [Sun, 23 Aug 2009 05:47:33 +0000 (05:47 +0000)]
Fix typos.

Reported by: Harald Servat <redcrash at gmail dot com>

14 years agoMove is_wired_interface() from rc.d/wpa_supplicant into network.subr,
dougb [Sun, 23 Aug 2009 05:47:19 +0000 (05:47 +0000)]
Move is_wired_interface() from rc.d/wpa_supplicant into network.subr,
simplify it a bit, and make use of that method to determine if an
interface is a candidate for IPv6 rtsol rather than listing all of the
possible wireless interfaces that should _not_ get rtsol'ed.

This change is only relevant for 8.0+ unless the "wlan mandatory" code
gets ported back to RELENG_7.

14 years agoThe svnversion string is only relevant when newvers.sh is called
dougb [Sun, 23 Aug 2009 05:45:38 +0000 (05:45 +0000)]
The svnversion string is only relevant when newvers.sh is called
during the kernel build process, the other places that call the script
do not make use of that information. So restrict execution of the
svnversion-related code to the kernel build context.

14 years agoAdd a script to create the /var/db/mergemaster.mtree file for new
dougb [Sun, 23 Aug 2009 05:42:50 +0000 (05:42 +0000)]
Add a script to create the /var/db/mergemaster.mtree file for new
releases so that when users subsequently update their source trees
they can make use of mergemaster's -U option.

14 years agoMake head 9.0-CURRENT in preparation for lifting code freeze.
kensmith [Sat, 22 Aug 2009 23:44:37 +0000 (23:44 +0000)]
Make head 9.0-CURRENT in preparation for lifting code freeze.

Approved by: re (implicit)

14 years agoFix ipfw's initialization functions to get the correct order of evaluation
julian [Fri, 21 Aug 2009 11:20:10 +0000 (11:20 +0000)]
Fix ipfw's initialization functions to get the correct order of evaluation
to allow vnet and non vnet operation. Move some functions from ip_fw_pfil.c
to ip_fw2.c and mode to mostly using the SYSINIT and VNET_SYSINIT handlers
instead of the modevent handler. Correct some spelling errors in comments
in the affected code. Note this bug fixes a crash in NON VIMAGE kernels when
ipfw is unloaded.

This patch is a minimal patch for 8.0
I have a much larger patch that actually fixes the underlying problems
that will be applied after 8.0

Reviewed by: zec@, rwatson@, bz@(earlier version)
Approved by: re (rwatson)
MFC after: Immediatly

14 years agoBugfix: all requests for creating vnets via vimage -c were always
zec [Fri, 21 Aug 2009 11:13:56 +0000 (11:13 +0000)]
Bugfix: all requests for creating vnets via vimage -c were always
reported as failures, even if the actual library / system call
would succeed, because error message would be reported if the return
value from jail_setv() call was >= 0, and if not, then if that same
value was < 0, i.e. always.  The correct behavior is to abort (only)
if jail_setv() returns < 0.

Approved by: re (rwatson), julian (mentor)

14 years agoDon't allow access to the internals until it has all been set up.
julian [Fri, 21 Aug 2009 09:22:32 +0000 (09:22 +0000)]
Don't allow access to the internals until it has all been set up.
Specifically, not until the per-vnet parts have been set up.

Submitted by: kmacy@
Reviewed by: julian@, zec@
Approved by: re(rwatson)
MFC after: immediately

14 years agoThis patch fixes two bugs in sglist(9) and improves robustness of the API via
jhb [Fri, 21 Aug 2009 02:59:07 +0000 (02:59 +0000)]
This patch fixes two bugs in sglist(9) and improves robustness of the API via
better semantics if a request to append an address range to an existing list
fails.
- When cloning an sglist, properly set the length in the new sglist instead of
  leaving the new list empty.
- Properly compute the amount of data added to an sglist via
  _sglist_append_buf().  This allows sglist_consume_uio() to properly update
  uio_resid.
- When a request to append an address range to a scatter/gather list fails,
  restore the sglist to the state it had at the start of the function call
  instead of resetting it to an empty list.

Requested by: np (3)
Approved by: re (kib)

14 years agoFix a boot hang for hptrr(4) caused by changes introduced in r195534.
kensmith [Fri, 21 Aug 2009 01:00:15 +0000 (01:00 +0000)]
Fix a boot hang for hptrr(4) caused by changes introduced in r195534.
It is necessary to make sure cpi->transport is set for xpt_scan_bus() to
work properly.

Submitted by: Bernhard Schmidt (scb+freebsd-current <at> techwires
              <dot> net)
Reviewed by:  scottl
Approved by:  re (kib)

14 years agoCheck whether the SMBIOS reports reasonable amount of memory. If it is
jkim [Thu, 20 Aug 2009 22:58:05 +0000 (22:58 +0000)]
Check whether the SMBIOS reports reasonable amount of memory.  If it is
less than "avail memory", fall back to Maxmem to avoid user confusion.
We use SMBIOS information to display "real memory" since r190599 but
some broken SMBIOS implementation reported only half of actual memory.

Tested by: bz
Approved by: re (kib)

14 years agoFix signed comparison bug when ticks goes negative after 24 days of
peter [Thu, 20 Aug 2009 22:53:28 +0000 (22:53 +0000)]
Fix signed comparison bug when ticks goes negative after 24 days of
uptime.  This causes the tcp time_wait state code to fail to expire
sockets in timewait state.

Approved by: re (kensmith)

14 years agovimage(8) is a legacy CLI interface for managing jails associated with
zec [Thu, 20 Aug 2009 22:39:20 +0000 (22:39 +0000)]
vimage(8) is a legacy CLI interface for managing jails associated with
network stack instances, which is provided for compatibility with
older applications.  This change brings it back to life in a followup
to the initial conversion of vimage to use the new jail(4)
userland-kernel API:

- when creating vimages via "vimage -c", by default turn on a few
options expected by legacy applications, such as allow operations on
raw sockets, FS mounts etc, and allow jail-related parameters to be
optionally configured.

- introduce the "-m" modifier which allows for configuring jail
parameters of existing vimages / vnet-jails.

- make "vimage name command ..." actually work.

- when reassigning ifnets to vnets using "vimage -i", attempt to rename
the ifnet as "ethXXX" on arrival in the target vnet.  Several legacy
applications are known to depend heavily on such behavior.

- vimage -l lists only jails associated with vnets.  The output is
sorted using vimage / jail names as keys.

- vimage -l by default searches only the current level in the jail
hierarchy.  Recursive listing can be requested via -r switch.

- vimage -l by default prints only jail names on each line, making
such output suitable for pipelining to other commands.  More verbose
output can be obtained via -v switch, and even more jail specific
information will be displayed if -j switch is turned on.

- there's no need to build vimage as statically linked, so update the
Makefile accordingly.

- update the vimage.8 man page.

Approved by: re (rwatson), julian (mentor)
MFC after: immediately

14 years agoChange the 'resid' parameter to sglist_consume_uio() from an int to a
jhb [Thu, 20 Aug 2009 19:23:58 +0000 (19:23 +0000)]
Change the 'resid' parameter to sglist_consume_uio() from an int to a
size_t to match the recent type change of the uio_resid member of struct
uio.

Approved by: re (kib)

14 years agoTemporarily revert the new-bus locking for 8.0 release. It will be
jhb [Thu, 20 Aug 2009 19:17:53 +0000 (19:17 +0000)]
Temporarily revert the new-bus locking for 8.0 release.  It will be
reintroduced after HEAD is reopened for commits by re@.

Approved by: re (kib), attilio

14 years agofstat: fix fsid comparison when executed on systems with 64-bit long
avg [Thu, 20 Aug 2009 10:57:14 +0000 (10:57 +0000)]
fstat: fix fsid comparison when executed on systems with 64-bit long

This affects only fstat on zfs and devfs, only on 64-bit systems
and only when fsid is greater than 2^31 - 1.
When fstat examines a file via stat(2) it takes uint32_t st_dev
and assigns to (signed) (64-bit) long fsid, this results in
a positive value.
When fstat examines opened files it takes int32_t f_fsid.val[0]
and assigns to (signed) (64-bit) long fsid, this results in
a negative value.
So, while initially st_dev and f_fsid.val[0] have the same bit
values they get promoted to different 64-bit values because
of the signed-vs-unsigned difference.

A fix is to use "more natural" positive numbers by introducing
intermediate unsigned cast for f_fsid.val[0].

Reviewed by: jhb, lulf
Approved by: re (kib)
MFC after: 1 week (to stable/7)

14 years agoFix CARP memory leaks on carp_if's malloc'd using M_CARP. This occurs when
will [Thu, 20 Aug 2009 02:33:12 +0000 (02:33 +0000)]
Fix CARP memory leaks on carp_if's malloc'd using M_CARP.  This occurs when
CARP tries to free them using M_IFADDR after the last address for a virtual
host is removed and when detaching from the parent interface.

Reviewed by: mlaier
Approved by: re (kib), ken (mentor)

14 years agoOur libc doesn't implement control method for XDR (only kernel does) and it
pjd [Thu, 20 Aug 2009 00:05:29 +0000 (00:05 +0000)]
Our libc doesn't implement control method for XDR (only kernel does) and it
will always return failure. Fix this by bringing userland implementation of
xdrmem_control() back. This allow 'zpool import' to work again.

Reported by: Thomas Backman <serenity@exscape.org>
Reviewed by: kmacy
Approved by: re (kib)

14 years agoAdd support for backing up the old kernel when installing a new kernel
simon [Wed, 19 Aug 2009 20:47:31 +0000 (20:47 +0000)]
Add support for backing up the old kernel when installing a new kernel
using freebsd-update.  This applies to using freebsd-update in "upgrade
mode" and normal freebsd-update on a security branch.

The backup kernel will be written to /boot/kernel.old, if the directory
does not exist, or the directory was created by freebsd-update in a
previous backup.  Otherwise freebsd-update will generate a new directory
name for use by the backup.  By default symbol files are not backed up
to save diskspace and avoid filling up the root partition.

This feature is fully configurable in the freebsd-update config file,
but defaults to enabled.

MFC after: 1 week (stable/7)
Reviewed by: cperciva
Approved by: re (kib)

14 years agoMake the MacBookPro3,1 hardware boot again.
ed [Wed, 19 Aug 2009 20:39:33 +0000 (20:39 +0000)]
Make the MacBookPro3,1 hardware boot again.

Tested by: Patrick Lamaiziere <patfbsd davenulle org>
Approved by: re (kib)

14 years agoThis change fixes a comment and addresses a complaint by kib@ by
kmacy [Wed, 19 Aug 2009 20:13:09 +0000 (20:13 +0000)]
This change fixes a comment and addresses a complaint by kib@ by
moving a frequently executed flowtable syslog statement from being
conditional on bootverbose to conditional on a per-vnet flowtable
sysctl.

Approved by: re@

14 years agoTemporarily enhance em(4) and igb(4) hack to take account for IFF_NOARP.
delphij [Wed, 19 Aug 2009 17:59:41 +0000 (17:59 +0000)]
Temporarily enhance em(4) and igb(4) hack to take account for IFF_NOARP.
Without this changeset there will be no way to prevent these NICs from
sending ARP, which is harmful in server farms that is configured as
"Direct Server Return" behind a load balancer.

A better fix would remove the whole hack completely but it would be
later than 8.0-RELEASE.

Reviewed by: jfv, yongari
Approved by: re (kib)

14 years agoRemove the dependency on the kernel -- in particular the gctl request to
marcel [Wed, 19 Aug 2009 16:29:20 +0000 (16:29 +0000)]
Remove the dependency on the kernel -- in particular the gctl request to
the GEOM_BSD class -- to translate the absolute offsets in the label to
relative ones. This makes bslabel(8) work correctly with GEOM_PART and
also when the BSD label is nested under arbitrary partitioning schemes.

Inspired by: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
Approved by: re (kib)

14 years agoExplicitly line up the CPU state labels with the calculated starting column
jhb [Wed, 19 Aug 2009 15:17:13 +0000 (15:17 +0000)]
Explicitly line up the CPU state labels with the calculated starting column
that takes into account the width of the largest CPU ID.  On systems with
> 10 CPUs the labels for the first 10 CPUs were not lined up properly
otherwise.

Approved by: re (kib)
MFC after: 1 week

14 years agoFix USB cache sync operations for platforms with non-coherent DMA.
raj [Wed, 19 Aug 2009 14:39:08 +0000 (14:39 +0000)]
Fix USB cache sync operations for platforms with non-coherent DMA.

- usb_pc_cpu_invalidate() is called between [consecutive] reads from a device,
  so a sequence of BUS_DMASYNC_POSTREAD and _PREREAD should be used. Note we
  cannot use or'ed shorthand ( _POSTREAD | _PREREAD) for BUS_DMASYNC flags, as
  the low level bus dma sync operation is implementation dependent and we
  cannot assume the required order of operations to be guaranteed.

- usb_pc_cpu_flush() is called before writing to a device, so
  BUS_DMASYNC_PREWRITE should be used.

Submitted by: Grzegorz Bernacki
Reviewed by: HPS, arm@, usb@ ML
Tested by: HPS, Mike Tancsa
Approved by: re (kib)
Obtained from: Semihalf

14 years agoSmall changes to the warning message generated by pty(4):
ed [Wed, 19 Aug 2009 14:30:46 +0000 (14:30 +0000)]
Small changes to the warning message generated by pty(4):

- Only print the warning once, instead of filling up the screen.
- Use the word "legacy" for the pty_warningcnt description, to prevent
  confusion.
- Use log() instead of printf().

Discussed with: rwatson, jhb
Approved by: re (kib)

14 years agoFix a bug in the handling of unreliable messages
tuexen [Wed, 19 Aug 2009 12:02:28 +0000 (12:02 +0000)]
Fix a bug in the handling of unreliable messages
which results in stalled associations.

Approved by: re, rrs (mentor)
MFC after: immediately

14 years ago- Make note of the update of tzdata from 2008h to 2009j
edwin [Wed, 19 Aug 2009 03:52:15 +0000 (03:52 +0000)]
- Make note of the update of tzdata from 2008h to 2009j
- Make note of the update of tzcode from 2004a to 2009h
  Add an extra alert that people who update via source or via
  freebsd-update will have to run the tzsetup(8) utility.

Approved by: re (Kostik)

14 years agoIf we cannot immediately get the pf_consistency_lock in the purge thread,
mlaier [Wed, 19 Aug 2009 00:10:10 +0000 (00:10 +0000)]
If we cannot immediately get the pf_consistency_lock in the purge thread,
restart the scan after acquiring the lock the hard way.  Otherwise we might
end up with a dead reference.

Reported by: pfsense
Reviewed by: eri
Initial patch by: eri
Tested by: pfsense
Approved by: re (kib)

14 years ago- Do not try to reevaluate current RX production index on each
stas [Tue, 18 Aug 2009 21:07:39 +0000 (21:07 +0000)]
- Do not try to reevaluate current RX production index on each
  loop iteration as it can be updated by the card while we
  process the RX ring forcing us to process RX descriptors
  for which DMA synchronisation operation has not been
  performed.  This fixes the bug when bge(4) drops packets
  under high load.

Discussed with: yongari, marius
Approved by: re (kib)
MFC after: 1 week

14 years ago - change the interface to flowtable_lookup so that we don't rely on
kmacy [Tue, 18 Aug 2009 20:28:58 +0000 (20:28 +0000)]
 - change the interface to flowtable_lookup so that we don't rely on
   the mbuf for obtaining the fib index
 - check that a cached flow corresponds to the same fib index as the
   packet for which we are doing the lookup
 - at interface detach time flush any flows referencing stale rtentrys
   associated with the interface that is going away (fixes reported
   panics)
 - reduce the time between cleans in case the cleaner is running at
   the time the eventhandler is called and the wakeup is missed less
   time will elapse before the eventhandler returns
 - separate per-vnet initialization from global initialization
   (pointed out by jeli@)

Reviewed by: sam@
Approved by: re@

14 years agoBackout r193289. r193289 restored page select bits to previous
yongari [Tue, 18 Aug 2009 20:20:15 +0000 (20:20 +0000)]
Backout r193289. r193289 restored page select bits to previous
value instead of blindly resetting it to 0. However, it seems page
select bits of some 88E1116 PHY is initialized to invalid one such
that restoring page select bits after programming broke MII
register access. The correct solution would be reset page select
bits to 0 in PHY attach stage but it would require more testing.
Since we're in BETA stage such a change would be dangerous so just
back it out.
This change should fix nfe(4) breakage on NVIDIA MCP55.

Reported by: Ryan Rogers < webmaster <> doghouserepair dot com >
Sam Fourman Jr. < sfourman <> gmail dot com >
Tested by: Ryan Rogers < webmaster <> doghouserepair dot com >
Sam Fourman Jr. < sfourman <> gmail dot com >
Approved by: re (kib)

14 years agoFix a crash when using one-to-one stlye socket in non-blocking
tuexen [Tue, 18 Aug 2009 19:58:49 +0000 (19:58 +0000)]
Fix a crash when using one-to-one stlye socket in non-blocking
mode and there is no listening server.
PR: 137795
Approved by: re, rrs (mentor)
MFC after:immediately.

14 years agoRemove unused taskqueue_find() function.
pjd [Tue, 18 Aug 2009 13:55:48 +0000 (13:55 +0000)]
Remove unused taskqueue_find() function.

Reviewed by: dfr
Approved by: re (kib)

14 years agoDocument MAKE_DVD and xref svn in ports.
trhodes [Tue, 18 Aug 2009 12:24:27 +0000 (12:24 +0000)]
Document MAKE_DVD and xref svn in ports.

Approved by: re@ (kib)

14 years agoFix copy/paste bug, that requests data read during ATA device probe sequence
mav [Tue, 18 Aug 2009 09:27:17 +0000 (09:27 +0000)]
Fix copy/paste bug, that requests data read during ATA device probe sequence
for ATA_SETFEATURES/ATA_SF_SETXFER command which by definition transfers no
data. Most of controllers are irrelevant to this bug, but some nVidia's
doesn't.

Tested on: current@
Approved by: re (kib)

14 years agoFix iSCSI initiator and vpo driver operation, broken by CAM changes.
mav [Tue, 18 Aug 2009 08:46:54 +0000 (08:46 +0000)]
Fix iSCSI initiator and vpo driver operation, broken by CAM changes.

Reviewed by: scottl, Danny Braniss
Approved by: re (rwatson)

14 years agofix netboot issue by disabling flowtable lookups until initialization has been run
kmacy [Mon, 17 Aug 2009 19:09:28 +0000 (19:09 +0000)]
fix netboot issue by disabling flowtable lookups until initialization has been run

Reviewed by: rwatson@
Approved by: re@

14 years agoDocument the newly added SVNCMDARGS, SVNROOT, and SVNBRANCH variables.
jhb [Mon, 17 Aug 2009 17:09:14 +0000 (17:09 +0000)]
Document the newly added SVNCMDARGS, SVNROOT, and SVNBRANCH variables.

Approved by: re (kib)

14 years ago* Change the scope of the ASSERT_ATOMIC_LOAD() from a generic check to
attilio [Mon, 17 Aug 2009 16:17:21 +0000 (16:17 +0000)]
* Change the scope of the ASSERT_ATOMIC_LOAD() from a generic check to
  a pointer-fetching specific operation check. Consequently, rename the
  operation ASSERT_ATOMIC_LOAD_PTR().
* Fix the implementation of ASSERT_ATOMIC_LOAD_PTR() by checking
  directly alignment on the word boundry, for all the given specific
  architectures. That's a bit too strict for some common case, but it
  assures safety.
* Add a comment explaining the scope of the macro
* Add a new stub in the lockmgr specific implementation

Tested by: marcel (initial version), marius
Reviewed by: rwatson, jhb (comment specific review)
Approved by: re (kib)

14 years agoThe start of the EFI GPT partition in the PMBR can always be represented
marcel [Mon, 17 Aug 2009 16:16:46 +0000 (16:16 +0000)]
The start of the EFI GPT partition in the PMBR can always be represented
by CHS addressing. Don't define these fields as 0xff, but rather define
them correctly. This prevents boot problems on PCs where GPT is being
used.

PR: 115406
Submitted by: Kent Hauser <kent@khauser.net>
Approved by: re (kib)

14 years agoApply the same patch as r196205 for nfs_upgrade_lock() and
rmacklem [Mon, 17 Aug 2009 16:12:28 +0000 (16:12 +0000)]
Apply the same patch as r196205 for nfs_upgrade_lock() and
nfs_downgrade_lock() to the experimental nfs client.

Approved by: re (kensmith), kib (mentor)

14 years agoRemove the spx_usrreq.c mergeinfo from spx_reass.c. Future changes to
jhb [Mon, 17 Aug 2009 15:50:10 +0000 (15:50 +0000)]
Remove the spx_usrreq.c mergeinfo from spx_reass.c.  Future changes to
spx_usrreq.c won't be merged to spx_reass.c which is what this would help
with.

Approved by: re (blanket mergeinfo), rwatson

14 years agoFix parse() so that the partition to boot (load /boot/loader) from can
jhay [Mon, 17 Aug 2009 15:19:03 +0000 (15:19 +0000)]
Fix parse() so that the partition to boot (load /boot/loader) from can
be set. The syntax as printed in main() is used: 0:ad(0p3)/boot/loader

Reviewed by: jhb
Approved by: re (kib)

14 years agoPurge mergeinfo in sys/ that is either empty or a subset of the parent
jhb [Mon, 17 Aug 2009 14:38:59 +0000 (14:38 +0000)]
Purge mergeinfo in sys/ that is either empty or a subset of the parent
mergeinfo on sys/ itself.

Approved by: re (mergeinfo blanket)

14 years agoCorrect a critical accounting error in pmap_demote_pde(). Specifically,
kib [Mon, 17 Aug 2009 13:27:55 +0000 (13:27 +0000)]
Correct a critical accounting error in pmap_demote_pde().  Specifically,
when pmap_demote_pde() allocates a page table page to implement a
user-space demotion, it must increment the pmap's resident page count.
Not doing so, can lead to an underflow during address space termination
that causes pmap_remove() to exit prematurely, before it has destroyed
all of the mappings within the specified range.  The ultimate effect or
symptom of this error is an assertion failure in vm_page_free_toq()
because the page being freed is still mapped.

This error is only possible when superpage promotion is enabled.  Thus,
it only affects FreeBSD  versions greater than 7.2.

Tested by: pho, alc
Reviewed by: alc
Approved by: re (rwatson)
MFC after: 1 week

14 years agoFix a typo in ifdef mesh support. This would make mesh unworkable if
rpaulo [Mon, 17 Aug 2009 12:57:57 +0000 (12:57 +0000)]
Fix a typo in ifdef mesh support. This would make mesh unworkable if
TDMA support was compiled out.

Approved by: re (kib)

14 years agoCorrect typo in the previous commit.
pjd [Mon, 17 Aug 2009 10:20:22 +0000 (10:20 +0000)]
Correct typo in the previous commit.

Noticed by: pluknet <pluknet@gmail.com>
Approved by: re (kib, implicit)

14 years agogetcwd() (when __getcwd() fails) works by stating current directory, going up
pjd [Mon, 17 Aug 2009 10:00:18 +0000 (10:00 +0000)]
getcwd() (when __getcwd() fails) works by stating current directory, going up
(..), calling readdir and looking for previous directory inode.  In case of
.zfs/ directory this doesn't work, because .zfs/ is hidden by default, so it
won't be visible in readdir output.

Fix this by implementing VPTOCNP for snapshot directories, so __getcwd()
doesn't fail and getcwd() doesn't have to use readdir method.

This fixes /bin/pwd from within .zfs/snapshot/<name>/.

Suggested by: kib
Approved by: re (rwatson)

14 years agoManage asynchronous vnode release just like Solaris.
pjd [Mon, 17 Aug 2009 09:48:34 +0000 (09:48 +0000)]
Manage asynchronous vnode release just like Solaris.

Discussed with: kmacy
Approved by: re (kib)

14 years agoFix receive when dataset has no / in its name.
pjd [Mon, 17 Aug 2009 09:34:00 +0000 (09:34 +0000)]
Fix receive when dataset has no / in its name.

Submitted by: James R. Van Artsdalen <james-freebsd-current@jrv.org>
Approved by: re (kib)

14 years ago- Reduce z_teardown_lock lock scope a bit.
pjd [Mon, 17 Aug 2009 09:28:15 +0000 (09:28 +0000)]
- Reduce z_teardown_lock lock scope a bit.
- The error variable is int, not bool.
- Convert spaces to tabs where needed.

Approved by: re (kib)

14 years agoIf z_buf is NULL, we should free znode immediately.
pjd [Mon, 17 Aug 2009 09:25:37 +0000 (09:25 +0000)]
If z_buf is NULL, we should free znode immediately.

Noticed by: avg
Approved by: re (kib)

14 years ago- We need to recycle vnode instead of freeing znode.
pjd [Mon, 17 Aug 2009 09:21:39 +0000 (09:21 +0000)]
- We need to recycle vnode instead of freeing znode.

Submitted by: avg

- Add missing vnode interlock unlock.
- Remove redundant znode locking.

Approved by: re (kib)

14 years agoFix panic in zfs recv code. The last vnode (mountpoint's vnode) can have
pjd [Mon, 17 Aug 2009 09:13:22 +0000 (09:13 +0000)]
Fix panic in zfs recv code. The last vnode (mountpoint's vnode) can have
0 usecount.

Reported by: Thomas Backman <serenity@exscape.org>
Approved by: re (kib)

14 years agoRemove OpenSolaris taskq port (it performs very poorly in our kernel) and
pjd [Mon, 17 Aug 2009 09:01:20 +0000 (09:01 +0000)]
Remove OpenSolaris taskq port (it performs very poorly in our kernel) and
replace it with wrappers around our taskqueue(9).
To make it possible implement taskqueue_member() function which returns 1
if the given thread was created by the given taskqueue.

Approved by: re (kib)

14 years agoBecause taskqueue_run() can drop tq_mutex, we need to check if the
pjd [Mon, 17 Aug 2009 08:42:34 +0000 (08:42 +0000)]
Because taskqueue_run() can drop tq_mutex, we need to check if the
TQ_FLAGS_ACTIVE flag wasn't removed in the meantime, which means we missed a
wakeup.

Approved by: re (kib)

14 years ago- Fix a race where /dev/zfs control device is created before ZFS is fully
pjd [Mon, 17 Aug 2009 08:36:41 +0000 (08:36 +0000)]
- Fix a race where /dev/zfs control device is created before ZFS is fully
  initialized. Also destroy /dev/zfs before doing other deinitializations.
- Initialization through taskq is no longer needed and there is a race
  where one of the zpool/zfs command loads zfs.ko and tries to do some work
  immediately, but /dev/zfs is not there yet.

Reported by: pav
Approved by: re (kib)

14 years agoRemove files that are no longer used.
pjd [Mon, 17 Aug 2009 08:03:02 +0000 (08:03 +0000)]
Remove files that are no longer used.

Discussed with: kmacy
Approved by: re (kib)

14 years agoBe more precise how to get fsids - 'mount -v' doesn't show fsids unless is run
pjd [Mon, 17 Aug 2009 07:38:47 +0000 (07:38 +0000)]
Be more precise how to get fsids - 'mount -v' doesn't show fsids unless is run
by root.

Approved by: re (kib)

14 years agoUpdate the mptutil man page for FreeBSD 8.0
scottl [Mon, 17 Aug 2009 06:15:44 +0000 (06:15 +0000)]
Update the mptutil man page for FreeBSD 8.0

Approved by: re

14 years agoUpdate the man page for manual section 8
scottl [Mon, 17 Aug 2009 06:15:08 +0000 (06:15 +0000)]
Update the man page for manual section 8

Approved by: re

14 years agoUpdate the man page for FreeBSD 8.0
scottl [Mon, 17 Aug 2009 06:11:30 +0000 (06:11 +0000)]
Update the man page for FreeBSD 8.0

Approved by: re

14 years agoMove mfiutil.1 to mfiutil.8 for consistency. Remove superfulous README.
scottl [Mon, 17 Aug 2009 06:05:55 +0000 (06:05 +0000)]
Move mfiutil.1 to mfiutil.8 for consistency.  Remove superfulous README.

Approved by: re

14 years agoEmit a proper error message instead of dumping core when 1)
marcel [Sun, 16 Aug 2009 21:27:35 +0000 (21:27 +0000)]
Emit a proper error message instead of dumping core when 1)
GEOM_PART does not exist in the kernel, and 2) the GEOM in
question does not exist.
Additionally abort in case of programming errors that result
in neither the class nor geom not being present in the gctl
request.

Submitted by: "Andrey V. Elsukov" <bu7cher@yandex.ru>
Approved by: re (kib)

14 years agoFix small style regression introduced by the MPSAFE newbus code.
ed [Sun, 16 Aug 2009 19:55:53 +0000 (19:55 +0000)]
Fix small style regression introduced by the MPSAFE newbus code.

Approved by: re (rwatson)

14 years agoChange the usb workers from kernel processes to threads, this is mostly a
thompsa [Sun, 16 Aug 2009 14:13:55 +0000 (14:13 +0000)]
Change the usb workers from kernel processes to threads, this is mostly a
cosmetic change to reduce cruft in the proc table.

Also change the idle wait message to `-` like how taskqueues are.

Reviewed by: julian
Approved by: re (kib)

14 years agoPrevent sysinstall from needlessly waiting for confirmation when using an USB
rink [Sun, 16 Aug 2009 10:11:33 +0000 (10:11 +0000)]
Prevent sysinstall from needlessly waiting for confirmation when using an USB
device in non-interactive mode.

If there are no USB devices, sysinstall gives an error messages, and if there
is >1, it'll ask which one is to be used. This change allows a non-interactive
install from USB media to succeed without any user interaction if there is
exactly one USB disk device in the system it can use.

Submitted by: Daniel O'Connor < doconnorat gsoft dot com dot au >
Reviewed by: randi
Approved by: re (rwatson)

14 years agoFix misalignment in nvpair_native_embedded() caused by the compiler
marcel [Sun, 16 Aug 2009 01:48:46 +0000 (01:48 +0000)]
Fix misalignment in nvpair_native_embedded() caused by the compiler
replacing the bzero(). See also revision 195627, which fixed the
misalignment in nvpair_native_embedded_array().

Approved by: re (kensmith)