SMSC 7500 device driver - unable to build on 2.6.32-4-pve

frankin

New Member
Mar 28, 2013
3
0
1
Hi. I have a pve-based kernel modules build issue. I apologize in advance for an extra long post.
I am trying to get a SMSC7500 USB Ethernet dongle to be recognized by a Linux Proxmox host, but it doesn't initialize the device because the module is not available.

I installed RedHat Fedora 14 32-bit version and the driver initialized automatically when I plugged the device in. works fine. no issues.
I installed RedHat Fedora 17 AMD64(64-bit) version and the driver initialized automatically when I plugged the device in. works fine. no issues.

lsmod | grep smsc
smsc75xx 28147 0
usbnet 31061 1 smsc75xx
mii 13527 3 r8169,usbnet,smsc75xx

modinfo smsc75xx.ko
filename: /lib/modules/3.3.4-5.fc17.x86_64/kernel/drivers/net/usb/smsc75xx.ko
license: GPL
description: SMSC75XX USB 2.0 Gigabit Ethernet Devices
author: Steve Glendinning <steve.glendinning@smsc.com>
author: Nancy Lin
alias: usb:v0424p7505d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0424p7500d*dc*dsc*dp*ic*isc*ip*
depends: usbnet,mii
intree: Y
vermagic: 3.3.4-5.fc17.x86_64 SMP mod_unload
parm: turbo_mode:Enable multiple frames per Rx transaction (bool)

modinfo usbnet.ko
filename: /lib/modules/3.3.4-5.fc17.x86_64/kernel/drivers/net/usb/usbnet.ko
license: GPL
description: USB network driver framework
author: David Brownell
depends: mii
intree: Y
vermagic: 3.3.4-5.fc17.x86_64 SMP mod_unload
parm: msg_level:Override default message level (int)

modinfo mii.ko
filename: /lib/modules/3.3.4-5.fc17.x86_64/kernel/drivers/net/mii.ko
license: GPL
description: MII hardware support library
author: Jeff Garzik <jgarzik@pobox.com>
depends:
intree: Y
vermagic: 3.3.4-5.fc17.x86_64 SMP mod_unload


dmesg | tail -10
[ 265.130141] usb 1-1.2: new high-speed USB device number 6 using ehci_hcd
[ 265.215713] usb 1-1.2: New USB device found, idVendor=0424, idProduct=7500
[ 265.215717] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 265.215720] usb 1-1.2: Product: USB Gigabit LAN
[ 265.215723] usb 1-1.2: Manufacturer: WS
[ 265.215724] usb 1-1.2: SerialNumber: 0000000071
[ 265.284306] smsc75xx v1.0.0
[ 265.329775] smsc75xx 1-1.2:1.0: eth0: register 'smsc75xx' at usb-0000:00:1a.0-1.2, smsc75xx USB 2.0 Gigabit Ethernet, 80:3f:5d:08:cd:61
[ 265.329808] usbcore: registered new interface driver smsc75xx
[ 276.413745] eth0: no IPv6 routers present


Installed a fully clean iso image of Debian 5.0.9 64-bit version and the USB device is recognized by the system, but doesn't load a driver module automatically.

su
apt-get install build-essential
apt-get install linux-headers-2.6.26-2-amd64
make
cp smsc7500.ko /lib/modules/2.6.26-2-amd64/kernel/drivers/net/usb/
chmod 644 /lib/modules/2.6.26-2-amd64/kernel/drivers/net/usb/smsc7500.ko
insmod /lib/modules/2.6.26-2-amd64/kernel/drivers/net/usb/smsc7500.ko

I got a kernel fault, but device initializes as 1000 (Gb) in ifconfig -a and appears to work fine.
Debian 5.09 kernel version is 2.6.26-2... the version of Debian-Proxmox I am running is very close to this Linux flavor/version.

====
Now back to my actual issue:

masterhost2:# pveversion --verbose
pve-manager: 1.9-26 (pve-manager/1.9/6567)
running kernel: 2.6.32-4-pve
proxmox-ve-2.6.32: 1.8-33
pve-kernel-2.6.32-4-pve: 2.6.32-33
qemu-server: 1.1-32
pve-firmware: 1.0-15
libpve-storage-perl: 1.0-19
vncterm: 0.9-2
vzctl: 3.0.29-3pve1
vzdump: 1.2-16
vzprocps: 2.0.11-2
vzquota: 3.0.11-1
pve-qemu-kvm: 0.14.1-1
ksm-control-daemon: 1.0-6

This machine is on a closed network, without internet access. I installed the following packages to build my driver (running as root):
linux-kbuild-2.6.32_2.6.32-1_amd64.deb
pve-headers-2.6.32-4-pve_2.6.32-33_amd64.deb
pve-kernel-2.6.32-4-pve_2.6.32-33_amd64.deb

binutils_2.18.1~cvs20080103-7_amd64.deb
build-essential_11.4_amd64.deb
dpkg-dev_1.14.31_all.deb
g++_4.3.2-2_amd64.deb
g++-4.3_4.3.2-1.1_amd64.deb
gcc_4.3.2-2_amd64.deb
gcc-4.3_4.3.2-1.1_amd64.deb
libc6-dev_2.7-18lenny7_amd64.deb
libgomp1_4.3.2-1.1_amd64.deb
libstdc++6-4.3-dev_4.3.2-1.1_amd64.deb
libtimedate-perl_1.1600-9_all.deb
linux-libc-dev_2.6.32-48squeeze1_amd64.deb
make_3.81-5_amd64.deb

