DS-209+II DSM 3 1137 usbserial kernel module -> kernel crash

All discussions/development regarding the Freescale MPC8533 Chip can be placed here.
Forum rules
Please note the disclaimer before modifying your Synology Product.

DS-209+II DSM 3 1137 usbserial kernel module -> kernel crash

Postby ptrekels » Mon Nov 08, 2010 10:22 pm

I want to attach a pl2303 USB to serial adapter to my ds209+II.

uname -a gives
Linux DiskStation 2.6.32.12 #1337 Tue Sep 21 14:53:11 CST 2010 ppc GNU/Linux synology_ppc853x_209+II

So I downloaded toolchain gcc343_glibc234_ppc853x.tgz and source synogpl-1337b-853x.tbz. After updating the kernel config I compiled the modules and uploaded the new modules to the DS209II. I'm able to insert the modules with insmod but after I attach the usb device the modules try to add the device in the kernel and something goes wrong which result in a pagefault crash...

Code: Select all
[73371.615034] usbcore: registered new interface driver usbserial
[73371.620886] usbserial: USB Serial Driver core
[73379.077138] USB Serial support registered for pl2303
[73379.082163] pl2303 2-3:1.0: pl2303 converter detected
[73379.124053] Unable to handle kernel paging request for data at address 0x9421fff0
[73379.131550] Faulting instruction address: 0xa00deb14
[73379.136514] Oops: Kernel access of bad area, sig: 11 [#1]
[73379.141899] MPC8544 DS
[73379.144247] Modules linked in: pl2303(+) usbserial nfsd exportfs usbhid hid input_core usblp usb_storage ohci_hcd ehci_hcd ppc85xx_synobios(P) skge ipv6 synoacl_ext4(P) synoacl_vfs(P) fuse vfat fat cryptosoft ecryptfs sha512_generic sha256_generic sha1_generic ecb talitos authenc rng_core cryptodev(P) ocf(P) chainiv des_generic crc32c eseqiv krng ansi_cprng rng aes_generic md5 cbc cryptomgr pcompress aead crypto_hash crypto_blkcipher crypto_wq crypto_algapi dm_snapshot crc_itu_t crc_ccitt quota_v2 quota_tree usbcore sg psnap llc [last unloaded: ppc85xx_synobios]
[73379.194214] NIP: a00deb14 LR: a01b21fc CTR: 00000000
[73379.199167] REGS: bef49b30 TRAP: 0300   Tainted: P            (2.6.32.12)
[73379.205940] MSR: 00029000 <EE,ME,CE>  CR: 84022248  XER: 00000000
[73379.212046] DEAR: 9421fff0, ESR: 00000000
[73379.216043] TASK = be68a070[27212] 'insmod' THREAD: bef48000
[73379.221514] GPR00: bb509a04 bef49be0 be68a070 bf150ed0 00000000 9421fff0 bb509a04 00000001
[73379.229886] GPR08: be7832c4 00000000 00000020 ffffffff 84022248 1018e1d0 00000270 00000000
[73379.238257] GPR16: 007fff00 c1e30000 00000000 00000001 00000001 00000001 a03c0000 bb883680
[73379.246629] GPR24: 00000000 bb8a7000 00000000 00000000 9421fff0 bf150ed0 c1e240f8 00000000
[73379.255186] NIP [a00deb14] internal_create_group+0x5c/0x1e0
[73379.260754] LR [a01b21fc] device_add_groups+0x44/0x90
[73379.265791] Call Trace:
[73379.268232] [bef49be0] [bb5099d8] 0xbb5099d8 (unreliable)
[73379.273628] [bef49c10] [a01b21fc] device_add_groups+0x44/0x90
[73379.279367] [bef49c30] [a01b2bb0] device_add+0x3bc/0x58c
[73379.284683] [bef49c80] [c1e250dc] usb_serial_probe+0xda4/0xea8 [usbserial]
[73379.291574] [bef49da0] [c14e35c4] usb_probe_interface+0x11c/0x168 [usbcore]
[73379.298529] [bef49dc0] [a01b5fc4] driver_probe_device+0xbc/0x17c
[73379.304527] [bef49de0] [a01b61f0] __driver_attach+0x70/0xa4
[73379.310092] [bef49e00] [a01b4b74] bus_for_each_dev+0x58/0x98
[73379.315743] [bef49e20] [a01b6248] driver_attach+0x24/0x34
[73379.321134] [bef49e30] [a01b5418] bus_add_driver+0xdc/0x298
[73379.326699] [bef49e70] [a01b68d8] driver_register+0xc0/0x154
[73379.332361] [bef49e90] [c14e388c] usb_register_driver+0x80/0x10c [usbcore]
[73379.339243] [bef49ed0] [c1e46040] pl2303_init+0x40/0xc0 [pl2303]
[73379.345243] [bef49ee0] [a0001df8] do_one_initcall+0x70/0x1d8
[73379.350899] [bef49f20] [a0059c58] sys_init_module+0xfc/0x228
[73379.356554] [bef49f40] [a000f2fc] ret_from_syscall+0x0/0x3c
[73379.362115] Instruction dump:
[73379.365075] 409e0014 801d0018 2f800000 409e0008 39200001 0f090000 2e040000 41b20014
[73379.372836] 801d0018 3860ffea 2f800000 419e016c <809c0000> 2f840000 41be001c 7fa3eb78
[73379.381198] ---[ end trace 685117fb829a68c3 ]---

(I also tried with the generic usbserial driver for fun but it crashed in the same device_add_groups function..)

Is anyone with a DS-209+II able to compile working kernel modules with the above toolchain and source?
The modules like the eth driver which are also compiled does not have the exact same size as the modules already on the system (they are both stripped). So I'm not sure this is the correct toolchain for this device?
Does anyone know a way to check the kernel config used to compile the kernel running on the DS209+II? (no /proc/config.gz :( )
Any other tips?
ptrekels
I'm New!
I'm New!
 
Posts: 4
Joined: Mon Nov 08, 2010 10:01 pm

Re: DS-209+II DSM 3 1137 usbserial kernel module -> kernel c

Postby ptrekels » Sat Nov 13, 2010 1:15 am

problem fixed!

Seems the synoconfigs/ppc8533 kernel config is not correct! By analyzing the differences in their and mine usbcore.ko modules with objdump I saw some differences in structs etc..

After enabling CONFIG_SWIOTLB I was able to generate a correct usbcore.ko. Next I enbabled the usbserial and pl2303 modules again and now they work!

(maybe there are other issues in the ppc8533 but this CONFIG_SWIOTLB fixed my issue with the usbserial and pl2303)
ptrekels
I'm New!
I'm New!
 
Posts: 4
Joined: Mon Nov 08, 2010 10:01 pm

Re: DS-209+II DSM 3 1137 usbserial kernel module -> kernel c

Postby flosen » Sun Jan 30, 2011 9:54 pm

Hi ptrekels,

do you already have or could you compile the kernel module "cdc-acm"? I need it for an modem-alike usb device and I cannot get my kernel compiled. You mentioned, the config has a bug. Are you compiling on the DS system or cross?
I'ld like to compile directly on my DS, so if you have a working Makefile and/or the above module, would you mind sharing?

Kind regards,
Flosen
flosen
I'm New!
I'm New!
 
Posts: 5
Joined: Wed Jan 12, 2011 12:56 am

Re: DS-209+II DSM 3 1137 usbserial kernel module -> kernel c

Postby ptrekels » Tue Feb 01, 2011 10:10 pm

I'm cross compiling the kernel modules on my laptop. Never looked at compiling it on the device itself.

If you mail me your e-mail address I can mail you the compiled module if you want..

regards,
ptrekels
ptrekels
I'm New!
I'm New!
 
Posts: 4
Joined: Mon Nov 08, 2010 10:01 pm

Re: DS-209+II DSM 3 1137 usbserial kernel module -> kernel c

Postby alochter » Tue Apr 05, 2011 2:59 pm

Hello,

I'm searching for a Kernel Modul for my DS209 (DSM 2.2 / Kernel 2.6.24). I got the usbserial.ko from a polish
server but it often disconnects with the following message:

Apr 5 15:45:08 kernel: usbserial_generic 1-1.3:1.0: Generic device with no bulk out, not allowed.
Apr 5 15:45:08 kernel: usbserial_generic: probe of 1-1.3:1.0 failed with error -5

I would be very very happy if you could create a cdc-acmd modul for my kernel. Would it be possible?

Many thanks in advance.

BR
Arne
alochter
I'm New!
I'm New!
 
Posts: 4
Joined: Fri Sep 11, 2009 1:44 pm

Re: DS-209+II DSM 3 1137 usbserial kernel module -> kernel c

Postby ptrekels » Wed Apr 06, 2011 11:27 pm

Hi,

file can be downloaded here:
http://www.sendspace.com/file/3bfkwf

ptrekels
ptrekels
I'm New!
I'm New!
 
Posts: 4
Joined: Mon Nov 08, 2010 10:01 pm

Re: DS-209+II DSM 3 1137 usbserial kernel module -> kernel c

Postby Kerm » Mon Feb 13, 2012 9:17 pm

Hi guys

I have a DS210+ where i am trying to attach an arduino to automate some 433MHz light switches via web interface

I have tried to install the IPKG kernel-module-usbserial but they are 2.6.15 and i am running DSM3.2 / 4 there for the modules are not working. I have tried to cross compile the usbserial.ko and ftdi_sio.ko following the guides below without success.
Can anyone help me compile the drivers?

I have most of the project working in Ubuntu with serial PHP communication just need to get it on to the diskstation. :D

http://www.bydavy.com/2012/01/compiling ... y-devices/

http://www.nas-forum.com/forum/topic/13 ... ge__st__60
Kerm
I'm New!
I'm New!
 
Posts: 4
Joined: Tue Mar 29, 2011 12:51 pm

Re: DS-209+II DSM 3 1137 usbserial kernel module -> kernel c

Postby starIST » Mon Feb 27, 2012 6:01 pm

Hello

I'd like to use my PL2303 with my Synology DS209+II, but I'm lost ! Is there anybody here to help me ? I'd like to know exactly what I've to do ? Which IPKG is needed ? Thanks
starIST
I'm New!
I'm New!
 
Posts: 6
Joined: Wed Aug 06, 2008 9:19 am


Return to Freescale MPC8533 Development Room

Who is online

Users browsing this forum: No registered users and 0 guests