]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoMFprojects/hid:
mav [Wed, 28 Sep 2011 14:52:25 +0000 (14:52 +0000)]
MFprojects/hid:
Import the rest of HID improvements from the branch:
 - improve report descriptor parser in libusbhid to handle several kinds of
reports same time;
 - add to the libusbhid API two functions wrapping respective kernel IOCTLs
for reading and writing reports;
 - tune uhid IOCTL interface to allow reading and writing arbitrary report,
when multiple supported by the device;
 - teach usbhidctl to set output and feature reports;
 - make usbhidaction support all the same item names as bhidctl.

Sponsored by: iXsystems, inc.

12 years agoUse the explicitly-sized types for the dirty and valid masks.
kib [Wed, 28 Sep 2011 14:51:28 +0000 (14:51 +0000)]
Use the explicitly-sized types for the dirty and valid masks.

Requested by: attilio
Reviewed by: alc
MFC after: 2 weeks

12 years agoPass the fibnum where we need filtering of the message on the
bz [Wed, 28 Sep 2011 13:48:36 +0000 (13:48 +0000)]
Pass the fibnum where we need filtering of the message on the
rtsock allowing routing daemons to filter routing updates on an
rtsock per FIB.

Adjust raw_input() and split it into wrapper and a new function
taking an optional callback argument even though we only have one
consumer [1] to keep the hackish flags local to rtsock.c.

PR: kern/134931
Submitted by: multiple (see PR)
Suggested by: rwatson [1]
Reviewed by: rwatson
MFC after: 3 days

12 years agoCorrect typo.
pjd [Wed, 28 Sep 2011 13:25:27 +0000 (13:25 +0000)]
Correct typo.

MFC after: 3 days

12 years agoIf the underlying provider doesn't support BIO_FLUSH, log it only once
pjd [Wed, 28 Sep 2011 13:19:47 +0000 (13:19 +0000)]
If the underlying provider doesn't support BIO_FLUSH, log it only once
and don't bother trying in the future.

MFC after: 3 days

12 years agoBreak a bit earlier.
pjd [Wed, 28 Sep 2011 13:13:43 +0000 (13:13 +0000)]
Break a bit earlier.

MFC after: 3 days

12 years agoAfter every activemap change flush disk's write cache, so that write
pjd [Wed, 28 Sep 2011 13:08:51 +0000 (13:08 +0000)]
After every activemap change flush disk's write cache, so that write
reordering won't make the actual write to be committed before marking
the coresponding extent as dirty.

It can be disabled in configuration file.

If BIO_FLUSH is not supported by the underlying file system we log a warning
and never send BIO_FLUSH again to that GEOM provider.

MFC after: 3 days

12 years agoRemove assertion that prevents zfs rename of datasets with mountpoint=none
mm [Wed, 28 Sep 2011 11:57:10 +0000 (11:57 +0000)]
Remove assertion that prevents zfs rename of datasets with mountpoint=none
or mountpoint=legacy that have children datasets. This also fixes dataset
rename when receiving incremental snapshots as reported on freebsd-fs@

This assertion was made triggerable by opensolaris change #10196.

PR: bin/160400
Reviewed by: pjd
MFC after: 1 week

12 years agoFix handling of corrupt compress(1)ed data. [11:04]
bz [Wed, 28 Sep 2011 08:47:17 +0000 (08:47 +0000)]
Fix handling of corrupt compress(1)ed data. [11:04]

Add missing length checks on unix socket addresses. [11:05]

Approved by: so (cperciva)
Approved by: re (kensmith)
Security: FreeBSD-SA-11:04.compress
Security: CVE-2011-2895 [11:04]
Security: FreeBSD-SA-11:05.unix

12 years agoDon't bother triggering the cabq queue if it's empty.
adrian [Wed, 28 Sep 2011 03:11:51 +0000 (03:11 +0000)]
Don't bother triggering the cabq queue if it's empty.

Obtained from: Atheros

12 years agoFix lock order to be correcter.
adrian [Wed, 28 Sep 2011 03:07:51 +0000 (03:07 +0000)]
Fix lock order to be correcter.

Nothing else locks these two queues (cabq, avp mcastq), but it should
be consistent and correct.

12 years agoChange the default CABQ time to be 70% of the beacon interval,
adrian [Wed, 28 Sep 2011 03:05:04 +0000 (03:05 +0000)]
Change the default CABQ time to be 70% of the beacon interval,
rather than the whole beacon interval.

The reference driver and Linux ath9k both choose 80% of the
beacon interval and they do it in the driver rather than
the HAL (Ath reference) or ath9k_hw (ath9k.)

This quietens stuck beacon conditions on my AR9220/AR9280
based NICs when a lot of burst broadcast/multicast traffic
is going on. It doesn't seem to annoy the earlier MACs as
much as the AR9280 and later one.

Obtained from: Linux ath9k, Atheros

12 years agoThe AR5212 setup path (also used by the AR5416 code) configures a
adrian [Wed, 28 Sep 2011 03:03:23 +0000 (03:03 +0000)]
The AR5212 setup path (also used by the AR5416 code) configures a
local variable with a beacon interval of 100 TU. This never gets modified
if the beacon interval configuration changes.

