Commit 8ea9c33d authored by Davidlohr Bueso's avatar Davidlohr Bueso Committed by Dan Williams

cxl/mbox: Allow for IRQ_NONE case in the isr

For cases when the mailbox background operation is not complete,
do not "handle" the interrupt, as it was not from this device.
And furthermore there are no racy scenarios such as the hw being
out of sync with the driver and starting a new background op
behind its back.
Reported-by: default avatarJonathan Cameron <Jonathan.Cameron@Huawei.com>
Fixes: ccadf131 (cxl/mbox: Add background cmd handling machinery)
Signed-off-by: default avatarDavidlohr Bueso <dave@stgolabs.net>
Reviewed-by: default avatarDave Jiang <dave.jiang@intel.com>
Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20230612181038.14421-2-dave@stgolabs.netSigned-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent ccadf131
......@@ -118,9 +118,11 @@ static irqreturn_t cxl_pci_mbox_irq(int irq, void *id)
struct cxl_dev_id *dev_id = id;
struct cxl_dev_state *cxlds = dev_id->cxlds;
if (!cxl_mbox_background_complete(cxlds))
return IRQ_NONE;
/* short-circuit the wait in __cxl_pci_mbox_send_cmd() */
if (cxl_mbox_background_complete(cxlds))
rcuwait_wake_up(&cxlds->mbox_wait);
rcuwait_wake_up(&cxlds->mbox_wait);
return IRQ_HANDLED;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment