dragonfly.git
9 years agoSync ACPICA with Intel's version 20140828.
Sascha Wildner [Sat, 30 Aug 2014 09:50:38 +0000 (11:50 +0200)]
Sync ACPICA with Intel's version 20140828.

* Add support for runtime validation of the _DSD package.

* Add the GICC affinity subtable to the SRAT table.

* Add error detection for illegally named references within control
    methods that would cause runtime failures.

* Add error checking for dependencies related to the _PSx power
    methods.

* Various improvements, bug fixes and cleanups.

For a more detailed list, please see sys/contrib/dev/acpica/changes.txt.

9 years agokernel/devfs: Allow devices to devctl_notify() also during cold boot.
Sascha Wildner [Fri, 29 Aug 2014 08:07:36 +0000 (10:07 +0200)]
kernel/devfs: Allow devices to devctl_notify() also during cold boot.

This fixes the issue that no moused(8) was started if a USB mouse was
plugged in already during booting.

While here, also rename the notify function.

In-collaboration-with: mneumann

9 years agorc.conf: Provide a default for rc_startmsgs and document it.
Sascha Wildner [Fri, 29 Aug 2014 08:03:01 +0000 (10:03 +0200)]
rc.conf: Provide a default for rc_startmsgs and document it.

9 years agonrelease: Do not provide default make.conf files.
Sascha Wildner [Fri, 29 Aug 2014 07:16:50 +0000 (09:16 +0200)]
nrelease: Do not provide default make.conf files.

The git package delivered on the installation media is special in the
sense that it is built with certain options not set to prevent it from
pulling in python and perl as dependencies (to keep the ISOs small,
mainly).

Once the system is installed, storage size is no longer really an issue,
so there is no need to have those options in the make.conf we install.

After this commit, a manually built git package should match the binary
package which we provide.

9 years agoudev - use objcache for struct udev_event_kernel
Michael Neumann [Tue, 26 Aug 2014 23:24:47 +0000 (01:24 +0200)]
udev - use objcache for struct udev_event_kernel

9 years agodrm/i915: Implement GEM GET and SET_CACHING ioctls
François Tigeot [Tue, 26 Aug 2014 16:21:17 +0000 (18:21 +0200)]
drm/i915: Implement GEM GET and SET_CACHING ioctls

They can be used by userspace drivers to accelerate uploads and downloads
from the GPU and also mix CPU and GPU rendering/activity efficiently.

Obtained-from: Linux 3.8.13

9 years agorc.conf.5: Document moused_nondefault_enable (taken from FreeBSD).
Sascha Wildner [Tue, 26 Aug 2014 13:43:05 +0000 (15:43 +0200)]
rc.conf.5: Document moused_nondefault_enable (taken from FreeBSD).

9 years agomoused - Ease usb mouse attach/detach
Michael Neumann [Mon, 25 Aug 2014 16:59:02 +0000 (18:59 +0200)]
moused - Ease usb mouse attach/detach

WARNING: Upgrading will overwrite your /etc/devd.conf.

Extend /etc/rc.d/moused. To attach e.g. ums0, you can now call:

    /etc/rc.d/moused start ums0

To detach:

    /etc/rc.d/moused stop ums0

If moused is called with an explicit device name, it is enabled by default
(moused_nondefault_enable="YES").

You can explicitly override any settings in rc.conf with directives like:

    moused_ums0_enable="YES"
    moused_ums0_type="..."

If you have one or more ums[0-9]+ mouses, you can now make use of them by
simply setting devd_enable="YES" in rc.conf.

9 years agobuild - separate out the rescue initrd
Matthew Dillon [Mon, 25 Aug 2014 16:51:29 +0000 (09:51 -0700)]
build - separate out the rescue initrd

* Multiple issues with users crashing at the end of an installworld because
  initrd kldloads an out-of-date vn device.

* Not a good idea to update the rescue image during an installworld anyway.

* Make it a manual target called 'rescue' and remind the user at the end
  of the installworld that the target is available, but suggest
  rebooting first.

9 years agokernel config - Build 'vn' into the kernel
Matthew Dillon [Mon, 25 Aug 2014 16:40:39 +0000 (09:40 -0700)]
kernel config - Build 'vn' into the kernel

* Build vn into the kernel, we are using it in the build system and
  its not a good idea to kldload it during a buildworld or installworld.

9 years agotest: Add bunch of tests for udp protocol
Sepherosa Ziehau [Mon, 25 Aug 2014 12:55:53 +0000 (20:55 +0800)]
test: Add bunch of tests for udp protocol

They test various combination of bind(2), connect(2) and sendto(2)
for both unicast and multicast.  Unicast tests work w/ udpecho in
tools/netrate.  Multicast tests work w/ mcastsend.

9 years agokernel/spinlock: Add a description to struct spinlock.
Sascha Wildner [Sun, 24 Aug 2014 21:54:16 +0000 (23:54 +0200)]
kernel/spinlock: Add a description to struct spinlock.

