Help - Search - Members - Calendar
Full Version: Help! Usb Nic Driver Always "initializing"!
OESF Forums > Distros, Development, and Model Specific Forums > Distro Support and Discussion > pdaXrom
wellswang
Now, I've built the DM9601 USB NIC driver, and made it can be loaded automatically.
but it still can't use, because the driver's status always be "initializing":

CODE
Module                  Size  Used by    Tainted: P  
dm9601                 13428   1  (initializing)
usb_ohci_pxa27x        21680   0  (unused)
usbcore                64176   1  [dm9601 usb_ohci_pxa27x]
squashfs               31280   1  (autoclean)
mousedev                4544   1
rfcomm                 33556   0  (autoclean)
l2cap                  16384   2  (autoclean) [rfcomm]
bluez                  33188   2  (autoclean) [rfcomm l2cap]
pxa27x_bi              24828   0  (unused)
net_fd                 25192   0  (unused)
usbdcore               35464   0  [pxa27x_bi net_fd]
usbdmonitor             5456   0
usb-monitor             6440   0
mmc_pxa                23856   1
sdcardmgr               1512   0  (unused)
mmc_block              24128   1
mmc_core                7928   2  [mmc_pxa mmc_block]
bvdd                   11104   0  (unused)


dmesg said, it's a memory page allocate error:
Unable to handle kernel paging request at virtual address 01100117
CODE
dm9601.c: dm9601.c: v0.0.6 2001/05/24 (C) 1999-2000 Petko Manolov (petkan@dce.bg)
usb.c: registered new driver dm9601
Unable to handle kernel paging request at virtual address 01100117
mm = c00184e0 pgd = c12b0000
*pgd = 00000000, *pmd = 00000000
Internal error: Oops: 0
CPU: 0
pc : [<c5c0b310>]    lr : [<c5bec048>]    Tainted: P
sp : c1e31e18  ip : c5c0c0fc  fp : c1e31e4c
r10: 00000000  r9 : c3126600  r8 : c3126600
r7 : c5c0c314  r6 : c35f7460  r5 : c5c0c2dc  r4 : c5c0c334
r3 : 01100112  r2 : 000001e0  r1 : 00000000  r0 : c3126600
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  Segment user
Control: 197F  Table: A12B0000  DAC: 00000015  PID:  0
Process modprobe (pid: 1974, stack limit = 0xc1e30418)
Stack: (0xc1e31e18 to 0xc1e32000)
1e00:                                                       c1e31e24 c006eeb8
1e20: c006ea14 c5c0c334 c5c0c2dc c35f7460 c5c0c314 00000000 c3126600 00000000
1e40: c1e31e88 c1e31e50 c5bec048 c5c0b2fc c3126624 00000000 c5bfa1f0 00000000
1e60: 00000000 c3126600 c3126724 00000060 ffffffea c1e30000 00047c40 c1e31ea4
1e80: c1e31e8c c5bebcc0 c5bebee0 00000001 c3126800 c3126924 c1e31ec0 c1e31ea8
1ea0: c5bebc80 c5bebc54 c5bfa1f8 c5bfa1f8 c5bfaa50 c1e31edc c1e31ec4 c5beb17c
1ec0: c5bebc54 00000000 c5c0c314 c1d88000 c1e31ef4 c1e31ee0 c5beb108 c5beb12c
1ee0: 00000000 c5c09000 c1e31f04 c1e31ef8 c5c0b8d8 c5beb06c c1e31fa0 c1e31f08
1f00: c0034fd0 c5c0b83c c1d88000 c2ce3000 00000006 c35f7400 00000060 c5bfc000
1f20: c5c09060 00003474 00000000 00000000 00000000 00000000 00000000 00000000
1f40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1f60: 00000000 00000000 00000000 00000000 00000000 00000000 00000003 c5c09000
1f80: 00000000 00000080 c001eb24 c1e30000 00000000 00000000 c1e31fa4 c001e7c0
1fa0: c00348d0 00000003 00000000 000321a8 00047c40 ffffffff 00000000 00000003
1fc0: c5c09000 00000000 000401e0 00003474 00000000 00000000 00000006 400e8ab0
1fe0: bfffa240 0000c938 400e8abc 60000010 000321a8 c1e30000 00000000 00000029
Backtrace:
Function entered at [<c5c0b2f0>] from [<c5bec048>]
Function entered at [<c5bebed4>] from [<c5bebcc0>]
Function entered at [<c5bebc48>] from [<c5bebc80>]
r6 = C3126924  r5 = C3126800  r4 = 00000001
Function entered at [<c5bebc48>] from [<c5beb17c>]
r6 = C5BFAA50  r5 = C5BFA1F8  r4 = C5BFA1F8
Function entered at [<c5beb120>] from [<c5beb108>]
r6 = C1D88000  r5 = C5C0C314  r4 = 00000000
Function entered at [<c5beb060>] from [<c5c0b8d8>]
r5 = C5C09000  r4 = 00000000
Function entered at [<c5c0b830>] from [<c0034fd0>]
Function entered at [<c00348c4>] from [<c001e7c0>]
Code: e59fc2f0 e24dd00c e59830e4 e06c2002 (e5d31005)


