]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
10 years agoMFC r253720: Use kern_ioctl() rather than ioctl() for testing the FBT provider
avg [Mon, 17 Feb 2014 11:28:16 +0000 (11:28 +0000)]
MFC r253720: Use kern_ioctl() rather than ioctl() for testing the FBT provider

git-svn-id: svn://svn.freebsd.org/base/stable/9@262023 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r252895: Add a man page for the SDT_* macros
avg [Mon, 17 Feb 2014 11:22:59 +0000 (11:22 +0000)]
MFC r252895: Add a man page for the SDT_* macros

git-svn-id: svn://svn.freebsd.org/base/stable/9@262021 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261719:
mav [Mon, 17 Feb 2014 09:37:01 +0000 (09:37 +0000)]
MFC r261719:
Fix wrong device name in example.

PR:             docs/185602
Submitted by:   koitsu

git-svn-id: svn://svn.freebsd.org/base/stable/9@262018 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260043:
markj [Mon, 17 Feb 2014 05:07:09 +0000 (05:07 +0000)]
MFC r260043:
The arguments to sched:::off-cpu are the thread and associated process of
the thread selected to run, not the currently running thread.

git-svn-id: svn://svn.freebsd.org/base/stable/9@262013 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoDirect commit to stable/9 to note that the nve(4) driver has been
brueffer [Sun, 16 Feb 2014 19:41:44 +0000 (19:41 +0000)]
Direct commit to stable/9 to note that the nve(4) driver has been
deprecated.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261990 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r261838
brueffer [Sun, 16 Feb 2014 11:14:36 +0000 (11:14 +0000)]
MFC: r261838

Add a deprecation notice to nve.4 and Xref nfe.4.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261973 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r261655
brueffer [Sun, 16 Feb 2014 10:28:18 +0000 (10:28 +0000)]
MFC: r261655

Refer newfs and growfs users to fsck_ffs instead of
fsck, the latter does not accept the referred to "-b" flag.

The part of the change pertaining newfs has already been merged
to stable/9 in r237505, so only record that part of the merge.

PR: 82720
Submitted by: David D.W. Downey

git-svn-id: svn://svn.freebsd.org/base/stable/9@261964 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r242482: kdump: Also decode fcntl commands containing underscores and
jilles [Sat, 15 Feb 2014 23:23:13 +0000 (23:23 +0000)]
MFC r242482: kdump: Also decode fcntl commands containing underscores and
digits.

The commands F_SETLK_REMOTE, F_DUPFD_CLOEXEC and F_DUP2FD_CLOEXEC were not
decoded.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261952 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r255238:
kevlo [Sat, 15 Feb 2014 14:55:35 +0000 (14:55 +0000)]
MFC r255238:

Add support for DLINK DWA-127 Wireless Adapter.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261933 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r261611
brueffer [Fri, 14 Feb 2014 08:31:16 +0000 (08:31 +0000)]
MFC: r261611

Add some context for the "kldload sem" command; minor other improvements.

PR: 183650
Submitted by: Bjorn Heidotting

git-svn-id: svn://svn.freebsd.org/base/stable/9@261880 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r261584
brueffer [Fri, 14 Feb 2014 08:22:57 +0000 (08:22 +0000)]
MFC: r261584

In IPv6 code examples, use the correct v6 socket.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261877 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261597, r261598 and r261599:
hselasky [Fri, 14 Feb 2014 07:36:04 +0000 (07:36 +0000)]
MFC r261597, r261598 and r261599:

Apple touchpad manual page fixes:
- Add manual page for wsp driver
- Update atp driver manual page
- Install atp manual page for all platforms

git-svn-id: svn://svn.freebsd.org/base/stable/9@261874 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257957:
kevlo [Fri, 14 Feb 2014 03:30:55 +0000 (03:30 +0000)]
MFC r257957:

Mention the RT5370/RT5372 chipset.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261866 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259544, r259545, r259546, r259547, r259812, r259939, r260219, r260542,
kevlo [Fri, 14 Feb 2014 02:53:10 +0000 (02:53 +0000)]
MFC r259544, r259545, r259546, r259547, r259812, r259939, r260219, r260542,
    r261118, r261124, r261330:

- Add support for the MediaTek/Ralink RT3593 chipset.
- Various minor USB WLAN fixes and improvements.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261865 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261861
davidcs [Fri, 14 Feb 2014 01:46:33 +0000 (01:46 +0000)]
MFC r261861
  check for defrag only when bus_dmamap_load_mbuf_sg() returns EFBIG. Comment in
  qla_hw_send is moot.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261862 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257600:
markj [Thu, 13 Feb 2014 04:55:18 +0000 (04:55 +0000)]
MFC r257600:
Initialize the struct tm before handing it to strptime(3).

