All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gavin Shan <gwshan@linux.vnet.ibm.com>
To: Joel Stanley <joel@jms.id.au>
Cc: Gavin Shan <gwshan@linux.vnet.ibm.com>, openbmc@lists.ozlabs.org
Subject: Re: [PATCH dev-4.7 1/2] net/faraday: Avoid PHYSTS_CHG interrupt
Date: Tue, 2 Aug 2016 14:45:13 +1000	[thread overview]
Message-ID: <20160802044513.GA22837@gwshan> (raw)
In-Reply-To: <1470040022.16990.8.camel@jms.id.au>

On Mon, Aug 01, 2016 at 05:57:02PM +0930, Joel Stanley wrote:
>On Thu, 2016-07-28 at 11:04 +1000, Gavin Shan wrote:
>> Bit#11 in MACCR (0x50) designates the signal level for PHY link
>> status change. It's cleared, meaning high level enabled, by default.
>> However, we can see continuous interrupt (bit#6) in ISR (0x0) for it
>> and it's obviously a false alarm. The side effect is CPU cycles
>> wasted
>> to process the false alarm.
>> 
>> This sets bit#11 in MACCR (0x50) to avoid the bogus interrupt.
>
>Thanks.
>
>I assume you're seeing this with the hardware in NCSI mode?
>
>Is the patch okay for other use cases?
>

Yeah, the only available testing environment is NCSI. I didn't
test it on PHY based AST2500. Joel, please give it a shoot on
your AST2500 board before merging it. By the way, the interrupt
(PHYSTS_CHG) shouldn't be used even we have a PHY connected as
polling mechanism is specified to retrieve the link status in
ftgmac100.c

Thanks,
Gavin

>Cheers,
>
>Joel
>
>> 
>> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
>> ---
>>  drivers/net/ethernet/faraday/ftgmac100.c | 1 +
>>  drivers/net/ethernet/faraday/ftgmac100.h | 1 +
>>  2 files changed, 2 insertions(+)
>> 
>> diff --git a/drivers/net/ethernet/faraday/ftgmac100.c
>> b/drivers/net/ethernet/faraday/ftgmac100.c
>> index e805c4d..f00911a 100644
>> --- a/drivers/net/ethernet/faraday/ftgmac100.c
>> +++ b/drivers/net/ethernet/faraday/ftgmac100.c
>> @@ -224,6 +224,7 @@ static void ftgmac100_init_hw(struct ftgmac100
>> *priv)
>>  				 FTGMAC100_MACCR_RXMAC_EN	| \
>>  				 FTGMAC100_MACCR_FULLDUP	| \
>>  				 FTGMAC100_MACCR_CRC_APD	| \
>> +				 FTGMAC100_MACCR_PHY_LINK_LEVEL | \
>>  				 FTGMAC100_MACCR_RX_RUNT	| \
>>  				 FTGMAC100_MACCR_RX_BROADPKT)
>>  
>> diff --git a/drivers/net/ethernet/faraday/ftgmac100.h
>> b/drivers/net/ethernet/faraday/ftgmac100.h
>> index c258586..d07b6ea 100644
>> --- a/drivers/net/ethernet/faraday/ftgmac100.h
>> +++ b/drivers/net/ethernet/faraday/ftgmac100.h
>> @@ -152,6 +152,7 @@
>>  #define FTGMAC100_MACCR_FULLDUP		(1 << 8)
>>  #define FTGMAC100_MACCR_GIGA_MODE	(1 << 9)
>>  #define FTGMAC100_MACCR_CRC_APD		(1 << 10)
>> +#define FTGMAC100_MACCR_PHY_LINK_LEVEL	(1 << 11)
>>  #define FTGMAC100_MACCR_RX_RUNT		(1 << 12)
>>  #define FTGMAC100_MACCR_JUMBO_LF	(1 << 13)
>>  #define FTGMAC100_MACCR_RX_ALL		(1 << 14)
>

  reply	other threads:[~2016-08-02  4:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-28  1:04 [PATCH dev-4.7 1/2] net/faraday: Avoid PHYSTS_CHG interrupt Gavin Shan
2016-07-28  1:04 ` [PATCH dev-4.7 2/2] net/faraday: Clear stale interrupts Gavin Shan
2016-08-01  8:26   ` Joel Stanley
2016-08-02  6:53     ` Gavin Shan
2016-08-01  8:27 ` [PATCH dev-4.7 1/2] net/faraday: Avoid PHYSTS_CHG interrupt Joel Stanley
2016-08-02  4:45   ` Gavin Shan [this message]
2016-08-08  8:27     ` Joel Stanley

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=20160802044513.GA22837@gwshan \
    --to=gwshan@linux.vnet.ibm.com \
    --cc=joel@jms.id.au \
    --cc=openbmc@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.