public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Ganesh Goudar <ganeshgr@chelsio•com>
To: David Laight <David.Laight@ACULAB•COM>
Cc: "netdev@vger•kernel.org" <netdev@vger•kernel.org>,
	"davem@davemloft•net" <davem@davemloft•net>,
	"nirranjan@chelsio•com" <nirranjan@chelsio•com>,
	"indranil@chelsio•com" <indranil@chelsio•com>
Subject: Re: [PATCH net-next] cxgb4: fix incorrect cim_la output for T6
Date: Tue, 30 May 2017 17:23:34 +0530	[thread overview]
Message-ID: <20170530115333.GA12626@chelsio.com> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6DCFFFABCB@AcuExch.aculab.com>

On Friday, May 05/19/17, 2017 at 14:17:11 +0000, David Laight wrote:
> From: Ganesh Goudar
> > Sent: 19 May 2017 11:12
> T6
> > 
> > take care of UpDbgLaRdPtr[0-3] restriction for T6
> > 
> > Signed-off-by: Ganesh Goudar <ganeshgr@chelsio•com>
> > ---
> >  drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
> > index aded42b96..917b46b 100644
> > --- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
> > +++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
> > @@ -8268,6 +8268,13 @@ int t4_cim_read_la(struct adapter *adap, u32 *la_buf, unsigned int *wrptr)
> >  		if (ret)
> >  			break;
> >  		idx = (idx + 1) & UPDBGLARDPTR_M;
> > +
> > +		/* Bits 0-3 of UpDbgLaRdPtr can be between 0000 to 1001 to
> > +		 * identify the 32-bit portion of the full 312-bit data
> > +		 */
> > +		if (is_t6(adap->params.chip))
> > +			while ((idx & 0xf) > 9)
> > +				idx = (idx + 1) % UPDBGLARDPTR_M;
> 
> Why the loop, maybe:
> 		if (is_t6(adap->params.chip) && (idx & 0xf) >= 9)
> 			idx = (idx & 0xf0) + 0x10;
> 		else
> 			idx++;
> 		idx &= UPDBGLARDPTR_M;
> 
> 	David
>
Yes, it is sensible I will send a v2, thanks David.

Thanks 

  reply	other threads:[~2017-05-30 11:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-19 10:12 [PATCH net-next] cxgb4: fix incorrect cim_la output for T6 Ganesh Goudar
2017-05-19 14:17 ` David Laight
2017-05-30 11:53   ` Ganesh Goudar [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-05-31 13:40 Ganesh Goudar
2017-06-02 18:07 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170530115333.GA12626@chelsio.com \
    --to=ganeshgr@chelsio$(echo .)com \
    --cc=David.Laight@ACULAB$(echo .)COM \
    --cc=davem@davemloft$(echo .)net \
    --cc=indranil@chelsio$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=nirranjan@chelsio$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox