[PATCH] nvme: clear the prp2 field of the nvme command.

Chaitanya Kulkarni chaitanyak at nvidia.com
Mon Nov 28 20:16:59 PST 2022


On 11/28/22 17:47, Lei Rao wrote:
> If the prp2 field is not filled in nvme_setup_prp_simple(), the prp2
> field is garbage data. According to nvme spec, the prp2 is reserved if
> the data transfer does not cross a memory page boundary. Writing a
> reserved coded value into a controller property field produces undefined
> results, so it needs to be cleared in nvme_setup_rw().
> 
> Signed-off-by: Lei Rao <lei.rao at intel.com>

if it is reserved then controller shoule ignore this field, no ?

not sure if original author wanted to avoid an extra assignment
in the fast path with assumption that reserved fields should be
ignored if it is then we should avoid this, if not then looks good

Reviewed-by: Chaitanya Kulkarni <kch at nvidia.com>

-ck



More information about the Linux-nvme mailing list