dragonfly.git
7 years agoif_iwm - Fix a few typos.
Imre Vadász [Sat, 21 May 2016 15:25:42 +0000 (17:25 +0200)]
if_iwm - Fix a few typos.

7 years agowlan - Fix lockinit example in README.DRAGONFLY.
Imre Vadász [Sat, 21 May 2016 12:48:40 +0000 (14:48 +0200)]
wlan - Fix lockinit example in README.DRAGONFLY.

7 years agowlan - Attempt to fix obytes/omcast counting for now.
Imre Vadász [Sat, 21 May 2016 12:18:33 +0000 (14:18 +0200)]
wlan - Attempt to fix obytes/omcast counting for now.

* Data frames are currently counted a second time in the obytes and
  omcast counters by ieee80211_tx_complete(). (the first time they are
  counted is in ifq_dispatch())

* So just deactivate the obytes and omcast counter increments in
  ieee80211_tx_complete() for now. At worst we are now missing
  management-frames and maybe raw packets in the obytes counter,
  which is still better than counting most packets' bytes twice.

7 years agowlan - Move wlan_serialize_enter()/exit() wrapper to ieee80211_ifdetach().
Imre Vadász [Sat, 21 May 2016 11:20:58 +0000 (13:20 +0200)]
wlan - Move wlan_serialize_enter()/exit() wrapper to ieee80211_ifdetach().

7 years agowlan - Sync dev/netif/ndis from FreeBSD
Imre Vadász [Fri, 20 May 2016 20:56:01 +0000 (22:56 +0200)]
wlan - Sync dev/netif/ndis from FreeBSD

* Sync dev/netif/ndis from FreeBSD, fbsd git dd885b9a0a0e, May 11 2016.

* not tested yet (no luck with if_ndis on any of my hardware so far)

7 years agowlan - Also drop ancontrol(8), which has no use anymore without an(4).
Imre Vadász [Fri, 20 May 2016 14:00:10 +0000 (16:00 +0200)]
wlan - Also drop ancontrol(8), which has no use anymore without an(4).

7 years agowlan - Sync dev/netif/iwi from FreeBSD
Imre Vadász [Thu, 19 May 2016 23:25:17 +0000 (01:25 +0200)]
wlan - Sync dev/netif/iwi from FreeBSD

* Sync dev/netif/iwi from FreeBSD, fbsd git dd885b9a0a0e, May 11 2016.

* Straight report from FreeBSD using new infrastructure.

7 years agowlan - Drop 'an' driver from kernel configs and drop its manpage.
Imre Vadász [Thu, 19 May 2016 23:17:14 +0000 (01:17 +0200)]
wlan - Drop 'an' driver from kernel configs and drop its manpage.

7 years agoif_iwm - Add bit-polling in Rx-DMA init code path.
Imre Vadász [Wed, 18 May 2016 21:35:35 +0000 (23:35 +0200)]
if_iwm - Add bit-polling in Rx-DMA init code path.

Taken-From: OpenBSD (if_iwm.c r1.80)

7 years agowlan - Drop 'an' driver
Matthew Dillon [Thu, 19 May 2016 01:27:17 +0000 (18:27 -0700)]
wlan - Drop 'an' driver

* 'an' is probably only isa or pccard.

* Drop the 'an' driver (instead of re-porting for the new wlan
  infrastructure).

7 years agowlan - Sync dev/netif/ral from FreeBSD (2)
Matthew Dillon [Wed, 18 May 2016 22:03:46 +0000 (15:03 -0700)]
wlan - Sync dev/netif/ral from FreeBSD (2)

* Last commit FreeBSD -> DragonFly port (this commit).

* Add back to build.

7 years agowlan - Sync dev/netif/ral from FreeBSD
Matthew Dillon [Wed, 18 May 2016 21:12:24 +0000 (14:12 -0700)]
wlan - Sync dev/netif/ral from FreeBSD

* Sync dev/netif/ral from FreeBSD, fbsd git dd885b9a0a0e, May 11 2016.

* This is a direct copy (next commit ports it to DFly)

7 years agowlan - Add wi back to the build.
Imre Vadász [Wed, 18 May 2016 20:59:21 +0000 (22:59 +0200)]
wlan - Add wi back to the build.

7 years agowlan - Adjust Makefile and use opt_urtwn.h and opt_wlan.h in if_urtwn.c.
Imre Vadász [Wed, 18 May 2016 20:29:50 +0000 (22:29 +0200)]
wlan - Adjust Makefile and use opt_urtwn.h and opt_wlan.h in if_urtwn.c.

7 years agoif_bwn - Update siba_bwn to fix a serious issue with SPROM offsets.
adrian [Wed, 18 May 2016 07:01:22 +0000 (07:01 +0000)]
if_bwn - Update siba_bwn to fix a serious issue with SPROM offsets.

Taken-From. FreeBSD

