aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/bnxt
Commit message (Collapse)AuthorAgeFilesLines
* bnxt: set hardware checksum only if requiredacazuc2026-02-051-6/+16
| | | | | | | | | | | The test condition in the bnxt driver for TCP/UDP transmit hardware checksum offload is invalid: only the TCP / UDP csum bits should be tested Only the relevant ipi_csum_flags bits are now tested Reviewed by: tuexen Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D53941
* bnxt_re/libbnxtre: Add support for Variable WQE on BCM576xx controllersSreekanth Reddy2026-01-279-86/+195
| | | | | | | | | | | | | | | Variable size WQE means that each send Work Queue Entry to HW can use different WQE sizes as opposed to the static WQE size on the current devices. Set variable WQE mode for BCM576xx devices. Depth of the Queue will be a multiple of slot which is 16 bytes. The number of slots should be a multiple of 256 as per the HW requirement. Initialize the Software shadow queue to hold requests equal to the number of slots. Reviewed by: ssaxena Differential Revision: https://reviews.freebsd.org/D54525 MFC after: 3 days
* bnxt_re: Add support to display board_id in ibv_devinfo outputSreekanth Reddy2026-01-275-1/+31
| | | | | | | | | | | | Added support to display board_id in ibv_devinfo output. ibv_devinfo util reads the board_id from below sysctl attribute, so added this sysctl attribute. sys.class.infiniband.bnxt_reX.board_id Reviewed by: ssaxena Differential Revision: https://reviews.freebsd.org/D54524 MFC after: 3 days
* bnxt_re: Fix active_speed value when two ports are aggregatedSreekanth Reddy2026-01-278-30/+103
| | | | | | | | | | | | | Currently driver is not considering the active_lanes while displaying the speed & width of port and hence it showing invalid active_speed and active_width values in the ibv_devinfo command output when two ports are aggregated at hardware level. Fixed the driver to consider the active_lanes while determining the active_speed & active_width values. Reviewed by: ssaxena Differential Revision: https://reviews.freebsd.org/D54523 MFC after: 3 days
* bnxt_en/re: Use FW defined resource limit for RoCESreekanth Reddy2026-01-277-16/+42
| | | | | | | | | | | | | | | | | | | | | | | | | Check FW flags for status of Resource Limits. If bit FUNC_QCAPS_RESP_FLAGS_EXT2_SW_MAX_RESOURCE_LIMITS_SUPPORTED is set, that means FW set the resource limit for L2 and RoCE. We'll then do the following: L2 driver would allocate context memory based on what FW reported. RoCE driver uses FW reported values without capping. These values are the total FW reported value minus L2 and other components shares. For example: FW reported max_qps = 137217 in L2 query, this includes: 5120 for L2 1025 for QP1 131072 for RoCE L2 will allocate backing store memory for the total. In RoCE query, we'll get max_qp = 131072 and use it without further capping. Reviewed by: ssaxena Differential Revision: https://reviews.freebsd.org/D54522 MFC after: 3 days
* bnxt_re/libbnxtre: Add RoCE support for BCM576xx controllersSreekanth Reddy2026-01-2713-39/+93
| | | | | | | | | | | | | | | | | | | Added RoCE support for BCM576xx controllers with below changes, 1. Update the BAR offsets for handling BCM576xx controllers. Use the values populated by the L2 driver for getting the Doorbell offsets. 2. Use msn index instead of tail to pull psn table entry. 3. Temporarily disable dbr pacing feature untill it is fully implemented. 4. Add support for 400G speed. Reviewed by: ssaxena Differential Revision: https://reviews.freebsd.org/D54521 MFC after: 3 days
* bnxt: don't set media status if link is downAnaëlle CAZUC2026-01-261-4/+3
| | | | | | | | | | | When the link is down don't set flags other than IFM_AVALID & IFM_ETHER This avoids `media: Ethernet autoselect (Unknown <full-duplex>)` on ifconfig Reviewed by: zlei, pouria Approved by: glebius (mentor) MFC after: 1 week Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D54573
* bnxt: Fix up ioctl opcodes to support IOC_VOID along with IOC_INSumit Saxena2026-01-092-6/+14
| | | | | | | | | | | | | | | | | | The driver and applications currently use hard-coded numeric ioctl command opcodes. These opcodes are interpreted as having the IOC_IN direction (data copied from the user application to the driver), regardless of the actual packet size. Consequently, when the packet size is zero and the direction is set to IOC_IN, the kernel fails these ioctls if COMPAT is disabled. While the driver and applications should ideally set the direction correctly— for example, using IOC_VOID when the packet size is zero—the driver will now be updated to define ioctl opcodes using the _IOC macro to support both IOC_VOID and IOC_IN. This change ensures backward compatibility with older applications that exclusively use IOC_IN. Reviewed by: gallatin Differential Revision: https://reviews.freebsd.org/D54601 MFC after: 3 days
* bnxt: fix i2c read to allow access to different addressesAndrew Gallatin2026-01-081-1/+1
| | | | | | | | | | | Allow reading of i2c addresses other than A0. A0 does provide most information, but doesn't provide things like module temps, and optical signal levels. Sponsored by: Netflix Reviewed by: sumit.saxena_broadcom.com Differential Revision: https://reviews.freebsd.org/D54590 MFC after: 3 days
* LinuxKPI: pci: implementation of [lkpi_]pci_get_slot()Bjoern A. Zeeb2025-09-291-0/+1
| | | | | | | | | | | | | | | | | Like lkpi_pci_get_domain_bus_and_slot() implement lkpi_pci_get_slot() using pci_find_bsf() instead of pci_find_dbsf() (no domain). This is needed for a wireless driver. Unfortunately the name [pci_get_slot()] collides with the native PCI function. Add a guard around it and disable the use when the native version is required (in lkpifill_pci_dev() and in bnxt/bnxt_en; if the latter gets fixed we can probably also fix work around it in the former; further conflicts in drm-kmod 6.1-lts, 6.6-lts, and master were resolved). Sponsored by: The FreeBSD Foundation (initially) MFC aftre: 3 days Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D52065
* bnxt: Fix the request length in bnxt_hwrm_func_backing_store_cfg()Mark Johnston2025-09-111-1/+1
| | | | | | | PR: 286720 Reviewed by: zlei MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D50491
* bnxt(4): Fix typos in a comment and a kernel messageGordon Bergling2025-08-171-2/+2
| | | | | | - s/priviledged/privileged/ MFC after: 5 days
* LinuxKPI: MODULE_DEVICE_TABLE() factor out the bus specific MODULE_PNP_INFO()Bjoern A. Zeeb2025-07-041-0/+1
| | | | | | | | | | | | | | | | | In order to be able to use MODULE_DEVICE_TABLE() with multiple bus attachments, factor out the bus-specfic MODULE_PNP_INFO() and place it next to the structure defining the table. As it turns out bnxt(4) has been using the MODULE_DEVICE_TABLE() with PCI attachments for the "auxillary" bus so far. That makes little sense. Define the MODULE_PNP_INFO() to nothing for that. We may consider pulling these LinucKPI bits in semi-native drivers into LinuxKPI one day as that route is not really sustainabke. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: imp, dumbbell Differential Revision: https://reviews.freebsd.org/D51049
* bnxt: Fix BASE-T, 40G AOC, 1G-CX, autoneg and unknown media listsKevin Bowling2025-06-141-7/+7
| | | | | | | | | | | | | | | | This was broken in c63d67e137f3, the early returns prevent building the media lists as expected. The BASE-T parts of the patch were suggested by "cyric@mm.st", while I am adding the additional 40G AOC, 1CX, autoneg and unknown PHY fixes based on code inspection. There may be additional work left here for Broadcom but this is certainly better than the returns. PR: 287395 Reported by: mickael.maillot@gmail.com, cyric@mm.st Tested by: Einar Bjarni Halldórsson <einar@isnic.is> MFC after: 1 week
* bnxt: add guards around struct_group macrosBjoern A. Zeeb2025-05-051-0/+4
| | | | | | | | | | The header file might be included after linux/stddef.h or others are included and the macros would be re-defined. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D50156
* bnxt_en: Thor2 Ring counters not incrementing during trafficSreekanth Reddy2025-04-231-1/+4
| | | | | | | | | The ctx_hw_stats_ext DMA address was not correctly passed to the firmware during the HWRM_STAT_CTX_ALLOC allocation, causing stats to not populate for Thor2. Passing the correct DMA length resolved the issue MFC-After: 3 days Differential-Revision: https://reviews.freebsd.org/D49732
* bnxt_en: Unhandled async event type 76Sreekanth Reddy2025-04-231-6/+6
| | | | | | | | | The completion event type 76 is not supported by the driver. Instead of flooding the dmesg with "Unknown event type" messages when this event occurs, move the print under debug level. MFC-After: 3 days Differential-Revision: https://reviews.freebsd.org/D49731
* bnxt_en: Thor2 Specific Doorbell related changesSreekanth Reddy2025-04-233-32/+311
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doorbell offset : For Thor controllers doorbell offset was always hardcoded to 0x10000 for PF devices where as for Thor2 controllers doorbell offset will be legacy_l2_db_size_kb value provided by firmware through hwrm_func_qcfg command. CQ Toggle & Epoch bits support : In order to handle out of order doorbell handling as part of Dropped Doorbell Recovery, HW expects two changes in the driver in data path. - First change is the epoch bit changes while updating the producer indexes of Tx. This epoch bit is toggled by the driver, each time the queue is wrapped for that specific doorbell. - The second change is to add a toggle bit pair to each ARM type doorbell. This includes the CQ_ARMALL, CQ_ARMSE, CQ_ARMENA doorbells. The toggle bit pair in context is incremented by the chip each time a new NQE completion is generated by the chip. To keep the driver in-sync, the toggle bit pair will be passed in the NQE to the host completion. This will be the toggle bit pair value that the host must use to setup the next NQE operation. The driver will pass that latest toggle bit pair value into the ARM type doorbells it generates to the chip. The doorbell clients will compare the toggle bit pair in each doorbell with the value in context. If the values match, the doorbell will be honored. If the values do not match, the doorbell will be discarded. MFC-After: 3 days Differential-Revision: https://reviews.freebsd.org/D49730
* bnxt_en: 400G speed supportSreekanth Reddy2025-04-233-135/+441
| | | | | | | Added 400G speed module support. MFC-After: 3 days Differential-Revision: https://reviews.freebsd.org/D49729
* if_bnxt: add support for RX completion record type V3Sreekanth Reddy2025-04-232-0/+5
| | | | | | | | Added support for RX V3 completion record types- CMPL_BASE_TYPE_RX_TPA_START_V3 and CMPL_BASE_TYPE_RX_L2_V3. MFC-After: 3 days Differential-Revision: https://reviews.freebsd.org/D49728
* bnxt_en: Add backing store V2 supportSreekanth Reddy2025-04-233-18/+153
| | | | | | | | | Add backing store V2 support. Thor2 controllers supports only the V2 support. MFC-After: 3 days Reviewed-by: Warner Losh <imp@FreeBSD.org> Differential-Revision: https://reviews.freebsd.org/D49727
* bnxt_en: Update HSI headerSreekanth Reddy2025-04-232-169/+2082
| | | | | | | Update HSI header to support Thor2 controllers. MFC-After: 3 days Differential-Revision: https://reviews.freebsd.org/D49726
* bnxt_en: Add 5760X (Thor2) PCI IDs supportSreekanth Reddy2025-04-235-60/+93
| | | | | | | | | Add Thor2 PCI IDs. Reviewed-by: Warner Losh <imp@FreeBSD.org> Reviewed-by: Sumit Saxena <sumit.saxena@broadcom.com> MFC-After: 3 days Differential-Revision: https://reviews.freebsd.org/D49725
* bnxt_en: Improve sysctl handler bnxt_dcb_list_app()Zhenlei Huang2025-02-141-27/+17
| | | | | | | | | | | Prefer sbuf_new_for_sysctl() over error-prone manually managed buffer. No functional change intended. Reviewed by: markj Tested by: Daniel Porsch <daniel.porsch@loopia.se> MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48496
* bnxt_en: Remove pointless NULL check for sysctl arg1Zhenlei Huang2025-02-141-18/+0
| | | | | | | | | | | | Those sysctl handlers have been guaranteed to have non-null softc. No need for NULL check within sysctl handlers. No functional change intended. Reviewed by: markj Tested by: Daniel Porsch <daniel.porsch@loopia.se> MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48495
* bnxt_en: Fix the description of sysctl knob dev.bnxt.X.dcb.dcbx_capZhenlei Huang2025-02-141-2/+2
| | | | | | | | | | While here, update the description of dev.bnxt.X.dcb to more informative words "Data Center Bridging". Reviewed by: markj Fixes: 35b53f8c989f bnxt_en: Add PFC, ETS & App TLVs protocols support MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48993
* bnxt_en: Retrieve maximum of 128 APP TLVsZhenlei Huang2025-02-144-9/+14
| | | | | | | | | | | | | | | | It appears that the maximum number of APP TLVs supported by the hardware is 128 according to D45005. Well Daniel Porsch reported an issue PR284073 which shows that the number can exceed the limit, causing out of bound write to on-stack allocated variable app[128] and the kernel panics. Limit to 128 while retrieving APP TLVs. PR: 284073 Reviewed by: markj Tested by: Daniel Porsch <daniel.porsch@loopia.se> Fixes: 35b53f8c989f bnxt_en: Add PFC, ETS & App TLVs protocols support MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48589
* iflib(4): Replace admin taskqueue group with per-interface taskqueuesKrzysztof Galazka2025-01-242-7/+5
| | | | | | | | | | | | | | | | Using one taskqueue group with single thread to execute all admin tasks may lead to unexpected timeouts when long running task (e.g. handling a reset after FW update) for one interface prevents tasks from other interfaces being executed. Taskqueue group API doesn't let to dynamically add threads, and pre-allocating thread for each CPU as it's done for traffic queues would be a waste of resources on systems with small number of interfaces. Replace global taskqueue group for admin tasks with taskqueue allocated for each interface to allow independent execution. Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com> Reviewed by: imp, jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/1336
* bnxt: Use IfAPI accessors where ableJustin Hibbits2024-11-133-7/+7
| | | | | | | | Summary: Don't directly access ifnet members, it's a private structure. Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D47353
* bnxt(4): Stop checking for failures from malloc(M_WAITOK)Zhenlei Huang2024-09-031-18/+0
| | | | | MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852
* /sys/dev/bnxt: Enable NPAR support on BCM57504Vinícius Ferrão2024-07-072-0/+5
| | | | | | | | This commit enables NPAR support for Broadcom 57504 10/25GbE NICs Signed-off-by: Vinícius Ferrão <vinicius@ferrao.net.br> Reviewed by: imp,ssaxena,nightquick@proton.me Pull Request: https://github.com/freebsd/freebsd-src/pull/1306
* LinuxKPI: Add min_not_zero() to linux/minmax.hVladimir Kondratyev2024-06-061-0/+2
| | | | | | | | | | It returns the minimum that is not zero, except both equals to zero. Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: bz, emaste, ssaxena Differential Revision: https://reviews.freebsd.org/D45450 Differential Revision: https://reviews.freebsd.org/D45451
* bnxt_re: Explicitly cast pointer-to-integer conversionsMark Johnston2024-05-282-2/+2
| | | | | Reported by: Jenkins Fixes: acd884dec99a ("RDMA/bnxt_re: Add bnxt_re RoCE driver")
* RDMA/bnxt_re: Add bnxt_re RoCE driverSumit Saxena2024-05-2816-0/+22768
| | | | | | | | | | | | | | | | | | | | This patch introduces the RoCE driver for the Broadcom NetXtreme-E 10/25/50/100/200G RoCE HCAs. The RoCE driver is a two part driver that relies on the bnxt_en NIC driver to operate. The changes needed in the bnxt_en driver is included through another patch "L2-RoCE driver communication interface" in this set. Presently, There is no user space support, Hence recommendation to use the krping kernel module for testing. User space support will be incorporated in subsequent patch submissions. Reviewed by: imp Approved by: imp Differential revision: https://reviews.freebsd.org/D45011
* bnxt_en: Driver version update to 230.0.133.0Chandrakanth patil2024-05-281-1/+1
| | | | | | Reviewed by: imp Approved by: imp Differential revision: https://reviews.freebsd.org/D45010
* bnxt_en: Firmware header version update to 1.10.3.42Chandrakanth patil2024-05-282-3774/+16903
| | | | | | | | | This file is automatically generated from the firmware code to export the driver interfaces. Reviewed by: imp Approved by: imp Differential revision: https://reviews.freebsd.org/D45009
* bnxt_en: Firmware error recovery supportChandrakanth patil2024-05-286-83/+1141
| | | | | | | | | | | | | | | | Implement firmware error recovery support for Thor adapters. This entails enabling the capability for the firmware to initiate error recovery. Specifically, the firmware will send the reset notify asynchronous event to notify the driver of an error and impending reset. Subsequently, the driver will queue a task to execute the following steps. 1. Deactivate the allocated resources. 2. Await completion of the firmware's recovery process. 3. Configure the resources and reactivate the network interface. Reviewed by: imp Approved by: imp Differential revision: https://reviews.freebsd.org/D45008
* bnxt_en: Added support for priority queues extended statsChandrakanth patil2024-05-284-7/+277
| | | | | | | | | | | | | Below priority queues extended stats are exposed to sysctl: tx_bytes_pri{0-7} rx_bytes_pri{0-7} tx_packets_pri{0-7} rx_packets_pri{0-7} Reviewed by: imp Approved by: imp Differential revision: https://reviews.freebsd.org/D45007
* bnxt_en: L2-RoCE driver communication interfaceChandrakanth patil2024-05-2810-339/+1923
| | | | | | | | | | | - Added Aux bus support for RoCE. - Implemented the ulp ops that are required by RoCE driver. - Restructure context memory data structures - DBR pacing support Reviewed by: imp Approved by: imp Differential revision: https://reviews.freebsd.org/D45006
* bnxt_en: Add PFC, ETS & App TLVs protocols supportChandrakanth patil2024-05-2814-203/+1975
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Created new directory "bnxt_en" in /dev/bnxt and /modules/bnxt and moved source files and Makefile into respective directory. ETS support: - Added new files bnxt_dcb.c & bnxt_dcb.h - Added sysctl node 'dcb' and created handlers 'ets' and 'dcbx_cap' - Add logic to validate user input and configure ETS in the firmware - Updated makefile to include bnxt_dcb.c & bnxt_dcb.h PFC support: - Created sysctl handlers 'pfc' under node 'dcb' - Added logic to validate user input and configure PFC in the firmware. App TLV support: - Created 3 new sysctl handlers under node 'dcb' - set_apptlv (write only): Sets a specified TLV - del_apptlv (write only): Deletes a specified TLV - list_apptlv (read only): Lists all APP TLVs configured - Added logic to validate user input and configure APP TLVs in the firmware. Added Below DCB ops for management interface: - Set PFC, Get PFC, Set ETS, Get ETS, Add App_TLV, Del App_TLV Lst App_TLV Reviewed by: imp Approved by: imp Differential revision: https://reviews.freebsd.org/D45005
* if_bnxt: Set 1G/10G baseT force speed as auto speedsChandrakanth Patil2024-03-073-5/+23
| | | | | | | | | | The firmware lacks support for manually setting 1G and 10G baseT speeds. However, the driver can enable auto speed masks to achieve automatic configuration at these speeds. Reviewed by: imp Approved by: imp Differential revision: https://reviews.freebsd.org/D42960
* if_bnxt: 50G, 100G and 200G PAM4 supportChandrakanth Patil2024-03-074-39/+284
| | | | | | | | Add support for 50G, 100G and 200G PAM4 support Reviewed by: imp Approved by: imp Differential revision: https://reviews.freebsd.org/D42959
* if_bnxt: Pluggable Module Display SupportSumit Saxena2024-03-073-0/+107
| | | | | | | | | This update enables the display of pluggable module information to users via the ifconfig utility. Reviewed by: imp Approved by: imp Differential revision: https://reviews.freebsd.org/D42958
* if_bnxt: Implementation of Extended Port Hardware Stats Support for THOR ↵Chandrakanth Patil2024-03-076-137/+419
| | | | | | | | | | | | Controller The newly added port extended hardware statistics are now accessible to users through the sysctl interface. Also, Few obsolete stats are removed and few stats are renamed. Reviewed by: imp Approved by: imp Differential revision: https://reviews.freebsd.org/D42957
* if_bnxt: Integrate AOC Cable Support into Current 40G PHY SpeedChandrakanth Patil2024-03-071-0/+4
| | | | | | Reviewed by: imp Approved by: imp Differential revision: https://reviews.freebsd.org/D429506
* if_bnxt: Update Firmware Header to Latest Version 1.10.2.136Chandrakanth Patil2024-03-071-856/+15042
| | | | | | | | Update Firmware Header to Latest Version 1.10.2.136. Reviewed by: imp Approved by: imp Differential revision: https://reviews.freebsd.org/D42955
* if_bnxt: Update Maximum Configurable MTU from 9000 to 9600Chandrakanth Patil2024-03-071-1/+1
| | | | | | | | | Increasing the maximum configurable MTU from 9000 to 9600 to align with the firmware's capability of handling an MTU up to 9600. Reviewed by: imp Approved by: imp Differential revision: https://reviews.freebsd.org/D42954
* if_bnxt: Enabled support for 1G SX, CX, and LX forced speed settingsChandrakanth Patil2024-03-071-0/+3
| | | | | | | | | Enabled User Configuration of 1G Speed on Wh+ SFP28 Port with AOC cable. Reviewed by: imp Approved by: imp Differential revision: https://reviews.freebsd.org/D42953
* if_bnxt: Incorrect Labeling of Supported Medium in `ifconfig -m <inf>` CommandChandrakanth Patil2024-03-071-1/+1
| | | | | | | | | The 1G speed on DAC medium is incorrectly labeled as 1000baseT, it should be 1000baseCX. Updated the label accordingly. Reviewed by: imp Approved by: imp Differential revision: https://reviews.freebsd.org/D42952
* if_bnxt: Fix media speed update issue in "ifconfig -m" during PHY hot plugChandrakanth Patil2024-03-072-0/+3
| | | | | | | | | | | | | | Currently, if a media type (e.g., DAC) is hot-plugged out and another type (e.g., optical cable) is hot-plugged in, the new speed is not reflected in ifconfig. This occurs when the driver fails to update speeds with unchanged tx and rx flow control. To fix, a phy_type check ensures update of phy speeds upon detecting the new phy. Reviewed by: imp Approved by: imp Differential revision: https://reviews.freebsd.org/D42951