dragonfly.git
10 years agofix MXCSR default value v3.4.2
Markus Pfeiffer [Sat, 18 May 2013 14:56:47 +0000 (14:56 +0000)]
fix MXCSR default value

XEN fails to initialise its vcpus to behave like actual cpus. One
instance of this is that the MXCSR is not setup to the default
value documented in as documented in AMD64 Architecture
Programmer's Manual Volume 1: Application Programming, Section
Section 4.3.2

10 years agokernel -- x86_64: Do not set reserved bits in CR3.
Aggelos Economopoulos [Mon, 20 May 2013 18:56:07 +0000 (20:56 +0200)]
kernel -- x86_64: Do not set reserved bits in CR3.

The x86-64 platform code was setting PG_V, PG_U, and PG_RW bits in the
CR3 register. While the bits were supposed to cleared, Intel and AMD
hardware were ignoring them. Other x86-64 implementations, in
particular the software emulator in Linux's KVM, do check that these
reserved bits are zero.

Fixes issue running DragonFly x86_64 on KVM hosts without
two-dimensional (nested) paging.

Tested on a variety of real hardware (AMD FX(tm)-8150, c2q 6600, others)
and VM configurations (KVM on Intel/AMD hosts, Xen).

Committing-on-behalf-of: Venkatesh Srinivas <vsrinivas@ops101.org>
Reported-by: aggelos@, c.turner1, others.
Testing-by: aggelos@, swildner@, mneumann@, ftigeot@, profmakx@, Enjolras
Bug: 2561

10 years agolibc/citrus: Fix an assertion (& becomes &&).
Sascha Wildner [Sun, 26 May 2013 20:36:13 +0000 (22:36 +0200)]
libc/citrus: Fix an assertion (& becomes &&).

10 years agophantasia(6): Fix two operator precedence mistakes.
Sascha Wildner [Sun, 26 May 2013 19:59:37 +0000 (21:59 +0200)]
phantasia(6): Fix two operator precedence mistakes.

10 years agomrouted(8): Fix a wrong check that was always false.
Sascha Wildner [Sun, 26 May 2013 09:29:41 +0000 (11:29 +0200)]
mrouted(8): Fix a wrong check that was always false.

10 years agoip/udp: Make input source address and source port saving MPSAFE
Sepherosa Ziehau [Thu, 23 May 2013 07:29:24 +0000 (15:29 +0800)]
ip/udp: Make input source address and source port saving MPSAFE

Change the global variable udp_in, udp_in6 and udp_ip6 into stack variable
and passing them around.  This should unbreak applications which depend
on received datagrams' source address or source port.

10 years agoudp: Fix IP source address setting for multicast address bound socket (2)
Sepherosa Ziehau [Thu, 23 May 2013 05:35:07 +0000 (13:35 +0800)]
udp: Fix IP source address setting for multicast address bound socket (2)

Source address should _not_ be set to INADDR_ANY in udp_output(), which
will make udp_output() calculate wrong pseudo header checksum.  Instead
of letting IP to select the source address, we extend in_pcbladdr() to
always locate the laddr, and use this function to find the source address
in udp_output().

10 years agopf: Ask caller to recalculate packet hash, if nat/binat/rdr happens
Sepherosa Ziehau [Wed, 22 May 2013 13:27:41 +0000 (21:27 +0800)]
pf: Ask caller to recalculate packet hash, if nat/binat/rdr happens

This unbreaks redirect (rdr) to local address.

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

10 years agoixgbe: On transmit path, prepend the unconsumed mbuf to the if_snd
Sepherosa Ziehau [Tue, 21 May 2013 08:53:29 +0000 (16:53 +0800)]
ixgbe: On transmit path, prepend the unconsumed mbuf to the if_snd

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

10 years agosyncache: Avoid NULL accessing to tcpcb of the to-be-dropped syncache
Sepherosa Ziehau [Mon, 20 May 2013 13:44:32 +0000 (21:44 +0800)]
syncache: Avoid NULL accessing to tcpcb of the to-be-dropped syncache

