diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2010-11-21 14:49:48 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2010-11-21 14:49:48 +0000 |
commit | c90c320dd7844f932b4565c005047c3f3b912ecc (patch) | |
tree | 689da943c0245d507a1f3d6a1e18acf1306acc38 /nuttx/arch/arm | |
parent | 2921d9b1e44752188222421aede9bcca6bc03632 (diff) | |
download | px4-nuttx-c90c320dd7844f932b4565c005047c3f3b912ecc.tar.gz px4-nuttx-c90c320dd7844f932b4565c005047c3f3b912ecc.tar.bz2 px4-nuttx-c90c320dd7844f932b4565c005047c3f3b912ecc.zip |
Fix final PHY configuration
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3122 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm')
-rw-r--r-- | nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c b/nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c index c7d915a71..72fc5de38 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c @@ -2100,7 +2100,7 @@ static inline int lpc17_phyinit(struct lpc17_driver_s *priv) * (probably more than little redundant). */ - ret = lpc17_phymode(phyaddr, LPC17_MODE_DEFLT); + ret = lpc17_phymode(phyaddr, priv->lp_mode); lpc17_showmii(phyaddr, "After final configuration"); return ret; } @@ -2361,7 +2361,15 @@ static void lpc17_ethreset(struct lpc17_driver_s *priv) lpc17_putreg(18, LPC17_ETH_IPGR); lpc17_putreg(((15 << ETH_CLRT_RMAX_SHIFT) | (55 << ETH_CLRT_COLWIN_SHIFT)), LPC17_ETH_CLRT); - lpc17_putreg(0x0600, LPC17_ETH_MAXF); + + /* Set the Maximum Frame size register. "This field resets to the value + * 0x0600, which represents a maximum receive frame of 1536 octets. An + * untagged maximum size Ethernet frame is 1518 octets. A tagged frame adds + * four octets for a total of 1522 octets. If a shorter maximum length + * restriction is desired, program this 16-bit field." + */ + + lpc17_putreg(CONFIG_NET_BUFSIZE+2, LPC17_ETH_MAXF); /* Disable all Ethernet controller interrupts */ |