Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Dec 2009 12:14:24 GMT
From:      Yohanes Nugroho <yohanes@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 171644 for review
Message-ID:  <200912111214.nBBCEOIw081319@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/chv.cgi?CH=171644

Change 171644 by yohanes@econa on 2009/12/11 12:14:07

	small fixes

Affected files ...

.. //depot/projects/str91xx/src/sys/arm/econa/econa_machdep.c#7 edit
.. //depot/projects/str91xx/src/sys/arm/econa/if_ece.c#12 edit

Differences ...

==== //depot/projects/str91xx/src/sys/arm/econa/econa_machdep.c#7 (text+ko) ====

@@ -209,7 +209,7 @@
 	boot_arg1 = arg;
 	boot_arg2 = arg2;
 	boothowto = RB_VERBOSE;
-	boothowto |=  RB_SINGLE;
+	//boothowto |=  RB_SINGLE;
 
 	set_cpufuncs();
 	lastaddr = fake_preload_metadata();

==== //depot/projects/str91xx/src/sys/arm/econa/if_ece.c#12 (text+ko) ====

@@ -845,7 +845,11 @@
 	struct ece_softc *sc;
 	int err;
 	uint32_t mac_port_config;
-
+#if 0
+	int i;
+	int table_end;
+	char mac[ETHER_ADDR_LEN];
+#endif
 
 	struct ifnet *ifp;
 
@@ -857,6 +861,27 @@
 	initial_port0_config = RD4(sc, MAC_PORT_0_CONFIG);
 	initial_port1_config = RD4(sc, MAC_PORT_1_CONFIG);
 
+#if 0
+	printf("initial_switch_config %08x\n", initial_switch_config);
+	printf("initial_cpu_config %08x\n", 	initial_cpu_config);
+	printf("initial_port0_config %08x\n", 	initial_port0_config);
+	printf("initial_port1_config %08x\n", 	initial_port1_config);
+
+	WR4(sc, SWITCH_CONFIG, 0x3aa730);
+	WR4(sc, CPU_PORT_CONFIG, 0x804c0000);
+	WR4(sc, MAC_PORT_0_CONFIG, 0xe6463d94);
+	WR4(sc, MAC_PORT_1_CONFIG, 0x463d96);
+
+	table_end = read_mac_entry(sc, mac, 1);
+	while (!table_end) {
+		for (i = 0; i<ETHER_ADDR_LEN; i++) {
+			printf("%02x ", mac[i]);
+		}
+		printf("\n");
+		table_end = read_mac_entry(sc, mac, 0);
+	}
+
+#endif
 	/*Disable Port 0 */
 	mac_port_config = RD4(sc, MAC_PORT_0_CONFIG);
 	mac_port_config |= ((0x1 << 18));
@@ -1283,6 +1308,7 @@
 static int configure_cpu_port(struct ece_softc *sc)
 {
 	uint32_t cpu_port_config;
+	int i;
 
 	cpu_port_config = RD4(sc, CPU_PORT_CONFIG);
 	/*SA learning Disable */
@@ -1301,21 +1327,20 @@
 
 	set_pvid(sc,  PORT0_PVID, PORT1_PVID, CPU_PORT_PVID);
 
-	set_vlan_vid(sc, 0);
-	set_vlan_member(sc, 0);
-	set_vlan_tag(sc, 0);
+	for (i=0; i<8; i++) {
+		set_vlan_vid(sc, i);
+		set_vlan_member(sc, i);
+		set_vlan_tag(sc, i);
+	}
 
-
 	/* disable all interrupt status sources */
 	WR4(sc, INTERRUPT_MASK, 0xffff1fff);
 
 	/* clear previous interrupt sources */
 	WR4(sc, INTERRUPT_STATUS, 0x00001FFF);
 
-
 	WR4(sc, TS_DMA_CONTROL, 0);
 	WR4(sc, FS_DMA_CONTROL, 0);
-
 	return 0;
 }
 
@@ -1437,6 +1462,8 @@
 					mb->m_pkthdr.csum_data = 0xffff;
 			}
 
+			mb->m_len = mb->m_pkthdr.len = desc->length;
+
 			ECE_RXUNLOCK(sc);
 			(*ifp->if_input)(ifp, mb);
 			ECE_RXLOCK(sc);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912111214.nBBCEOIw081319>