It is possible that the syncache tcpcb is NULL when overflow happens,
e.g. the corresponding listen socket was closed but the timeout has
not recollected the staled syncache yet.

10 years agomsk: Disable MSI by default.
Sepherosa Ziehau [Mon, 20 May 2013 08:43:39 +0000 (16:43 +0800)]
msk: Disable MSI by default.

For certain chips, enabling it will cause watchdog timeout and the chip
may not be able to work again w/o rebooting.

Reported-by: ferz
10 years agobmake: Fix wildcard srcs for phony targets
John Marino [Sat, 18 May 2013 20:48:24 +0000 (22:48 +0200)]
bmake: Fix wildcard srcs for phony targets

Bug fix created by Simon G. at BSDcan 2013 when Baptiste mentioned the
incompatiblity with legacy make seen during adding support to ports for
bmake.  There is no impaet for world/kernel builds.

Taken-from: FreeBSD SVN 250773 (18 May 2013)

10 years agokernel - Fix devfs deadlock
Matthew Dillon [Tue, 14 May 2013 17:44:36 +0000 (10:44 -0700)]
kernel - Fix devfs deadlock

* Fix a devfs deadlock against getnewvnode() due to the devfs master
  lock being held.

* Most evident on 32-bit builds because 64-bit builds don't recycle vnodes
  as quickly.

Reported-by: marino
Analysis-by: vsrinivas
10 years agotop(1): Support wider terminals (Bug 2448)
John Marino [Tue, 14 May 2013 10:21:30 +0000 (12:21 +0200)]
top(1): Support wider terminals (Bug 2448)

Bump MAX_COLS from value of 255 to 512 to support wider terminals.
A similar change was also done on FreeBSD 5 months ago (r244180)

Reported-by: Charles Rapenne
https://bugs.dragonflybsd.org/issues/2448

10 years agokernel - Wakeup p->p_step on procfs close.
Matthew Dillon [Wed, 8 May 2013 23:11:55 +0000 (16:11 -0700)]
kernel - Wakeup p->p_step on procfs close.

* Wakeup p->p_step in addition to p->p_stype on procfs close.

Reported-by: vsrinivas
11 years agokernel/ng_iface: Add missing braces.
Sascha Wildner [Sat, 27 Apr 2013 01:03:29 +0000 (03:03 +0200)]
kernel/ng_iface: Add missing braces.

11 years agokernel/hptiop: Add missing braces.
Sascha Wildner [Sat, 27 Apr 2013 00:57:05 +0000 (02:57 +0200)]
kernel/hptiop: Add missing braces.

11 years agogpio/dsched/devfs: Fix wrong lock checks. v3.4.0 v3.4.1
Sascha Wildner [Tue, 23 Apr 2013 22:15:05 +0000 (00:15 +0200)]
gpio/dsched/devfs: Fix wrong lock checks.

11 years agoSync zoneinfo database with tzdata2013c from ftp://ftp.iana.org/tz/releases
Sascha Wildner [Mon, 22 Apr 2013 18:08:50 +0000 (20:08 +0200)]
Sync zoneinfo database with tzdata2013c from ftp://ftp.iana.org/tz/releases

* antarctica/australasia/zone.tab: Fix times of habitation for Macquarie
    to agree with the Tasmania Parks & Wildlife Service history, which
    indicates that permanent habitation was 1899-1919 and 1948 on. It is
    politically part of Australia, not Antarctica. (Thanks to Tobias
    Conradi.) Also, sort Macquarie more consistently with other parts of
    Australia. (Thanks to Tim Parenti.)

* asia: Palestine observed DST starting March 29, 2013. (Thanks to
    Steffen Thorsen.)  From 2013 on, Gaza and Hebron both observe DST,
    with the predicted rules being the last Thursday in March at 24:00
    to the first Friday on or after September 21 at 01:00. Also, fix
    some historical data for Palestine to agree with that of
    timeanddate.com.

