[v2,2/4] net/ipn3ke: delete MAC register address mask

Message ID 1560246526-264797-2-git-send-email-andy.pei@intel.com
State Superseded, archived
Delegated to: Ferruh Yigit
Headers show
Series
  • [v2,1/4] net/ipn3ke: add new register address
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Andy Pei June 11, 2019, 9:48 a.m.
original code is compatible with older device,
whose mac register address is no more than 10 bits.
Now we have mac register address longer than 10 bits,
so we just delete the mask here.

Fixes: c01c748e4ae6 ("net/ipn3ke: add new driver")
Cc: rosen.xu@intel.com

Signed-off-by: Andy Pei <andy.pei@intel.com>
---
 drivers/net/ipn3ke/ipn3ke_ethdev.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Xu, Rosen June 12, 2019, 1:17 a.m. | #1
> -----Original Message-----
> From: Pei, Andy
> Sent: Tuesday, June 11, 2019 17:49
> To: dev@dpdk.org
> Cc: Pei, Andy <andy.pei@intel.com>; Xu, Rosen <rosen.xu@intel.com>
> Subject: [PATCH v2 2/4] net/ipn3ke: delete MAC register address mask
> 
> original code is compatible with older device, whose mac register address is
> no more than 10 bits.
> Now we have mac register address longer than 10 bits, so we just delete the
> mask here.
> 
> Fixes: c01c748e4ae6 ("net/ipn3ke: add new driver")
> Cc: rosen.xu@intel.com
> 
> Signed-off-by: Andy Pei <andy.pei@intel.com>
> ---
>  drivers/net/ipn3ke/ipn3ke_ethdev.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.c
> b/drivers/net/ipn3ke/ipn3ke_ethdev.c
> index 9079b57..8d3084d 100644
> --- a/drivers/net/ipn3ke/ipn3ke_ethdev.c
> +++ b/drivers/net/ipn3ke/ipn3ke_ethdev.c
> @@ -48,7 +48,6 @@
>  	if (eth_group_sel != 0 && eth_group_sel != 1)
>  		return -1;
> 
> -	addr &= 0x3FF;
>  	target_addr = addr | dev_sel << 17;
> 
>  	indirect_value = RCMD | target_addr << 32; @@ -86,7 +85,6 @@
>  	if (eth_group_sel != 0 && eth_group_sel != 1)
>  		return -1;
> 
> -	addr &= 0x3FF;
>  	target_addr = addr | dev_sel << 17;
> 
>  	indirect_value = WCMD | target_addr << 32 | wr_data;
> --
> 1.8.3.1

Acked-by: Rosen Xu <rosen.xu@intel.com>

Patch

diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.c b/drivers/net/ipn3ke/ipn3ke_ethdev.c
index 9079b57..8d3084d 100644
--- a/drivers/net/ipn3ke/ipn3ke_ethdev.c
+++ b/drivers/net/ipn3ke/ipn3ke_ethdev.c
@@ -48,7 +48,6 @@ 
 	if (eth_group_sel != 0 && eth_group_sel != 1)
 		return -1;
 
-	addr &= 0x3FF;
 	target_addr = addr | dev_sel << 17;
 
 	indirect_value = RCMD | target_addr << 32;
@@ -86,7 +85,6 @@ 
 	if (eth_group_sel != 0 && eth_group_sel != 1)
 		return -1;
 
-	addr &= 0x3FF;
 	target_addr = addr | dev_sel << 17;
 
 	indirect_value = WCMD | target_addr << 32 | wr_data;