And add it to spin_init() and SPINLOCK_INITIALIZER().

Submitted-by: dclink (see <http://bugs.dragonflybsd.org/issues/2714>)
OK'd-by:      dillon

9 years agounifdef.1: Use Mt.
Sascha Wildner [Sun, 24 Aug 2014 21:51:43 +0000 (23:51 +0200)]
unifdef.1: Use Mt.

9 years agoiwn - Sync with FreeBSD up to ffb6d5c3967d1342fa5e2d6f51c8ea8aff1419e2
Michael Neumann [Sat, 23 Aug 2014 23:23:40 +0000 (01:23 +0200)]
iwn - Sync with FreeBSD up to ffb6d5c3967d1342fa5e2d6f51c8ea8aff1419e2

9 years agoucom - Hack unref to fix infinite 1-second wait loop.
Matthew Dillon [Sat, 23 Aug 2014 17:57:13 +0000 (10:57 -0700)]
ucom - Hack unref to fix infinite 1-second wait loop.

* ucom depended on the .tsw_* switch to decomission ports, which we do
  not use currently.  This was preventing the ucom from being properly
  dereferenced and resulted in an infinite 1-second wait loop on close.

* Move the unref elsewhere to hopefully solve the problem.

9 years agokernel - Fix sendfile() bugs / nginx
Matthew Dillon [Sat, 23 Aug 2014 17:53:25 +0000 (10:53 -0700)]
kernel - Fix sendfile() bugs / nginx

* Fix a sendfile() bug tickled by nginx.  When sending partial file bodies the
  nbytes test was improperly included the header bytes in its file body limit
  test.  This caused sendfile() to return 0 (complete success) but not
  actually output the entirety of the requested file segment.

* sendfile() now holds VM pages instead of wiring them.  Wiring the pages
  prevents truncation operations from succeeded and can further cause a
  kernel panic if the underlying file is deleted and the descriptor is
  closed while mbufs related to the sendfile() are still pending on the
  socket.

Massive-debugging-by: joris
9 years ago[iwn] Fix required calibration flags for the Centrino 1000 NIC.
Michael Neumann [Sat, 23 Aug 2014 11:03:58 +0000 (13:03 +0200)]
[iwn] Fix required calibration flags for the Centrino 1000 NIC.

Tested with Intel Centrino Wireless-N 1000.

Obtained-From: FreeBSD (commit dd4e54a1ddf657f080a88c674e12459f404dea61)
Fixes: http://bugs.dragonflybsd.org/issues/2720

9 years agokernel/pci: Use spin_*() functions directly.
Sascha Wildner [Sat, 23 Aug 2014 10:37:59 +0000 (12:37 +0200)]
kernel/pci: Use spin_*() functions directly.

9 years agou4b - Fix panic on certain cell phone connections
Matthew Dillon [Fri, 22 Aug 2014 21:59:46 +0000 (14:59 -0700)]
u4b - Fix panic on certain cell phone connections

* Remove incorrect unlock in ucom_close().

* Add missing usb_callout_stop() to umass_cam_detach_sim(), fixes issue with umass
  if the mass-storage device quickly connects and disconnects from the bus.

Reported-by: Rolinh
9 years agosendmail - pre-fork in daemon mode to avoid stall (2)
Matthew Dillon [Fri, 22 Aug 2014 18:41:54 +0000 (11:41 -0700)]
sendmail - pre-fork in daemon mode to avoid stall (2)

* disconnect() and set CurrentPid on pre-fork.  This fixes an issue where
  the boot console is revoked and enters getty before the backgrounded
  sendmail disconnects from the foreground process and tty, causing sendmail
  to complain in /var/log/maillog.

  This issue can occur due to myhostname() stalls when the internet is not
  available (e.g. /etc/resolv.conf is present but wifi-only system has not
  yet associated), or has other connectivity issues during boot.

Reported-by: Rolinh
9 years agokernel/kern_dup(): Fix comment.
Sascha Wildner [Thu, 21 Aug 2014 20:16:40 +0000 (22:16 +0200)]
kernel/kern_dup(): Fix comment.

9 years agokernel: Fix error for dup2 if the new file descriptor is out of bounds.
Sascha Wildner [Thu, 21 Aug 2014 20:12:01 +0000 (22:12 +0200)]
kernel: Fix error for dup2 if the new file descriptor is out of bounds.

According to POSIX, when using fcntl()'s F_DUPFD or F_DUPFD_CLOEXEC
commands and the new file descriptor is out of bounds, EINVAL must be
returned. But if it is out of bounds when using dup2(), EBADF must be
returned.

So add detection of whether kern_dup() was called from kern_fcntl() or
from sys_dup2() and act accordingly.

9 years agoMove from dns/bind98 on install img/iso to dns/bind-tools.
Justin C. Sherrill [Thu, 21 Aug 2014 06:02:05 +0000 (02:02 -0400)]
Move from dns/bind98 on install img/iso to dns/bind-tools.

BIND 9.8 is reaching EOL in a month.  We don't need a full version of
BIND on the default install, since bind-tools provides dig/nslookup/host
and so on.

9 years agosys/subr_rman: fix some issues
Markus Pfeiffer [Tue, 19 Aug 2014 21:28:53 +0000 (21:28 +0000)]
sys/subr_rman: fix some issues

Some bounds checks were off which lead to bad interactions with the
ram reservation code in nexus.

9 years agosys/platform/pc64: port the ram device from FreeBSD's nexus.c
Markus Pfeiffer [Sun, 17 Aug 2014 15:48:16 +0000 (16:48 +0100)]
sys/platform/pc64: port the ram device from FreeBSD's nexus.c

Our kernel didn't reserve RAM in the IO manager, which lead to
mmaped IO from devices being mapped in the same address space,
most notably this lead to problems with the i915 driver, bug

9 years agokernel/ath: Add missing #ifdef ATH_DEBUG (fixes kernel build).
Sascha Wildner [Wed, 20 Aug 2014 18:49:11 +0000 (20:49 +0200)]
kernel/ath: Add missing #ifdef ATH_DEBUG (fixes kernel build).

Reported-by: Robin Hahling <robin.hahling@gw-computing.net>
9 years agocsh(1): Use iconv().
Sascha Wildner [Wed, 20 Aug 2014 18:45:30 +0000 (20:45 +0200)]
csh(1): Use iconv().

Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2704>
Reported-by: s4
9 years agoath - move kprintf() under debug variable
Matthew Dillon [Wed, 20 Aug 2014 17:42:24 +0000 (10:42 -0700)]
ath - move kprintf() under debug variable

* Move an unconditional debugging kprintf() under a debug variable.

9 years agodhclient - Do not force-up wlan interfaces
Matthew Dillon [Wed, 20 Aug 2014 17:34:14 +0000 (10:34 -0700)]
dhclient - Do not force-up wlan interfaces

* Do not force a wlan interface up, this may interfere with wpa_supplicant
  operation.

* Increase the default timeout for waiting for the interface to become
  active from 10 seconds to 30 seconds.  wlan interfaces can take
  considerably longer than 10 seconds to associate and dhclient operation
  now detaches without waiting so the longer timeout will not interfere
  with the boot sequence.

9 years agoboot - don't wait for wpa_supplicant to associate
Matthew Dillon [Wed, 20 Aug 2014 17:04:09 +0000 (10:04 -0700)]
boot - don't wait for wpa_supplicant to associate

* Do not wait for wpa_supplicant to associate as doing so will prevent
  the machine from finishing the boot sequence if there are no base stations
  in range.

  We can do this now because the new dhclient will not blow up.

9 years agodhclient - Adjust documentation
Matthew Dillon [Wed, 20 Aug 2014 16:56:03 +0000 (09:56 -0700)]
dhclient - Adjust documentation

* Document how the pidfile works.

* Document that executing a dhclient on an interface which already has a
  running dhclient will kill the old dhclient and replace it with a new
  instance.

9 years agosendmail - pre-fork in daemon mode to avoid stall
Matthew Dillon [Wed, 20 Aug 2014 16:54:46 +0000 (09:54 -0700)]
sendmail - pre-fork in daemon mode to avoid stall

* Fork sendmail prior to doing the hostname lookup when run in -bd or -q<time>
  mode.

* Prevents stalls during system boot when the internet is not available and
  a resolv.conf is present.

9 years agobsd-family-tree: Sync with FreeBSD (for various minor DragonFly releases).
Sascha Wildner [Wed, 20 Aug 2014 16:10:14 +0000 (18:10 +0200)]
bsd-family-tree: Sync with FreeBSD (for various minor DragonFly releases).

Patch-by: Zach Crownover
9 years agodhclient - Add -x and -w and adjust rc scripts
Matthew Dillon [Wed, 20 Aug 2014 01:57:05 +0000 (18:57 -0700)]
dhclient - Add -x and -w and adjust rc scripts

* Add the -w option which prevents dhclient from exiting on interface
  down.  dhclient will sleep 10 seconds and retry, forever.

* Add the -x option which kills any running dhclient on the specified
  interface.

* Adjust rc.d/dhclient to use the -x option to kill the dhclient instead
  of taking down the interface (which no longer kills it), and also adjust
  the default flags to pass -w.

9 years agopam/pam_unix: Sync function declaration and definition.
Sascha Wildner [Tue, 19 Aug 2014 20:11:05 +0000 (22:11 +0200)]
pam/pam_unix: Sync function declaration and definition.

No functional change.

Taken-from: FreeBSD

9 years agolibstand: Add a missing free() in an error path.
Sascha Wildner [Tue, 19 Aug 2014 20:10:10 +0000 (22:10 +0200)]
libstand: Add a missing free() in an error path.

9 years agolibc/locale: Remove a wrong comma in the monetary testcase.
Sascha Wildner [Tue, 19 Aug 2014 20:09:23 +0000 (22:09 +0200)]
libc/locale: Remove a wrong comma in the monetary testcase.

9 years agolibc/valloc(): Use posix_memalign().
Sascha Wildner [Tue, 19 Aug 2014 20:08:47 +0000 (22:08 +0200)]
libc/valloc(): Use posix_memalign().

Taken-from: FreeBSD

9 years agokernel - Add EVFILT_USER
Matthew Dillon [Mon, 18 Aug 2014 21:04:44 +0000 (14:04 -0700)]
kernel - Add EVFILT_USER

* Bring in EVFILT_USER support from FreeBSD.  Document the hacked use of
  EV_CLEAR.

* Implemented a bit differently.  Currently not implemented as another
  filter callback.  Instead we explicitly test for user_filtops, which
  isn't as messy (at least until some other kqueue feature needs the 'touch'
  interface).