* southamerica: Assume that the recent change to Paraguay's DST rules is
    permanent, by moving the end of DST to the 4th Sunday in March every
    year. (Thanks to Carlos Raul Perasso.)

11 years ago/usr/Makefile: Fix wrong indentation.
Sascha Wildner [Mon, 22 Apr 2013 08:30:38 +0000 (10:30 +0200)]
/usr/Makefile: Fix wrong indentation.

11 years agonrelease: Handle dports' /usr/distfiles better and remove /usr/dports.
Sascha Wildner [Sun, 21 Apr 2013 11:27:29 +0000 (13:27 +0200)]
nrelease: Handle dports' /usr/distfiles better and remove /usr/dports.

11 years agonrelease: Add pkg(8) to our images and ISOs.
Sascha Wildner [Sun, 21 Apr 2013 09:15:06 +0000 (11:15 +0200)]
nrelease: Add pkg(8) to our images and ISOs.

'make release' now requires an additional directory with the dports tree.

This commit adds some more steps (such as running 'pkg autoremove').

In-discussion-with: marino

11 years agonrelease: Remove an unused variable.
Sascha Wildner [Sat, 20 Apr 2013 11:33:16 +0000 (13:33 +0200)]
nrelease: Remove an unused variable.

11 years agonrelease: Don't install the git meta-pkg (it will pull in gitk).
Sascha Wildner [Fri, 19 Apr 2013 15:53:25 +0000 (17:53 +0200)]
nrelease: Don't install the git meta-pkg (it will pull in gitk).

11 years agopowerd - Fix load factor calculation bug for niced processes
Matthew Dillon [Thu, 18 Apr 2013 17:17:49 +0000 (10:17 -0700)]
powerd - Fix load factor calculation bug for niced processes

