dragonfly.git
28 hours agotcp: Don't prematurely drop receiving-only connections. master
Sepherosa Ziehau [Mon, 30 May 2016 12:38:40 +0000 (20:38 +0800)]
tcp: Don't prematurely drop receiving-only connections.

If the connection was persistent and receiving-only, several (12)
sporadic device insufficient buffers would cause the connection be
dropped prematurely:
Upon ENOBUFS in tcp_output() for an ACK, retransmission timer is
started.  No one will stop this retransmission timer for receiving-
only connection, so the retransmission timer promises to expire and
t_rxtshift is promised to be increased.  And t_rxtshift will not be
reset to 0, since no RTT measurement will be done for receiving-only
connection.  If this receiving-only connection lived long enough,
and it suffered 12 sporadic device insufficient buffers, i.e.
t_rxtshift >= 12, this receiving-only connection would be dropped
prematurely by the retransmission timer.

We now assert that for data segments, SYNs or FINs either rexmit or
persist timer was wired upon ENOBUFS.  And don't set rexmit timer
for other cases, i.e. ENOBUFS upon ACKs.

And we no longer penalize send window upon ENOBUFS.

Obtained-from: FreeBSD r300981

46 hours agoieee80211.9: Fix .Nm
Sascha Wildner [Sun, 29 May 2016 19:42:55 +0000 (21:42 +0200)]
ieee80211.9: Fix .Nm

46 hours agoRemove an unused manual page.
Sascha Wildner [Sun, 29 May 2016 19:41:20 +0000 (21:41 +0200)]
Remove an unused manual page.

2 days agogpio_acpi: Turn this into a child device of gpio_intel.
Imre Vadász [Wed, 11 May 2016 20:11:05 +0000 (22:11 +0200)]
gpio_acpi: Turn this into a child device of gpio_intel.

* This makes gpio_intel much more independent from gpio_acpi.

* Less adjustments needed in gpio drivers for using gpio_acpi.

* Some slight cleanup, and refactoring turning device_t args to
  struct gpio_acpi_softc * args.

2 days agogpio_acpi: Add allocate/release functions for GpioIo pins.
Imre Vadász [Sat, 30 Apr 2016 16:46:11 +0000 (18:46 +0200)]
gpio_acpi: Add allocate/release functions for GpioIo pins.

* This slightly simplifies the read_pin and write_pin functions, and
  configuration errors should now be found when allocating the pin,
  instead of causing a panic in read_pin() or write_pin().

2 days agogpio_acpi: Factor out gpio_acpi_check_gpioint().
Imre Vadász [Sat, 28 May 2016 21:26:37 +0000 (23:26 +0200)]
gpio_acpi: Factor out gpio_acpi_check_gpioint().

* gpio_acpi_check_gpioint() can be reused for the device-driver facing
  interface for dealing with gpio acpi-resources.

2 days agokernel - Align virtual_start, workaround possible HW VM bugs
Matthew Dillon [Sat, 28 May 2016 22:56:13 +0000 (15:56 -0700)]
kernel - Align virtual_start, workaround possible HW VM bugs

* virtual_start is 2MB-aligned at the kernel load's end address.
  The page table mappings prior to this address are 2MB mappings.

  Additional SYSMAP()d space is reserved in early boot, such as
  the CMAP entries and the dmesg buffer.  The page table mappings
  in this area should all be 4K pages.

* Kernel virtual memory beyond the SYSMAP()d space is available for
  general allocation, but positioned such that only kldload modules will
  try to use it specifically.  Sascha (swildner) found that any initial
  kldload done after boot in vmware player 7.1.4 build-3848939 running
  on a i7-4770K based host would panic.

  A kernel core of this panic appears to show a corrupt pte in a location
  where the pte should have been read as 0.

* Doing an additional 2MB alignment of virtual_start after the SYSMAP()s
  appears to work around this corruption, which is this commit.  This
  means that the first general allocation in the kernel load portion of
  the kernel_map will be shifted to the next 2MB boundary past the SYSMAP()s.

