28559 Commits

Author SHA1 Message Date
arybchik
41bc1c612c MFC: r283000
sfxge: add local variable with changed capabilities mask

It is required for the next patch which adds dependency of TSO
capabilities from Tx checksum offloads.

Sponsored by:   Solarflare Communications, Inc.
2015-05-21 09:13:47 +00:00
arybchik
700f83961e MFC: r282998
sfxge: move mbuf free to sfxge_if_transmit()

It is a preparation to the next patch which will service packet queue
even if packet addtion fails.

Sponsored by:   Solarflare Communications, Inc.
2015-05-21 09:12:25 +00:00
arybchik
a53d333e88 MFC: r282997
sfxge: get rid of locked variable in sfxge_tx_packet_add()

Now each branch has one and only one possible TxQ lock state.
It simplifies understanding of the code.

Sponsored by:   Solarflare Communications, Inc.
2015-05-21 09:11:03 +00:00
arybchik
d7d6b9f862 MFC: r282996
sfxge: support Rx checksum offloads disabling

We can't disable it in HW, but we can ignore result.
Discard Rx descriptor checksum flags if Rx checksum offload is off.

Sponsored by:   Solarflare Communications, Inc.
2015-05-21 09:09:51 +00:00
arybchik
8b552766ba MFC: r282942
sfxge: split sfxge_tx_qdpl_put() into *_locked() and *_unlocked()

It simplifies understanding of the sfxge_tx_packet_add() logic and
avoids passing of 'locked' to called function.

Sponsored by:   Solarflare Communications, Inc.
2015-05-21 09:08:10 +00:00
arybchik
8074c227f2 MFC: r282941
sfxge: do not change CSUM_TSO when IFCAP_TSOx is changed

It is simply not required since the kernel checks corresponding
IFCAP_TSOx capability and CSUM_TSO in hw-assisted offloads.
Note that CSUM_TSO is two bits (CSUM_IP_TSO|CSUM_IP6_TSO) and both bits
are set in IPv4 and IPv6 mbufs.

Sponsored by:   Solarflare Communications, Inc.
2015-05-21 09:06:41 +00:00
arybchik
037a819653 MFC: r282940
sfxge: LRO may be done only if checksums are OK

Also it is cheaper to check Rx descriptor flags than TCP protocol in IP
header.

Sponsored by:   Solarflare Communications, Inc.
2015-05-21 09:05:13 +00:00
arybchik
24b8928a5d MFC: r282903
sfxge: advertise IPv6 Rx and Tx checksum offload support

Tx checksum offload may be enabled/disabled.

Sponsored by:   Solarflare Communications, Inc.
2015-05-21 09:03:18 +00:00
arybchik
75239f9f5d MFC: r282900
sfxge: IPv4 Tx checksum offload may be disabled in fact

Split IFCAP_HWCSUM to IFCAP_RXCSUM and IFCAP_TXCSUM to highlight Tx and Rx.

Sponsored by:   Solarflare Communications, Inc.
2015-05-21 09:00:45 +00:00
arybchik
043fbbc3bc MFC: r282899
sfxge: add local variable with Rx descriptor flags

Sponsored by:   Solarflare Communications, Inc.
2015-05-21 08:59:03 +00:00
arybchik
ec420a0fba MFC: r282897
sfxge: add missing const qualifier to sfxge_link_mode

Sponsored by:   Solarflare Communications, Inc.
2015-05-21 08:55:06 +00:00
hselasky
0c5326891a MFC r282505:
Add new USB ID.

PR:		199843
2015-05-21 07:49:44 +00:00
hselasky
620a331d5f MFC r282017:
Allow DSP basename cloning to be disabled or enabled at boot and
runtime. This is useful when implementing OSS sound stacks in
userspace via libcuse for example.
2015-05-21 07:48:06 +00:00
hselasky
c3358cbfc5 MFC r282645, r282646 and r282730:
* Prevent switching to NULL or own window in the "vt_proc_window_switch"
  function. This fixes an issue where X11 keyboard input can appear
  stuck. The cause of the problem is a duplicate TTY device window
  switch IOCTL during boot, which leaves the "vt_switch_timer" running,
  because the current window is already selected. While at it factor out
  some NULL checks.
