netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Revert "net/ibm/emac: wrong bit is used for STA control"
@ 2018-12-07  3:20 Benjamin Herrenschmidt
  2018-12-07  3:59 ` David Miller
  2018-12-07  4:05 ` Benjamin Herrenschmidt
  0 siblings, 2 replies; 5+ messages in thread
From: Benjamin Herrenschmidt @ 2018-12-07  3:20 UTC (permalink / raw)
  To: netdev; +Cc: David Miller, Michael Ellerman



^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH] Revert "net/ibm/emac: wrong bit is used for STA control"
@ 2018-12-07  4:05 Benjamin Herrenschmidt
  2018-12-08  6:37 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Benjamin Herrenschmidt @ 2018-12-07  4:05 UTC (permalink / raw)
  To: netdev; +Cc: David Miller, Michael Ellerman, fr0st61te

This reverts commit 624ca9c33c8a853a4a589836e310d776620f4ab9.

This commit is completely bogus. The STACR register has two formats, old
and new, depending on the version of the IP block used. There's a pair of
device-tree properties that can be used to specify the format used:

	has-inverted-stacr-oc
	has-new-stacr-staopc

What this commit did was to change the bit definition used with the old
parts to match the new parts. This of course breaks the driver on all
the old ones.

Instead, the author should have set the appropriate properties in the
device-tree for the variant used on his board.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

Found while setting up some old ppc440 boxes for test/CI

 drivers/net/ethernet/ibm/emac/emac.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ibm/emac/emac.h b/drivers/net/ethernet/ibm/emac/emac.h
index e2f80cc..0d2de6f 100644
--- a/drivers/net/ethernet/ibm/emac/emac.h
+++ b/drivers/net/ethernet/ibm/emac/emac.h
@@ -231,7 +231,7 @@ struct emac_regs {
 #define EMAC_STACR_PHYE			0x00004000
 #define EMAC_STACR_STAC_MASK		0x00003000
 #define EMAC_STACR_STAC_READ		0x00001000
-#define EMAC_STACR_STAC_WRITE		0x00000800
+#define EMAC_STACR_STAC_WRITE		0x00002000
 #define EMAC_STACR_OPBC_MASK		0x00000C00
 #define EMAC_STACR_OPBC_50		0x00000000
 #define EMAC_STACR_OPBC_66		0x00000400
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-12-08  6:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-07  3:20 [PATCH] Revert "net/ibm/emac: wrong bit is used for STA control" Benjamin Herrenschmidt
2018-12-07  3:59 ` David Miller
2018-12-07  4:05 ` Benjamin Herrenschmidt
  -- strict thread matches above, loose matches on Subject: below --
2018-12-07  4:05 Benjamin Herrenschmidt
2018-12-08  6:37 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).