This may have been correct in earlier times, but with the advent of
staggered beacons (which default to 1 / ATH_BCBUF beacon interval, so
25 TU here) this value is incorrect.

It is used to configure the default CABQ readytime. So here, the cabq
was being configured to be much greater than the target beacon timer
(TBTT.)

The driver should be configuring a cabq readytime value rather then
leaving it to the HAL to choose sensible defaults. This should be
done in the future - I'm simply trying to ensure sensible defaults
are chosen.

12 years agoUpdate the default AIFS value for hostap mode.
adrian [Wed, 28 Sep 2011 02:54:42 +0000 (02:54 +0000)]
Update the default AIFS value for hostap mode.

Obtained from: Linux ath9k, Atheros reference

12 years agoDon't force active mode FTP.
des [Tue, 27 Sep 2011 19:54:58 +0000 (19:54 +0000)]
Don't force active mode FTP.

12 years agoDocument the fact that passive mode is now the default.
des [Tue, 27 Sep 2011 19:02:44 +0000 (19:02 +0000)]
Document the fact that passive mode is now the default.
Update copyright dates and strip my middle name.

12 years agoUpdate copyright dates and strip my middle name.
des [Tue, 27 Sep 2011 18:57:26 +0000 (18:57 +0000)]
Update copyright dates and strip my middle name.

12 years agoBump date.
des [Tue, 27 Sep 2011 18:53:35 +0000 (18:53 +0000)]
Bump date.

12 years agoThink first, commit second.
des [Tue, 27 Sep 2011 18:42:09 +0000 (18:42 +0000)]
Think first, commit second.

1. Allow the caller to select active mode.
2. Fix the envar logic so it *always* overrides the caller's flags.
3. Document the change from active to passive.

12 years agoLong overdue: make passive mode the default for ftp.
des [Tue, 27 Sep 2011 18:23:58 +0000 (18:23 +0000)]
Long overdue: make passive mode the default for ftp.

12 years agoWhen script(1) reads EOF from input it starts spinning on zero-byte
trociny [Tue, 27 Sep 2011 18:14:04 +0000 (18:14 +0000)]
When script(1) reads EOF from input it starts spinning on zero-byte
reads eating 100% CPU. Fix this by skipping select on STDIN after
reading EOF -- permanently if STDIN is not terminal and for one second
if it is.

Also after reading EOF from STDIN we have to pass it to the program
being scripted. The previous approach was to write zero bytes into the
pseudo-terminal. This does not work because zero-byte write does not
have any effect on read. Fix this by sending VEOF instead.

Submitted by: Ronald Klop <ronald-freebsd8@klop.yi.org>
Discussed with: kib, Chris Torek <chris.torek@gmail.com>
Approved by: kib
MFC after: 1 week

12 years agoFix grammar.
schweikh [Tue, 27 Sep 2011 17:54:10 +0000 (17:54 +0000)]
Fix grammar.

PR: 140457
Submitted by: jeremyhu AT apple.com
MFC after: 2 weeks

12 years agoThis update eliminates a lock-order reversal warning discovered
mckusick [Tue, 27 Sep 2011 17:41:48 +0000 (17:41 +0000)]
This update eliminates a lock-order reversal warning discovered
whle tracking down the system hang reported in kern/160662 and
corrected in revision 225806. The LOR is not the cause of the system
hang and indeed cannot cause an actual deadlock. However, it can
be easily eliminated by defering the acquisition of a buflock until
after all the vnode locks have been acquired.

Reported by:     Hans Ottevanger
PR:              kern/160662

12 years agoThis update eliminates the system hang reported in kern/160662 when
mckusick [Tue, 27 Sep 2011 17:34:02 +0000 (17:34 +0000)]
This update eliminates the system hang reported in kern/160662 when
taking a snapshot on a filesystem running with journaled soft updates.

Reported by:     Hans Ottevanger
Fix verified by: Hans Ottevanger
PR:              kern/160662

12 years agoUse fseeko() instead of fseek(). The rest of the code is off_t-aware,
des [Tue, 27 Sep 2011 17:11:31 +0000 (17:11 +0000)]
Use fseeko() instead of fseek().  The rest of the code is off_t-aware,
but the use of fseek() means fetch(1) can't correctly resume a transfer
that was interrupted past the 2 GB mark.

Pointed out by: ache@
MFC after: 3 weeks

12 years agoAvoid accidental conflicts with C++ operator keywords.
jkim [Tue, 27 Sep 2011 16:33:17 +0000 (16:33 +0000)]
Avoid accidental conflicts with C++ operator keywords.

MFC after: 1 week

12 years agoFollowup to r225599: the fseek() was a no-op since the file was opened
des [Tue, 27 Sep 2011 15:57:13 +0000 (15:57 +0000)]
Followup to r225599: the fseek() was a no-op since the file was opened
in append mode.  Open it in read-write mode instead.  Also move the
fseek up one level to cover the (unlikely but not impossible) case where
the server accepts ranges but does not send a Content-Size header.

PR: bin/117277
MFC after: 3 weeks

12 years agoImprove battery capacity reporting
emaste [Tue, 27 Sep 2011 14:28:07 +0000 (14:28 +0000)]
Improve battery capacity reporting

When a status pointer is passed in mfi_dcmd_command does not return an
errno (if the ioctl is successful), so move the test for NO_HW_PRESENT
outside of the error case.  This should fix incorrect reporting for
systems with a dead or no battery.

Additionally, handle error codes other than NO_HW_PRESENT by omitting
the battery capacity display.  LSI's supercap-based parts (CV series)
report their data using the same interface as battery-based parts,
except that they do not include the capacity stats (state of charge,
cumulative charge cycles, etc.)

Reviewd by:   jhb, bz
Tested by:    pluknet@, Garrett Cooper
PR:           bin/160581
MFC after:    1 week

12 years agoRevert r225372:
attilio [Tue, 27 Sep 2011 13:42:11 +0000 (13:42 +0000)]
Revert r225372:
wdog_kern_pat() acquires eventhandler mutex, thus it cannot work in
kernel context (from where kdb_trap() runs).

The right way to fix this is both offering the
cpu-stop-on-panic-and-skip-locking logic and also a context for KDB
to officially run. We can re-enable this (or a similar) improvement
when these 2 patches hit the tree.

Sponsored by: Sandvine Incorporated
Discussed with: emaste, rstone
MFC after: immediately

12 years agoUnbreak no-ip and no-inet6 module builds with ipfw. For now continue to
bz [Tue, 27 Sep 2011 13:27:17 +0000 (13:27 +0000)]
Unbreak no-ip and no-inet6 module builds with ipfw.  For now continue to
build the ip_fw_pfil.c hooks and ipfw even in case of no-ip under the
assumption that the private L2 hook (which hopefully eventually will be a
pfil hook as well) can still be useful.

Allow building the module without inet as well.

Glanced at by: jhb
MFC after: 3 days

12 years agoDo not deliver SIGTRAP on exec as the normal signal, use ptracestop() on
kib [Tue, 27 Sep 2011 13:17:02 +0000 (13:17 +0000)]
Do not deliver SIGTRAP on exec as the normal signal, use ptracestop() on
syscall exit path. Otherwise, if SIGTRAP is ignored, that tdsendsignal()
do not want to deliver the signal, and debugger never get a notification
of exec.

Found and tested by: Anton Yuzhaninov <citrin citrin ru>
Discussed with: jhb
MFC after: 2 weeks

12 years agoInstall ciss(4) ioctl header (together with other .h files from sys/dev/ciss).
kib [Tue, 27 Sep 2011 12:14:43 +0000 (12:14 +0000)]
Install ciss(4) ioctl header (together with other .h files from sys/dev/ciss).

PR: kern/109813
Discussued with: Alex Samorukov <samm os2 kiev ua>
(smartmontools maintainer)
MFC after: 1 week

12 years agoAdd one more ID for the Marvell 88SE9128 6Gbps SATA controller.
mav [Tue, 27 Sep 2011 09:32:34 +0000 (09:32 +0000)]
Add one more ID for the Marvell 88SE9128 6Gbps SATA controller.

MFC after: 3 days

12 years agoFix interrupt counters dumping on SW_WATCHDOG fire.
mav [Tue, 27 Sep 2011 09:30:20 +0000 (09:30 +0000)]
Fix interrupt counters dumping on SW_WATCHDOG fire.

12 years agoUse PJDLOG_ASSERT() and PJDLOG_ABORT() everywhere instead of assert().
pjd [Tue, 27 Sep 2011 08:50:37 +0000 (08:50 +0000)]
Use PJDLOG_ASSERT() and PJDLOG_ABORT() everywhere instead of assert().

MFC after: 3 days

12 years agoNo need to wrap pjdlog functions around with KEEP_ERRNO() macro.
pjd [Tue, 27 Sep 2011 08:26:09 +0000 (08:26 +0000)]
No need to wrap pjdlog functions around with KEEP_ERRNO() macro.

MFC after: 3 days

12 years agoPrefer PJDLOG_ASSERT()/PJDLOG_ABORT() over assert().
pjd [Tue, 27 Sep 2011 08:21:00 +0000 (08:21 +0000)]
Prefer PJDLOG_ASSERT()/PJDLOG_ABORT() over assert().

MFC after: 3 days

12 years ago- Convert some impossible conditions into assertions.
pjd [Tue, 27 Sep 2011 08:04:01 +0000 (08:04 +0000)]
- Convert some impossible conditions into assertions.
- Add missing 'if' in comment.

MFC after: 3 days

12 years agoCorrect two mistakes when converting asserts to PJDLOG_ASSERT()/PJDLOG_ABORT().
pjd [Tue, 27 Sep 2011 07:59:10 +0000 (07:59 +0000)]
Correct two mistakes when converting asserts to PJDLOG_ASSERT()/PJDLOG_ABORT().

MFC after: 3 days

12 years agoPrefer PJDLOG_ASSERT() and PJDLOG_ABORT() over assert() and abort().
pjd [Tue, 27 Sep 2011 07:57:15 +0000 (07:57 +0000)]
Prefer PJDLOG_ASSERT() and PJDLOG_ABORT() over assert() and abort().
pjdlog versions will log problem to syslog when application is running in
background.