* The "SYSCTL_INT()" default value is only used for read only SYSCTLs
  and is not applicable unless the integer pointer is NULL. Set it to
  zero to avoid confusion. While at it remove extra semicolon at the end
  of the "VT_SYSCTL_INT()" macro.
* Ensure the result from signed subtraction under modulus does not
  become negative.

PR:			200032
2015-05-21 07:34:08 +00:00
hselasky
cbbe96a6ff MFC r282652:
Ensure the USB audio driver doesn't attach twice on the same USB
device by grabbing all the USB audio device interfaces.
2015-05-21 07:10:49 +00:00
hselasky
baf0162e34 MFC r282577:
Add support for DYMO LabelWriter PnP.
2015-05-21 06:47:20 +00:00
delphij
4d744c17ad MFC r279819:
Fix CARP when in use in a HyperV environment:

 - Bump link state when stopping or starting the interface;
 - Don't handle SIOCGIFADDR specially, similar to r277103.

This change is based on a previous revision from Andy Zhang
(Microsoft) who did the diagnostic work and many thanks to
them for their help in supporting the HyperV work.

PR:		kern/187203
2015-05-19 08:00:39 +00:00
trasz
b843dffbc9 MFC r278237:
Don't call callout_drain() with iscsi mutex held; this fixes a warning
that was introduced recently.  While here, don't try to access is_terminating
without lock.

Sponsored by:	The FreeBSD Foundation
2015-05-15 10:50:58 +00:00
trasz
c22dbda4c6 MFC r278233:
Fix error handling.

Sponsored by:	The FreeBSD Foundation
2015-05-15 10:47:25 +00:00
araujo
05da681425 MFC r282939: Free vsi->queues after use. 2015-05-15 07:07:37 +00:00
jimharris
b07f4ac2f0 MFC r281283:
nvme: remove CHATHAM related code

  Chatham was an internal NVMe prototype board used for
  early driver development.

Sponsored by:	Intel
2015-05-14 21:30:36 +00:00
jimharris
59dfcd2def MFC r281282:
nvme: add device strings for Intel DC series NVMe SSDs

Sponsored by:	Intel
2015-05-14 21:29:42 +00:00
jimharris
aec45f097e MFC r281281, r281285:
nvme: create separate DMA tag for non-payload DMA buffers

  Submission and completion queue memory need to use a
  separate DMA tag for mappings than payload buffers,
  to ensure mappings remain contiguous even with DMAR
  enabled.

Sponsored by:	Intel
2015-05-14 21:28:46 +00:00
jimharris
701899b4c6 MFC r281280:
nvme: fall back to a smaller MSI-X vector allocation if necessary

  Previously, if per-CPU MSI-X vectors could not be allocated,
  nvme(4) would fall back to INTx with a single I/O queue pair.
  This change will still fall back to a single I/O queue pair, but
  allocate MSI-X vectors instead of reverting to INTx.

Sponsored by:	Intel
2015-05-14 21:27:31 +00:00
yongari
f5235a5f5f MFC r281877:
Add another variant of BCM5708S controller to IBM HS21 workaround
  list.

  PR:	118238
2015-05-14 05:10:42 +00:00
araujo
c5564a3d25 Convert space to tabs in the bits that I changed in my last commit.
No functional change.

Reported by:	jmallet@
2015-05-13 08:58:06 +00:00
hiren
1db2d82647 Partial MFC r281838:
For igb(4), when we are doing multiqueue, we are all setup to have full 32bit
RSS hash from the card. Expose that so others like lagg(4) can use that and
avoid hashing the traffic by themselves. Setting hashtype as OPAQUE because
FreeBSD 10 doesn't have RSS support.

Sponsored by:	Limelight Networks
2015-05-13 07:39:16 +00:00
emaste
b270c91e87 MFC r281944: vt(4): Simplify mouse area detection
vt_is_cursor_in_area needs to return true if any part of the mouse
  cursor is visible in the rectangle area. Replace the existing test with
  a simpler version of a test for overlapping rectangles.

