linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: atlantic: Add support for firmware v4
@ 2020-07-07  6:38 Kai-Heng Feng
  2020-07-07  8:46 ` Alexander Lobakin
  0 siblings, 1 reply; 5+ messages in thread
From: Kai-Heng Feng @ 2020-07-07  6:38 UTC (permalink / raw)
  To: irusskikh
  Cc: anthony.wong, Kai-Heng Feng, David S. Miller, Jakub Kicinski,
	Nikita Danilov, Mark Starovoytov, Dmitry Bezrukov,
	open list:AQUANTIA ETHERNET DRIVER (atlantic),
	open list

We have a new ethernet card that is supported by the atlantic driver:
01:00.0 Ethernet controller [0200]: Aquantia Corp. AQC107 NBase-T/IEEE 802.3bz Ethernet Controller [AQtion] [1d6a:07b1] (rev 02)

But the driver failed to probe the device:
kernel: atlantic: Bad FW version detected: 400001e
kernel: atlantic: probe of 0000:01:00.0 failed with error -95

As a pure guesswork, simply adding the firmware version to the driver
can make it function. Doing iperf3 as a smoketest doesn't show any
abnormality either.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c | 4 ++++
 1 file changed, 4 insertions(+)

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 73c0f41df8d8..0b4cd1c0e022 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
@@ -46,6 +46,7 @@
 #define HW_ATL_FW_VER_1X 0x01050006U
 #define HW_ATL_FW_VER_2X 0x02000000U
 #define HW_ATL_FW_VER_3X 0x03000000U
+#define HW_ATL_FW_VER_4X 0x0400001EU
 
 #define FORCE_FLASHLESS 0
 
@@ -81,6 +82,9 @@ int hw_atl_utils_initfw(struct aq_hw_s *self, const struct aq_fw_ops **fw_ops)
 	} else if (hw_atl_utils_ver_match(HW_ATL_FW_VER_3X,
 					  self->fw_ver_actual) == 0) {
 		*fw_ops = &aq_fw_2x_ops;
+	} else if (hw_atl_utils_ver_match(HW_ATL_FW_VER_4X,
+					  self->fw_ver_actual) == 0) {
+		*fw_ops = &aq_fw_2x_ops;
 	} else {
 		aq_pr_err("Bad FW version detected: %x\n",
 			  self->fw_ver_actual);
-- 
2.17.1


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

* Re: [PATCH] net: atlantic: Add support for firmware v4
  2020-07-07  6:38 [PATCH] net: atlantic: Add support for firmware v4 Kai-Heng Feng
@ 2020-07-07  8:46 ` Alexander Lobakin
  2020-07-07 10:02   ` Kai-Heng Feng
  2020-07-07 19:56   ` David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Alexander Lobakin @ 2020-07-07  8:46 UTC (permalink / raw)
  To: Kai-Heng Feng
  Cc: Alexander Lobakin, anthony.wong, Igor Russkikh, David S. Miller,
	Jakub Kicinski, Nikita Danilov, Mark Starovoytov,
	Dmitry Bezrukov, netdev, linux-kernel

From:   Kai-Heng Feng <kai.heng.feng@canonical.com>
Date:   Tue,  7 Jul 2020 14:38:28 +0800

> We have a new ethernet card that is supported by the atlantic driver:
> 01:00.0 Ethernet controller [0200]: Aquantia Corp. AQC107 NBase-T/IEEE 802.3bz Ethernet Controller [AQtion] [1d6a:07b1] (rev 02)
> 
> But the driver failed to probe the device:
> kernel: atlantic: Bad FW version detected: 400001e
> kernel: atlantic: probe of 0000:01:00.0 failed with error -95
> 
> As a pure guesswork, simply adding the firmware version to the driver

Please don't send "pure guessworks" to net-fixes tree. You should have
reported this as a bug to LKML and/or atlantic team, so we could issue
it.

> can make it function. Doing iperf3 as a smoketest doesn't show any
> abnormality either.
> 
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
>  drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> 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 73c0f41df8d8..0b4cd1c0e022 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
> @@ -46,6 +46,7 @@
>  #define HW_ATL_FW_VER_1X 0x01050006U
>  #define HW_ATL_FW_VER_2X 0x02000000U
>  #define HW_ATL_FW_VER_3X 0x03000000U
> +#define HW_ATL_FW_VER_4X 0x0400001EU
>  
>  #define FORCE_FLASHLESS 0
>  
> @@ -81,6 +82,9 @@ int hw_atl_utils_initfw(struct aq_hw_s *self, const struct aq_fw_ops **fw_ops)
>  	} else if (hw_atl_utils_ver_match(HW_ATL_FW_VER_3X,
>  					  self->fw_ver_actual) == 0) {
>  		*fw_ops = &aq_fw_2x_ops;
> +	} else if (hw_atl_utils_ver_match(HW_ATL_FW_VER_4X,
> +					  self->fw_ver_actual) == 0) {
> +		*fw_ops = &aq_fw_2x_ops;
>  	} else {
>  		aq_pr_err("Bad FW version detected: %x\n",
>  			  self->fw_ver_actual);
> -- 
> 2.17.1

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

* Re: [PATCH] net: atlantic: Add support for firmware v4
  2020-07-07  8:46 ` Alexander Lobakin
@ 2020-07-07 10:02   ` Kai-Heng Feng
  2020-07-07 19:56   ` David Miller
  1 sibling, 0 replies; 5+ messages in thread
From: Kai-Heng Feng @ 2020-07-07 10:02 UTC (permalink / raw)
  To: Alexander Lobakin
  Cc: Anthony Wong, Igor Russkikh, David S. Miller, Jakub Kicinski,
	Nikita Danilov, Mark Starovoytov, Dmitry Bezrukov, netdev,
	linux-kernel



> On Jul 7, 2020, at 16:46, Alexander Lobakin <alobakin@marvell.com> wrote:
> 
> From:   Kai-Heng Feng <kai.heng.feng@canonical.com>
> Date:   Tue,  7 Jul 2020 14:38:28 +0800
> 
>> We have a new ethernet card that is supported by the atlantic driver:
>> 01:00.0 Ethernet controller [0200]: Aquantia Corp. AQC107 NBase-T/IEEE 802.3bz Ethernet Controller [AQtion] [1d6a:07b1] (rev 02)
>> 
>> But the driver failed to probe the device:
>> kernel: atlantic: Bad FW version detected: 400001e
>> kernel: atlantic: probe of 0000:01:00.0 failed with error -95
>> 
>> As a pure guesswork, simply adding the firmware version to the driver
> 
> Please don't send "pure guessworks" to net-fixes tree.

Is matching a new firmware version really that different to matching a new PCI ID or USB ID?

> You should have
> reported this as a bug to LKML and/or atlantic team, so we could issue
> it.

Right, I'll wait for a new patch from atlantic team.

Kai-Heng

> 
>> can make it function. Doing iperf3 as a smoketest doesn't show any
>> abnormality either.
>> 
>> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
>> ---
>> drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>> 
>> 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 73c0f41df8d8..0b4cd1c0e022 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
>> @@ -46,6 +46,7 @@
>> #define HW_ATL_FW_VER_1X 0x01050006U
>> #define HW_ATL_FW_VER_2X 0x02000000U
>> #define HW_ATL_FW_VER_3X 0x03000000U
>> +#define HW_ATL_FW_VER_4X 0x0400001EU
>> 
>> #define FORCE_FLASHLESS 0
>> 
>> @@ -81,6 +82,9 @@ int hw_atl_utils_initfw(struct aq_hw_s *self, const struct aq_fw_ops **fw_ops)
>> 	} else if (hw_atl_utils_ver_match(HW_ATL_FW_VER_3X,
>> 					  self->fw_ver_actual) == 0) {
>> 		*fw_ops = &aq_fw_2x_ops;
>> +	} else if (hw_atl_utils_ver_match(HW_ATL_FW_VER_4X,
>> +					  self->fw_ver_actual) == 0) {
>> +		*fw_ops = &aq_fw_2x_ops;
>> 	} else {
>> 		aq_pr_err("Bad FW version detected: %x\n",
>> 			  self->fw_ver_actual);
>> -- 
>> 2.17.1


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

* Re: [PATCH] net: atlantic: Add support for firmware v4
  2020-07-07  8:46 ` Alexander Lobakin
  2020-07-07 10:02   ` Kai-Heng Feng
@ 2020-07-07 19:56   ` David Miller
  2020-07-15 15:34     ` [EXT] " Igor Russkikh
  1 sibling, 1 reply; 5+ messages in thread
From: David Miller @ 2020-07-07 19:56 UTC (permalink / raw)
  To: alobakin
  Cc: kai.heng.feng, anthony.wong, irusskikh, kuba, ndanilov,
	mstarovoitov, dmitry.bezrukov, netdev, linux-kernel

From: Alexander Lobakin <alobakin@marvell.com>
Date: Tue, 7 Jul 2020 11:46:57 +0300

> From:   Kai-Heng Feng <kai.heng.feng@canonical.com>
> Date:   Tue,  7 Jul 2020 14:38:28 +0800
> 
>> We have a new ethernet card that is supported by the atlantic driver:
>> 01:00.0 Ethernet controller [0200]: Aquantia Corp. AQC107 NBase-T/IEEE 802.3bz Ethernet Controller [AQtion] [1d6a:07b1] (rev 02)
>> 
>> But the driver failed to probe the device:
>> kernel: atlantic: Bad FW version detected: 400001e
>> kernel: atlantic: probe of 0000:01:00.0 failed with error -95
>> 
>> As a pure guesswork, simply adding the firmware version to the driver
> 
> Please don't send "pure guessworks" to net-fixes tree. You should have
> reported this as a bug to LKML and/or atlantic team, so we could issue
> it.

Production hardware is shipping to customers and the driver
maintainers didn't add support for this ID yet?  What is that
"atlantic team" waiting for?

Honestly I don't blame someone for posting a patch like this to get it
to work.

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

* Re: [EXT] Re: [PATCH] net: atlantic: Add support for firmware v4
  2020-07-07 19:56   ` David Miller
@ 2020-07-15 15:34     ` Igor Russkikh
  0 siblings, 0 replies; 5+ messages in thread
From: Igor Russkikh @ 2020-07-15 15:34 UTC (permalink / raw)
  To: David Miller, Alexander Lobakin
  Cc: kai.heng.feng, anthony.wong, kuba, Nikita Danilov,
	Mark Starovoytov, Dmitry Bezrukov, netdev, linux-kernel


>>> We have a new ethernet card that is supported by the atlantic driver:
>>> 01:00.0 Ethernet controller [0200]: Aquantia Corp. AQC107 NBase-T/IEEE
> 802.3bz Ethernet Controller [AQtion] [1d6a:07b1] (rev 02)
>>>
>>> But the driver failed to probe the device:
>>> kernel: atlantic: Bad FW version detected: 400001e
>>> kernel: atlantic: probe of 0000:01:00.0 failed with error -95
>>>
>>> As a pure guesswork, simply adding the firmware version to the driver
>>
>> Please don't send "pure guessworks" to net-fixes tree. You should have
>> reported this as a bug to LKML and/or atlantic team, so we could issue
>> it.
> 
> Production hardware is shipping to customers and the driver
> maintainers didn't add support for this ID yet?  What is that
> "atlantic team" waiting for?
> 
> Honestly I don't blame someone for posting a patch like this to get it
> to work.

Me too ;)

We've discussed this with Kai Heng internally, that was really an engineering
sample.

We'll repost this patch soon with some more changes required for that new FW.

Thanks,
  Igor

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

end of thread, other threads:[~2020-07-15 15:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-07  6:38 [PATCH] net: atlantic: Add support for firmware v4 Kai-Heng Feng
2020-07-07  8:46 ` Alexander Lobakin
2020-07-07 10:02   ` Kai-Heng Feng
2020-07-07 19:56   ` David Miller
2020-07-15 15:34     ` [EXT] " Igor Russkikh

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).