summaryrefslogtreecommitdiff
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* MFC 304251Sepherosa Ziehau2016-08-222-100/+61
| | | | | | | | | | | | | | | | | | | | | | | hyperv/storvsc: Deliver CAM_SEL_TIMEOUT upon SRB status error. SRB status is set to 0x20 by the hypervisor, if the specified LUN is unaccessible, and even worse the INQUIRY response will not be set by the hypervisor at all under this situation. Additionally, SRB status is 0x20 too, for TUR on an unaccessible LUN. Deliver CAM_SEL_TIMEOUT to CAM upon SRB status errors as suggested by Scott Long, other values seems improper. This commit fixes the Hyper-V disk hotplug support. Submitted by: Hongjiang Zhang <honzhan microsoft com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7521 Approved by: re (kib) Notes: svn path=/releng/11.0/; revision=304586
* MFS r304474:Bryan Drewery2016-08-191-0/+2
| | | | | | | | | | | MFC r304008: Avoid taking PROC_LOCK in syscalls if not being traced. Approved by: re (XXX) Notes: svn path=/releng/11.0/; revision=304495
* MF stable11 r304337Sean Bruno2016-08-196-14/+45
| | | | | | | | | | e1000: Add support for Kaby Lake IDs Fixup some errors when transitioning to/from low power states. Approved by: re (kib) Notes: svn path=/releng/11.0/; revision=304493
* MFC r304433Eric van Gyzen2016-08-181-15/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PCIe HotPlug: Detect bridges that are not really HotPlug capable Some devices report that they have an MRL when they actually do not. Since they always report that the MRL is open, child devices would be ignored. Try to detect these devices and ignore their claim of HotPlug support. Specifically, if there is an open MRL but the Data Link Layer is active, the MRL is not real. Revert r303645 to re-enable HotPlug support for slots with power controllers, since it works correctly in my testing. Start the DLL state-change timer if Presence /or/ MRL state changes, along with other conditions. Previously, we started the timer iff Presence changed. If there is an MRL, it must be closed for power to be turned on, so Presence is unlikely to change on an MRL-close event. Add a printf() of interesting registers on HotPlug interrupts and commands (one from erj@). These were very useful for debugging. Guard them with bootverbose, since they're spam in normal operation. In collaboration with: jhb Relnotes: yes (re-enable HotPlug support for slots with power controllers) Approved by: re (gjb) Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D7509 Notes: svn path=/releng/11.0/; revision=304434
* MFC r304163Ryan Stone2016-08-151-1/+2
| | | | | | | | | | | | | | | | | | Don't enqueue NULL on a drbr In one corner case in the bxe TX path, a NULL mbuf could be enqueued onto a drbr queue. This could cause a KASSERT to fire with INVARIANTS enabled, or the processing of packets from the queue to be prematurely ended later on. Submitted by: Matt Joras (matt.joras AT isilon.com) Reviewed by: davidcs Sponsored by: EMC / Isilon Storage Division Approved by: re (kib) Differential Revision: https://reviews.freebsd.org/D7041 Notes: svn path=/releng/11.0/; revision=304179
* MFS r304067:Steven Hartland2016-08-152-24/+38
| | | | | | | | | | Fix vtnet hang with max_virtqueue_pairs > VTNET_MAX_QUEUE_PAIR Approved by: re (gjb) Sponsored by: Multiplay Notes: svn path=/releng/11.0/; revision=304112
* MFC r303816 r303847Sean Bruno2016-08-1124-7456/+11692
| | | | | | | | | | - Update ixl(4) to Intel driver version ixl-1.6.6-k - Fixup RSS builds of ixl(4) missed during testing. Approved by: re (gjb) Notes: svn path=/stable/11/; revision=303967
* MFC r303488 and r303771:Roger Pau Monné2016-08-101-27/+33
| | | | | | | | | | xen-netfront: fix trying to send packets with disconnected netfront xen-netfront: improve the logic when handling nic features from ioctl Approved by: re (kib) Notes: svn path=/stable/11/; revision=303902
* MFC r303788Eric van Gyzen2016-08-081-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Fix some logic in PCIe HotPlug; display EI status The interpretation of the Electromechanical Interlock Status was inverted, so we disengaged the EI if a card was inserted. Fix it to engage the EI if a card is inserted. When displaying the slot capabilites/status with pciconf: - We inverted the sense of the Power Controller Control bit, saying the power was off when it was really on (according to this bit). Fix that. - Display the status of the Electromechanical Interlock: EI(engaged) EI(disengaged) Approved by: re (gjb) Sponsored by: Dell Inc. Notes: svn path=/stable/11/; revision=303835
* MFC 303737Sepherosa Ziehau2016-08-081-2/+21
| | | | | | | | | | | | | | | | | hyperv/storvsc: Claim SPC-3 conformance, thus enable UNMAP support The Hyper-V on pre-win10 systems will only report SPC-2 conformance, but it actually conforms to SPC-3. The INQUIRY response is adjusted to propagate the SPC-3 version information to CAM. Submitted by: Hongjiang Zhang <honzhan microsoft com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7405 Approved by: re (delphij) Notes: svn path=/stable/11/; revision=303828
* MFC 303076,303225: Use MTX_SYSINIT for the VESA lock.John Baldwin2016-08-061-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 303076: vesa: fix panic on suspend Fix the following panic seen when migrating a FreeBSD guest on Xen: panic: mtx_lock() of destroyed mutex @ /usr/src/sys/dev/fb/vesa.c:541 cpuid = 0 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe001d2fa4f0 vpanic() at vpanic+0x182/frame 0xfffffe001d2fa570 kassert_panic() at kassert_panic+0x126/frame 0xfffffe001d2fa5e0 __mtx_lock_flags() at __mtx_lock_flags+0x15b/frame 0xfffffe001d2fa630 vesa_bios_save_restore() at vesa_bios_save_restore+0x78/frame 0xfffffe001d2fa680 vga_suspend() at vga_suspend+0xa3/frame 0xfffffe001d2fa6b0 isavga_suspend() at isavga_suspend+0x1d/frame 0xfffffe001d2fa6d0 bus_generic_suspend_child() at bus_generic_suspend_child+0x44/frame [...] This is caused because vga_sub_configure (which is called if the VGA adapter is attached after VESA tried to initialize), points to vesa_configure, which doesn't initialize the VESA mutex. In order to fix it, make sure vga_sub_configure points to vesa_load, so that all the needed vesa components are properly initialized. 303225: Use MTX_SYSINIT for the VESA lock. vesa_init_done isn't a reliable guard for the mutex init. If vesa_configure() doesn't find valid VESA info it will not set vesa_init_done, but the lock will remain initialized. Revert r303076 and use MTX_SYSINIT to deterministically init the lock. PR: 209203 Approved by: re (gjb) Notes: svn path=/stable/11/; revision=303807
* MFC 303497,303559,303645: Disable PCI-e hotplug on bridges with powerJohn Baldwin2016-08-051-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | controllers. 303497: Add a loader tunable (hw.pci.enable_pcie_hp) to disable PCI-e HotPlug. Some systems and/or devices (such as riser cards) do not include a non-compliant implementation of PCI-e HotPlug that can result in devices not being attached (e.g. the HotPlug code might assume that a card is being unplugged and will power the slot off and detach it). This tunable can be set to 0 to disable support for PCI-e HotPlug ignoring the incorrect HotPlug state on these slots. 303559: Try to declare _hw_pci for all sysctl cases needed after r303497. 303645: Disable PCI hotplug support for slots with power controllers. After further review of the spec, I do not think the current HotPlug code handles slots with power controllers correctly. In particular, the power state of the slot is to be inferred from other events, not from examining the state of the power control bit in SLOT_CTL. For now, disable PCI hotplug support on such slots. PR: 211081 Approved by: re (gjb) Notes: svn path=/stable/11/; revision=303781
* MFC r302576:Enji Cooper2016-08-031-3/+0
| | | | | | | | | | | | | | | | | | Approved by: re (gjb) r302576: (Re-do r302574 with corrected commit message..) Remove redundant declaration for tcp_dooptions netinet/tcp_var.h already defines this function PR: 209920 Tested with: clang 3.8.0, gcc 4.2.1, gcc 5.3.0 Notes: svn path=/stable/11/; revision=303690
* MFC r302571,r302572,r302577,r302841:Enji Cooper2016-08-033-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Approved by: re (gjb) r302571: Remove redundant declaration for radeon_pm_acpi_event_handler(..) to fix -Wredundant-decls warning PR: 209924 Tested with: devel/amd64-gcc (5.3.0) r302572: Remove redundant declarations for intel_fbc_enabled(..) and i915_gem_dump_object(..) to fix -Wredundant-decls warning PR: 209924 Tested with: devel/amd64-gcc (5.3.0) r302577: Add missing default case to capable(..) function definition By definition (enum __drm_capabilities), cases other than CAP_SYS_ADMIN aren't possible. Add in a KASSERT safety belt and return false in !INVARIANTS case if an invalid value is passed in, as it would be a programmer error. This fixes a -Wreturn-type error with gcc 5.3.0. r302841: Always panic if an invalid capability is passed to `capable(..)` instead of just with INVARIANTS rwatson's point was valid in the sense that if the data passed at runtime is invalid, it should always trip the invariant, not just in the debug case. This is a deterrent against malicious input, or input caused by hardware errors. Requested by: rwatson Notes: svn path=/stable/11/; revision=303689
* MFC r302581:Enji Cooper2016-08-021-3/+0
| | | | | | | | | | | | Remove redundant declaration for tcp_dooptions, similar to r302576 netinet/tcp_var.h already defines this function Approved by: re (gjb) PR: 209920 Notes: svn path=/stable/11/; revision=303686
* MFC r303638Sean Bruno2016-08-021-0/+1
| | | | | | | | | Unbreak NETMAP usage with em(4) broken in r293331. Approved by: re (gjb) Notes: svn path=/stable/11/; revision=303664
* MFC r303338: vt: lock Giant around kbd calls in CONS_GETINFOEd Maste2016-08-011-0/+2
| | | | | | | | | | | | Note that keyboards are stored in an array and are not freed (just "unregistered" by clearing some fields) so a race would be limited to obtaining stale information about an unregistered keyboard. Reported by: CTurt Approved by: re (gjb, kib) Notes: svn path=/stable/11/; revision=303632
* MFC r303322,303326,303327,303345,303413,303416,303418,303557Sean Bruno2016-08-0115-753/+3277
| | | | | | | | | | Update iwm(4) and iwmfw(4) to current in order to stabilize and improve functionality. Approved by: re (gjb) Notes: svn path=/stable/11/; revision=303628
* MFC r303151:Konstantin Belousov2016-07-281-9/+4
| | | | | | | | | | | | Provide counter_warning(9) KPI. MFC r303155: Hide counted_warning(9) under #ifdef _KERNEL braces. Approved by: re (gjb) Notes: svn path=/stable/11/; revision=303432
* MFC r303115:Andriy Voskoboinyk2016-07-262-0/+6
| | | | | | | | | | | | | | | | | urtwn: fix A-MSDU tx aggregation when encryption is used. Clear unused (undocumented) CAM bytes while setting a key; without that, hardware does weird things when A-MSDU bit in QoS header is set. Tested with RTL8188CUS (AP) -> RTL8188EU (STA) (A-MSDU transmit). Reported by: many Approved by: re (gjb) Obtained from: https://github.com/s3erios/urtwm Notes: svn path=/stable/11/; revision=303344
* MFC r303043:Bryan Drewery2016-07-253-8/+8
| | | | | | | | | | Increase vt(4) framebuffer maximum size PR: 210382 Approved by: re (gjb) Notes: svn path=/stable/11/; revision=303312
* MFC r303032Sean Bruno2016-07-241-9/+6
| | | | | | | | | | | Fixup DA cable detection routines to not set the cable type to unknown if they do not match one of two cable types. PR: 150249 Approved by: re (gjb) Notes: svn path=/stable/11/; revision=303268
* Update if_hwassist when interface options are changed.Alexander Motin2016-07-211-9/+22
| | | | | | | | | | In particular for me this fixes checksum problem when if_bridge attached to the interface requests TXCSUM to be disabled, but effectively ignored. Approved by: re (kib) Notes: svn path=/stable/11/; revision=303136
* MFC r302673Stephen McConnell2016-07-196-11/+62
| | | | | | | | | | | Use real values to calculate Max I/O size instead of guessing. Reviewed by: ken, scottl Approved by: re(gjb), ken, scottl, ambrisko (mentors) Differential Revision: https://reviews.freebsd.org/D7043 Notes: svn path=/stable/11/; revision=303029
* MFC 302541,302605Sepherosa Ziehau2016-07-151-57/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 302541 hyperv/stor: Fix the INQUIRY checks Don't check the area that the host has not filled. PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209443 PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210425 Submitted by: Hongjiang Zhang <honzhan microsoft com> Reviewed by: sephe, Dexuan Cui <decui microsoft com> Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6955 302605 hyperv/stor: Save the response status and xfer length properly. The current command response handling discards status and xfer length unconditionally, so that all of the commands would be considered successful, even if errors happened. When errors really happens, this causes all kinds of wiredness, since the buffer will not be filled on the host side and sense data will be ignored. Most of the time, errors do not happen, however, error does happen for the request sent immediately after the disk resizing. Discarding the SCSI status (SCSI_STATUS_CHECK_COND) and sense data (capacity changes) prevents the disk resizing from working properly. This commit saves the response status and xfer length properly for later use. Submitted by: Dexuan Cui <decui microsoft com> Noticed by: sephe Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7181 Approved by: re (gjb) Notes: svn path=/stable/11/; revision=302862
* Fix ahci(4) driver attach to controller with 32 ports.Alexander Motin2016-07-072-4/+4
| | | | | | | | | | | | | Incorrect sign expansion in variables that supposed to be a bit fields caused infinite loop. Fixing this allows system properly detect maximal possible 32 devices configured on AHCI HBA of BHyVe. That case did not happen in a wild before due to lack of hardware AHCI HBAs with 32 ports. Approved by: re (gjb@) MFC after: 1 week Notes: svn path=/head/; revision=302402
* [ath] obey the short-GI vap config flag when transmitting.Adrian Chadd2016-07-071-2/+5
| | | | | | | | | | | | | This makes 'ifconfig wlanX -shortgi' work correctly. Tested: * AR9380, STA mode Approved by: re (gjb) Notes: svn path=/head/; revision=302392
* Do not initialize the adapter on MTU change when adapter status is down.Sean Bruno2016-07-078-8/+16
| | | | | | | | | | | | | | | This fixes long-standing problems when changing settings of the adapter. Discussed in: https://lists.freebsd.org/pipermail/freebsd-net/2016-June/045509.html Submitted by: arnaud.ysmal@stormshield.eu Reviewed by: erj@freebsd.org Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D7030 Notes: svn path=/head/; revision=302384
* isci: fix ATA PASSTHROUGH fixed sense data formatJim Harris2016-07-062-4/+4
| | | | | | | | | | PR: kern/191717 Submitted by: martin@lispworks.com Approved by: re (gjb) MFC after: 3 days Notes: svn path=/head/; revision=302380
* Replace a number of conflations of mp_ncpus and mp_maxid with eitherNathan Whitehorn2016-07-061-10/+10
| | | | | | | | | | | | | | | | | | | | | | mp_maxid or CPU_FOREACH() as appropriate. This fixes a number of places in the kernel that assumed CPU IDs are dense in [0, mp_ncpus) and would try, for example, to run tasks on CPUs that did not exist or to allocate too few buffers on systems with sparse CPU IDs in which there are holes in the range and mp_maxid > mp_ncpus. Such circumstances generally occur on systems with SMT, but on which SMT is disabled. This patch restores system operation at least on POWER8 systems configured in this way. There are a number of other places in the kernel with potential problems in these situations, but where sparse CPU IDs are not currently known to occur, mostly in the ARM machine-dependent code. These will be fixed in a follow-up commit after the stable/11 branch. PR: kern/210106 Reviewed by: jhb Approved by: re (glebius) Notes: svn path=/head/; revision=302372
* Fix regression issue with XHCI on 32-bit ARMv7 Armada-38x. Make sureHans Petter Selasky2016-07-061-1/+1
| | | | | | | | | | "struct xhci_dev_ctx_addr" fits into a single 4K page until further. Approved by: re (hrs) MFC after: 1 week Notes: svn path=/head/; revision=302371
* ioat(4): Block asynchronous work during HW resetConrad Meyer2016-07-052-10/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the race between ioat_reset_hw and ioat_process_events. HW reset isn't protected by a lock because it can sleep for a long time (40.1 ms). This resulted in a race where we would process bogus parts of the descriptor ring as if it had completed. This looked like duplicate completions on old events, if your ring had looped at least once. Block callout and interrupt work while reset runs so the completion end of things does not observe indeterminate state and process invalid parts of the ring. Start the channel with a manually implemented ioat_null() to keep other submitters quiesced while we wait for the channel to start (100 us). r295605 may have made the race between ioat_reset_hw and ioat_process_events wider, but I believe it already existed before that revision. ioat_process_events can be invoked by two asynchronous sources: callout (softclock) and device interrupt. Those could race each other, to the same effect. Reviewed by: markj Approved by: re Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D7097 Notes: svn path=/head/; revision=302354
* ioat(4): Serialize ioat_reset_hw invocationsConrad Meyer2016-07-052-0/+14
| | | | | | | | | | Reviewed by: markj Approved by: re Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D7097 Notes: svn path=/head/; revision=302353
* ioat(4): Split timer into poll and shrink functionsConrad Meyer2016-07-052-29/+62
| | | | | | | | | | | | | | Poll should happen quickly, while shrink should happen infrequently. Protect is_completion_pending with submit_lock. Reviewed by: markj Approved by: re Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D7097 Notes: svn path=/head/; revision=302352
* cxgbe(4): Changes to the CPL-handler registration mechanism and codeNavdeep Parhar2016-07-0518-339/+302
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | related to "shared" CPLs. a) Combine t4_set_tcb_field and t4_set_tcb_field_rpl into a single function. Allow callers to direct the response to any iq. Tidy up set_ulp_mode_iscsi while there to use names from t4_tcb.h instead of magic constants. b) Remove all CPL handler tables from struct adapter. This reduces its size by around 2KB. All handlers are now registered at MOD_LOAD instead of attach or some kind of initialization/activation. The registration functions do not need an adapter parameter any more. c) Add per-iq handlers to deal with CPLs whose destination cannot be determined solely from the opcode. There are 2 such CPLs in use right now: SET_TCB_RPL and L2T_WRITE_RPL. The base driver continues to send filter and L2T_WRITEs over the mgmtq and solicits the reply on fwq. t4_tom (including the DDP code) now uses the port's ctrlq to send L2T_WRITEs and SET_TCB_FIELDs and solicits the reply on an ofld_rxq. fwq and ofld_rxq have different handlers that know what kind of tid to expect in the reply. Update t4_write_l2e and callers to to support any wrq/iq combination. Approved by: re@ (kib@) Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=302339
* Fix interrupt loop when switching from USB device to USB host mode byHans Petter Selasky2016-07-041-16/+18
| | | | | | | | | | | clearing all endpoint interrupt bits. PR: 210736 Approved by: re (glebius) MFC after: 1 week Notes: svn path=/head/; revision=302336
* cxgbe(4): Avoid a NULL dereference while dumping the L2 table. EntriesNavdeep Parhar2016-07-011-2/+1
| | | | | | | | | | | used by switching filters that rewrite L2 information do not have any associated ifnet. Approved by: re@ (gjb@) Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=302313
* Fix detection of USB device disconnects in USB host mode when the USBHans Petter Selasky2016-07-011-1/+4
| | | | | | | | | | | | device is connected directly to the USB port of the DWC OTG, in this case a RPI-zero. PR: 210695 Approved by: re (gjb) MFC after: 1 week Notes: svn path=/head/; revision=302306
* cxgbe(4): Do not bring up an interface when IFCAP_TOE is enabled on it.Navdeep Parhar2016-06-292-4/+4
| | | | | | | | | | | | The interface's queues are functional after VI_INIT_DONE (which is short of interface-up) and that's all that's needed for t4_tom to communicate with the chip. Approved by: re@ (gjb@) Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=302263
* USB: Add Garmin FR230 device quirk (broken INQUIRY)Conrad Meyer2016-06-292-0/+2
| | | | | | | | | PR: 210544 Reviewed by: hps Approved by: re Notes: svn path=/head/; revision=302262
* bhnd(4): Add devinfo allocation and child addition methods, modeled onLandon J. Fuller2016-06-259-75/+232
| | | | | | | | | | | | | pci_if. This allows bhnd(4) to manage per-device state (such as per-core pmu/clock refcounting) on behalf of subclass driver instances. Approved by: re (gjb), adrian (mentor) Differential Revision: https://reviews.freebsd.org/D6959 Notes: svn path=/head/; revision=302191
* bhnd(4): Perform explicit chipc child enumeration.Landon J. Fuller2016-06-2514-465/+479
| | | | | | | | | | | | | | | | Replaces use of DEVICE_IDENTIFY with explicit enumeration of chipc child devices using the chipc capability structure. This is a precursor to PMU support, which requires more complex resource assignment handling than achievable with the static device name-based hints table. Reviewed by: Michael Zhilin <mizkha@gmail.com> (Broadcom MIPS support) Approved by: re (gjb), adrian (mentor) Differential Revision: https://reviews.freebsd.org/D6896 Notes: svn path=/head/; revision=302189
* urtwn: use m_get2() in Rx path.Andriy Voskoboinyk2016-06-241-8/+1
| | | | | | | | | | | | | Replace m_getcl() with m_get2(); this fixes 'frame too long' messages for frames, which are longer than MCLBYTES (can be easily triggered when A-MSDU is used). Tested with RTL8188CUS (AP) and RTL8188EU (STA). Approved by: re (marius) Notes: svn path=/head/; revision=302186
* urtwn: fix memory leak on device restartAndriy Voskoboinyk2016-06-241-21/+9
| | | | | | | | | | | | | | | | | | | | | Free data buffers every time when device is stopped, not when it is detached; they are allocated at the initialization stage. How-to-reproduce: 1) ifconfig wlan0 create wlandev urtwn0 up 2) vmstat -m | grep USBdev 3) service netif restart 4) vmstat -m | grep USBdev Also, remove usbd_transfer_drain() call; it is already called by usbd_transfer_unsetup(). Tested with RTL8188CUS, STA mode. Approved by: re (marius) Notes: svn path=/head/; revision=302183
* Add pci_get_max_payload() to fetch the PCI-express maximum payload size.John Baldwin2016-06-242-0/+17
| | | | | | | | | | Approved by: re (gjb) MFC after: 2 weeks Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D6951 Notes: svn path=/head/; revision=302175
* Use correct Q-counter output array.Hans Petter Selasky2016-06-231-1/+1
| | | | | | | | | Sponsored by: Mellanox Technologies Approved by: re (kib) MFC after: 3 days Notes: svn path=/head/; revision=302139
* cxgbe(4): Merge netmap support from the ncxgbe/ncxl interfaces to theNavdeep Parhar2016-06-234-528/+285
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vcxgbe/vcxl interfaces and retire the 'n' interfaces. The main cxgbe/cxl interfaces and tunables related to them are not affected by any of this and will continue to operate as usual. The driver used to create an additional 'n' interface for every cxgbe/cxl interface if "device netmap" was in the kernel. The 'n' interface shared the wire with the main interface but was otherwise autonomous (with its own MAC address, etc.). It did not have normal tx/rx but had a specialized netmap-only data path. r291665 added another set of virtual interfaces (the 'v' interfaces) to the driver. These had normal tx/rx but no netmap support. This revision consolidates the features of both the interfaces into the 'v' interface which now has a normal data path, TOE support, and native netmap support. The 'v' interfaces need to be created explicitly with the hw.cxgbe.num_vis tunable. This means "device netmap" will not result in the automatic creation of any virtual interfaces. The following tunables can be used to override the default number of queues allocated for each 'v' interface. nofld* = 0 will disable TOE on the virtual interface and nnm* = 0 to will disable native netmap support. # number of normal NIC queues hw.cxgbe.ntxq_vi hw.cxgbe.nrxq_vi # number of TOE queues hw.cxgbe.nofldtxq_vi hw.cxgbe.nofldrxq_vi # number of netmap queues hw.cxgbe.nnmtxq_vi hw.cxgbe.nnmrxq_vi hw.cxgbe.nnm{t,r}xq{10,1}g tunables have been removed. --- tl;dr version --- The workflow for netmap on cxgbe starting with FreeBSD 11 is: 1) "device netmap" in the kernel config. 2) "hw.cxgbe.num_vis=2" in loader.conf. num_vis > 2 is ok too, you'll end up with multiple autonomous netmap-capable interfaces for every port. 3) "dmesg | grep vcxl | grep netmap" to verify that the interface has netmap queues. 4) Use any of the 'v' interfaces for netmap. pkt-gen -i vcxl<n>... . One major improvement is that the netmap interface has a normal data path as expected. 5) Just ignore the cxl interfaces if you want to use netmap only. No need to bring them up. The vcxl interfaces are completely independent and everything should just work. --------------------- Approved by: re@ (gjb@) Relnotes: Yes Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=302110
* revert error commit from previous commit. my bad!Adrian Chadd2016-06-231-1/+1
| | | | | | | Approved by: re (implicit) Notes: svn path=/head/; revision=302106
* [BHND/bcma] Add implementation of BHND_BUS_RESET_CORE function for BCMAAdrian Chadd2016-06-233-5/+40
| | | | | | | | | | | | | | | | This patch addes missing implementation of BHND_BUS_RESET_CORE function for BCMA. The reset procedure is very simple: enable reset mode, stop clocking, enable clocking & force clock gating, disable reset mode, stop clock gating. Tested: * (michael) Tested on ASUS RT-N53 for enabling/reset USB core Submitted by: Michael Zhilin <mizhka@gmail.com> Approved by: re (gjb) Notes: svn path=/head/; revision=302105
* [iwm] Use mbuf for large firmware commands, like OpenBSD does.Adrian Chadd2016-06-232-25/+33
| | | | | | | | | | | | | We also need to consider the size of large firmware commands in iwm_alloc_tx_ring(), in the dma tag creation, when qid == IWM_MVM_CMD_QUEUE. The old code apparently only allocated a 2KB (MCLBYTES) sized buffer when it actually expected 4KB. Submitted by: Imre Vadasz <imre@vdsz.com> Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D6824 Notes: svn path=/head/; revision=302104