I think maybe it related with the warning messages I've got during compile process:

CODE
# make
arm-cacko-linux-gnu-gcc -DMODULE -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O6 -c dm9601.c
In file included from /opt/cross/arm/2.95.3-2.15/lib/gcc-lib/arm-cacko-linux-gnu/2.95.3/../../../../arm-cacko-linux-gnu/sys-include/asm/pgalloc.h:23,
                from /usr/src/linux/include/linux/highmem.h:5,
                from /usr/src/linux/include/linux/skbuff.h:29,
                from /usr/src/linux/include/linux/netdevice.h:147,
                from dm9601.c:57:
/opt/cross/arm/2.95.3-2.15/lib/gcc-lib/arm-cacko-linux-gnu/2.95.3/../../../../arm-cacko-linux-gnu/sys-include/asm/proc/cache.h: In function `flush_page_to_ram':
/opt/cross/arm/2.95.3-2.15/lib/gcc-lib/arm-cacko-linux-gnu/2.95.3/../../../../arm-cacko-linux-gnu/sys-include/asm/proc/cache.h:118: warning: passing arg 1 of `cpu_pid_va_to_mva' makes integer from pointer without a cast
/opt/cross/arm/2.95.3-2.15/lib/gcc-lib/arm-cacko-linux-gnu/2.95.3/../../../../arm-cacko-linux-gnu/sys-include/asm/proc/cache.h:118: warning: passing arg 1 of `cpu_xscale_flush_ram_page' makes pointer from integer without a cast
/opt/cross/arm/2.95.3-2.15/lib/gcc-lib/arm-cacko-linux-gnu/2.95.3/../../../../arm-cacko-linux-gnu/sys-include/asm/proc/cache.h: In function `flush_dcache_page':
/opt/cross/arm/2.95.3-2.15/lib/gcc-lib/arm-cacko-linux-gnu/2.95.3/../../../../arm-cacko-linux-gnu/sys-include/asm/proc/cache.h:159: warning: passing arg 1 of `cpu_pid_va_to_mva' makes integer from pointer without a cast
In file included from /usr/src/linux/include/linux/highmem.h:5,
                from /usr/src/linux/include/linux/skbuff.h:29,
                from /usr/src/linux/include/linux/netdevice.h:147,
                from dm9601.c:57:
/opt/cross/arm/2.95.3-2.15/lib/gcc-lib/arm-cacko-linux-gnu/2.95.3/../../../../arm-cacko-linux-gnu/sys-include/asm/pgalloc.h: In function `get_pgd_fast':
/opt/cross/arm/2.95.3-2.15/lib/gcc-lib/arm-cacko-linux-gnu/2.95.3/../../../../arm-cacko-linux-gnu/sys-include/asm/pgalloc.h:67: warning: passing arg 1 of `cpu_pid_va_to_mva' makes integer from pointer without a cast
/opt/cross/arm/2.95.3-2.15/lib/gcc-lib/arm-cacko-linux-gnu/2.95.3/../../../../arm-cacko-linux-gnu/sys-include/asm/pgalloc.h: In function `pte_alloc_one_fast':
/opt/cross/arm/2.95.3-2.15/lib/gcc-lib/arm-cacko-linux-gnu/2.95.3/../../../../arm-cacko-linux-gnu/sys-include/asm/pgalloc.h:91: warning: passing arg 1 of `cpu_pid_va_to_mva' makes integer from pointer without a cast


I'm using gcc 2.95.3 and kenel source code is download from
http://mail.pdaxrom.org/1.1.0beta1/src/lin...rom1_01.tar.bz2

I also tried to use local-patches in pdaXrom-builder to patch the kernel
CODE
cat ../pdaXrom-builder/patches-local/linux-c3100-20050602-rom1_01/generic/linux-pdaXrom.diff | patch -p1


but after I patched the kernel source, I could not compile the driver sucessfully

I got following error message:
CODE
/usr/src/linux/include/linux/sched.h:494: field `iWMMXt' has incomplete type