MFC after: 3 days

12 years agoNo need to use KEEP_ERRNO() macro around pjdlog functions, as they don't
pjd [Tue, 27 Sep 2011 07:52:39 +0000 (07:52 +0000)]
No need to use KEEP_ERRNO() macro around pjdlog functions, as they don't
modify errno.

MFC after: 3 days

12 years ago- Add missing interdependencies to kerberos libraries. Some of the
stas [Tue, 27 Sep 2011 07:14:12 +0000 (07:14 +0000)]
- Add missing interdependencies to kerberos libraries.  Some of the
  kerberos libraries were not linked properly (missing dependencies),
  which causes 3rd party applications linking to fail when --as-needed
  ld flag is used.  I also added the --no-undefined ld(1) flag to make
  sure that there're no missing dependencies.

MFC after: 3 days

12 years agoAdd quirks for some USB mass storage devices which doesn't respond
hselasky [Tue, 27 Sep 2011 07:06:02 +0000 (07:06 +0000)]
Add quirks for some USB mass storage devices which doesn't respond
after trying to query the synchronize cache support.

Submitted by: Keith White
PR: usb/160911
Approved by: re (kensmith)
MFC after: 1 week

12 years agoFix typo in OSIOCGIFADDR.
pluknet [Tue, 27 Sep 2011 07:05:41 +0000 (07:05 +0000)]
Fix typo in OSIOCGIFADDR.

MFC after: 3 days

12 years ago- Move misplaced reference [1]
gabor [Tue, 27 Sep 2011 07:00:24 +0000 (07:00 +0000)]
- Move misplaced reference [1]
- Sort references [1]
- s/Since/Because/ [2]

Submitted by: arundel [1],
Chad Perrin <perrin@apotheon.com> [2]
MFC after: 3 days

12 years agoEnsure that pjdlog functions don't modify errno.
pjd [Tue, 27 Sep 2011 06:43:51 +0000 (06:43 +0000)]
Ensure that pjdlog functions don't modify errno.

MFC after: 3 days

12 years agoAdd myself to committers-src.dot.
rmh [Tue, 27 Sep 2011 05:30:52 +0000 (05:30 +0000)]
Add myself to committers-src.dot.

Approved by: kib (mentor)

12 years agoForgot to add "RELENG_8" to list of CVS tags.
kensmith [Mon, 26 Sep 2011 11:57:48 +0000 (11:57 +0000)]
Forgot to add "RELENG_8" to list of CVS tags.

Submitted by: Mamontov Roman <mr.xanto at gmail.com>
Approved by: re (implicit)

12 years agoShift head from 9.0-CURRENT to 10.0-CURRENT in preparation for releasing
kensmith [Mon, 26 Sep 2011 02:27:04 +0000 (02:27 +0000)]
Shift head from 9.0-CURRENT to 10.0-CURRENT in preparation for releasing
it from the 9.0-RELEASE release cycle code freeze.

Approved by: re (implicit)

12 years agoUpdate netfront so that it queries and honors published
gibbs [Wed, 21 Sep 2011 00:15:29 +0000 (00:15 +0000)]
Update netfront so that it queries and honors published
back-end features.

sys/dev/xen/netfront/netfront.c:
o Add xn_query_features() which reads the XenStore and
  records the TSO, LRO, and chained ring-request support
  of the backend.
o Rename xn_configure_lro() to xn_configure_features() and
  use this routine to manage the setup of TSO, LRO, and
  checksum offload.
o In create_netdev(), initialize if_capabilities and
  if_hwassist to the capabilities found on all backends.
  Delegate configuration of if_capenable and the TSO flag
  if if_hwassist to xn_configure_features().

Reported by: Hugo Silva (fix inspired by patch provided)
Approved by: re
MFC after: 1 week

12 years agoModify the netfront driver so it can successfully attach to
gibbs [Wed, 21 Sep 2011 00:13:04 +0000 (00:13 +0000)]
Modify the netfront driver so it can successfully attach to
PV devices with the ioemu attribute set.

sys/dev/xen/netfront/netfront.c:
o If a mac address for the interface cannot be found
  in the front-side XenStore tree, look for an entry
  in the back-side tree.  With ioemu devices, the
  emulator does not populate the front side tree and
  neither does Xend.
o Return an error rather than panic when an attach
  attempt fails.

Reported by: Janne Snabb (fix inspired by patch provided)
PR: kern/154302
Approved by: re

12 years agoCorrect suspend/resume support in the Netfront driver.
gibbs [Wed, 21 Sep 2011 00:08:25 +0000 (00:08 +0000)]
Correct suspend/resume support in the Netfront driver.

Sponsored by: BQ Internet

sys/dev/xen/netfront/netfront.c:
o Implement netfront_suspend(), a specialized suspend
  handler for the netfront driver.  This routine simply
  disables the carrier so the driver is idle during
  system suspend processing.
o Fix a leak when re-initializing LRO during a link reset.
o In netif_release_tx_bufs(), when cleaning up the grant
  references for our TX ring, use gnttab_end_foreign_access_ref
  instead of attempting to grant the page again.
