netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/3] Aquantia/Marvell atlantic bugfixes 2020/01
@ 2020-01-06 11:22 Igor Russkikh
  2020-01-06 11:22 ` [PATCH net 1/3] net: atlantic: broken link status on old fw Igor Russkikh
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Igor Russkikh @ 2020-01-06 11:22 UTC (permalink / raw)
  To: netdev; +Cc: David S . Miller, Igor Russkikh

Hi David,

Here is a set of recently discovered bugfixes,

Please integrate, thanks!

Igor Russkikh (3):
  net: atlantic: broken link status on old fw
  net: atlantic: loopback configuration in improper place
  net: atlantic: remove duplicate entries

 drivers/net/ethernet/aquantia/atlantic/aq_nic.c              | 4 ++--
 drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c    | 3 ---
 drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c | 4 +---
 3 files changed, 3 insertions(+), 8 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH net 1/3] net: atlantic: broken link status on old fw
  2020-01-06 11:22 [PATCH net 0/3] Aquantia/Marvell atlantic bugfixes 2020/01 Igor Russkikh
@ 2020-01-06 11:22 ` Igor Russkikh
  2020-01-06 11:22 ` [PATCH net 2/3] net: atlantic: loopback configuration in improper place Igor Russkikh
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Igor Russkikh @ 2020-01-06 11:22 UTC (permalink / raw)
  To: netdev; +Cc: David S . Miller, Igor Russkikh

Last code/checkpatch cleanup did a copy paste error where code from
firmware 3 API logic was moved to firmware 1 logic.

This resulted in FW1.x users would never see the link state as active.

Fixes: 7b0c342f1f67 ("net: atlantic: code style cleanup")
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
---
 drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c
index 8910b62e67ed..f547baa6c954 100644
--- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c
+++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c
@@ -667,9 +667,7 @@ int hw_atl_utils_mpi_get_link_status(struct aq_hw_s *self)
 	u32 speed;
 
 	mpi_state = hw_atl_utils_mpi_get_state(self);
-	speed = mpi_state & (FW2X_RATE_100M | FW2X_RATE_1G |
-			     FW2X_RATE_2G5 | FW2X_RATE_5G |
-			     FW2X_RATE_10G);
+	speed = mpi_state >> HW_ATL_MPI_SPEED_SHIFT;
 
 	if (!speed) {
 		link_status->mbps = 0U;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH net 2/3] net: atlantic: loopback configuration in improper place
  2020-01-06 11:22 [PATCH net 0/3] Aquantia/Marvell atlantic bugfixes 2020/01 Igor Russkikh
  2020-01-06 11:22 ` [PATCH net 1/3] net: atlantic: broken link status on old fw Igor Russkikh
@ 2020-01-06 11:22 ` Igor Russkikh
  2020-01-06 11:22 ` [PATCH net 3/3] net: atlantic: remove duplicate entries Igor Russkikh
  2020-01-06 22:06 ` [PATCH net 0/3] Aquantia/Marvell atlantic bugfixes 2020/01 David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: Igor Russkikh @ 2020-01-06 11:22 UTC (permalink / raw)
  To: netdev; +Cc: David S . Miller, Igor Russkikh

Initial loopback configuration should be called earlier, before
starting traffic on HW blocks. Otherwise depending on race conditions
it could be kept disabled.

Fixes: ea4b4d7fc106 ("net: atlantic: loopback tests via private flags")
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
---
 drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
index a17a4da7bc15..c85e3e29012c 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
@@ -403,6 +403,8 @@ int aq_nic_start(struct aq_nic_s *self)
 	if (err < 0)
 		goto err_exit;
 
+	aq_nic_set_loopback(self);
+
 	err = self->aq_hw_ops->hw_start(self->aq_hw);
 	if (err < 0)
 		goto err_exit;
@@ -413,8 +415,6 @@ int aq_nic_start(struct aq_nic_s *self)
 
 	INIT_WORK(&self->service_task, aq_nic_service_task);
 
-	aq_nic_set_loopback(self);
-
 	timer_setup(&self->service_timer, aq_nic_service_timer_cb, 0);
 	aq_nic_service_timer_cb(&self->service_timer);
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH net 3/3] net: atlantic: remove duplicate entries
  2020-01-06 11:22 [PATCH net 0/3] Aquantia/Marvell atlantic bugfixes 2020/01 Igor Russkikh
  2020-01-06 11:22 ` [PATCH net 1/3] net: atlantic: broken link status on old fw Igor Russkikh
  2020-01-06 11:22 ` [PATCH net 2/3] net: atlantic: loopback configuration in improper place Igor Russkikh
@ 2020-01-06 11:22 ` Igor Russkikh
  2020-01-06 22:06 ` [PATCH net 0/3] Aquantia/Marvell atlantic bugfixes 2020/01 David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: Igor Russkikh @ 2020-01-06 11:22 UTC (permalink / raw)
  To: netdev; +Cc: David S . Miller, Igor Russkikh

Function entries were duplicated accidentally, removing the dups.

Fixes: ea4b4d7fc106 ("net: atlantic: loopback tests via private flags")
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
---
 drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
index 58e891af6e09..ec041f78d063 100644
--- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
+++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
@@ -1525,9 +1525,6 @@ const struct aq_hw_ops hw_atl_ops_b0 = {
 	.rx_extract_ts           = hw_atl_b0_rx_extract_ts,
 	.extract_hwts            = hw_atl_b0_extract_hwts,
 	.hw_set_offload          = hw_atl_b0_hw_offload_set,
-	.hw_get_hw_stats         = hw_atl_utils_get_hw_stats,
-	.hw_get_fw_version       = hw_atl_utils_get_fw_version,
-	.hw_set_offload          = hw_atl_b0_hw_offload_set,
 	.hw_set_loopback         = hw_atl_b0_set_loopback,
 	.hw_set_fc               = hw_atl_b0_set_fc,
 };
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net 0/3] Aquantia/Marvell atlantic bugfixes 2020/01
  2020-01-06 11:22 [PATCH net 0/3] Aquantia/Marvell atlantic bugfixes 2020/01 Igor Russkikh
                   ` (2 preceding siblings ...)
  2020-01-06 11:22 ` [PATCH net 3/3] net: atlantic: remove duplicate entries Igor Russkikh
@ 2020-01-06 22:06 ` David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2020-01-06 22:06 UTC (permalink / raw)
  To: irusskikh; +Cc: netdev

From: Igor Russkikh <irusskikh@marvell.com>
Date: Mon, 6 Jan 2020 14:22:27 +0300

> Here is a set of recently discovered bugfixes,
> 
> Please integrate, thanks!

Series applied.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-01-06 22:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-06 11:22 [PATCH net 0/3] Aquantia/Marvell atlantic bugfixes 2020/01 Igor Russkikh
2020-01-06 11:22 ` [PATCH net 1/3] net: atlantic: broken link status on old fw Igor Russkikh
2020-01-06 11:22 ` [PATCH net 2/3] net: atlantic: loopback configuration in improper place Igor Russkikh
2020-01-06 11:22 ` [PATCH net 3/3] net: atlantic: remove duplicate entries Igor Russkikh
2020-01-06 22:06 ` [PATCH net 0/3] Aquantia/Marvell atlantic bugfixes 2020/01 David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).