@@ -784,6 +784,12 @@ int cxl_release_resource(struct cxl_dev_state *cxlds, enum cxl_resource type)
}
EXPORT_SYMBOL_NS_GPL(cxl_release_resource, CXL);
+void cxl_set_media_ready(struct cxl_dev_state *cxlds)
+{
+ cxlds->media_ready = true;
+}
+EXPORT_SYMBOL_NS_GPL(cxl_set_media_ready, CXL);
+
static int cxl_memdev_release_file(struct inode *inode, struct file *file)
{
struct cxl_memdev *cxlmd =
@@ -78,6 +78,11 @@ int efx_cxl_init(struct efx_nic *efx)
goto err;
}
+ /* We do not have the register about media status. Hardware design
+ * implies it is ready.
+ */
+ cxl_set_media_ready(cxl->cxlds);
+
return 0;
err:
kfree(cxl->cxlds);
@@ -54,4 +54,5 @@ bool cxl_pci_check_caps(struct cxl_dev_state *cxlds, u32 expected_caps,
int cxl_pci_accel_setup_regs(struct pci_dev *pdev, struct cxl_dev_state *cxlds);
int cxl_request_resource(struct cxl_dev_state *cxlds, enum cxl_resource type);
int cxl_release_resource(struct cxl_dev_state *cxlds, enum cxl_resource type);
+void cxl_set_media_ready(struct cxl_dev_state *cxlds);
#endif