Taken-From: FreeBSD

9 years agocyapa - attempt #2 to fix boot issue
Matthew Dillon [Mon, 18 Aug 2014 07:55:09 +0000 (00:55 -0700)]
cyapa - attempt #2 to fix boot issue

* Previous fix didn't work.  It appears that the trackpad can sometimes
  loose its mind even after initializing ok, so instead of doing a load-time
  fix we now check the status byte in the poll.

* If the poll status indicates that cyapa is not running the device will be
  bootstrapped again.

* Also, when not running do not try to interpret remaining status fields
  for input.

9 years agodrm/i915: Sync ioctl definitions with Linux 3.8.13
François Tigeot [Mon, 18 Aug 2014 06:34:57 +0000 (08:34 +0200)]
drm/i915: Sync ioctl definitions with Linux 3.8.13

Many ioctls are now unlocked.

9 years agocyapa - Implement power save mode, try to fix boot issue (Acer c720 chromebook)
Matthew Dillon [Mon, 18 Aug 2014 06:37:20 +0000 (23:37 -0700)]
cyapa - Implement power save mode, try to fix boot issue (Acer c720 chromebook)

* Implement power save mode when the pad hasn't been touched for 10 seconds.
  Return to full power on any activity.

* Try to fix an issue when cyapa is loaded from /boot/loader.conf or built
  into the kernel.  For some reason cyapa polls that it isn't running but
  we'd already gone through the bootstrap sequence and determined that it
  was running.  Why it stops is not known but it appears doing a status query
  after init completion puts it in the right state.