* A type-o in the load calculation code was not counting niced
  processes at all, so if you have a lot of niced processes
  (like ffmpeg's which nice themselves down), powerd can wind
  up restricting them all to a single cpu.  Doh!

11 years agoAdded master branch linking as part of the 'make src-create*' commands.
Justin C. Sherrill [Thu, 18 Apr 2013 02:59:40 +0000 (22:59 -0400)]
Added master branch linking as part of the 'make src-create*' commands.

Suggested-by: John Marino <dragonflybsd@marino.st>
11 years agoMakefile.inc: Rework automatic backup (bug 2527)
John Marino [Tue, 16 Apr 2013 00:42:13 +0000 (02:42 +0200)]
Makefile.inc: Rework automatic backup (bug 2527)

There were three main problems with the recently added backup feature:
1. It didn't work over NFS
2. It didn't work when a non-root built world the second time
3. It didn't use DESTDIR which had potential to conflict backups

It also previously featured "NO_BACKUP" which turned off the automatic
backup feature.  To fix the #2 problem, the install timestamp has been
removed, so to avoid unwanted backups for multiple installworlds after
one buildworld, the user needs to pass NO_BACKUP in the command line.

This patch was contributed by Thomas Nikolajsen with minor modifications
added by John Marino.

http://bugs.dragonflybsd.org/issues/2527

11 years agokernel/checkpoint: Fix wrong sizeof (p_sigacts is a pointer).
Sascha Wildner [Tue, 16 Apr 2013 17:13:19 +0000 (19:13 +0200)]
kernel/checkpoint: Fix wrong sizeof (p_sigacts is a pointer).

11 years agokernel/ndis: Fix typo in DRIVER_MODULE().
Sascha Wildner [Tue, 16 Apr 2013 16:37:19 +0000 (18:37 +0200)]
kernel/ndis: Fix typo in DRIVER_MODULE().

11 years agomined(1): Fix alignment issue on strict alignment architectures.
Sascha Wildner [Sun, 7 Apr 2013 21:59:44 +0000 (23:59 +0200)]
mined(1): Fix alignment issue on strict alignment architectures.

Reported-by: Eitan Adler <eadler@freebsd.org>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2541>

11 years agomined.1: Move some info from CAVEATS to DESCRIPTION.
Sascha Wildner [Sun, 7 Apr 2013 21:04:53 +0000 (23:04 +0200)]
mined.1: Move some info from CAVEATS to DESCRIPTION.

mandoc(1) warns about CAVEATS not being in conventional order and
silencing it by moving the section would have caused it to be behind
HISTORY even.

However, the info is more important than the editor's history, so
instead add it to the DESCRIPTION, which is short in this case, anyway.

Reported-by: Eitan Adler <eadler@freebsd.org>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2540>

11 years agodevelopment.7: Mention dragonfly.vim.
Sascha Wildner [Tue, 2 Apr 2013 19:23:19 +0000 (21:23 +0200)]
development.7: Mention dragonfly.vim.

11 years agokernel - Disable the read_shortcut feature by default in -release
Matthew Dillon [Thu, 11 Apr 2013 03:50:19 +0000 (20:50 -0700)]
kernel - Disable the read_shortcut feature by default in -release

* Disable the read_shortcut feature by default in -release.  It is fairly
  stable but there are currently two reports of deadlocks under heavy loads
  that have not been resolved.

  So for now the feature is disabled by default.  It can be enabled anytime
  via its sysctl on 64-bit machines for people who want to run with it
  anyway.

Reported-by: Peter Avalos <pavalos@dragonflybsd.org>, Francois Tigeot <ftigeot@wolfpond.org>
11 years agoAdd EXIT STATUS sections in some manual pages.
Sascha Wildner [Wed, 10 Apr 2013 17:10:53 +0000 (19:10 +0200)]
Add EXIT STATUS sections in some manual pages.

11 years agormdir.1: Add EXIT STATUS section and fix a typo.
Sascha Wildner [Wed, 10 Apr 2013 16:57:21 +0000 (18:57 +0200)]
rmdir.1: Add EXIT STATUS section and fix a typo.

11 years agoMakefile_upgrade.inc: Fix typo.
Sascha Wildner [Wed, 10 Apr 2013 16:12:08 +0000 (18:12 +0200)]
Makefile_upgrade.inc: Fix typo.

11 years agoioapic: Relocate IRQ if it hits SYSCALL entry
Sepherosa Ziehau [Wed, 10 Apr 2013 03:10:33 +0000 (11:10 +0800)]
ioapic: Relocate IRQ if it hits SYSCALL entry

The system hitting the "unused IRQ assertion" has 5x24 pin IOAPICs

Reported-by: ruse39
11 years agobce: BCM5716's MSI does not have bug either
Sepherosa Ziehau [Tue, 9 Apr 2013 09:18:31 +0000 (17:18 +0800)]
bce: BCM5716's MSI does not have bug either

11 years agoip/udp: Fix IP source address setting for multicast address bound socket
Sepherosa Ziehau [Tue, 9 Apr 2013 03:06:39 +0000 (11:06 +0800)]
ip/udp: Fix IP source address setting for multicast address bound socket

It is a common practice to bind UDP socket to multicast address to enjoy
kernel level destination multicast address and port filtering.  However,
if data are sent on this kind of socket, source address of the IP packet
will be the bound multicast address?!

Two fixes are added to address this bug:

1) Don't set IP source address in udp_output(), if the inpcb's laddr is
   multicast address.  Instead the IP source address is set to INADDR_ANY,
   so ip_output() could pick up a proper IP source address.

2) With 1) in place, it is possible that IP source address is INADDR_ANY
   before the ifnet.if_output() using following steps:
   - If the IP_MULTICAST_IF socket option is set to iface0
   - The iface0's last IP address is unset, before the ip_output()

   This condition could easily be reproduced by using test/mcast:
   mcast -m 224.2.2.2 -p 3000 -i iface0_ip -D 10
   During the 10sec delay, wipe out all IP addresses from iface0

   Well, even without 1), raw IP still could generate IP packet using
   INADDR_ANY as source address.

   Two checks on the source IP address are added to ip_output() before
   ifnet.if_output()
   - IP source address should not be INADDR_ANY
   - IP source address should not be multicast address

   And for multicast IP packets, if the IP source address could be
   determined, they will not be looped back and forwarded.

