Hello,

patch included.

# the multicast filter use now the correct registers
# add missing defines in fec.h


Regards,

Mathias


Mathias Kuester wrote:
> Hello,
> 
> 
> the current fec driver (kernel 2.4.X) is not able to receive multicast
> packages. Please initialise the registers of the fec like this:
> 
> fec_grp_hash_table_high = 0xffffffff;
> fec_grp_hash_table_low = 0xffffffff;
> 
> 
> The command (from remote computer on the same network)
> 
>> ping 224.0.0.1
> 
> works then.
> 
> 
> 
> Thanks,
> 
> 
> Mathias
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev@uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev@uclinux.org
> To unsubscribe see:
> http://mailman.uclinux.org/mailman/options/uclinux-dev
> 

--- fec_orig.c	2007-01-17 07:41:08.000000000 +0100
+++ fec.c	2008-01-30 14:47:50.000000000 +0100
@@ -2275,14 +2275,27 @@
 			/* Catch all multicast addresses, so set the
 			 * filter to all 1's.
 			 */
+#if defined(CONFIG_M5235) || defined(CONFIG_M527x) || \
+    defined(CONFIG_M5282) || defined(CONFIG_M5280) || \
+    defined(CONFIG_M5208)
+			ep->fec_grp_hash_table_high = 0xffffffff;
+			ep->fec_grp_hash_table_low = 0xffffffff;
+#else
 			ep->fec_hash_table_high = 0xffffffff;
 			ep->fec_hash_table_low = 0xffffffff;
+#endif
 		} else {
 			/* Clear filter and add the addresses in hash register.
 			*/
+#if defined(CONFIG_M5235) || defined(CONFIG_M527x) || \
+    defined(CONFIG_M5282) || defined(CONFIG_M5280) || \
+    defined(CONFIG_M5208)
+			ep->fec_grp_hash_table_high = 0;
+			ep->fec_grp_hash_table_low = 0;
+#else
 			ep->fec_hash_table_high = 0;
 			ep->fec_hash_table_low = 0;
-            
+#endif            
 			dmi = dev->mc_list;
 
 			for (j = 0; j < dev->mc_count; j++, dmi = dmi->next) {
@@ -2309,10 +2322,23 @@
 				*/
 				hash = (crc >> (32 - HASH_BITS)) & 0x3f;
 			
-				if (hash > 31)
+				if (hash > 31) {
+#if defined(CONFIG_M5235) || defined(CONFIG_M527x) || \
+    defined(CONFIG_M5282) || defined(CONFIG_M5280) || \
+    defined(CONFIG_M5208)
+					ep->fec_grp_hash_table_high |= 1 << (hash - 32);
+#else
 					ep->fec_hash_table_high |= 1 << (hash - 32);
-				else
+#endif
+				} else {
+#if defined(CONFIG_M5235) || defined(CONFIG_M527x) || \
+    defined(CONFIG_M5282) || defined(CONFIG_M5280) || \
+    defined(CONFIG_M5208)
+					ep->fec_grp_hash_table_low |= 1 << hash;
+#else
 					ep->fec_hash_table_low |= 1 << hash;
+#endif
+				}
 			}
 		}
 	}
@@ -2406,6 +2432,14 @@
 		FEC_ENET_RXF | FEC_ENET_RXB | FEC_ENET_MII);
 	fecp->fec_hash_table_high = 0;
 	fecp->fec_hash_table_low = 0;
+	/* Set initial multicast address filter.
+	*/
+#if defined(CONFIG_M5235) || defined(CONFIG_M527x) || \
+    defined(CONFIG_M5282) || defined(CONFIG_M5280) || \
+    defined(CONFIG_M5208)
+	fecp->fec_grp_hash_table_high = 0;
+	fecp->fec_grp_hash_table_low  = 0;
+#endif
 	fecp->fec_r_buff_size = PKT_MAXBLR_SIZE;
         //fecp->fec_ecntrl = 2; // this is too early PSW
         fecp->fec_r_des_active = 0x01000000;
--- fec_orig.h  2005-08-10 07:13:34.000000000 +0200
+++ fec.h       2008-01-30 13:10:34.000000000 +0100
@@ -148,6 +148,8 @@
 #define BD_ENET_RX_LAST         ((ushort)0x0800)
 #define BD_ENET_RX_FIRST        ((ushort)0x0400)
 #define BD_ENET_RX_MISS         ((ushort)0x0100)
+#define BD_ENET_RX_BC           ((ushort)0x0080)
+#define BD_ENET_RX_MC           ((ushort)0x0040)
 #define BD_ENET_RX_LG           ((ushort)0x0020)
 #define BD_ENET_RX_NO           ((ushort)0x0010)
 #define BD_ENET_RX_SH           ((ushort)0x0008)
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to