Commit 2bcf3bbd authored by Dan Williams's avatar Dan Williams

cxl/mem: Drop mem_enabled check from wait_for_media()

Media ready is asserted by the device independent of whether mem_enabled
was ever set. Drop this check to allow for dropping wait_for_media() in
favor of ->wait_media_ready().

Fixes: 8dd2bc0f ("cxl/mem: Add the cxl_mem driver")
Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/165291685501.1426646.10372821863672431074.stgit@dwillia2-xfhSigned-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent e6829d1b
...@@ -27,12 +27,8 @@ ...@@ -27,12 +27,8 @@
static int wait_for_media(struct cxl_memdev *cxlmd) static int wait_for_media(struct cxl_memdev *cxlmd)
{ {
struct cxl_dev_state *cxlds = cxlmd->cxlds; struct cxl_dev_state *cxlds = cxlmd->cxlds;
struct cxl_endpoint_dvsec_info *info = &cxlds->info;
int rc; int rc;
if (!info->mem_enabled)
return -EBUSY;
rc = cxlds->wait_media_ready(cxlds); rc = cxlds->wait_media_ready(cxlds);
if (rc) if (rc)
return rc; return rc;
......
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