Re: [PATCH net-next v2 8/9] bnxt: implement ethtool standard stats

2021-04-18 Thread Michael Chan
On Fri, Apr 16, 2021 at 12:27 PM Jakub Kicinski wrote: > > Most of the names seem to strongly correlate with names from > the standard and RFC. Whether ..+good_frames are indeed Frames..OK > I'm the least sure of. The mapping looks correct to me. These counters can also be mapped: rx_fcs_err_fr

Re: [PATCH net-next 4/6] bnxt: implement ethtool::get_fec_stats

2021-04-15 Thread Michael Chan
On Tue, Apr 13, 2021 at 8:45 PM Jakub Kicinski wrote: > > Report corrected bits. > > Signed-off-by: Jakub Kicinski Reviewed-by: Michael Chan Thanks. smime.p7s Description: S/MIME Cryptographic Signature

Re: [PATCH net-next 4/5] bnxt_en: Refactor __bnxt_vf_reps_destroy().

2021-04-12 Thread Michael Chan
On Mon, Apr 12, 2021 at 10:33 AM Leon Romanovsky wrote: > > On Mon, Apr 12, 2021 at 09:31:33AM -0700, Michael Chan wrote: > > On Mon, Apr 12, 2021 at 12:37 AM Leon Romanovsky wrote: > > > > > > On Sun, Apr 11, 2021 at 08:18:14PM -0400, Michael Chan wrote: >

Re: [PATCH net-next 4/5] bnxt_en: Refactor __bnxt_vf_reps_destroy().

2021-04-12 Thread Michael Chan
On Mon, Apr 12, 2021 at 12:37 AM Leon Romanovsky wrote: > > On Sun, Apr 11, 2021 at 08:18:14PM -0400, Michael Chan wrote: > > Add a new helper function __bnxt_free_one_vf_rep() to free one VF rep. > > We also reintialize the VF rep fields to proper initial values so that >

[PATCH net-next 4/5] bnxt_en: Refactor __bnxt_vf_reps_destroy().

2021-04-11 Thread Michael Chan
recovery. Reviewed-by: Edwin Peer Reviewed-by: Sriharsha Basavapatna Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c | 21 ++- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c b/drivers/net

[PATCH net-next 3/5] bnxt_en: Refactor bnxt_vf_reps_create().

2021-04-11 Thread Michael Chan
From: Sriharsha Basavapatna Add a new function bnxt_alloc_vf_rep() to allocate a VF representor. This function will be needed in subsequent patches to recreate the VF reps after error recovery. Signed-off-by: Sriharsha Basavapatna Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom

[PATCH net-next 5/5] bnxt_en: Free and allocate VF-Reps during error recovery.

2021-04-11 Thread Michael Chan
From: Sriharsha Basavapatna During firmware recovery, VF-Rep configuration in the firmware is lost. Fix it by freeing and (re)allocating VF-Reps in FW at relevant points during the error recovery process. Signed-off-by: Sriharsha Basavapatna Signed-off-by: Michael Chan --- drivers/net

[PATCH net-next 0/5] bnxt_en: Error recovery fixes.

2021-04-11 Thread Michael Chan
This series adds some fixes and enhancements to the error recovery logic. The health register logic is improved and we also add missing code to free and re-create VF representors in the firmware after error recovery. Michael Chan (2): bnxt_en: Treat health register value 0 as valid in

[PATCH net-next 1/5] bnxt_en: Treat health register value 0 as valid in bnxt_try_reover_fw().

2021-04-11 Thread Michael Chan
The retry loop in bnxt_try_recover_fw() should not abort when the health register value is 0. It is a valid value that indicates the firmware is booting up. Fixes: 861aae786f2f ("bnxt_en: Enhance retry of the first message to the firmware.") Reviewed-by: Edwin Peer Signed-off-by: Mi

[PATCH net-next 2/5] bnxt_en: Invalidate health register mapping at the end of probe.

2021-04-11 Thread Michael Chan
("bnxt_en: Improve the status_reliable flag in bp->fw_health.") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/

Re: [PATCH rdma-next v1 5/5] net/bnxt: Use direct API instead of useless indirection

2021-03-29 Thread Michael Chan
On Mon, Mar 29, 2021 at 1:52 AM Leon Romanovsky wrote: > > From: Leon Romanovsky > > There is no need in any indirection complexity for one ULP user, > remove all this complexity in favour of direct calls to the exported > symbols. This allows us to greatly simplify the code. The goal is not to

