dragonfly.git
10 years agoBring in FreeBSD's usbdump(8).
Sascha Wildner [Mon, 10 Mar 2014 21:11:53 +0000 (22:11 +0100)]
Bring in FreeBSD's usbdump(8).

10 years agoBring in FreeBSD's usbhidaction(1).
Sascha Wildner [Mon, 10 Mar 2014 21:02:44 +0000 (22:02 +0100)]
Bring in FreeBSD's usbhidaction(1).

10 years agoSync the new USB stack's usbhidctl(1) with FreeBSD.
Sascha Wildner [Mon, 10 Mar 2014 20:46:26 +0000 (21:46 +0100)]
Sync the new USB stack's usbhidctl(1) with FreeBSD.

10 years agoSync the new USB stack's libusbhid with FreeBSD.
Sascha Wildner [Mon, 10 Mar 2014 20:31:59 +0000 (21:31 +0100)]
Sync the new USB stack's libusbhid with FreeBSD.

10 years agoSync libusb with FreeBSD.
Sascha Wildner [Mon, 10 Mar 2014 20:22:22 +0000 (21:22 +0100)]
Sync libusb with FreeBSD.

10 years agoAdjust SYNOPSIS in a couple of USB driver manual pages.
Sascha Wildner [Mon, 10 Mar 2014 18:41:01 +0000 (19:41 +0100)]
Adjust SYNOPSIS in a couple of USB driver manual pages.

Namely, put "device oldusb" in all manual pages which are for drivers
that are only available in the old stack, be it because they are not
yet ported or because they are specific to the old stack.

10 years agokernel/ndis: Solve module build without a USB bus in the config better.
Sascha Wildner [Mon, 10 Mar 2014 18:32:34 +0000 (19:32 +0100)]
kernel/ndis: Solve module build without a USB bus in the config better.

When there is no USB bus in the config, the ndis modules need a hint
about which of the two possible USB stacks to build for. Always build
for usb4bsd unless oldusb is explicitly specified.

10 years agousb4bsd: Remove irritating kprintf
Markus Pfeiffer [Mon, 10 Mar 2014 17:57:15 +0000 (17:57 +0000)]
usb4bsd: Remove irritating kprintf

10 years agoAdd new usb4bsd only devices to LINT/LINT64.
Sascha Wildner [Mon, 10 Mar 2014 15:07:43 +0000 (16:07 +0100)]
Add new usb4bsd only devices to LINT/LINT64.

10 years agousb4bsd: Fix a couple of typos and build issues.
Sascha Wildner [Mon, 10 Mar 2014 13:56:38 +0000 (14:56 +0100)]
usb4bsd: Fix a couple of typos and build issues.

10 years agoLINT/LINT64: Fix umass comment.
Sascha Wildner [Mon, 10 Mar 2014 10:35:26 +0000 (11:35 +0100)]
LINT/LINT64: Fix umass comment.

10 years agokernel: Comment out old or yet unsupported USB devices in our configs.
Sascha Wildner [Mon, 10 Mar 2014 10:25:25 +0000 (11:25 +0100)]
kernel: Comment out old or yet unsupported USB devices in our configs.

10 years agochgsbsize: Optimize for x86_64 by avoid uidinfo spinlock
Sepherosa Ziehau [Mon, 10 Mar 2014 08:38:15 +0000 (16:38 +0800)]
chgsbsize: Optimize for x86_64 by avoid uidinfo spinlock

This kills one of the highly contended spinlocks on accept(2) path.  And
it also greatly helps connect(2) path.

With this commit, tools/kq_connect_client could do 273Kconns/s instead
of 260Kconns/s (~5% improvement, however, connect(2) is still cpu bound).

10 years agousb4bsd: Adjust a Makefile comment.
Sascha Wildner [Mon, 10 Mar 2014 02:20:21 +0000 (03:20 +0100)]
usb4bsd: Adjust a Makefile comment.

10 years agoMake usb4bsd the default USB stack.
Sascha Wildner [Mon, 10 Mar 2014 01:49:31 +0000 (02:49 +0100)]
Make usb4bsd the default USB stack.

To get back to the old stack, put "WANT_OLDUSB=yes" in /etc/make.conf and
replace "device usb" with "device oldusb" in the kernel configuration.

Requested-by: dillon, profmakx, marino etc.
10 years agousb4bsd - Fix poll/select/kqfilter issues with ums and usb_fifo*() API
Matthew Dillon [Mon, 10 Mar 2014 00:01:41 +0000 (17:01 -0700)]
usb4bsd - Fix poll/select/kqfilter issues with ums and usb_fifo*() API

* Fix handling of f->flag_isselect.  It was being improperly cleared on
  event notification.  It can only be cleared when the knote is removed.