* I can only speculate that the hardware is somehow getting confused, but
  I can't really fathon how it is getting confused because the SYSMAP
  reservations should all be using 4KB pages.

3 days agoSome more cleanup in comments etc. after the an(4) removal.
Sascha Wildner [Sat, 28 May 2016 11:09:15 +0000 (13:09 +0200)]
Some more cleanup in comments etc. after the an(4) removal.

3 days agoieee80211_vap.9: Fix date.
Sascha Wildner [Sat, 28 May 2016 09:42:11 +0000 (11:42 +0200)]
ieee80211_vap.9: Fix date.

3 days agoVarious typo and wording fixes.
Sascha Wildner [Sat, 28 May 2016 01:15:50 +0000 (03:15 +0200)]
Various typo and wording fixes.

3 days agovirtio - fix contigmalloc muff last commit
Matthew Dillon [Sat, 28 May 2016 00:51:57 +0000 (17:51 -0700)]
virtio - fix contigmalloc muff last commit

* Have to use M_WAITOK for contigmalloc, not M_INTWAIT.

Reported-by: tuxillo
3 days agoSync ACPICA with Intel's version 20160527.
Sascha Wildner [Sat, 28 May 2016 00:31:27 +0000 (02:31 +0200)]
Sync ACPICA with Intel's version 20160527.

* Temporarily reverted the new arbitrary bit length/alignment support
  in AcpiHwRead/AcpiHwWrite for the Generic Address Structure. There
  have been a number of regressions with the new code that need to be
  fully resolved and tested before this support can be finally
  integrated into ACPICA. Apologies for any inconveniences these
  issues may have caused.

* The ACPI message macros are not configurable (ACPI_MSG_ERROR,
  ACPI_MSG_EXCEPTION, ACPI_MSG_WARNING, ACPI_MSG_INFO,
  ACPI_MSG_BIOS_ERROR, and ACPI_MSG_BIOS_WARNING). Lv Zheng.

* Fixed a couple of GCC warnings associated with the use of the
  -Wcast-qual option. Adds a new return macro, return_STR.
  Jung-uk Kim.

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

3 days agovirtio - vtblk_finish_bio() called with serializer held
Matthew Dillon [Sat, 28 May 2016 00:33:18 +0000 (17:33 -0700)]
virtio - vtblk_finish_bio() called with serializer held

* vtblk_finish_bio() was being improperly called with the
  serializer held in the strategy error path.

* Note that biodone() is properly called without the
  serializer held in the normal completion path.

3 days agovirtio - Fix a few porting issues and bugs
Matthew Dillon [Sat, 28 May 2016 00:14:24 +0000 (17:14 -0700)]
virtio - Fix a few porting issues and bugs

* vtblk_maximum_segments() was really buggy.  It was
  adding the base min segments to blkcfg->seg_max,
  miscalculating values for the case where the F_SEG_MAX
  feature is not in the feature list.

  This could result in virtio imploding on a too-small
  sglist.

* Fix situations where M_NOWAIT is improperly used.

* At least use 16-byte alignment for contigmalloc()'s.

3 days agovirtio_blk: Add support for indirect buffers.
Imre Vadász [Sat, 31 Oct 2015 15:48:18 +0000 (16:48 +0100)]
virtio_blk: Add support for indirect buffers.

Taken-From: FreeBSD

4 days agowlan.4: Comment out reference to bwi(4) which we do not have.
Sascha Wildner [Fri, 27 May 2016 08:32:47 +0000 (10:32 +0200)]
wlan.4: Comment out reference to bwi(4) which we do not have.

4 days agoVarious tiny updates in wlan*.4 manual pages and other related areas.
Sascha Wildner [Thu, 26 May 2016 21:45:48 +0000 (23:45 +0200)]
Various tiny updates in wlan*.4 manual pages and other related areas.

4 days agoieee80211*.9: Fix some prototypes in the manual pages.
Sascha Wildner [Thu, 26 May 2016 20:43:20 +0000 (22:43 +0200)]
ieee80211*.9: Fix some prototypes in the manual pages.

