aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* - Remove test_and_set_bit() macro. It is unused since r255037.Jung-uk Kim2013-08-291-5/+3
| | | | | | | | | | | - Relax atomic_read() and atomic_set() macros. Linux does not require any memory barrier. Also, these macros may be even reordered or optimized away according to the API documentation: https://www.kernel.org/doc/Documentation/atomic_ops.txt Notes: svn path=/head/; revision=255039
* Fix atomic operations on context_flag without altering semantics.Jung-uk Kim2013-08-291-3/+3
| | | | Notes: svn path=/head/; revision=255037
* Work-around a timing problem with the ITE IT8513E now that the coreMarcel Moolenaar2013-08-291-1/+13
| | | | | | | | | | | | | | calls ns8250_bus_ipend() almost immediately after ns8250_bus_attach(). As it appears, a line break condition is being signalled for almost all received characters due to this. A delay of 150ms seems enough to allow the H/W to settle and to avoid the problem. More analysis is needed, but for now a regression has been addressed. Reported by: kevlo@ Tested by: kevlo@ Notes: svn path=/head/; revision=255031
* Migrate iwn(4) to use the new ieee80211_tx_complete() API.Adrian Chadd2013-08-291-35/+23
| | | | | | | | | Tested: * Intel 5100, STA mode Notes: svn path=/head/; revision=255023
* Remove the duplicate LLC_MISS event and put it in the right order.Adrian Chadd2013-08-291-3/+2
| | | | Notes: svn path=/head/; revision=255022
* Merge r254386 from user/np/cxl_tuning. Add an INET|INET6 check missingNavdeep Parhar2013-08-293-0/+17
| | | | | | | | | | in said revision. r254386: Flush inactive LRO entries periodically. Notes: svn path=/head/; revision=255015
* Correct atomic operations in i915.Jung-uk Kim2013-08-283-11/+11
| | | | Notes: svn path=/head/; revision=255013
* Fix a compiler warning and add couple of VM map types.Jung-uk Kim2013-08-281-3/+21
| | | | Notes: svn path=/head/; revision=255012
* Whitespace nit.Navdeep Parhar2013-08-281-1/+1
| | | | Notes: svn path=/head/; revision=255011
* Fix a compiler warning. With this fix, a negative time can be converted toJung-uk Kim2013-08-281-1/+1
| | | | | | | a struct timeval and back to the original nanoseconds correctly. Notes: svn path=/head/; revision=255009
* Change t4_list_lock and t4_uld_list_lock from mutexes to sx'es.Navdeep Parhar2013-08-283-35/+34
| | | | | | | | | | | - tom_uninit had to be reworked not to hold the adapter lock (a mutex) around t4_deactivate_uld, which acquires the uld_list_lock. - the ifc_match for the interface cloner that creates the tracer ifnet had to be reworked as the kernel calls ifc_match with the global if_cloners_mtx held. Notes: svn path=/head/; revision=255006
* Add hooks in base cxgbe(4) for the iWARP upper-layer driver. Update aNavdeep Parhar2013-08-286-8/+30
| | | | | | | couple of assertions in the TOE driver as well. Notes: svn path=/head/; revision=255005
* Reduce diff against stable/9 slightly.Jung-uk Kim2013-08-281-3/+2
| | | | Notes: svn path=/head/; revision=255004
* ql_minidump() should be performed only by port 0.David C Somayajulu2013-08-281-2/+2
| | | | | | | Submitted by: David C Somayajulu Notes: svn path=/head/; revision=255003
* Do not save/restore video memory if we are not using linear frame buffer.Jung-uk Kim2013-08-281-22/+15
| | | | | | | Note this partially revert r233896. Notes: svn path=/head/; revision=254999
* Make sure to free stale buffer before allocating new one for safety.Jung-uk Kim2013-08-281-2/+6
| | | | Notes: svn path=/head/; revision=254998
* Avoid unnecessary signedness conversion.Jung-uk Kim2013-08-281-3/+3
| | | | Notes: svn path=/head/; revision=254997
* Fix a few typos for s25fl types.Luiz Otavio O Souza2013-08-281-2/+2
| | | | | | | Approved by: adrian (mentor) Notes: svn path=/head/; revision=254991
* Properly free gpiobus ivars when gpiobus_parse_pins() fails and also onLuiz Otavio O Souza2013-08-281-4/+18
| | | | | | | | | | gpiobus detachment. Suggested by: imp Approved by: adrian (mentor) Notes: svn path=/head/; revision=254988
* Support the PCI-Express SSD in the new MacBook Air (model A1465)Gavin Atkinson2013-08-281-0/+1
| | | | | | | | Submitted by: Johannes Lundberg <johannes brilliantservice.co.jp> MFC after: 3 days Notes: svn path=/head/; revision=254987
* Fix bug in Flash access codeDavid C Somayajulu2013-08-271-5/+5
| | | | | | | Submitted by: David C Somayajulu Notes: svn path=/head/; revision=254976
* Remove duplicate dev.xbd.*.max_requests sysctl added in r252260.Colin Percival2013-08-271-4/+0
| | | | | | | Approved by: gibbs Notes: svn path=/head/; revision=254968
* Use the new ieee80211_tx_complete() function.Adrian Chadd2013-08-271-11/+2
| | | | Notes: svn path=/head/; revision=254957
* Couple minor if_vmx tweaksBryan Venteicher2013-08-272-30/+32
| | | | | | | | | | | | | | | - Use queue size fields from the Tx/Rx queues in various places instead of (currently the same values) from the softc. - Fix potential crash in detach if the attached failed to alloc queue memory. - Move the VMXNET3_MAX_RX_SEGS define to a better spot. - Tweak frame size calculation w.r.t. ETHER_ALIGN. This could be tweaked some more, or removed since it probably doesn't matter much for x86 (and the x86 class of machines this driver will be used on). Notes: svn path=/head/; revision=254950
* Reimplement the FDOPT_NOERROR feature that was kicked out in r134081.Joerg Wunsch2013-08-261-5/+18
| | | | | | | | | | | | | It is needed for fdread(1) in order to be able to recover from CRC errors in the data field of a floppy sector (by returning the sector data that failed CRC, rather than inventing dummy data). When closing the device, clear all transient device options. MFC after: 1 week Notes: svn path=/head/; revision=254937
* Use correct mailbox and PCIe PF number when querying RDMA parameters.Navdeep Parhar2013-08-261-1/+1
| | | | Notes: svn path=/head/; revision=254933
* Add support for my:John-Mark Gurney2013-08-261-0/+2
| | | | | | | CPU: AMD A10-5700 APU with Radeon(tm) HD Graphics (3393.89-MHz K8-class CPU) Notes: svn path=/head/; revision=254924
* Fix mbuf debugging printf()'s after the recent mbuf header changes.Andre Oppermann2013-08-261-4/+4
| | | | Notes: svn path=/head/; revision=254910
* drm/radeon: Rename the (S)DEBUG macros in atom.c to avoid conflictsJean-Sébastien Pédron2013-08-261-100/+100
| | | | | | | | For instance, DEBUG is already defined in the LINT kernel configuration. This fixes the build of LINT. Notes: svn path=/head/; revision=254894
* drm/radeon: Import the Radeon KMS driverJean-Sébastien Pédron2013-08-25146-0/+130572
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver is based on Linux 3.8 and a previous effort by kan@. More informations about this project can be found on the FreeBSD wiki: https://wiki.freebsd.org/AMD_GPU The driver is split into: sys/dev/drm2: The driver sources. sys/modules/drm2/radeonkmw: The driver main kernel module's Makefile. sys/modules/drm2/radeonkmsfw: All firmware kernel module Makefiles. There's one directory and one Makefile for each firmware. sys/contrib/dev/drm2/radeonkmsfw: All firmware binary sources. tools/tools/drm/radeon Tools to update firmwares or regenerate some headers. Merging the driver to FreeBSD 9.x may be possible but not a priority for now. Help from: kib@, kan@ Tested by: avg@, kwm@, ray@, Alexander Yerenkow <yerenkow@gmail.com>, Anders Bolt-Evensen <andersbo87@me.com>, Denis Djubajlo <stdedjub@googlemail.com>, J.R. Oldroyd <fbsd@opal.com>, Mikaël Urankar <mikael.urankar@gmail.com>, Pierre-Emmanuel Pédron <pepcitron@gmail.com>, Sam Fourman Jr. <sfourman@gmail.com>, Wade <wade-is-great@live.com>, (probably other I forgot...) HW donations: kyzh, Yakaz Notes: svn path=/head/; revision=254885
* vga_pci: Remove left-over debugging printf()'sJean-Sébastien Pédron2013-08-251-4/+0
| | | | Notes: svn path=/head/; revision=254883
* vga_pci: Add API to map the Video BIOSJean-Sébastien Pédron2013-08-252-0/+105
| | | | | | | | | | | | | | | | | Here are two new functions to map and unmap the Video BIOS: void * vga_pci_map_bios(device_t dev, size_t *size); void vga_pci_unmap_bios(device_t dev, void *bios); The BIOS is either taken from the shadow copy made by the System BIOS at boot time if the given device was used for the default display (i386, amd64 and ia64 only), or from the PCI expansion ROM. Additionally, one can determine if a given device was the default display at boot time using the following new function: void vga_pci_unmap_bios(device_t dev, void *bios); Notes: svn path=/head/; revision=254882
* drm: Use the new drm_atomic.h, following the merge of projects/atomic64Jean-Sébastien Pédron2013-08-255-8/+11
| | | | | | | Submitted by: jkim@ Notes: svn path=/head/; revision=254880
* drm/ttm: Remove unused VM_ALLOC_DMA32 defineJean-Sébastien Pédron2013-08-251-2/+0
| | | | Notes: svn path=/head/; revision=254879
* drm/ttm: Fix a reversed condition and add missing locksJean-Sébastien Pédron2013-08-251-5/+7
| | | | | | | | | | This allows to run OpenGL applications on at least two test machines with the Radeon driver. Approved by: kib@ Notes: svn path=/head/; revision=254878
* drm/ttm: Fix style in ttm_bo_release_mmap()Jean-Sébastien Pédron2013-08-251-2/+1
| | | | Notes: svn path=/head/; revision=254877
* drm/ttm: Fix unmap of buffer objectJean-Sébastien Pédron2013-08-252-6/+28
| | | | | | | | | | | | | | | | | | Add a new ttm_bo_release_mmap() function to unmap pages in a vm_object_t. Pages are freed when the buffer object is later released. This function is called in ttm_bo_unmap_virtual_locked(), replacing Linux' unmap_mapping_range(). In particular this is called when a buffer object is about to be moved, so that its mapping is invalidated. However, we don't use this function in ttm_bo_vm_dtor(), because the vm_object_t is already marked as OBJ_DEAD and the pages will be unmapped. Approved by: kib@ Notes: svn path=/head/; revision=254876
* ttm: "to_page->valid = VM_PAGE_BITS_ALL" before vm_page_dirty(to_page)Jean-Sébastien Pédron2013-08-251-1/+1
| | | | | | | Approved by; kib@ Notes: svn path=/head/; revision=254875
* drm/ttm: Improve comment in ttm_bo_vm_ctor() about lack of ref acquisitionJean-Sébastien Pédron2013-08-251-2/+10
| | | | | | | Approved by: kib@ Notes: svn path=/head/; revision=254874
* drm/ttm: When removing a range of pages from a pool, remove all of themJean-Sébastien Pédron2013-08-251-2/+5
| | | | | | | | Submitted by: Mark Kettenis and Jonathan Gray from OpenBSD Approved by: kib@ Notes: svn path=/head/; revision=254873
* drm/ttm: Fix style errorsJean-Sébastien Pédron2013-08-251-15/+15
| | | | Notes: svn path=/head/; revision=254871
* drm/ttm: Make ttm_bo_wait() call uninterruptible in page fault handlerJean-Sébastien Pédron2013-08-251-1/+17
| | | | | | | | | | | This fixes a crash where a SIGLALRM, heavily used by X.Org, would interrupt the wait, causing the page fault to fail and the "Xorg" process to receive a SIGSEGV. Approved by: kib@ Notes: svn path=/head/; revision=254870
* drm/ttm: Import Linux commit ff7c60c580d9722f820d85c9c58ca55ecc1ee7c4Jean-Sébastien Pédron2013-08-251-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Mon Jan 14 15:08:14 2013 +0100 drm/ttm: fix fence locking in ttm_buffer_object_transfer, 2nd try This fixes up commit e8e89622ed361c46bf90ba4828e685a8b603f7e5 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Tue Dec 18 22:25:11 2012 +0100 drm/ttm: fix fence locking in ttm_buffer_object_transfer which leaves behind a might_sleep in atomic context, since the fence_lock spinlock is held over a kmalloc(GFP_KERNEL) call. The fix is to revert the above commit and only take the lock where we need it, around the call to ->sync_obj_ref. v2: Fixup things noticed by Maarten Lankhorst: - Brown paper bag locking bug. - No need for kzalloc if we clear the entire thing on the next line. - check for bo->sync_obj (totally unlikely race, but still someone else could have snuck in) and clear fbo->sync_obj if it's cleared already. Reported-by: Dave Airlie <airlied@gmail.com> Cc: Jerome Glisse <jglisse@redhat.com> Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com> Approved by: kib@ Notes: svn path=/head/; revision=254868
* drm/ttm: Import Linux commit 014b34409fb2015f63663b6cafdf557fdf289628Jean-Sébastien Pédron2013-08-251-0/+1
| | | | | | | | | | | | | | | | | | | | Author: Dave Airlie <airlied@gmail.com> Date: Wed Jan 16 15:58:34 2013 +1000 ttm: on move memory failure don't leave a node dangling if we have a move notify callback, when moving fails, we call move notify the opposite way around, however this ends up with *mem containing the mm_node from the bo, which means we double free it. This is a follow on to the previous fix. Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Approved by: kib@ Notes: svn path=/head/; revision=254867
* drm/ttm: Import Linux commit 630541863b29f88c7ab34e647758344e4cd1eafdJean-Sébastien Pédron2013-08-251-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | Author: Dave Airlie <airlied@gmail.com> Date: Wed Jan 16 14:25:44 2013 +1000 ttm: don't destroy old mm_node on memcpy failure When we are using memcpy to move objects around, and we fail to memcpy due to lack of memory to populate or failure to finish the copy, we don't want to destroy the mm_node that has been copied into old_copy. While working on a new kms driver that uses memcpy, if I overallocated bo's up to the memory limits, and eviction failed, then machine would oops soon after due to having an active bo with an already freed drm_mm embedded in it, freeing it a second time didn't end well. Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Approved by: kib@ Notes: svn path=/head/; revision=254866
* drm/ttm: Import Linux commit cc4c0c4de3c775be22072ec3251f2e581b63d9a0Jean-Sébastien Pédron2013-08-252-13/+1
| | | | | | | | | | | | | | | | | | Author: Maarten Lankhorst <maarten.lankhorst@canonical.com> Date: Tue Jan 15 14:57:28 2013 +0100 drm/ttm: unexport ttm_bo_wait_unreserved All legitimate users of this function outside ttm_bo.c are gone, now it's only an implementation detail. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Approved by: kib@ Notes: svn path=/head/; revision=254865
* drm/ttm: Import Linux commit f2d476a110bc24fde008698ae9018c99e803e25cJean-Sébastien Pédron2013-08-251-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | Author: Maarten Lankhorst <maarten.lankhorst@canonical.com> Date: Tue Jan 15 14:57:10 2013 +0100 drm/ttm: use ttm_bo_reserve_slowpath_nolru in ttm_eu_reserve_buffers, v2 This requires re-use of the seqno, which increases fairness slightly. Instead of spinning with a new seqno every time we keep the current one, but still drop all other reservations we hold. Only when we succeed, we try to get back our other reservations again. This should increase fairness slightly as well. Changes since v1: - Increase val_seq before calling ttm_bo_reserve_slowpath_nolru and retrying to take all entries to prevent a race. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Approved by: kib@ Notes: svn path=/head/; revision=254864
* drm/ttm: Import Linux commit 5e45d7dfd74100d622f9cdc70bfd1f9fae1671deJean-Sébastien Pédron2013-08-252-0/+80
| | | | | | | | | | | | | | | | | | | | Author: Maarten Lankhorst <maarten.lankhorst@canonical.com> Date: Tue Jan 15 14:57:05 2013 +0100 drm/ttm: add ttm_bo_reserve_slowpath Instead of dropping everything, waiting for the bo to be unreserved and trying over, a better strategy would be to do a blocking wait. This can be mapped a lot better to a mutex_lock-like call. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Approved by: kib@ Notes: svn path=/head/; revision=254863
* drm/ttm: Import Linux commit 7a1863084c9d90ce4b67d645bf9b0f1612e68f62Jean-Sébastien Pédron2013-08-252-31/+19
| | | | | | | | | | | | | | | | | Author: Maarten Lankhorst <maarten.lankhorst@canonical.com> Date: Tue Jan 15 14:56:48 2013 +0100 drm/ttm: cleanup ttm_eu_reserve_buffers handling With the lru lock no longer required for protecting reservations we can just do a ttm_bo_reserve_nolru on -EBUSY, and handle all errors in a single path. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Notes: svn path=/head/; revision=254862
* drm/ttm: Import Linux commit 63d0a4195560362e2e00a3ad38fc331d34e1da9bJean-Sébastien Pédron2013-08-253-33/+42
| | | | | | | | | | | | | | | | | | Author: Maarten Lankhorst <maarten.lankhorst@canonical.com> Date: Tue Jan 15 14:56:37 2013 +0100 drm/ttm: remove lru_lock around ttm_bo_reserve There should no longer be assumptions that reserve will always succeed with the lru lock held, so we can safely break the whole atomic reserve/lru thing. As a bonus this fixes most lockdep annotations for reservations. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Notes: svn path=/head/; revision=254861