[#6704] mcapi packet receive on coreA doesn't have data available after coreB send message
Submitted By: Mingquan Pan
Open Date
2011-07-27 23:00:21 Close Date
2011-08-04 04:47:19
Priority:
Medium Assignee:
steven miao
Status:
Closed Fixed In Release:
N/A
Found In Release:
2011R1 Release:
Category:
N/A Board:
N/A
Processor:
ALL Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Assigned (Not Start)
Uboot version or rev.:
Toolchain version or rev.:
5013
App binary format:
N/A
Summary: mcapi packet receive on coreA doesn't have data available after coreB send message
Details:
mcapi 1.0 packet receive on coreA doesn't have data available after coreB send message.
When coreA send message to coreB, coreB can receive it and print on console but when coreB sent data back to coreA, coreB says sent but on coreA it always shows avail=0 and can't get the date sent.
detailed log:
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
External memory: cacheable in instruction cache
L2 SRAM : uncacheable in instruction cache
Data Cache Enabled for CPU0
External memory: cacheable (write-through) in data cache
L2 SRAM : uncacheable in data cache
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 14224
Kernel command line: root=/dev/mtdblock0 rw clkin_hz=30000000 earlyprintk=serial,uart0,57600 console=ttyBF0,57600 ip=10.100.4.50:10.100.4.174:192.168.0.1:255.255.255.0:bf561-ezkit:eth0:off
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory available: 47744k/65536k RAM, (7352k init code, 1144k kernel code, 492k data, 1024k dma, 7780k reserved)
NR_IRQS:153
Configuring Blackfin Priority Driven Interrupts
console [ttyBF0] enabled, bootconsole disabled
console [ttyBF0] enabled, bootconsole disabled
Calibrating delay loop... 1191.93 BogoMIPS (lpj=2383872)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (16 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 16 KB (3 KB free)
Blackfin L2 SRAM: 128 KB (128 KB free)
NET: Registered protocol family 16
Blackfin DMA Controller
ezkit_init(): registering device resources
bio: create slab <bio-0> at 0
bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs@ffc00500, dma channel@16
Switching to clocksource bfin_cs_cycles
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
debug-mmrs: setting up Blackfin MMR debugfs
msgmni has been set to 93
io scheduler noop registered (default)
bfin-uart: Blackfin serial driver
bfin-uart.0: ttyBF0 at MMIO 0xffc00400 (irq = 35) is a BFIN-UART
brd: module loaded
physmap platform flash device: 00800000 at 20000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000020 Chip ID 0x0022ed
Amd/Fujitsu Extended Query Table at 0x0040
Amd/Fujitsu Extended Query version 1.3.
physmap-flash.0: Swapping erase regions for top-boot CFI table.
number of CFI chips: 1
RedBoot partition parsing not available
Using physmap partition information
Creating 5 MTD partitions on "physmap-flash.0":
0x000000000000-0x000000040000 : "bootloader(nor)"
0x000000040000-0x000000200000 : "linux kernel(nor)"
0x000000200000-0x0000007f0000 : "file system(nor)"
0x0000007f0000-0x0000007fe000 : "config(nor)"
0x0000007fe000-0x000000800000 : "u-boot env(nor)"
smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico@fluxnic.net>
eth0: SMC91C11xFD (rev 1) at 2c010300 IRQ 82 [nowait]
eth0: Ethernet addr: 00:11:22:33:44:55
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
TCP cubic registered
NET: Registered protocol family 17
smc91x smc91x.0: eth0: link down
IP-Config: Gateway not on directly connected network.
dma_alloc_init: dma_page @ 0x02947000 - 256 pages at 0x03f00000
Freeing unused kernel memory: 7352k freed
smc91x smc91x.0: eth0: link up, 100Mbps, full-duplex, lpa 0x41E1
_____________________________________
a8888b. / Welcome to the uClinux distribution \
d888888b. / _ _ \
8P"YP"Y88 / | | |_| __ __ (TM) |
8|o||o|88 _____/ | | _ ____ _ _ \ \/ / |
8' .88 \ | | | | _ \| | | | \ / |
8`._.' Y8. \ | |__ | | | | | |_| | / \ |
d/ `8b. \ \____||_|_| |_|\____|/_/\_\ |
dP . Y8b. \ For embedded processors including |
d8:' " `::88b \ the Analog Devices Blackfin /
d8" 'Y88b \___________________________________/
:8P ' :888
8a. : _a88P For further information, check out:
._/"Yaa_: .| 88P| - http://blackfin.uclinux.org/
\ YP" `| 8P `. - http://docs.blackfin.uclinux.org/
/ \.___.d| .' - http://www.uclinux.org/
`--..__)8888P`._.' jgs/a:f - https://www.analog.com/blackfin
Have a lot of fun...
BusyBox v1.18.4 (2011-06-24 10:56:54 CST) hush - the humble shell
root:/> cd bin/
root:/bin> ls
base64 ftpd lsmod ps task2
bcdm gdbserver lsz pwd telnet
boa getopt mcapi_msg1 rcp telnetd
busybox getty mcapi_pkt1 reboot thdm
cat grep mcapi_scl1 rev tone
chgrp gunzip mdev rm touch
chmod gzip mixer rmdir traps_test
chown hostname mkdir rmmod true
corebld hush mkfs.jffs2 route umount
cp hwclock mknod rsh uname
cpio icc modinfo rshd usleep
date icc_loader modprobe rz vconfig
dd ifconfig more scalar version
df inetd mount sed vi
dhcpcd init mpstat sh vplay
dhrystone insmod mtdm sleep vrec
dmesg iostat mv strace watch
dnsdomainname kill netstat stty watchdogd
echo klogd nice sync whetstone
false ln packet_test syslogd zcat
fdisk losetup pidof sz
fsck lrz ping tar
ftp ls portmap task1
root:/bin> icc_loader -l icc
writing to 0xfeb00000, 0x668c bytes: OK
writing to 0xff600000, 0xc4 bytes: OK
root:/bin> sm_debug:feb1f000 COREB: @@@ gen pool create0
sm_debug: 1 : 0
sm_debug:received 1
root:/bin> sm_debug:feb1f040 COREB: @@@ gen pool create1
sm_debug: 2 : 1
sm_debug:received 2
root:/bin>
root:/bin> sm_debug:feb1f080 COREB: before run task
sm_debug: 3 : 2
sm_debug:received 3
root:/bin> icc_loader -f -e mcapi_pkt1
writing to 0x03c00000, 0x473c bytes: OKsm_debug:ioctl type 2
tsm_debug:sm_find_session bits 00000000 localep 0
sm_debug:table bits1 00000000
sm_debug:table index 0
sm_debug:table bits2 00000001
sm_debug:create ep index 0 srcep 0 type 2
sm_debug:session 02944800
sm_debug:size of session 60
sm_debug:ioctl type 2000000
sm_debug:sm_send_packet: 0 02944800
sm_debug:sm_send_packet: len 268 type 2000000 dst 1 dstep 5 src 0 srcep 0
sm_debug:alloc buffer 292b200
sm_debug:sm_task_sendmsg msg type 2000000
sm_debug:sm_task_sendmsg init addr03c00214
sm_debug:sm_send_packet: len 268 type 2000000 dst 1 dstep 5 src 0 srcep 0
sm_debug:sm_send_message_internal: dst 1 src 0
sm_debug:send message cpu 1 sent 1
sm_debug:feb1f0c0 COREB: sm_handle_control_message type 2000000
sm_debug: 4 : 3
sm_debug:received 4
sm_debug:feb1f100 COREB: sm_handle_control_message 2000000 2000000
sm_debug: 5 : 4
sm_debug:received 5
sm_debug:feb1f140 COREB: task init 3c00214
sm_debug: 6 : 5
sm_debug:received 6
sm_debug:feb1f180 COREB: sm_send_message_internal() dst 0 src 1 2000001
sm_debug: 7 : 6
sm_debug:received 7
sm_debug:sm_find_session bits 00000001 localep 0
sm_debug:index 0 ,local ep 0 type 2
sm_debug:session 02944800 index 0 msg type2000001
sm_debug:sm_task_recvmsg msg type 2000001
sm_debug:sm_task_recvmsg free 292b200
sm_debug:received 8
sm_debug:feb1f000 COREB: finish sm_handle_control_message
sm_debug: 9 : 8
sm_debug:received 9
sm_debug:feb1f040 COREB: before run task
sm_debug: 10 : 9
sm_debug:received 10
sm_debug:ioctl type 2000000
root:/bin> sm_debug:feb1f080 COREB: before run task1
sm_debug: 11 : 10
sm_debug:received 11
sm_debug:feb1f0c0 COREB: [icc_task_init] 89
sm_debug: 12 : 11
sm_debug:received 12
sm_debug:feb1f100 COREB: create ep
sm_debug: 13 : 12
sm_debug:received 13
sm_debug:feb1f140 COREB: create ep index 0 srcep 100
sm_debug: 14 : 13
sm_debug:received 14
sm_debug:feb1f180 COREB: [icc_task_init] 93
sm_debug: 15 : 14
sm_debug:received 15
sm_debug:feb1f1c0 COREB: create ep
sm_debug: 16 : 15
sm_debug:received 16
sm_debug:feb1f000 COREB: index 0 ,local ep 100
sm_debug: 17 : 16
sm_debug:received 17
sm_debug:feb1f040 COREB: create ep index 1 srcep 5
sm_debug: 18 : 17
sm_debug:received 18
sm_debug:feb1f080 COREB: node index 0 ep index 1
sm_debug: 19 : 18
sm_debug:received 19
root:/bin>
root:/bin> sm_debug:feb1f0c0 COREB: mcapi pktchan test ep1 10005
sm_debug: 20 : 19
sm_debug:received 20
root:/bin>
root:/bin>
root:/bin>
root:/bin> pkt1 >log
sm_debug:ioctl type 6
sm_debug:sm_find_session bits 00000000 localep 100
sm_debug:table bits1 00000000
sm_debug:table index 0
sm_debug:table bits2 00000001
sm_debug:create ep index 0 srcep 100 type 6
sm_debug:session 02944800
sm_debug:size of session 60
sm_debug:ioctl type 4
sm_debug:sm_find_session bits 00000001 localep 101
sm_debug:index 0 ,local ep 100 type 6
sm_debug:table bits1 00000001
sm_debug:table index 1
sm_debug:table bits2 00000003
sm_debug:create ep index 1 srcep 101 type 4
sm_debug:session 0294483c
sm_debug:size of session 60
sm_debug:ioctl type 4
sm_debug:sm_find_session bits 00000003 localep 200
sm_debug:index 0 ,local ep 100 type 6
sm_debug:index 1 ,local ep 101 type 4
sm_debug:table bits1 00000003
sm_debug:table index 2
sm_debug:table bits2 00000007
sm_debug:create ep index 2 srcep 200 type 4
sm_debug:session 02944878
sm_debug:size of session 60
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:ioctl type 5
sm_debug:sm_send_message_internal: dst 1 src 0
sm_debug:send message cpu 1 sent 2
sm_debug:feb1f100 COREB: sm_handle_control_message type 5000004
sm_debug: 21 : 20
sm_debug:received 21
sm_debug:feb1f140 COREB: @@@ wake up
sm_debug: 22 : 21
sm_debug:received 22
sm_debug:feb1f180 COREB: index 0 ,local ep 100
sm_debug: 23 : 22
sm_debug:received 23
sm_debug:feb1f1c0 COREB: index 1 ,local ep 5
sm_debug: 24 : 23
sm_debug:received 24
sm_debug:feb1f000 COREB: msg type 5000004 index 1 session type 4
sm_debug: 25 : 24
sm_debug:received 25
sm_debug:feb1f040 COREB: type 5000004, dstep 5, srcep 101
sm_debug: 26 : 25
sm_debug:received 26
sm_debug:feb1f080 COREB: session type 5
sm_debug: 27 : 26
sm_debug:received 27
sm_debug:feb1f0c0 COREB: sm_send_message_internal() dst 0 src 1 5000005
sm_debug: 28 : 27
sm_debug:received 28
sm_debug:sm_find_session bits 00000007 localep 101
sm_debug:index 0 ,local ep 100 type 6
sm_debug:index 1 ,local ep 101 type 5
sm_debug:session 0294483c index 1 msg type5000005
sm_debug:sm_default_recvmsg msg type 5000005
sm_debug:sm_default_recvmsg wakeup wait thread
sm_debug:received 29
sm_debug:received connect ack
sm_debug:auto accept
sm_debug:sm_send_message_internal: dst 1 src 0
sm_debug:send message cpu 1 sent 3
sm_debug:feb1f140 COREB: sm_handle_control_message type 5000006
sm_debug: 30 : 29
sm_debug:received 30
sm_debug:ioctl type 0
sm_debug:sm_send_packet: 1 0294483c
sm_debug:sm_send_packet: len 32 type 5000000 dst 1 dstep 5 src 0 srcep 101
sm_debug:alloc buffer 294c300
sm_debug:sm_default_sendmsg session type 5
sm_debug:sm_default_sendmsg: len 32 type 5000000 dst 1 dstep 5 src 0 srcep 101
sm_debug:sm_send_packet: len 32 type 5000000 dst 1 dstep 5 src 0 srcep 101
sm_debug:sm_send_message_internal: dst 1 src 0
sm_debug:send message cpu 1 sent 4
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:feb1f180 COREB: sm_handle_control_message type 5000006
sm_debug: 31 : 30
sm_debug:received 31
sm_debug:feb1f1c0 COREB: @@@ wake up
sm_debug: 32 : 31
sm_debug:received 32
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:feb1f000 COREB: index 0 ,local ep 100
sm_debug: 33 : 32
sm_debug:received 33
sm_debug:feb1f040 COREB: index 1 ,local ep 5
sm_debug: 34 : 33
sm_debug:received 34
sm_debug:feb1f080 COREB: msg type 5000006 index 1 session type 5
sm_debug: 35 : 34
sm_debug:received 35
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:feb1f0c0 COREB: type 5000006, dstep 5, srcep 101
sm_debug: 36 : 35
sm_debug:received 36
sm_debug:feb1f100 COREB: connected 1 101
sm_debug: 37 : 36
sm_debug:received 37
sm_debug:feb1f140 COREB: index 0 ,local ep 100
sm_debug: 38 : 37
sm_debug:received 38
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:feb1f180 COREB: index 1 ,local ep 5
sm_debug: 39 : 38
sm_debug:received 39
sm_debug:feb1f1c0 COREB: msg type 5000000 index 1 session type 5
sm_debug: 40 : 39
sm_debug:received 40
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:feb1f000 COREB: type 5000000, dstep 5, srcep 101
sm_debug: 41 : 40
sm_debug:received 41
sm_debug:feb1f040 COREB: recved packet msg handle0
sm_debug: 42 : 41
sm_debug:received 42
sm_debug:feb1f080 COREB: msg_recv_internal msg type 5000000 alloc 3d40000
sm_debug: 43 : 42
sm_debug:received 43
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:feb1f0c0 COREB: avail 1
sm_debug: 44 : 43
sm_debug:received 44
sm_debug:feb1f100 COREB: index 1 avail 1
sm_debug: 45 : 44
sm_debug:received 45
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:feb1f140 COREB: mcapi_open_pktchan_recv_i 649
sm_debug: 46 : 45
sm_debug:received 46
sm_debug:feb1f180 COREB: mcapi_trans_valid_endpoint ep 65541 index 1 valid 1
sm_debug: 47 : 46
sm_debug:received 47
sm_debug:feb1f1c0 COREB: mcapi_trans_channel_type 1 status 0
sm_debug: 48 : 47
sm_debug:received 48
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:feb1f000 COREB: mcapi_trans_connected 533
sm_debug: 49 : 48
sm_debug:received 49
sm_debug:feb1f040 COREB: mcapi_trans_connected 538 1
sm_debug: 50 : 49
sm_debug:received 50
sm_debug:feb1f080 COREB: mcapi_open_pktchan_recv_i 675 status 1
sm_debug: 51 : 50
sm_debug:received 51
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:feb1f0c0 COREB: open recv chan status 1
sm_debug: 52 : 51
sm_debug:received 52
sm_debug:feb1f100 COREB: mcapi_pktchan_recv_i 768
sm_debug: 53 : 52
sm_debug:received 53
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:feb1f140 COREB: mcapi_pktchan_recv_i 789 1
sm_debug: 54 : 53
sm_debug:received 54
sm_debug:feb1f180 COREB: sm_recv_packet session type 5 localep5
sm_debug: 55 : 54
sm_debug:received 55
sm_debug:feb1f1c0 COREB: sm_recv_packet() mcapi_pkt12222222222222
sm_debug: 56 : 55
sm_debug:received 56
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:feb1f000 COREB: sm_recv_packet msg
sm_debug: 57 : 56
sm_debug:received 57
sm_debug:feb1f040 COREB: index 1, se 101, sn 0
sm_debug: 58 : 57
sm_debug:received 58
sm_debug:feb1f080 COREB: setup_request_internal[101,65541]
sm_debug: 59 : 58
sm_debug:received 59
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:feb1f0c0 COREB: 550000endpoint=565541 has received: [mcapi_pkt12222222222222]>
sm_debug: 60 : 59
sm_debug:received 60
sm_debug:feb1f100 COREB: create ep
sm_debug: 61 : 60
sm_debug:received 61
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:feb1f140 COREB: index 0 ,local ep 100
sm_debug: 62 : 61
sm_debug:received 62
sm_debug:feb1f180 COREB: index 1 ,local ep 5
sm_debug: 63 : 62
sm_debug:received 63
sm_debug:feb1f1c0 COREB: create ep index 2 srcep 6
sm_debug: 64 : 63
sm_debug:received 64
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:feb1f000 COREB: node index 0 ep index 2
sm_debug: 65 : 64
sm_debug:received 65
sm_debug:feb1f040 COREB: mcapi pktchan test ep2 10006
sm_debug: 66 : 65
sm_debug:received 66
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:feb1f080 COREB: mcapi pktchan test ep3 c8
sm_debug: 67 : 66
sm_debug:received 67
sm_debug:feb1f0c0 COREB: mcapi_trans_valid_endpoint ep 65542 index 2 valid 1
sm_debug: 68 : 67
sm_debug:received 68
sm_debug:feb1f100 COREB: index 0 ,local ep 100
sm_debug: 69 : 68
sm_debug:received 69
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:feb1f140 COREB: index 1 ,local ep 5
sm_debug: 70 : 69
sm_debug:received 70
sm_debug:feb1f180 COREB: index 2 ,local ep 6
sm_debug: 71 : 70
sm_debug:received 71
sm_debug:feb1f1c0 COREB: vvvvopen pktchan send
sm_debug: 72 : 71
sm_debug:received 72
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:feb1f000 COREB: mcapi_trans_valid_endpoint ep 65542 index 2 valid 1
sm_debug: 73 : 72
sm_debug:received 73
sm_debug:feb1f040 COREB: mcapi_trans_channel_type 2 status 1
sm_debug: 74 : 73
sm_debug:received 74
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:feb1f080 COREB: open send chan status 1
sm_debug: 75 : 74
sm_debug:received 75
sm_debug:feb1f0c0 COREB: sm_default_sendmsg msg type 4000000
sm_debug: 76 : 75
sm_debug:received 76
sm_debug:feb1f100 COREB: sm_send_message_internal() dst 0 src 1 4000000
sm_debug: 77 : 76
sm_debug:received 77
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:sm_find_session bits 00000007 localep 200
sm_debug:index 0 ,local ep 100 type 6
sm_debug:index 1 ,local ep 101 type 5
sm_debug:index 2 ,local ep 200 type 4
sm_debug:session 02944878 index 2 msg type4000000
sm_debug:sm_default_recvmsg msg type 4000000
sm_debug:msg_recv_internal wakeup wait thread
sm_debug:received 78
sm_debug:feb1f180 COREB: setup_request_internal[65542,200]
sm_debug: 79 : 77
sm_debug:received 79
sm_debug:feb1f1c0 COREB: 111111111endpoint=65542 has sent: [today is really strange]
sm_debug: 80 : 79
...
sm_debug: 81 : 80
sm_debug:received 81
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
sm_debug:ioctl type 0
sm_debug:session status index 1, avail 0
the test case file are attached.
CTRL-A Z for help | 57600 8N1 | NOR | Minicom 2.3 | VT102 | Offline
Follow-ups
--- Mingquan Pan 2011-08-04 04:47:18
CoreA can receive the data sent by coreB now by giving the right handle in
testcase. So Close.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
pkt1.c text/x-csrc 2902 Mingquan Pan
mcapi_pkt1.c text/x-csrc 2942 Mingquan Pan