It was so strange...

can any body give a hand?

Thanks!

-Wells.
merli
Hello

I have bought usb/lan with same chip. I will try to compile driver by myself. I see if I will have more success than you.
Can you write me where did you found sources for that driver?
Did you crosscompiled driver or compiled native on Z?

UPDATE: found driver here: http://www.davicom.com.tw/big5/download/Dr..._LINUX_V100.zip

Thnx
ecc_hy
QUOTE(merli @ Mar 27 2007, 05:19 AM)
Hello

I have bought usb/lan with same chip. I will try to compile driver by myself. I see if I will have more success than you.
Can you write me where did you found sources for that driver?
Did you crosscompiled driver or compiled native on Z?

UPDATE: found driver here: http://www.davicom.com.tw/big5/download/Dr..._LINUX_V100.zip

Thnx
*


I am the friend of wells. His source is downloaded from http://www.davicom.com.tw/.
In pdaxrom, we found none successed compile driver native on Z. If you want to do it, may need a cross compile enviroment.
We have successed in compile wifi card driver for Agere Hermers I/II. When compile USB lan driver like rtl8150 and DM9601, we meet problem like Wells said before. And it seems not caused by driver source, maybe we missed something in compile env which not know.

If you successed, tell us how to do it.

Thanks
merli
QUOTE(ecc_hy @ Mar 27 2007, 04:14 PM)
QUOTE(merli @ Mar 27 2007, 05:19 AM)
Hello

I have bought usb/lan with same chip. I will try to compile driver by myself. I see if I will have more success than you.
Can you write me where did you found sources for that driver?
Did you crosscompiled driver or compiled native on Z?

UPDATE: found driver here: http://www.davicom.com.tw/big5/download/Dr..._LINUX_V100.zip

Thnx
*


I am the friend of wells. His source is downloaded from http://www.davicom.com.tw/.
In pdaxrom, we found none successed compile driver native on Z. If you want to do it, may need a cross compile enviroment.
We have successed in compile wifi card driver for Agere Hermers I/II. When compile USB lan driver like rtl8150 and DM9601, we meet problem like Wells said before. And it seems not caused by driver source, maybe we missed something in compile env which not know.

If you successed, tell us how to do it.

Thanks
*



I would like to compile it native on Z but I am looking for native gcc 2.9.5 compiler for pdaxrom beta 1 or 3.
ecc_hy
In fact we have try to compile it on native almost one week.

You may try to download from meanie's zgcc 2.95.squashfs

Result is here:
http://www.oesf.org/forums/index.php?showt...=22996&hl=wlags

If want to know more about compile kernel or driver, you may search keyword 2.95 in this forum.

PS:
We in QQ group 8505684, if you have qq number.

Have a luck.
merli
QUOTE(ecc_hy @ Mar 27 2007, 05:07 PM)
In fact we have try to compile it on native almost one week.

You may try to download from meanie's zgcc 2.95.squashfs

