On 19 January 2017 05:26, quoth Christoph Schroeder: > I am currently testing the patchset 20160804 and encountered a problem > introduced by 0005-Support-for-multiple-mailbox-protocols.patch. It's not > possible to retrieve the data via the libraries "ecrt_voe_handler_data" > function anymore after a successful ecrt_voe_handler_read. I still get the > correct data size but there is no data found at the returned pointer address. > > I guess this is the problem: > "The mailbox state machines will check and fetch the data from their own > buffer instead of the datagram buffer (that is no longer used for mailbox > read data)." > > The data seems to be stored somewhere else now and the function still > returns a pointer to a datagram buffer. Communication still works and the > data is there inside the master as debuglevel=1 prints the correct data into > the kernel log. I found the lines were this is done in the new introduced > "ec_voe_handler_state_read_response_data", but how can I access the > data from the library without using ioctl calls from my user application? I > would appreciate any hint or an update of the patch.
Try the following changes (sorry, can't generate a patch right now): * voe_handler.c:372: "mbox_coe_data" should be "mbox_voe_data". * voe_handler.c:500: add: memcpy(voe->datagram.data + EC_MBOX_HEADER_SIZE, data, data_size); * voe_handler.c:608: same here. Give this a try and let me know if it helps, or if further changes are required, and I can update the patchset accordingly. _______________________________________________ etherlab-dev mailing list etherlab-dev@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-dev