aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/bnxt
Commit message (Collapse)AuthorAgeFilesLines
* bnxt(4): Stop checking for failures from malloc(M_WAITOK)Zhenlei Huang2024-09-301-18/+0
| | | | | | | | MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit dcd387aaa5d4409a7e99376e0254029fce1a48a8) (cherry picked from commit e763c326fc85c0d8b3e86d954339aa847f13a934)
* iflib drivers: Constify PCI ID LUTsMarius Strobl2024-01-052-3/+3
| | | | | | | | | | | | | | Since d49e83eac3baf16a22b1c5d42e8438b68b17e6f9, iflib(9) is ready for this change. While at it, make isc_driver_version strings (static) const where not apparently un-const on purpose, too. This reduces the size of the amd64 GENERIC by about 10 KiB. (cherry picked from commit 51e235148a4becba94e824a44bd69687644a7f56) Conflicts (drivers missing in stable/13): sys/dev/enetc/if_enetc.c sys/dev/enic/if_enic.c
* Update a couple of tools to not embed __FBSDID in generated filesJohn Baldwin2023-10-241-6/+0
| | | | | | | Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41955 (cherry picked from commit 99159b076a278d1feb0e18ae99fd866c90443893)
* bnxt: Don't restart on VLAN changesKevin Bowling2023-09-111-0/+13
| | | | | | | | | | | | | | | | In rS360398, a new iflib device method was added with default of opt out for VLAN events needing an interface reset. This is unintentional for bnxt(4) and is causing another bug in its VLAN initialization code to affect the common case of adding and removing VLANs on an existing interface. PR: 269133 Tested by: kp Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D41558 (cherry picked from commit bce864d1c274faeb6678028aad1e07e91fe430ac)
* sys: Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-231-1/+0
| | | | | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/ Similar commit in current: (cherry picked from commit 031beb4e239b)
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-239-18/+0
| | | | | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/ Similar commit in current: (cherry picked from commit 685dc743dc3b)
* bnxt: Only filter out i386Warner Losh2023-01-191-1/+1
| | | | | | | | | | Only i386 is missing bus_read_8. The other 32-bit platforms can be fixed with a cast to a printf. Suggested by: kevans Sponsored by: Netflix (cherry picked from commit eb40e3e757a7eb80c2b5c38ce05fc4b411b369f9)
* if_bnxt: Added support for mgmt interface for passthrough hwrmsSumit Saxena2023-01-196-4/+588
| | | | | | | | | | | | | | | Added support for application management interface. There are two types of commands supported: 1. Firmware IOCTLs: These ioctls are meant for firmware consumption. Driver acts as a transport for these. 2. Driver only IOCTLs: These ioctls are meant for driver consumption. Driver will serve these ioctls without sending them down to firmware. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D36448 (cherry picked from commit 58d84ef87094691bf1ad9608964ec85f120cd34a)
* if_bnxt: Add support for smaller backing_store_cfg message sizeSumit Saxena2023-01-192-2/+7
| | | | | | | | | | Add compat logic to fallback to the older/smaller backing_store_cfg message size. Reviewed by: imp Differentil Revision: https://reviews.freebsd.org/D36447 (cherry picked from commit 2ed061f08d9e2fe35bb8ff925cc19768d2430e77)
* if_bnxt: Fix the PORT_PHY_CFG HWRM requests while setting PauseSumit Saxena2023-01-191-0/+3
| | | | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D36446 (cherry picked from commit 19a57f85baac915a3642733c8a856517f4e95cb3)
* if_bnxt: Fix the issue when kernel invokes _init() again without _stop()Sumit Saxena2023-01-192-1/+6
| | | | | | | | | | Fixed the issue when kernel invokes _init() when it is already in _init() state by invoking _stop() in such case. Reviewed by: imp Differential Revsion: https://reviews.freebsd.org/D36445 (cherry picked from commit baef1301a2bc60be3908f44dff1f83dbbd8f812a)
* if_bnxt: Remove sysctl node vlan_only which is not being usedSumit Saxena2023-01-192-38/+1
| | | | | | | | | | Removed sysctl node vlan_only which is not being used after migrating from l2_set_rx_mask to l2_filter_alloc. Reviewed by: imp Differential Revsion: https://reviews.freebsd.org/D36444 (cherry picked from commit 72e9dbb58cad5262190cf2eae47f764021072128)
* if_bnxt: Add support for VLAN on ThorSumit Saxena2023-01-194-53/+74
| | | | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D36443 (cherry picked from commit 91fcacc355971f74aa26fc7861020dc3a2a2d717)
* if_bnxt: Add support for RSS on ThorSumit Saxena2023-01-192-13/+24
| | | | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D36442 (cherry picked from commit cfdca95f7834d2c10749fb14e12495d8aa7d1be0)
* if_bnxt: Display firmware version along with SIT package versionSumit Saxena2023-01-193-0/+34
| | | | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D36441 (cherry picked from commit 6033382aab2e6108e6faa273fd945274e161cd5b)
* if_bnxt: Add support for async link status updateSumit Saxena2023-01-193-33/+73
| | | | | | | Reivewed by: imp Differential Revision: https://reviews.freebsd.org/D36440 (cherry picked from commit fb4b7e02d236c2c06a87fc3dacd8af6bcfbfb5c1)
* if_bnxt: Add support for admin down/up and jumboSumit Saxena2023-01-195-14/+296
| | | | | | | | | Make ifconfig up/down work, as well as adding support for jumbo frames. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D36439 (cherry picked from commit 055196a7d777509bebab0e718a0d333cf2660178)
* if_bnxt: add support for Thor controllerSumit Saxena2023-01-196-301/+1547
| | | | | | | | | | | | | | | | | Added support for Thor controller. Below are the supported operations: 1. IPv4 ping (ICMP) 2. iperf / netperf (IPv4 TCP) 3. Promiscuous (tcpdump) 4. Can achieve 20 Gbps on a 25 G link (Uni-Di) 5. Can achieve 60 Gbps on a 100 G link (Uni-Di) 6. Port level and queue level driver stats. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D36438 (cherry picked from commit 8945584f93ee3689c90fd6b6ee6d824381813ef2)
* if_bnxt: Convert all doorbell writes into function pointersSumit Saxena2023-01-193-110/+86
| | | | | | | | | | | This is preparatory patch for making a base for Broadcom's Thor controller support. It converts all doorbell writes into function pointers. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D36437 (cherry picked from commit 49a3df78c75f29dfa4991314535c0eac4f5a73fa)
* if_bnxt: update hsi_struct_def.h headersSumit Saxena2023-01-194-22001/+55813
| | | | | | | | | | Updates the drivers to Broadcom's latest: HWRM Version 1.10.2.34 using HSI definition version 1.8.4 Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D36436 (cherry picked from commit 97315f68fe87ae391d2dd2f8c636beac9754ab73)
* bnxt: Remove unused devclass argument to DRIVER_MODULE.John Baldwin2023-01-191-2/+1
| | | | (cherry picked from commit 64d3221c61122b9a6a73f107c8145e92b47eb4c8)
* bnxt: Remove dead write to cp_ring_idWarner Losh2023-01-191-2/+0
| | | | | | | | | Since this is read from memory, reading it and then ignoring it is dead code... Sponsored by: Netflix (cherry picked from commit 44b4f0370fe90d11306e9d3fdcacdc5b4ccc946e)
* if_bnxt: Allow bnxt interfaces to use vlansMisho2022-04-271-3/+3
| | | | | | | | | | | | | When VLAN HW filter is disabled, the NIC does not pass any vlan tagged traffic. Setting these flags on the device allows vlan tagged traffic to pass. PR: 236983 Tested by: pi Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D34824 (cherry picked from commit 0c6a2fa33e36ac0b5d51cbae39a9c5564ad61788)
* bnxt(4): Mark sysctls MP-safe.Alexander Motin2021-10-041-23/+23
| | | | | | MFC after: 1 month (cherry picked from commit 9895a2073f98be927041f5a73d0d3ff5e8844bfb)
* bnxt(4): Fix bugs in WOL support.Alexander Motin2021-09-161-3/+4
| | | | | | | | | | | | | | | Before this change driver reported IFCAP_WOL_MAGIC enabled, but not supported. It caused errors on some SIOCSIFCAP calls. Instead report the support if hardware supports WOL, and enabled status if it has such filter installed on boot. Also bnxt_wol_config() should check WOL status in if_getcapenable(), not in if_getcapabilities() to get current one. MFC after: 2 weeks Sponsored by: iXsystems, Inc. (cherry picked from commit 8c14d7da5b9be78f71b1aa803e93ae7de973dd42)
* iflib: Make if_shared_ctx_t a pointer to constMark Johnston2021-03-221-3/+1
| | | | | | | | | | | | | | | | This structure is shared among multiple instances of a driver, so we should ensure that it doesn't somehow get treated as if there's a separate instance per interface. This is especially important for software-only drivers like wg. DEVICE_REGISTER() still returns a void * and so the per-driver sctx structures are not yet defined with the const qualifier. Reviewed by: gallatin, erj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29102 (cherry picked from commit ffe3def903a5f239c319e5fe12450659658974a5)
* iflib: ensure that tx interrupts enabled and cleanupsMatt Macy2021-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doing a 'dd' over iscsi will reliably cause stalls. Tx cleaning _should_ reliably happen as data is sent. However, currently if the transmit queue fills it will wait until the iflib timer (hz/2) runs. This change causes the the tx taskq thread to be run if there are completed descriptors. While here: - make timer interrupt delay a sysctl - simplify txd_db_check handling - comment on INTR types Background on the change: Initially doorbell updates were minimized by only writing to the register on every fourth packet. If txq_drain would return without writing to the doorbell it scheduled a callout on the next tick to do the doorbell write to ensure that the write otherwise happened "soon". At that time a sysctl was added for users to avoid the potential added latency by simply writing to the doorbell register on every packet. This worked perfectly well for e1000 and ixgbe ... and appeared to work well on ixl. However, as it turned out there was a race to this approach that would lockup the ixl MAC. It was possible for a lower producer index to be written after a higher one. On e1000 and ixgbe this was harmless - on ixl it was fatal. My initial response was to add a lock around doorbell writes - fixing the problem but adding an unacceptable amount of lock contention. The next iteration was to use transmit interrupts to drive delayed doorbell writes. If there were no packets in the queue all doorbell writes would be immediate as the queue started to fill up we could delay doorbell writes further and further. At the start of drain if we've cleaned any packets we know we've moved the state machine along and we write the doorbell (an obvious missing optimization was to skip that doorbell write if db_pending is zero). This change required that tx interrupts be scheduled periodically as opposed to just when the hardware txq was full. However, that just leads to our next problem. Initially dedicated msix vectors were used for both tx and rx. However, it was often possible to use up all available vectors before we set up all the queues we wanted. By having rx and tx share a vector for a given queue we could halve the number of vectors used by a given configuration. The problem here is that with this change only e1000 passed the necessary value to have the fast interrupt drive tx when appropriate. Reported by: mav@ Tested by: mav@ Reviewed by: gallatin@ MFC after: 1 month Sponsored by: iXsystems Differential Revision: https://reviews.freebsd.org/D27683
* bnxt: clean up empty lines in .c and .h filesMateusz Guzik2020-09-014-25/+7
| | | | Notes: svn path=/head/; revision=365124
* iflib: leave only 1 receive descriptor unusedVincenzo Maffione2020-09-011-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pidx argument of isc_rxd_flush() indicates which is the last valid receive descriptor to be used by the NIC. However, current code has multiple issues: - Intel drivers write pidx to their RDT register, which means that NICs will only use the descriptors up to pidx-1 (modulo ring size N), and won't actually use the one pointed by pidx. This does not break reception, but it is anyway confusing and suboptimal (the NIC will actually see only N-2 descriptors as available, rather than N-1). Other drivers (if_vmx, if_bnxt, if_mgb) adhere to this semantic). - The semantic used by Intel (RDT is one descriptor past the last valid one) is used by most (if not all) NICs, and it is also used on the TX side (also in iflib). Since iflib is not currently using this semantic for RX, it must decrement fl->ifl_pidx (modulo N) before calling isc_rxd_flush(), and then the per-driver callback implementation must increment the index again (to match the real semantic). This is confusing and suboptimal. - The iflib refill function is also called at initialization. However, in case the ring size is smaller than 128 (e.g. if_mgb), the refill function will actually prepare all the receive descriptors (N), without leaving one unused, as most of NICs assume (e.g. to avoid RDT to overrun RDH). I can speculate that the code looks like this right now because this issue showed up during testing (e.g. with if_mgb), and it was easy to workaround by decrementing pidx before isc_rxd_flush(). The goal of this change is to simplify the code (removing a bunch of instructions from the RX fast path), and to make the semantic of isc_rxd_flush() consistent across drivers. To achieve this, we: - change the semantics of the pidx argument to the usual one (that is the index one past the last valid one), so that both iflib and drivers avoid the decrement/increment dance. - fix the initialization code to prepare at most N-1 descriptors. Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26191 Notes: svn path=/head/; revision=365061
* bnxt: isc_nrxd_max and isc_ntxd_max must be powers of twoKristof Provost2020-05-202-2/+7
| | | | | | | | | Reviewed by: gallatin, rpokala MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24922 Notes: svn path=/head/; revision=361279
* remove extraneous double ;s in sys/Ed Maste2020-03-302-3/+3
| | | | Notes: svn path=/head/; revision=359441
* bnxt(4): Fix ioctls when user addresses are inaccessable.Brooks Davis2020-03-041-25/+24
| | | | | | | | | | | | | | | | Check copyin's error code (differ adding copyout checks at this time). Don't directly access user memory in the switch statement. Since bnxt_ioctl_data isn't all that big, use a stack allocation. Reviewed by: jhb MFC after: 3 days Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D23933 Notes: svn path=/head/; revision=358630
* Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)Pawel Biernacki2020-02-261-65/+71
| | | | | | | | | | | | | | | | | | | r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718 Notes: svn path=/head/; revision=358333
* bnxt(4): Eliminate wrong sizeof() expression in memset()Conrad Meyer2020-01-291-5/+7
| | | | | | | | | | | | | | | While here, clean up magic numbers. The memset(,0,) (and M_ZERO!) can just be removed; the bit_alloc() API already zeros the allocation. No functional change. Reported by: Coverity CID: 1378286 Notes: svn path=/head/; revision=357248
* Convert to if_foreach_llmaddr() KPI.Gleb Smirnoff2019-10-211-9/+21
| | | | Notes: svn path=/head/; revision=353837
* Assorted TSO fixes for em(4)/iflib(9) and dead code removal:Marius Strobl2018-07-151-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Ever since the workaround for the silicon bug of TSO4 causing MAC hangs was committed in r295133, CSUM_TSO always got disabled unconditionally by em(4) on the first invocation of em_init_locked(). However, even with that problem fixed, it turned out that for at least e. g. 82579 not all necessary TSO workarounds are in place, still causing MAC hangs even at Gigabit speed. Thus, for stable/11, TSO usage was deliberately disabled in r323292 (r323293 for stable/10) for the EM-class by default, allowing users to turn it on if it happens to work with their particular EM MAC in a Gigabit-only environment. In head, the TSO workaround for speeds other than Gigabit was lost with the conversion to iflib(9) in r311849 (possibly along with another one or two TSO workarounds). Yet at the same time, for EM-class MACs TSO4 got enabled by default again, causing device hangs. Therefore, change the default for this hardware class back to have TSO4 off, allowing users to turn it on manually if it happens to work in their environment as we do in stable/{10,11}. An alternative would be to add a whitelist of EM-class devices where TSO4 actually is reliable with the workarounds in place, but given that the advantage of TSO at Gigabit speed is rather limited - especially with the overhead of these workarounds -, that's really not worth it. [1] This change includes the addition of an isc_capabilities to struct if_softc_ctx so iflib(9) can also handle interface capabilities that shouldn't be enabled by default which is used to handle the default-off capabilities of e1000 as suggested by shurd@ and moving their handling from em_setup_interface() to em_if_attach_pre() accordingly. - Although 82543 support TSO4 in theory, the former lem(4) didn't have support for TSO4, presumably because TSO4 is even more broken in the LEM-class of MACs than the later EM ones. Still, TSO4 for LEM-class devices was enabled as part of the conversion to iflib(9) in r311849, causing device hangs. So revert back to the pre-r311849 behavior of not supporting TSO4 for LEM-class at all, which includes not creating a TSO DMA tag in iflib(9) for devices not having IFCAP_TSO4 set. [2] - In fact, the FreeBSD TCP stack can handle a TSO size of IP_MAXPACKET (65535) rather than FREEBSD_TSO_SIZE_MAX (65518). However, the TSO DMA must have a maxsize of the maximum TSO size plus the size of a VLAN header for software VLAN tagging. The iflib(9) converted em(4), thus, first correctly sets scctx->isc_tx_tso_size_max to EM_TSO_SIZE in em_if_attach_pre(), but later on overrides it with IP_MAXPACKET in em_setup_interface() (apparently, left-over from pre-iflib(9) times). So remove the later and correct iflib(9) to correctly cap the maximum TSO size reported to the stack at IP_MAXPACKET. While at it, let iflib(9) use if_sethwtsomax*(). This change includes the addition of isc_tso_max{seg,}size DMA engine constraints for the TSO DMA tag to struct if_shared_ctx and letting iflib_txsd_alloc() automatically adjust the maxsize of that tag in case IFCAP_VLAN_MTU is supported as requested by shurd@. - Move the if_setifheaderlen(9) call for adjusting the maximum Ethernet header length from {ixgbe,ixl,ixlv,ixv,em}_setup_interface() to iflib(9) so adjustment is automatically done in case IFCAP_VLAN_MTU is supported. As a consequence, this adjustment now is also done in case of bnxt(4) which missed it previously. - Move the reduction of the maximum TSO segment count reported to the stack by the number of m_pullup(9) calls (which in the worst case, can add another mbuf and, thus, the requirement for another DMA segment each) in the transmit path for performance reasons from em_setup_interface() to iflib_txsd_alloc() as these pull-ups are now done in iflib_parse_header() rather than in the no longer existing em_xmit(). Moreover, this optimization applies to all drivers using iflib(9) and not just em(4); all in-tree iflib(9) consumers still have enough room to handle full size TSO packets. Also, reduce the adjustment to the maximum number of m_pullup(9)'s now performed in iflib_parse_header(). - Prior to the conversion of em(4)/igb(4)/lem(4) and ixl(4) to iflib(9) in r311849 and r335338 respectively, these drivers didn't enable IFCAP_VLAN_HWFILTER by default due to VLAN events not being passed through by lagg(4). With iflib(9), IFCAP_VLAN_HWFILTER was turned on by default but also lagg(4) was fixed in that regard in r203548. So just remove the now redundant and defunct IFCAP_VLAN_HWFILTER handling in {em,ixl,ixlv}_setup_interface(). - Nuke other redundant IFCAP_* setting in {em,ixl,ixlv}_setup_interface() which is (more completely) already done in {em,ixl,ixlv}_if_attach_pre() now. - Remove some redundant/dead setting of scctx->isc_tx_csum_flags in em_if_attach_pre(). - Remove some IFCAP_* duplicated either directly or indirectly (e. g. via IFCAP_HWCSUM) in {EM,IGB,IXL}_CAPS. - Don't bother to fiddle with IFCAP_HWSTATS in ixgbe(4)/ixgbev(4) as iflib(9) adds that capability unconditionally. - Remove some unused macros from em(4). - Bump __FreeBSD_version as some of the above changes require the modules of drivers using iflib(9) to be recompiled. Okayed by: sbruno@ at 201806 DevSummit Transport Working Group [1] Reviewed by: sbruno (earlier version), erj PR: 219428 (part of; comment #10) [1], 220997 (part of; comment #3) [2] Differential Revision: https://reviews.freebsd.org/D15720 Notes: svn path=/head/; revision=336313
* netmap and iflib drivers, silence unused var warningsMatt Macy2018-05-192-8/+0
| | | | Notes: svn path=/head/; revision=333870
* bnxt(4)Sean Bruno2018-05-181-0/+4
| | | | | | | | | | | | - Fix HWRM warning message during HW LRO configuration. Submitted by: bhargava.marreddy@broadcom.com MFC after: 1 week Sponsored by: Broadcom Limited Differential Revision: https://reviews.freebsd.org/D15466 Notes: svn path=/head/; revision=333792
* Use C99 initializers for iflib function tables.Mark Johnston2018-04-111-8/+8
| | | | | | | | | Reviewed by: sbruno MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D15041 Notes: svn path=/head/; revision=332409
* Revert r327828, r327949, r327953, r328016-r328026, r328041:Pedro F. Giffuni2018-01-211-10/+9
| | | | | | | | | | | | | | | | | | Uses of mallocarray(9). The use of mallocarray(9) has rocketed the required swap to build FreeBSD. This is likely caused by the allocation size attributes which put extra pressure on the compiler. Given that most of these checks are superfluous we have to choose better where to use mallocarray(9). We still have more uses of mallocarray(9) but hopefully this is enough to bring swap usage to a reasonable level. Reported by: wosch PR: 225197 Notes: svn path=/head/; revision=328218
* dev: make some use of mallocarray(9).Pedro F. Giffuni2018-01-131-9/+10
| | | | | | | | | | | | | | Focus on code where we are doing multiplications within malloc(9). None of these is likely to overflow, however the change is still useful as some static checkers can benefit from the allocation attributes we use for mallocarray. This initial sweep only covers malloc(9) calls with M_NOWAIT. No good reason but I started doing the changes before r327796 and at that time it was convenient to make sure the sorrounding code could handle NULL values. Notes: svn path=/head/; revision=327949
* Add log messages for unknown and unhandled phy typesStephen Hurd2017-12-191-1/+6
| | | | | | | | | | | | Previously, it silently only supported auto, instead, log a message indicating why only auto is supported. Submitted by: Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com> Sponsored by: Broadcom Limited Differential Revision: https://reviews.freebsd.org/D13358 Notes: svn path=/head/; revision=327003
* On Link up & down, update media typesStephen Hurd2017-12-191-0/+4
| | | | | | | | | | | It's possible to change the SFP module when link is down, which would change the available media types. This is part of D13358. Submitted by: Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com> Sponsored by: Broadcom Limited Notes: svn path=/head/; revision=327001
* Support short HWRM commandsStephen Hurd2017-12-194-1/+61
| | | | | | | | | | | | | New Stratus bnxt devices require support for short HWRM commands for VFs to function. Enable their use, but only use them if it's both supported and required... prefer the long HWRM commands when possible. Submitted by: Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com> Sponsored by: Broadcom Limited Differential Revision: https://reviews.freebsd.org/D13269?id=36180 Notes: svn path=/head/; revision=327000
* Don't populate NVRAM sysctls for VFsStephen Hurd2017-12-192-25/+34
| | | | | | | | | | Only the PF allows NVRAM interaction on bnxt devices. Submitted by: Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com> Sponsored by: Broadcom Limited Notes: svn path=/head/; revision=326999
* Add byte swapping in bnxt_cfg_async_cr() requestStephen Hurd2017-12-191-3/+3
| | | | | | | | | | | The firmware is always in little endian, use htole*() for all request fields larger than one byte. Submitted by: Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com> Sponsored by: Broadcom Limited Notes: svn path=/head/; revision=326985
* iflib: Support to padding Ethernet frames to a min sizeStephen Hurd2017-12-052-1/+4
| | | | | | | | | | | | | Some bnxt devices do not correctly send frames smaller than 52 bytes (without CRC), so add a quirk that will pad frames to an arbitrary size before passing off to the encap routine. Reported by: Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com> Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D13269 Notes: svn path=/head/; revision=326578
* Fix issue with VXLAN-ecapsulated rx h/w checksumming.Sean Bruno2017-11-091-2/+4
| | | | | | | | | Submitted by: grehan Reviewed by: bhargava.marreddy@broadcom.com Differential Revision: https://reviews.freebsd.org/D12976 Notes: svn path=/head/; revision=325620
* bnxt: Add support for new phy_types and speeds - Part #2Stephen Hurd2017-11-061-163/+15
| | | | | | | | | | | | | | | | | | | Use our ifm_list of supported media types rather than nested switch statements to find the current media type. Find a supported type that matches the current speed. Remove all workarounds while updating ifmr->ifm_active. For BNXT_IFMEDIA_ADD, added Three more speeds IFM_10G_T, IFM_2500_T & IFM_2500_KX. Submitted by: Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com> Reviewed by: shurd, sbruno Approved by: sbruno (mentor) Sponsored by: Broadcom Limited Differential Revision: https://reviews.freebsd.org/D12896 Notes: svn path=/head/; revision=325488
* bnxt: Add support for new phy_types and speedsStephen Hurd2017-10-302-108/+70
| | | | | | | | | | | | | | | 1) Add new phy_types and speeds from the latest firmware header. 2) Introduced a macro to avoid code duplication and improve readability for the invocation of ifmedia_add(). Submitted by: Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com> Reviewed by: shurd, sbruno Approved by: sbruno (mentor) Sponsored by: Broadcom Limited Differential Revision: https://reviews.freebsd.org/D12423 Notes: svn path=/head/; revision=325169