Sponsored by:	The FreeBSD Foundation
2015-05-12 18:09:54 +00:00
emaste
ab31df0be1 MFC r282247: vt: fix vt_fb_bitblt_bitmap mask corruption
Previously the mask wrapped when one or more of the mask bytes extended
  past the right edge of the window. Simplify the logic and use the same
  byte offset and bit in both the pattern and mask.

PR:		199648
Sponsored by:	The FreeBSD Foundation
2015-05-12 18:08:07 +00:00
araujo
91f2189dce Fix the media detected for copper cables NIC based on chipsest X540T.
Requested by:	hiren@
MFH:		279803
2015-05-12 16:36:54 +00:00
garga
154c43d19d MFC r282469:
Add support for Sierra MC7354 card

Author:		Jeremy Porter <jporter@netgate.com>
Differential Revision:	https://reviews.freebsd.org/D2444
Reviewed by:	gnn, hselasky
Sponsored by:	Netgate
2015-05-12 15:21:19 +00:00
avg
d8a44286a1 MFC r277796: hook userland threads suspend + resume into acpi suspend code 2015-05-11 08:16:33 +00:00
avg
2413b4098a MFC r277795,278849: vt(4): Use power_{suspend,resume} event handlers 2015-05-11 08:00:16 +00:00
hselasky
00aedfc296 MFC r280598:
Add definition of the ISOCHRONOUS endpoint usage bits.
Refer to the USB v2.0 specification for more information.
2015-05-05 19:59:15 +00:00
hselasky
2b8eaf33d7 MFC r281881:
Disable multi process interrupts, because the current code doesn't use
them. Else we can end up in an infinite interrupt loop in USB device
mode.
2015-05-05 19:56:23 +00:00
np
63ee67c272 Backport some parts of r272200.
- a lock to protect indirect register access
- put code that deals with stats in a separate cxgbe_refresh_stats.

This is a direct commit to stable/10.
2015-05-05 15:13:59 +00:00
np
8751c8b8b2 MFC r272183:
Make sure the adapter's management queue and the event queue are
available before any uppper layer driver (TOE, iWARP, or iSCSI)
registers with the base cxgbe(4) driver.
2015-05-03 18:54:17 +00:00
kevlo
89820200ab MFC r281592, r281918, r282119, r282266:
- Fix the length of efuse content
- Disable usb aggregation mode by default since it boots performance
2015-05-03 15:09:34 +00:00
np
6095111181 MFC r272051:
cxgbe(4):  Verify that the addresses in if_multiaddrs really are multicast
addresses.  (The chip doesn't really care, it's just that it needs to be
told explicitly if unicast DMACs are checked for "hits" in the hash that
is used after the TCAM entries are all used up).
2015-05-03 08:17:37 +00:00
dumbbell
ea79a6539f drm: Update the device-independent code to match Linux 3.8.13
This update brings few features:
    o  Support for the setmaster/dropmaster ioctls. For instance, they
       are used to run multiple X servers simultaneously.
    o  Support for minor devices. The only user-visible change is a new
       entry in /dev/dri but it is useless at the moment. This is a
       first step to support render nodes [1].

The main benefit is to greatly reduce the diff with Linux (at the
expense of an unreadable commit diff). Hopefully, next upgrades will be
easier.

No updates were made to the drivers, beside adapting them to API
changes.

[1] https://en.wikipedia.org/wiki/Direct_Rendering_Manager#Render_nodes

r280814 is merged at the same time to avoid a short window where RANDR
might be broken:

drm: Import Linux commit 9bc3cd5673d84d29272fa7181a4dfca83cbb48c1

Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Fri May 31 12:17:08 2013 +0000

    drm: Sort connector modes based on vrefresh

    Keeping the modes sorted by vrefresh before the pixel clock makes the
    mode list somehow more pleasing to the eye.

    Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

PR:		198936 (r280814)
Tested by:	Many people
MFC of:		r280183, r280187 (original commit by glebius), r280814
Relnotes:	yes
2015-04-28 19:35:05 +00:00
dumbbell
d4d41d1bcf DRM2: fix off-by-one overflow in ioctl processing
Call to the driver-specific ioctl used to process ioctl number
that will lead to the out-of-bounds access to the ioctl handler
array.