o In netif_release_tx_bufs(), we do not track mbufs associated
  with mbuf chains, but instead just free each mbuf directly.
  Use m_free(), not m_freem(), to avoid double frees of mbufs.
o Refactor some code to enhance clarity.

Approved by: re
MFC after: 1 week

12 years ago[ Forced commit. Actual changes accidentally included in r225704 ]
gibbs [Wed, 21 Sep 2011 00:06:02 +0000 (00:06 +0000)]
[ Forced commit.  Actual changes accidentally included in r225704 ]

sys/dev/xen/control/control.c:
Fix locking violations in Xen HVM suspend processing
and have it perform similar actions to those performed
during an ACPI triggered suspend.

Sponsored by: BQ Internet
Approved by: re
MFC after: 1 week

12 years agoAdd suspend/resume support to the Xen blkfront driver.
gibbs [Wed, 21 Sep 2011 00:02:44 +0000 (00:02 +0000)]
Add suspend/resume support to the Xen blkfront driver.

Sponsored by: BQ Internet

sys/dev/xen/blkfront/block.h:
sys/dev/xen/blkfront/blkfront.c:
Remove now unused blkif_vdev_t from the blkfront soft.

sys/dev/xen/blkfront/blkfront.c:
o In blkfront_suspend(), indicate the desire to suspend
  by changing the softc connected state to SUSPENDED, and
  then wait for any I/O pending on the remote peer to
  drain.  Cancel suspend processing if I/O does not
  drain within 30 seconds.
o Enable and update blkfront_resume().  Since I/O is
  drained prior to the suspension of the VM, the complicated
  recovery process performed by other Xen blkfront
  implementations is avoided.  We simply tear down the
  connection to our old peer, and then re-connect.
o In blkif_initialize(), fix a resource leak and botched
  return if we cannot allocate shadow memory for our
  requests.
o In blkfront_backend_changed(), correct our response to
  the XenbusStateInitialised state.  This state indicates
  that our backend peer has published sufficient data for
  blkfront to publish ring information and other XenStore
  data, not that a connection can occur.  Blkfront now
  will only perform connection processing in response to
  the XenbusStateConnected state.  This corrects an issue
  where blkfront connected before the backend was ready
  during resume processing.

Approved by: re
MFC after: 1 week

12 years agoProperly handle suspend/resume events in the Xen device
gibbs [Tue, 20 Sep 2011 23:44:34 +0000 (23:44 +0000)]
Properly handle suspend/resume events in the Xen device
framework.

Sponsored by: BQ Internet

sys/xen/xenbus/xenbusb.c:
o In xenbusb_resume(), publish the state transition of the
  resuming device into XenbusStateIntiailising so that the
  remote peer can see it.  Recording the state locally is
  not sufficient to trigger a re-connect sequence.
o In xenbusb_resume(), defer new-bus resume processing until
  after the remote peer's XenStore address has been updated.
  The drivers may need to refer to this information during
  resume processing.

sys/xen/xenbus/xenbusb_back.c:
sys/xen/xenbus/xenbusb_front.c:
Register xenbusb_resume() rather than bus_generic_resume()
as the handler for device_resume events.