If I run make on the smsc7500 source, I get a compile error:

masterhost2:~/starTechDriver# ls
Makefile smsc7500usbnet.c smsclan7500.c
ioctl_7500.h smsc7500usbnet.h smsclan7500.h
readme.txt smsc7500version.h

masterhost2:~/starTechDriver# make
make -C /lib/modules/2.6.32-4-pve/build SUBDIRS=/root/starTechDriver modules
make[1]: Entering directory `/lib/modules/2.6.32-4-pve/build'
make[1]: *** No rule to make target `modules'. Stop.
make[1]: Leaving directory `/lib/modules/2.6.32-4-pve/build'
make: *** [modules] Error 2

From inspecting the significant differences between the kernel-source directories (/usr/src, /lib/modules) on the 2.6.32-4-pve and Debian-2.6.26-2 systems, it looks like part of the PVE kernel-source is missing.
That directory looks like this:
/lib/modules/2.6.32-4-pve/build# ls
linux-headers-2.6.32-4-pve

/lib/modules/2.6.32-4-pve/build/linux-headers-2.6.32-4-pve# ls -al
total 900
drwxr-xr-x 23 root root 4096 Mar 27 20:31 .
drwxrwsr-x 4 root src 4096 Mar 27 19:57 ..
-rw-r--r-- 1 root root 106203 May 9 2011 .config
drwxr-xr-x 2 root root 4096 Mar 27 18:26 .tmp_versions
-rw-r----- 1 1000 1000 2430 Dec 2 2009 Kbuild
-rw-r----- 1 root root 55324 May 9 2011 Makefile
-rw-r--r-- 1 root root 646477 May 9 2011 Module.symvers
drwxr-xr-x 25 root root 4096 Mar 27 20:31 arch
drwxr-xr-x 2 root root 4096 Mar 27 20:31 block
drwxr-xr-x 3 root root 4096 Mar 27 20:31 crypto
drwxr-xr-x 87 root root 4096 Mar 27 20:31 drivers
drwxr-xr-x 2 root root 4096 Mar 27 20:31 firmware
drwxr-xr-x 71 root root 4096 Mar 27 20:31 fs
drwxr-x--- 23 1000 1000 4096 Mar 27 20:31 include
drwxr-xr-x 2 root root 4096 Mar 27 20:31 init
drwxr-xr-x 2 root root 4096 Mar 27 20:31 ipc
drwxr-xr-x 10 root root 4096 Mar 27 20:31 kernel
drwxr-xr-x 6 root root 4096 Mar 27 20:31 lib
drwxr-xr-x 2 root root 4096 Mar 27 20:31 mm
-rw-r--r-- 1 root root 0 Mar 27 19:59 modules.order
drwxr-xr-x 48 root root 4096 Mar 27 20:31 net
drwxr-xr-x 6 root root 4096 Mar 27 20:31 samples
drwxr-x--- 12 1000 1000 4096 Mar 27 20:31 scripts
drwxr-xr-x 7 root root 4096 Mar 27 20:31 security
drwxr-xr-x 21 root root 4096 Mar 27 20:31 sound
drwxr-xr-x 3 root root 4096 Jul 1 2011 tools
drwxr-xr-x 2 root root 4096 Mar 27 20:31 usr
drwxr-xr-x 3 root root 4096 Jul 1 2011 virt

Does anyone have any advice to work towards building a module that will work for my PVE system?

Do I need something like this?:
ftp://download.proxmox.com/sources/pve-kernel-2.6.32_2011-09-21.tar.gz


Thanks in advance.
 
wrong forum, I will move it.
 
(cutting out lots of interim tasks and efforts for brevity)
I installed the 1.7 proxmox from the CD ISO image. This is 2.6.32-4-pve(the kernel I need to compile against to build the smsc7500.ko module).
Install the linux-headers, make, and it builds fine.
Insmod the module and I get a module_layout error. In short, the kernel version on my install is different than the kernel-source files under /lib/modules/`uname -r`.
grumble.

After that, I install the pve-kernel-source package and try to make all. Lots of errors/build-complaints to overcome. Then the make errors with a bounds.c file error. The module.symvers, Makefile, and bounds.c files all are present and seem fine.
I'm kind of stuck trying to correctly rebuild the kernel source, because I'm not sure what chicken and which egg to install first.

So, getting back to the original problem, I have a 2.6.32-4-pve system that needs a compatible device driver to be loaded as a kernel module for my USB ethernet device. It does not compile on my target system. On newer systems, including on the latest PVE version, it builds and insmods the module correctly. On a duplicate and similar system it builds fine, but doesn't insmod because the kernel source differs from the running kernel.
When I try to install compatible kernel source, linux-headers, and everything needed to build the kernel source for a 2.6.32-4-pve system, I run into complications that I don't know how to solve. Namely, I don't know how to build the right environment with the kernel.org 2.6.32-4 kernel source and the pve kernel source. Using just the pve kernel source, it doesn't want to do anything -- no make config or make mrproper or make prepare or make menuconfig or make -anything- except make all. I assume you don't need the 'public' version of 2.6.32-4 source at all, but the pve kernel source appears incomplete to me. I don't wish to rebuild the kernel, I wish to create the correct environment to build the smsc7500.ko module.
Please help, thanks.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!