5 years agolibc: Fix -Wunused-parameter.
Sascha Wildner [Fri, 29 Mar 2013 19:24:42 +0000 (20:24 +0100)]
libc: Fix -Wunused-parameter.

5 years agolibc: Fix -Wpointer-arith.
Sascha Wildner [Fri, 29 Mar 2013 14:09:02 +0000 (15:09 +0100)]
libc: Fix -Wpointer-arith.

5 years agolibc: Fix -Wmissing-field-initializers.
Sascha Wildner [Fri, 29 Mar 2013 13:51:55 +0000 (14:51 +0100)]
libc: Fix -Wmissing-field-initializers.

5 years agolibc: Fix -Wempty-body.
Sascha Wildner [Thu, 28 Mar 2013 22:44:27 +0000 (23:44 +0100)]
libc: Fix -Wempty-body.

5 years agolibc: Fix -Wreturn-type.
Sascha Wildner [Thu, 28 Mar 2013 22:32:39 +0000 (23:32 +0100)]
libc: Fix -Wreturn-type.

5 years agolibc: Fix -Wunused-label.
Sascha Wildner [Thu, 28 Mar 2013 22:28:33 +0000 (23:28 +0100)]
libc: Fix -Wunused-label.

5 years agolibc: Fix -Wformat.
Sascha Wildner [Thu, 28 Mar 2013 22:13:44 +0000 (23:13 +0100)]
libc: Fix -Wformat.

5 years agolibc: Fix -Wunused-variable.
Sascha Wildner [Thu, 28 Mar 2013 22:07:56 +0000 (23:07 +0100)]
libc: Fix -Wunused-variable.

5 years agolibc: Fix -Wold-style-definition.
Sascha Wildner [Thu, 28 Mar 2013 18:29:19 +0000 (19:29 +0100)]
libc: Fix -Wold-style-definition.

5 years agolibc: Bring back warnings to libc.
Sascha Wildner [Fri, 29 Mar 2013 13:11:13 +0000 (14:11 +0100)]
libc: Bring back warnings to libc.

To disable warnings for the gdtoa sources only, the tweaking of the
CWARNFLAGS has to come _after_ <bsd.lib.mk> is included.

Therefore, it has to be done in libc's Makefile instead of its

Before this commit warnings were completely disabled for libc due
to '-w' passed to every command line.

Also reset WARNS back to 0 since right now, libc doesn't even pass

5 years agolibc/libc_r: Remove some obsolete comments.
Sascha Wildner [Fri, 29 Mar 2013 14:58:56 +0000 (15:58 +0100)]
libc/libc_r: Remove some obsolete comments.

5 years agokernel: Remove 'options COMPAT_SUNOS'.
Sascha Wildner [Fri, 29 Mar 2013 11:58:40 +0000 (12:58 +0100)]
kernel: Remove 'options COMPAT_SUNOS'.

It was supposed to provide binary compatibility with SunOS 4.x for the
sparc32 port of 4.4BSD.

5 years agokernel: Unbreak building kernels that have 'options BNX_TSO_DEBUG'.
Sascha Wildner [Fri, 29 Mar 2013 11:57:19 +0000 (12:57 +0100)]
kernel: Unbreak building kernels that have 'options BNX_TSO_DEBUG'.

5 years agolock(1): Do not require 'options COMPAT_43' in the kernel config.
Sascha Wildner [Fri, 29 Mar 2013 10:02:49 +0000 (11:02 +0100)]
lock(1): Do not require 'options COMPAT_43' in the kernel config.

We commented out COMPAT_43 in our configs some time ago, which broke
lock(1) that needed TIOCGETP and TIOCSETP ioctls which are only
available with COMPAT_43.

This commit converts lock(1) to use tcgetattr(3) and tcsetattr(3),
along with some minor cleanups.

Reported-by: noway on #dragonflybsd
Submitted-by: Joris Giovannangeli <joris@giovannangeli.fr>
Taken-from:   FreeBSD

5 years agobnx: Make sure that all of the TX rings receive tx_wreg update
Sepherosa Ziehau [Fri, 29 Mar 2013 09:40:21 +0000 (17:40 +0800)]
bnx: Make sure that all of the TX rings receive tx_wreg update