[PATCH net-next 6/7] bnxt_en: Remove the read of BNXT_FW_RESET_INPROG_REG after firmware reset.

2021-03-22 Thread Michael Chan
value due to the above reason. Reading this register is for information purpose only so remove it. Reviewed-by: Edwin Peer Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 31 --- 1 file changed, 11 insertions

[PATCH net-next 7/7] bnxt_en: Enhance retry of the first message to the firmware.

2021-03-22 Thread Michael Chan
to retry for this case as well. Reviewed-by: Edwin Peer Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 +++-- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 4 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt

[PATCH net-next 4/7] bnxt_en: check return value of bnxt_hwrm_func_resc_qcaps

2021-03-22 Thread Michael Chan
From: Scott Branden Check return value of call to bnxt_hwrm_func_resc_qcaps in bnxt_hwrm_if_change and return failure on error. Reviewed-by: Edwin Peer Signed-off-by: Scott Branden Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 - 1 file changed, 4

[PATCH net-next 3/7] bnxt_en: don't fake firmware response success when PCI is disabled

2021-03-22 Thread Michael Chan
, the pci_disable_device() when firmware is fatally wounded in bnxt_fw_reset_close() does not need to be addressed, as subsequent commands are already expected to fail due to the BNXT_NO_FW_ACCESS() check in bnxt_hwrm_do_send_msg(). Reviewed-by: Scott Branden Signed-off-by: Edwin Peer Signed-off-by: Michael

[PATCH net-next 5/7] bnxt_en: Set BNXT_STATE_FW_RESET_DET flag earlier for the RDMA driver.

2021-03-22 Thread Michael Chan
RDMA driver. The RDMA driver's stop sequence is different if firmware has gone through a reset. Reviewed-by: Pavan Chebbi Reviewed-by: P B S Naresh Kumar Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

[PATCH net-next 1/7] bnxt_en: Improve the status_reliable flag in bp->fw_health.

2021-03-22 Thread Michael Chan
ause a potential fw reset will reset the mapping. Similarly, we need to do the same after firmware reset during recovery. We'll remap it during ifup. Reviewed-by: Edwin Peer Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/

[PATCH net-next 2/7] bnxt_en: Improve wait for firmware commands completion

2021-03-22 Thread Michael Chan
come out of reset during error recovery. Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 28 +++ drivers/net/ethernet/broadcom/bnxt/bnxt.h | 5 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a

[PATCH net-next 0/7] bnxt_en: Error recovery improvements.

2021-03-22 Thread Michael Chan
essage. 4. Set the proper flag early to let the RDMA driver know that firmware reset has been detected. Edwin Peer (1): bnxt_en: don't fake firmware response success when PCI is disabled Michael Chan (3): bnxt_en: Improve the status_reliable flag in bp->fw_health. bnxt_en: Set BNXT_

[PATCH net 2/2] bnxt_en: reliably allocate IRQ table on reset to avoid crash

2021-02-26 Thread Michael Chan
cause more drastic recovery at the next attempt to re-open the device, including a call to bnxt_init_int_mode(). Fixes: 3bc7d4a352ef ("bnxt_en: Add BNXT_STATE_IN_FW_RESET state.") Reviewed-by: Scott Branden Signed-off-by: Edwin Peer Signed-off-by: Michael Chan --- drivers/net/ether

[PATCH net 1/2] bnxt_en: Fix race between firmware reset and driver remove.

2021-02-26 Thread Michael Chan
lize after aborted reset") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index a680fd9c68e

[PATCH net 0/2] bnxt_en: Error recovery bug fixes.

2021-02-26 Thread Michael Chan
Two error recovery related bug fixes for 2 corner cases. Please queue patch #2 for -stable. Thanks. Edwin Peer (1): bnxt_en: reliably allocate IRQ table on reset to avoid crash Vasundhara Volam (1): bnxt_en: Fix race between firmware reset and driver remove. drivers/net/ethernet/broadcom/

[PATCH net-next 3/7] bnxt_en: Implement faster recovery for firmware fatal error.

2021-02-14 Thread Michael Chan
ee if the firmware has come out of reset. As soon as this register changes value we can proceed to re-initialize the device. Reviewed-by: Edwin Peer Reviewed-by: Vasundhara Volam Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c