4 days agokernel - Augment pte assertion with additional info
Matthew Dillon [Thu, 26 May 2016 18:22:50 +0000 (11:22 -0700)]
kernel - Augment pte assertion with additional info

* Augment the invalid PTE assertion to print additional info.  This bug was
  thought to have been squashed but we received a recent report of it still
  occurring (on an older cpu).

5 days agoSync wlan driver manual pages with FreeBSD.
Sascha Wildner [Thu, 26 May 2016 15:01:50 +0000 (17:01 +0200)]
Sync wlan driver manual pages with FreeBSD.

5 days agoif_iwm - valid_{tx,rx}_ant from radio_cfg is only needed for 8000 family.
Imre Vadász [Wed, 25 May 2016 19:03:22 +0000 (21:03 +0200)]
if_iwm - valid_{tx,rx}_ant from radio_cfg is only needed for 8000 family.

* The "if (!data->valid_tx_ant || !data->valid_rx_ant) {" check was getting
  triggered with a 3165 chipset.

5 days agotcp: Make setsockopt(2) TCP_{NODELAY,NOPUSH,NOOPT,FASTKEEP} asynchronous
Sepherosa Ziehau [Thu, 26 May 2016 13:22:58 +0000 (21:22 +0800)]
tcp: Make setsockopt(2) TCP_{NODELAY,NOPUSH,NOOPT,FASTKEEP} asynchronous

This makes all network system calls used by nginx asynchronous and greatly
improves nginx performance.

For 1 requests/connection (30K concurrent connections), this commit gives
12% improvement for 16KB web object (was 16.8Gbps, now 19.2Gbps, which
maxes out 2x10Ge).  And it gives 19% improvement for 1KB web object (was
156Kreqs/s, now 186Kreqs/s).

5 days agoRegenerate devd's usb.conf for accumulated usb driver updates.
Sascha Wildner [Thu, 26 May 2016 10:01:26 +0000 (12:01 +0200)]
Regenerate devd's usb.conf for accumulated usb driver updates.

5 days agoSync our ieee80211* manpages with FreeBSD (plus some adjustments by me).
Sascha Wildner [Wed, 25 May 2016 18:45:17 +0000 (20:45 +0200)]
Sync our ieee80211* manpages with FreeBSD (plus some adjustments by me).

5 days agoral - Add missing BUS_DMA_NOWAIT to bus_dmamap_load_mbuf_segment() calls
Matthew Dillon [Wed, 25 May 2016 18:11:13 +0000 (11:11 -0700)]
ral - Add missing BUS_DMA_NOWAIT to bus_dmamap_load_mbuf_segment() calls

* Add missing BUS_DMA_NOWAIT to bus_dmamap_load_mbuf_segment() calls.

* NOTE: FreeBSD original code in #else not modified, but probably needs
  the same change (to bus_dmamap_load_mbuf_sg()).

6 days agoRemove an(4)/ancontrol(8) references from several manual pages.
Sascha Wildner [Wed, 25 May 2016 17:00:51 +0000 (19:00 +0200)]
Remove an(4)/ancontrol(8) references from several manual pages.

6 days agoAdd missing LINT64 options ({IWN,WPI}_DEBUG, URTWN_WITHOUT_UCODE).
Sascha Wildner [Wed, 25 May 2016 14:17:21 +0000 (16:17 +0200)]
Add missing LINT64 options ({IWN,WPI}_DEBUG, URTWN_WITHOUT_UCODE).

6 days agokernel/wpi: Fix build with WPI_DEBUG.
Sascha Wildner [Wed, 25 May 2016 14:16:08 +0000 (16:16 +0200)]
kernel/wpi: Fix build with WPI_DEBUG.

6 days agokernel: Remove two unused options, AH_REGOPS_FUNC, IEEE80211_AMPDU_AGE.
Sascha Wildner [Wed, 25 May 2016 13:00:31 +0000 (15:00 +0200)]
kernel: Remove two unused options, AH_REGOPS_FUNC, IEEE80211_AMPDU_AGE.