5 years agobnx: Make "force defrag" as TX ring flag
Sepherosa Ziehau [Fri, 29 Mar 2013 09:23:19 +0000 (17:23 +0800)]
bnx: Make "force defrag" as TX ring flag

5 years agobnx: Turn softc SHORTDMA flag into per TX ring flag
Sepherosa Ziehau [Fri, 29 Mar 2013 09:04:39 +0000 (17:04 +0800)]
bnx: Turn softc SHORTDMA flag into per TX ring flag

Avoid extra softc accessing during transmission.

5 years agore: Disable IP header checksum offloading on 8168C/8168CP
Sepherosa Ziehau [Fri, 29 Mar 2013 02:22:16 +0000 (10:22 +0800)]
re: Disable IP header checksum offloading on 8168C/8168CP

These chips will generate wrong IP header checksum if IP options exist.

Obtained-from: FreeBSD

5 years agolibc: Add a few missing xdr functions
Fran├žois Tigeot [Thu, 28 Mar 2013 07:42:23 +0000 (08:42 +0100)]
libc: Add a few missing xdr functions

Obtained-from: FreeBSD

5 years agobnx: NIC based TX rings are only applicable to chips before 5705
Sepherosa Ziehau [Thu, 28 Mar 2013 09:53:32 +0000 (17:53 +0800)]
bnx: NIC based TX rings are only applicable to chips before 5705

5 years agobnx: Regroup TX related fields into TX ring struct
Sepherosa Ziehau [Thu, 28 Mar 2013 09:26:37 +0000 (17:26 +0800)]
bnx: Regroup TX related fields into TX ring struct

5 years agobnx: It does not make sense to have ret-ring size larger than prod-ring
Sepherosa Ziehau [Thu, 28 Mar 2013 07:35:19 +0000 (15:35 +0800)]
bnx: It does not make sense to have ret-ring size larger than prod-ring

5 years agobnx: Defer interrupt allocation until chip reset is done
Sepherosa Ziehau [Thu, 28 Mar 2013 06:44:19 +0000 (14:44 +0800)]
bnx: Defer interrupt allocation until chip reset is done

5 years agobnx: Remove remainder of BCM5906
Sepherosa Ziehau [Thu, 28 Mar 2013 03:10:34 +0000 (11:10 +0800)]
bnx: Remove remainder of BCM5906

5 years agokernel - Cleanup SWB_NPAGES
Matthew Dillon [Thu, 28 Mar 2013 00:03:12 +0000 (17:03 -0700)]
kernel - Cleanup SWB_NPAGES

* Remove the conditional for the SWB_NPAGES #define so the swblock
  structure remains consistent.  Remove the override in swap_pager.c.

* Previous code was confusing, but harmless.

Reported-by: Enjolras
5 years agovkernel - Add debugging
Matthew Dillon [Wed, 27 Mar 2013 23:36:27 +0000 (16:36 -0700)]
vkernel - Add debugging

* Provide more information when interrupting to the db> prompt.

5 years agojme: Enable PHY calibration to fix compat issue w/ certain switches
Sepherosa Ziehau [Wed, 27 Mar 2013 09:03:10 +0000 (17:03 +0800)]
jme: Enable PHY calibration to fix compat issue w/ certain switches

EA settings are obtained from JMicron Linux driver.

See-also: FreeBSD PR kern/177400

5 years agojme: Fix comment
Sepherosa Ziehau [Wed, 27 Mar 2013 07:04:29 +0000 (15:04 +0800)]
jme: Fix comment

5 years agovkernel - Fix copyin/copyout to return the correct error code
Matthew Dillon [Wed, 27 Mar 2013 01:09:15 +0000 (18:09 -0700)]
vkernel - Fix copyin/copyout to return the correct error code

* These functions must return EFAULT on error, not a KERN_* error code.

5 years agokernel - Fix bug in uiomove() error handling (2)
Matthew Dillon [Wed, 27 Mar 2013 01:07:52 +0000 (18:07 -0700)]
kernel - Fix bug in uiomove() error handling (2)

* Quickly fix bug in last commit related to setting the error
  code in vm_fault_page()

5 years agokernel - mps driver - Adjust M_NOWAIT -> M_INTWAIT.
Matthew Dillon [Tue, 26 Mar 2013 23:45:25 +0000 (16:45 -0700)]
kernel - mps driver - Adjust M_NOWAIT -> M_INTWAIT.

* This (and many other drivers) really should not be using M_NOWAIT,
  which can fail trivially even when memory is available.  Use
  M_INTWAIT instead.

5 years agokernel - Fix bug in uiomove() error handling, fix deadlock in read_shortcut
Matthew Dillon [Tue, 26 Mar 2013 23:35:56 +0000 (16:35 -0700)]
kernel - Fix bug in uiomove() error handling, fix deadlock in read_shortcut

* Fix a recently introduced bug in uiomove() related to error handling
  when iovcnt is greater than 1.

* Fix a deadlock in the vm.read_shortcut code, rare triggerable except
  by vkernels.

  The deadlock is due to a busied VM page being held across a uiomove().
  To fix a new function uiomove_nofault() was added which causes EFAULT
  to be returned for any non-trivial VM fault (any fault related to nested
  objects or vnode objects).

  The vop_helper_read_shortcut() procedure uses this new uiomove function
  and breaks out when the case occurs, returning and falling through to
  the filesystem's normal buffer-cache-based read() code.

* As an added bonus, we no longer have to unlock the VM object across
  the new uiomove_nofault() call in the read shorcut code, since it is
  no longer possible to deadlock against the VM object.

Reported-by: tuxillo
5 years agonrelease: Use variables.
Sascha Wildner [Tue, 26 Mar 2013 20:26:05 +0000 (21:26 +0100)]
nrelease: Use variables.

5 years agoipiq: Use cached mycpu to access per-cpu ipiq stats
Sepherosa Ziehau [Tue, 26 Mar 2013 08:15:17 +0000 (16:15 +0800)]
ipiq: Use cached mycpu to access per-cpu ipiq stats

Reminded-by: sjg@
5 years agobce: Don't use MSI-X, if the effective RX ring count is 1
Sepherosa Ziehau [Tue, 26 Mar 2013 07:53:08 +0000 (15:53 +0800)]
bce: Don't use MSI-X, if the effective RX ring count is 1

5 years agobce: Try enabling MSI-X on 5716 too
Sepherosa Ziehau [Tue, 26 Mar 2013 07:23:00 +0000 (15:23 +0800)]
bce: Try enabling MSI-X on 5716 too

Well, to be frank, I never saw any real "5716" in the field.

5 years agoipiq: Make stats per-cpu
Sepherosa Ziehau [Tue, 26 Mar 2013 07:21:34 +0000 (15:21 +0800)]
ipiq: Make stats per-cpu

5 years agoudp: Make stats per-cpu
Sepherosa Ziehau [Tue, 26 Mar 2013 06:16:29 +0000 (14:16 +0800)]
udp: Make stats per-cpu

5 years agolnc: Call ether_ifattach() before lance_stop()
Sepherosa Ziehau [Tue, 26 Mar 2013 04:41:51 +0000 (12:41 +0800)]
lnc: Call ether_ifattach() before lance_stop()

So ifnet is properly setup.

While I'm here, remove no longer needed lance_attach() and don't return
error code from lance_config(), which returned no error at all.

DragonFly-bug: http://bugs.dragonflybsd.org/issues/2528

5 years agokernel/cpu_topology: They are just bits, not BITS.
Sascha Wildner [Mon, 25 Mar 2013 18:27:44 +0000 (19:27 +0100)]
kernel/cpu_topology: They are just bits, not BITS.

5 years agoip: Cache align ip_stats
Sepherosa Ziehau [Mon, 25 Mar 2013 09:49:52 +0000 (17:49 +0800)]
ip: Cache align ip_stats

- ip_stats is padded to multiple cache line size; add comment about it
- Cache align the per-cpu ip_stats array

5 years agonatacontrol(8): Add commands to tweak power/acoustic management features.
Sascha Wildner [Sat, 23 Mar 2013 19:21:29 +0000 (20:21 +0100)]
natacontrol(8): Add commands to tweak power/acoustic management features.

