sk0: discard oversize frame (ether type ....)

mario.lobo at ipad.com.br mario.lobo at ipad.com.br
Wed Jan 5 04:47:36 PST 2005


Hi everyone;

Using freeBsd 5.3.

Trying to get the gigabit sk driver to work but even if I force it to 100baseTX full-duplex I still 
get when doing an ftp session:

sk0: discard oversize frame (ether type ....)
sk0: discard frame w/o leading ethernet header ( len 0 pkt len 0)

The transfer finishes ok though.
I have two machines conected via crossover cat 5 RJ-45. Besides the above errors, I get a 3.5 MB/s 
tranfer rate, which is way bellow the 10 MB/s I get when doing the same thing with 2 via-rhine 
boards.

I found this patch on google, but it´s a bit outside of my programming skills:

============================================
RCS file: /home/ncvs/src/sys/pci/if_sk.c,v
retrieving revision 1.86
diff -u -r1.86 if_sk.c
--- if_sk.c20 Aug 2004 06:22:04 -00001.86
+++ if_sk.c1 Nov 2004 00:54:20 -0000
@@ -1816,11 +1816,13 @@
 }
 
 /* Transmit */
-sc_if->sk_cdata.sk_tx_prod = idx;
-CSR_WRITE_4(sc, sc_if->sk_tx_bmu, SK_TXBMU_TX_START);
+if (idx != sc_if->sk_cdata.sk_tx_prod) {
+sc_if->sk_cdata.sk_tx_prod = idx;
+CSR_WRITE_4(sc, sc_if->sk_tx_bmu, SK_TXBMU_TX_START);
 
-/* Set a timeout in case the chip goes out to lunch. */
-ifp->if_timer = 5;
+/* Set a timeout in case the chip goes out to lunch. */
+ifp->if_timer = 5;
+}
 SK_IF_UNLOCK(sc_if);
 
 return;
@@ -1960,13 +1962,15 @@
 }
 sc_if->sk_cdata.sk_tx_cnt--;
 SK_INC(idx, SK_TX_RING_CNT);
-ifp->if_timer = 0;
 }
 
-sc_if->sk_cdata.sk_tx_cons = idx;
-
-if (cur_tx != NULL)
+if (sc_if->sk_cdata.sk_tx_cnt == 0) {
+ifp->if_timer = 0;
 ifp->if_flags &= ~IFF_OACTIVE;
+} else /* nudge chip to keep tx ring moving */
+CSR_WRITE_4(sc, sc_if->sk_tx_bmu, SK_TXBMU_TX_START);
+
+sc_if->sk_cdata.sk_tx_cons = idx;
 
 return;
 }
============================================

The person who found it said that he grabbed from netbsd.

Maybe one of you guys can shed some light on this for me.

Thanks,
-- 
   //|  //||
  // | // ||
-//--//---|| ARIO LOBO
//  //    ||
---------------------------------
mario.lobo at ipad.com.br
http://www.ipad.com.br



More information about the freebsd-questions mailing list