Bug #317
closedToshiba Satellite M50 and ndis
0%
Description
Ferruccio Zamuner wrote:
I've found an update version of yk51x86 ethernet driver at opendriver.com/net/org
iconv -c -f CSUNICODE -t US-ASCII yk51x86.inf > yk51x86_a.inf
then ndiscvt gives me more parse errors and I've add comment to remove
for following lines:;HKR, Ndi\Params\WakeUpModeCap_A\enum, "25", 0, Magic
Packet
;HKR, Ndi\Params\WakeUpModeCap_A\enum, "26", 0, Pattern
Match
;HKR, Ndi\Params\WakeUpModeCap_A\enum, "27", 0, Mag Pack
Patt Match
;HKR, Ndi\Params\WakeUpModeCap_A\enum, "28", 0, Link ChangeI report them here because I don't know how if they are to fix or to
remove.Now ndiscvt completes, but make fails:
% cd /usr/src/sys/dev/netif/ndis
% make obj
% make clean
% ndiscvt -s /usr/local/modules/if_ndis/yk51x86.sys -i
/usr/local/modules/if_ndis/yk51x86.inf -n yk5 -o
/usr/obj/usr/src/sys/dev/netif/ndis/ndis_driver_data.h
% make
now it fails only for an old type proto at line 2012 of if_ndis.c
and I've fixed quickly.
then
% make install
% kldload /modules/wlan.ko
% kldload /modules/ndis.ko
% kldload /modules/if_ndis.ko
link_elf: symbol kmalloc undefined
kldload: can't load /modules/if_ndis.ko: Exec format error
I hope that this report can be useful.
Bye, \fer
[...]
cc -O -pipe -mtune=pentiumpro -D_KERNEL -Wall -Wredundant-decls
-Wnested-externs -Wstrict-prototypes -Wmissing-prototypes
-Wpointer-arith -Winline -Wcast-qual -ansi -DKLD_MODULE -nostdinc -I. -I@
-I@/../include -I/usr/include -finline-limit=8000 --param
inline-unit-growth=100 --param large-function-growth=1000 -fno-common
-ffreestanding -mpreferred-stack-boundary=2 -fno-stack-protector
-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -Wall -Wredundant-decls
-Wnested-externs -Wstrict-prototypes -Wmissing-prototypes
-Wpointer-arith -Winline -Wcast-qual -ansi -c
/usr/src/sys/dev/netif/ndis/if_ndis.c
In file included from /usr/src/sys/dev/netif/ndis/if_ndis.c:87:
./ndis_driver_data.h:3487: error: excess elements in char array initializer
./ndis_driver_data.h:3487: error: (near initialization for
`ndis_regvals1011.nc_val')
./ndis_driver_data.h:3488: warning: braces around scalar initializer
./ndis_driver_data.h:3488: warning: (near initialization for
`ndis_regvals1011.nc_val0')
./ndis_driver_data.h:3488: warning: initialization makes integer from
pointer without a cast
./ndis_driver_data.h:3488: error: initializer element is not computable
at load time
./ndis_driver_data.h:3488: error: (near initialization for
`ndis_regvals1011.nc_val0')
[...]I leave a complete archive at:
http://vola.diff.org/dfbsd_yk51x86.tgz
with:
rwxr-xr-x 0 root wheel 230400 12 Set 19:360 root wheel 164981 12 Set 19:36
usr/local/modules/if_ndis/yk51x86.sys
-rw-r--r-
usr/local/modules/if_ndis/yk51x86.infrw-r--r-0 root wheel 2122109 12 Set 19:48
usr/obj/usr/src/sys/dev/netif/ndis/ndis_driver_data.hrw-r--r-0 root 1001 890828 12 Set 19:49 tmp/err.logThe last is full error log from make.
I'll appreciate any hint or help.
Thank you in advance, \fer
Updated by corecode over 18 years ago
Ferruccio Zamuner wrote:
% kldload /modules/wlan.ko
% kldload /modules/ndis.ko
% kldload /modules/if_ndis.ko
link_elf: symbol kmalloc undefined
kldload: can't load /modules/if_ndis.ko: Exec format errorI hope that this report can be useful.
You shouldn't compile a module with newer sources than your kernel actually is. please make sure that your kernel and your modules are compiled from the same sources.
cheers
simon
Updated by nonsolosoft over 18 years ago
Thank you Simon,
I've rebuilt world and kernel and installed them, then I've rebuilt if_ndis.ko too:
% kldload /modules/if_ndis.ko
link_elf: symbol malloc undefined
kldload: can't load /modules/if_ndis.ko: Exec format error
There was still a malloc() and I've replace malloc() with kmalloc() once
in if_ndis.c. Rebuilt and installed.
kldload doesn't fail to load, but it kernel panic. :-(
Bye, \fer
Simon 'corecode' Schubert wrote:
Ferruccio Zamuner wrote:
% kldload /modules/wlan.ko
% kldload /modules/ndis.ko
% kldload /modules/if_ndis.ko
link_elf: symbol kmalloc undefined
kldload: can't load /modules/if_ndis.ko: Exec format errorI hope that this report can be useful.
You shouldn't compile a module with newer sources than your kernel
actually is. please make sure that your kernel and your modules are
compiled from the same sources.cheers
simon
Updated by swildner over 18 years ago
Ferruccio Zamuner wrote:
There was still a malloc() and I've replace malloc() with kmalloc() once
in if_ndis.c. Rebuilt and installed.
That is fixed now.
kldload doesn't fail to load, but it kernel panic. :-(
Can you post a backtrace? Maybe it will give us a clue what the problem is.
Sascha
Updated by nonsolosoft over 18 years ago
Sascha Wildner wrote:
Ferruccio Zamuner wrote:
There was still a malloc() and I've replace malloc() with kmalloc() once
in if_ndis.c. Rebuilt and installed.That is fixed now.
kldload doesn't fail to load, but it kernel panic. :-(
Can you post a backtrace? Maybe it will give us a clue what the problem is.
Sascha
% kldload /modules/if_ndis.ko
yk50: <Marvell Yukon 88E8036 PCI-E Fast Ethernet Controller> port 0x3000-0x30ff mem 0xb4000000-0xb4003fff irp 10 at device 0.0 on pci2
can't re-use a leaf (TcpLargeSend)!
no match for NdisIMGetCurrentPacketStack
no match for ExUnregisterCallback
no match for ZwPowerInformation
no match for ExRegisterCallback
no match for ExCreateCallback
no match for ZwUnmapViewOfSection
no match for ZwMapViewOfSection
no match for ZwOpenSection
no match for wcslen
yk50: NDIS API version: 5.1
ntoskrnl dummy called...
ntoskrnl dummy called...
Fatal trap 12: page fault while in kernel mode
fault virtual address = 0x0
fault code = supervisor read, page not present
instruction pointer = 0x8:0x0
stack pointer = 0x10:0xcea149ac
frame pointer = 0x10:0xcea149c4
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, def32 1, grain 1
processor eflags = interrupt enabled, resume, IOPL = 0
current process = 698 (kldload)
current thread = pri 6
kernel: type 12 trap, code=0
Stopped at 0:
Fatal trap 12: page fault while in kernel mode
fault virtual address = 0x0
fault code = supervisor read, page not found
instruction pointer = 0x8:0xc04b6e99
stack pointer = 0x10:0xcea147ec
frame pointer = 0x10:0xcea147f0
code segment = base 0x0, limit 0xffffff, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags = interrupt enable, resume, IOPL = 0
current process = 698 (kldload)
current thread = pri 6
kernel: type 12 trap, code=0
db> trace
Fatal trap 12: page fault while in kernel mode
fault virtual address = 0x0
fault code = supervisor read, page not found
instruction pointer = 0x8:0xc04b6e99
stack pointer = 0x10:0xcea14710
frame pointer = 0x10:0xcea14714
code segment = base 0x0, limit 0xffffff, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags = interrupt enable, resume, IOPL = 0
current process = 698 (kldload)
current thread = pri 6
kernel: type 12 trap, code=0
If you need more info, I'll be happy to be useful.
Bye, \fer
Updated by nonsolosoft about 18 years ago
That ethernet board is supported by sephe with msk device,
but if you want I can try to rebuild a fake driver using ndis.
If you need it, please can you give me more instruction to make and send
you a kernel dump?
Bye, \fer
Updated by justin about 18 years ago
Going by notes I read here, the ethernet device is now supported with the msk
driver and no longer needs ndis. So, this issue can be considered resolved.