Sometimes disks designed to operate in low power mode by default
constantly spin up/down during operation which leads to reduced

This commit adds the 'feature' command to natacontrol(8) which
can be used to tweak the 'advanced power management' and 'automatic
acoustic management' features. Their current setting could already
be viewed before this commit using the 'natacontrol cap' command.

I'd like this to be possible with camcontrol(8) too for CAM attached
disks, but afaict these are ATA specific features so I guess we'd
have to integrate ATA into CAM too before that is possible.

Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2531>
Reported-by: Maurizio Lombardi <m.lombardi85@gmail.com>
Taken-from:    FreeBSD PR 81692
Tested-by: Maurizio Lombardi <m.lombardi85@gmail.com>
5 years agonatacontrol(8): s/atacontrol/natacontrol/
Sascha Wildner [Sat, 23 Mar 2013 18:12:11 +0000 (19:12 +0100)]
natacontrol(8): s/atacontrol/natacontrol/

5 years agobsd.kern.mk: -Wno-unused-but-set-variable is gcc47 specific.
Sascha Wildner [Sat, 23 Mar 2013 11:48:33 +0000 (12:48 +0100)]
bsd.kern.mk: -Wno-unused-but-set-variable is gcc47 specific.

5 years agokernel/em/emx: Fix -Wundef.
Sascha Wildner [Sat, 23 Mar 2013 00:38:00 +0000 (01:38 +0100)]
kernel/em/emx: Fix -Wundef.

5 years agokernel/ed: Fix -Wundef.
Sascha Wildner [Sat, 23 Mar 2013 00:37:09 +0000 (01:37 +0100)]
kernel/ed: Fix -Wundef.

5 years agokernel/mfi: Move the dereference of 'sc' below the NULL check.
Sascha Wildner [Fri, 22 Mar 2013 21:54:08 +0000 (22:54 +0100)]
kernel/mfi: Move the dereference of 'sc' below the NULL check.

5 years agokernel/virtio: Fix -Wundef.
Sascha Wildner [Fri, 22 Mar 2013 21:47:25 +0000 (22:47 +0100)]
kernel/virtio: Fix -Wundef.

5 years agokernel/wlan: Fix -Wundef.
Sascha Wildner [Fri, 22 Mar 2013 21:22:44 +0000 (22:22 +0100)]
kernel/wlan: Fix -Wundef.

5 years agokernel/acpi: Fix -Wundef.
Sascha Wildner [Fri, 22 Mar 2013 20:38:33 +0000 (21:38 +0100)]
kernel/acpi: Fix -Wundef.

5 years agotcp: Cache align tcp_stats
Sepherosa Ziehau [Fri, 22 Mar 2013 04:58:53 +0000 (12:58 +0800)]
tcp: Cache align tcp_stats

- tcp_stats is padded to multiple cache line size; add comment about it
- Cache align the per-cpu tcp_stats array

5 years agovr: Remove extra VR_ISR_RX_NOBUF test
Sepherosa Ziehau [Fri, 22 Mar 2013 03:16:24 +0000 (11:16 +0800)]
vr: Remove extra VR_ISR_RX_NOBUF test

Pointed-out-by: swildner@
5 years agoste: Add another PCI device ID for Sundance ST201
Sepherosa Ziehau [Fri, 22 Mar 2013 01:23:04 +0000 (09:23 +0800)]
ste: Add another PCI device ID for Sundance ST201

DragonFly-bug: http://bugs.dragonflybsd.org/issues/2529

5 years agopcidevs: Add device ID for Sundance ST201
Sepherosa Ziehau [Fri, 22 Mar 2013 01:22:32 +0000 (09:22 +0800)]
pcidevs: Add device ID for Sundance ST201

5 years agolibthread_xu: Remove unnecessary calls to _thr_check_init()
Markus Pfeiffer [Tue, 19 Mar 2013 18:57:36 +0000 (18:57 +0000)]
libthread_xu: Remove unnecessary calls to _thr_check_init()

With the previous commit it becomes unnecessary to check whether
libpthread has been initialised. This gets rid of some checks in
hot codepaths.

