Re: [Ocf-linux-users] infinite wait in mv_cesa (Marvell Kirkwood) icw cryptotest
Brought to you by:
david-m
From: David M. <dav...@mc...> - 2010-08-25 05:28:43
|
Jivin Harro Haan lays it down ... > Problem solved! > > INTER_REGS_BASE (in mvSysHwConfig.h) had the value 0xFEE00000. This is > the same as KIRKWOOD_PCIE_IO_VIRT_BASE in > linux-2.6.33/arch/arm/mach-kirkwood/include/mach/kirkwood.h. For my > configuration it should be KIRKWOOD_REGS_VIRT_BASE, which is > 0xfed00000. > > Why does the define INTER_REGS_BASE exist? Would it not be cleaner to > use ??cesa_device.reg?? instead (set by platform_get_resource_byname() > in cesa_ocf_drv.c)? Beats me, Marvel would be best to answer that one :-) I will say that if the driver isn't working (ie., no interrupts etc), you will get locked applications waiting for completion. Due to the nature of DMA/crypto processing, terminating early or timing out is just a bad idea, and besides, you need to fix the driver regardless. Luckily you found it and can move on :-) Cheers, Davidm > > On 23 August 2010 16:47, Harro Haan <hr...@gm...> wrote: > > Some additional info, > > > > When I define CESA_OCF_POLLING in cesa_ocf_drv.c everything works fine. > > > > When I do "cat /proc/interrupts" (with #undef CESA_OCF_POLLING), I can > > see that no cesa interrupts occurred. When I look at the debug output > > (see previous mail) I do not see the line "cesa_interrupt_handler()" > > either. > > > > So for my configuration something is wrong/missing with my interrupts. > > Any hints? > > > > Thanks, > > > > Harro > > > > On 20 August 2010 16:52, Harro Haan <hr...@gm...> wrote: > >> Hello David, > >> > >> I??m trying to get this driver working with a 3.6.33 kernel on my > >> OpenRD-Ultimate 88F6281 development board, but the cryptotest program > >> is waiting forever. > >> > >> Debug output for mv_cesa: > >> ------------------------------------ > >> root@DB88FXX81:/ ./cryptotest -a aes > >> cryptodev_open() > >> cryptodev_ioctl(cmd=c0046364 arg=beea0954) > >> cryptodev_ioctl(CRIOGET) > >> cryptodev_ioctl(cmd=c030636a arg=beea09b4) > >> cryptodev_ioctl(CIOCGSESSION2) > >> cryptodev_ioctl(CIOCGSESSION2) - no mac > >> crypto/ocf/crypto.c,389: DRIVER_LOCK() > >> crypto/ocf/crypto.c,413: DRIVER_UNLOCK() > >> cesa_ocf_newsession() > >> crypto/ocf/kirkwood/cesa_ocf_drv.c,875: new session 1 > >> crypto/ocf/kirkwood/cesa_ocf_drv.c,896: (1) AES CBC > >> crypto/ocf/kirkwood/cesa_ocf_drv.c,906: key length 16 > >> crypto/ocf/crypto.c,415: DRIVER_LOCK() > >> crypto/ocf/crypto.c,425: DRIVER_UNLOCK() > >> csecreate() > >> cseadd() > >> cryptodev_ioctl(cmd=c01c6367 arg=beea0998) > >> cryptodev_ioctl(CIOCCRYPT) > >> csefind() > >> cryptodev_op() > >> crypto_dispatch() > >> crypto/ocf/crypto.c,815: Q_LOCK() > >> crypto/ocf/crypto.c,839: Q_UNLOCK() > >> crypto_invoke() > >> cesa_ocf_process() > >> crypto/ocf/kirkwood/cesa_ocf_drv.c,425: handle UIO. > >> crypto/ocf/kirkwood/cesa_ocf_drv.c,440: buf 0-> addr ded17500, size 10 > >> crypto/ocf/kirkwood/cesa_ocf_drv.c,480: cipher encrypt > >> crypto/ocf/kirkwood/cesa_ocf_drv.c,491: IV from USER (offset 0) > >> crypto/ocf/kirkwood/cesa_ocf_drv.c,508: don't copy the IV back to the buffer > >> > >> crypto/ocf/kirkwood/cesa_ocf_drv.c,596: Sending Action: > >> crypto/ocf/kirkwood/cesa_ocf_drv.c,597: IV from user: 1. IV offset 0 > >> crypto/ocf/kirkwood/cesa_ocf_drv.c,598: crypt offset 10 len 10 > >> crypto/ocf/kirkwood/cesa_ocf_drv.c,599: Auth offset 0 len 0 > >> crypto/ocf/kirkwood/cesa_ocf_drv.c,600: set digest in offset 0 . > >> SRC BUFFER: pMbuf=dfa4bc24, numFrags=2, mbufSize=32 > >> # 0. bufVirt=df8ee020, bufSize=16 > >> df8ee020: 33 35 38 36 74 34 69 6f 68 33 75 21 75 36 34 39 > >> # 1. bufVirt=ded17500, bufSize=16 > >> ded17500: 6e 33 38 39 34 36 6f 74 38 69 74 39 31 65 75 6e > >> crypto/ocf/crypto.c,841: Q_LOCK() > >> crypto/ocf/crypto.c,867: Q_UNLOCK() > >> cryptodev_op about to WAIT > >> > >> ------------------------------------ > >> > >> Debug output for cryptosoft (which is working just fine): > >> ------------------------------------ > >> root@DB88FXX81:/ ./cryptotest -a aes > >> cryptodev_open() > >> cryptodev_ioctl(cmd=c0046364 arg=bea58954) > >> cryptodev_ioctl(CRIOGET) > >> cryptodev_ioctl(cmd=c030636a arg=bea589b4) > >> cryptodev_ioctl(CIOCGSESSION2) > >> cryptodev_ioctl(CIOCGSESSION2) - no mac > >> crypto/ocf/crypto.c,389: DRIVER_LOCK() > >> crypto/ocf/crypto.c,413: DRIVER_UNLOCK() > >> swcr_newsession() > >> swcr_newsession crypto_alloc_*blkcipher(cbc(aes), 0x0) > >> swcr_newsession cbc(aes) cipher is async > >> swcr_newsession key:cri->cri_klen=128,(cri->cri_klen + 7)/8=16 > >> ?? ??0x32 0x61 0x38 0x6f 0x21 0x32 0x61 0x61 > >> ?? ??0x21 0x35 0x75 0x21 0x69 0x30 0x65 0x21 > >> crypto/ocf/crypto.c,415: DRIVER_LOCK() > >> crypto/ocf/crypto.c,425: DRIVER_UNLOCK() > >> csecreate() > >> cseadd() > >> cryptodev_ioctl(cmd=c01c6367 arg=bea58998) > >> cryptodev_ioctl(CIOCCRYPT) > >> csefind() > >> cryptodev_op() > >> crypto_dispatch() > >> crypto/ocf/crypto.c,815: Q_LOCK() > >> crypto/ocf/crypto.c,839: Q_UNLOCK() > >> crypto_invoke() > >> swcr_process() > >> swcr_process_req() > >> crypto OP success 0 > >> crypto_done() > >> crypto/ocf/crypto.c,1156: Q_LOCK() > >> crypto/ocf/crypto.c,1158: Q_UNLOCK() > >> cryptodev_cb() > >> crypto/ocf/crypto.c,841: Q_LOCK() > >> crypto/ocf/crypto.c,867: Q_UNLOCK() > >> cryptodev_op about to WAIT > >> cryptodev_op finished WAITING error=0 > >> cryptodev_ioctl(cmd=c01c6367 arg=bea58998) > >> cryptodev_ioctl(CIOCCRYPT) > >> csefind() > >> cryptodev_op() > >> crypto_dispatch() > >> crypto/ocf/crypto.c,815: Q_LOCK() > >> crypto/ocf/crypto.c,839: Q_UNLOCK() > >> crypto_invoke() > >> swcr_process() > >> swcr_process_req() > >> crypto OP success 0 > >> crypto_done() > >> crypto/ocf/crypto.c,1156: Q_LOCK() > >> crypto/ocf/crypto.c,1158: Q_UNLOCK() > >> cryptodev_cb() > >> crypto/ocf/crypto.c,841: Q_LOCK() > >> crypto/ocf/crypto.c,867: Q_UNLOCK() > >> cryptodev_op about to WAIT > >> cryptodev_op finished WAITING error=0 > >> cryptodev_ioctl(cmd=40046366 arg=bea589cc) > >> cryptodev_ioctl(CIOCFSESSION) > >> csefind() > >> csedelete() > >> csefree() > >> crypto_freesession() > >> crypto/ocf/crypto.c,450: DRIVER_LOCK() > >> crypto/ocf/crypto.c,468: DRIVER_UNLOCK() > >> swcr_freesession() > >> crypto/ocf/crypto.c,471: DRIVER_LOCK() > >> crypto/ocf/crypto.c,481: DRIVER_UNLOCK() > >> ?? 0.089 sec, ?? cryptodev_release() > >> ?? ??2 ?? ??aes crypts, ?? ?? ??16 bytes, ?? ?? ??358 byte/sec, ?? ?? 0.0 Mb/sec > >> root@DB88FXX81:/ > >> ------------------------------------ > >> > >> I am following this thread as well: > >> ??[Ocf-linux-users] OCF driver for Marvell Kirkwood (88F6xxx) Processors?? > >> http://sourceforge.net/mailarchive/forum.php?thread_name=8D145DCD0F55B543949BE94258003A200DF9AD4EA6%40exchange12.bdt-rw.de&forum_name=ocf-linux-users > >> > >> Attached are my patches (fixes as described in the thread above) and > >> series file. > >> > >> Do you have an idea why the system is hanging/waiting forever? > >> > >> Thanks, > >> > >> Harro > >> > > > > -- David McCullough, dav...@mc..., Ph:+61 734352815 McAfee - SnapGear http://www.mcafee.com http://www.uCdot.org |