7 years agowlan - Sync dev/netif/wi from FreeBSD
Imre Vadász [Wed, 18 May 2016 19:38:42 +0000 (21:38 +0200)]
wlan - Sync dev/netif/wi from FreeBSD

* Sync dev/netif/wi from FreeBSD, fbsd git dd885b9a0a0e, May 11 2016.

* Straight report from FreeBSD using new infrastructure.

7 years agowlan - Sync bus/u4b/wlan/if_urtwn* from FreeBSD
Matthew Dillon [Wed, 18 May 2016 00:28:43 +0000 (17:28 -0700)]
wlan - Sync bus/u4b/wlan/if_urtwn* from FreeBSD

* Sync bus/u4b/wlan/if_urtwn* from FreeBSD, fbsd git dd885b9a0a0e, May 11 2016.

* Firmware is already the same as w/FreeBSD (no changes).

* Add missing usbdevs and usbd.conf entries for urtwn*

7 years agoif_bwn - correctly calculate RSSI level.
Imre Vadász [Tue, 17 May 2016 21:39:59 +0000 (23:39 +0200)]
if_bwn - correctly calculate RSSI level.

Taken-From: FreeBSD (r300079)

7 years agoif_bwn - Fix DMA handling for txhdr_cache.
Imre Vadász [Tue, 17 May 2016 21:04:41 +0000 (23:04 +0200)]
if_bwn - Fix DMA handling for txhdr_cache.

* No special alignment seems to be necessary fo the txhdr entries.

* Do proper error checking for some bus_dmamap_load() usages.
  (Just to make sure to easier catch future txhdr_cache dma issues).

7 years agoif_bwn - Always use maximum size txhdr entries.
Imre Vadász [Tue, 17 May 2016 21:03:19 +0000 (23:03 +0200)]
if_bwn - Always use maximum size txhdr entries.

* The actual txhdr size is only known after the dma initialization.

7 years agoif_bwn - Reapply local change from b7a8b6abd2cf for RX overflow handling.
Imre Vadász [Mon, 16 May 2016 10:02:31 +0000 (12:02 +0200)]
if_bwn - Reapply local change from b7a8b6abd2cf for RX overflow handling.

7 years agowlan - Sync dev/netif/bwn/siba from FreeBSD
Imre Vadász [Mon, 16 May 2016 09:42:39 +0000 (11:42 +0200)]
wlan - Sync dev/netif/bwn/siba from FreeBSD

* Sync dev/netif/bwn/siba from FreeBSD, fbsd git dd885b9a0a0e, May 11 2016.

7 years agoif_bwn - Add forgotten M_ZERO flag to contigmalloc call.
Imre Vadász [Sun, 15 May 2016 22:46:19 +0000 (00:46 +0200)]
if_bwn - Add forgotten M_ZERO flag to contigmalloc call.

7 years agowlan - Sync dev/netif/bwn/bwn from FreeBSD
Imre Vadász [Sun, 15 May 2016 22:07:24 +0000 (00:07 +0200)]
wlan - Sync dev/netif/bwn/bwn from FreeBSD

* Sync dev/netif/bwn/bwn from FreeBSD, fbsd git dd885b9a0a0e, May 11 2016.

* Straight report from FreeBSD using new infrastructure.

* Add bwn back to build

* Using contigmalloc for allocating dr_txhdr_cache, because kmalloc on
  DragonFly wouldn't always give us physically contiguous memory.

* Keeping the old code for (MSI) interrupt allocation, which puts things
  into the softc struct, and not into the bwn_mac struct like the new code.

* XXX Not tested yet, also some local changes might be missing still.
* XXX Didn't sync dev/netif/bwn/siba_bwn from FreeBSD yet, but bwn might
      already work for the previously supported chipsets like this.

7 years agowlan - Use taskqueue_thread[0] for the ic->ic_restart_task.
Imre Vadász [Sun, 15 May 2016 19:10:15 +0000 (21:10 +0200)]
wlan - Use taskqueue_thread[0] for the ic->ic_restart_task.

* Avoids deadlocking in restart_vaps().

7 years agoif_iwm - Clean up iwm(4) scanning logic a bit.
Imre Vadász [Sun, 15 May 2016 18:47:21 +0000 (20:47 +0200)]
if_iwm - Clean up iwm(4) scanning logic a bit.

* Reset sc_scanband in callers of iwm_mvm_scan_request().

* Make "could not initiate scan" device_printf messages more useful.

Taken-From: OpenBSD (r1.59 of if_iwm.c)

7 years agowlan - Sync bus/u4b/wlan/run from FreeBSD
Imre Vadász [Sun, 15 May 2016 12:17:04 +0000 (14:17 +0200)]
wlan - Sync bus/u4b/wlan/run from FreeBSD

* Sync bus/u4b/wlan/run from FreeBSD, fbsd git dd885b9a0a0e, May 11 2016.

* Add run back to build.