Reported-by: zeroxia
11 years agoip_output: Record the "src was INADDR_ANY" for multicast packets
Sepherosa Ziehau [Tue, 9 Apr 2013 02:32:22 +0000 (10:32 +0800)]
ip_output: Record the "src was INADDR_ANY" for multicast packets

While I'm here, fix the comment on the unicast packet output path.

11 years agoftp: Update files for tnftp-20121224 import.
Peter Avalos [Sun, 7 Apr 2013 04:55:23 +0000 (21:55 -0700)]
ftp: Update files for tnftp-20121224 import.

11 years agoMerge branch 'vendor/TNFTP' into DragonFly_RELEASE_3_4
Peter Avalos [Sun, 7 Apr 2013 05:01:35 +0000 (22:01 -0700)]
Merge branch 'vendor/TNFTP' into DragonFly_RELEASE_3_4

11 years agode: Reset chip after calling ether_ifattach()
Sepherosa Ziehau [Sun, 7 Apr 2013 04:57:49 +0000 (12:57 +0800)]
de: Reset chip after calling ether_ifattach()

Else the ifnet is not completely initialized

Reported-by: swildner@
11 years agoImport tnftp-20121224.
Peter Avalos [Sun, 7 Apr 2013 04:34:01 +0000 (21:34 -0700)]
Import tnftp-20121224.

* Add https support.
* When using the response to SYST to decide whether to default to
  'binary' be a lot less specific.

Obtained-from:   NetBSD

11 years agokernel/if_ndis: Grab the serializer around if_devstart().
Sascha Wildner [Fri, 5 Apr 2013 03:50:55 +0000 (05:50 +0200)]
kernel/if_ndis: Grab the serializer around if_devstart().

Submitted-by: sephe
11 years agoMerge branch 'DragonFly_RELEASE_3_4' of ssh://crater.dragonflybsd.org/repository...
Justin C. Sherrill [Wed, 3 Apr 2013 01:38:42 +0000 (21:38 -0400)]
Merge branch 'DragonFly_RELEASE_3_4' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into DragonFly_RELEASE_3_4

Conflicts:
sys/sys/param.h

11 years agoAdjust branch in newvers.sh.
Sascha Wildner [Tue, 2 Apr 2013 20:12:26 +0000 (22:12 +0200)]
Adjust branch in newvers.sh.

11 years agokernel: Fix build without DDB.
Sascha Wildner [Tue, 2 Apr 2013 18:04:08 +0000 (20:04 +0200)]
kernel: Fix build without DDB.

11 years agoBump __DragonFly_version and the manpage version for 3.4.
Sascha Wildner [Tue, 2 Apr 2013 17:34:03 +0000 (19:34 +0200)]
Bump __DragonFly_version and the manpage version for 3.4.

11 years agore: Don't enable MSI by default even for PCI-e chips
Sepherosa Ziehau [Tue, 2 Apr 2013 03:14:02 +0000 (11:14 +0800)]
re: Don't enable MSI by default even for PCI-e chips

It causes more troubles than the benefits it brings for us; it causes
watchdog, due to loosing interrupt, on certain PCI-e chips.

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

11 years agoUpdating for DragonFly 3.4 branch. v3.4.0rc
Justin C. Sherrill [Tue, 2 Apr 2013 02:12:38 +0000 (22:12 -0400)]
Updating for DragonFly 3.4 branch.

11 years agokernel: Fix buildkernel without INVARIANTS.
Sascha Wildner [Mon, 1 Apr 2013 21:43:09 +0000 (23:43 +0200)]
kernel: Fix buildkernel without INVARIANTS.

Reported-by: Filippo Moretti <filippomore@yahoo.com>
11 years agomfi(4)/mfiutil(8): Add support for foreign configurations and drives.
Sascha Wildner [Mon, 1 Apr 2013 21:26:47 +0000 (23:26 +0200)]
mfi(4)/mfiutil(8): Add support for foreign configurations and drives.

