* [PATCH net-next v1] mlxbf_gige: clear valid_polarity upon open
@ 2021-09-13 15:57 David Thompson
2021-09-13 23:04 ` Jakub Kicinski
0 siblings, 1 reply; 2+ messages in thread
From: David Thompson @ 2021-09-13 15:57 UTC (permalink / raw)
To: davem, kuba; +Cc: netdev, David Thompson, Asmaa Mnebhi
This patch ensures that the driver's valid_polarity
is cleared during the open() method so that it always
matches the receive polarity used by hardware.
Reviewed-by: Asmaa Mnebhi <asmaa@nvidia.com>
Signed-off-by: David Thompson <davthompson@nvidia.com>
---
drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
index 3e85b17f5857..6704f5c1aa32 100644
--- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
@@ -142,6 +142,13 @@ static int mlxbf_gige_open(struct net_device *netdev)
err = mlxbf_gige_clean_port(priv);
if (err)
goto free_irqs;
+
+ /* Clear driver's valid_polarity to match hardware,
+ * since the above call to clean_port() resets the
+ * receive polarity used by hardware.
+ */
+ priv->valid_polarity = 0;
+
err = mlxbf_gige_rx_init(priv);
if (err)
goto free_irqs;
--
2.30.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next v1] mlxbf_gige: clear valid_polarity upon open
2021-09-13 15:57 [PATCH net-next v1] mlxbf_gige: clear valid_polarity upon open David Thompson
@ 2021-09-13 23:04 ` Jakub Kicinski
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2021-09-13 23:04 UTC (permalink / raw)
To: David Thompson; +Cc: davem, netdev, Asmaa Mnebhi
On Mon, 13 Sep 2021 11:57:11 -0400 David Thompson wrote:
> This patch ensures that the driver's valid_polarity
> is cleared during the open() method so that it always
> matches the receive polarity used by hardware.
>
> Reviewed-by: Asmaa Mnebhi <asmaa@nvidia.com>
> Signed-off-by: David Thompson <davthompson@nvidia.com>
This looks like a fix, it should have a Fixes tag and target the
net tree instead of net-next.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-13 23:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-13 15:57 [PATCH net-next v1] mlxbf_gige: clear valid_polarity upon open David Thompson
2021-09-13 23:04 ` Jakub Kicinski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.