7 years agowlan - Sync dev/netif/iwn from FreeBSD
Matthew Dillon [Sun, 15 May 2016 00:23:32 +0000 (17:23 -0700)]
wlan - Sync dev/netif/iwn from FreeBSD

* Sync dev/netif/iwn from FreeBSD, fbsd git dd885b9a0a0e, May 11 2016.

* Straight report from FreeBSD using new infrastructure.

* Add iwn back to build

7 years agoif_iwm - Use IWM_MAX_CMD_PAYLOAD_SIZE to improve command length checks.
Imre Vadász [Sat, 14 May 2016 23:06:17 +0000 (01:06 +0200)]
if_iwm - Use IWM_MAX_CMD_PAYLOAD_SIZE to improve command length checks.

Taken-From: OpenBSD (parts of if_iwm.c r1.57 and if_iwmreg.h r1.10)

7 years agoif_iwm - GC some dead code, left by a partially applied OpenBSD change.
Imre Vadász [Sat, 14 May 2016 22:59:31 +0000 (00:59 +0200)]
if_iwm - GC some dead code, left by a partially applied OpenBSD change.

Taken-From: OpenBSD (if_iwm.c r1.69)

7 years agowlan - Remove most wlan_serializer calls from if_iwm
Matthew Dillon [Sat, 14 May 2016 19:51:46 +0000 (12:51 -0700)]
wlan - Remove most wlan_serializer calls from if_iwm

* Remove serializer calls that should no longer be needed now that iwm
  no longer has its own ifnet.

7 years agobuild - Add if_iwm to the build again
Imre Vadász [Sat, 14 May 2016 16:51:25 +0000 (18:51 +0200)]
build - Add if_iwm to the build again

7 years agowlan - Sync dev/netif/iwm from FreeBSD
Imre Vadász [Sat, 14 May 2016 16:50:46 +0000 (18:50 +0200)]
wlan - Sync dev/netif/iwm from FreeBSD

* Sync dev/netif/iwm from FreeBSD, fbsd git dd885b9a0a0e, May 11 2016.

* Tried to preserve local changes, as well as changes taken from OpenBSD
  which haven't been merged into FreeBSD yet.

* XXX We might be able to remove the iwmsleep hack now
* XXX Not tested yet

7 years agobuild - Add if_rum to the build again
Imre Vadász [Fri, 13 May 2016 21:37:32 +0000 (23:37 +0200)]
build - Add if_rum to the build again

7 years agowlan - Sync bus/u4b/wlan/rum from FreeBSD
Imre Vadász [Fri, 13 May 2016 17:48:26 +0000 (19:48 +0200)]
wlan - Sync bus/u4b/wlan/rum from FreeBSD

* Sync bus/u4b/wlan/rum from FreeBSD, fbsd git dd885b9a0a0e, May 11 2016.

7 years agokernel - Add struct mbufq stuff from FreeBSD to sys/mbuf.h.
Imre Vadász [Fri, 13 May 2016 20:41:54 +0000 (22:41 +0200)]
kernel - Add struct mbufq stuff from FreeBSD to sys/mbuf.h.

Taken-From: FreeBSD

7 years agobuild - Temporarily remove wifi drivers from build
Matthew Dillon [Fri, 13 May 2016 17:33:11 +0000 (10:33 -0700)]
build - Temporarily remove wifi drivers from build

* Temporarily remove wifi drivers from build to make porting and testing
  easier via if_*_load="YES" in /boot/loader.conf, or via manual
  kldload'ing.

* wlan and wlan_* base modules remains built-into the kernel.

7 years agowlan - Sync netproto/802_11 from FreeBSD part 6/N
Matthew Dillon [Thu, 12 May 2016 20:34:03 +0000 (13:34 -0700)]
wlan - Sync netproto/802_11 from FreeBSD part 6/N

* Uncomment ieee80211_vap_xmitpkt(), we need it.

7 years agowlan - Sync dev/netif/ath from FreeBSD part 5/N
Matthew Dillon [Thu, 12 May 2016 05:51:08 +0000 (22:51 -0700)]
wlan - Sync dev/netif/ath from FreeBSD part 5/N

* Adjustments relative to previous commit to compile ath on DragonFly.

* Tested with chromebook.

7 years agowlan - Sync dev/netif/ath from FreeBSD part 4/N
Matthew Dillon [Thu, 12 May 2016 05:49:30 +0000 (22:49 -0700)]
wlan - Sync dev/netif/ath from FreeBSD part 4/N

* Sync dev/netif/ath from FreeBSD, fbsd git dd885b9a0a0e, May 11 2016.
  (freebase + our Makefiles, does not include dfly adjustments).

7 years agowlan - Sync contrib/dev/ath from FreeBSD part 3/N
Matthew Dillon [Thu, 12 May 2016 05:34:46 +0000 (22:34 -0700)]
wlan - Sync contrib/dev/ath from FreeBSD part 3/N