PR:             193367
Approved by:    kib
MFC of:		r275209 (original commit by rea)
2015-04-28 12:37:09 +00:00
dumbbell
f30b599658 drm: Import Linux commit b7ea85a4fed37835eec78a7be3039c8dc22b8178
Author: Huacai Chen <chenhc@lemote.com>
Date:   Tue May 21 06:23:43 2013 +0000

    drm: fix a use-after-free when GPU acceleration disabled

    When GPU acceleration is disabled, drm_vblank_cleanup() will free the
    vblank-related data, such as vblank_refcount, vblank_inmodeset, etc.
    But we found that drm_vblank_post_modeset() may be called after the
    cleanup, which use vblank_refcount and vblank_inmodeset. And this will
    cause a kernel panic.

    Fix this by return immediately if dev->num_crtcs is zero. This is the
    same thing that drm_vblank_pre_modeset() does.

    Call trace of a drm_vblank_post_modeset() after drm_vblank_cleanup():
    [   62.628906] [<ffffffff804868d0>] drm_vblank_post_modeset+0x34/0xb4
    [   62.628906] [<ffffffff804c7008>] atombios_crtc_dpms+0xb4/0x174
    [   62.628906] [<ffffffff804c70e0>] atombios_crtc_commit+0x18/0x38
    [   62.628906] [<ffffffff8047f038>] drm_crtc_helper_set_mode+0x304/0x3cc
    [   62.628906] [<ffffffff8047f92c>] drm_crtc_helper_set_config+0x6d8/0x988
    [   62.628906] [<ffffffff8047dd40>] drm_fb_helper_set_par+0x94/0x104
    [   62.628906] [<ffffffff80439d14>] fbcon_init+0x424/0x57c
    [   62.628906] [<ffffffff8046a638>] visual_init+0xb8/0x118
    [   62.628906] [<ffffffff8046b9f8>] take_over_console+0x238/0x384
    [   62.628906] [<ffffffff80436df8>] fbcon_takeover+0x7c/0xdc
    [   62.628906] [<ffffffff8024fa20>] notifier_call_chain+0x44/0x94
    [   62.628906] [<ffffffff8024fcbc>] __blocking_notifier_call_chain+0x48/0x68
    [   62.628906] [<ffffffff8042d990>] register_framebuffer+0x228/0x260
    [   62.628906] [<ffffffff8047e010>] drm_fb_helper_single_fb_probe+0x260/0x314
    [   62.628906] [<ffffffff8047e2c4>] drm_fb_helper_initial_config+0x200/0x234
    [   62.628906] [<ffffffff804e5560>] radeon_fbdev_init+0xd4/0xf4
    [   62.628906] [<ffffffff804e0e08>] radeon_modeset_init+0x9bc/0xa18
    [   62.628906] [<ffffffff804bfc14>] radeon_driver_load_kms+0xdc/0x12c
    [   62.628906] [<ffffffff8048b548>] drm_get_pci_dev+0x148/0x238
    [   62.628906] [<ffffffff80423564>] local_pci_probe+0x5c/0xd0
    [   62.628906] [<ffffffff80241ac4>] work_for_cpu_fn+0x1c/0x30
    [   62.628906] [<ffffffff802427c8>] process_one_work+0x274/0x3bc
    [   62.628906] [<ffffffff80242934>] process_scheduled_works+0x24/0x44
    [   62.628906] [<ffffffff8024515c>] worker_thread+0x31c/0x3f4
    [   62.628906] [<ffffffff802497a8>] kthread+0x88/0x90
    [   62.628906] [<ffffffff80206794>] kernel_thread_helper+0x10/0x18

    Signed-off-by: Huacai Chen <chenhc@lemote.com>
    Signed-off-by: Binbin Zhou <zhoubb@lemote.com>
    Cc: <stable@vger.kernel.org>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    Acked-by: Paul Menzel <paulepanter@users.sourceforge.net>
    Signed-off-by: Dave Airlie <airlied@gmail.com>