Result is here:
http://www.oesf.org/forums/index.php?showt...=22996&hl=wlags

If want to know more about compile kernel or driver, you may search keyword 2.95 in this forum.

PS:
We in QQ group 8505684, if you have qq number.

Have a luck.
*


Trying crosscompile

insmod dm9601.o
dm9601.o: kernel-module version mismatch
dm9601.o was compiled for kernel version 2.4.18-rmk7-pxa3-embedix
while this kernel is version 2.4.20.

I am going in your feet :-)

EDIT:

compiled ... tested ... working ... :-)

insmod usbcore
insmod crc32
insmod -f dm9601.o

ifconfig eth0 10.0.7.1 netmask 255.255.0.0
ping 10.0.1.160 working ....

attached my driver .... don't strip this module! or you get Floating popint exception don't know why ...

now ... how to clear -f flag and put it in depmod database to load usbcore and crc32 automatically and autoload when usb nic is pluged in

EDIT2:

New version without any problems.
Install instruction

copy to /lib/modules/2.4.20/kernel/driver/usb
run depmod -a
then after you connect dm9601 USB NIC adapter you will get eth0

question:
How to set up this eth0 adapter automaticaly when loaded?
I need to put IP address manualy now like ifconfig eth0 address netmask mask.
I woluld like to have on this rth0 dhcp or IP address in config file somewhere.

Any solution for USB NIC in pdaxrom?
ecc_hy
I am very glad to hear you have successed.

Can you tell us the detail of your cross compile? It should be best to attach the source and Makefile if you modified.

Our cross compile according to:
http://mail.pdaxrom.org/contrib/docs/kerne...mpile-3100.html
And compile wifi cf driver ok, but always meet problems when compile driver for usb lan, and it make us crazy.

Any help?
merli
QUOTE(ecc_hy @ Mar 28 2007, 04:32 PM)
I am very glad to hear you have successed.

Can you tell us the detail of your cross compile? It should be best to attach the source and Makefile if you modified.

Our cross compile according to:
http://mail.pdaxrom.org/contrib/docs/kerne...mpile-3100.html
And compile wifi cf driver ok, but always meet problems when compile driver for usb lan, and it make us crazy.

Any help?
*


Got toolchain and kernel sources from cacko lon time ago ... i dont know where to find it now.
arm-cacko-linux-gnu-2.95.3-2.2.5-hardfloat-19.50_21.09.05.tar.bz2
cacko-1.23-kernel-2.4.20.tar.gz

I run linux in vmware and unpacked compiler to /opt as is
unpacked kernel to /usr/src

changed version.h in compiler toolchain to contain 2.4.20 ... there is 2.4.18something in it.

PATH=/opt/cross/arm/.../arm-cacko-linux/bin:$PATH ... I dont remember exact path
export PATH

add MODULE_LICENSE("GPL v2"); to dm9601.c
make org

thats all ... DON'T strip!
Meanie
QUOTE(merli @ Mar 29 2007, 01:04 AM)
QUOTE(ecc_hy @ Mar 28 2007, 04:32 PM)
I am very glad to hear you have successed.

Can you tell us the detail of your cross compile? It should be best to attach the source and Makefile if you modified.

Our cross compile according to:
http://mail.pdaxrom.org/contrib/docs/kerne...mpile-3100.html
And compile wifi cf driver ok, but always meet problems when compile driver for usb lan, and it make us crazy.

Any help?
*


Got toolchain and kernel sources from cacko lon time ago ... i dont know where to find it now.
arm-cacko-linux-gnu-2.95.3-2.2.5-hardfloat-19.50_21.09.05.tar.bz2
cacko-1.23-kernel-2.4.20.tar.gz

I run linux in vmware and unpacked compiler to /opt as is
unpacked kernel to /usr/src

changed version.h in compiler toolchain to contain 2.4.20 ... there is 2.4.18something in it.

PATH=/opt/cross/arm/.../arm-cacko-linux/bin:$PATH ... I dont remember exact path
export PATH