5 years agolibc/libthread_xu - Fix segfault caused by libpthread used before initialised
Markus Pfeiffer [Mon, 18 Mar 2013 21:46:24 +0000 (21:46 +0000)]
libc/libthread_xu - Fix segfault caused by libpthread used before initialised

If a binary has libpthread as dependency and is linked against libintl,
or any other library that uses pthread locking primitives from libc
without depending on libpthread itself it can happen that functions
from libpthread are called before libpthread's constructor has been
called. This leads to a segfault.

This fix adds a weak symbold to libc, namely _pthread_init_early,
which is called from a libc constructor function and therefore makes
sure that libpthread is initialised early enough.

Thanks to Simon Schubert, Angelos Oikonomopoulos, and Sascha Wildner
for the support in debugging this.

5 years agokernel -- syscons: Resolve unmatched PHOLD() for MOUSE_MODE ioctl.
Venkatesh Srinivas [Thu, 21 Mar 2013 07:50:52 +0000 (03:50 -0400)]
kernel -- syscons: Resolve unmatched PHOLD() for MOUSE_MODE ioctl.

When a syscons process put itself into MOUSE_MODE, a process-hold
was being placed to stabilize the process for signal delivery. The
hold was not being released on process exit, however.

This change reworks syscons to install a per-process flag as to
whether it is in MOUSE_MODE or not and to remove the excess hold on
exit(). It also cleans up the error handling and prevents stale
process pointers from lingering in syscons stat structures.

Reported-by: mneumann, Studbolt
Closes-bug: 2521

5 years agobnx: Improve 57766 performance by forcing 2K DMA size
Sepherosa Ziehau [Thu, 21 Mar 2013 09:15:49 +0000 (17:15 +0800)]
bnx: Improve 57766 performance by forcing 2K DMA size

Obtained-from: tg3

5 years agobnx: Fix transmit hangs for 57766 and 57765 non-Ax chips
Sepherosa Ziehau [Thu, 21 Mar 2013 08:49:41 +0000 (16:49 +0800)]
bnx: Fix transmit hangs for 57766 and 57765 non-Ax chips

For the 57766 and 57765 non-Ax chips, the PCIe Fast Training Sequence
(FTS) value needs to setup to prevent transmit hangs.

Obtained-from: tg3

5 years agobpf - Remove crit_enter/exit calls.
Antonio Huete Jimenez [Wed, 20 Mar 2013 09:33:28 +0000 (10:33 +0100)]
bpf - Remove crit_enter/exit calls.

bpf_token is used to protect the code now, critical sections are no
longer needed.

Pointed-out-by: sephe
5 years agobnx: Add support for BCM5762 chips
Sepherosa Ziehau [Wed, 20 Mar 2013 13:34:20 +0000 (21:34 +0800)]
bnx: Add support for BCM5762 chips

Taken-from: tg3

5 years agolibc/sl_find: sync prototype with NetBSD
John Marino [Tue, 19 Mar 2013 20:57:26 +0000 (21:57 +0100)]
libc/sl_find: sync prototype with NetBSD

The sl_find function does not modify the 'name' argument.
Set the constant qualifier on it to match NetBSD.  FreeBSD will make this
change in the future as well.

Submitted by: Eitan Eadler <eadler@freebsd.org>

5 years agoasync_rcvd: Don't add/drop socket reference on hot path
Sepherosa Ziehau [Tue, 19 Mar 2013 08:51:49 +0000 (16:51 +0800)]
async_rcvd: Don't add/drop socket reference on hot path

Instead, add reference in tcp_attach(), and drop the reference in

5 years agoasync_rcvd: Move MSGF_DONE test under async rcvd spinlock
Sepherosa Ziehau [Tue, 19 Mar 2013 07:56:11 +0000 (15:56 +0800)]
async_rcvd: Move MSGF_DONE test under async rcvd spinlock

This flag is meant to be protected by the async rcvd spinlock; use
ssleep instead of tsleep if race happened.

Sysctl node kern.ipc.async_rcvd_drop_race is added to count the
number of async rcvd message dropping races.

5 years agoasync_rcvd: Remove the dead async rcvd message debug logging
Sepherosa Ziehau [Tue, 19 Mar 2013 06:24:16 +0000 (14:24 +0800)]
async_rcvd: Remove the dead async rcvd message debug logging

