All of lore.kernel.org
 help / color / mirror / Atom feed
* NVME-CLI : Fabrics property-get and 64 bit property (CAP)
@ 2018-06-19 16:23 Eyal BenDavid
  2018-06-19 17:54 ` Daniel Verkamp
  0 siblings, 1 reply; 9+ messages in thread
From: Eyal BenDavid @ 2018-06-19 16:23 UTC (permalink / raw)


Hi all,

We use show-regs in NVME-CLI for fabrics (FC) property-get (CAP, CC etc)

The controller capabilities property (CAP) is 64 bit.

The result field of struct nvme_passthru_cmd is of type __u32

Therefore the following code snippet from file nvme-ioctl.c,
function nvme_property() might lose information:

Code:
   /*   __le64 *value  */

    err = nvme_submit_admin_passthru(fd, &cmd);
    if (!err && fctype == nvme_fabrics_type_property_get)
        *value = cpu_to_le64(cmd.result);    // <<<<<<  HERE

When running show-regs command the high dword of CAP is always 0.

My questions:
how can I use nvme-cli to get the whole 8 byte range for CAP property
in property-get command.
Can I get the missing dword by an additional call to offset 4? (using
admin-passtru)
Is it legal for the controller to answer for this request?

Thanks
Eyal

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

end of thread, other threads:[~2018-06-20 16:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-19 16:23 NVME-CLI : Fabrics property-get and 64 bit property (CAP) Eyal BenDavid
2018-06-19 17:54 ` Daniel Verkamp
2018-06-19 19:02   ` Eyal BenDavid
2018-06-19 19:48     ` Keith Busch
2018-06-19 20:00       ` Eyal BenDavid
2018-06-19 20:25         ` Keith Busch
2018-06-19 20:55           ` Eyal BenDavid
2018-06-19 21:33             ` Eyal BenDavid
2018-06-20 16:20               ` Eyal BenDavid

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.