[Skyeye-developer] SF.net SVN: skyeye: [309]
skyeye-v1/trunk/device/net
Michael.Kang
blackfin.kang at gmail.com
Mon Sep 17 17:51:49 CST 2007
Revision: 309
http://skyeye.svn.sourceforge.net/skyeye/?rev=309&view=rev
Author: kangsh
Date: 2007-09-17 01:30:34 -0700 (Mon, 17 Sep 2007)
Log Message:
-----------
commit the patch provided by gbf0871 that can run u-boot with tftp
feature.
Modified Paths:
--------------
skyeye-v1/trunk/device/net/dev_net_cs8900a.c
skyeye-v1/trunk/device/net/dev_net_cs8900a.h
Modified: skyeye-v1/trunk/device/net/dev_net_cs8900a.c
===================================================================
--- skyeye-v1/trunk/device/net/dev_net_cs8900a.c 2007-09-16
03:19:41 UTC (rev 308)
+++ skyeye-v1/trunk/device/net/dev_net_cs8900a.c 2007-09-17
08:30:34 UTC (rev 309)
@@ -167,6 +167,9 @@
return;
}
*data = io->rx_frame[io->rx_tail];
+ if (io->rx_tail==io->rx_head) {
+ io->ctrl_st[CtrlStNum (PP_RxEvent)] &= ~0x100;
+ }
io->rx_tail++;
}
@@ -311,6 +314,8 @@
io->tx_frame = (u16 *) malloc (Tx_Frame_Count);
memset (io->tx_frame, 0, Tx_Frame_Count);
io->tx_head = io->tx_tail = 0;
+ io->ctrl_st[CtrlStNum (PP_SelfST)] |= INITD;
+ io->ctrl_st[CtrlStNum (PP_LineST)] |= LINK_OK;
}
static void
@@ -471,7 +476,10 @@
struct net_cs8900a_io *io = (struct net_cs8900a_io *) dev->data;
int packet_len, cs8900a_len;
u8 *bufptr;
-
+ /*When the CS8900A commits buffer space to a par-
+ ticular held receive frame ,data from subsequent frames can be
written P85*/
+ if (io->ctrl_st[CtrlStNum (PP_RxEvent)] &= 0x100)
+ return;
bufptr = (u8 *) & (io->rx_frame[2]);
packet_len = net_dev->net_read (net_dev, bufptr, Rx_Max_Count);
if (packet_len < 0)
Modified: skyeye-v1/trunk/device/net/dev_net_cs8900a.h
===================================================================
--- skyeye-v1/trunk/device/net/dev_net_cs8900a.h 2007-09-16
03:19:41 UTC (rev 308)
+++ skyeye-v1/trunk/device/net/dev_net_cs8900a.h 2007-09-17
08:30:34 UTC (rev 309)
@@ -266,6 +266,13 @@
#define ELpresent 0x0800
#define EEsize 0x1000
+/* PP_LineST - Ethernet Line Status bit definition - Read-only */
+#define LINK_OK 0x0080
+#define AUI_ON 0x0100
+#define TENBASET_ON 0x0200
+#define POLARITY_OK 0x1000
+#define CRS_OK 0x4000
+
/* PP_EEPROMCommand */
#define EEWriteEnable 0x00F0
#define EEWriteDis 0x0000
This was sent by the SourceForge.net collaborative development
platform, the world's largest Open Source development site.
--
www.skyeye.org
More information about the Skyeye-developer
mailing list