This race does happen.

5 years agosh: Sync with FreeBSD:
Peter Avalos [Mon, 18 Mar 2013 00:29:29 +0000 (17:29 -0700)]
sh: Sync with FreeBSD:

* Expand assignment-like words specially for export/readonly/local.
* Remove unused variables.
* Reset pendingsigs before checking pending traps, not after.
* Track continued jobs (even if not continued by bg or fg).
* Inline waitproc() into its only caller.
* Fix EINTR race condition in "wait" and "set -T" using sigsuspend().
* use setinputfile instead of open/setinputfd.
* Prefer internal nextopt() to libc getopt().
* Use C99 flexible array instead of accessing array beyond bounds.
* Fix two issues when an alias is redefined.
* Detect and flag write errors on stdout in builtins.
* Prefer strsignal() to accessing sys_siglist directly.
* Don't lose $? when backquoted command ends with semicolon or newline.
* Fix crash when parsing '{ } &'.
* Pass $? to command substitution containing compound/multiple commands.
* Simplify cd-hash interaction.
* Remove mkinit's initialization routine.
* Move some stackmarks to fix high memory usage in some loops.
* Show negated commands (!) in jobs output.
* Prefer our character classification functions to <ctype.h>.
* Expand here documents in the current process.
* Do not test for digit_contig in mksyntax.
* Simplify mksyntax
* Fix a crash with the stackmark code.
* If a SIGINT or SIGQUIT interrupts "wait", return status 128+sig.
* When executing a trap, keep exit status along with evalskip.
* Update $FreeBSD$ to include SVN id.

Obtained-from:   FreeBSD

5 years agomiidevs: regen
Sepherosa Ziehau [Sun, 17 Mar 2013 12:45:52 +0000 (20:45 +0800)]
miidevs: regen

5 years agomiidevs: Flip BCM5720C and BCM5718C IDs
Sepherosa Ziehau [Sun, 17 Mar 2013 12:44:48 +0000 (20:44 +0800)]
miidevs: Flip BCM5720C and BCM5718C IDs

Datasheet is wrong on the the IDs' names.

5 years agomiidevs: regen
Sepherosa Ziehau [Sun, 17 Mar 2013 12:25:12 +0000 (20:25 +0800)]
miidevs: regen

5 years agomiidevs: Add PHY IDs for Broadcom 5762
Sepherosa Ziehau [Sun, 17 Mar 2013 12:24:54 +0000 (20:24 +0800)]
miidevs: Add PHY IDs for Broadcom 5762

5 years agopcidevs: regen
Sepherosa Ziehau [Sun, 17 Mar 2013 11:45:35 +0000 (19:45 +0800)]
pcidevs: regen

5 years agopcidevs: Add device IDs for Broadcom 5762/5725/5727
Sepherosa Ziehau [Sun, 17 Mar 2013 11:45:05 +0000 (19:45 +0800)]
pcidevs: Add device IDs for Broadcom 5762/5725/5727

5 years agopcidevs: regen
Sepherosa Ziehau [Sun, 17 Mar 2013 11:38:43 +0000 (19:38 +0800)]
pcidevs: regen

5 years agopcidevs: Sort Broadcom chips device IDs in numeric order
Sepherosa Ziehau [Sun, 17 Mar 2013 11:38:08 +0000 (19:38 +0800)]
pcidevs: Sort Broadcom chips device IDs in numeric order

5 years ago<paths.h>: Add /usr/local/{bin,sbin} to _PATH_DEFPATH.
Sascha Wildner [Sun, 17 Mar 2013 02:24:10 +0000 (03:24 +0100)]
<paths.h>: Add /usr/local/{bin,sbin} to _PATH_DEFPATH.

5 years agopciconf(8): Add support for displaying extended capabilities with -c.
Sascha Wildner [Fri, 15 Mar 2013 19:37:29 +0000 (20:37 +0100)]
pciconf(8): Add support for displaying extended capabilities with -c.

Also, bring in some additional minor fixes.

Taken-from: FreeBSD