9 years agodmesg - flush stdout before sleeping
Matthew Dillon [Mon, 18 Aug 2014 06:36:46 +0000 (23:36 -0700)]
dmesg - flush stdout before sleeping

* Flush output before sleeping when dmesg -f is specified.

9 years agodrm/ttm: Add missing kfree().
Sascha Wildner [Sun, 17 Aug 2014 18:29:21 +0000 (20:29 +0200)]
drm/ttm: Add missing kfree().

9 years agodrm/i915: Fix a missing initialization.
Sascha Wildner [Sun, 17 Aug 2014 18:17:23 +0000 (20:17 +0200)]
drm/i915: Fix a missing initialization.

9 years ago<sys/taskqueue>: Remove FreeBSD specific, *_fast() related defines.
Sascha Wildner [Sun, 17 Aug 2014 10:33:44 +0000 (12:33 +0200)]
<sys/taskqueue>: Remove FreeBSD specific, *_fast() related defines.

They were brought in with d96c147595b4f9046cb3d1682071adf4f98a2204.

9 years agodrm/i915: Enable fbc on Mobile Ironlake
François Tigeot [Sun, 17 Aug 2014 09:08:58 +0000 (11:08 +0200)]
drm/i915: Enable fbc on Mobile Ironlake

9 years agounifdef(1): Update to upstream version 2.10.15.a52596a
Sascha Wildner [Sat, 16 Aug 2014 21:09:39 +0000 (23:09 +0200)]
unifdef(1): Update to upstream version 2.10.15.a52596a

Taken-from: http://dotat.at/prog/unifdef/

9 years agoath - Change the way the edma rxfifo is reset (2)
Matthew Dillon [Sat, 16 Aug 2014 20:54:17 +0000 (13:54 -0700)]
ath - Change the way the edma rxfifo is reset (2)

* Correct a debugging change that wasn't supposed to go in.

9 years agoath - Change the way the edma rxfifo is reset
Matthew Dillon [Sat, 16 Aug 2014 20:36:21 +0000 (13:36 -0700)]
ath - Change the way the edma rxfifo is reset

* Do not unconditionally try to reload the whole FIFO.  Instead set a flag
  when the HAL is reset.

* Force the hal to cold-reset every time for now to match the flag.

* Currently a hack until a Adrian comes up with the correct fix.

* TODO - Currently does not re-enable the RXEOL interrupt correctly.

9 years agokernel - Adjust BUS_DMASYNC_* API
Matthew Dillon [Sat, 16 Aug 2014 20:32:22 +0000 (13:32 -0700)]
kernel - Adjust BUS_DMASYNC_* API

* Change the BUS_DMASYNC_* enumeration to a bitmask to allow multiple
  flags to be specified in one call.

* Now more compatible with FreeBSD and one less thing to worry about when
  porting a driver.

* While we are at it, allow add_bounce_page() to modify the size.  This has
  no effect on the current codebase since bounce pages are page-aligned (so the
  page-residual will never be less than the passed address), but is more
  correct.

* Fixes bounce-buffer issue with if_ath.

9 years agolibc: Remove unneeded semconfig function & file.
Sascha Wildner [Sat, 16 Aug 2014 12:56:00 +0000 (14:56 +0200)]
libc: Remove unneeded semconfig function & file.

9 years agodrm/i915: Sync i915_drv.h and i915_debugfs.c with Linux 3.8.13
François Tigeot [Sat, 16 Aug 2014 09:52:04 +0000 (11:52 +0200)]
drm/i915: Sync i915_drv.h and i915_debugfs.c with Linux 3.8.13

9 years agoath - incremental update ath from FreeBSD
Matthew Dillon [Sat, 16 Aug 2014 06:03:53 +0000 (23:03 -0700)]
ath - incremental update ath from FreeBSD

* Update to fbsd 61ad4c7509a280c218a389f91026136cec60708e
  (Aug 11 2014).

9 years agoath - incremental update ar9300 from FreeBSD
Matthew Dillon [Sat, 16 Aug 2014 05:55:43 +0000 (22:55 -0700)]
ath - incremental update ar9300 from FreeBSD

* Update to fbsd 61ad4c7509a280c218a389f91026136cec60708e
  (Aug 11 2014).

* Minor adjustments to the ar9300 hal, plus sysctl support for
  forced cold reset.

9 years agokernel - Reduce ig4 receive errors
Matthew Dillon [Fri, 15 Aug 2014 17:05:21 +0000 (10:05 -0700)]
kernel - Reduce ig4 receive errors

* The timeout code now checks the FIFO and register status at least once
  before testing whether the timeout has been exceeded, and at least once
  more after waiting the timeout period.

  Previously the code would check, see that no data was present, then delay
  a little and check whether a timeout occurred after the delay without
  again testing whether data is present.

* Appears to fix receive timeouts reported by cyapa and atmel_mxt.

9 years agoUpdate the pciconf(8) database.
Sascha Wildner [Fri, 15 Aug 2014 13:56:35 +0000 (15:56 +0200)]
Update the pciconf(8) database.

August 10, 2014 snapshot from http://pciids.sourceforge.net/

9 years agoatmel - Add automatic recalibration
Matthew Dillon [Fri, 15 Aug 2014 07:14:38 +0000 (00:14 -0700)]
atmel - Add automatic recalibration

* Add automatic recalibration every 30 seconds when idle.  I'm really not
  sure if this is necessary or not but for now we do it.

* Interval can be adjusted with sysctl debug.atmel_mxt_autocalibrate,
  set to 0 to disable.

9 years agoig4 - Fix rxdata shift error and add debugging
Matthew Dillon [Fri, 15 Aug 2014 07:10:53 +0000 (00:10 -0700)]
ig4 - Fix rxdata shift error and add debugging

* Fix a bug where the rx fifo can wind up with spurious data that never
  clears because later commands are always one-ahead of it.

* Report rx data failures and spurious rx fifo data, except when the
  NOREPORT flag has been specified.

9 years agosmbus - Add SMB_TRANS_NOREPORT
Matthew Dillon [Fri, 15 Aug 2014 07:09:32 +0000 (00:09 -0700)]
smbus - Add SMB_TRANS_NOREPORT

* Add a flag to tell subsystems not to report errors (during probing).

9 years agodrm/i915: Only build on amd64/x86_64 machines
François Tigeot [Fri, 15 Aug 2014 06:44:44 +0000 (08:44 +0200)]
drm/i915: Only build on amd64/x86_64 machines

This driver now requires a direct memory map.

9 years agoatmel_mxt - Add atmel MXT touchscreen driver (Acer c720p)
Matthew Dillon [Fri, 15 Aug 2014 01:52:07 +0000 (18:52 -0700)]
atmel_mxt - Add atmel MXT touchscreen driver (Acer c720p)

* Implements the communications infrastructure on the hardware backend and
  emulates an elographics tablet on the frontend.

* X Configuration is:

    Section "InputDevice"
    Identifier  "TouchScreen0"
    Driver      "elographics"
    Option      "Device" "/dev/atmel1-4a"
    #       Option      "ZAxisMapping" "4 5 6 7"
    EndSection

* System configuration is (in /boot/loader.conf):

    ig4_load="YES"
    atmel_mxt_load="YES"

* Currently only tested and only likely to work with the Acer c720p.
  Can do basic touchscreen operations... hold-move-and-release for
  button-1.  Can move or resize windows (you may want to make your resize
  widgets bigger).  Can hit buttons and hotlinks in browsers.  Cannot
  scroll a browser window on its own.

* Noise issues.  I've noticed that both my chromebooks have a lot of mouse
  pointer jitter with both the trackpad and the touchscreen, more than
  I can actually fix.  I've noticed some complaints on the linux forums too
  so it aint just us.

  The jitter is reduced if you put the laptop on your lap, and appears to
  go away entirely if the laptop is on your lap AND the power is disconnected
  (i.e. running on battery).

9 years agodrm/i915: grab the config log on hardware init
Markus Pfeiffer [Thu, 14 Aug 2014 22:03:07 +0000 (22:03 +0000)]
drm/i915: grab the config log on hardware init

9 years agodrm/i915: Use intel_gmbus_get_adapter instead of dev_priv->gmbus array
Markus Pfeiffer [Thu, 14 Aug 2014 21:46:24 +0000 (21:46 +0000)]
drm/i915: Use intel_gmbus_get_adapter instead of dev_priv->gmbus array

9 years agodrm/i915: Fix multiple off-by-one errors in intel_i2c
Markus Pfeiffer [Sat, 9 Aug 2014 18:20:18 +0000 (19:20 +0100)]
drm/i915: Fix multiple off-by-one errors in intel_i2c

* the i2c pin numbers are 1 based as per intel spec but
  we used the unit number as pin number, which is 0 based
* the gmbus array is 0 based, but the port number is 1 based
  accesses into the port array are therefore off-by-one and this
  only worked by chance before.

9 years agodrm/i915: Sync i915_gem_execbuffer.c with Linux 3.8.13
François Tigeot [Thu, 14 Aug 2014 18:13:51 +0000 (20:13 +0200)]
drm/i915: Sync i915_gem_execbuffer.c with Linux 3.8.13

* Simpler code and more consistent performance

* Implement a workaround for a Sandy-Bridge hardware issue

9 years agosmb - Increase max block size from 32 to 1024
Matthew Dillon [Thu, 14 Aug 2014 17:36:03 +0000 (10:36 -0700)]
smb - Increase max block size from 32 to 1024

* The SMB API can be used for I2C transactions.  Do not impose the
  SMB2.0 block size limit on transfers.

9 years agobsd-family-tree: Sync with FreeBSD.
Sascha Wildner [Thu, 14 Aug 2014 07:46:37 +0000 (09:46 +0200)]
bsd-family-tree: Sync with FreeBSD.

9 years agodrm/i915: Fix display corruption issues on Haswell
François Tigeot [Thu, 14 Aug 2014 07:09:59 +0000 (09:09 +0200)]
drm/i915: Fix display corruption issues on Haswell

* The mid-level cache is setup differently on Haswell

* Haswell's PTE encoding has also changed; we have to know what
  GPU generation we're running on to write the correct attributes
  to the Graphics Translation Tables

9 years agotools/kq_connect_client: Add option to create UDP socket before connect
Sepherosa Ziehau [Wed, 13 Aug 2014 12:58:32 +0000 (20:58 +0800)]
tools/kq_connect_client: Add option to create UDP socket before connect

And do connect and send 18B datagram before closing the UDP socket.  This
simulates DNS resolving, though this UDP socket does not receive a reply.

9 years agotools/udpecho: Add option to disable echo; just sink
Sepherosa Ziehau [Wed, 13 Aug 2014 12:57:59 +0000 (20:57 +0800)]
tools/udpecho: Add option to disable echo; just sink

9 years agokernel - PF SMP work - fix RDR rules
Matthew Dillon [Tue, 12 Aug 2014 23:57:16 +0000 (16:57 -0700)]
kernel - PF SMP work - fix RDR rules

* Use the global state table for all global-flagged state.  RDR
  rules can apparently cause PF_SK_WIRE/PF_SK_STACK to be
  reversed so our global state table tests which only used
  PF_SK_WIRE for GLOBAL-flagged translations were not sufficient.

* Fixes issues with the reverse packet direction for a rdr
  rule not finding the reverse state.

* Note that RDR rules will not be SMP-optimal.

* Adds a bit more overhead for NAT translations which are not
  SMP optimal (however, most NAT translations select a port
  that will be SMP optimal).

Reported-by: alexh
9 years agodrm: Add Linux kmap functions
François Tigeot [Tue, 12 Aug 2014 16:44:53 +0000 (18:44 +0200)]
drm: Add Linux kmap functions

These implementations are only suitable for use with systems with
direct memory maps, which means amd64/x86-64 for now.

9 years agodrm/i915: i915_emit_box() from Linux 3.8.13
François Tigeot [Tue, 12 Aug 2014 09:20:08 +0000 (11:20 +0200)]
drm/i915: i915_emit_box() from Linux 3.8.13

9 years agoagp: Add more Haswell PCI IDs
François Tigeot [Mon, 11 Aug 2014 19:40:21 +0000 (21:40 +0200)]
agp: Add more Haswell PCI IDs