add MODULE_LICENSE("GPL v2"); to dm9601.c
make org

thats all ... DON'T strip!
*



add an entry to /etc/hotplug/usb.handmap and create a script in /etc/hotplug/usb/
look at usb-storage for an example...
Meanie
scratch the usb.handmap thing. a better way is to update net.agent

net.agent currently is using the redhat way of setting up the network, ie, calling /sbin/ifup which does not exist in beta3.

the section in question can be enhanced to actually differentiate between eth0 and wifi0/wlan0 so it can configure those interfaces differently. best would be to use the config under /etc/sysconfig/network and /etc/sysconfig/wireless respectively...

i have done that for Sharp ROM a long time ago so I will be looking at that and migrating it to net.agent in pdaXii13 also...
Meanie
i have updated net.agent to configure eth0 as well as wifi0/wlan0 as soon as they are plugged in.
it reads the config from /etc/sysconfig/network and /etc/sysconfig/wireless respectively.

by default /etc/sysconfig/network has DHCP=y so it uses dhcp, but you can change it to n and fill in the relevant details in to that config file if you want to manually set your IP, etc...

so far I have only tested that plugging in a USB ethernet adaptor works with this setup. have not tried usb wifi adaptors since i dont have one but the script should be able to handle that as well..

make sure you extract net.agent from the zip file and copy it to /etc/hotplug
wellswang
QUOTE(Meanie @ Mar 30 2007, 07:00 AM)
i have updated net.agent to configure eth0 as well as wifi0/wlan0 as soon as they are plugged in.
it reads the config from /etc/sysconfig/network and /etc/sysconfig/wireless respectively.

by default /etc/sysconfig/network has DHCP=y so it uses dhcp, but you can change it to n and fill in the relevant details in to that config file if you want to manually set your IP, etc...

so far I have only tested that plugging in a USB ethernet adaptor works with this setup. have not tried usb wifi adaptors since i dont have one but the script should be able to handle that as well..

make sure you extract net.agent from the zip file and copy it to /etc/hotplug
*


Thanks, Meanie.
It's great!
merli
QUOTE(Meanie @ Mar 30 2007, 01:00 AM)
i have updated net.agent to configure eth0 as well as wifi0/wlan0 as soon as they are plugged in.
it reads the config from /etc/sysconfig/network and /etc/sysconfig/wireless respectively.

by default /etc/sysconfig/network has DHCP=y so it uses dhcp, but you can change it to n and fill in the relevant details in to that config file if you want to manually set your IP, etc...

so far I have only tested that plugging in a USB ethernet adaptor works with this setup. have not tried usb wifi adaptors since i dont have one but the script should be able to handle that as well..

make sure you extract net.agent from the zip file and copy it to /etc/hotplug
*


How /etc/sysconfig/network should lokk like? My has something like this:

root-smile.gif more network
NETWORKING=yes
HOSTNAME=zaurus
GATEWAYDEV=
GATEWAY=

and after plug usb/lan adapter I get ip address 192.168.0.1 netmask 255.255.255.0.
Where is that information comming from?
Meanie
QUOTE(merli @ Apr 3 2007, 11:47 PM)
QUOTE(Meanie @ Mar 30 2007, 01:00 AM)
i have updated net.agent to configure eth0 as well as wifi0/wlan0 as soon as they are plugged in.
it reads the config from /etc/sysconfig/network and /etc/sysconfig/wireless respectively.

by default /etc/sysconfig/network has DHCP=y so it uses dhcp, but you can change it to n and fill in the relevant details in to that config file if you want to manually set your IP, etc...

so far I have only tested that plugging in a USB ethernet adaptor works with this setup. have not tried usb wifi adaptors since i dont have one but the script should be able to handle that as well..

make sure you extract net.agent from the zip file and copy it to /etc/hotplug
*


How /etc/sysconfig/network should lokk like? My has something like this:

root-smile.gif more network
NETWORKING=yes
HOSTNAME=zaurus
GATEWAYDEV=
GATEWAY=

