François Tigeot [Sat, 10 Jan 2015 08:31:00 +0000 (09:31 +0100)]
drm: drm_detach() is drm_release()
Rename it in order to reduce differences with Linux.
Markus Pfeiffer [Fri, 9 Jan 2015 20:40:30 +0000 (20:40 +0000)]
usb4bsd: Sync with FreeBSD r276791 - revert broken 64bit DMA
* Revert a change that lead to an uninitialised value being used
for the number of bits in a DMA address.
Sascha Wildner [Fri, 9 Jan 2015 17:14:53 +0000 (18:14 +0100)]
Stop removing the snd_emu10kx(4) manual page via 'make upgrade'.
Sascha Wildner [Fri, 9 Jan 2015 13:49:10 +0000 (14:49 +0100)]
kernel/hda: Add missing file to 'files' to be able to compile it in.
Markus Pfeiffer [Thu, 8 Jan 2015 23:51:31 +0000 (23:51 +0000)]
usb4bsd: Sync with FreeBSD r276791
* Make sure the 64bit DMA bits are all there
Markus Pfeiffer [Thu, 8 Jan 2015 23:47:46 +0000 (23:47 +0000)]
usb4bsd: Sync with FreeBSD r276791
Markus Pfeiffer [Thu, 8 Jan 2015 23:40:22 +0000 (23:40 +0000)]
usb4bsd: Sync with FreeBSD r276791
* Sync usb_request
Markus Pfeiffer [Thu, 8 Jan 2015 23:31:00 +0000 (23:31 +0000)]
usb4bsd: Sync with FreeBSD r276791
* sync usb_msctest
Markus Pfeiffer [Thu, 8 Jan 2015 23:23:58 +0000 (23:23 +0000)]
usb4bsd: Sync with FreeBSD r276791
* sync the usb_hub code
Markus Pfeiffer [Thu, 8 Jan 2015 23:10:52 +0000 (23:10 +0000)]
usb4bsd: Sync with FreeBSD r276791
Markus Pfeiffer [Thu, 8 Jan 2015 23:03:36 +0000 (23:03 +0000)]
usb4bsd: Sync with FreeBSD r276791
Markus Pfeiffer [Thu, 8 Jan 2015 22:09:17 +0000 (22:09 +0000)]
usb4bsd: Sync with FreeBSD r276791
* Update some files' SVN ids
Markus Pfeiffer [Thu, 8 Jan 2015 21:58:50 +0000 (21:58 +0000)]
usb4bsd: Sync with FreeBSD r276791
* Sync up usb_busdma
Markus Pfeiffer [Thu, 8 Jan 2015 21:51:43 +0000 (21:51 +0000)]
usb4bsd: Remove some porting gunk
* I wrapped the callout structure in a layer of indirection to
simulate FreeBSD's callout that acquires a lock before calling
into the callout function. This functionality is now available
in DragonFly directly, so use it.
Markus Pfeiffer [Thu, 8 Jan 2015 21:38:39 +0000 (21:38 +0000)]
usb4bsd: Sync with FreeBSD r276791
* update usb_transfer.{c,h} so uaudio can be ported and tested
François Tigeot [Fri, 9 Jan 2015 10:40:42 +0000 (11:40 +0100)]
drm: Add wake_up_interruptible_all()
Imre Vadasz [Thu, 8 Jan 2015 22:53:22 +0000 (23:53 +0100)]
kernel: Remove stray SYSCTL_XUNLOCK from sysctl_sysctl_debug_dump_node().
Imre Vadasz [Thu, 8 Jan 2015 21:04:02 +0000 (22:04 +0100)]
kernel/acpi: Add missing ACPI_LOCK_INIT in acpi_thermal.
Michael Neumann [Thu, 8 Jan 2015 23:40:06 +0000 (00:40 +0100)]
Make pthread_*_destroy() more standards compliant
Function pthread_{mutex,cond,rwlock}_destroy() returned EINVAL when the
mutex/cond/rwlock was initialized statically via one of the
PTHREAD_*_INITIALIZER macros and not being used before destruction. We now
return success (0) instead, as it would have been the case when the *_init()
function were used for initialization. This is also the behaviour Linux
exhibits.
Note that we now can no longer detect multiple calls to *_destroy(). Multiple
calls will do no harm, but return success.
While there, fix some potential null pointer derefs in cond and rwlock.
Fixes: #2763
Matthew Dillon [Thu, 8 Jan 2015 23:25:02 +0000 (15:25 -0800)]
sound: Re-add Acer C720 support with some adjustments
* Add the Acer C720 infrastructure back in.
* Move the core register programming patch into
gnu/dev/sound/pci/hda/hda_acer_c720_patch.c along with the original
GPL copyright from the linux file.
This is the only part of the patch which could reasonably be said to
have been taken from the linux driver.
* The rest of the patch is basically two things.
First, mandatory adjustments to the NID routing to detect
headphone insertion and removal, which was done through trial
an error with my Acer and then verified against the linux driver.
Second, we did include the disabling of the remixer based on a
comment in the linux driver. Basically NID 11 is disabled, two
lines of code, and there's only one way to do that.
Antonio Huete Jimenez [Thu, 8 Jan 2015 11:30:05 +0000 (12:30 +0100)]
hammer - Fix timeout for 'dedup' directive
- 'hammer dedup' did not stop on timeout set by -t option.
- As the deduplication itself works by comparing one reference
base element against a candidate base element, hammer(8) collects
all the elements to be deduplicated and actually perform the needed
ioctl() calls to make it happen. This is why the SIGALRM code has to
be handled from within hammer(8).
Reported by: ftigeot
DragonFly-bug: <http://bugs.dragonflybsd.org/issues/2759>
Sascha Wildner [Thu, 8 Jan 2015 18:33:47 +0000 (19:33 +0100)]
dloader: Adjust some bits for the sound upgrade.
Sascha Wildner [Thu, 8 Jan 2015 18:19:17 +0000 (19:19 +0100)]
LINT: Move snd_uaudio out of the list of PCI devices.
Sascha Wildner [Thu, 8 Jan 2015 18:16:51 +0000 (19:16 +0100)]
Quick sound manpage upgrade (syncs with FreeBSD).
François Tigeot [Thu, 8 Jan 2015 17:34:13 +0000 (18:34 +0100)]
make.conf: WITH_NEW_XORG and WITH_KMS are no longer required
Sascha Wildner [Thu, 8 Jan 2015 17:29:56 +0000 (18:29 +0100)]
kernel/sound: Shorten the .PATH's in module Makefiles a bit.
Sascha Wildner [Thu, 8 Jan 2015 17:26:38 +0000 (18:26 +0100)]
kernel/sound: Remove unused Makefile.
Sascha Wildner [Thu, 8 Jan 2015 15:31:41 +0000 (16:31 +0100)]
Fix up Makefile_upgrade.inc a bit.
* Remove removed modules too.
* Remove cat4 manpages too.
François Tigeot [Thu, 8 Jan 2015 13:05:03 +0000 (14:05 +0100)]
sound: Remove Acer C720 support
There are concerns parts of this code have been derived from
GPL-licensed files.
Remove it.
François Tigeot [Thu, 8 Jan 2015 10:03:34 +0000 (11:03 +0100)]
sound: Bump __DragonFly_version, add notes to UPDATING
François Tigeot [Wed, 7 Jan 2015 22:24:30 +0000 (23:24 +0100)]
sound: Remove debugging messages
Matthew Dillon [Mon, 5 Jan 2015 10:40:32 +0000 (11:40 +0100)]
sound: Make device cloning work
* Some lockstatus() calls were wrong and needed to be compared
with LK_EXCLUSIVE
* The sound device caches dynamically created devices and tries
to reuse them, but devfs got angry if the clone code passed
it a device which was already in the filesystem namespace. devfs
had to be modified in
2c94b9eeb85c6cfa5ff918aa58ce484b27fc7c91
and
eb1c7cbc9e1052820efc6b0b7a94c40a7d45b329
* The clone code was designed to clone to new unit numbers, not
clone an existing unit into multiple channels
François Tigeot [Sun, 4 Jan 2015 21:41:46 +0000 (22:41 +0100)]
sound: Make uaudio compile
François Tigeot [Sun, 7 Dec 2014 15:06:33 +0000 (16:06 +0100)]
sound: Device cloning tentative
* New /dev/dspx.y devices are properly created
* Sound can even be played, sometimes
* The most common errors are:
- Can't open audio device /dev/dsp: Operation not supported by device
- Can't open audio device /dev/dsp: Bad file descriptor
François Tigeot [Sat, 6 Dec 2014 20:07:37 +0000 (21:07 +0100)]
sound: Create default devfs entries for the best device
François Tigeot [Thu, 4 Dec 2014 08:29:52 +0000 (09:29 +0100)]
sound: Implement hw.snd.default_unit sysctl
Matthew Dillon [Sun, 10 Aug 2014 20:14:20 +0000 (13:14 -0700)]
sound - haswell / ALC283 - Acer C720 support
* Get headphone auto-sensing and speaker/headphone selection changes working.
I couldn't figure out how to do it with the hpredir mechanism so I added
a new field, w->senseredir, which tells the driver to also mess around
with mixer selections.
In the case of the Acer C720 nid 33 (the headphone) has two mixer
selections, allowing either DMA channel to be selected while nid 20
(the speaker) only has one. The default selection winds up being
wrong. The senseredir field allows the sense mechanism to determine
the correct selection and do change the active selection.
* WARNING! We currently do not parse the acer out-of-band config data
to figure out the headphone sense.
Matthew Dillon [Sun, 10 Aug 2014 08:26:32 +0000 (01:26 -0700)]
sound - Add haswell / ALC283 support (prelim)
* Add haswell / ALC283 support (preliminary), taken from the linux driver.
Matthew Dillon [Sun, 10 Aug 2014 08:26:32 +0000 (01:26 -0700)]
sound: Fix pcm unit translation
Fix pcm unit translation so /dev/dspN actually maps to pcmN. Before
e.g. /dev/dsp* all mapped to pcm0.
Matthew Dillon [Sun, 10 Aug 2014 08:26:32 +0000 (01:26 -0700)]
sound: Fix compile issues when INVARIANTs is not specified
Matthew Dillon [Sun, 10 Aug 2014 08:26:32 +0000 (01:26 -0700)]
sound: M_NOWAIT -> M_WAITOK, add missing M_ZERO
The missing M_ZERO was causing kernel data leakage issues.
Joris Giovannangeli [Sat, 9 Aug 2014 21:13:49 +0000 (23:13 +0200)]
sound: Run KNOTE() from a taskqueue callback
This is necessary to make pulseaudio work correctly.
François Tigeot [Sat, 7 Jul 2012 21:00:02 +0000 (23:00 +0200)]
sound: Create the first /dev/dsp* links
At this point the sound device can be used, albeit by only one
application at the same time.
François Tigeot [Sat, 7 Jul 2012 16:39:41 +0000 (18:39 +0200)]
sound: Change dsp_clone() to the dragonfly way
Sepherosa Ziehau [Wed, 11 Jul 2012 11:16:08 +0000 (13:16 +0200)]
sound/hda: fix PCIe cache snooping
* The PCIe snoop register is no longer vendor-specific, do not use
hard-coded register values
* CPU architecture checks were also irrelevant, remove them
François Tigeot [Thu, 5 Jul 2012 21:32:37 +0000 (23:32 +0200)]
sound: Port to DragonFly - mixer_ioctl_cmd() parameters
François Tigeot [Sat, 29 Nov 2014 08:46:41 +0000 (09:46 +0100)]
sound: Port to DragonFly - CTLFLAG_RWTUN
François Tigeot [Fri, 6 Jul 2012 07:11:28 +0000 (09:11 +0200)]
sound: Port to DragonFly - kqueue filters
François Tigeot [Wed, 4 Jul 2012 12:28:29 +0000 (14:28 +0200)]
sound: Port to DragonFly - cdevsw to dev_ops semantics
François Tigeot [Sat, 11 Jan 2014 14:46:16 +0000 (15:46 +0100)]
sound: Port to DragonFly - bus_dma_tag_create() calls
* No locking parameters on DragonFly
François Tigeot [Thu, 12 Dec 2013 21:16:32 +0000 (22:16 +0100)]
sound: Port to DragonFly
* Fix header includes
* Fix const and static statements
* Fix bus_setup_intr() calls
* free/malloc/printf => kfree/kmalloc/kprintf etc...
* callout_init() => callout_init_mp()
* TAILQ_FOREACH_REVERSE_SAFE => _MUTABLE
* Translate locking semantics
* Remove some mtx_initialized() calls
* Do not use the mp lock unconditionally
* Do not use ce->devt->si_threadcount
* taskqueues are per-cpu in DragonFly
François Tigeot [Sun, 19 Oct 2014 07:56:55 +0000 (09:56 +0200)]
sound: Drop midi support
François Tigeot [Thu, 8 Jan 2015 09:44:43 +0000 (10:44 +0100)]
sound: Import latest code from FreeBSD
* As of
1bac48ea8f21c4121f1c45311ec4f05577c58abc (SVN id r275101)
"Add bunch of PCI IDs of Intel Wildcat Point (9 Series) chipsets."
* Do not import isa, macio, sbus and usb drivers
* snd_au88x0 has been removed. According to the FreeBSD commit message, it
never even got compiled into the kernel or as a module.
* Drop the ds1, csa and maestro3 drivers due to restrictive license terms
or the need to use binary blobs. These drivers are not built by default
on FreeBSD.
Sascha Wildner [Thu, 8 Jan 2015 09:17:46 +0000 (10:17 +0100)]
Fix some typos in messages/manpages.
Sascha Wildner [Thu, 8 Jan 2015 07:35:46 +0000 (08:35 +0100)]
standards.7: Fix typo.
Sascha Wildner [Wed, 7 Jan 2015 21:12:14 +0000 (22:12 +0100)]
<signal.h>: Remove no longer needed include.
Sascha Wildner [Wed, 7 Jan 2015 20:58:11 +0000 (21:58 +0100)]
<sys/signal.h>: Expose stack_t and sigset_t more widely for now.
This needs some other work first.
Reported-by: marino, davshao
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2762>
Sascha Wildner [Wed, 7 Jan 2015 12:27:49 +0000 (13:27 +0100)]
sigaltstack.2: Add missing .Pp
Sascha Wildner [Wed, 7 Jan 2015 04:02:23 +0000 (05:02 +0100)]
kernel: Remove our ancient SCTP support.
It was based on an early stage of FreeBSD's support and never got
beyond that point, due to lack of usage and lack of maintenance.
It is also kind of standing the the way of ongoing work in the
IPv6 stack by sephe.
If anyone ever wants to start again on upgrading and maintaining it,
they can decide then if reverting this commit again makes sense as a
base.
Requested-by: sephe
Approved-by: dillon
Sascha Wildner [Wed, 7 Jan 2015 02:34:37 +0000 (03:34 +0100)]
<sys/signal.h>: Use __POSIX_VISIBLE, __XSI_VISIBLE and __BSD_VISIBLE.
Similar to what I did in <signal.h> and <machine/signal.h> in
d3240feb7df007 (replacing _POSIX_SOURCE and _ANSI_SOURCE checks).
It also should fix build breakage in a few ports which was seen after
d3240feb7df007.
Most of this is based on FreeBSD's checks.
Reported-by: marino
Sepherosa Ziehau [Tue, 6 Jan 2015 15:06:53 +0000 (23:06 +0800)]
if: Dispatch if_slowtimo() to netisr0 to run
- Mark if_slowtimo callout MPSAFE.
- Rearrange the critical section in if_slowtimo().
- Accessing to ifnet global variable is now in netisr0.
Sepherosa Ziehau [Tue, 6 Jan 2015 13:44:02 +0000 (21:44 +0800)]
inet6: Dispatch in6_if_up() to netisr0 to run
- Processing of DAD, nd6 prefix and inet6 address on in6_if_up() code
path are now in netisr0.
- Accessing of ifnet global variable on in6_if_up() code path is now
in netisr0.
Markus Pfeiffer [Tue, 6 Jan 2015 19:37:22 +0000 (19:37 +0000)]
usb4bsd: Fixup some ucom issues.
Implement some of the functionality in ucom. The tty code certainly
needs more work, testing, and bugfixing.
Johannes Hofmann [Tue, 6 Jan 2015 20:44:09 +0000 (21:44 +0100)]
libthread_xu: replace mktemp(3) with mkstemp(3) call
This avoids a warning about a possible unsafe use of mktemp(3)
when linking with libthread_xu.
François Tigeot [Mon, 5 Jan 2015 22:29:35 +0000 (23:29 +0100)]
arcmsr: Make callout locking more robust
* The callout subsystem can deadlock if a callout function is holding
a lock at the same time callout_stop() is called
* Use the new callout_init_lk() function from DragonFly 4.1
to prevent this situation from occuring
Reviewed-by: swildner
Sascha Wildner [Tue, 6 Jan 2015 05:28:26 +0000 (06:28 +0100)]
sys/conf/files: Remove obsolete file (was part of ATM).
Sascha Wildner [Tue, 6 Jan 2015 03:28:51 +0000 (04:28 +0100)]
kernel/pc64: Change all the remaining #if JG's to #if 0 (fixing -Wundef).
Sascha Wildner [Tue, 6 Jan 2015 03:27:58 +0000 (04:27 +0100)]
kernel/if_ethersubr.c: Fix -Wundef.
Sascha Wildner [Tue, 6 Jan 2015 03:27:15 +0000 (04:27 +0100)]
kernel/mrsas: Fix -Wundef.
Sascha Wildner [Tue, 6 Jan 2015 03:26:49 +0000 (04:26 +0100)]
kernel/syscons: Fix -Wundef.
Sascha Wildner [Tue, 6 Jan 2015 03:26:16 +0000 (04:26 +0100)]
kernel/ipmi: Fix -Wundef.
Sascha Wildner [Tue, 6 Jan 2015 03:25:39 +0000 (04:25 +0100)]
kernel/adv: Fix -Wundef.
Sascha Wildner [Tue, 6 Jan 2015 01:55:30 +0000 (02:55 +0100)]
tgmath.3: Fix a typo in a function name.
Tomohiro Kusumi [Mon, 5 Jan 2015 10:03:25 +0000 (19:03 +0900)]
sys/vfs/hammer: fix comments
This patch fixes typo in comments. On-memory record structure hammer_record
is being removed from on-memory RB-Tree, not on-disk B-Tree.
François Tigeot [Mon, 5 Jan 2015 21:07:48 +0000 (22:07 +0100)]
hammer: Hide a warning message behind a debug flag
Printing warning messages during regular operation frighten users.
François Tigeot [Mon, 5 Jan 2015 13:52:34 +0000 (14:52 +0100)]
drm/i915: Fix a porting bug
A kmalloc() was changed to a kzalloc() equivalent.
Sascha Wildner [Mon, 5 Jan 2015 09:40:49 +0000 (10:40 +0100)]
newsyslog(8): Rename a variable (dirfd() is a macro too).
Sascha Wildner [Mon, 5 Jan 2015 09:38:31 +0000 (10:38 +0100)]
Use the dirfd() macro instead of accessing struct _dirdesc directly.
This is in preparation for making dirfd() a function (for POSIX
conformance) and struct _dirdesc private.
Matthew Dillon [Mon, 5 Jan 2015 08:59:34 +0000 (00:59 -0800)]
devfs - Allow clone code to reuse an existing device (2)
* Included missing devfs.h changes.
Matthew Dillon [Mon, 5 Jan 2015 04:54:56 +0000 (20:54 -0800)]
devfs - Allow clone code to reuse an existing device
* Allow the clone code to set a replacement device which already exists
in devfs.
* This will allow the sound code to cache virtual channel devices after
use.
Sepherosa Ziehau [Sun, 4 Jan 2015 12:30:20 +0000 (20:30 +0800)]
inet/inet6: Merge SIOC[ADG]LIFADDR into {in,in6}_control_internal
And remove the socket parameter from {in,in6}_control APIs.
This prepares to make ifnet glbal variable MPSAFE.
François Tigeot [Fri, 2 Jan 2015 12:51:10 +0000 (13:51 +0100)]
drm/i915: Update to Linux 3.9.11
* Various bug fixes and small improvements
* Better handling of GPU hangs, improved driver robustness
* Support for the display power well on Haswell GPUs
* Support for more Haswell GPU (PCI ID) models
Sascha Wildner [Sun, 4 Jan 2015 04:13:56 +0000 (05:13 +0100)]
libc/sysvipc: Constify msgsnd()'s message pointer argument (per POSIX).
Also add a comment in <sys/msg.h> that our msgrcv() should really
return ssize_t.
Sepherosa Ziehau [Fri, 2 Jan 2015 13:14:01 +0000 (21:14 +0800)]
inet6: Remove redundant inet6 addresses deletion
All inet6 addresses must have been removed in the previous code segment;
use assertion in place of the old code.
Sepherosa Ziehau [Fri, 2 Jan 2015 12:41:12 +0000 (20:41 +0800)]
inet6: Dispatch in6_ifdetach to netisr0 to run
- Default router and nd6 prefix ifdetach processing are now in netisr0.
This steps toward moving all default router and nd6 prefix processing
to netisr0.
- Multicast group leaving no longer needs to be explicitly dispatched
to netisr0.
- ifindex2ifnet accessing is now in netisr (implicitly).
Sepherosa Ziehau [Fri, 2 Jan 2015 12:11:35 +0000 (20:11 +0800)]
inet6: ifp == ifindex2ifnet[ifp->if_index]
There is no need to go through extra indirection.
Sepherosa Ziehau [Fri, 2 Jan 2015 11:45:27 +0000 (19:45 +0800)]
wlan: We already have the ifp; no need to go through several functions
Avoid unnecessary reference to ifindex2ifnet global variable.
François Tigeot [Sat, 3 Jan 2015 17:37:47 +0000 (18:37 +0100)]
idr: Remove a wrong assertion in idr_get_new_above()
Calling idr_get_new_above() with a NULL ptr parameter is perfectly valid.
Sascha Wildner [Sat, 3 Jan 2015 00:15:08 +0000 (01:15 +0100)]
Remove redundant __BSD_VISIBLE checks in various header files.
When __BSD_VISIBLE is set to 1, we also set (in <sys/cdefs.h>):
#define __POSIX_VISIBLE 200809
#define __XSI_VISIBLE 700
#define __ISO_C_VISIBLE 2011
Sascha Wildner [Fri, 2 Jan 2015 21:20:15 +0000 (22:20 +0100)]
<stddef.h>: Check __BSD_VISIBLE instead of !_ANSI_SOURCE && !_POSIX_SOURCE.
Sascha Wildner [Fri, 2 Jan 2015 13:18:58 +0000 (14:18 +0100)]
libc: Update Symbol.map for psiginfo().
Sascha Wildner [Fri, 2 Jan 2015 13:17:29 +0000 (14:17 +0100)]
<signal.h>: Add a change I forgot in
d3240feb.
Sascha Wildner [Thu, 1 Jan 2015 20:21:16 +0000 (21:21 +0100)]
libc: Add the psiginfo() function.
It is required by _POSIX_C_SOURCE == 200809.
Sascha Wildner [Thu, 1 Jan 2015 19:58:42 +0000 (20:58 +0100)]
<signal.h>: Sanitize the feature tests.
* Generally, in our headers, we don't check the (user-settable)
_POSIX_SOURCE and _ANSI_SOURCE, but instead __XSI_VISIBLE,
__POSIX_VISIBLE and __BSD_VISIBLE, which are set by <sys/cdefs.h>
based on what the user chose. Do the same in the CPU specific
signal headers.
* psignal() is now a standard function (per 200809).
* Add missing __restrict qualifiers.
François Tigeot [Fri, 2 Jan 2015 11:15:52 +0000 (12:15 +0100)]
drm: Add hweight16()
Obtained-from: OpenBSD
François Tigeot [Fri, 2 Jan 2015 11:05:28 +0000 (12:05 +0100)]
drm: Add DIV_ROUND_CLOSEST()
Obtained-from: OpenBSD
François Tigeot [Fri, 2 Jan 2015 11:04:51 +0000 (12:04 +0100)]
drm: Add BUILD_BUG_ON_NOT_POWER_OF_2()
Obtained-from: NetBSD
François Tigeot [Fri, 2 Jan 2015 10:46:11 +0000 (11:46 +0100)]
drm: Improve linux/wait.h
François Tigeot [Fri, 2 Jan 2015 10:41:53 +0000 (11:41 +0100)]
drm: Add linux/sched.h
François Tigeot [Fri, 2 Jan 2015 10:37:40 +0000 (11:37 +0100)]
drm: Add linux/math64.h
Obtained-from: FreeBSD's OFED subsystem