* Make adjustments to contrib/dev/ath for DragonFly and fix C syntax bugs
  that fail with gcc-5.

7 years agowlan - Sync contrib/dev/ath from FreeBSD part 2/N
Matthew Dillon [Thu, 12 May 2016 05:32:09 +0000 (22:32 -0700)]
wlan - Sync contrib/dev/ath from FreeBSD part 2/N

* Sync contrib/dev/ath from FreeBSD, fbsd git dd885b9a0a0e, May 11 2016.

7 years agowlan - Sync netproto/802_11 from FreeBSD part 1/N
Matthew Dillon [Thu, 12 May 2016 04:58:36 +0000 (21:58 -0700)]
wlan - Sync netproto/802_11 from FreeBSD part 1/N

* Sync netproto/802_11 from FreeBSD, fbsd git dd885b9a0a0e, May 11 2016.

7 years agodrm: Fix missing revision init.
zrj [Mon, 23 May 2016 11:38:46 +0000 (14:38 +0300)]
drm: Fix missing revision init.

While there, make i915 irq_install more consistent with drm.

Lets see what breaks.

7 years agodrm: Block struct fence in drm_plane_state struct
zrj [Sat, 21 May 2016 07:56:39 +0000 (10:56 +0300)]
drm: Block struct fence in drm_plane_state struct

Not needed for now.

7 years agoRevert "<stdio.h>/<wchar.h>: Reduce namespace pollution in <wchar.h>."
Sascha Wildner [Sun, 22 May 2016 23:06:10 +0000 (01:06 +0200)]
Revert "<stdio.h>/<wchar.h>: Reduce namespace pollution in <wchar.h>."

This reverts commit 69e6516956c27905b4070759b0c597e6ab8b1ba5.

It looks like something in our C++ headers causes breakage in some
dports when <wchar.h> doesn't also include <stdio.h>, specifically,
including <iostream> does not seem to bring in <stdio.h>
automatically, as it is on FreeBSD and Linux.

Since it is legal (per standard) for <wchar.h> to also provide the
symbols of <stdio.h>, revert this change for now.

7 years agodrm/radeon: Print device description after it gets set.
zrj [Fri, 20 May 2016 16:02:09 +0000 (19:02 +0300)]
drm/radeon: Print device description after it gets set.

Noticed while checking debug outputs with drm.debug=0x21f

Changes:
 -[drm:drm_probe] desc : (null)
 +[drm:drm_probe] desc : Oland PRO [Radeon R7 240]
and
 -[drm:drm_probe] desc : (null)
 +[drm:drm_probe] desc : Tobago PRO [Radeon R7 360 / R9 360 OEM]

7 years agodrm/i915: Avoid dead-locking the userland.
zrj [Fri, 20 May 2016 15:54:04 +0000 (18:54 +0300)]
drm/i915: Avoid dead-locking the userland.

Was happening for some time and the cause is still unclear.
On exit Xorg doesn't return from kernel and is unkillable.
Sometimes even panics on haswell, it is better to avoid that.

Also reduce spam on laptops with eDP panels on i915 load.
Great opportunity to use just implemented DRM_ERROR_RATELIMITED()
macro that uses krateprintf().

7 years agodrm/i915: Lost changes after update to v4.3
zrj [Fri, 20 May 2016 15:26:15 +0000 (18:26 +0300)]
drm/i915: Lost changes after update to v4.3

 * init ring->last_submitted_seqno that got lost in:
   a05eeebfe8ec06e5625c15c535aed68dbf568bd6
   internal commit removing "outstanding_lazy_request"

 * missing "else" statement that looks like got lost in:
   477eb7f9b36d138314225b3b077de1c692e5e1a8
   internal commit removing pipe_enable checks

While there, fix unsafe i915 specific WARN_ON() macros.
Linux-commit: 4eee4920f05e39e22571deb57f1c314ce7a46e7f v4.4

7 years agokernel/drm: Add dma_{alloc,free}_coherent() from FreeBSD.
Sascha Wildner [Fri, 20 May 2016 09:40:13 +0000 (11:40 +0200)]
kernel/drm: Add dma_{alloc,free}_coherent() from FreeBSD.

7 years agodrm cleanup 19/x: Switch more calls to kzalloc/kfree helpers.
zrj [Thu, 19 May 2016 11:56:46 +0000 (14:56 +0300)]
drm cleanup 19/x: Switch more calls to kzalloc/kfree helpers.

Slightly reduces differences in already complicated codes.

No functional change.

7 years agodrm cleanup 18/x: Gently remove drm_core_has_AGP, DRIVER_REQUIRE_AGP
zrj [Thu, 19 May 2016 10:23:06 +0000 (13:23 +0300)]
drm cleanup 18/x: Gently remove drm_core_has_AGP, DRIVER_REQUIRE_AGP

Whole AGP handling is very fuzzy currently, specially in ttm.
This however this attempt seems to work.