5 years ago<bus/pci/pcireg.h>: Add some more definitions.
Sascha Wildner [Fri, 15 Mar 2013 19:29:29 +0000 (20:29 +0100)]
<bus/pci/pcireg.h>: Add some more definitions.

5 years agopciconf(8): Adjust some whitespace.
Sascha Wildner [Fri, 15 Mar 2013 19:27:16 +0000 (20:27 +0100)]
pciconf(8): Adjust some whitespace.

5 years agobsd-family-tree: Sync with FreeBSD (adds FreeBSD 9.1).
Sascha Wildner [Fri, 15 Mar 2013 17:52:50 +0000 (18:52 +0100)]
bsd-family-tree: Sync with FreeBSD (adds FreeBSD 9.1).

5 years agoUpdate the pciconf(8) database.
Sascha Wildner [Fri, 15 Mar 2013 16:29:00 +0000 (17:29 +0100)]
Update the pciconf(8) database.

March 14, 2013 snapshot from http://pciids.sourceforge.net/

5 years agoroute(8): Fix a possible infinite loop in "route flush"
Sepherosa Ziehau [Fri, 15 Mar 2013 09:44:11 +0000 (17:44 +0800)]
route(8): Fix a possible infinite loop in "route flush"

Obtained-from: FreeBSD 230989
DragonFly-bug: http://bugs.dragonflybsd.org/issues/2523

5 years agoifnet: Simplify ifnet_serialize_array function interface
Sepherosa Ziehau [Fri, 15 Mar 2013 08:35:40 +0000 (16:35 +0800)]
ifnet: Simplify ifnet_serialize_array function interface

It is no longer used to hold RX or TX serializers, so the RX/TX
serializer offset function arguments are not necessary at all.

5 years agoifsq: Let ifaltq_subque know its related hardware TX queue's serializer
Sepherosa Ziehau [Fri, 15 Mar 2013 05:57:21 +0000 (13:57 +0800)]
ifsq: Let ifaltq_subque know its related hardware TX queue's serializer

This avoids following operations on packet transmission hot path:
- Dereferening device driver supplied serialize function pointers
- Locating hardware TX queue's serializer

Comparing to the lwkt_serialize functions, the above two operations are

Driver changes:
- For device drivers which use the default ifnet serializer, no additional
  code will be needed, if_attach() will assign ifnet serializer to
- For device drivers which use independent serializers for main function,
  RX queues and TX queues, ifsq_set_hw_serialize() must be called to
  properly assign the hardware TX queue's serializer to ifaltq_subque.
  Drivers in this category are bce(4), emx(4), igb(4) and jme(4).

5 years agokern.post.mk: Put three more (minor) files under -Werror.
Sascha Wildner [Thu, 14 Mar 2013 21:03:52 +0000 (22:03 +0100)]
kern.post.mk: Put three more (minor) files under -Werror.

5 years agokern.post.mk: Remove some old commented out code.
Sascha Wildner [Thu, 14 Mar 2013 20:11:34 +0000 (21:11 +0100)]
kern.post.mk: Remove some old commented out code.

5 years agokernel: Remove 'nowerror' from two more files that don't need it.
Sascha Wildner [Thu, 14 Mar 2013 19:43:23 +0000 (20:43 +0100)]
kernel: Remove 'nowerror' from two more files that don't need it.

5 years agokernel: Remove 'nowerror' from two files that don't need it.
Sascha Wildner [Thu, 14 Mar 2013 19:39:47 +0000 (20:39 +0100)]
kernel: Remove 'nowerror' from two files that don't need it.

5 years agoSync zoneinfo database with tzdata2013b from ftp://ftp.iana.org/tz/releases
Sascha Wildner [Thu, 14 Mar 2013 17:10:19 +0000 (18:10 +0100)]
Sync zoneinfo database with tzdata2013b from ftp://ftp.iana.org/tz/releases