git-svn-id: svn://svn.freebsd.org/base/stable/9@261821 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r241046: libc: Use O_CLOEXEC for various internal file descriptors.
jilles [Wed, 12 Feb 2014 21:10:40 +0000 (21:10 +0000)]
MFC r241046: libc: Use O_CLOEXEC for various internal file descriptors.

This fixes a race condition where another thread may fork(), unintentionally
passing the descriptor to the child process.

This commit only adds O_CLOEXEC flags to open() or openat() calls where no
fcntl(fd, F_SETFD, FD_CLOEXEC) follows.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261813 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261680:
dim [Wed, 12 Feb 2014 07:51:14 +0000 (07:51 +0000)]
MFC r261680:

Pull in r200899 from upstream clang trunk:

  Allow transformation of VariableArray to ConstantArray.

  In the following code:

     struct A { static const int sz; };
     template<class T> void f() { T arr[A::sz]; }

  the array 'arr' is represented as a variable size array in the template.
  If 'A::sz' gets value below in the translation unit, the array in
  instantiation can turn into constant size array.

  This change fixes PR18633.

  Differential Revision: http://llvm-reviews.chandlerc.com/D2688

This fixes "Assertion failed: (T::isKind(*this)), function castAs"
errors, which can occur when building the security/quantis port.

Reported by: ale

git-svn-id: svn://svn.freebsd.org/base/stable/9@261794 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261507:
hselasky [Wed, 12 Feb 2014 07:24:37 +0000 (07:24 +0000)]
MFC r261507:
Add more quirks for making builtin audio speakers work with more
MacBookPro's. Only tested with MacBookPro 9,2.

Obtained from: Linux

git-svn-id: svn://svn.freebsd.org/base/stable/9@261793 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r261487
brueffer [Tue, 11 Feb 2014 08:15:40 +0000 (08:15 +0000)]
MFC: r261487

Add qlxgbe(4) and glxge(4) to the hardware notes.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261740 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r261339
brueffer [Mon, 10 Feb 2014 22:27:40 +0000 (22:27 +0000)]
MFC: r261339

MLINK ixgbe.4 to {if_ix.4, ix.4}.  An update for ixgbe.4
which deals with the "ix prefix being shared by two drivers"
situation is forthcoming.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261732 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r261447
brueffer [Mon, 10 Feb 2014 22:21:22 +0000 (22:21 +0000)]
MFC: r261447

Fix a typo.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261730 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261609:
dim [Mon, 10 Feb 2014 20:25:40 +0000 (20:25 +0000)]
MFC r261609:

Pull in upstream libcxxrt commit 8006101, which makes its cxxabi.h file
compilable just by itself.

PR: kern/184019

git-svn-id: svn://svn.freebsd.org/base/stable/9@261727 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261522:
wblock [Mon, 10 Feb 2014 17:41:40 +0000 (17:41 +0000)]
MFC r261522:

Describe the use of a freebsd-boot GPT partition, brought up by Scot
Hetzel <swhetzel@gmail.com> on the -doc mailing list.

Also modify the Author section to be clear that I wrote the man page,
not gptboot.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261721 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261400:
ae [Mon, 10 Feb 2014 16:13:45 +0000 (16:13 +0000)]
MFC r261400:
  Take exclusive lock only when lle isn't NULL. We don't need write access
  to lle in most cases.

MFC r261583:
  Unlock entry before retry.

Sponsored by: Yandex LLC

git-svn-id: svn://svn.freebsd.org/base/stable/9@261717 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoRun ldconfig(8) rc script before building ports so
gjb [Mon, 10 Feb 2014 07:17:46 +0000 (07:17 +0000)]
Run ldconfig(8) rc script before building ports so
ld-elf.so.hints exists for pkg(8).

This is a direct commit to stable/9 as generate-release.sh
does not exist in head/.

PR: 186554
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@261707 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: 260796
gnn [Sun, 9 Feb 2014 21:48:14 +0000 (21:48 +0000)]
MFC: 260796

Fix various places where we don't properly release a lock.

PR: 185043
Submitted by: Michael Bentkofsky

git-svn-id: svn://svn.freebsd.org/base/stable/9@261694 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259717:
dumbbell [Sun, 9 Feb 2014 20:17:40 +0000 (20:17 +0000)]
MFC r259717:

drm: Lower priority of "EDID checksum is invalid" message

The priority goes from "error" to "debug".

Connectors are polled every 10 seconds. Reading EDID is part of this
polling. However, when an invalid EDID is returned, this error message
is logged. When using Newcons for instance, having a kernel message
every 10 seconds is getting annoying.

Now that it's a debug message, it'll be logged only if hw.dri.debug is
enabled. This fix console spamming for some users.

Tested by: Larry Rosenman <ler@lerctr.org>

git-svn-id: svn://svn.freebsd.org/base/stable/9@261675 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258549:
dumbbell [Sun, 9 Feb 2014 20:08:16 +0000 (20:08 +0000)]
MFC r258549:

