[02/21] net/ixgbe/base: change in the condition for response HI

Message ID 20200612032410.20864-3-guinanx.sun@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Qi Zhang
Headers
Series update ixgbe base code |

Checks

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

Commit Message

Guinan Sun June 12, 2020, 3:23 a.m. UTC
  According to SGVL EAS Host interface Shadow RAM Read (0x31)
command response buffer length is stored in two bytes,
instead of one byte.

Signed-off-by: Mateusz Kowalski <mateusz.kowalski@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Ferruh Yigit June 22, 2020, 11:58 a.m. UTC | #1
On 6/12/2020 4:23 AM, Guinan Sun wrote:
> According to SGVL EAS Host interface Shadow RAM Read (0x31)
> command response buffer length is stored in two bytes,
> instead of one byte.

For patch subject, better to say 'fix' instead of 'change' because that is what
done.
Previously Shadow RAM Read (0x31) command response buffer length was taken
wrong, now you are fixing it. Overall "Shadow RAM Read (0x31)" command response
value was wrong, so I guess it can be fair to say:
"net/ixgbe/base: fix host interface shadow RAM read"

> 
> Signed-off-by: Mateusz Kowalski <mateusz.kowalski@intel.com>
> Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
> ---
>  drivers/net/ixgbe/base/ixgbe_common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c
> index 36c003844..9e3b71e38 100644
> --- a/drivers/net/ixgbe/base/ixgbe_common.c
> +++ b/drivers/net/ixgbe/base/ixgbe_common.c
> @@ -4656,7 +4656,7 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
>  	 * Read Flash command requires reading buffer length from
>  	 * two byes instead of one byte
>  	 */
> -	if (resp->cmd == 0x30) {
> +	if (resp->cmd == 0x30 || resp->cmd == 0x31) {
>  		for (; bi < dword_len + 2; bi++) {
>  			buffer[bi] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG,
>  							  bi);
>
  
Qiming Yang June 29, 2020, 9:27 a.m. UTC | #2
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Ferruh Yigit
> Sent: Monday, June 22, 2020 19:59
> To: Sun, GuinanX <guinanx.sun@intel.com>; dev@dpdk.org
> Cc: Mateusz Kowalski <mateusz.kowalski@intel.com>
> Subject: Re: [dpdk-dev] [PATCH 02/21] net/ixgbe/base: change in the
> condition for response HI

Don't use HI, please follow Ferruh's comments

> 
> On 6/12/2020 4:23 AM, Guinan Sun wrote:
> > According to SGVL EAS Host interface Shadow RAM Read (0x31) command
> > response buffer length is stored in two bytes, instead of one byte.
> 
> For patch subject, better to say 'fix' instead of 'change' because that is what
> done.
> Previously Shadow RAM Read (0x31) command response buffer length was
> taken wrong, now you are fixing it. Overall "Shadow RAM Read (0x31)"
> command response value was wrong, so I guess it can be fair to say:
> "net/ixgbe/base: fix host interface shadow RAM read"
> 
> >
> > Signed-off-by: Mateusz Kowalski <mateusz.kowalski@intel.com>
> > Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
> > ---
> >  drivers/net/ixgbe/base/ixgbe_common.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ixgbe/base/ixgbe_common.c
> > b/drivers/net/ixgbe/base/ixgbe_common.c
> > index 36c003844..9e3b71e38 100644
> > --- a/drivers/net/ixgbe/base/ixgbe_common.c
> > +++ b/drivers/net/ixgbe/base/ixgbe_common.c
> > @@ -4656,7 +4656,7 @@ s32 ixgbe_host_interface_command(struct
> ixgbe_hw *hw, u32 *buffer,
> >  	 * Read Flash command requires reading buffer length from
> >  	 * two byes instead of one byte
> >  	 */
> > -	if (resp->cmd == 0x30) {
> > +	if (resp->cmd == 0x30 || resp->cmd == 0x31) {
> >  		for (; bi < dword_len + 2; bi++) {
> >  			buffer[bi] = IXGBE_READ_REG_ARRAY(hw,
> IXGBE_FLEX_MNG,
> >  							  bi);
> >
  
Guinan Sun June 30, 2020, 2:17 a.m. UTC | #3
Hi Ferruh

> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Monday, June 22, 2020 7:59 PM
> To: Sun, GuinanX <guinanx.sun@intel.com>; dev@dpdk.org
> Cc: Mateusz Kowalski <mateusz.kowalski@intel.com>
> Subject: Re: [dpdk-dev] [PATCH 02/21] net/ixgbe/base: change in the condition
> for response HI
> 
> On 6/12/2020 4:23 AM, Guinan Sun wrote:
> > According to SGVL EAS Host interface Shadow RAM Read (0x31) command
> > response buffer length is stored in two bytes, instead of one byte.
> 
> For patch subject, better to say 'fix' instead of 'change' because that is what
> done.
> Previously Shadow RAM Read (0x31) command response buffer length was
> taken wrong, now you are fixing it. Overall "Shadow RAM Read (0x31)"
> command response value was wrong, so I guess it can be fair to say:
> "net/ixgbe/base: fix host interface shadow RAM read"
> 

I agree with you.
V2 patch will fix the problem.

> >
> > Signed-off-by: Mateusz Kowalski <mateusz.kowalski@intel.com>
> > Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
> > ---
> >  drivers/net/ixgbe/base/ixgbe_common.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ixgbe/base/ixgbe_common.c
> > b/drivers/net/ixgbe/base/ixgbe_common.c
> > index 36c003844..9e3b71e38 100644
> > --- a/drivers/net/ixgbe/base/ixgbe_common.c
> > +++ b/drivers/net/ixgbe/base/ixgbe_common.c
> > @@ -4656,7 +4656,7 @@ s32 ixgbe_host_interface_command(struct
> ixgbe_hw *hw, u32 *buffer,
> >  	 * Read Flash command requires reading buffer length from
> >  	 * two byes instead of one byte
> >  	 */
> > -	if (resp->cmd == 0x30) {
> > +	if (resp->cmd == 0x30 || resp->cmd == 0x31) {
> >  		for (; bi < dword_len + 2; bi++) {
> >  			buffer[bi] = IXGBE_READ_REG_ARRAY(hw,
> IXGBE_FLEX_MNG,
> >  							  bi);
> >
  

Patch

diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c
index 36c003844..9e3b71e38 100644
--- a/drivers/net/ixgbe/base/ixgbe_common.c
+++ b/drivers/net/ixgbe/base/ixgbe_common.c
@@ -4656,7 +4656,7 @@  s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
 	 * Read Flash command requires reading buffer length from
 	 * two byes instead of one byte
 	 */
-	if (resp->cmd == 0x30) {
+	if (resp->cmd == 0x30 || resp->cmd == 0x31) {
 		for (; bi < dword_len + 2; bi++) {
 			buffer[bi] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG,
 							  bi);