Skip to content

Commit 624ca9c

Browse files
Ivan Mikhaylovdavem330
authored andcommitted
net/ibm/emac: wrong bit is used for STA control register write
STA control register has areas of mode and opcodes for opeations. 18 bit is using for mode selection, where 0 is old MIO/MDIO access method and 1 is indirect access mode. 19-20 bits are using for setting up read/write operation(STA opcodes). In current state 'read' is set into old MIO/MDIO mode with 19 bit and write operation is set into 18 bit which is mode selection, not a write operation. To correlate write with read we set it into 20 bit. All those bit operations are MSB 0 based. Signed-off-by: Ivan Mikhaylov <ivan@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 45d6e54 commit 624ca9c

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/ibm/emac

1 file changed

+1
-1
lines changed

drivers/net/ethernet/ibm/emac/emac.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ struct emac_regs {
244244
#define EMAC_STACR_PHYE 0x00004000
245245
#define EMAC_STACR_STAC_MASK 0x00003000
246246
#define EMAC_STACR_STAC_READ 0x00001000
247-
#define EMAC_STACR_STAC_WRITE 0x00002000
247+
#define EMAC_STACR_STAC_WRITE 0x00000800
248248
#define EMAC_STACR_OPBC_MASK 0x00000C00
249249
#define EMAC_STACR_OPBC_50 0x00000000
250250
#define EMAC_STACR_OPBC_66 0x00000400

0 commit comments

Comments
 (0)