6 days agokernel/ath_hal: Add missing __printflike().
Sascha Wildner [Wed, 25 May 2016 14:13:47 +0000 (16:13 +0200)]
kernel/ath_hal: Add missing __printflike().

6 days agosys/vfs/hammer: Remove unnecessary =NULL;
Tomohiro Kusumi [Wed, 25 May 2016 10:05:32 +0000 (19:05 +0900)]
sys/vfs/hammer: Remove unnecessary =NULL;

resx is only used (or should be declared) in else{} scope.

6 days agosys/vfs/hammer: Don't store negative free/avail for statfs/statvfs
Tomohiro Kusumi [Wed, 25 May 2016 06:11:13 +0000 (15:11 +0900)]
sys/vfs/hammer: Don't store negative free/avail for statfs/statvfs

f_bfree and f_bavail (these two equal on HAMMER) are likely to
be negative when the filesystem usage has reached its limit or
almost reaches limit.

There is no point in having negative values by using internally
reserved size (means not physically finalized with actual data),
so force 0 instead of -.

Note that this doesn't fix ENOSPC issues.

-- before this commit
 # df -T /HAMMER
 Filesystem  Type   1K-blocks      Used Avail Capacity  Mounted on
 TEST        hammer 116359168 116363168 -4000   100%    /HAMMER

-- with this commit
 # df -T /HAMMER
 Filesystem  Type   1K-blocks      Used Avail Capacity  Mounted on
 TEST        hammer 116359168 116359168     0   100%    /HAMMER

6 days agosys/vfs/hammer: Add warning messages on ENOSPC
Tomohiro Kusumi [Wed, 25 May 2016 03:28:42 +0000 (12:28 +0900)]
sys/vfs/hammer: Add warning messages on ENOSPC

Add warning messages if the blockmap allocator finds ENOSPC.

B-Tree functions may also return ENOSPC, but those are results
of failure in blockmap allocation on node split.

_hammer_checkspace() doesn't have this warning for now.
This gets called by many of the syscalls before inmemory/ondisk
file operations start, so it's pretty obvious without bunch of
"No space left" in dmesg.

6 days agosys/vfs/hammer: Remove vfs.hammer.count_extra_space_used
Tomohiro Kusumi [Wed, 25 May 2016 03:15:32 +0000 (12:15 +0900)]
sys/vfs/hammer: Remove vfs.hammer.count_extra_space_used

This was added in a7e9bef1 in 2008 for debugging.
Exposing this to userspace isn't useful for users anyway considering
this is a sum of several internal parameters on resource usage.

6 days agokernel/acpi: Merge some fixes from ACPICA current to fix dfly bug #2916.
Sascha Wildner [Tue, 24 May 2016 20:25:25 +0000 (22:25 +0200)]
kernel/acpi: Merge some fixes from ACPICA current to fix dfly bug #2916.

Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/2916>

Intel's commits:

https://github.com/acpica/acpica/commit/6c4ef17e5150de60609a9fa56f5024ebd69b5f39
https://github.com/acpica/acpica/commit/4be46f600f370eb115bffcde149d3c5d0ab72517
https://github.com/acpica/acpica/commit/742ba81ff4eed44f11ba91c42d0dc55fc521a6f0

6 days agomake upgrade: Remove the if_an.ko module too (while here, sort a bit).
Sascha Wildner [Tue, 24 May 2016 19:22:46 +0000 (21:22 +0200)]
make upgrade: Remove the if_an.ko module too (while here, sort a bit).

6 days agoMention that an(4) has been removed in UPDATING.
Sascha Wildner [Tue, 24 May 2016 19:00:52 +0000 (21:00 +0200)]
Mention that an(4) has been removed in UPDATING.

6 days agokernel/ieee80211: Remove an unused malloc type.
Sascha Wildner [Tue, 24 May 2016 18:44:29 +0000 (20:44 +0200)]
kernel/ieee80211: Remove an unused malloc type.

6 days agokernel/iwn: Fix building with IWN_DEBUG.
Sascha Wildner [Tue, 24 May 2016 18:11:57 +0000 (20:11 +0200)]
kernel/iwn: Fix building with IWN_DEBUG.