While there remove two unused structs: drm_magic_head, drm_waitlist.

The stucts drm_gem_mm and drm_magic_entry will require some extra
work in drm_fops.c

7 years agodrm cleanup 17/x: Cleanup drmP.h header.
zrj [Thu, 19 May 2016 08:30:58 +0000 (11:30 +0300)]
drm cleanup 17/x: Cleanup drmP.h header.

Changes:
  * change drm_setversion() to static, used only in drm_ioctl.c
  * move out some macros to linux layer
  * move helper DRM_GEM_* macros to drm_gem.h
  * remove FreeBSD legacy prototypes and compat macros(TTM)
  * remove drm_gem_pager_dtr(), was never used
  * remove many prototypes that have no functions available
  * regroup some blocks
  * keep structs untouched for now

No functional change.

7 years agodrm.4: Document drm.debug tunable.
zrj [Wed, 18 May 2016 16:40:04 +0000 (19:40 +0300)]
drm.4: Document drm.debug tunable.

Applies for run-time hw.dri.debug and hw.drm.debug variables.
Note: in future releases only one sysctl variable will be kept.

While there, add a hint about video group.

7 years agodrm cleanup 16/x: Add names to internal ioctl debug traces.
zrj [Wed, 18 May 2016 15:24:30 +0000 (18:24 +0300)]
drm cleanup 16/x: Add names to internal ioctl debug traces.

With this it prints same output as linux, just 3 years later.
Aimed at drm_debug=0x600 mode.
Easier on the eyes and saves time:

 -[drm:drm_ioctl] pid=904, cmd=0xc03064b7, nr=0xb7, dev 0xffffffe1d6299720, auth=1
 -[drm:drm_ioctl] pid=904, cmd=0x80086409, nr=0x09, dev 0xffffffe1d6299720, auth=1
 -[drm:drm_ioctl] pid=904, cmd=0x2000641f, nr=0x1f, dev 0xffffffe1d6299720, auth=1
 -[drm:drm_ioctl] ret = 22
 -[drm:drm_ioctl] pid=904, cmd=0x80086409, nr=0x09, dev 0xffffffe1d6299720, auth=1
 -[drm:drm_ioctl] pid=904, cmd=0x80086409, nr=0x09, dev 0xffffffe1d6299720, auth=1
 -[drm:drm_ioctl] pid=904, cmd=0xc010646c, nr=0x2c, dev 0xffffffe1d6299720, auth=1
 +[drm:drm_ioctl] pid=904, dev=0xffffffe1d6299720, auth=1, DRM_IOCTL_MODE_SETPLANE
 +[drm:drm_ioctl] pid=904, dev=0xffffffe1d6299720, auth=1, DRM_IOCTL_GEM_CLOSE
 +[drm:drm_ioctl] pid=904, dev=0xffffffe1d6299720, auth=1, DRM_IOCTL_DROP_MASTER
 +[drm:drm_ioctl] ret = 22
 +[drm:drm_ioctl] pid=904, dev=0xffffffe1d6299720, auth=1, DRM_IOCTL_GEM_CLOSE
 +[drm:drm_ioctl] pid=904, dev=0xffffffe1d6299720, auth=1, DRM_IOCTL_GEM_CLOSE
 +[drm:drm_ioctl] pid=904, dev=0xffffffe1d6299720, auth=1, I915_GEM_WAIT

7 years agodrm cleanup 15/x: Separate vblank DRM_DEBUG spam.
zrj [Wed, 18 May 2016 14:11:34 +0000 (17:11 +0300)]
drm cleanup 15/x: Separate vblank DRM_DEBUG spam.

Attempt to make drm_debug=1 a bit more usable.
Rationale: vblank events are very noisy and makes live debugging
almost impossible. Also create problems with dmesg buffers etc.

By separating it into separate debug bit, hw.drm.debug=0x21f mode
is very useful to notice problems as they happen, spec during
reboot sequence when root fs is already unmounted and debugging
relies on dmesg contents getting into next boot to be read.

Bigger part of changes are in radeonkms side to prevent running
verbose diagnostics.

7 years agodrm cleanup 14/x: Slightly rewrite drm debug subsystem.
zrj [Wed, 18 May 2016 11:02:01 +0000 (14:02 +0300)]
drm cleanup 14/x: Slightly rewrite drm debug subsystem.

Changes:
  * Bring back kernel options handling through opt_drm.h that
    got lost in: ba55f2f542af67c1331fd80f611891b0a29f57bc
  * Explicitly disable DRM_LINUX option, breaks LINT64
  * Add some DragonFly specific debug categories to ease up
    the debugging, some DRM_DEBUG prints are quite noisy
  * By default don't include PID number, hard on diffs
  * Handle ioctl debug prints with separate debug bits
  * Implement DRM_ERROR_RATELIMITED that uses krateprintf()
  * Implement and use drm_err() and drm_ut_debug_printk()
    note: that current implementation might lead to more
    garbled text on a very frequent writes by several cpus