9 years agodrm/i915: Enable Haswell support
François Tigeot [Mon, 11 Aug 2014 09:58:41 +0000 (11:58 +0200)]
drm/i915: Enable Haswell support

* The drm/i915 driver includes its own set of PCI ids, making those in
  drm_pciids.h redundant. Remove i915/i930 ids from this file.

* Unfortunately our old drm code base expects to directly use device
  lists with a different format.

* Rewrite the i915_probe() routine to use the driver-included device
  list and patch a special-purpose, one-element list in the legacy
  format at runtime to make the old drm_attach() routine and associated
  code happy.

* At this point, Haswell GPUs still exhibit display corruption issues
  with 2D acceleration. Disabling it in xorg.conf is recommended.

9 years agodrm/i915: Sync i915_gem_evict.c with Linux 3.8.13
François Tigeot [Mon, 11 Aug 2014 08:51:35 +0000 (10:51 +0200)]
drm/i915: Sync i915_gem_evict.c with Linux 3.8.13

9 years agokernel - Fix PF SMP issues
Matthew Dillon [Sun, 10 Aug 2014 20:03:51 +0000 (13:03 -0700)]
kernel - Fix PF SMP issues

* Fix an address table scan race that can cause packets to not match.

* The same fix also fixes a NULL pointer dereference caused by the
  same scan race.

Reported-by: alexh (and testing too)
9 years agoagp/drm: Remove intel_gtt_get_bridge_device()
François Tigeot [Sun, 10 Aug 2014 08:37:01 +0000 (10:37 +0200)]
agp/drm: Remove intel_gtt_get_bridge_device()

9 years agoagp/drm: Rename agp_i810.h to intel-gtt.h
François Tigeot [Sun, 10 Aug 2014 08:04:58 +0000 (10:04 +0200)]
agp/drm: Rename agp_i810.h to intel-gtt.h

So that we use the same file name as Linux.

9 years agotools/netrate: Use FIONBIO to make the socket nonblocking
Sepherosa Ziehau [Sun, 10 Aug 2014 12:26:02 +0000 (20:26 +0800)]
tools/netrate: Use FIONBIO to make the socket nonblocking

9 years agotcp: Fix upper half (socket code) and so_port switching race.
Sepherosa Ziehau [Sun, 10 Aug 2014 12:22:12 +0000 (20:22 +0800)]
tcp: Fix upper half (socket code) and so_port switching race.

Use message put done receipt to change this socket's so_port, i.e. _after_
this message was put onto the target netisr's msgport but _before_ the
message could be pulled from the target netisr's msgport, so that:
- The upper half (socket code) will not see the new msgport before this
  message reaches the new msgport and messages for this socket will be
  ordered.
- This message will see the new msgport, when its handler is called in the
  target netisr.

Add comment about it and explain why the so_port switching should be done
in this commit's fashion.

Reported-by: dillon@
9 years agomsgport: Add message put done receipt support
Sepherosa Ziehau [Sun, 10 Aug 2014 11:42:58 +0000 (19:42 +0800)]
msgport: Add message put done receipt support

The receipt callback is called immediately after the message is put on to
the target msgport.  Complex operation is NOT allowed in this callback,
since it could be called w/ spinlock for spin msgports.

It will be used to fix the race between the upper half (socket code)
and the so_port switching.

9 years agodhclient - Change config 'ignore' directive behaviour.
Antonio Huete Jimenez [Sat, 9 Aug 2014 16:24:54 +0000 (18:24 +0200)]
dhclient - Change config 'ignore' directive behaviour.

- Change dhclient.conf directive 'ignore' to take a list of option names
  rather than list of option declarations. e.g. 'ignore routers;'
  instead of 'ignore routers 1.2.3.4;' The value in the declaration
  was being ignored anyway.
- While there clean up the related code a bit.

Taken-from: OpenBSD

9 years agodhclient - Do not update linkstat several times.
Antonio Huete Jimenez [Thu, 7 Aug 2014 19:11:13 +0000 (21:11 +0200)]
dhclient - Do not update linkstat several times.

- In the case where two RTM_IFINFO link changes occur immediately
  after each other (as in the case with trunk and probably vlan)
  dhclient missed the state change of the second interface.

Taken-from: OpenBSD

9 years agodhclient - Revert a4a242d4bd3b87eb38ccf205bb2784ada509ca3a
Antonio Huete Jimenez [Thu, 7 Aug 2014 19:06:42 +0000 (21:06 +0200)]
dhclient - Revert a4a242d4bd3b87eb38ccf205bb2784ada509ca3a

- Routing breaks if dhclient-script flushes the
  interface's routes when the interface is down.

Taken-from: OpenBSD

9 years agodhclient - Update OBSD Ids
Antonio Huete Jimenez [Thu, 7 Aug 2014 08:05:20 +0000 (10:05 +0200)]
dhclient - Update OBSD Ids

- RFC changes to the manual pages already there.

