New, yet unsupported USB-Ethernet adaptor
Hi all,
I bought an USB-Ethernet adaptor from delock (www.delock.de) and found it was not supported by linux from the vendor. So I played a little with lsusb and found it uses a MCS7830 chip from MosChip semiconductor (moschip.com). On their homepage I found a driver but it only was a precompiled Fedora4 module. So I wrote them an email and they sent me the whole source code for the module . Unfortunately it doesn't compile on my machine with a 2.6.16 kernel, but in does on a friend's one who uses 2.6.12, so I assume something has changed in the kernel interface (I get errors with sk_buff_head not containing "list").
I have no idea of how to correct this but maybe someone else can. I attached the sourcecode wich is licensed under the GPL.
Would be nice to see this supported in further kernel releases. The sourcecode can be found at ftp://supermihi.myftp.org
The output I get when running make is attached below.
Regards,
Michael
PS: I first posted this in usenet comp.os.linux.hardware and was redirected to send it to linux-usb-devel and lkml. Please tell me when I'm wrong.
Output of make:
michael@michi-pc ~/mcs7830FC4Ver1.0.0.1 $ LC_ALL="POSIX" make make -C /lib/modules/2.6.16-gentoo-r1/build SUBDIRS=/home/michael/mcs7830FC4Ver1.0.0.1 modules;
make[1]: Entering directory `/usr/src/linux-2.6.16-gentoo-r1'
CC [M] /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.o/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `init_status':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:383: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:383: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:383: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:383: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:383: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `skb_return':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:401: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:401: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:401: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:406: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:406: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `ANGInitializeDev':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:901: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:985: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:998: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1027: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `mdio_read':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1046: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1039: warning: unused variable `val'/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1039: warning: unused variable `val2'/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1041: warning: unused variable `ReadHifVal'/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `mdio_write':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1191: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1191: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `defer_bh':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1314: error: structure has no member named `list'/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `defer_kevent':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1336: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1336: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1338: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1338: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `rx_submit':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1358: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1373: error: `URB_ASYNC_UNLINK' undeclared (first use in this function) /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1373: error: (Each undeclared identifier is reported only once /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1373: error: for each function it appears in.)/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1389: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1394: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1394: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1402: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `rx_process':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1427: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `rx_complete':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1455: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1455: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1472: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1472: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1485: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1485: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1502: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1502: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1517: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `intr_complete':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1535: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1535: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1542: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1542: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1552: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1552: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `unlink_urbs':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1579: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1579: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `usbnet_stop':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1603: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1603: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1603: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1603: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1603: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1619: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1619: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `usbnet_open':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1653: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1653: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1653: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1653: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1653: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1664: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1664: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1673: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1673: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1684: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1684: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1684: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1684: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1684: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `usbnet_set_rx_mode':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1703: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1703: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1711: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1719: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1727: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1734: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1739: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1752: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `kevent':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1833: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1833: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1845: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1845: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1874: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1874: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1874: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1874: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1874: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1882: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1882: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `tx_complete':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1923: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1923: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1931: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1931: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `usbnet_start_xmit':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1975: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1983: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2000: error: `URB_ASYNC_UNLINK' undeclared (first use in this function) /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2024: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2024: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2042: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2057: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2057: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2065: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2065: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2065: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `usbnet_bh':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2095: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2095: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2124: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2124: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2124: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `usbnet_disconnect':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2158: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2158: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2158: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2158: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `usbnet_probe':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2194: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2194: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2194: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2207: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2234: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2321: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2321: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2321: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2321: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2321: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2321: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2321: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2321: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2321: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2321: warning: left-hand operand of comma expression has no effect /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: At top level:/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2407: error: unknown field owner' specified in initializer /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2407: warning: initialization from incompatible pointer type /home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function mdio_read':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1046: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1055: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1063: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1074: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1082: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1102: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1107: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `mcs7830_disconnect':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1269: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `mdio_write':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1191: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1192: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1196: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1208: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1218: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1230: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1239: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `defer_kevent':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1336: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1338: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `rx_submit':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1358: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1389: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1394: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1402: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `rx_complete':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1455: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1472: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1485: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1502: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1517: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `intr_complete':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1535: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1542: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1552: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `unlink_urbs':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1579: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `usbnet_stop':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1598: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1599: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1603: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1619: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1633: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `usbnet_open':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1649: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1653: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1664: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1673: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1684: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1693: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `kevent':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1833: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1845: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1874: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1882: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `tx_complete':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1923: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1926: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1931: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `usbnet_start_xmit':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1975: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1983: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2018: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2024: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2031: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2042: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2050: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2057: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2065: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `usbnet_bh':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2095: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2124: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `usbnet_disconnect':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2158: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: In function `usbnet_probe':/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2194: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2207: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2220: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2222: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2226: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2231: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2234: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:2321: warning: statement with no effect/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c: At top level:/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.c:1699: warning:
'usbnet_set_rx_mode' defined but not used
make[2]: *** [/home/michael/mcs7830FC4Ver1.0.0.1/mcs7830.o] Error 1 make[1]: *** [_module_/home/michael/mcs7830FC4Ver1.0.0.1] Error 2 make[1]: Leaving directory `/usr/src/linux-2.6.16-gentoo-r1'
make: *** [default] Error 2
Quoted 11 lines · Michael Helmling
I bought an USB-Ethernet adaptor from delock (www.delock.de) and found it was not supported by linux from the vendor. So I played a little with lsusb and found it uses a MCS7830 chip from MosChip semiconductor (moschip.com). On their homepage I found a driver but it only was a precompiled Fedora4 module. So I wrote them an email and they sent me the whole source code for the module . Unfortunately it doesn't compile on my machine with a 2.6.16 kernel, but in does on a friend's one who uses 2.6.12, so I assume something has changed in the kernel interface (I get errors with
sk_buff_headnot containing "list").
I have no idea of how to correct this but maybe someone else can. I attached the sourcecode wich is licensed under the GPL.
Great. below is an UNTESTED patch which should get it to build fine with more recent kernels. (Builds on 2.6.17-rc3). Give it a try if you can and let us know.
--
mcs7830.c +1 -1
@@ -1309,9 +1309,9 @@* completion callbacks. 2.5 should have fixed those bugs... */ -static void defer_bh (struct usbnet *dev,struct sk_buff *skb) +static void defer_bh (struct usbnet *dev, struct sk_buff *skb, struct
sk_buff_head *list)
{
- struct sk_buff_head *list = skb->list;
+
unsigned long flags; spin_lock_irqsave (&list->lock, flags);
@@ -1370,7 +1370,7 @@
usb_fill_bulk_urb (urb, dev->udev, dev->in, skb->data, size, rx_complete, skb);
- urb->transfer_flags |= URB_ASYNC_UNLINK;
+
spin_lock_irqsave (&dev->rxq.lock, lockflags);
@@ -1503,7 +1503,7 @@
break; }
- defer_bh (dev, skb);
+ defer_bh (dev, skb, &dev->txq);
if (urb) {
if (netif_running (dev->net)@@ -1935,7 +1935,7 @@
urb->dev = NULL; entry->state = tx_done;
- defer_bh (dev, skb);
+ defer_bh (dev, skb, &dev->txq);
}
/*-------------------------------------------------------------------------*/ @@ -1997,7 +1997,7 @@
usb_fill_bulk_urb (urb, dev->udev, dev->out, skb->data, skb->len, tx_complete, skb);
- urb->transfer_flags |= URB_ASYNC_UNLINK;
+
/* don't assume the hardware handles USB_ZERO_PACKET
* NOTE: strictly conforming cdc-ether devices should expect
@@ -2044,7 +2044,7 @@
}
usb_fill_bulk_urb (Zerourb, dev->udev, dev->out,\
skb->data, 0, Zero_complete, NULL);
- Zerourb->transfer_flags |= URB_ASYNC_UNLINK;
+
retval2 = usb_submit_urb (urb, GFP_ATOMIC);
if(retval2 !=0)
printk("Error sending Zero Length packet in transmission\n");@@ -2404,8 +2404,10 @@MODULE_DEVICE_TABLE (usb, products);
static struct usb_driver usbnet_driver = {
- .owner = THIS_MODULE,
- .name = driver_name,
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = driver_name,
+ },
.id_table = products,
.probe = usbnet_probe,
.disconnect = usbnet_disconnect,
Quoted 4 lines · Michael Helmling
Thank you very much for the immediate answer.
I applied the patch - well, I had to do this manually, for some reason, I assume bad formatting in my mail program, patch -p0 < patch1 didn't work. Or am I using the wrong command?
You shoud use patch -p1< patch
Quoted 6 lines
Anyway, I changed the lines manually, and now I can compile and load the module.
If I load the module, dmesg gives:usbcore: registered new driver <NULL>
Quoted 8 lines
Then plugging in the adaptor:
usb 2-10: new high speed USB device using
ehci_hcdand address 5 usb 2-10: configuration #1 chosen from 1 choiceBut no eth1 shows up, and module loading and plugging the device seem to be independent. I manually loaded usbnet but it didn't help. Sorry, I really have no experience with kernel or usb development. ;)
Me neither. It was a quick & dirty patch, I must have missed something. I'll toy around with it some more. Maybe someone more experienced could take a look? :)
P.S In the future, make sure you use reply-to-all. Thanks
Am Dienstag 02 Mai 2006 22:40 schrieb Ioan Ionita:
Quoted 4 lines · Michael Helmling
Quoted 3 lines
Thank you very much for the immediate answer.
I applied the patch - well, I had to do this manually, for some reason, I assume bad formatting in my mail program, patch -p0 < patch1 didn't work.
Or
Quoted 3 lines
Quoted 1 line
am I using the wrong command?
You shoud use patch -p1< patch
$ patch -p1 < patch patching file mcs7830.c Hunk #1 FAILED at 1309. Hunk #2 FAILED at 1370. Hunk #3 FAILED at 1503. Hunk #4 FAILED at 1935. Hunk #5 FAILED at 1997. Hunk #6 FAILED at 2044. Hunk #7 FAILED at 2404. 7 out of 7 hunks FAILED -- saving rejects to file mcs7830.c.rej
Don't know why. :( But since it are only a few lines this isn't a major problem.
Quoted 2 lines
Me neither. It was a quick & dirty patch, I must have missed something. I'll toy around with it some more.
Good luck!
Quoted 3 lines
P.SIn the future, make sure you use reply-to-all. Thanks
Ok.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Markus,
I'm sorry but your attachment has 0kb size. :(
Quoted 55 lines · Markus Rechberger
Hi Michael,
I mailed you the complete package it compiled fine but I'm also unable to test since I don't have such a device either
I should have known about this thread earlier :)Markus
Quoted 32 lines · Michael Helmling
Am Dienstag 02 Mai 2006 22:40 schrieb Ioan Ionita:
Quoted 3 lines · Michael Helmling
Quoted 2 lines
Thank you very much for the immediate answer.
I applied the patch - well, I had to do this manually, for somereason, I
Quoted 1 line
Quoted 1 line
assume bad formatting in my mail program, patch -p0 < patch1 didn't
work.
OrQuoted 3 lines
Quoted 1 line
am I using the wrong command?
You shoud use patch -p1< patch
$ patch -p1 < patch patching file mcs7830.c Hunk #1 FAILED at 1309. Hunk #2 FAILED at 1370. Hunk #3 FAILED at 1503. Hunk #4 FAILED at 1935. Hunk #5 FAILED at 1997. Hunk #6 FAILED at 2044. Hunk #7 FAILED at 2404. 7 out of 7 hunks FAILED -- saving rejects to file mcs7830.c.rejDon't know why. :( But since it are only a few lines this isn't a major problem.
Quoted 2 lines
Me neither. It was a quick & dirty patch, I must have missed something. I'll toy around with it some more.
Quoted 9 lines
Good luck!
Quoted 3 lines
P.SIn the future, make sure you use reply-to-all. ThanksOk.
--
Markus Rechberger
Am Dienstag, 2. Mai 2006 22:40 schrieb Ioan Ionita:
Quoted 10 lines
Quoted 6 lines
usb 2-10: new high speed USB device using
ehci_hcdand address 5 usb 2-10: configuration #1 chosen from 1 choiceBut no eth1 shows up, and module loading and plugging the device seem to be independent. I manually loaded usbnet but it didn't help. Sorry, I really have no experience with kernel or usb development. ;);)
Me neither. It was a quick & dirty patch, I must have missed something. I'll toy around with it some more. Maybe someone more experienced could take a look?
You did compile with CONFIG_USB_MOSCHIP, didn't you?
Regards
Oliver
Quoted 11 lines · Michael Helmling
Hi all,
I bought an USB-Ethernet adaptor from delock (www.delock.de) and found it was not supported by linux from the vendor. So I played a little with lsusb and found it uses a MCS7830 chip from MosChip semiconductor (moschip.com). On their homepage I found a driver but it only was a precompiled Fedora4 module. So I wrote them an email and they sent me the whole source code for the module...
Would be nice to see this supported in further kernel releases. The sourcecode can be found at ftp://supermihi.myftp.org
Was it you who removed the copyrights from the "usbnet" driver and changed the author assertion to one "M Subrahmanya Srihdar" ?? I'm guessing the latter; the www.moschip.com site implies that its engineering HW is in India.
Either way, blatant plagiarism and theft of copyright is unlikely to get into upstream kernels.
Likewise, that is NOT the way to integrate with the "usbnet" driver framework. See how it's done by the "asix.c" driver module.
In fact, I'm very tempted to ask them to withdraw their distribution, since they have clearly violated pretty basic terms of the GPL. How long have they been doing that? How much money have they made by this theft?
That stuff is correctible ... but until they correct their problems, I'm not inclined to let them continue distributing stolen software.
- Dave
Quoted 4 lines · David Brownell
Quoted 3 lines · Michael Helmling
Hi all,
I bought an USB-Ethernet adaptor from delock (www.delock.de) and found it
was
Quoted 1 line
Quoted 1 line
not supported by linux from the vendor. So I played a little with lsusb
and
Quoted 2 lines
Quoted 2 lines
found it uses a MCS7830 chip from MosChip semiconductor (moschip.com). On their homepage I found a driver but it only was a precompiled Fedora4
module.
Quoted 10 lines
Quoted 5 lines
So I wrote them an email and they sent me the whole source code for the module...
Would be nice to see this supported in further kernel releases. The sourcecode can be found at ftp://supermihi.myftp.org
Was it you who removed the copyrights from the "usbnet" driver and changed the author assertion to one "M Subrahmanya Srihdar" ?? I'm guessing the latter; the www.moschip.com site implies that its engineering HW is in India.
No, I did not change the code in any way, it is exactly the version they mailed me. But I don't really understand what you are saying about the usbnet module. They gave me the sourcecode for a yet not available kernel module "mcs7830", not usbnet. Or did they just modify usbnet? I don't know enough about such things to distinguish from both.
Quoted 3 lines
Either way, blatant plagiarism and theft of copyright is unlikely to get into upstream kernels.
I personally have the feeling that they didn't do this by purpose. They were very willing to help me with the driver and don't seem to understand much of kernel development. Anyway, if this IS a copyright violation, they should really change it quickly.
Quoted 4 lines
Likewise, that is NOT the way to integrate with the "usbnet" driver framework. See how it's done by the "
asix.c" driver module.
Sorry this isn't useful for me, I'm not a developer, more than ever no kernel developer. ;)
Quoted 3 lines
In fact, I'm very tempted to ask them to withdraw their distribution, since they have clearly violated pretty basic terms of the GPL.
Maybe you should do this, since I don't know much about the details of GPL and my english is really bad. *g*
Quoted 9 lines
How
long have they been doing that? How much money have they made by this theft?That stuff is correctible ... but until they correct their problems, I'm not inclined to let them continue distributing stolen software.
This is comprehensible. But, nevertheless this is the possibility of supporting another hardware device in linux, and we shouldn't forsake it.
- Michael
Quoted 7 lines · Michael Helmling
Quoted 4 lines
Was it you who removed the copyrights from the "usbnet" driver and changed the author assertion to one "M Subrahmanya Srihdar" ?? I'm guessing the latter; the www.moschip.com site implies that its engineering HW is in India.
No, I did not change the code in any way, it is exactly the version they mailed me.
That's what I strongly suspected.
Quoted 4 lines
But I don't really understand what you are saying about the usbnet module. They gave me the sourcecode for a yet not available kernel module "mcs7830", not usbnet. Or did they just modify usbnet? I don't know enough about such things to distinguish from both.
They just hacked "usbnet". There are huge chunks of code, and comments, that are clearly identical. At least half of the "moschip" driver.
Quoted 7 lines
Quoted 2 lines
Either way, blatant plagiarism and theft of copyright is unlikely to get into upstream kernels.
I personally have the feeling that they didn't do this by purpose. They were very willing to help me with the driver and don't seem to understand much of kernel development. Anyway, if this IS a copyright violation, they should really change it quickly.
"M Subrahmanya Srihdar" didn't "accidentally" copy the bulk of usbnet, remove all the attributions, and replace them ... not possible. There were certainly a few chip-specific additions of course, right where "usbnet" expects them, but the core driver is obviously all "usbnet" code.
- Dave
Quoted 5 lines · David Brownell
On Tuesday 02 May 2006 10:06 pm, Michael Helmling wrote:
They just hacked "usbnet". There are huge chunks of code, and comments, that are clearly identical. At least half of the "moschip" driver.
Then what they did really isn't right.
Quoted 7 lines
"M Subrahmanya Srihdar" didn't "accidentally" copy the bulk of usbnet, remove all
the attributions, and replace them ... not possible. There were certainly a few
chip-specific additions of course, right where "usbnet" expects them, but the
core driver is obviously all "usbnet" code.
So, what this Mr. Srihdar di wrong is to set his own name in the "copyright" field instead of using yours. The process of modifying a GPLed module itself is ok, am I right with this?
So it should be possible to convince him of this nuisance, and then use the changes he made to make moschips device working.
Regards,
Michael
Quoted 5 lines · Michael Helmling
So, what this Mr. Srihdar di wrong is to set his own name in the "copyright" field instead of using yours. The process of modifying a GPLed module itself is ok, am I right with this?
So it should be possible to convince him of this nuisance, and then use the changes he made to make moschips device working.
Correct. He is violating the license in a number of ways, though it probably isn't totally intentional. The development on that driver probably began before usbnet was modularized to allow for the componentizing of driver specific code outside of usbnet. What he should do would be to create a moschip.c that uses usbnet as a support module - just like asix.c does. In this file, he can have his sole Copyright attribution and not have to worry about following changes/updates to usbnet. Of course, if he communicated his development efforts with the community, he would have received all of this information long ago and we'd likely help shake out bugs in the code to make it a more robust driver.
Signature · 1 line
David Hollis <[email protected]>
Quoted 8 lines · David Hollis
Quoted 5 lines · Michael Helmling
So, what this Mr. Srihdar di wrong is to set his own name in the "copyright" field instead of using yours. The process of modifying a GPLed module itself is ok, am I right with this?
So it should be possible to convince him of this nuisance, and then use the changes he made to make moschips device working.
Quoted 4 lines
Correct. He is violating the license in a number of ways, though it probably isn't totally intentional. The development on that driver probably began before usbnet was modularized to allow for the componentizing of driver specific code outside of usbnet.
After looking at mcs7830.c source this seems highly unlikely.
Quoted 8 lines
What he
should do would be to create amoschip.cthat uses usbnet as a support module - just likeasix.cdoes. In this file, he can have his sole Copyright attribution and not have to worry about following changes/updates to usbnet. Of course, if he communicated his development efforts with the community, he would have received all of this information long ago and we'd likely help shake out bugs in the code to make it a more robust driver.
IMHO we should do it now. If there is no volunteers, I can try to do it, but it will be my first USB driver, so don't expect results soon.
Quoted 9 lines · Andrey Panin
Quoted 8 lines
What he
should do would be to create amoschip.cthat uses usbnet as a support module - just likeasix.cdoes. In this file, he can have his sole Copyright attribution and not have to worry about following changes/updates to usbnet. Of course, if he communicated his development efforts with the community, he would have received all of this information long ago and we'd likely help shake out bugs in the code to make it a more robust driver.
Quoted 3 lines
IMHO we should do it now. If there is no volunteers, I can try to do it, but it will be my first USB driver, so don't expect results soon.
That would be great, I could give you feedback if / how it works. But I think someone versed in the GPL should contact moschip to clear things a bit.
Quoted 10 lines · Michael Helmling
Quoted 9 lines · Andrey Panin
Quoted 8 lines
What he
should do would be to create amoschip.cthat uses usbnet as a support module - just likeasix.cdoes. In this file, he can have his sole Copyright attribution and not have to worry about following changes/updates to usbnet. Of course, if he communicated his development efforts with the community, he would have received all of this information long ago and we'd likely help shake out bugs in the code to make it a more robust driver.
Quoted 7 lines
Quoted 3 lines
IMHO we should do it now. If there is no volunteers, I can try to do it, but it will be my first USB driver, so don't expect results soon.
That would be great, I could give you feedback if / how it works. But I think someone versed in the GPL should contact moschip to clear things a bit.
No need to pull them into the loop, I'd say. What they done is wrong, but we can correct it without their help.
Pavel
Signature · 1 line
Thanks, Sharp!
Quoted 2 lines · David Hollis
Correct. He is violating the license in a number of ways, though it probably isn't totally intentional.
Removing copyright and licence statements can't have been anything BUT intentional.
That's really a basic rule, pretty much a "programming 101" thing. You know, like "test your code", "don't remove other folks' copyrights", "don't try to change the licence on code copyrighted by someone else".
Quoted 3 lines
The development on that driver
probably began before usbnet was modularized to allow for the componentizing of driver specific code outside of usbnet.
Well, it's always allowed driver modularization ... the change was only to move the hardware-specific parts outside of the driver core.
I certainly could see how work on this Moschip support might have started before September of last year, when the core was more fully split out. But that's still no excuse for this kind of "piracy".
- Dave
Quoted 2 lines · David Brownell
Well, it's always allowed driver modularization ... the change was only to move the hardware-specific parts outside of the driver core.
Bad wording there. Last September I submitted patches to split out the driver core and the hardware-specific parts into separate source and object modules ... the core was always separate from the parts applying to specific hardware. (As you know, since you adopted that approach for your ASIX code.) What changed was the "one big file" model, which had stopped making sense.
- Dave
Hi!
Quoted 10 lines
Quoted 9 lines
I bought an USB-Ethernet adaptor from delock (www.delock.de) and found it was not supported by linux from the vendor. So I played a little with lsusb and found it uses a MCS7830 chip from MosChip semiconductor (moschip.com). On their homepage I found a driver but it only was a precompiled Fedora4 module. So I wrote them an email and they sent me the whole source code for the module...
Would be nice to see this supported in further kernel releases. The sourcecode can be found at ftp://supermihi.myftp.org
Quoted 7 lines
Was it you who removed the copyrights from the "usbnet" driver and changed the author assertion to one "M Subrahmanya Srihdar" ?? I'm guessing the latter; the www.moschip.com site implies that its engineering HW is in India.
Either way, blatant plagiarism and theft of copyright is unlikely to get into upstream kernels.
Well, I suspect that poor soul did not know what (s)he was doing. They are clearly trying to do the right thing... just paste back original copyrights and be done with it.
Pavel
Signature · 1 line
Thanks, Sharp!