On Fri, 19 Nov 2021 16:02:33 -0800 Ben Widawsky <ben.widawsky@xxxxxxxxx> wrote: > Media status is necessary for using HDM contained in a CXL device but is > not needed for mailbox accesses. Therefore remove this check. It will be > necessary to have this check (in a different place) when enabling HDM. > > Signed-off-by: Ben Widawsky <ben.widawsky@xxxxxxxxx> One could perhaps argue this was a bug, but it was hopefully harmless on real devices. Out of curiosity, did you find a clear definition of what 'User data' includes? Obviously includes any data in the HDM region, but what about region meta data? Reviewed-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> > --- > This patch did not exist in RFCv2 > --- > drivers/cxl/pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c > index 869b4fc18e27..711bf4514480 100644 > --- a/drivers/cxl/pci.c > +++ b/drivers/cxl/pci.c > @@ -230,7 +230,7 @@ static int cxl_pci_mbox_get(struct cxl_dev_state *cxlds) > * but it's possible early devices implemented this before the ECN. > */ > md_status = readq(cxlds->regs.memdev + CXLMDEV_STATUS_OFFSET); > - if (!(md_status & CXLMDEV_MBOX_IF_READY && CXLMDEV_READY(md_status))) { > + if (!(md_status & CXLMDEV_MBOX_IF_READY)) { > dev_err(dev, "mbox: reported doorbell ready, but not mbox ready\n"); > rc = -EBUSY; > goto out;