sys/xen/xenstore/xenstore.c:
o Fix grammer in a comment.
o In xs_suspend(), pass suspend events on to the child
  devices (e.g. xenbusb_front/back, that are attached
  to the XenStore.

Approved by: re
MFC after: 1 week

12 years agoUse nowait sync request for a vnode when doing softdep cleanup. We possibly
kib [Tue, 20 Sep 2011 21:53:26 +0000 (21:53 +0000)]
Use nowait sync request for a vnode when doing softdep cleanup. We possibly
own the unrelated vnode lock, doing waiting sync causes deadlocks.

Reported and tested by: pho
Approved by: re (bz)

12 years agoRestore the writing of the .bss sections of the dsos (not the main
kib [Tue, 20 Sep 2011 21:49:54 +0000 (21:49 +0000)]
Restore the writing of the .bss sections of the dsos (not the main
executable) after r190885. The whole region for the dso is mmaped with
MAP_NOCORE flag, doing only mprotect(2) over .bss prevented it from
writing .bss to core files.

Revert the optimization of using mprotect(2) to establish .bss, overlap
the section with mmap(2).

Reported by: attilio
Reviewed by: attilio, emaste
Approved by: re (bz)
MFC after: 2 weeks

12 years agoMake KBI changes required for future MFCing of inpcb rtentry / llentry caching.
kmacy [Tue, 20 Sep 2011 20:27:26 +0000 (20:27 +0000)]
Make KBI changes required for future MFCing of inpcb rtentry / llentry caching.

Reviewed by: rwatson, bz
Approved by: re (kib)

12 years agoAvoid starting the USB transfer if an error is already pending.
hselasky [Tue, 20 Sep 2011 14:17:58 +0000 (14:17 +0000)]
Avoid starting the USB transfer if an error is already pending.
This change fixes a race in device side mode during clear-stall from
host, which can cause data to be sent too early on the given
endpoint.

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

12 years agoManually set the channel when using monitor mode - the firmware
adrian [Tue, 20 Sep 2011 04:30:23 +0000 (04:30 +0000)]
Manually set the channel when using monitor mode - the firmware
doesn't select it automatically.

Submitted by: nox
Reviewed by: bschmidt
Approved by: re
PR: kern/160815

12 years agoUse REQUIRE: line to reorder rc.d/bridge instead of BEFORE: line.
hrs [Tue, 20 Sep 2011 00:37:35 +0000 (00:37 +0000)]
Use REQUIRE: line to reorder rc.d/bridge instead of BEFORE: line.

Pointed out by: dougb
Approved by: re (bz)

12 years agoRemove RA timer on an interface with !IFF_UP actively after starting to send
hrs [Tue, 20 Sep 2011 00:32:30 +0000 (00:32 +0000)]
Remove RA timer on an interface with !IFF_UP actively after starting to send
clean-up RA messages for shutting down.  The RA timers could prevent the rtadvd
daemon from shutting down because ra_output() just ignored !IFF_UP interfaces
and TRANSITIVE->UNCONFIGURED state transition never happened due to it.

Spotted by: kib
Approved by: re (bz)

12 years agoCopy ip6po_minmtu and ip6po_prefer_tempaddr in ip6_copypktopts(). This fixes
hrs [Tue, 20 Sep 2011 00:29:17 +0000 (00:29 +0000)]
Copy ip6po_minmtu and ip6po_prefer_tempaddr in ip6_copypktopts().  This fixes
inconsistency when options are specified by both setsockopt() and ancillary
data types.

PR: kern/158307
Approved by: re (bz)

12 years ago- Fix a trivial bug in iconv. When there is no space to perform the
gabor [Mon, 19 Sep 2011 22:49:36 +0000 (22:49 +0000)]
- Fix a trivial bug in iconv. When there is no space to perform the
  conversion, conversion must fail and errno must be set to E2BIG.

PR: standards/160673
Submitted by: Henning Petersen <henning.petersen@t-online.de>
Reviewed by: pluknet
Approved by: re (kib), delphij (mentor)

12 years agoDo not overallocate on the stack. Threaded code might use custom stack
kib [Mon, 19 Sep 2011 22:35:54 +0000 (22:35 +0000)]
Do not overallocate on the stack. Threaded code might use custom stack
size.

Reported by: many
Tested by: Jeremie Le Hen <jeremie@le-hen.org> (previous version)
Reviewed by: jilles
Approved by: re (bz)
MFC after: 2 weeks

12 years agoCleanup the iterator code, remove code that is never executed.
tuexen [Mon, 19 Sep 2011 21:47:20 +0000 (21:47 +0000)]
Cleanup the iterator code, remove code that is never executed.

Approved by: re
MFC after: 1 month.

12 years agoIt is safe to initialize locks even on early boot (and it is the same
attilio [Mon, 19 Sep 2011 18:29:15 +0000 (18:29 +0000)]
It is safe to initialize locks even on early boot (and it is the same
thing all the other architectures already do) thus just initialize
kernel_pmap in pmap_bootstrap().

Reported by: alc
Reviewed by: alc, marius
Tested by: flo, marius
Approved by: re (kib)
MFC after: 1 week

12 years ago- Document inet6 no_radr flag.
hrs [Mon, 19 Sep 2011 16:01:53 +0000 (16:01 +0000)]
- Document inet6 no_radr flag.
- Add descriptions of sysctl(8) variables which can control the default
  configuration of the inet6 flags.

Approved by: re (kib)

12 years ago- Document $ipv6_cpe_wanif.
hrs [Mon, 19 Sep 2011 16:00:55 +0000 (16:00 +0000)]
- Document $ipv6_cpe_wanif.
- Emphasize $ipv6_enable and $ipv6_prefer are deprecated.
- Add more detail descriptions about $ipv6_activate_all_interfaces.
- Add some more examples of $ifconfig_IF_ipv6.
- rtsold(8) and rtadvd(8) can be used even when ipv6_gateway_enable=NO now.

Approved by: re (kib)

12 years agoUse resolvconf(8) to create /etc/resolv.conf, not directly overwrite it.
hrs [Mon, 19 Sep 2011 15:56:50 +0000 (15:56 +0000)]
Use resolvconf(8) to create /etc/resolv.conf, not directly overwrite it.

Approved by: re (kib)

12 years agoFix the script order to run rc.d/bridge after the initial network
hrs [Mon, 19 Sep 2011 15:55:53 +0000 (15:55 +0000)]
Fix the script order to run rc.d/bridge after the initial network
interface configuration and before running network daemons.

Approved by: re (kib)

12 years ago#PROCHOT assertion is sticky after reading the MSR (accordingly with
attilio [Mon, 19 Sep 2011 10:58:30 +0000 (10:58 +0000)]
#PROCHOT assertion is sticky after reading the MSR (accordingly with
Intel manuals) it must be cleared by writing a 0.
Fix that.

Sponsored by: Sandvine Incorporated
Reported by: rstone
Reviewed by: delphij, emaste, rstone
Approved by: re (kib)
MFC after: 1 week

12 years agoImplement missing USB debug information functions.
hselasky [Mon, 19 Sep 2011 08:52:06 +0000 (08:52 +0000)]
Implement missing USB debug information functions.

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

12 years agoFix a logic bug in pc-sysinstall creating partitions.
jpaetzel [Mon, 19 Sep 2011 05:12:53 +0000 (05:12 +0000)]
Fix a logic bug in pc-sysinstall creating partitions.
Improve exit when an error occurs.
Fix parsing to grab values which contain extra '=' signs.
Fix a bug setting the timezone properly.
Fix a usage bug when setting up with gmirror.
Allow a uzip file from local media to be used.
Allow specifying flags for "newfs" when using UFS as the file system.
Run custom commands after doing final cleanup / fstab generation
and such. Also fix using relative path for config file.

Approved by: re (bz)

12 years agoBump .Dd date for previous revision.
delphij [Sat, 17 Sep 2011 22:53:05 +0000 (22:53 +0000)]
Bump .Dd date for previous revision.

Approved by: re (follow up commit fixing trivial issue)

12 years agoChange the example of using smbfs in fstab to a password-less one,
delphij [Sat, 17 Sep 2011 22:17:31 +0000 (22:17 +0000)]
Change the example of using smbfs in fstab to a password-less one,
which is less likely to block a remote system from boot.

Submitted by: Garrett Cooper <yanegomi@gmail.com>
PR: doc/160775
MFC after: 1 month
Approved by: re (kib)

12 years agoFix error handling bug that would prevent MAC structures from getting
trasz [Sat, 17 Sep 2011 20:48:49 +0000 (20:48 +0000)]
Fix error handling bug that would prevent MAC structures from getting
freed properly if resource limit got exceeded.

Approved by: re (kib)

12 years agoFix long-standing thinko regarding maxproc accounting. Basically,
trasz [Sat, 17 Sep 2011 19:55:32 +0000 (19:55 +0000)]
Fix long-standing thinko regarding maxproc accounting.  Basically,
we were accounting the newly created process to its parent instead
of the child itself.  This caused problems later, when the child
changed its credentials - the per-uid, per-jail etc counters were
not properly updated, because the maxproc counter in the child
process was 0.

Approved by: re (kib)

12 years agoClear transmit checksum offload context state upon lem(4) interface
rstone [Sat, 17 Sep 2011 13:48:09 +0000 (13:48 +0000)]
Clear transmit checksum offload context state upon lem(4) interface
initialization.  Prior to this change packets may be transmitted with an
incorrect checksum.

Em(4) already has an equivalent change in r213234.

Obtained From:  Sandvine
MFC After:      1 week
Approved by:    re (bz)

12 years agoInquire about terminal type if starting from a serial console and do
nwhitehorn [Sat, 17 Sep 2011 09:25:45 +0000 (09:25 +0000)]
Inquire about terminal type if starting from a serial console and do
not configure the host's networking if netbooted [1]. Also fix FTP
installations behind some firewalls [2].

PR: bin/159583 [2]
Reported by: stas [1]
Approved by: re (kib)

12 years agoFix the enabling/disabling of Heartbeats and path MTU
tuexen [Sat, 17 Sep 2011 08:50:29 +0000 (08:50 +0000)]
Fix the enabling/disabling of Heartbeats and path MTU
discovery when using the SCTP_PEER_ADDR_PARAMS socket option.
Approved by: re
MFC after: 1 month.

12 years agoAdd myself and connect me with my mentors
cs [Fri, 16 Sep 2011 22:57:50 +0000 (22:57 +0000)]
Add myself and connect me with my mentors

Approved by: re@, glarkin@

12 years agoAuto-generated code from sys_ prefixing makesyscalls.sh change
kmacy [Fri, 16 Sep 2011 14:04:14 +0000 (14:04 +0000)]
Auto-generated code from sys_ prefixing makesyscalls.sh change

Approved by: re(bz)

12 years agoIn order to maximize the re-usability of kernel code in user space this
kmacy [Fri, 16 Sep 2011 13:58:51 +0000 (13:58 +0000)]
In order to maximize the re-usability of kernel code in user space this
patch modifies makesyscalls.sh to prefix all of the non-compatibility
calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel
entry points and all places in the code that use them. It also
fixes an additional name space collision between the kernel function
psignal and the libc function of the same name by renaming the kernel
psignal kern_psignal(). By introducing this change now we will ease future
MFCs that change syscalls.

Reviewed by: rwatson
Approved by: re (bz)

12 years agoRemove the svn:keywords property and restore the historical $FreeBSD$ tag.
des [Fri, 16 Sep 2011 11:14:10 +0000 (11:14 +0000)]
Remove the svn:keywords property and restore the historical $FreeBSD$ tag.

Approved by: re (kib)
MFC after: 3 weeks

12 years agoFix a typo introduced in r219892 that prevented file system options from
nwhitehorn [Fri, 16 Sep 2011 09:38:01 +0000 (09:38 +0000)]
Fix a typo introduced in r219892 that prevented file system options from
being set correctly.

Approved by: re (kib)

12 years agoFix WPA setup broken by changes to shell argument passing inside the
nwhitehorn [Fri, 16 Sep 2011 09:37:13 +0000 (09:37 +0000)]
Fix WPA setup broken by changes to shell argument passing inside the
installer network configuration.

PR: bin/159558
Approved by: re (kib)

12 years agoPrint the package name on deletion errors.
pluknet [Fri, 16 Sep 2011 09:09:58 +0000 (09:09 +0000)]
Print the package name on deletion errors.

It appears this was already done in NetBSD a decade ago, hence
I just reuse the change (except our code is bad styled).

PR: bin/160516
Approved by: portmgr
Approved by: re (kib)
Obtained from: NetBSD

12 years agozfsboottest: some additional enhancements
avg [Fri, 16 Sep 2011 08:24:31 +0000 (08:24 +0000)]
zfsboottest: some additional enhancements

- redirect diagnostics printfs in the boot code to stderr
- do not read trailing garbage from a trailing block of a file

Also add my copyright to the file after making so many changes.

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

12 years agozfstest: rename to zfsboottest and move to tools
avg [Fri, 16 Sep 2011 08:22:48 +0000 (08:22 +0000)]
zfstest: rename to zfsboottest and move to tools

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

12 years agoWhen resuming an HTTP download, we failed to verify that the range
des [Thu, 15 Sep 2011 22:50:31 +0000 (22:50 +0000)]
When resuming an HTTP download, we failed to verify that the range
returned by the server matched what we requested, and blindly appended
what we received to what we already had.  This could go two ways: if the
delivered offset was higher than expected, the local file would contain
duplicate data, while if it was lower than expected, there would be data
missing from the middle of the file.  Furthermore, if the transfer was
interrupted again, each subsequent attempt would compound the error.
Fix the first problem by restarting the transfer from scratch if there
is a gap, and the second by explicitly seeking to the correct location
in the local file so as to overwrite any duplicated data.

PR: bin/117277
Approved by: re (kib)
MFC after: 3 weeks

12 years agoIt seems when I added code for affine unit changes to units, I
dwmalone [Thu, 15 Sep 2011 19:52:43 +0000 (19:52 +0000)]
It seems when I added code for affine unit changes to units, I
forgot to tell the man page we could now convert Celsius to Fahrenheit.

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

12 years agoExpose "log" in the default devfs rules. /etc/rc.d/jail creates /dev/log
jh [Thu, 15 Sep 2011 13:32:43 +0000 (13:32 +0000)]
Expose "log" in the default devfs rules. /etc/rc.d/jail creates /dev/log
as a symbolic link.

PR: conf/160711
Submitted by: Jase Thew
Approved by: re (kib)
MFC after: 1 week

12 years agoAdd IPv6 support to the ng_ipfw(4) [1]. Also add ifdefs to be able
ae [Thu, 15 Sep 2011 12:28:17 +0000 (12:28 +0000)]
Add IPv6 support to the ng_ipfw(4) [1]. Also add ifdefs to be able
build it with and without INET/INET6 support.

Submitted by: Alexander V. Chernikov <melifaro at yandex-team.ru> [1]
Tested by: Alexander V. Chernikov <melifaro at yandex-team.ru> [1]
Approved by: re (bz)
MFC after: 2 weeks

12 years agoFix a typo introduced in
tuexen [Thu, 15 Sep 2011 12:20:52 +0000 (12:20 +0000)]
Fix a typo introduced in
http://svn.freebsd.org/changeset/base/225571
Reported by Ilya A. Arkhipov.

Approved by: re
MFC after: 1 month.

12 years agoRename the cc.4 and cc.9 modular congestion control related man pages to
lstewart [Thu, 15 Sep 2011 12:15:36 +0000 (12:15 +0000)]
Rename the cc.4 and cc.9 modular congestion control related man pages to
mod_cc.4 and mod_cc.9 respectively to avoid any possible confusion with the cc.1
gcc man page. Update references to these man pages where required.

Requested by: Grenville Armitage
Approved by: re (kib)
MFC after: 3 days

12 years agoUse the proper dynamic tls block to calculate the tls variable address
kib [Thu, 15 Sep 2011 11:50:09 +0000 (11:50 +0000)]
Use the proper dynamic tls block to calculate the tls variable address
in case tls data generation was updated.

PR: misc/160721
Submitted by: "Thinker K.F. Li" <thinker codemud net>
Tested by: flo
Approved by: re (bz)
MFC after: 1 week

12 years agoPut amd64_syscall() prototype in md_var.h.
kib [Thu, 15 Sep 2011 09:54:07 +0000 (09:54 +0000)]
Put amd64_syscall() prototype in md_var.h.

Requested by: jhb
Reviewed by: alc, jhb
Approved by: re (bz)
MFC after: 2 weeks

12 years agoMicrooptimize the return path for the fast syscalls on amd64. Arrange
kib [Thu, 15 Sep 2011 09:53:04 +0000 (09:53 +0000)]
Microoptimize the return path for the fast syscalls on amd64. Arrange
the code to have the fall-through path to follow the likely target.
Do not use intermediate register to reload user %rsp.

Proposed by: alc
Reviewed by: alc, jhb
Approved by: re (bz)
MFC after: 2 weeks

12 years agoCorrect the RFC number for the description of IPv6 privacy addressing
dougb [Thu, 15 Sep 2011 09:22:49 +0000 (09:22 +0000)]
Correct the RFC number for the description of IPv6 privacy addressing

Reviewed by: bz
Approved by: re (kib)