* Call f->methods->f_start_read() unconditionally in usb_filter_read().
  Conditionalizing on f->queue_data will fail with devices (aka ums) which
  allocate the buffer independantly of starting the interrupt xfer.

* Call usb_fifo_wakeup() in mbuf re-queue cases to handle races when
  the read() code pulls an mbuf off the queue and then puts it back on.

* Fix bugs in UMS - Keep track of whether the interrupt transfer is running
  or not and do not re-submit or re-stop the transfer unconditionally.

10 years agousb4bsd: Adjust 'make upgrade' for the serial driver modules.
Sascha Wildner [Mon, 10 Mar 2014 00:01:39 +0000 (01:01 +0100)]
usb4bsd: Adjust 'make upgrade' for the serial driver modules.

10 years agousb4bsd: Allow to build serial drivers into the kernel too.
Sascha Wildner [Sun, 9 Mar 2014 23:59:53 +0000 (00:59 +0100)]
usb4bsd: Allow to build serial drivers into the kernel too.

10 years agousb4bsd: Fix typo in last commit.
Sascha Wildner [Sun, 9 Mar 2014 23:52:57 +0000 (00:52 +0100)]
usb4bsd: Fix typo in last commit.

10 years agousb4bsd: Fix some warnings in usb_serial.
Sascha Wildner [Sun, 9 Mar 2014 23:33:06 +0000 (00:33 +0100)]
usb4bsd: Fix some warnings in usb_serial.

* Fix two cases where sc was passed to ucom_modem() but sc->sc_tty
  should have been.

* Comment out a debug variable.

* Use #if 0 consequently and add a few more.

* Indent fixes.

OK'd-by: profmakx

10 years agousb4bsd: usb_dev kqfilter
Markus Pfeiffer [Sun, 9 Mar 2014 01:09:52 +0000 (01:09 +0000)]
usb4bsd: usb_dev kqfilter

* implement a working kqfilter
* integrate some FreeBSD patches

10 years agousb4bsd: work on usb_serial.c
Markus Pfeiffer [Sun, 9 Mar 2014 01:09:20 +0000 (01:09 +0000)]
usb4bsd: work on usb_serial.c

10 years agousb4bsd: use generated usbdevs.h
Markus Pfeiffer [Sat, 1 Mar 2014 19:18:21 +0000 (19:18 +0000)]
usb4bsd: use generated usbdevs.h

replace respective includes and fixup makefiles

10 years agousb4bsd: Implement kqfilter for usb_dev
Markus Pfeiffer [Fri, 28 Feb 2014 21:21:04 +0000 (21:21 +0000)]
usb4bsd: Implement kqfilter for usb_dev

10 years agousb4bsd: port usb_serial
Markus Pfeiffer [Tue, 25 Feb 2014 22:14:46 +0000 (22:14 +0000)]
usb4bsd: port usb_serial

10 years agoStart porting ucom.
Markus Pfeiffer [Wed, 5 Feb 2014 23:01:44 +0000 (23:01 +0000)]
Start porting ucom.

* import serial.h from freebsd
* comment almost everything out in usb_serial.c
* make the whole thing compile

10 years agotools - Fix a couple mistakes.
Antonio Huete Jimenez [Sun, 9 Mar 2014 17:12:00 +0000 (18:12 +0100)]
tools - Fix a couple mistakes.

- Don't write metadata file on dry-run mode for hammer-backup.sh
- Fix a corner case where hammer mirror-read does not find any changes
  and thus provides no endtid. Reused begtid for the metadata file
- Exit and remove the incremental file generated if we can't figure out
  which entid has to be written to the metadata file

10 years agotools - Reorganise a bit info messages in hammer-info.sh
Antonio Huete Jimenez [Sun, 9 Mar 2014 17:04:26 +0000 (18:04 +0100)]
tools - Reorganise a bit info messages in hammer-info.sh

- Also silence errors in md5's output.
- Remove some info that is already on the README

10 years agotools - Add option -k to hammer-backup.sh
Antonio Huete Jimenez [Sun, 9 Mar 2014 16:48:17 +0000 (17:48 +0100)]
tools - Add option -k to hammer-backup.sh

- This new option goes through all metadata backup files in the
  specified backup directory and performs a checksum on them.
- While here fix usage.

10 years agotools - Easier incremental backups for hammer-backup.sh.
Antonio Huete Jimenez [Sun, 9 Mar 2014 16:24:36 +0000 (17:24 +0100)]
tools - Easier incremental backups for hammer-backup.sh.

- If 'auto' is specified with option -i, then the latest full backup will
  be used. This allows easier backups via crontab for example.
- Fix a couple things in README.

