Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions sound/soc/sof/hw-spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,16 @@ static int spi_get_reply(struct snd_sof_dev *sdev, struct snd_sof_ipc_msg *msg)
int ret = 0;
u32 size;

/*
* Sometimes, there is unexpected reply ipc arriving. The reply
* ipc belongs to none of the ipcs sent from driver.
* In this case, the driver must ignore the ipc.
*/
if (!msg) {
dev_warn(sdev->dev, "unexpected ipc interrupt raised!\n");
return 0;
}

/* get reply */
spi_mailbox_read(sdev, sdev->host_box.offset, &reply, sizeof(reply));
if (reply.error < 0) {
Expand Down
10 changes: 10 additions & 0 deletions sound/soc/sof/intel/bdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,16 @@ static void bdw_get_reply(struct snd_sof_dev *sdev)
unsigned long flags;
int ret = 0;

/*
* Sometimes, there is unexpected reply ipc arriving. The reply
* ipc belongs to none of the ipcs sent from driver.
* In this case, the driver must ignore the ipc.
*/
if (!msg) {
dev_warn(sdev->dev, "unexpected ipc interrupt raised!\n");
return;
}

/* get reply */
sof_mailbox_read(sdev, sdev->host_box.offset, &reply, sizeof(reply));

Expand Down
10 changes: 10 additions & 0 deletions sound/soc/sof/intel/byt.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,16 @@ static void byt_get_reply(struct snd_sof_dev *sdev)
unsigned long flags;
int ret = 0;

/*
* Sometimes, there is unexpected reply ipc arriving. The reply
* ipc belongs to none of the ipcs sent from driver.
* In this case, the driver must ignore the ipc.
*/
if (!msg) {
dev_warn(sdev->dev, "unexpected ipc interrupt raised!\n");
return;
}

/* get reply */
sof_mailbox_read(sdev, sdev->host_box.offset, &reply, sizeof(reply));

Expand Down
9 changes: 9 additions & 0 deletions sound/soc/sof/intel/hda-ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ void hda_dsp_ipc_get_reply(struct snd_sof_dev *sdev)
unsigned long flags;
int ret = 0;

/*
* Sometimes, there is unexpected reply ipc arriving. The reply
* ipc belongs to none of the ipcs sent from driver.
* In this case, the driver must ignore the ipc.
*/
if (!msg) {
dev_warn(sdev->dev, "unexpected ipc interrupt raised!\n");
return;
}
spin_lock_irqsave(&sdev->ipc_lock, flags);

hdr = msg->msg_data;
Expand Down
10 changes: 10 additions & 0 deletions sound/soc/sof/intel/hsw.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,16 @@ static void hsw_get_reply(struct snd_sof_dev *sdev)
unsigned long flags;
int ret = 0;

/*
* Sometimes, there is unexpected reply ipc arriving. The reply
* ipc belongs to none of the ipcs sent from driver.
* In this case, the driver must ignore the ipc.
*/
if (!msg) {
dev_warn(sdev->dev, "unexpected ipc interrupt raised!\n");
return;
}

spin_lock_irqsave(&sdev->ipc_lock, flags);

/* get reply */
Expand Down