and after plug usb/lan adapter I get ip address 192.168.0.1 netmask 255.255.255.0.
Where is that information comming from?
*




something like this:

CODE
DHCP=no
IPADDR=192.168.1.2
NETMASK=255.255.255.0
DOMAIN=
GATEWAY=192.168.1.1
DNS1=192.168.1.1
DNS2=


192.168.0.1 is the default and comes from net.agent which provides default values if the required fields are missing or empty...
merli
QUOTE(Meanie @ Apr 3 2007, 05:40 PM)
QUOTE(merli @ Apr 3 2007, 11:47 PM)
QUOTE(Meanie @ Mar 30 2007, 01:00 AM)
i have updated net.agent to configure eth0 as well as wifi0/wlan0 as soon as they are plugged in.
it reads the config from /etc/sysconfig/network and /etc/sysconfig/wireless respectively.

by default /etc/sysconfig/network has DHCP=y so it uses dhcp, but you can change it to n and fill in the relevant details in to that config file if you want to manually set your IP, etc...

so far I have only tested that plugging in a USB ethernet adaptor works with this setup. have not tried usb wifi adaptors since i dont have one but the script should be able to handle that as well..

make sure you extract net.agent from the zip file and copy it to /etc/hotplug
*


How /etc/sysconfig/network should lokk like? My has something like this:

root-smile.gif more network
NETWORKING=yes
HOSTNAME=zaurus
GATEWAYDEV=
GATEWAY=

and after plug usb/lan adapter I get ip address 192.168.0.1 netmask 255.255.255.0.
Where is that information comming from?
*




something like this:

CODE
DHCP=no
IPADDR=192.168.1.2
NETMASK=255.255.255.0
DOMAIN=
GATEWAY=192.168.1.1
DNS1=192.168.1.1
DNS2=


192.168.0.1 is the default and comes from net.agent which provides default values if the required fields are missing or empty...
*



OK foud out ... but there is still error in script
dhcpd won't do the work getting IP address from DHCP server

dhcpcd will but it is not working for only once...
when I unplug and plug again eth0 I won't get IP address.
maybe put dhcpcd -k in front of dhcpcd eth0?
Meanie
QUOTE(merli @ Apr 4 2007, 01:49 AM)
QUOTE(Meanie @ Apr 3 2007, 05:40 PM)
QUOTE(merli @ Apr 3 2007, 11:47 PM)
QUOTE(Meanie @ Mar 30 2007, 01:00 AM)
i have updated net.agent to configure eth0 as well as wifi0/wlan0 as soon as they are plugged in.
it reads the config from /etc/sysconfig/network and /etc/sysconfig/wireless respectively.

by default /etc/sysconfig/network has DHCP=y so it uses dhcp, but you can change it to n and fill in the relevant details in to that config file if you want to manually set your IP, etc...

so far I have only tested that plugging in a USB ethernet adaptor works with this setup. have not tried usb wifi adaptors since i dont have one but the script should be able to handle that as well..

make sure you extract net.agent from the zip file and copy it to /etc/hotplug
*


How /etc/sysconfig/network should lokk like? My has something like this:

root-smile.gif more network
NETWORKING=yes
HOSTNAME=zaurus
GATEWAYDEV=
GATEWAY=

and after plug usb/lan adapter I get ip address 192.168.0.1 netmask 255.255.255.0.
Where is that information comming from?
*




something like this:

CODE
DHCP=no
IPADDR=192.168.1.2
NETMASK=255.255.255.0
DOMAIN=
GATEWAY=192.168.1.1
DNS1=192.168.1.1
DNS2=


192.168.0.1 is the default and comes from net.agent which provides default values if the required fields are missing or empty...
*



OK foud out ... but there is still error in script
dhcpd won't do the work getting IP address from DHCP server

dhcpcd will but it is not working for only once...
when I unplug and plug again eth0 I won't get IP address.
maybe put dhcpcd -k in front of dhcpcd eth0?
*



i will have to add dhcpcd -k in the next update. dhcpd has already been changed to dhcpcd
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2015 Invision Power Services, Inc.