drm: Dereference pointers given to qsort_r()'s cmp callback

drm_le_cmp() (qsort_r()'s callback) receives pointers to elements in the
array passed to qsort_r(), not the elements themselves.

Before this fix, the use of qsort_r() shuffled the array, not sorted it,
because the compare callback accessed random memory locations, not the
expected elements.

This bug triggered an infinite loop in KDE/xserver:

    1. KDE has a kded module called "randrmonitor" which queries xserver
       for current monitors at startup and then listens to RandR
       notifications from xserver.

    2. xserver handles the query from "randrmonitor" by polling the
       video device using the "drm_mode_getconnector()" ioctl. This
       ioctl returns a list of connectors and, for those with a
       connected monitor, the available modes. Each modes list is sorted
       by the kernel before returning. When xserver gets the connectors
       list, it sorts the modes lists again.

       In the case of this bug, when two modes are equal (in xserver's
       compare function PoV), their order is kept stable (ie. the
       kernel order is kept for those two modes). And because the list
       was shuffled by the kernel, the order of two equal modes was
       frequently changed in the final modes list in xserver.

    3. xserver compares the returned connectors list with the list
       obtained earlier. In particular, it compares the sorted
       modes lists for each connector. If a property of a connector
       changes (eg. modes), xserver sends a "RRNotify_OutputChange"
       notification.

       Because of the change of order between equal modes, xserver sent
       a notification after each polling of the connectors.

    4. "randrmonitor" receives a notification, triggered by its query. The
       notification doesn't contain the new connectors list, therefore, it
       asks for the new list using the same function: go back to step #2.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261674 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258262:
dumbbell [Sun, 9 Feb 2014 19:54:39 +0000 (19:54 +0000)]
MFC r258262:

drm: Support DRM_CAP_TIMESTAMP_MONOTONIC capability

This fixes DPMS with KDE and radeonkms. Without this, the display would
freeze when the monitor is put into sleep state, and only resumes after
several dozens of minutes once the monitor is powered on again.

Tested by: Mathias Picker <Mathias.Picker@virtual-earth.de>

git-svn-id: svn://svn.freebsd.org/base/stable/9@261673 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254852:
dumbbell [Sun, 9 Feb 2014 19:36:27 +0000 (19:36 +0000)]
MFC r254852:

drm: Update drm_pciids.h based on Linux 3.8

This header can be easily updated using the new "gen-drm_pciids" script,
available in tools/tools/drm. The script uses the Linux' drm_pciids.h
header for new IDs, the FreeBSD's one because we add the name of the
device to each IDs, and the PCI IDs database (misc/pciids port) to fill
this name automatically for new IDS.

To call the script:
  tools/tools/drm/gen-drm_pciids \
    /path/to/linux/drm_pciids.h \
    /path/to/freebsd/drm_pciids.h \
    /path/to/pciids/pci.ids

git-svn-id: svn://svn.freebsd.org/base/stable/9@261672 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254853:
dumbbell [Sun, 9 Feb 2014 16:38:58 +0000 (16:38 +0000)]
MFC r254853:

drm: Import drm_fixed.h from Linux 3.8

git-svn-id: svn://svn.freebsd.org/base/stable/9@261669 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254848, r258930:
dumbbell [Sun, 9 Feb 2014 16:16:24 +0000 (16:16 +0000)]
MFC r254848, r258930:

drm: Import drm_pcie_get_speed_cap_mask() in drm_pci.c

This comes with several PCI_VENDOR_ID_* defines which should go in a
more central place.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261667 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254841:
dumbbell [Sun, 9 Feb 2014 16:07:24 +0000 (16:07 +0000)]
MFC r254841:

drm: Import list_for_each_entry_safe_from() macro

git-svn-id: svn://svn.freebsd.org/base/stable/9@261666 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254840:
dumbbell [Sun, 9 Feb 2014 16:01:18 +0000 (16:01 +0000)]
MFC r254840:

drm: Use DRM_IF_MAJOR & DRM_IF_MINOR from drm_core.h

git-svn-id: svn://svn.freebsd.org/base/stable/9@261665 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254838:
dumbbell [Sun, 9 Feb 2014 15:56:15 +0000 (15:56 +0000)]
MFC r254838:

drm: In drm_gem_name_create(), verify argument before acquiring lock

Submitted by: J.R. Oldroyd <jr@opal.com>

git-svn-id: svn://svn.freebsd.org/base/stable/9@261664 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254836, r254837:
dumbbell [Sun, 9 Feb 2014 15:48:49 +0000 (15:48 +0000)]
MFC r254836, r254837:

drm: Support gem_open_object() and gem_close_object() callbacks

... in struct drm_driver_info.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261662 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254835:
dumbbell [Sun, 9 Feb 2014 15:34:38 +0000 (15:34 +0000)]
MFC r254835:

drm: Fix typo in KASSERT message: s/Dandling/Dangling/

git-svn-id: svn://svn.freebsd.org/base/stable/9@261661 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254833:
dumbbell [Sun, 9 Feb 2014 15:27:26 +0000 (15:27 +0000)]
MFC r254833:

drm: Import Linux commit cd004b3f4cd4169815c82bf9e424fda06978898a

Author: Shirish S <s.shirish@samsung.com>
Date:   Thu Aug 30 07:04:06 2012 +0000

    drm: edid: add support for E-DDC

    The current logic for probing ddc is limited to
    2 blocks (256 bytes), this patch adds support
    for the 4 block (512) data.

    To do this, a single 8-bit segment index is
    passed to the display via the I2C address 30h.
    Data from the selected segment is then immediately
    read via the regular DDC2 address using a repeated
    I2C 'START' signal.

Signed-off-by: Shirish S <s.shirish@samsung.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Ville Syrjala <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
git-svn-id: svn://svn.freebsd.org/base/stable/9@261660 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254821:
dumbbell [Sun, 9 Feb 2014 15:17:57 +0000 (15:17 +0000)]
MFC r254821:

drm: Fix cleanup if device initialization fails

This plugs some memory leaks.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261659 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254820:
dumbbell [Sun, 9 Feb 2014 14:58:47 +0000 (14:58 +0000)]
MFC r254820:

drm: Use driver-provided "use_msi" callback to determine if MSI is blacklisted

For now, keep the static array for i915. But eventually, it should be
moved to a callback in the driver itself.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261658 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254819:
dumbbell [Sun, 9 Feb 2014 14:02:39 +0000 (14:02 +0000)]
MFC r254819:

drm: Don't delete already deleted iicbus child from drm_iic_dp_aux

The iic_dp_aux_detach callback is therefore useless: it's replaced by
bus_generic_detach. This fixes a "General protection fault" panic during
second (incorrect) deletion of the child.

Tested by: kwm@
Reviewed by: ray@

git-svn-id: svn://svn.freebsd.org/base/stable/9@261654 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254818:
dumbbell [Sun, 9 Feb 2014 13:56:37 +0000 (13:56 +0000)]
MFC r254818:

drm: Move definition of EREMOTEIO to drmP.h

It will be used by both i915 and radeon drivers.

Add ERESTARTSYS definition at the same time.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261653 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254817:
dumbbell [Sun, 9 Feb 2014 13:50:08 +0000 (13:50 +0000)]
MFC r254817:

drm: Import drm_dp_helper.c from Linux 3.8-rc3

While here, update drm_dp_helper.h to better match Linux one.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261652 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r255093 (by theraven):
dim [Sun, 9 Feb 2014 00:37:16 +0000 (00:37 +0000)]
MFC r255093 (by theraven):

  Don't use _Unwind_Backtrace() on ARM as it's currently missing from
  our libgcc_s.  andrew@ has patches to add it, so this can be reverted
  and sync'd with upstream later.

MFC r255815 (by theraven):

  Import a new libcxxrt.  This fixes some potential crashing in the
  demangler.

MFC r260553 (by theraven):

  Add missing C++11 typeinfos to the libcxxrt version script.

  PR: 185663

git-svn-id: svn://svn.freebsd.org/base/stable/9@261645 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261354:
kib [Sat, 8 Feb 2014 15:51:42 +0000 (15:51 +0000)]
MFC r261354:
In _pthread_kill(), if passed pthread is current thread, do not send
the signal second time, by adding the missed else before if statement.

PR: threads/186309

git-svn-id: svn://svn.freebsd.org/base/stable/9@261637 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254798:
dumbbell [Sat, 8 Feb 2014 11:05:48 +0000 (11:05 +0000)]
MFC r254798:

drm: Fix leak of connector->edid_blob_ptr

git-svn-id: svn://svn.freebsd.org/base/stable/9@261632 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254797:
dumbbell [Sat, 8 Feb 2014 10:57:46 +0000 (10:57 +0000)]
MFC r254797:

drm: Const'ify the 1st "drm_display_mode" passed to "mode_fixup" callbacks

This will be needed by the Radeon KMS driver.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261631 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254796:
dumbbell [Sat, 8 Feb 2014 10:45:49 +0000 (10:45 +0000)]
MFC r254796:

drm/i915: Import Linux commit 71244653a8fb0f46bc12ae421f1d5f72af6a75da

Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Mon Jun 4 18:39:20 2012 +0200

    drm/i915: adjusted_mode->clock in the dp mode_fixup

    ... instead of changing mode->clock, which we should leave as-is.

    After the previous patch we only touch that if it's a panel, and then
    adjusted mode->clock equals adjusted_mode->clock. Outside of
    intel_dp.c we only use ajusted_mode->clock in the mode_set functions.

    Within intel_dp.c we only use it to calculate the dp dithering
    and link bw parameters, so that's the only thing we need to fix
    up.

    As a temporary ugliness (until the cleanup in the next patch) we
    pass the adjusted_mode into dp_dither for both parameters (because
    that one still looks at mode->clock).

    Note that we do overwrite adjusted_mode->clock with the selected dp
    link clock, but that only happens after we've calculated everything we
    need based on the dotclock of the adjusted output configuration.

    Outside of intel_dp.c only intel_display.c uses adjusted_mode->clock,
    and that stays the same after this patch (still equals the selected dp
    link clock). intel_display.c also needs the actual dotclock (as
    target_clock), but that has been fixed up in the previous patch.

    v2: Adjust the debug message to also use adjusted_mode->clock.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
git-svn-id: svn://svn.freebsd.org/base/stable/9@261630 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254794:
dumbbell [Sat, 8 Feb 2014 10:33:23 +0000 (10:33 +0000)]
MFC r254794:

drm: Import drm_buffer.[ch] from Linux 3.8-rc3

This will be used by the Radeon KMS driver.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261629 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254792:
dumbbell [Sat, 8 Feb 2014 09:50:02 +0000 (09:50 +0000)]
MFC r254792:

drm: Call drm_global_init() & drm_global_release() at module load/unload

git-svn-id: svn://svn.freebsd.org/base/stable/9@261626 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r249041, r249249:
dumbbell [Sat, 8 Feb 2014 09:25:56 +0000 (09:25 +0000)]
MFC r249041, r249249:

drm and i915: Left-shift iic_msg.slave at creation time

This is required because, in the radeon driver, we can't left-shift in a
central place, like it was done in the i915 driver.

Reviewed by: kib@, kan@, avg@
Tested by: kib@, avg@,
Olivier Cochard-Labbé <olivier@cochard.me>

git-svn-id: svn://svn.freebsd.org/base/stable/9@261625 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r248061:
dumbbell [Sat, 8 Feb 2014 08:50:44 +0000 (08:50 +0000)]
MFC r248061:

Import Linux commit a1b7736dac5f2d5876e68c47a0fce3f423840070
Author: Sascha Hauer <s.hauer@pengutronix.de>
Date:   Wed Feb 1 11:38:22 2012 +0100

    drm drm_fb_helper: destroy modes

    drm_setup_crtcs allocated modes using drm_mode_duplicate. Free
    them in drm_fb_helper_crtc_free.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Discussed with: Konstantin Belousov (kib@)

git-svn-id: svn://svn.freebsd.org/base/stable/9@261624 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259679:
dumbbell [Sat, 8 Feb 2014 08:16:38 +0000 (08:16 +0000)]
MFC r259679:

vga_pci: Improve boot display detection

The previous code was checking the "VGA Enable" bit on the video card's
parent PCI-to-PCI bridge only. This didn't work for the case where the
video card is attached to the root PCI bus (ie. the card has no parent
PCI-to-PCI bridge).

Now, the new code:
    1. checks the "VGA Enable" bit on the parent bridge only if it's a
       PCI-to-PCI bridge;
    2. always checks the "I/O" and "Memory address space decoding" bits
       on the video card itself.

However, vendor-specific bits are not used.

This fixes the use of many integrated Radeon cards: without this patch,
we fail to detect them as the boot display and, when radeonkms looks for
the Video BIOS, it skips the shadow copy made by the System BIOS. It
then fails to fully initialize the card, because the shadow copy is the
only way to read the Video BIOS in these situations. A workaround was to
force the boot display selection using the "hw.pci.default_vgapci_unit"
tunable.

A previous version of this patch added a new function doing the checks.
Now, the vga_pci_is_boot_display() function is used to perform the
checks (only until the boot display is found) and return if the given
device is the boot display or not.

Furthermore, vga_pci_attach() logs "Boot video device" if the card being
attached it the Chosen One:
    vgapci0: <VGA-compatible display> [...]
    vgapci0: Boot video device

Reviewed by: kib@, jhb@ (both a previous version)
Tested by: lunatic_ (#freebsd-xorg, integrated Radeon card,
xmj (#freebsd-xorg, i915+NVIDIA cards)

git-svn-id: svn://svn.freebsd.org/base/stable/9@261623 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254882, r254883, r255571:
dumbbell [Sat, 8 Feb 2014 07:53:39 +0000 (07:53 +0000)]
MFC r254882, r254883, r255571:

vga_pci: Add API to map the Video BIOS

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:
    int    vga_pci_is_boot_display(device_t dev);

Submitted by: jhb@ (r255571)

git-svn-id: svn://svn.freebsd.org/base/stable/9@261622 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r244535, r245995, r261505 and r258961:
hselasky [Fri, 7 Feb 2014 07:31:54 +0000 (07:31 +0000)]
MFC r244535, r245995, r261505 and r258961:
- Use a boundary of zero, hence a PAGE_SIZE boundary
is implied by all memory allocations.
- Fix an external compiler warning about write-only
assigned variable.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261580 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261449:
mav [Fri, 7 Feb 2014 05:23:04 +0000 (05:23 +0000)]
MFC r261449:
Fix lock acquisition in case no request space available, missed in r260097.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261578 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: 261291
gnn [Fri, 7 Feb 2014 04:35:20 +0000 (04:35 +0000)]
MFC: 261291

The timestamp bit is number 17, and not number 9, in the stat error
field of the receive descriptor.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261576 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260949:
mav [Fri, 7 Feb 2014 04:10:30 +0000 (04:10 +0000)]
MFC r260949:
Make comconsole options set before its activation to be remembered.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261574 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261080:
kib [Thu, 6 Feb 2014 19:47:50 +0000 (19:47 +0000)]
MFC r261080:
The posix_fallocate(2) syscall should return error number on error,
without modifying errno.

MFC r261290:
The posix_madvise(3) and posix_fadvise(2) should return error on
failure, same as posix_fallocate(2).

git-svn-id: svn://svn.freebsd.org/base/stable/9@261561 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r233049 by rmh
brueffer [Thu, 6 Feb 2014 07:55:50 +0000 (07:55 +0000)]
MFC: r233049 by rmh

Remove gratuitous DEBUG_FLAGS="-g" setting (this is already the default
option with GENERIC kernels).

PR: 179536
Submitted by: Alexey Markov

git-svn-id: svn://svn.freebsd.org/base/stable/9@261539 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261260, r261262, r261315 and r261343:
hselasky [Wed, 5 Feb 2014 08:42:59 +0000 (08:42 +0000)]
MFC r261260, r261262, r261315 and r261343:
Add support for trackpads found in Apple MacBook products. While at it
add some missing devd entries.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261510 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoTypo in the EXAMPLES section: this is regexp, not a shell wildcard expression.
pluknet [Tue, 4 Feb 2014 14:30:34 +0000 (14:30 +0000)]
Typo in the EXAMPLES section: this is regexp, not a shell wildcard expression.

This is a direct commit to stable/9.

Submitted by: Ilya Noskov <phantom@phantom.su>

git-svn-id: svn://svn.freebsd.org/base/stable/9@261488 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260903:
hselasky [Tue, 4 Feb 2014 10:27:39 +0000 (10:27 +0000)]
MFC r260903:
Add support for GPS ports to UHSO driver.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261485 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260315:
hselasky [Tue, 4 Feb 2014 10:22:28 +0000 (10:22 +0000)]
MFC r260315:
Implement two new libusb API functions.

PR: usb/185454

git-svn-id: svn://svn.freebsd.org/base/stable/9@261483 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261228:
hselasky [Tue, 4 Feb 2014 09:06:07 +0000 (09:06 +0000)]
MFC r261228:
When detaching a [USB] keyboard, keys might still be pressed. Ensure
that all pressed keys are released before completing the USB keyboard
detach. This will prevent so-called "ghost-keys" from appearing after
that the USB device generating the key event(s) has been detached.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261477 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261224:
hselasky [Tue, 4 Feb 2014 08:59:02 +0000 (08:59 +0000)]
MFC r261224:
Comply to the official LibUSB v1.0 API:
"It is legal to attempt to claim an already-claimed interface."

git-svn-id: svn://svn.freebsd.org/base/stable/9@261474 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261134:
hselasky [Tue, 4 Feb 2014 08:55:44 +0000 (08:55 +0000)]
MFC r261134:
Add more USB quirks.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261472 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261123:
hselasky [Tue, 4 Feb 2014 08:47:08 +0000 (08:47 +0000)]
MFC r261123:
Reduce dmesg verbosity.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261467 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261004, r261005 and r261033:
hselasky [Tue, 4 Feb 2014 08:44:33 +0000 (08:44 +0000)]
MFC r261004, r261005 and r261033:
Adjust the DMA delay logic so that the DMA delay does not become too small.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261466 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261003:
hselasky [Tue, 4 Feb 2014 08:37:47 +0000 (08:37 +0000)]
MFC r261003:
Add new quirk.

PR: usb/185968

git-svn-id: svn://svn.freebsd.org/base/stable/9@261464 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260996:
mav [Tue, 4 Feb 2014 00:52:08 +0000 (00:52 +0000)]
MFC r260996:
Fix memory and references leak due to unfreed path in case we can't
allocate bus scan CCB.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261451 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: 260791
gnn [Mon, 3 Feb 2014 03:35:43 +0000 (03:35 +0000)]
MFC: 260791

Add a command line argument to turn off blocking waiting for the user
to press Ctrl-C (-b).  This allows tests with tight loops of mcgrabs
that can stress the multicast tables.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261427 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260883:
mav [Sun, 2 Feb 2014 00:34:32 +0000 (00:34 +0000)]
MFC r260883:
Remove unneeded and dangerous assignment.  It would probably cause NULL
refererence panic if compiler not optimize it out.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261392 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: Note merge of sendmail 8.14.8.
gshapiro [Sat, 1 Feb 2014 23:47:45 +0000 (23:47 +0000)]
MFC: Note merge of sendmail 8.14.8.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261376 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: Minor changes to force commit these files so new freebsd*.cf files are
gshapiro [Sat, 1 Feb 2014 23:44:26 +0000 (23:44 +0000)]
MFC: Minor changes to force commit these files so new freebsd*.cf files are
     built to use the new sendmail-8.14.8/cf tree.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261375 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: Add missing svn:keywords property to new files
gshapiro [Sat, 1 Feb 2014 23:40:48 +0000 (23:40 +0000)]
MFC: Add missing svn:keywords property to new files

git-svn-id: svn://svn.freebsd.org/base/stable/9@261374 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: Update for sendmail 8.14.8 import
gshapiro [Sat, 1 Feb 2014 23:40:23 +0000 (23:40 +0000)]
MFC: Update for sendmail 8.14.8 import

git-svn-id: svn://svn.freebsd.org/base/stable/9@261373 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: Remove local FreeBSD workaround now that upstream project has a better fix.
gshapiro [Sat, 1 Feb 2014 23:39:59 +0000 (23:39 +0000)]
MFC: Remove local FreeBSD workaround now that upstream project has a better fix.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261372 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: Add new sendmail 8.14.8 file
gshapiro [Sat, 1 Feb 2014 23:39:03 +0000 (23:39 +0000)]
MFC: Add new sendmail 8.14.8 file

git-svn-id: svn://svn.freebsd.org/base/stable/9@261371 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: Merge sendmail 8.14.8
gshapiro [Sat, 1 Feb 2014 23:37:03 +0000 (23:37 +0000)]
MFC: Merge sendmail 8.14.8

git-svn-id: svn://svn.freebsd.org/base/stable/9@261370 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: Update link to vendor import instructions
gshapiro [Sat, 1 Feb 2014 22:06:02 +0000 (22:06 +0000)]
MFC: Update link to vendor import instructions

git-svn-id: svn://svn.freebsd.org/base/stable/9@261360 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261261: Restore the Nx macro.
pluknet [Sat, 1 Feb 2014 10:42:15 +0000 (10:42 +0000)]
MFC r261261: Restore the Nx macro.

PR: 186205
Submitted by: naddy

git-svn-id: svn://svn.freebsd.org/base/stable/9@261347 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261136:
pfg [Fri, 31 Jan 2014 04:06:00 +0000 (04:06 +0000)]
MFC r261136:

ext2fs: Re-enable reallocblk.

The major corruption issues affecting this code have been fixed.

Tested by: Mike Ma

git-svn-id: svn://svn.freebsd.org/base/stable/9@261314 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260988, r261034, r261120, r261235:
pfg [Fri, 31 Jan 2014 03:59:28 +0000 (03:59 +0000)]
MFC r260988, r261034, r261120,  r261235:

ext2fs: Properly the EXT4_EXTENTS and EXT4_INDEX to the inode flags.

In order to support Ext4 extents we need to pass the Ext4 inode flags
without interfering with the chflags. This is better done by using the
i_flag field in the inode and doing proper translation to the linux
ext4 equivalents.

Solve a potential corruption issue in the dirindex code. The dirindex
code can now be renabled as the problems related to it have been
solved.

Suggested by: bde
Tested by: kevlo

git-svn-id: svn://svn.freebsd.org/base/stable/9@261312 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261175:
pfg [Fri, 31 Jan 2014 03:39:11 +0000 (03:39 +0000)]
MFC r261175:

binutils: add support for Intel SMAP-related instructions

Add support for stac/clac instructions to manipulate the flag
that controls the behaviour of Intel's Supervisor Mode Access
Prevention (SMAP) feature.

Tested by: dim
Obtained from: OpenBSD

git-svn-id: svn://svn.freebsd.org/base/stable/9@261308 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 261216:
jhb [Thu, 30 Jan 2014 19:13:14 +0000 (19:13 +0000)]
MFC 261216:
Explicitly enable I/O and memory decoding in the bridge's command register
when activating an I/O or memory window on the CardBus bridge.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261293 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261084:
ae [Thu, 30 Jan 2014 10:54:11 +0000 (10:54 +0000)]
MFC r261084:
  malloc() with M_WAITOK doesn't return NULL.

MFC r261085:
  Fix typo in r261084.
  Add to the gctl_error() an ability to specify error description even
  if numeric error code is already specified. Also by default set
  error code to EINVAL.

  PR: 185852

MFC r261086:
  In gctl_copyin() remove unused error variable.
  geom_alloc_copyin() can't return ENOMEM, so describe its fail as bad
  control request. Add check for NULL pointer in gctl_dump(), since it
  can be NULL when geom_alloc_copyin() failed.

MFC r261089:
  Remove another unneeded NULL check from geom_alloc_copyin().
  Do copyout in case of gctl version mismatch and fix sbuf leak in
  g_ctl_ioctl_ctl().

MFC r261091:
  Always free sbuf in gctl_free().

git-svn-id: svn://svn.freebsd.org/base/stable/9@261286 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261075: Update EINVAL description.
pluknet [Thu, 30 Jan 2014 05:37:17 +0000 (05:37 +0000)]
MFC r261075: Update EINVAL description.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261281 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260267 (by smh), r261042:
mav [Wed, 29 Jan 2014 02:39:44 +0000 (02:39 +0000)]
MFC r260267 (by smh), r261042:
Correct short delete issue in SCSI UNMAP support
Correct missing \n's in xpt_print's
Correct incorrect count being passed to short delete xpt_print

git-svn-id: svn://svn.freebsd.org/base/stable/9@261256 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 260910:
jhb [Tue, 28 Jan 2014 21:56:18 +0000 (21:56 +0000)]
MFC 260910:
- Allow PCI devices that are attached to a driver to be identified by their
  device name instead of just the selector.
- Accept an optional device argument to -l to restrict the output to only
  listing details about a single device.  This is mostly useful in
  conjunction with other flags like -e or -c to allow a user to query
  details about a single device.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261250 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261162:
dim [Tue, 28 Jan 2014 08:07:19 +0000 (08:07 +0000)]
MFC r261162:

Pull in r195679 from upstream llvm trunk:

  Don't use nopl in cpus that don't support it.

  Patch by Mikulas Patocka. I added the test. I checked that for cpu names that
  gas knows about, it also doesn't generate nopl.

  The modified cpus:
  i686 - there are i686-class CPUs that don't have nopl: Via c3, Transmeta
 Crusoe, Microsoft VirtualBox - see
 https://bbs.archlinux.org/viewtopic.php?pid=775414
  k6, k6-2, k6-3, winchip-c6, winchip2 - these are 586-class CPUs
  via c3 c3-2 - see https://bugs.archlinux.org/task/19733 as a proof that
 Via c3 and c3-Nehemiah don't have nopl

PR: bin/185777

git-svn-id: svn://svn.freebsd.org/base/stable/9@261225 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260978:
hselasky [Tue, 28 Jan 2014 07:09:48 +0000 (07:09 +0000)]
MFC r260978:
Add check for "hw.usb.no_pf" sysctl value.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261222 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260485,260496:
ae [Tue, 28 Jan 2014 00:31:48 +0000 (00:31 +0000)]
MFC r260485,260496:
  Remove extra nesting from X_ip6_mforward() function.
  Also remove disabled definitions from ip6_mroute.h.

  PR: 185148

git-svn-id: svn://svn.freebsd.org/base/stable/9@261219 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260872:
jhibbits [Sun, 26 Jan 2014 02:41:00 +0000 (02:41 +0000)]
MFC r260872:

There's actually no data in the PMU_GET_VERSION command.  Don't send any.
This change now allows the PMU to be used on PowerBook5,8.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261179 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260534:
hselasky [Fri, 24 Jan 2014 08:19:50 +0000 (08:19 +0000)]
MFC r260534:
Move USB ID from u3g driver to uhso driver.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261114 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258545:
hselasky [Fri, 24 Jan 2014 08:16:19 +0000 (08:16 +0000)]
MFC r258545:
Comply to the XHCI specification. Certain input context fields should
always be zero.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261112 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260808 and r260814:
hselasky [Fri, 24 Jan 2014 08:08:28 +0000 (08:08 +0000)]
MFC r260808 and r260814:
- Close a minor deadlock.
- Fix a possible memory use after free and leak situation associated
with USB device detach when using character device handles. This also
includes LibUSB. It turns out that "usb_close()" cannot always get a
reference to clean up its USB transfers and such, if called during the
kernel USB device detach.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261109 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260588 and r260589:
hselasky [Fri, 24 Jan 2014 07:57:21 +0000 (07:57 +0000)]
MFC r260588 and r260589:
- Separate I/O errors from reception of STALL PID.
- Implement better error recovery for Transaction Translators, TTs,
found in High Speed USB HUBs which translate from High Speed USB into
FULL or LOW speed USB. In some rare cases SPLIT transactions might get
lost, which might leave the TT in an unknown state. Whenever we detect
such an error try to issue either a clear TT buffer request, or if
that is not possible reset the whole TT.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261106 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260563:
hselasky [Fri, 24 Jan 2014 07:42:26 +0000 (07:42 +0000)]
MFC r260563:
Make sure reserved fields of the EHCI DMA descriptors are not dirty
after previous transfers.

git-svn-id: svn://svn.freebsd.org/base/stable/9@261103 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f