* africa: Morocco does not observe DST during Ramadan; try to predict
    Ramadan in Morocco as best we can. (Thanks to Erik Homoet for the

* northamerica: Haiti uses US daylight-saving rules this year, and
    presumably future years. This changes recent time stamps. (Thanks
    to Steffen Thorsen.)

* southamerica: Paraguay will end DST on March 24 this year. For now,
    assume it's just this year. (Thanks to Steffen Thorsen.)

5 years agokernel/pci: Don't perform the maximum register number check.
Sascha Wildner [Sun, 26 Feb 2012 14:41:52 +0000 (15:41 +0100)]
kernel/pci: Don't perform the maximum register number check.

Different sub-kinds of PCI buses may have different rules and thus it
is up for the bus backends to do proper input checks. For example,
PCIe allows configuration register numbers < 0x1000, while for PCI
proper the limit is 0x100.

Taken-from: FreeBSD

5 years agoDon't install manpage for spic(4), which is i386 only, on x86_64.
Sascha Wildner [Wed, 13 Mar 2013 17:12:03 +0000 (18:12 +0100)]
Don't install manpage for spic(4), which is i386 only, on x86_64.

5 years agoet: Enable MSI
Sepherosa Ziehau [Wed, 13 Mar 2013 13:34:04 +0000 (21:34 +0800)]
et: Enable MSI

5 years agore: Don't loop in the interrupt handler; it does no good
Sepherosa Ziehau [Wed, 13 Mar 2013 13:22:40 +0000 (21:22 +0800)]
re: Don't loop in the interrupt handler; it does no good

5 years agore: Use memory mapped IO for PCIe chips
Sepherosa Ziehau [Wed, 13 Mar 2013 13:15:10 +0000 (21:15 +0800)]
re: Use memory mapped IO for PCIe chips

5 years agore: Enable MSI on PCIe chips by default
Sepherosa Ziehau [Wed, 13 Mar 2013 12:18:19 +0000 (20:18 +0800)]
re: Enable MSI on PCIe chips by default

5 years agomsk.4: Document hw.mskc.msi.enable.
Sascha Wildner [Tue, 12 Mar 2013 21:04:32 +0000 (22:04 +0100)]
msk.4: Document hw.mskc.msi.enable.

5 years agokernel: Turn on -Werror for the gcc47 buildkernel.
Sascha Wildner [Tue, 12 Mar 2013 20:49:28 +0000 (21:49 +0100)]
kernel: Turn on -Werror for the gcc47 buildkernel.

5 years agokernel: Disable -Winline and -Wunused-but-set-variable for buildkernel.
Sascha Wildner [Tue, 12 Mar 2013 20:45:37 +0000 (21:45 +0100)]
kernel: Disable -Winline and -Wunused-but-set-variable for buildkernel.

-Winline's behavior is kind of unobvious to fix without further knowledge
about how the compiler decides what can be inlined and what not. A better
solution might be to remove "inline" from most declarations and instead
use __always_inline for what we absolutely need to inline.

-Wunused-but-set-variable (a gcc47 specific warning) is nice and can
point at places that need cleaning up (which we did for a lot of its
warnings) but at the end of the day, it doesn't catch many real bugs and
it also warns about some cases that we'd like to stay as they are, simply
because it's more convenient or would result in unnecessarily silly code.
We also moved it to WARNS=6 (from WARNS=2) for userland code.

Thanks to aggelos and sephe for sharing their thoughts.

5 years agokernel/asr: Fix -Waddress on gcc47.
Sascha Wildner [Tue, 12 Mar 2013 20:31:20 +0000 (21:31 +0100)]
kernel/asr: Fix -Waddress on gcc47.

gcc47 was complaining about two cases where an address that could never
be NULL was checked against NULL in the SG() macro. Work around it by
using a pointer in between.

5 years ago<sys/proc.h>: Fix buildworld.
Sascha Wildner [Tue, 12 Mar 2013 18:04:34 +0000 (19:04 +0100)]
<sys/proc.h>: Fix buildworld.

5 years agoemx: Update comment about multiple TX queues on 82574
Sepherosa Ziehau [Tue, 12 Mar 2013 12:38:58 +0000 (20:38 +0800)]
emx: Update comment about multiple TX queues on 82574

The watchdog timeout on TX queue0 when multiple TX queues are enable
is _not_ related to hardware TX checksum offloading.

In the latest 82574 specification (Feb 2013, rev 3.3), it claims the
same TX context setting up requirement for multiple TX queues as with
82571.  However, 82571 works quite well with multiple TX queues.