Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 05 Jan 2005 09:51:40 -0300
From:      mario.lobo@ipad.com.br
To:        freebsd-hackers@freebsd.org
Cc:        freebsd-questions@freebsd.org
Subject:   sk0: discard oversize frame (ether type ....)
Message-ID:  <41DBB8AC.25603.26B282@localhost>

next in thread | raw e-mail | index | archive | help

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@ipad.com.br
http://www.ipad.com.br



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41DBB8AC.25603.26B282>