Reported by:    J.R. Oldroyd <fbsd@opal.com>
MFC of:		r279599
2015-04-28 12:02:24 +00:00
mav
01924a30ae MFC r281698:
Do not report stripe size if it is equal to sector size.
2015-04-25 06:49:18 +00:00
rpaulo
465974d77b MFC r281704:
Synaptics: don't report the middle button when clickPad is used.
2015-04-25 01:23:29 +00:00
rpaulo
d67925d024 MFC r281544:
snd_hda: add support for the Lenovo X1 20BS model.

  This requires a patch to redirect the output to a separate DAC when
  the headphones are used.  While there, add device strings for Intel
  Broadwell HDA controllers and Realtek ALC292 codecs.
2015-04-25 01:11:33 +00:00
delphij
0ad6d83d83 MFC r281387:
Merge changes from vendor driver version 1.1.1:

v1.1.1 2015-03-26
 * Support 4Kn drive.
 * Change the SCSI target ID of the disk to be the index of physical
   connetion to the HBA.
 * Support staggered drive spin up.
 * Fix a bug that command would be timeout because of improper
   interrupt service routine.
 * Error handling to avoid scsi command lost which caused system
   hang up.
 * Fix a bug that fail to get the devcie's serial number via
   FreeNAS WebGUI.

Many thanks to HighPoint for continued support of FreeBSD!

Relnotes:	yes
2015-04-25 00:32:47 +00:00
hiren
b09afc6f3f MFC r275358 r275483 r276982 - Removing M_FLOWID by hps@
r275358:
Start process of removing the use of the deprecated "M_FLOWID" flag
from the FreeBSD network code. The flag is still kept around in the
"sys/mbuf.h" header file, but does no longer have any users. Instead
the "m_pkthdr.rsstype" field in the mbuf structure is now used to
decide the meaning of the "m_pkthdr.flowid" field. To modify the
"m_pkthdr.rsstype" field please use the existing "M_HASHTYPE_XXX"
macros as defined in the "sys/mbuf.h" header file.

This patch introduces new behaviour in the transmit direction.
Previously network drivers checked if "M_FLOWID" was set in "m_flags"
before using the "m_pkthdr.flowid" field. This check has now now been
replaced by checking if "M_HASHTYPE_GET(m)" is different from
"M_HASHTYPE_NONE". In the future more hashtypes will be added, for
example hashtypes for hardware dedicated flows.

"M_HASHTYPE_OPAQUE" indicates that the "m_pkthdr.flowid" value is
valid and has no particular type. This change removes the need for an
"if" statement in TCP transmit code checking for the presence of a
valid flowid value. The "if" statement mentioned above is now a direct
variable assignment which is then later checked by the respective
network drivers like before.

r275483:
Remove M_FLOWID from SCTP code.

r276982:
Remove no longer used "M_FLOWID" flag from mbuf.h and update the netisr
manpage.

Note: The FreeBSD version has been bumped.

Reviewed by:    hps, tuexen
Sponsored by:   Limelight Networks
2015-04-24 23:26:44 +00:00
ngie
0c3758f009 MFC r279393:
Pad RX copy alignment calculation to avoid illegal memory accesses

The optimization made in r239940 is valid for struct mbuf's current structure
and size in FreeBSD, but hardcodes assumptions about sizes of struct mbuf,
which are unfortunately broken if additional data is added to the beginning of
struct mbuf

X-MFC note (discussed with rwatson):

This change requires the MPKTHSIZE definition, which is only available after
head@r277203 and will not be MFCed as it breaks mbuf(9) KPI.

A direct commit to stable/10 and merges to other branches to add the necessary
definitions to work with the code as-is will be done to facilitate this MFC

PR: 194314
Approved/Reviewed by: erj, jfv
Sponsored by: EMC / Isilon Storage Division
2015-04-24 22:18:50 +00:00
emaste
e9c3a03985 MFC r281537: Increase vt font limits to allow use of GNU Unifont
PR:		199438
Sponsored by:	The FreeBSD Foundation
2015-04-24 15:32:12 +00:00
jhb
82e55ed42b MFC 281159:
Move the message complaining about failed system resource allocations
under bootverbose.  Every example I've seen to date has been due to
an ACPI system resource device reserving a range that overlaps with
system memory (which ram0 attempts to reserve) or a local or I/O APIC
(which apic0 attempts to reserve).  These are always harmless but look
scary to users.
2015-04-23 22:39:32 +00:00