aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/bnxt/bnxt_en
Commit message (Collapse)AuthorAgeFilesLines
* 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
* 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(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
* 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-0/+90744
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