Fix for ENC28J60 from Dave

This commit is contained in:
Gregory Nutt 2013-06-22 08:55:16 -06:00
parent 5152ce9f79
commit d7ec0089a7
2 changed files with 13 additions and 4 deletions

View File

@ -5028,3 +5028,5 @@
* configs/sam4l-xplained/src/sam_slcd.c: Beginning of a driver for the
LED1 segment LCD module. This driver is incomplete on initial check-
in (2013-6-21).
* drivers/net/enc28j60.c: Change buffer ordering to work around Errata
#5. From Dave (ziggurat29, 2013-6-22).

View File

@ -156,10 +156,17 @@
#define ALIGNED_BUFSIZE ((CONFIG_NET_BUFSIZE + 255) & ~255)
#define PKTMEM_TX_START 0x0000 /* Start TX buffer at 0 */
#define PKTMEM_TX_ENDP1 ALIGNED_BUFSIZE /* Allow TX buffer for one frame */
#define PKTMEM_RX_START PKTMEM_TX_ENDP1 /* Followed by RX buffer */
#define PKTMEM_RX_END PKTMEM_END /* RX buffer goes to the end of SRAM */
#if 0 /* Fix for Errata #5 */
# define PKTMEM_TX_START 0x0000 /* Start TX buffer at 0 */
# define PKTMEM_TX_ENDP1 ALIGNED_BUFSIZE /* Allow TX buffer for one frame */
# define PKTMEM_RX_START PKTMEM_TX_ENDP1 /* Followed by RX buffer */
# define PKTMEM_RX_END PKTMEM_END /* RX buffer goes to the end of SRAM */
#else
# define PKTMEM_RX_START 0x0000
# define PKTMEM_RX_END (PKTMEM_END-ALIGNED_BUFSIZE)
# define PKTMEM_TX_START (PKTMEM_RX_END+1)
# define PKTMEM_TX_ENDP1 (PKTMEM_TX_START+ALIGNED_BUFSIZE)
#endif
/* Misc. Helper Macros ******************************************************/