aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* MFC r335669:Hans Petter Selasky2018-07-301-9/+12
| | | | | | | | | | | Improve the userspace USB string reading function in LibUSB. Some USB devices does not allow a partial descriptor readout. Found by: bz @ Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=336885
* MFC r333004David C Somayajulu2018-05-091-5/+6
| | | | | | | | | | | Fix Issue with adding MUltiCast Addresses. When multicast addresses are added/deleted, the delete the multicast addresses previously programmed in HW and reprogram the new set of multicast addresses. Submitted by:Vaishali.Kulkarni@cavium.com Notes: svn path=/stable/9/; revision=333432
* MFC r333003David C Somayajulu2018-05-095-148720/+148782
| | | | | | | Upgraded FW Related Files to version 5.4.67 Notes: svn path=/stable/9/; revision=333423
* MFC r331739David C Somayajulu2018-04-056-10/+52
| | | | | | | | | 1. Add additional debug prints. 2. Break transmit when IFF_DRV_RUNNING is OFF. 3. set desc_count=0 for default case in switch in ql_rcv_isr() Notes: svn path=/stable/9/; revision=332054
* MFC r329855David C Somayajulu2018-03-0613-170/+805
| | | | | | | | | | | | | | | | | | 1. Added support to offline a port if is error recovery on successful. 2. Sysctls to enable/disable driver_state_dump and error_recovery. 3. Sysctl to control the delay between hw/fw reinitialization and restarting the fastpath. 4. Stop periodic stats retrieval if interface has IFF_DRV_RUNNING flag off. 5. Print contents of PEG_HALT_STATUS1 and PEG_HALT_STATUS2 on heartbeat failure. 6. Speed up slowpath shutdown during error recovery. 7. link_state update using atomic_store. 8. Added timestamp information on driver state and minidump captures. 9. Added support for Slowpath event logging 10.Added additional failure injection types to simulate failures. Notes: svn path=/stable/9/; revision=330557
* Avoid using the C++11 auto keyword, which was introduced in r328555, asDimitry Andric2018-02-271-1/+1
| | | | | | | | | | | | | | part of an upstream change. This is not supported by gcc 4.2.1, which is still the default system compiler for some architectures. Direct commit to stable/9 and stable/10, since this does not apply to stable/11 and head. Reported by: jau@iki.fi PR: 202665,226068 Notes: svn path=/stable/9/; revision=330080
* MFC r328623:Hans Petter Selasky2018-02-011-1/+1
| | | | | | | | | Properly implement the cond_resched() function macro in the LinuxKPI. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=328657
* Pull in r217197 from upstream clang trunk (by Richard Smith):Dimitry Andric2018-01-292-0/+16
| | | | | | | | | | | | | | | | | | | | | PR20844: If we fail to list-initialize a reference, map to the referenced type before retrying the initialization to produce diagnostics. Otherwise, we may fail to produce any diagnostics, and silently produce invalid AST in a -Asserts build. Also add a note to this codepath to make it more clear why we were trying to create a temporary. This should fix assertions when parsing some forms of incomplete list intializers. Direct commit to stable/9 and stable/10, since stable/11 and head already have this upstream fix. Reported by: ajcbowhill@gmail.com PR: 202665 Notes: svn path=/stable/9/; revision=328555
* MFC r289410:Bryan Drewery2018-01-101-2/+1
| | | | | | | Avoid warning race with creating 'ldscripts' directory during build. Notes: svn path=/stable/9/; revision=327797
* MFC r327164:Dimitry Andric2018-01-012-5/+5
| | | | | | | | | | | | | | | | | | | | | Fix clang 6.0.0 compiler warnings in binutils Latest clang git has a warning -Wnull-pointer-arithmetic which will trigger a -Werror failure. Addition and subtraction from a null pointer is undefined behaviour and could be optimized into anything. Furthermore, using the difference between two pointers and casting the result back to a pointer is not portable since the size of ptrdiff_t does not necessary have to be the same as size of void* (this happens e.g. on CHERI). Using intptr_t instead fixes this portability issue and the compiler warning. Submitted by; Alexander Richardson Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D12928 Notes: svn path=/stable/9/; revision=327471
* MFC r327167:Dimitry Andric2018-01-011-1/+1
| | | | | | | | | Remove obsolete register keyword from opensolaris's sysmacros.h. When compiling zfsd with recent clang, it leads to a warning about the register storage class being incompatible with C++17. Notes: svn path=/stable/9/; revision=327470
* MFC r326880:Dimitry Andric2017-12-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull in r320755 from upstream clang trunk (by me): Don't trigger -Wuser-defined-literals for system headers Summary: In D41064, I proposed adding `#pragma clang diagnostic ignored "-Wuser-defined-literals"` to some of libc++'s headers, since these warnings are now triggered by clang's new `-std=gnu++14` default: $ cat test.cpp #include <string> $ clang -std=c++14 -Wsystem-headers -Wall -Wextra -c test.cpp In file included from test.cpp:1: In file included from /usr/include/c++/v1/string:470: /usr/include/c++/v1/string_view:763:29: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals] basic_string_view<char> operator "" sv(const char *__str, size_t __len) ^ /usr/include/c++/v1/string_view:769:32: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals] basic_string_view<wchar_t> operator "" sv(const wchar_t *__str, size_t __len) ^ /usr/include/c++/v1/string_view:775:33: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals] basic_string_view<char16_t> operator "" sv(const char16_t *__str, size_t __len) ^ /usr/include/c++/v1/string_view:781:33: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals] basic_string_view<char32_t> operator "" sv(const char32_t *__str, size_t __len) ^ In file included from test.cpp:1: /usr/include/c++/v1/string:4012:24: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals] basic_string<char> operator "" s( const char *__str, size_t __len ) ^ /usr/include/c++/v1/string:4018:27: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals] basic_string<wchar_t> operator "" s( const wchar_t *__str, size_t __len ) ^ /usr/include/c++/v1/string:4024:28: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals] basic_string<char16_t> operator "" s( const char16_t *__str, size_t __len ) ^ /usr/include/c++/v1/string:4030:28: warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals] basic_string<char32_t> operator "" s( const char32_t *__str, size_t __len ) ^ 8 warnings generated. Both @aaron.ballman and @mclow.lists felt that adding this workaround to the libc++ headers was the wrong way, and it should be fixed in clang instead. Here is a proposal to do just that. I verified that this suppresses the warning, even when -Wsystem-headers is used, and that the warning is still emitted for a declaration outside of system headers. Reviewers: aaron.ballman, mclow.lists, rsmith Reviewed By: aaron.ballman Subscribers: mclow.lists, aaron.ballman, andrew, emaste, cfe-commits Differential Revision: https://reviews.llvm.org/D41080 This will allow to compile some of the libc++ headers in C++14 mode (which is the default for gcc 6 and higher, and will be the default for clang 6.0.0 and higher), with -Wsystem-headers and -Werror enabled. Reported by: andrew Notes: svn path=/stable/9/; revision=326976
* MFC r326362:Hans Petter Selasky2017-12-084-6/+22
| | | | | | | | | | | | | | Disallow TUN and TAP character device IOCTLs to modify the network device type to any value. This can cause page faults and panics due to accessing uninitialized fields in the "struct ifnet" which are specific to the network device type. Found by: jau@iki.fi PR: 223767 Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=326693
* MFC r326161:Hans Petter Selasky2017-12-041-0/+12
| | | | | | | | | | | Implement atomic_fetchadd_64() for i386. This function is needed by the atomic64 header file in the LinuxKPI for i386. Reviewed by: kib Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=326517
* MFC r326392:Hans Petter Selasky2017-12-041-6/+6
| | | | | | | | | | | | | | | | | | Properly define the VLAN_XXX() function macros to avoid miscompilation when used inside "if" statements comparing with another value. Detailed explanation: "if (a ? b : c != 0)" is not the same like "if ((a ? b : c) != 0)" which is the expected behaviour of a function macro. Affects: toecore, linuxkpi and ibcore. Reviewed by: kib Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=326513
* MFC r325533:Hans Petter Selasky2017-11-171-1/+1
| | | | | | | | | | | Make the dma_alloc_coherent() function in the LinuxKPI NULL safe with regard to the "dev" argument. Submitted by: Krishnamraju Eraparaju @ Chelsio Sponsored by: Chelsio Communications Notes: svn path=/stable/9/; revision=325938
* MFC r324445:Hans Petter Selasky2017-10-201-1/+1
| | | | | | | | | | | | | | | | | | When showing the sleepqueues from the in-kernel debugger, properly dump all the sleepqueues and not just the first one History: It appears that in the commit which introduced the code, r165272, the array indexes of "sq_blocked[0]" and "td_name[i]" were interchanged. In r180927 "td_name[i]" was corrected to "td_name[0]", but "sq_blocked[0]" was left unchanged. PR: 222624 Discussed with: kmacy @ Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=324801
* MFC r324538David C Somayajulu2017-10-197-3/+311
| | | | | | | Added support driver state capture/retrieval Notes: svn path=/stable/9/; revision=324766
* MFC r324535David C Somayajulu2017-10-192-0/+25
| | | | | | | | | Add sanity checks in ql_hw_send() qla_send() to ensure that empty slots in Tx Ring map to empty slot in Tx_buf array before Transmits. If the checks fail further Transmission on that Tx Ring is prevented. Notes: svn path=/stable/9/; revision=324765
* MFC r324065David C Somayajulu2017-10-051-0/+1
| | | | | | | | Tx Ring Shadow Consumer Index Register needs to be cleared prior to passing it's physical address to the FW during Tx Create Context. Notes: svn path=/stable/9/; revision=324333
* MFC r324026David C Somayajulu2017-10-053-3/+15
| | | | | | | | | Fix delete all multicast addresses Submitted by: Anand.Khoje@cavium.com Notes: svn path=/stable/9/; revision=324332
* MFC r323824David C Somayajulu2017-09-262-4/+19
| | | | | | | | | | | | | | | | | 1. ql_hw.c: In ql_hw_send() return EINVAL when TSO framelength exceeds max supported length by HW.(davidcs) 2. ql_os.c: In qla_send() call bus_dmamap_unload before freeing mbuf or recreating dmmamap.(davidcs) In qla_fp_taskqueue() Add additional checks for IFF_DRV_RUNNING Fix qla_clear_tx_buf() call bus_dmamap_sync() before freeing mbuf. Submitted by: David.Bachu@netapp.com Notes: svn path=/stable/9/; revision=324036
* MFC r323782David C Somayajulu2017-09-262-1/+10
| | | | | | | Add sysctl "enable_minidump" to turn on/off automatic minidump retrieval Notes: svn path=/stable/9/; revision=324035
* MFC r323781David C Somayajulu2017-09-261-34/+34
| | | | | | | Update minidump template for version 5.4.66 Notes: svn path=/stable/9/; revision=324034
* MFC r322530 and r323220:Hans Petter Selasky2017-09-202-1/+3
| | | | | | | | | | | Add new USB quirk(s). PR: 221775 PR: 221328 Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=323810
* MFC r323001:Dimitry Andric2017-09-051-6/+17
| | | | | | | | | | | | | | | | | | | | | In compiler-rt, a few assembler implementations for i386 floating point conversion functions use SSE2 instructions, but these are not guarded by #ifdef __SSE2__, and there is no implementation using general purpose registers. For these functions, use the generic C variants instead, otherwise they will cause SIGILL on older processors. Reported by: bsdpr@phoe.frmug.org PR: 221733 MFC r323014: Follow-up to r323001: if the actually selected CPUTYPE is capable of SSE2 instructions, we can use them. Suggested by: jkim Notes: svn path=/stable/9/; revision=323190
* MFC 322771David C Somayajulu2017-08-2816-149057/+149557
| | | | | | | | | | | | Upgrade FW to 5.4.66 sysctls to display stats, stats polled every 2 seconds Modify QLA_LOCK()/QLA_UNLOCK() to not sleep after acquiring mtx_lock Add support to turn OFF/ON error recovery following heartbeat failure for debug purposes. Set default max values to 32 Tx/Rx/SDS rings Notes: svn path=/stable/9/; revision=322973
* MFC r322248:Hans Petter Selasky2017-08-155-15/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix for mlx4en(4) to properly call m_defrag(). The m_defrag() function can only defrag mbuf chains which have a valid mbuf packet header. In r291699 when the mlx4en(4) driver was converted into using BUSDMA(9), the call to m_defrag() was moved after the part of the transmit routine which strips the header from the mbuf chain. This effectivly disabled the mbuf defrag mechanism and such packets simply got dropped. This patch removes the stripping of mbufs from a chain and loads all mbufs using busdma. If busdma finds there are no segments, unload the DMA map and free the mbuf right away, because that means all data in the mbuf has been inlined in the TX ring. Else proceed as usual. Add a per-ring rounter for the number of defrag attempts and make sure the oversized_packets counter gets zeroed while at it. The counters are per-ring to avoid excessive cache misses in the TX path. Submitted by: mjoras@ Differential Revision: https://reviews.freebsd.org/D11683 Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=322536
* MFC r322306:Hans Petter Selasky2017-08-141-1/+2
| | | | | | | | | | | Print maximum MTU when trying to set invalid MTU in the mlx4en(4) driver. Useful for debugging. Submitted by: Sepherosa Ziehau <sephe@dragonflybsd.org> Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=322506
* MFC r322304:Hans Petter Selasky2017-08-141-15/+70
| | | | | | | | | | | Add support for RX and TX statistics when the mlx4en(4) PCI device is in VF or SRIOV mode typically in a virtual machine environment. Submitted by: Sepherosa Ziehau <sephe@dragonflybsd.org> Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=322503
* MFC r289577:Hans Petter Selasky2017-08-142-3/+9
| | | | | | | | | | Merge LinuxKPI changes from DragonflyBSD: - Map more Linux compiler related defines to FreeBSD ones. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=322502
* MFC r292537 and r314878:Hans Petter Selasky2017-08-141-0/+17
| | | | | | | | | Implement ACCESS_ONCE(), WRITE_ONCE() and READ_ONCE(). Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=322501
* MFC r321782:Hans Petter Selasky2017-08-075-67/+0
| | | | | | | | | | | Remove some dead statistics related code and a structure field from the mlx4en driver which is used by its Linux counterpart, but not under FreeBSD. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=322166
* MFC r321772:Hans Petter Selasky2017-08-072-4/+4
| | | | | | | | | | | Fix broken usage of the mlx4_read_clock() function: - return value has too small width - cycle_t is unsigned and cannot be less than zero Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=322163
* MFC r321780:Hans Petter Selasky2017-08-071-1/+1
| | | | | | | | | Make sure on-stack buffer is properly aligned. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=322160
* MFC r321986:Hans Petter Selasky2017-08-071-1/+1
| | | | | | | | | | | | | | | Change reject message type when destroying cm_id in ibore. This patch fixes an interopability issue between FreeBSD and non-FreeBSD systems when the connection establishment is aborted. Refer to the initial commit in Linux, drivers/infiniband/core/cm.c, for a more detailed description. Obtained from: Linux Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=322157
* MFC r321985:Hans Petter Selasky2017-08-071-2/+2
| | | | | | | | | Ticks are 32-bit in FreeBSD. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=322154
* MFC r320941: Fix GRE over IPv6 tunnels with IPFWPhilip Paeps2017-08-011-0/+7
| | | | | | | | | | | Previously, GRE packets in IPv6 tunnels would be dropped by IPFW (unless net.inet6.ip6.fw.deny_unknown_exthdrs was unset). PR: 220640 Submitted by: Kun Xie <kxie@xiplink.com> Notes: svn path=/stable/9/; revision=321874
* MFC 321233David C Somayajulu2017-07-264-5/+14
| | | | | | | | | | Raise the watchdog timer interval to 2 ticks, there by guaranteeing that it fires between 1ms and 2ms. ` Treat two consecutive occurrences of Heartbeat failures as a legitimate Heartbeat failure Notes: svn path=/stable/9/; revision=321503
* MFC 320705David C Somayajulu2017-07-261-1/+7
| | | | | | | | Release mtx hw_lock before calling pause() in qla_stop() and qla_error_recovery() Notes: svn path=/stable/9/; revision=321501
* MFC 320694David C Somayajulu2017-07-262-5/+5
| | | | | | | Allow MTU changes without ifconfig down/up Notes: svn path=/stable/9/; revision=321500
* MFC r320876:Hans Petter Selasky2017-07-131-1/+7
| | | | | | | | | | | Make sure the mlx4en RX DMA ring gets stamped with software ownership in order to prevent the flow of QP to error in the firmware once UPDATE_QP is called. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=320946
* MFC r320494: Fix double free by reverting r300385 and r300624 which wasXin LI2017-07-031-3/+1
| | | | | | | false positive reported by cppcheck. Notes: svn path=/stable/9/; revision=320583
* MFC r320175David C Somayajulu2017-06-262-0/+3
| | | | | | | Add pkts_cnt_oversized to stats. Notes: svn path=/stable/9/; revision=320371
* MFC r320216: Fix use-after-free introduced in r300388.Xin LI2017-06-251-1/+2
| | | | | | | | | | | | | | In r300388, endnetconfig() was called on nc_handle which would release the associated netconfig structure, which means tmpnconf->nc_netid would be a use-after-free. Solve this by doing endnetconfig() in return paths instead. Reported by: jemalloc via kevlo Reviewed by: cem, ngie (earlier version) Notes: svn path=/stable/9/; revision=320326
* MFC r319972:Hans Petter Selasky2017-06-181-2/+2
| | | | | | | | | | | | Use static device numbering instead of dynamic one when creating mlx4en network interfaces. This prevents infinite unit number growth typically when the mlx4en driver is used inside virtual machines which support runtime PCI attach and detach. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=320068
* MFC r319413:Hans Petter Selasky2017-06-041-3/+2
| | | | | | | | | | | | Free hardware queue resource after port is stopped in the mlx4en(4) driver. Else if the port is up the resource might still be busy and the MTT free will fail. PR: 216493 Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=319568
* MFC r319414:Hans Petter Selasky2017-06-041-30/+12
| | | | | | | | | | | | | | | Allow communication between functions on the same host when using the mlx4en(4) driver in SRIOV mode. Place a copy of the destination MAC address in the send WQE only under SRIOV/eSwitch configuration or when the device is in selftest. This allows communication between functions on the same host. PR: 216493 Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=319565
* MFC r318860:Hans Petter Selasky2017-05-282-2/+6
| | | | | | | | Declare the "snd_fxdiv_table" once. This shaves around 24Kbytes of binary data from sound.ko and the kernel. Notes: svn path=/stable/9/; revision=319067
* MFC r318820:Hans Petter Selasky2017-05-272-7/+7
| | | | | | | | | | | | Increase the allowed maximum number of audio channels from 31 to 127 in the PCM feeder mixer. Without this change a value of 32 channels is treated like zero, due to using a mask of 0x1f, causing a kernel assert when trying to playback bitperfect 32-channel audio. Also update the AWK script which is generating the division tables to handle more than 18 channels. This commit complements r282650. Notes: svn path=/stable/9/; revision=318980