On Thu, Jul 09, 2015 at 10:56:13AM +0530, Vinod Koul wrote:
On Wed, Jul 08, 2015 at 07:46:27PM +0100, Mark Brown wrote:
On Fri, Jul 03, 2015 at 04:04:06PM +0530, Vinod Koul wrote:
Mostly looks good - a few small things here, nothing too major:
+static struct ipc_message *skl_ipc_reply_find_msg(struct sst_generic_ipc *ipc,
u64 ipc_header)
+{
- struct ipc_message *msg = NULL;
- struct skl_ipc_header *header = (struct skl_ipc_header *)(&ipc_header);
- if (list_empty(&ipc->rx_list)) {
dev_err(ipc->dev, "ipc: rx list is empty but received 0x%x\n",
header->primary);
goto out;
- }
- msg = list_first_entry(&ipc->rx_list, struct ipc_message, list);
This says it finds the message but it appears to just return the head of the list without reference to the supplied header other than casting it to skl_ipc_header and possibly using it in an error print?
Yes you are right. Actually currently we dont expect to queue up so we never bother looking up. But yes intention to find messages when they are quued, I will add that bit
And it doesn't work. The message comparison fails as we don't have a cookie for replies :(
That would be reworked in future with FW. For now I am going to rename this to skl_ipc_reply_get_msg() as it essentially gets first and only message in queue