mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] cxl/hdm: allow zero sized committed decoders
@ 2025-10-01 20:37 Vishal Aslot
  2025-10-01 21:28 ` Dave Jiang
  2025-10-02  5:48 ` [PATCH] " Gregory Price
  0 siblings, 2 replies; 21+ messages in thread
From: Vishal Aslot @ 2025-10-01 20:37 UTC (permalink / raw)
  To: Davidlohr Bueso, Jonathan Cameron, Dave Jiang, Alison Schofield,
	Vishal Verma, Ira Weiny, Dan Williams, Li Ming, Peter Zijlstra,
	Dan Carpenter, Zijun Hu, linux-cxl
  Cc: linux-kernel

Signed-off-by: Vishal Aslot <vaslot@nvidia.com>
---
 drivers/cxl/core/hdm.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/cxl/core/hdm.c b/drivers/cxl/core/hdm.c
index e9e1d555cec6..97a5f27f5b72 100644
--- a/drivers/cxl/core/hdm.c
+++ b/drivers/cxl/core/hdm.c
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
-/* Copyright(c) 2022 Intel Corporation. All rights reserved. */
+/* Copyright(c) 2022-2025 Intel Corporation. All rights reserved. */
 #include <linux/seq_file.h>
 #include <linux/device.h>
 #include <linux/delay.h>
@@ -1050,7 +1050,7 @@ static int init_hdm_decoder(struct cxl_port *port, struct cxl_decoder *cxld,
                        dev_warn(&port->dev,
                                 "decoder%d.%d: Committed with zero size\n",
                                 port->id, cxld->id);
-                       return -ENXIO;
+                       return -ENOSPC;
                }
                port->commit_end = cxld->id;
        } else {
@@ -1210,6 +1210,11 @@ int devm_cxl_enumerate_decoders(struct cxl_hdm *cxlhdm,
                rc = init_hdm_decoder(port, cxld, target_map, hdm, i,
                                      &dpa_base, info);
                if (rc) {
+                       if (rc == -ENOSPC) {
+                               put_device(&cxld->dev);
+                               rc = 0;
+                               continue;
+                       }
                        dev_warn(&port->dev,
                                 "Failed to initialize decoder%d.%d\n",
                                 port->id, i);
--
2.34.1

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2025-10-06 17:06 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-01 20:37 [PATCH] cxl/hdm: allow zero sized committed decoders Vishal Aslot
2025-10-01 21:28 ` Dave Jiang
2025-10-01 22:03   ` Vishal Aslot
2025-10-01 22:46     ` Dave Jiang
2025-10-02  1:57       ` Vishal Aslot
2025-10-03  0:59         ` [PATCH v2] " Vishal Aslot
2025-10-03  4:28           ` Gregory Price
2025-10-04 13:30             ` Vishal Aslot
2025-10-03 16:20           ` Dave Jiang
2025-10-03 20:02             ` Vishal Aslot
2025-10-04  0:06           ` Davidlohr Bueso
2025-10-04 13:34             ` Vishal Aslot
2025-10-02  5:48 ` [PATCH] " Gregory Price
2025-10-02 15:32   ` Dave Jiang
2025-10-03  1:03     ` Vishal Aslot
2025-10-03 14:23       ` Gregory Price
2025-10-04 13:49         ` Vishal Aslot
2025-10-06 17:06           ` Gregory Price
2025-10-03 16:14       ` Dave Jiang
2025-10-04 14:05         ` Vishal Aslot
2025-10-06 14:54           ` Dave Jiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®