Taken-from: OpenBSD

9 years agodhclient - Remove saved resolv.conf to avoid problems.
Antonio Huete Jimenez [Thu, 7 Aug 2014 07:53:39 +0000 (09:53 +0200)]
dhclient - Remove saved resolv.conf to avoid problems.

- Once resolv.conf.saved has been copied back as
  resolv.conf, delete it so it isn't copied again the
  next time a dhclient goes away.

Taken-from: OpenBSD

9 years agodhclient - Refuse leases for already configured subnets.
Antonio Huete Jimenez [Thu, 7 Aug 2014 07:47:01 +0000 (09:47 +0200)]
dhclient - Refuse leases for already configured subnets.

Taken-from: OpenBSD

9 years agodhclient - When a link is lost, call dhclient-script with reason "FAIL".
Antonio Huete Jimenez [Sat, 2 Aug 2014 12:04:09 +0000 (14:04 +0200)]
dhclient - When a link is lost, call dhclient-script with reason "FAIL".

- This does the resolv.conf dance and removes 'dead' routes, rather than
  leaving these droppings behind.

- When dhclient is exiting after calling dhclient-script with "FAIL",
  give the script a couple of seconds to finish. Also pass the lease
  parameters (old_*) to dhclient-script so routes can be cleaned up
  in this path too.

Taken-from: OpenBSD

9 years agodhclient - Update reality correspondance of some comments.
Antonio Huete Jimenez [Sat, 2 Aug 2014 12:02:22 +0000 (14:02 +0200)]
dhclient - Update reality correspondance of some comments.

Taken-from: OpenBSD

9 years agodhclient - Missed a reinitialize_interface() declaration.
Antonio Huete Jimenez [Sat, 2 Aug 2014 12:01:21 +0000 (14:01 +0200)]
dhclient - Missed a reinitialize_interface() declaration.

Taken from: OpenBSD

9 years agodhclient - Nuke 'interfaces_invalidated' global variable.
Antonio Huete Jimenez [Sat, 2 Aug 2014 11:59:14 +0000 (13:59 +0200)]
dhclient - Nuke 'interfaces_invalidated' global variable.

- Since reinitialize_interface() was simply setting interfaces_invalidated
  to 0, nuke it too!
- Always update ifi->linkstat in dispatch() loop.

Taken-from: OpenBSD

9 years agodhclient - Nuke some comments.
Antonio Huete Jimenez [Sat, 2 Aug 2014 11:55:32 +0000 (13:55 +0200)]
dhclient - Nuke some comments.

- Nuke a bunch of annoying "/* Send a packet. */" comments above
  invocations to send_packet(), and similiar combinations.

Taken-from: OpenBSD

9 years agodhclient - No point having two copies of this file
Antonio Huete Jimenez [Fri, 1 Aug 2014 18:24:13 +0000 (20:24 +0200)]
dhclient - No point having two copies of this file

- This copy never got installed anyway.

Taken-from: OpenBSD

9 years agodhclient - Remove cur_time global.
Antonio Huete Jimenez [Fri, 1 Aug 2014 18:19:04 +0000 (20:19 +0200)]
dhclient - Remove cur_time global.

- Junk global cur_time, and use time(NULL) or local variables where
  time is checked multiple times. Add a set_timeout_interval() function
  to allow setting a timeout based on an interval from current time.

- Fixes issues with initial startup where the global cur_time was
  always old and caused initial DHCPDISCOVER or DHCPREQUEST packets
  to be sent multiple times. And probably other timeout related
  oddities.

Taken-from: OpenBSD

9 years agodhclient - Add ignore keyword to conf file.
Antonio Huete Jimenez [Fri, 1 Aug 2014 18:09:13 +0000 (20:09 +0200)]
dhclient - Add ignore keyword to conf file.

- Allows to ignore unwanted info from the server without
  necessarily speciyfing a supersede value.

Taken-from: OpenBSD

9 years agodhclient - Don't abandon time_t precision for intervals.
Antonio Huete Jimenez [Fri, 1 Aug 2014 17:43:37 +0000 (19:43 +0200)]
dhclient - Don't abandon time_t precision for intervals.

- Use (long long) and %lld when printing, rather than (int)and %d.
  Follows idiom used for 64-bit size_t and off_t.

Taken-from: OpenBSD

9 years agodhclient - Don't store a time_t into an int.
Antonio Huete Jimenez [Fri, 1 Aug 2014 17:41:32 +0000 (19:41 +0200)]
dhclient - Don't store a time_t into an int.

- Make the variable time_t.

Taken-from: OpenBSD

9 years agodhclient - Don't print time_t as %d
Antonio Huete Jimenez [Fri, 1 Aug 2014 17:36:21 +0000 (19:36 +0200)]
dhclient - Don't print time_t as %d

- Cast to (int) just in case time_t ever changes size.
  Values in these cases are intervals, i.e. (time_t - time_t)
  so int/%d will be fine.

Taken-from: OpenBSD