6 days agokernel/bwn: Remove an unnecessary #define and add siba_debug.
Sascha Wildner [Tue, 24 May 2016 18:11:17 +0000 (20:11 +0200)]
kernel/bwn: Remove an unnecessary #define and add siba_debug.

6 days agokernel/bwn/siba: Fix a struct member name.
Sascha Wildner [Tue, 24 May 2016 18:10:20 +0000 (20:10 +0200)]
kernel/bwn/siba: Fix a struct member name.

6 days agokernel/urtwn: Fix building with USB_DEBUG.
Sascha Wildner [Tue, 24 May 2016 18:09:11 +0000 (20:09 +0200)]
kernel/urtwn: Fix building with USB_DEBUG.

6 days agokernel/ath: Fix a misplaced #endif
Sascha Wildner [Tue, 24 May 2016 18:08:33 +0000 (20:08 +0200)]
kernel/ath: Fix a misplaced #endif

6 days agokernel/ath: Fix building with ATH_DIAGAPI.
Sascha Wildner [Tue, 24 May 2016 18:08:07 +0000 (20:08 +0200)]
kernel/ath: Fix building with ATH_DIAGAPI.

7 days agokernel/ath: Fix building with AH_DEBUG.
Sascha Wildner [Tue, 24 May 2016 18:06:16 +0000 (20:06 +0200)]
kernel/ath: Fix building with AH_DEBUG.

7 days agowlan - Add missing kernel config files for ath.
Matthew Dillon [Tue, 24 May 2016 05:01:12 +0000 (22:01 -0700)]
wlan - Add missing kernel config files for ath.

* Add missing files for 'ath' to the kernel build (for building
  ath into the kernel).

7 days agowlan - Fix lockstatus debugging
Matthew Dillon [Tue, 24 May 2016 04:48:02 +0000 (21:48 -0700)]
wlan - Fix lockstatus debugging

* Fix lockstatus debugging (was missing 'curthread' arg).

7 days agowlan - Add missing options conf
Matthew Dillon [Tue, 24 May 2016 04:44:54 +0000 (21:44 -0700)]
wlan - Add missing options conf

* Add missing options conf for opt_wpi.h.  Also add opt_iwn.h in case we
  need it in the future (FreeBSD also had it).  We already had opt_iwm.h.

7 days agoiwn - Use pci_alloc_1intr()
Matthew Dillon [Mon, 23 May 2016 21:49:27 +0000 (14:49 -0700)]
iwn - Use pci_alloc_1intr()

* Use pci_alloc_1intr() in DragonFly for conditionalizing MSI interrupt
  installation.

7 days agowifi - Restore kernel build
Matthew Dillon [Mon, 23 May 2016 21:01:11 +0000 (14:01 -0700)]
wifi - Restore kernel build

* Restore wpi in netif Makefile and restore X86_64_CONFIG for all
  drivers originally in the kerne build, except 'an'.

7 days agowlan - Sync dev/netif/wpi from FreeBSD
Matthew Dillon [Mon, 23 May 2016 20:57:50 +0000 (13:57 -0700)]
wlan - Sync dev/netif/wpi from FreeBSD

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

* Straight re-port from FreeBSD using new infrastructure, with DragonFly
  mods.

7 days agoif_iwm - Fix several nitpicks in iwm(4).
Imre Vadász [Sat, 21 May 2016 15:27:11 +0000 (17:27 +0200)]
if_iwm - Fix several nitpicks in iwm(4).

Move some declarations to if_iwmreg.h.
Remove iwm_fw_alive(); just call iwm_post_alive() directly.
Simplify iwm_mvm_add_sta().
Return timeout error from iwm_apm_init().
Print a message when init (i.e. boot) firmware fails to load.
Remove some commented-out code which wouldn't compile anyway.
Move iwm_mvm_tx_fifo to if_iwmreg.h to match better where Linux puts it.

Taken-From: OpenBSD (if_iwm.c r1.80 and if_iwmreg.h r1.11)

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

8 days 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.

8 days 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.

8 days 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.

11 days 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]

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