diff mbox series

[net-next,7/7] bnxt_en: Add warning message about disallowed speed change

Message ID 20240401035730.306790-8-pavan.chebbi@broadcom.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series bnxt_en: Update for net-next | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 943 this patch: 943
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/build_clang success Errors and warnings before: 954 this patch: 954
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 956 this patch: 956
netdev/checkpatch warning WARNING: line length of 100 exceeds 80 columns
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-04-01--06-00 (tests: 952)

Commit Message

Pavan Chebbi April 1, 2024, 3:57 a.m. UTC
From: Sreekanth Reddy <sreekanth.reddy@broadcom.com>

Some chips may not allow changing default speed when dual rate
transceivers modules are used. Firmware on those chips will
indicate the same to the driver.

Add a warning message when speed change is not supported
because a dual rate transceiver is detected by the NIC.

Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Jakub Kicinski April 2, 2024, 4:54 a.m. UTC | #1
On Sun, 31 Mar 2024 20:57:30 -0700 Pavan Chebbi wrote:
> +		netdev_warn(bp->dev,
> +			    "Speed change not supported with dual rate transceivers on this board\n"
> +			    );

closing bracket goes on the end of the previous line
Pavan Chebbi April 2, 2024, 6:21 a.m. UTC | #2
On Tue, Apr 2, 2024 at 10:24 AM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Sun, 31 Mar 2024 20:57:30 -0700 Pavan Chebbi wrote:
> > +             netdev_warn(bp->dev,
> > +                         "Speed change not supported with dual rate transceivers on this board\n"
> > +                         );
>
> closing bracket goes on the end of the previous line

Thanks for all the comments, will get back with v2.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 1494b550299a..e64c681e2be8 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -2525,6 +2525,11 @@  static bool bnxt_event_error_report(struct bnxt *bp, u32 data1, u32 data2)
 		}
 		return false;
 	}
+	case ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_DUAL_DATA_RATE_NOT_SUPPORTED:
+		netdev_warn(bp->dev,
+			    "Speed change not supported with dual rate transceivers on this board\n"
+			    );
+		break;
 	default:
 		netdev_err(bp->dev, "FW reported unknown error type %u\n",
 			   err_type);