Linux CXL
 help / color / mirror / Atom feed
* [PATCH v2] hw/cxl: fix physical address field in get scan media results output
@ 2024-08-19 15:42 peng guo
  2024-08-23 15:03 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: peng guo @ 2024-08-19 15:42 UTC (permalink / raw)
  To: jonathan.cameron; +Cc: fan.ni, linux-cxl, peng guo

When using the mailbox command get scan media results, the scan media 
restart physical address field in the ouput palyload is not 64-byte 
aligned.

This patch removed the error source of the restart physical address. 

The Scan Media Restart Physical Address is the location from which the 
host should restart the Scan Media operation. [5:0] bits are reserved.
Refer to CXL spec r3.1 Table 8-146

Fixes: 89b5cfcc31e6 ("hw/cxl: Add get scan media results cmd support")
Signed-off-by: peng guo <engguopeng@buaa.edu.cn>
---
v1 -> v2: Add module name to title

 hw/cxl/cxl-mailbox-utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-utils.c
index 3ebbd32e1028..9258e48f95ee 100644
--- a/hw/cxl/cxl-mailbox-utils.c
+++ b/hw/cxl/cxl-mailbox-utils.c
@@ -2076,7 +2076,7 @@ static CXLRetCode cmd_media_get_scan_media_results(const struct cxl_cmd *cmd,
 
         start = ROUND_DOWN(ent->start, 64ull);
         stop = ROUND_DOWN(ent->start, 64ull) + ent->length;
-        stq_le_p(&out->records[i].addr, start | (ent->type & 0x7));
+        stq_le_p(&out->records[i].addr, start);
         stl_le_p(&out->records[i].length, (stop - start) / CXL_CACHE_LINE_SIZE);
         i++;
 
-- 
2.43.0


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

end of thread, other threads:[~2024-08-23 15:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-19 15:42 [PATCH v2] hw/cxl: fix physical address field in get scan media results output peng guo
2024-08-23 15:03 ` Jonathan Cameron

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