1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

MDIO_PHYACCESS_ACK is only valid for read access, remove it from

miibus_writereg.

Reduce the DELAY() between reads while waiting for MII access.

Spotted by:	yongari
Sponsored by:	Rubicon Communications, LLC (Netgate)
This commit is contained in:
Luiz Otavio O Souza 2016-12-01 03:34:04 +00:00
parent 85e4ae1e13
commit 7f67614061
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=309347
2 changed files with 2 additions and 5 deletions

View File

@ -1512,9 +1512,6 @@ cpswp_miibus_writereg(device_t dev, int phy, int reg, int value)
return (0);
}
if ((cpsw_read_4(sc->swsc, sc->phyaccess) & MDIO_PHYACCESS_ACK) == 0)
device_printf(dev, "Failed to write to PHY.\n");
return (0);
}

View File

@ -33,8 +33,8 @@
#define CPSW_INTR_COUNT 4
/* MII BUS */
#define CPSW_MIIBUS_RETRIES 5
#define CPSW_MIIBUS_DELAY 1000
#define CPSW_MIIBUS_RETRIES 20
#define CPSW_MIIBUS_DELAY 100
#define CPSW_MAX_ALE_ENTRIES 1024