10 years agotools - Improve hammer-backup.sh a bit
Antonio Huete Jimenez [Sun, 9 Mar 2014 13:24:06 +0000 (14:24 +0100)]
tools - Improve hammer-backup.sh a bit

- Use globbing where appropriate.
- Fix some tests.
- Fix awk usage in some cases.
- Remove unused variables.

Submitted-by: Freddy DISSAUX
10 years agotools - Fix indentation.
Antonio Huete Jimenez [Sun, 9 Mar 2014 12:49:19 +0000 (13:49 +0100)]
tools - Fix indentation.

- Use the same indentation across the whole hammer-backup.sh
  script.

Spotted-by: Freddy DISSAUX
10 years agochgsbsize: Reduce cover range of uidinfo spinlock
Sepherosa Ziehau [Sun, 9 Mar 2014 12:31:50 +0000 (20:31 +0800)]
chgsbsize: Reduce cover range of uidinfo spinlock

10 years agoethernet: If caller thread cpu is fixed, pass cpuid to ether_input_pkt()
Sepherosa Ziehau [Sun, 9 Mar 2014 11:28:18 +0000 (19:28 +0800)]
ethernet: If caller thread cpu is fixed, pass cpuid to ether_input_pkt()

So we could use optimized lwkt_sendmsg_oncpu() instead of lwkt_sendmsg(),
if the target netisr is on the same cpu as caller thread cpu.  Mainly to
avoid unnecessary wakeup() IPIs to other cpus.

THE RESULT:

On i7-3770 w/ HT enabled (8 logical cpus); NIC is 82599ES w/ 8 RX rings
and 8 TX rings.  Run:
    repeat 10 tcp_stream -H ... -i 256 -l 10 -r
(256 netperf TCP_MAERTS instances for 10 seconds, 10 rounds)

Total amount of cross IPIs before this commit is 6946097.  Total amount
of cross IPIs as of this commit is 5445324.  ~22% unnecessary wakeup()
IPIs are avoided!

10 years agokernel: Fixup KERN_PROC_PATHNAME sysctl
Markus Pfeiffer [Sun, 9 Mar 2014 01:15:10 +0000 (01:15 +0000)]
kernel: Fixup KERN_PROC_PATHNAME sysctl

The code for the sysctl uses pfind, which PHOLDs the process
if a pid is passed to the sysctl, so we PRELE the process
if necessary.

10 years agohammer2 - Fix stack blowout in lookup iteration
Matthew Dillon [Sat, 8 Mar 2014 05:49:30 +0000 (21:49 -0800)]
hammer2 - Fix stack blowout in lookup iteration

* hammer2_chain_lookup()->hammer2_chain_next()->hammer2_chain_lookup()
  stacking could blow out the kernel stack.

* Inline the iteration within hammer2_chain_lookup() when the lookup runs
  out of blockrefs without finding anything at the current level, instead
  of having it call hammer2_chain_next().

10 years agohammer2 - stabilization
Matthew Dillon [Sat, 8 Mar 2014 05:15:43 +0000 (21:15 -0800)]
hammer2 - stabilization

* Remove write transaction from hammer2_vop_reclaim().  This was being
  used to do the final deletion of chains for unlinked-but-open files.
  Instead, the related inode is placed on a pmp->unlinkq and finalization
  is handled by the sync and rmdir code.

* Fixes problems with flush synchronization due to the fact that a reclaim
  can occur at any time.

10 years agoSun switched these files to a 3-clause BSD license in 2009.
Justin C. Sherrill [Sat, 8 Mar 2014 04:42:53 +0000 (23:42 -0500)]
Sun switched these files to a 3-clause BSD license in 2009.

Change-noted-in: http://svnweb.freebsd.org/base?view=revision&revision=258564

10 years agotools - Implement a simple hammer-backup script.
Antonio Huete Jimenez [Fri, 7 Mar 2014 23:37:48 +0000 (00:37 +0100)]
tools - Implement a simple hammer-backup script.

This script operates HAMMER PFSes and dumps its contents for backup
purposes.

It uses mirror-read directive (see 'man 8 hammer') to perform a
dump to stdout that is redirected to a file with or without
compression.

Read /usr/src/tools/tools/hammer-backup/README for more detailed
information.

Also please note the script is not installed with a default DragonFly
BSD installation, so you have to take care of that manually.

Any suggestion or bug report is appreciated!

10 years agohammer2 - Stabilization pass
Matthew Dillon [Fri, 7 Mar 2014 21:54:00 +0000 (13:54 -0800)]
hammer2 - Stabilization pass

* Fix case in hammer2_chain_delete_duplicate(), allow delete-duplication
  of a deleted terminal chain outside of a flush.

