On Fri, Nov 19, 2021 at 4:03 PM 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> > --- > 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; Per comment on last patch I think this whole 'if' block can go. "Ready" need only be checked once at the beginning of time and then only as a forensic step after a future failure.