[PATCH net-next 7/7] bnxt_en: Improve logging of error recovery settings information.

2021-02-14 Thread Michael Chan
count value from hexadecimal to decimal. Reviewed-by: Edwin Peer Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b

[PATCH net-next 6/7] bnxt_en: Reply to firmware's echo request async message.

2021-02-14 Thread Michael Chan
the async message. If the firmware is not getting the reply with the proper data after some retries, error recovery will kick in. Reviewed-by: Andy Gospodarek Reviewed-by: Edwin Peer Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 29

[PATCH net-next 5/7] bnxt_en: Initialize "context kind" field for context memory blocks.

2021-02-14 Thread Michael Chan
If it is older firmware and the information is not available, we set the offset to an invalid value and fall back to the old behavior of initializing every byte. Otherwise, we initialize only the "context kind" byte at the offset. Reviewed-by: Edwin Peer Signed-off-by: Michael Chan

[PATCH net-next 1/7] bnxt_en: Update firmware interface spec to 1.10.2.16.

2021-02-14 Thread Michael Chan
The main changes are the echo request/response from firmware for error detection and the NO_FCS feature to transmit frames without FCS. Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h | 105

[PATCH net-next 4/7] bnxt_en: Add context memory initialization infrastructure.

2021-02-14 Thread Michael Chan
emset() to initialize all relevant context memory. Reviewed-by: Pavan Chebbi Reviewed-by: Edwin Peer Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 52 --- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 19 - 2 files changed, 53 insertions(

[PATCH net-next 2/7] bnxt_en: selectively allocate context memories

2021-02-14 Thread Michael Chan
memory based on device capabilities and only enable backing store for the appropriate contexts. Signed-off-by: Edwin Peer Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 84 ++- 1 file changed, 52 insertions(+), 32 deletions(-) diff --git a/drivers

[PATCH net-next 0/7] bnxt_en: Error recovery optimizations.

2021-02-14 Thread Michael Chan
. Edwin Peer (1): bnxt_en: selectively allocate context memories Michael Chan (6): bnxt_en: Update firmware interface spec to 1.10.2.16. bnxt_en: Implement faster recovery for firmware fatal error. bnxt_en: Add context memory initialization infrastructure. bnxt_en: Initialize "context

[PATCH net 0/2] bnxt_en: 2 bug fixes.

2021-02-10 Thread Michael Chan
Two unrelated fixes. The first one fixes intermittent false TX timeouts during ring reconfigurations. The second one fixes a formatting discrepancy between the stored and the running FW versions. Please also queue these for -stable. Thanks. Edwin Peer (1): bnxt_en: reverse order of TX disabl

[PATCH net 2/2] bnxt_en: Fix devlink info's stored fw.psid version format.

2021-02-10 Thread Michael Chan
("bnxt_en: Add stored FW version info to devlink info_get cb.") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/bro

[PATCH net 1/2] bnxt_en: reverse order of TX disable and carrier off

2021-02-10 Thread Michael Chan
: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Signed-off-by: Edwin Peer Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/ne

[PATCH net-next] bnxt_en: Convert to use netif_level() helpers.

2021-01-25 Thread Michael Chan
Use the various netif_level() helpers to simplify the C code. This was suggested by Joe Perches. Cc: Joe Perches Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 34 ++- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/drivers/net

Re: [PATCH net-next] tg3: improve PCI VPD access

2021-01-25 Thread Michael Chan
ng over pci_read_vpd(). If we miss the > 125ms timeout per VPD dword read then definitely something is wrong, > and if the tg3 module loading is killed then there's also not much > benefit in retrying the VPD read. > > Signed-off-by: Heiner Kallweit Reviewed-by: Michael Ch

Re: [pull request][net-next V10 00/14] Add mlx5 subfunction support

2021-01-25 Thread Michael Chan
On Mon, Jan 25, 2021 at 12:09 PM Edwin Peer wrote: > > On Mon, Jan 25, 2021 at 11:49 AM Jason Gunthorpe wrote: > > > I've never seen someone implement a NumVF > 256 by co-opting the bus > > number. > > Usually the VF offset already places the VF routing IDs into a > different bus number range fro

[PATCH net-next 00/15] bnxt_en: Error recovery improvements.

2021-01-25 Thread Michael Chan
reinitialize after aborted reset Michael Chan (9): bnxt_en: Update firmware interface to 1.10.2.11. bnxt_en: Define macros for the various health register states. bnxt_en: Retry sending the first message to firmware if it is under reset. bnxt_en: Add bnxt_fw_reset_timeout() helper. bnxt_en

[PATCH net-next 01/15] bnxt_en: Update firmware interface to 1.10.2.11.

2021-01-25 Thread Michael Chan
added to the structure are not used yet. Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 +- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 + drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h | 249 ++ 3 files changed, 203 insertions(+), 53

[PATCH net-next 05/15] bnxt_en: Move reading VPD info after successful handshake with fw.

2021-01-24 Thread Michael Chan
d-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index c460dd796c1c..2fb9873e0162 1

[PATCH net-next 09/15] bnxt_en: Retry open if firmware is in reset.

2021-01-24 Thread Michael Chan
From: Vasundhara Volam Firmware may be in the middle of reset when the driver tries to do ifup. In that case, firmware will return a special error code and the driver will retry 10 times with 50 msecs delay after each retry. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan

[PATCH net-next 13/15] bnxt_en: Improve firmware fatal error shutdown sequence.

2021-01-24 Thread Michael Chan
the chip goes into core reset. Reviewed-by: Edwin Peer Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers

[PATCH net-next 10/15] bnxt_en: Add bnxt_fw_reset_timeout() helper.

2021-01-24 Thread Michael Chan
This code to check if we have reached the maximum wait time after firmware reset is used multiple times. Add a helper function to do this. Reviewed-by: Edwin Peer Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 15 +-- 1 file changed, 9 insertions(+), 6

[PATCH net-next 03/15] bnxt_en: handle CRASH_NO_MASTER during bnxt_open()

2021-01-24 Thread Michael Chan
. Signed-off-by: Edwin Peer Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 67 +-- 1 file changed, 39 insertions(+), 28 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 5daef6801512

[PATCH net-next 14/15] bnxt_en: Consolidate firmware reset event logging.

2021-01-24 Thread Michael Chan
Combine the three netdev_warn() calls into a single call, printed at the NETIF_MSG_HW log level. Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a

[PATCH net-next 15/15] bnxt_en: Do not process completion entries after fatal condition detected.

2021-01-24 Thread Michael Chan
proceed in the NAPI poll function if fatal condition is detected. Call napi_complete() and return without arming interrupts. Cleanup of all rings and reset are imminent. Reviewed-by: Pavan Chebbi Reviewed-by: Vasundhara Volam Reviewed-by: Edwin Peer Signed-off-by: Michael Chan --- drivers/net

[PATCH net-next 02/15] bnxt_en: Define macros for the various health register states.

2021-01-24 Thread Michael Chan
Define macros to check for the various states in the lower 16 bits of the health register. Replace the C code that checks for these values with the newly defined macros. Reviewed-by: Edwin Peer Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 10

[PATCH net-next 04/15] bnxt_en: Retry sending the first message to firmware if it is under reset.

2021-01-24 Thread Michael Chan
is not ready and not in error state. Reviewed-by: Edwin Peer Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 42 +++ drivers/net/ethernet/broadcom/bnxt/bnxt.h | 7 2 files changed, 42 insertions(+), 7 deletions(-) diff --git a/drivers/net

[PATCH net-next 12/15] bnxt_en: Modify bnxt_disable_int_sync() to be called more than once.

2021-01-24 Thread Michael Chan
In the event of a fatal firmware error, we want to disable IRQ early in the recovery sequence. This change will allow it to be called safely again as part of the normal shutdown sequence. Reviewed-by: Edwin Peer Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net

[PATCH net-next 11/15] bnxt_en: Add a new BNXT_STATE_NAPI_DISABLED flag to keep track of NAPI state.

2021-01-24 Thread Michael Chan
will disable NAPI again and the flag will prevent disabling NAPI twice. Reviewed-by: Pavan Chebbi Reviewed-by: Andy Gospodarek Reviewed-by: Edwin Peer Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 +++- drivers/net/ethernet/broadcom

[PATCH net-next 08/15] bnxt_en: attempt to reinitialize after aborted reset

2021-01-24 Thread Michael Chan
Peer Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 29 +-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index c8c25f7644ae..7f30a9fee0c8 100644

[PATCH net-next 07/15] bnxt_en: log firmware debug notifications

2021-01-24 Thread Michael Chan
-by: Edwin Peer Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index c06c5f81f087..c8c25f7644ae 100644 --- a/drivers/net

[PATCH net-next 06/15] bnxt_en: Add an upper bound for all firmware command timeouts.

2021-01-24 Thread Michael Chan
really long and it can cause hung task warnings if firmware has crashed or is not responding. To avoid such long delays, cap all firmware commands to a max timeout value of 40 seconds. Reviewed-by: Edwin Peer Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet

[PATCH net 1/2] bnxt_en: Improve stats context resource accounting with RDMA driver loaded.

2021-01-11 Thread Michael Chan
for extra stats contexts only if the RDMA driver is registered and MSIX vectors have been successfully requested. Fixes: c027c6b4e91f ("bnxt_en: get rid of num_stat_ctxs variable") Reviewed-by: Yongping Zhang Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan --- drivers/ne

[PATCH net 2/2] bnxt_en: Clear DEFRAG flag in firmware message when retry flashing.

2021-01-11 Thread Michael Chan
: 1432c3f6a6ca ("bnxt_en: Retry installing FW package under NO_SPACE error condition.") Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/etherne

[PATCH net 0/2] bnxt_en: Bug fixes.

2021-01-11 Thread Michael Chan
This series has 2 fixes. The first one fixes a resource accounting error with the RDMA driver loaded and the second one fixes the firmware flashing sequence after defragmentation. Please queue the 1st one for -stable. Thanks. Michael Chan (1): bnxt_en: Improve stats context resource

[PATCH net 2/2] bnxt_en: Check TQM rings for maximum supported value.

2020-12-27 Thread Michael Chan
may request more than 9 TQM rings. Define macros to remove the magic number 9 from the C code. Fixes: ac3158cb0108 ("bnxt_en: Allocate TQM ring context memory according to fw specification.") Reviewed-by: Pavan Chebbi Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan --- d

[PATCH net 1/2] bnxt_en: Fix AER recovery.

2020-12-27 Thread Michael Chan
er Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 31 ++- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bn

[PATCH net 0/2] bnxt_en: Bug fixes.

2020-12-27 Thread Michael Chan
The first patch fixes recovery of fatal AER errors. The second one fixes a potential array out of bounds issue. Please queue for -stable. Thanks. Michael Chan (1): bnxt_en: Check TQM rings for maximum supported value. Vasundhara Volam (1): bnxt_en: Fix AER recovery. drivers/net/ethernet

[PATCH net-next 0/5] bnxt_en: Improve firmware flashing.

2020-12-13 Thread Michael Chan
smaller buffer to DMA the contents in multiple DMA operations. Michael Chan (2): bnxt_en: Rearrange the logic in bnxt_flash_package_from_fw_obj(). bnxt_en: Enable batch mode when using HWRM_NVM_MODIFY to flash packages. Pavan Chebbi (3): bnxt_en: Refactor bnxt_flash_nvram. bnxt_en

[PATCH net-next 3/5] bnxt_en: Restructure bnxt_flash_package_from_fw_obj() to execute in a loop.

2020-12-13 Thread Michael Chan
be added in the next patch. Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan --- .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 60 +-- 1 file changed, 28 insertions(+), 32 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net

[PATCH net-next 1/5] bnxt_en: Refactor bnxt_flash_nvram.

2020-12-13 Thread Michael Chan
-off-by: Michael Chan --- .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 51 --- 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c index 7b444fcb6289..11edf4998de7

[PATCH net-next 2/5] bnxt_en: Rearrange the logic in bnxt_flash_package_from_fw_obj().

2020-12-13 Thread Michael Chan
This function will be modified in the next patch to retry flashing the firmware in a loop. To facilate that, we rearrange the code so that the steps that only need to be done once before the loop will be moved to the top of the function. Signed-off-by: Michael Chan --- .../net/ethernet

[PATCH net-next 4/5] bnxt_en: Retry installing FW package under NO_SPACE error condition.

2020-12-13 Thread Michael Chan
-by: Vasundhara Volam Reviewed-by: Edwin Peer Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan --- .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 37 --- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b

[PATCH net-next 5/5] bnxt_en: Enable batch mode when using HWRM_NVM_MODIFY to flash packages.

2020-12-13 Thread Michael Chan
-by: Edwin Peer Signed-off-by: Michael Chan --- .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 49 +++ 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c index

Re: NETDEV WATCHDOG: s1p1 (bnxt_en): transmit queue 2 timed out

2020-11-30 Thread Michael Chan
On Mon, Nov 30, 2020 at 9:37 AM Marc Smith wrote: > > On Sun, Nov 29, 2020 at 2:04 AM Michael Chan > wrote: > > > > On Wed, Nov 25, 2020 at 11:39 AM Marc Smith wrote: > > > > > [17879.279213] bnxt_en :01:09.0 s1p1: TX timeout detected, > >

Re: NETDEV WATCHDOG: s1p1 (bnxt_en): transmit queue 2 timed out

2020-11-28 Thread Michael Chan
On Wed, Nov 25, 2020 at 11:39 AM Marc Smith wrote: > [17879.279213] bnxt_en :01:09.0 s1p1: TX timeout detected, > starting reset task! > [17883.075299] bnxt_en :01:09.0 s1p1: Resp cmpl intr err msg: 0x51 > [17883.075302] bnxt_en :01:09.0 s1p1: hwrm_ring_free type 1 > failed. rc:ff

[PATCH net] bnxt_en: Release PCI regions when DMA mask setup fails during probe.

2020-11-19 Thread Michael Chan
Jump to init_err_release to cleanup. bnxt_unmap_bars() will also be called but it will do nothing if the BARs are not mapped yet. Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Reported-by: Jakub Kicinski Signed-off-by: Michael Chan --- drivers/net/ethernet/bro

Re: [PATCH net] bnxt_en: fix error return code in bnxt_init_board()

2020-11-19 Thread Michael Chan
On Thu, Nov 19, 2020 at 9:53 PM Jakub Kicinski wrote: > > On Thu, 19 Nov 2020 10:53:23 -0800 Edwin Peer wrote: > > > Fix to return a negative error code from the error handling > > > case instead of 0, as done elsewhere in this function. > > > > > > Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethe

Re: [PATCH net] net: b44: fix error return code in b44_init_one()

2020-11-16 Thread Michael Chan
ted-by: Hulk Robot > Signed-off-by: Zhang Changzhong Reviewed-by: Michael Chan Thanks. smime.p7s Description: S/MIME Cryptographic Signature

[PATCH net 4/4] bnxt_en: Avoid unnecessary NVM_GET_DEV_INFO cmd error log on VFs.

2020-11-15 Thread Michael Chan
From: Vasundhara Volam VFs do not have access permissions to issue NVM_GET_DEV_INFO firmware command. Fixes: 4933f6753b50 ("bnxt_en: Add bnxt_hwrm_nvm_get_dev_info() to query NVM info.") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/bro

[PATCH net 2/4] bnxt_en: Free port stats during firmware reset.

2020-11-15 Thread Michael Chan
hara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 7975f59735d6..448e1ba762ee 100644 --- a/drivers/ne

[PATCH net 3/4] bnxt_en: Fix counter overflow logic.

2020-11-15 Thread Michael Chan
passed into bnxt_add_one_ctr(). Fixes: fea6b3335527 ("bnxt_en: Accumulate all counters.") Reviewed-by: Vasundhara Volam Reviewed-by: Pavan Chebbi Reviewed-by: Edwin Peer Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 + 1 file changed, 1 insertion(+)

[PATCH net 0/4] bnxt_en: Bug fixes.

2020-11-15 Thread Michael Chan
using page 0 Michael Chan (2): bnxt_en: Free port stats during firmware reset. bnxt_en: Fix counter overflow logic. Vasundhara Volam (1): bnxt_en: Avoid unnecessary NVM_GET_DEV_INFO cmd error log on VFs. drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 +++- drivers/net/ethernet

[PATCH net 1/4] bnxt_en: read EEPROM A2h address using page 0

2020-11-15 Thread Michael Chan
address space. Fixes: 42ee18fe4ca2 ("bnxt_en: Add Support for ETHTOOL_GMODULEINFO and ETHTOOL_GMODULEEEPRO") Signed-off-by: Edwin Peer Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d

[PATCH net 4/5] bnxt_en: Check abort error state in bnxt_open_nic().

2020-10-25 Thread Michael Chan
00 00 c7 [ 1648.681986] RIP [] bnxt_alloc_mem+0x50a/0x1140 [bnxt_en] [ 1648.682724] RSP [ 1648.683451] CR2: Fixes: ec5d31e3c15d ("bnxt_en: Handle firmware reset status during IF_UP.") Reviewed-by: Vasundhara Volam Reviewed-by: Pavan Chebbi Signed-off-by: Michael Ch

[PATCH net 2/5] bnxt_en: Invoke cancel_delayed_work_sync() for PFs also.

2020-10-25 Thread Michael Chan
hara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index e4e5ea080391..7be232018015 100644 -

[PATCH net 3/5] bnxt_en: Re-write PCI BARs after PCI fatal error.

2020-10-25 Thread Michael Chan
Enable AER support.") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 19 ++- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 + 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom

[PATCH net 0/5] bnxt_en: Bug fixes.

2020-10-25 Thread Michael Chan
check for firmware reset abort error. The last one sends the fw reset command unconditionally to fix the AER reset logic. Please queue these for -stable as well. Thanks. Michael Chan (1): bnxt_en: Check abort error state in bnxt_open_nic(). Vasundhara Volam (4): bnxt_en: Fix regression in

[PATCH net 1/5] bnxt_en: Fix regression in workqueue cleanup logic in bnxt_remove_one().

2020-10-25 Thread Michael Chan
sh in bnxt_fw_reset_task()") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/b

[PATCH net 5/5] bnxt_en: Send HWRM_FUNC_RESET fw command unconditionally.

2020-10-25 Thread Michael Chan
: Avoid sending firmware messages when AER error is detected.") Reviewed-by: Edwin Peer Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/bro

[PATCH net-next v2 5/9] bnxt_en: Log event_data1 and event_data2 when handling RESET_NOTIFY event.

2020-10-12 Thread Michael Chan
Log these values that contain useful firmware state information. Reviewed-by: Edwin Peer Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b

[PATCH net-next v2 7/9] bnxt_en: Add bnxt_hwrm_nvm_get_dev_info() to query NVM info.

2020-10-12 Thread Michael Chan
firmware versions. Reviewed-by: Andy Gospodarek Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c| 12 drivers/net/ethernet/broadcom/bnxt/bnxt.h| 1 + .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c| 16

[PATCH net-next v2 4/9] bnxt_en: Simplify bnxt_async_event_process().

2020-10-12 Thread Michael Chan
event_data1 and event_data2 are used when processing most events. Store these in local variables at the beginning of the function to simplify many of the case statements. Reviewed-by: Edwin Peer Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 12 +++- 1 file

[PATCH net-next v2 3/9] bnxt_en: Set driver default message level.

2020-10-12 Thread Michael Chan
be very noisy. Reviewed-by: Edwin Peer Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/b

[PATCH net-next v2 1/9] bnxt_en: Return -EROFS to user space, if NVM writes are not permitted.

2020-10-12 Thread Michael Chan
From: Vasundhara Volam If NVRAM resources are locked, NVM writes are not permitted. In such scenarios, firmware returns HWRM_ERR_CODE_RESOURCE_LOCKED error to firmware commands. Reviewed-by: Edwin Peer Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet

[PATCH net-next v2 8/9] bnxt_en: Refactor bnxt_dl_info_get().

2020-10-12 Thread Michael Chan
string is NULL terminated when copied to devlink. Return directly from the last call to bnxt_dl_info_put(). Reviewed-by: Pavan Chebbi Reviewed-by: Andy Gospodarek Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- .../net/ethernet/broadcom/bnxt/bnxt_devlink.c | 113

[PATCH net-next v2 0/9] bnxt_en: Updates for net-next.

2020-10-12 Thread Michael Chan
: Change bnxt_reset_task() to silent mode. Patch 8 & 9: Ensure we copy NULL terminated fw strings to devlink. Patch 8 & 9: Return directly after the last bnxt_dl_info_put() call. Patch 9: If FW call to get stored dev info fails, return success to devlink without the stored versions.

[PATCH net-next v2 6/9] bnxt_en: Log unknown link speed appropriately.

2020-10-12 Thread Michael Chan
hara Volam Reviewed-by: Edwin Peer Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 877efaf302ad..78bf636e6

[PATCH net-next v2 9/9] bnxt_en: Add stored FW version info to devlink info_get cb.

2020-10-12 Thread Michael Chan
ast call to bnxt_dl_info_put(). If the FW call to get stored version fails for any reason, return success immediately to devlink without the stored versions. Reviewed-by: Andy Gospodarek Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- .../net/ethernet/broadcom/bnxt/bnxt_devlink.c |

[PATCH net-next v2 2/9] bnxt_en: Enable online self tests for multi-host/NPAR mode.

2020-10-12 Thread Michael Chan
From: Vasundhara Volam Online self tests are not disruptive and can be run in NPAR mode and in multi-host NIC as well. Reviewed-by: Edwin Peer Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 8 1 file changed, 4

Re: [PATCH net-next 8/9] bnxt_en: Refactor bnxt_dl_info_get().

2020-10-11 Thread Michael Chan
On Sun, Oct 11, 2020 at 2:59 PM Jakub Kicinski wrote: > > On Sun, 11 Oct 2020 06:23:00 -0400 Michael Chan wrote: > > +static int bnxt_dl_info_put(struct bnxt *bp, struct devlink_info_req *req, > > + enum bnxt_dl_version_type typ

Re: [PATCH net-next 9/9] bnxt_en: Add stored FW version info to devlink info_get cb.

2020-10-11 Thread Michael Chan
On Sun, Oct 11, 2020 at 3:02 PM Jakub Kicinski wrote: > > On Sun, 11 Oct 2020 06:23:01 -0400 Michael Chan wrote: > > + rc = bnxt_hwrm_nvm_get_dev_info(bp, &nvm_dev_info); > > + if (rc) > > + return rc; > > This will not cause an error to be re

Re: [PATCH net-next 3/9] bnxt_en: Set driver default message level.

2020-10-11 Thread Michael Chan
On Sun, Oct 11, 2020 at 2:53 PM Jakub Kicinski wrote: > > I'm talking about bnxt_dbg_dump_states specifically. > > I'm looking at net-next: > > bnxt_rx_pkt >bnxt_sched_reset > set_bit(BNXT_RESET_TASK_SP_EVENT, &bp->sp_event); > > > bnxt_sp_task >bnxt_reset > bnxt_reset_task >

Re: [PATCH net-next 3/9] bnxt_en: Set driver default message level.

2020-10-11 Thread Michael Chan
On Sun, Oct 11, 2020 at 12:34 PM Jakub Kicinski wrote: > > On Sun, 11 Oct 2020 06:22:55 -0400 Michael Chan wrote: > > Currently, bp->msg_enable has default value of 0. It is more useful > > to have the commonly used NETIF_MSG_DRV and NETIF_MSG_HW enabled by > > d

[PATCH net-next 2/9] bnxt_en: Enable online self tests for multi-host/NPAR mode.

2020-10-11 Thread Michael Chan
From: Vasundhara Volam Online self tests are not disruptive and can be run in NPAR mode and in multi-host NIC as well. Reviewed-by: Edwin Peer Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 8 1 file changed, 4

[PATCH net-next 8/9] bnxt_en: Refactor bnxt_dl_info_get().

2020-10-11 Thread Michael Chan
Reviewed-by: Andy Gospodarek Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- .../net/ethernet/broadcom/bnxt/bnxt_devlink.c | 112 ++ .../net/ethernet/broadcom/bnxt/bnxt_devlink.h | 6 + 2 files changed, 70 insertions(+), 48 deletions(-) diff --git a/drivers/net

[PATCH net-next 5/9] bnxt_en: Log event_data1 and event_data2 when handling RESET_NOTIFY event.

2020-10-11 Thread Michael Chan
Log these values that contain useful firmware state information. Reviewed-by: Edwin Peer Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b

[PATCH net-next 4/9] bnxt_en: Simplify bnxt_async_event_process().

2020-10-11 Thread Michael Chan
event_data1 and event_data2 are used when processing most events. Store these in local variables at the beginning of the function to simplify many of the case statements. Reviewed-by: Edwin Peer Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 12 +++- 1 file

[PATCH net-next 3/9] bnxt_en: Set driver default message level.

2020-10-11 Thread Michael Chan
Currently, bp->msg_enable has default value of 0. It is more useful to have the commonly used NETIF_MSG_DRV and NETIF_MSG_HW enabled by default. Reviewed-by: Edwin Peer Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 ++ 1 f

[PATCH net-next 9/9] bnxt_en: Add stored FW version info to devlink info_get cb.

2020-10-11 Thread Michael Chan
From: Vasundhara Volam This patch adds FW versions stored in the flash to devlink info_get callback. Return the correct fw.psid running version using the newly added bp->nvm_cfg_ver. Reviewed-by: Andy Gospodarek Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- .../

  1   2   3   4   5   6   7   8   9   10   >