diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-08-21 08:10:32 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-08-21 08:10:32 -0600 |
commit | 5ef1ef85e034790f9a3e5f799912f15e55ede1bf (patch) | |
tree | a22bf612ce1f532d347b36043da64fae5c7f5552 /nuttx/drivers/net | |
parent | e8a979e5632ddb781c2da654c9f41990226ff83f (diff) | |
download | px4-nuttx-5ef1ef85e034790f9a3e5f799912f15e55ede1bf.tar.gz px4-nuttx-5ef1ef85e034790f9a3e5f799912f15e55ede1bf.tar.bz2 px4-nuttx-5ef1ef85e034790f9a3e5f799912f15e55ede1bf.zip |
ENC28J60 errors reported by Max Holtzberg
Diffstat (limited to 'nuttx/drivers/net')
-rw-r--r-- | nuttx/drivers/net/enc28j60.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nuttx/drivers/net/enc28j60.c b/nuttx/drivers/net/enc28j60.c index 9ebdb06ed..6d5802f66 100644 --- a/nuttx/drivers/net/enc28j60.c +++ b/nuttx/drivers/net/enc28j60.c @@ -763,7 +763,7 @@ static int enc_waitbreg(FAR struct enc_driver_s *priv, uint8_t ctrlreg, } while ((rddata & bits) != value || elapsed > ENC_POLLTIMEOUT); - return (rddata & bits) == value ? -ETIMEDOUT : OK; + return (rddata & bits) == value ? OK : -ETIMEDOUT; } /**************************************************************************** @@ -1007,7 +1007,7 @@ static uint16_t enc_rdphy(FAR struct enc_driver_s *priv, uint8_t phyaddr) */ up_udelay(12); - if (enc_waitbreg(priv, ENC_MISTAT, MISTAT_BUSY, 0x00) == OK); + if (enc_waitbreg(priv, ENC_MISTAT, MISTAT_BUSY, 0x00) == OK) { /* 4. Clear the MICMD.MIIRD bit. */ |