[etherlab-users] RTL8168
Erwin Burgstaller
ethercat.berknapp at spamgourmet.com
Mon Dec 15 10:37:12 CET 2008
* Thu, Dec 11, 2008 - 13:41:33 +0800, li.peng - li.peng at advantech.com.cn:
> Sorry.I test it with slave.It can send data, but can not receive data.
> Could anyone help me to fix it, Thanks in advance.
Sorry, I can't help. I didn't got your driver to run, so I decided to
patch one by myself, but didn't get very far.
I took the source code for gigabit RealTek cards from kernel 2.6.25:
> r8169.c: RealTek 8169/8168/8101 ethernet driver.
As this good looking driver would not only support the 8168 and is made
by people from RealTek, this source is in my opinion worth much more for
patching than the one you've used.
The only thing I had to change to get it running in 2.6.22 as regular
Ethernet NIC had been this:
static void mdio_write(void __iomem *ioaddr, int reg_addr, int value)
{
int i;
@@ -1089,7 +1105,11 @@
.get_wol = rtl8169_get_wol,
.set_wol = rtl8169_set_wol,
.get_strings = rtl8169_get_strings,
- .get_sset_count = rtl8169_get_sset_count,
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,22)
+ .get_sset_count = rtl8169_get_sset_count,
+#else
+ .get_stats_count = rtl8169_get_sset_count,
+#endif
.get_ethtool_stats = rtl8169_get_ethtool_stats,
};
So it would cover basically all kernel versions from 2.6.22 to 2.6.25 so
far.
I would have much more to get involved in the basics of that source and
in EtherCAT, to patch it right. Just referring to the patches in the
8139too lead me to dead end street, and at the moment I've a lot more
important things to do, so we switched simply the hardware for the
moment (Advantech uno-2172 -> uno-3282).
But at the long run, I think, it would be important for the etherlab
Master to support more than just one currently available NIC, the e1000
based ones.
Greets,
Erwin
--
Erwin Burgstaller
More information about the Etherlab-users
mailing list