* Fix assertions in the flush code.  Deleted parent's block tables are not
  updated.  If all parents are deleted we allow the CHAIN_DELETED flag to
  be cleared in children even though the children might still be on the
  DBTREE or be flagged BMAPPED.

* Fix bug in hammer2_bioq_sync() where new logical buffers instantiated while
  flushing existing buffers are not waited for before exiting the PREFLUSH
  state.  This might not actually be a bug but cover the case for now.

10 years agoRevert "Add an /etc/periodic script to check for dports package vulnerabilities."
Sascha Wildner [Thu, 6 Mar 2014 22:08:27 +0000 (23:08 +0100)]
Revert "Add an /etc/periodic script to check for dports package vulnerabilities."

This reverts commit dced1188f0aae7a3a714a58540f8f6bf4043f35c.

Aw, actually there are scripts in /usr/local/etc/periodic doing just that.

10 years agoAdd an /etc/periodic script to check for dports package vulnerabilities.
Sascha Wildner [Thu, 6 Mar 2014 21:56:45 +0000 (22:56 +0100)]
Add an /etc/periodic script to check for dports package vulnerabilities.

It's basically just 'pkg audit' at them moment, the output of which is
then included in the nightly security mails.

To disable this check for some reason, daily_status_dports_audit_enable
can be set to 'no' in /etc/periodic.conf.

Reported-by: joris
10 years agoAdd a urtwnfw(4) manual page (from FreeBSD).
Sascha Wildner [Thu, 6 Mar 2014 17:09:42 +0000 (18:09 +0100)]
Add a urtwnfw(4) manual page (from FreeBSD).

10 years agohier.7: Add /compat/ndis, binutils adjustments, remove /etc/firmare.
Sascha Wildner [Thu, 6 Mar 2014 16:45:38 +0000 (17:45 +0100)]
hier.7: Add /compat/ndis, binutils adjustments, remove /etc/firmare.

10 years agohammer2 - Reduce flush complexity, fix panics
Matthew Dillon [Thu, 6 Mar 2014 02:37:57 +0000 (18:37 -0800)]
hammer2 - Reduce flush complexity, fix panics

* Set synchronous flush mode by default for now to reduce sources of
  potential crashes so the core can be stabilized.

  This means that the only transactions that will run with a higher
  transaction id during a flush are allocations from the freemap made
  by the flush itself.  This is far easier to debug.

  Concurrent frontend transactions are disabled during a flush, for now.

* The buffer flush which is run synchronously from the main flush now always
  uses an async + sync vfsync sequence and does not allow any buffers to
  be left over before entering the main flush.

* The buffer flush now also uses the same transaction id as the main flush.
  A new flag, HAMMER2_TRANS_PREFLUSH is used to manage this mechanic and
  to assert on any illegal buffer flushes.

* Fix miscellanious assertions that were incorrect, and split the pass4
  codepath in the flush into pass4 and pass5 to fix another bug.

* Fix an improper semicolon (from swildner)

* Remove more dead code.

* The hammer2_vop_reclaim() code was the only code path that would acquire
  a hammer2_inode lock prior to starting a transaction for a modifying
  operation (for the delete unlinked file on last reference).  Fix this
  code to open the transaction first and obtain the inode lock second,
  which fixes a deadlock.

* Fix an infinite while() loop due to improper arguments in a TAILQ_NEXT()
  call.

10 years agokernel: Adjust type of vmm_guest to enum vmm_guest_type.
Sascha Wildner [Wed, 5 Mar 2014 19:38:08 +0000 (20:38 +0100)]
kernel: Adjust type of vmm_guest to enum vmm_guest_type.

Also rename VMM_LAST -> VMM_GUEST_LAST.

10 years agoinstaller: Adjust so we can install a vkernel environment using our ISOs.
Sascha Wildner [Wed, 5 Mar 2014 08:41:11 +0000 (09:41 +0100)]
installer: Adjust so we can install a vkernel environment using our ISOs.

Tested-by: tuxillo
10 years agosbin/hammer - Remove trailing '/' from paths.
Antonio Huete Jimenez [Tue, 4 Mar 2014 23:24:38 +0000 (00:24 +0100)]
sbin/hammer - Remove trailing '/' from paths.

  When operating PFSes through symbolic links, it was not
  possible to specify the trailing backslash since that
  translated to the PFS root dir instead of the symbolic link
  to the PFS itself. This caused problems when upgrading or
  downgrading PFSes (and probably in other cases too).
  The error was "Directory not empty".

  This commit should solve those cases, but keep in mind
  there are other cases where it is actually not possible
  to complete certain operations (like while destroying
  PFSes).

Reported-by: Siju George, others
10 years agosbin/hammer - Fix a wrong error message.
Antonio Huete Jimenez [Tue, 4 Mar 2014 21:53:10 +0000 (22:53 +0100)]
sbin/hammer - Fix a wrong error message.

10 years agokernel/vfs - Fix a refcount check in vclean_unlocked()
Antonio Huete Jimenez [Tue, 4 Mar 2014 21:32:08 +0000 (22:32 +0100)]
kernel/vfs - Fix a refcount check in vclean_unlocked()

- vx_get() actually adds a ref so you actually need to count
  with that.

10 years agokernel: Add more detailed VM detection.
Sascha Wildner [Tue, 4 Mar 2014 18:07:21 +0000 (19:07 +0100)]
kernel: Add more detailed VM detection.

Previously, the kernel global 'vmm_guest' was either 0 or 1 depending
on the VMM bit in the CPU features (which isn't set in all VMs).

This commit adds more detailed information by checking the emulated
BIOS for known strings. The detected VMs include vkernel, which
doesn't strictly fit into the category, but it shares enough
similarities for this to be useful.

Also expose this information in a read-only sysctl (kern.vmm_guest).

The detection code was kind of adapted from FreeBSD (although their
kern.vm_guest works differently).

Tested-by: tuxillo
10 years agorc.d/root - Remove unnecessary 'mount /' call.
Antonio Huete Jimenez [Mon, 3 Mar 2014 23:43:02 +0000 (00:43 +0100)]
rc.d/root - Remove unnecessary 'mount /' call.

UFS and HAMMER do not emit an error when trying to mount
an already mounted root fileystem but cd9660 does.
That's why this wasn't producing any error message on
already installed systems.

While booting the LiveCD you could see:

cd9660: /dev/vcd0: Invalid argument

Reported-by: corecode
DragonFly-bug: <http://bugs.dragonflybsd.org/issues/1518>

This commit closes #1518

10 years agortld(1): Fix a typo in inactive code.
Sascha Wildner [Mon, 3 Mar 2014 18:06:50 +0000 (19:06 +0100)]
rtld(1): Fix a typo in inactive code.

Confirmed-by: kib@freebsd via marino
10 years agoSome fixes to allow building with gcc44.
Sascha Wildner [Sun, 2 Mar 2014 19:16:26 +0000 (20:16 +0100)]
Some fixes to allow building with gcc44.

Most of them for type redefinitions which gcc47 has stopped warning about
(if they are compatible).

The libstdc++ fix is modeled after gcc47's libstdc++. We don't have
__libc_C_ctype_[] anymore.

10 years agodrm/ttm: Use the Linux wait queues API
François Tigeot [Sun, 2 Mar 2014 09:03:40 +0000 (10:03 +0100)]
drm/ttm: Use the Linux wait queues API

Reducing differences with Linux 3.9 (ttm) and Linux 3.8 (rest of the code)

10 years agodrm: Add a local implementation of linux/wait.h
François Tigeot [Sun, 2 Mar 2014 08:33:25 +0000 (09:33 +0100)]
drm: Add a local implementation of linux/wait.h

Inspired-by: OpenBSD
10 years agokern: fix integer underflow in exec_shell_imgact.
minux [Sat, 1 Mar 2014 08:41:25 +0000 (00:41 -0800)]
kern: fix integer underflow in exec_shell_imgact.

was returning E2BIG whenever argv[0] is longer interp+path.
see also FreeBSD PR 155321.

10 years agovkernel - Use 'vcd0' by default.
Antonio Huete Jimenez [Sat, 1 Mar 2014 11:54:54 +0000 (03:54 -0800)]
vkernel - Use 'vcd0' by default.

- This allow booting our ISO images directly.

10 years agovirtual/vcd - Adapt for DEVFS.
Antonio Huete Jimenez [Sat, 1 Mar 2014 11:46:16 +0000 (03:46 -0800)]
virtual/vcd - Adapt for DEVFS.

- disk_setdiskinfo() call to completely configure the device.
- This allows vcd(4) to work properly on vkernels.

10 years agokernel/ixgbe: Fix building kernels with IX_RSS_DEBUG in the config.
Sascha Wildner [Sat, 1 Mar 2014 11:10:33 +0000 (12:10 +0100)]
kernel/ixgbe: Fix building kernels with IX_RSS_DEBUG in the config.

10 years agotest again
Antonio Huete Jimenez [Sat, 1 Mar 2014 00:03:12 +0000 (01:03 +0100)]
test again

10 years agotest
Sascha Wildner [Fri, 28 Feb 2014 23:45:28 +0000 (00:45 +0100)]
test

10 years agotest - Testing 1 2 3
Antonio Huete Jimenez [Fri, 28 Feb 2014 23:25:10 +0000 (00:25 +0100)]
test - Testing 1 2 3

10 years agokernel/natapci - Fix a NULL pointer dereference.
Antonio Huete Jimenez [Fri, 28 Feb 2014 13:16:02 +0000 (14:16 +0100)]
kernel/natapci - Fix a NULL pointer dereference.

- ata_devclass is NULL when no unit 0/1 is available or no
  legacy support has been detected.
- device_add_child() populates ata_devclass via make_device()
  so do not try to get information out of it when NULL.

Submitted-by: @dillon
10 years agokernel/nata - Fix a memory leak in ata-dma.
Antonio Huete Jimenez [Fri, 28 Feb 2014 13:04:50 +0000 (14:04 +0100)]
kernel/nata - Fix a memory leak in ata-dma.

10 years agox86_64/mwait: Fix sysctl node OID settings
Sepherosa Ziehau [Fri, 28 Feb 2014 11:40:11 +0000 (19:40 +0800)]
x86_64/mwait: Fix sysctl node OID settings

10 years agoix: Implement MSI-X support and enable multiple TX rings
Sepherosa Ziehau [Wed, 19 Feb 2014 12:01:35 +0000 (20:01 +0800)]
ix: Implement MSI-X support and enable multiple TX rings

Two modes are supported, if there are enough MSI-X vector:
- TX ring and RX ring processing uses independent MSI-X vector.  It
  could be useful for some most TX applocation.  It could be enabled
  by setting hw.ix.msix.agg_rxtx or hw.ixY.msix.agg_rxtx to 0.
- TX ring and RX ring processing uses same MSI-X vector.  This is the
  default.  TX ring is processed when the header write back pointer
  is moved; this avoids unecessary TX ring serialization if there is
  no TX descriptor to recollect at all.

For 82598, MSI-X is not enabled by default, due to hardware errata.  It
could be enabled by setting per-device tunable hw.ixY.msix.enable.

Multiple TX rings are enable as of this commit.  Under MSI-X mode, 32 TX
rings could be used for 82599 and X540; 16 TX rings could be used for
82598.  Once polling(4) is implemented, more TX rings could be used.

Multiple RX rings have already been enabled, however, under MSI-X mode,
16 RX rings could be used for all devices supported by this driver.

Unlike the original Intel's ixgbe, number of RX rings and number of TX
rings could be configured independently.

Remove the original Intel's ixgbe MSI-X related code, which is not used
at all.

10 years agortadvt(8): Bump WARNS to 2.
Sascha Wildner [Fri, 28 Feb 2014 08:39:35 +0000 (09:39 +0100)]
rtadvt(8): Bump WARNS to 2.

10 years agolibsmb: Bump WARNS to 2 and fix a warning.
Sascha Wildner [Fri, 28 Feb 2014 08:35:56 +0000 (09:35 +0100)]
libsmb: Bump WARNS to 2 and fix a warning.

10 years agokernel/ntfs - Remove a forgotten #if defined
Antonio Huete Jimenez [Thu, 27 Feb 2014 20:45:56 +0000 (21:45 +0100)]
kernel/ntfs - Remove a forgotten #if defined

10 years agokernel/ntfs - Fix buffer overlapping problems.
Antonio Huete Jimenez [Thu, 27 Feb 2014 20:26:49 +0000 (21:26 +0100)]
kernel/ntfs - Fix buffer overlapping problems.

- Read only one cluster at a time.
- Do not cache boot block.

Taken-from:    FreeBSD's r118035
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2388>

(Commit refs #2388 and fixes #1853)

10 years agokernel/ntfs - Fix a possible problem in bufcache.
Antonio Huete Jimenez [Thu, 27 Feb 2014 00:08:26 +0000 (01:08 +0100)]
kernel/ntfs - Fix a possible problem in bufcache.

- Avoid different block size bread() calls for the
  same blkno.
- Fix a bug in the code handling holes which could
  cause infinite loops.

Taken-from:    FreeBSD's r116620

10 years agokernel: Remove {msg,sem,shm}sys() syscalls.
Sascha Wildner [Thu, 27 Feb 2014 07:02:40 +0000 (08:02 +0100)]
kernel: Remove {msg,sem,shm}sys() syscalls.

They have become obsolete with the recent sysvipc userland work
and are not implemented in userspace either.

Thanks to marino for helping to verify that no packages were
affected by this commit.

Pointed-out-by: Mihai Carabas
10 years agokernel - Try to catch possible bug in getnewbuf()
Matthew Dillon [Thu, 27 Feb 2014 01:16:19 +0000 (17:16 -0800)]
kernel - Try to catch possible bug in getnewbuf()

* Add a debugging kprintf() and cleanup code to attempt to catch a possible
  bug in getnewbuf() where a buffer is somehow left on a vnode's clean or
  dirty list before being reused.

10 years agokernel - Fix SMP race in VMM/VMX vmclear() call
Matthew Dillon [Thu, 27 Feb 2014 01:14:39 +0000 (17:14 -0800)]
kernel - Fix SMP race in VMM/VMX vmclear() call

* Fix an SMP race.  The pcpu vti field is used to trigger cpusync's from
  other cpus and cannot be cleared by the owning cpu until after it has
  vmclear'd and stopped using the structure.

Reported-by: tuxillo
10 years agodebug - Fix build for ncptrace.c
Antonio Huete Jimenez [Wed, 26 Feb 2014 10:58:46 +0000 (11:58 +0100)]
debug - Fix build for ncptrace.c

10 years agokernel - Fix bug in last rdrand commit
Matthew Dillon [Wed, 26 Feb 2014 07:15:54 +0000 (23:15 -0800)]
kernel - Fix bug in last rdrand commit

* Fix incorrect sizeof() that I introduced.

Reported-by: alexh
10 years agokernel/usb4bsd: Add usbdevs.h to a few Makefile which need it.
Sascha Wildner [Wed, 26 Feb 2014 05:43:23 +0000 (06:43 +0100)]
kernel/usb4bsd: Add usbdevs.h to a few Makefile which need it.

10 years agokernel/usb4bsd: Remove usbdevs.h again. We generate it upon building.
Sascha Wildner [Wed, 26 Feb 2014 05:42:57 +0000 (06:42 +0100)]
kernel/usb4bsd: Remove usbdevs.h again. We generate it upon building.

10 years agokernel/ntfs - Cleanup.
Antonio Huete Jimenez [Tue, 25 Feb 2014 22:57:37 +0000 (23:57 +0100)]
kernel/ntfs - Cleanup.

- Remove NetBSD specific code.
- Removed few whitespaces.

10 years agokernel/ntfs - Fix warnings when compiling with NTFS_DEBUG
Antonio Huete Jimenez [Tue, 25 Feb 2014 22:35:29 +0000 (23:35 +0100)]
kernel/ntfs - Fix warnings when compiling with NTFS_DEBUG

10 years agoStop suppressing -Wuninitialized in userland for WARNS >= 2 and <= 4.
Sascha Wildner [Tue, 25 Feb 2014 23:03:57 +0000 (00:03 +0100)]
Stop suppressing -Wuninitialized in userland for WARNS >= 2 and <= 4.

This is from 2001 (via FreeBSD, who still have it). Since a lot of
important stuff is in that WARNS range (libc, most prominently) and
since the option has found some good bugs for us (just see the MFCs
of recent days), we definitely want it to be enabled. None of the
issues it reported turned out to be a false positive.

Do, however, turn off -Wmaybe-uninitialized in that WARNS range for
now.

Also, while here, turn on -Winit-self too.

10 years agoee(1): Temporarily lower WARNS to 1 until spell check support is fixed.
Sascha Wildner [Tue, 25 Feb 2014 22:52:17 +0000 (23:52 +0100)]
ee(1): Temporarily lower WARNS to 1 until spell check support is fixed.

I hope I can sort it out with FreeBSD soon.

10 years agorand(3): Fix up sranddev(3) a bit better.
Sascha Wildner [Tue, 25 Feb 2014 22:50:13 +0000 (23:50 +0100)]
rand(3): Fix up sranddev(3) a bit better.

In case we can't read /dev/random for the seed, try kern.random. If that
fails, use the getpid()/gettimeofday() xor. For the latter, remove the
usage of an uninitialized variable.

We should probably just abort() when kern.random can't be read.

Discussed-with: dillon

10 years agortld(1): Comment out max_stack_flags and the setting of it for now.
Sascha Wildner [Tue, 25 Feb 2014 22:44:12 +0000 (23:44 +0100)]
rtld(1): Comment out max_stack_flags and the setting of it for now.

It is only used in code that's already commented out.

10 years agoldns: Fix -Winit-self.
Sascha Wildner [Tue, 25 Feb 2014 22:42:33 +0000 (23:42 +0100)]
ldns: Fix -Winit-self.

10 years agoAdd -Winit-self to the kernel warning flags.
Sascha Wildner [Tue, 25 Feb 2014 22:41:39 +0000 (23:41 +0100)]
Add -Winit-self to the kernel warning flags.

10 years agokernel/drm: Fix -Winit-self.
Sascha Wildner [Tue, 25 Feb 2014 22:41:28 +0000 (23:41 +0100)]
kernel/drm: Fix -Winit-self.

While here, define __must_check to __heedresult, the equivalent in
DragonFly, and fix one warning which fell out.

10 years agokernel - Use add_buffer_randomness()
Matthew Dillon [Tue, 25 Feb 2014 23:07:40 +0000 (15:07 -0800)]
kernel - Use add_buffer_randomness()

* Use add_buffer_randomness() instead of add_true_randomness().  It will
  do a better job on the char array and also does a quick IBAA mix when it
  is through adding the buffer.

10 years agokernel - Fix similar register call-used bug in the padlock assembly
Matthew Dillon [Tue, 25 Feb 2014 22:55:59 +0000 (14:55 -0800)]
kernel - Fix similar register call-used bug in the padlock assembly

* Fix a bug similar to the rdrand bug in the padlock assembly

10 years agokernel - Fix bugs in rdrand, change sampling frequency
Matthew Dillon [Tue, 25 Feb 2014 22:46:02 +0000 (14:46 -0800)]
kernel - Fix bugs in rdrand, change sampling frequency

* Fix bugs in the rdrand assembly.  %ebx/%rbx is a call-saved register and
  cannot be destroyed.  For 64-bit use %r11 which is a temporary register.

* Increase the rdrand.c frequency from 1Hz to 10Hz

* add the debug.rdrand sysctl

* Use add_buffer_randomness() instead of add_true_randomness().

10 years agokernel - Change add_buffer_randomness() a little
Matthew Dillon [Tue, 25 Feb 2014 22:44:49 +0000 (14:44 -0800)]
kernel - Change add_buffer_randomness() a little

* Move the securelevel and seedenable stuff to the /dev/random code,
  remove it from add_buffer_randomness().

* Adjust GENERIC and X86_64_GENERIC to include the chip RNGs by default.

10 years agohammer2 - Refactor flush mechanics
Matthew Dillon [Wed, 19 Feb 2014 07:20:34 +0000 (23:20 -0800)]
hammer2 - Refactor flush mechanics

* Greatly simplify and reduce special cases in the flush code

* Remove the multi-layer rbtree and replace with two discrete rbtree's
  (rbtree and dbtree) representing the live state and one linked list (dbq)
  representing set-aside deleted chains that are not part of the live state.

* Cleanup some debugging junk, add more debugging junk.

* Separate flushing state flags and TIDs into their own fields instead of
  trying to use the live state flags and bref TIDs.

* Simplify transaction TID tracking.

10 years agoaibs.4: Use .Lk for the URL.
Sascha Wildner [Tue, 25 Feb 2014 21:49:29 +0000 (22:49 +0100)]
aibs.4: Use .Lk for the URL.

10 years agokm(4): Revert some email address changes at the request of Constantine.
Sascha Wildner [Tue, 25 Feb 2014 21:49:05 +0000 (22:49 +0100)]
km(4): Revert some email address changes at the request of Constantine.

Use .Lk for the URL in the manpage, too.

10 years agokernel/usb4bsd: Small -Wunused-variable fix from FreeBSD.
Sascha Wildner [Tue, 25 Feb 2014 17:46:33 +0000 (18:46 +0100)]
kernel/usb4bsd: Small -Wunused-variable fix from FreeBSD.

10 years agoarcmsr(4): Sync with FreeBSD (1.20.00.25 -> 1.20.00.29).
Sascha Wildner [Tue, 25 Feb 2014 09:27:13 +0000 (10:27 +0100)]
arcmsr(4): Sync with FreeBSD (1.20.00.25 -> 1.20.00.29).

Adds support for ARC1214, ARC1224, ARC1264, ARC1284, and ARC1883, mainly.

Unfortunately, lots of style fixes, whitespace adjustment, etc. are mixed up
in it too, so it's a rather large commit.

Also, this upgrade has so far only been tested with my ARC-1210.

10 years agommap : check the return code of dev_dmmap_single
Joris Giovannangeli [Mon, 24 Feb 2014 20:39:39 +0000 (21:39 +0100)]
mmap : check the return code of dev_dmmap_single

drm might return other codes than ENODEV. We want to fail in this
case too. This fix a path where object might be left uninitialized.

10 years agogetifaddrs.3: Point out that ifa_broadaddr isn't really a struct field.
Sascha Wildner [Mon, 24 Feb 2014 13:31:20 +0000 (14:31 +0100)]
getifaddrs.3: Point out that ifa_broadaddr isn't really a struct field.

It's another name for the ifa_dstaddr field to use for the non-P2P case.
Remove it from the struct, though, to not give wrong ideas about the
struct size for example.

Pointed-out-by: marino
10 years agogetifaddrs.3: Improve markup (.Vt for types and .Fa for struct fields).
Sascha Wildner [Mon, 24 Feb 2014 13:23:38 +0000 (14:23 +0100)]
getifaddrs.3: Improve markup (.Vt for types and .Fa for struct fields).