After this cleanup drm modules shrink a bit in size:
 [rw@_ drm]$ size z*/*.ko
    text    data     bss     dec     hex filename
  281585    3592     944  286121   45da9 znew/drm.ko
  780618    8180     608  789406   c0b9e znew/i915.ko
 1262735   45896     100 1308731  13f83b znew/radeonkms.ko
  301045    3592     944  305581   4a9ad zref/drm.ko
  887378    8180     608  896166   daca6 zref/i915.ko
 1377609   45896     100 1423605  15b8f5 zref/radeonkms.ko

7 years agodrm cleanup 13/x: Gather scattered debug macros to common places.
zrj [Wed, 18 May 2016 10:43:01 +0000 (13:43 +0300)]
drm cleanup 13/x: Gather scattered debug macros to common places.

No functional change except for dev_dbg() in radeonkms
that now prints unconditionally.

7 years agodrm/i915: Fix DPCD debug print.
zrj [Wed, 18 May 2016 10:37:08 +0000 (13:37 +0300)]
drm/i915: Fix DPCD debug print.

Port commit from radeonkms:
f39d438d596d248b476a864849733e081f61f688

Diff:
 -[drm:KMS:pid909:intel_dp_get_dpcd] DPCD: ffffffe2061d2d6ch
 +[drm:KMS:pid904:intel_dp_get_dpcd] DPCD: 11 0a 82 41 00 00 01 c0 02 00 00 00 0f 03 00

7 years agoMerge branch 'vendor/LIBARCHIVE'
Peter Avalos [Tue, 17 May 2016 20:00:43 +0000 (13:00 -0700)]
Merge branch 'vendor/LIBARCHIVE'

Bring in two bug fixes from libarchive's master branch. This should fix
some dports breakage.

Requested-by: zrj@
7 years agoDisable ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS in bsdcpio p mode.
Peter Avalos [Tue, 17 May 2016 19:58:51 +0000 (12:58 -0700)]
Disable ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS in bsdcpio p mode.

Obtained-from: libarchive 199d5c79b547cebe3d7d33e5acd10ae03008c4a2

7 years agoReject cpio symlinks that exceed 1MB.
Peter Avalos [Tue, 17 May 2016 19:57:30 +0000 (12:57 -0700)]
Reject cpio symlinks that exceed 1MB.

Obtained-from: libarchive fd7e0c02e272913a0a8b6d492c7260dfca0b1408

7 years agodrm/radeon: Backport two bugfixes from drm v3.19
zrj [Tue, 17 May 2016 09:06:30 +0000 (12:06 +0300)]
drm/radeon: Backport two bugfixes from drm v3.19

In attempt to keep radeon at v3.18 level for drm/ttm update.

7 years agodrm/radeon: Disable some unused functions.
zrj [Tue, 17 May 2016 09:02:14 +0000 (12:02 +0300)]
drm/radeon: Disable some unused functions.

Remove or #if 0 for future reference them.
While there, make TRACE_TODO consistent through code.

No functional change.

Spotted-by: swildner
7 years agoUpdate the pciconf(8) database.
Sascha Wildner [Sun, 15 May 2016 10:17:24 +0000 (12:17 +0200)]
Update the pciconf(8) database.

May 11, 2016 snapshot from http://pciids.sourceforge.net/

7 years agodrm/uapi_drm: Update to Linux 4.6
David Shao [Sat, 14 May 2016 07:48:14 +0000 (09:48 +0200)]
drm/uapi_drm: Update to Linux 4.6

Added definition of __kernel_size_t to linux/types.h.
Preserved current definitions of invalid flags in i915_drm.h.

7 years agodrm/linux: Add asm/ioctl.h
François Tigeot [Sat, 14 May 2016 06:44:58 +0000 (08:44 +0200)]
drm/linux: Add asm/ioctl.h

7 years agodrm cleanup 12/x: Layout fixes to match upstream in drmP.h
zrj [Thu, 12 May 2016 17:48:11 +0000 (20:48 +0300)]
drm cleanup 12/x: Layout fixes to match upstream in drmP.h

Mainly to reduce differences for upcomming further cleanup.

Strictly no functional change.

7 years agodrm cleanup 11/x: Remove some unused callbacks from drm_driver.
zrj [Thu, 12 May 2016 17:26:04 +0000 (20:26 +0300)]
drm cleanup 11/x: Remove some unused callbacks from drm_driver.

7 years agodrm cleanup 10/x: Move DRM_WAIT_ON and DRM_CURRENTPID macros.
zrj [Thu, 12 May 2016 17:02:29 +0000 (20:02 +0300)]
drm cleanup 10/x: Move DRM_WAIT_ON and DRM_CURRENTPID macros.

DRM_CURRENTPID macro will no longer be used after v4.4

7 years agodrm cleanup 09/x: Move EREMOTEIO to linux/errno.h
zrj [Thu, 12 May 2016 16:41:28 +0000 (19:41 +0300)]
drm cleanup 09/x: Move EREMOTEIO to linux/errno.h

Technically <linux/errno.h> should be included in:
radeon/atombios_dp.c and i915/intel_dp.c

7 years agodrm cleanup 08/x: Move memset_XXX helpers to linux asm/io.h
zrj [Thu, 12 May 2016 16:36:47 +0000 (19:36 +0300)]
drm cleanup 08/x: Move memset_XXX helpers to linux asm/io.h

7 years agodrm cleanup 07/x: Move byte order functions to linux layer.
zrj [Thu, 12 May 2016 16:14:55 +0000 (19:14 +0300)]
drm cleanup 07/x: Move byte order functions to linux layer.

BITS_PER_LONG and [un]likely() are already defined elsewhere.

7 years agodrm cleanup 06/x: Remove KIB_NOTYET macro.
zrj [Thu, 12 May 2016 15:42:25 +0000 (18:42 +0300)]
drm cleanup 06/x: Remove KIB_NOTYET macro.

Not used even at FreeBSD.

While there, remove few other from initial port.

7 years agodrm cleanup 05/x: Move IS_ALIGNED macro to linux/kernel.h
zrj [Thu, 12 May 2016 15:17:11 +0000 (18:17 +0300)]
drm cleanup 05/x: Move IS_ALIGNED macro to linux/kernel.h

Only used in radeon/r600_cs.c
It is cleaner to have it in compat layer.

7 years agodrm cleanup 04/x: Remove some unused radeon compat defines.
zrj [Thu, 12 May 2016 14:32:54 +0000 (17:32 +0300)]
drm cleanup 04/x: Remove some unused radeon compat defines.

These were only used in radeon UMS driver, that is removed now.

7 years agodrm cleanup 03/x: Move all includes in drmP.h to the top.
zrj [Thu, 12 May 2016 14:10:47 +0000 (17:10 +0300)]
drm cleanup 03/x: Move all includes in drmP.h to the top.

Hide struct videomode under CONFIG_VIDEOMODE_HELPERS option.
There is no need for it in DragonFly.

While there, resort include order to match one at Linux v4.3

No functional change intended.

7 years agodrm cleanup 02/x: Fix drm_legacy_sg_cleanup() prototype.
zrj [Thu, 12 May 2016 13:19:49 +0000 (16:19 +0300)]
drm cleanup 02/x: Fix drm_legacy_sg_cleanup() prototype.

Make it take struct drm_device as in Linux.

No functional change.

7 years agodrm cleanup 01/x: Move legacy buffer structs to drm_leagcy.h
zrj [Thu, 12 May 2016 13:07:11 +0000 (16:07 +0300)]
drm cleanup 01/x: Move legacy buffer structs to drm_leagcy.h

As was done in Linux v3.18 commit:
ba8286fab52652e431784d066b075c1bb4933ea1

This cleans drmP.h header a bit.

While there, move LOCK_TEST_WITH_RETURN macro too.

No functional change intended.

7 years agodrm: Sync drm_agpsupport.h with Linux 4.3
zrj [Thu, 12 May 2016 10:50:50 +0000 (13:50 +0300)]
drm: Sync drm_agpsupport.h with Linux 4.3

Fix build w/o __OS_HAS_AGP

Perform some cleanup in drmP.h as well.

No functional change intended.

Submitted-by: ftigeot@ with few changes
7 years agodrm/radeon: Preparations for AGP cleanup.
zrj [Thu, 12 May 2016 08:34:09 +0000 (11:34 +0300)]
drm/radeon: Preparations for AGP cleanup.

No functional change intended.

7 years agodrm/i915: Comment out a DRM_DEBUG_KMS statement
François Tigeot [Fri, 13 May 2016 08:58:58 +0000 (10:58 +0200)]
drm/i915: Comment out a DRM_DEBUG_KMS statement

Sysfs interface for connectors is not implemented.

Requested-by: zrj
7 years agobsdcat(1): Bump WARNS down for contrib code.
Peter Avalos [Fri, 13 May 2016 01:26:30 +0000 (18:26 -0700)]
bsdcat(1): Bump WARNS down for contrib code.

7 years agoAdjust files for libarchive-3.2.0 import.
Peter Avalos [Fri, 13 May 2016 00:51:24 +0000 (17:51 -0700)]
Adjust files for libarchive-3.2.0 import.

7 years agoMerge branch 'vendor/LIBARCHIVE'
Peter Avalos [Fri, 13 May 2016 00:44:10 +0000 (17:44 -0700)]
Merge branch 'vendor/LIBARCHIVE'

7 years agorc - Add unconfigured wifi interfaces to the netif list
Matthew Dillon [Thu, 12 May 2016 21:44:16 +0000 (14:44 -0700)]
rc - Add unconfigured wifi interfaces to the netif list

* Use sysctl net.wlan.devices to get a list of wifi interfaces.
  This sysctl is not yet active in master but will be when the wifi
  update goes in (at which point the devices no longer show up in
  ifconfig -l).

* This will allow existing wifi configurations in /etc/rc.conf to just
  work with the upcoming update.

7 years agosysctl - Add -i and -q from FreeBSD
Matthew Dillon [Thu, 12 May 2016 21:27:09 +0000 (14:27 -0700)]
sysctl - Add -i and -q from FreeBSD

Enhance the sysctl code, will be used by /etc/network.subr

* sysctl -i - Exit cleanly with exit code 0 if a sysctl mib does not
  exist.  No warning or error message is output for this
  case.

* sysctl -q - Exit with exit code N if a sysctl mib does not exist.
  N is the number of mib's on the command line which failed.
  No warning or error message is output for this case.

7 years agoImport libarchive-3.2.0.
Peter Avalos [Thu, 12 May 2016 20:58:50 +0000 (13:58 -0700)]
Import libarchive-3.2.0.

7 years agochown(8)/chgrp(1): Sync with FreeBSD
Peter Avalos [Thu, 12 May 2016 19:00:30 +0000 (12:00 -0700)]
chown(8)/chgrp(1): Sync with FreeBSD

- Be consistent with chmod(1) for symlinks.
- Use basename(3).
- Use uid_t.
- Allocate buffers for getgroups(3) dynamically.
- Add -x option to prevent crossing of mountpoints.
- Sprinkle some static.

Obtained-from: FreeBSD

7 years agochflags(1): symlink handling similar to chmod(1)
Peter Avalos [Thu, 12 May 2016 03:28:34 +0000 (20:28 -0700)]
chflags(1): symlink handling similar to chmod(1)

Obtained-from:  FreeBSD

7 years agochmod(1): Bring in some changes from FreeBSD.
Peter Avalos [Thu, 12 May 2016 02:31:08 +0000 (19:31 -0700)]
chmod(1): Bring in some changes from FreeBSD.

- Change directory permissions in pre-order.
- Allow "-v -v" to mean very verbose.
- Follow symbolic links named as command line arguments if run w/o -R.

Obtained-from:  FreeBSD

7 years agokernel/drm: Resort radeon sources alphabetically.
zrj [Tue, 10 May 2016 17:32:32 +0000 (20:32 +0300)]
kernel/drm: Resort radeon sources alphabetically.

While there, add hint for module depends in LINT64.

7 years agodrm: Destroy events consistently.
zrj [Tue, 10 May 2016 16:29:10 +0000 (19:29 +0300)]
drm: Destroy events consistently.

Fixes wrong function casting in drm_atomic.c

While there, make all call sites more similar.

7 years agobwn.4: Update firmware dport reference.
zrj [Tue, 10 May 2016 14:10:50 +0000 (17:10 +0300)]
bwn.4: Update firmware dport reference.

Reported-and-tested-by: basedacid@
7 years agodrm/radeon: Add ACPI function stubs.
zrj [Tue, 10 May 2016 13:10:27 +0000 (16:10 +0300)]
drm/radeon: Add ACPI function stubs.

Reduces diffs in radeon_bios with Linux v3.18

7 years agodrm/radeon: Fix some leaks on module unload.
zrj [Tue, 10 May 2016 12:59:03 +0000 (15:59 +0300)]
drm/radeon: Fix some leaks on module unload.

This prevents leaking of whopping 1008 bytes of M_DRM memory:
  * 512 bytes from radeon/atom.c
  * 440 bytes from radeon/radeon_atombios.c voltage_tables
  * 56 bytes from allocation of struct fb_info *info

fb_info case needs help from syscons, for now let it leak those 56 bytes.

7 years agodrm/radeon: Nuke some orphaned externs.
zrj [Tue, 10 May 2016 06:07:52 +0000 (09:07 +0300)]
drm/radeon: Nuke some orphaned externs.

Spotted-by: swildner
7 years ago80211 - Further ifp->if_softc -> ic_softc conversions in wlan drivers.
Imre Vadász [Sat, 7 May 2016 21:14:46 +0000 (23:14 +0200)]
80211 - Further ifp->if_softc -> ic_softc conversions in wlan drivers.

7 years agou4b/wlan - Convert ifp->if_softc -> ic->ic_softc.
Imre Vadász [Sat, 7 May 2016 20:38:31 +0000 (22:38 +0200)]
u4b/wlan - Convert ifp->if_softc -> ic->ic_softc.

Taken-From: FreeBSD

7 years agou4b/wlan - Mechanically convert to IFNET_STAT_INC.
Imre Vadász [Sat, 7 May 2016 17:57:15 +0000 (19:57 +0200)]
u4b/wlan - Mechanically convert to IFNET_STAT_INC.

Inspired-by: FreeBSD (SVN r271866)