mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@stgolabs.net>
To: Li Ming <ming.li@zohomail.com>
Cc: jonathan.cameron@huawei.com, dave.jiang@intel.com,
	alison.schofield@intel.com, vishal.l.verma@intel.com,
	ira.weiny@intel.com, dan.j.williams@intel.com,
	linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org,
	shiju.jose@huawei.com
Subject: Re: [RFC PATCH 1/1] cxl/feature: Using Full Data Transfer only when offset is 0
Date: Mon, 14 Apr 2025 16:58:17 -0700	[thread overview]
Message-ID: <20250414235817.hu4bpvldk2yiayts@offworld> (raw)
In-Reply-To: <20250409024825.510632-1-ming.li@zohomail.com>

On Wed, 09 Apr 2025, Li Ming wrote:

>Per CXL r3.2 section 8.2.10.6.3 Set Feature(Opcode 0502h)
>
>"If the Feature data is transferred in its entirely, the caller makes
>one call to Set Feature with Action = Full Data Transfer. The Offset
>field is not used and shall be ignored."
>
>It implies if using Full Data Transfer, the received data should be
>updated from offset 0 on device side.
>
>Current driver implementation is if feature data size is less than mbox
>payload - set feature header, driver will use Full Data Transfer even if
>user provides an offset. Per above description, feature data will be
>written from offset 0 rather than the offset value user provided, the
>result will not be what user expects.
>
>The changes is checking if the offset caller provides is equal to 0, if
>yes, using Full Data Transfer, if not, using Initiate Data Transfer -
>Finish Data Transfer.
>
>After the changes, all Set Feature transfer scenarios are below:
>
>1. data size + header is less than mbox payload and offset is 0
>	Full Data Transfer
>
>2. data size + header is less than mbox payload and offset is not 0
>	Initiate Data Transfer(with all feature data) - Finish Data Transfer(with no feature data)
>
>3. data size + header us greater than mbox payload with any value of offset
>	Initiate Data Transfer - Continue Data Transfer - Finish Data Transfer
>
>Fixes: 14d502cc2718e ("cxl/mbox: Add SET_FEATURE mailbox command")
>Signed-off-by: Li Ming <ming.li@zohomail.com>

Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>

      parent reply	other threads:[~2025-04-14 23:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-09  2:48 Li Ming
2025-04-09 15:35 ` Dave Jiang
2025-04-14 23:58 ` Davidlohr Bueso [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250414235817.hu4bpvldk2yiayts@offworld \
    --to=dave@stgolabs.net \
    --cc=alison.schofield@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=ira.weiny@intel.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.li@zohomail.com \
    --cc=shiju.jose@huawei.com \
    --cc=vishal.l.verma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®