diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2009-11-25 11:08:41 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-26 18:59:00 -0500 |
commit | 80cb9a0f7f381e1c0e9f6dabec6e67db0dd3a0d9 (patch) | |
tree | f64ca5e6a4d30831109163bdfaffa3e3f8ab7a93 /drivers/net/sfc/falcon.c | |
parent | 46e1ac0f42c7ff20a7e47c172e4835273b0e6899 (diff) |
sfc: Treat all MAC registers as 128-bit
Although all the defined fields in these registers are within 32 bits,
they are architecturally defined as 128-bit like most other Falcon
registers. In particular, we must use efx_reado() to ensure proper
locking when reading MD_STAT_REG.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/falcon.c')
-rw-r--r-- | drivers/net/sfc/falcon.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c index 7b19686218a5..f97ef3e0572f 100644 --- a/drivers/net/sfc/falcon.c +++ b/drivers/net/sfc/falcon.c | |||
@@ -2042,18 +2042,18 @@ int falcon_dma_stats(struct efx_nic *efx, unsigned int done_offset) | |||
2042 | /* Wait for GMII access to complete */ | 2042 | /* Wait for GMII access to complete */ |
2043 | static int falcon_gmii_wait(struct efx_nic *efx) | 2043 | static int falcon_gmii_wait(struct efx_nic *efx) |
2044 | { | 2044 | { |
2045 | efx_dword_t md_stat; | 2045 | efx_oword_t md_stat; |
2046 | int count; | 2046 | int count; |
2047 | 2047 | ||
2048 | /* wait upto 50ms - taken max from datasheet */ | 2048 | /* wait upto 50ms - taken max from datasheet */ |
2049 | for (count = 0; count < 5000; count++) { | 2049 | for (count = 0; count < 5000; count++) { |
2050 | efx_readd(efx, &md_stat, FR_AB_MD_STAT); | 2050 | efx_reado(efx, &md_stat, FR_AB_MD_STAT); |
2051 | if (EFX_DWORD_FIELD(md_stat, FRF_AB_MD_BSY) == 0) { | 2051 | if (EFX_OWORD_FIELD(md_stat, FRF_AB_MD_BSY) == 0) { |
2052 | if (EFX_DWORD_FIELD(md_stat, FRF_AB_MD_LNFL) != 0 || | 2052 | if (EFX_OWORD_FIELD(md_stat, FRF_AB_MD_LNFL) != 0 || |
2053 | EFX_DWORD_FIELD(md_stat, FRF_AB_MD_BSERR) != 0) { | 2053 | EFX_OWORD_FIELD(md_stat, FRF_AB_MD_BSERR) != 0) { |
2054 | EFX_ERR(efx, "error from GMII access " | 2054 | EFX_ERR(efx, "error from GMII access " |
2055 | EFX_DWORD_FMT"\n", | 2055 | EFX_OWORD_FMT"\n", |
2056 | EFX_DWORD_VAL(md_stat)); | 2056 | EFX_OWORD_VAL(md_stat)); |
2057 | return -EIO; | 2057 | return -EIO; |
2058 | } | 2058 | } |
2059 | return 0; | 2059 | return 0; |