From: Vivien Didelot <vivien.didelot@gmail.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, f.fainelli@gmail.com, andrew@lunn.ch,
Vivien Didelot <vivien.didelot@gmail.com>
Subject: [PATCH net-next 1/7] net: dsa: mv88e6xxx: wait for 88E6185 PPU disabled
Date: Fri, 9 Aug 2019 18:47:53 -0400 [thread overview]
Message-ID: <20190809224759.5743-2-vivien.didelot@gmail.com> (raw)
In-Reply-To: <20190809224759.5743-1-vivien.didelot@gmail.com>
The PPU state of 88E6185 can be either "Disabled at Reset" or
"Disabled after Initialization". Because we intentionally clear the
PPU Enabled bit before checking its state, it is safe to wait for the
MV88E6185_G1_STS_PPU_STATE_DISABLED state explicitly instead of waiting
for any state different than MV88E6185_G1_STS_PPU_STATE_POLLING.
Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
---
drivers/net/dsa/mv88e6xxx/global1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/dsa/mv88e6xxx/global1.c b/drivers/net/dsa/mv88e6xxx/global1.c
index 1323ef30a5e9..bbd31c9f8b48 100644
--- a/drivers/net/dsa/mv88e6xxx/global1.c
+++ b/drivers/net/dsa/mv88e6xxx/global1.c
@@ -46,7 +46,7 @@ static int mv88e6185_g1_wait_ppu_disabled(struct mv88e6xxx_chip *chip)
/* Check the value of the PPUState bits 15:14 */
state &= MV88E6185_G1_STS_PPU_STATE_MASK;
- if (state != MV88E6185_G1_STS_PPU_STATE_POLLING)
+ if (state == MV88E6185_G1_STS_PPU_STATE_DISABLED)
return 0;
usleep_range(1000, 2000);
--
2.22.0
next prev parent reply other threads:[~2019-08-09 22:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-09 22:47 [PATCH net-next 0/7] net: dsa: mv88e6xxx: prepare Wait Bit operation Vivien Didelot
2019-08-09 22:47 ` Vivien Didelot [this message]
2019-08-09 22:47 ` [PATCH net-next 2/7] net: dsa: mv88e6xxx: introduce wait mask routine Vivien Didelot
2019-08-09 22:47 ` [PATCH net-next 3/7] net: dsa: mv88e6xxx: introduce wait bit routine Vivien Didelot
2019-08-09 22:47 ` [PATCH net-next 4/7] net: dsa: mv88e6xxx: wait for AVB Busy bit Vivien Didelot
2019-08-09 22:47 ` [PATCH net-next 5/7] net: dsa: mv88e6xxx: remove wait and update routines Vivien Didelot
2019-08-09 22:47 ` [PATCH net-next 6/7] net: dsa: mv88e6xxx: fix SMI bit checking Vivien Didelot
2019-08-09 22:47 ` [PATCH net-next 7/7] net: dsa: mv88e6xxx: add delay in direct SMI wait Vivien Didelot
2019-08-12 4:27 ` [PATCH net-next 0/7] net: dsa: mv88e6xxx: prepare Wait Bit operation 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=20190809224759.5743-2-vivien.didelot@gmail.com \
--to=vivien.didelot@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox