New adaptors (for instance, Medford4) come with netport MCDI
and also support new link change events, however, older ones
can also be generated. For consistency, ignore legacy events.

Signed-off-by: Ivan Malov <ivan.ma...@arknetworks.am>
Reviewed-by: Andy Moreton <andy.more...@amd.com>
Reviewed-by: Pieter Jansen Van Vuuren <pieter.jansen-van-vuu...@amd.com>
---
 drivers/common/sfc_efx/base/ef10_ev.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/common/sfc_efx/base/ef10_ev.c 
b/drivers/common/sfc_efx/base/ef10_ev.c
index 011ef49de7..82a2284f2b 100644
--- a/drivers/common/sfc_efx/base/ef10_ev.c
+++ b/drivers/common/sfc_efx/base/ef10_ev.c
@@ -907,6 +907,16 @@ ef10_ev_mcdi(
 #endif /* EFSYS_OPT_MCDI_PROXY_AUTH_SERVER */
 
        case MCDI_EVENT_CODE_LINKCHANGE_V2:
+               if (efx_np_supported(enp) != B_FALSE) {
+                       /*
+                        * Netport MCDI capable NICs support new link change
+                        * events, but legacy LINKCHANGE_V2 events may still
+                        * show up should the firmware support them. For the
+                        * sake of consistency, ignore LINKCHANGE_V2 events.
+                        */
+                       break;
+               }
+
                ev_is_v2 = B_TRUE;
                /* Fallthrough */
        case MCDI_EVENT_CODE_LINKCHANGE: {
-- 
2.39.5

Reply via email to