For this, the following commands are added to mfiutil(8):

foreign scan - lists the number of foreign configs
foreign drives - lists the drives which are flagged as foreign
foreign display - displays the specified foreign configuration
foreign preview - previews the specified foreign configuration after import
foreign clear - clears the foreign configuration
foreign import - imports the foreign configuration

Foreign drive support has been added to 'show drives' too.

Tested-by: ftigeot
Taken-from: http://www.freebsd.org/cgi/query-pr.cgi?pr=172091

11 years agokernel/mfi: Add a tunable/sysctl to modify the command timeout.
Sascha Wildner [Mon, 1 Apr 2013 15:41:51 +0000 (17:41 +0200)]
kernel/mfi: Add a tunable/sysctl to modify the command timeout.

11 years agokernel: Make tty_compat.c optional in 'files' instead of in the source.
Sascha Wildner [Mon, 1 Apr 2013 20:14:06 +0000 (22:14 +0200)]
kernel: Make tty_compat.c optional in 'files' instead of in the source.

11 years agobsd.sys.mk: Add -Wmissing-include-dirs to WARNS >= 1.
Sascha Wildner [Mon, 1 Apr 2013 13:47:21 +0000 (15:47 +0200)]
bsd.sys.mk: Add -Wmissing-include-dirs to WARNS >= 1.

It ensures that all directories passed with -I<dir> actually exist.

11 years agolibc: Fix -Wmissing-include-dirs.
Sascha Wildner [Mon, 1 Apr 2013 13:45:00 +0000 (15:45 +0200)]
libc: Fix -Wmissing-include-dirs.

11 years agobnx: Pack TX mbuf and dmamap together; improve cache utilization
Sepherosa Ziehau [Mon, 1 Apr 2013 09:55:27 +0000 (17:55 +0800)]
bnx: Pack TX mbuf and dmamap together; improve cache utilization

11 years agoMerge remote-tracking branch 'hofmann/wlan_serialize'
Sepherosa Ziehau [Mon, 1 Apr 2013 07:48:49 +0000 (15:48 +0800)]
Merge remote-tracking branch 'hofmann/wlan_serialize'

11 years agociss(4): Fix build with CISS_DEBUG.
Sascha Wildner [Sun, 31 Mar 2013 19:45:49 +0000 (21:45 +0200)]
ciss(4): Fix build with CISS_DEBUG.

11 years agobnx: Properly setup TX ring prod index position
Sepherosa Ziehau [Sun, 31 Mar 2013 12:29:46 +0000 (20:29 +0800)]
bnx: Properly setup TX ring prod index position

11 years agobge: Limit STD RX ring prod index increment to 8 for 5750, 5752 and 5755
Sepherosa Ziehau [Sun, 31 Mar 2013 10:26:40 +0000 (18:26 +0800)]
bge: Limit STD RX ring prod index increment to 8 for 5750, 5752 and 5755

This works around hardware errata.

NOTE:
For 5750, 5752 and 5755, the STD RX ring replesh threshold has already
been set to 8.

Obtained-from: tg3

11 years agolock(1): Use %jd for printing intmax_t.
Sascha Wildner [Sat, 30 Mar 2013 12:20:58 +0000 (13:20 +0100)]
lock(1): Use %jd for printing intmax_t.

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

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

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

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

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

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

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

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

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

11 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
Makefile.inc.

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
WARNS=1.

11 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.

11 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.

11 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'.

11 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

11 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

11 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

11 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.

11 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

11 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

11 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

11 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

11 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

11 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

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

11 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
11 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.

11 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

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

11 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.

11 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()

11 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.

11 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
11 years agonrelease: Use variables.
Sascha Wildner [Tue, 26 Mar 2013 20:26:05 +0000 (21:26 +0100)]
nrelease: Use variables.

11 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@
11 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

11 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.

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