Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mi: Cleanup nvme_mi_mi_config_get() to nvme_mi_get_mi_config() #660

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/rst/mi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ indicate the particular structure to query from the endpoint.

Configuration parameters for the MI Get/Set Configuration commands.

See :c:type:`nvme_mi_mi_config_get`() and :c:type:`nvme_mi_config_set`().
See :c:type:`nvme_mi_get_mi_config`() and :c:type:`nvme_mi_config_set`().



Expand Down
2 changes: 1 addition & 1 deletion src/libnvme-mi.map
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ LIBNVME_MI_1_1 {
nvme_mi_init_ctrl;
nvme_mi_close_ctrl;
nvme_mi_close;
nvme_mi_mi_config_get;
nvme_mi_get_mi_config;
nvme_mi_mi_config_set;
nvme_mi_mi_read_mi_data_subsys;
nvme_mi_mi_read_mi_data_port;
Expand Down
2 changes: 1 addition & 1 deletion src/nvme/mi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1475,7 +1475,7 @@ int nvme_mi_mi_subsystem_health_status_poll(nvme_mi_ep_t ep, bool clear,
return 0;
}

int nvme_mi_mi_config_get(nvme_mi_ep_t ep, __u32 dw0, __u32 dw1,
int nvme_mi_get_mi_config(nvme_mi_ep_t ep, __u32 dw0, __u32 dw1,
__u32 *nmresp)
{
struct nvme_mi_mi_resp_hdr resp_hdr;
Expand Down
10 changes: 5 additions & 5 deletions src/nvme/mi.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ enum nvme_mi_dtyp {
*
* Configuration parameters for the MI Get/Set Configuration commands.
*
* See &nvme_mi_mi_config_get() and &nvme_mi_config_set().
* See &nvme_mi_get_mi_config() and &nvme_mi_config_set().
*/
enum nvme_mi_config_id {
NVME_MI_CONFIG_SMBUS_FREQ = 0x1,
Expand Down Expand Up @@ -773,7 +773,7 @@ int nvme_mi_mi_subsystem_health_status_poll(nvme_mi_ep_t ep, bool clear,
struct nvme_mi_nvm_ss_health_status *nshds);

/**
* nvme_mi_mi_config_get - query a configuration parameter
* nvme_mi_get_mi_config - query a configuration parameter
* @ep: endpoint for MI communication
* @dw0: management doubleword 0, containing configuration identifier, plus
* config-specific fields
Expand All @@ -792,7 +792,7 @@ int nvme_mi_mi_subsystem_health_status_poll(nvme_mi_ep_t ep, bool clear,
* Return: The nvme command status if a response was received (see
* &enum nvme_status_field) or -1 with errno set otherwise..
*/
int nvme_mi_mi_config_get(nvme_mi_ep_t ep, __u32 dw0, __u32 dw1,
int nvme_mi_get_mi_config(nvme_mi_ep_t ep, __u32 dw0, __u32 dw1,
__u32 *nmresp);

/**
Expand Down Expand Up @@ -833,7 +833,7 @@ static inline int nvme_mi_mi_config_get_smbus_freq(nvme_mi_ep_t ep, __u8 port,

dw0 = port << 24 | NVME_MI_CONFIG_SMBUS_FREQ;

rc = nvme_mi_mi_config_get(ep, dw0, 0, &tmp);
rc = nvme_mi_get_mi_config(ep, dw0, 0, &tmp);
if (!rc)
*freq = (enum nvme_mi_config_smbus_freq)(tmp & 0x3);
return rc;
Expand Down Expand Up @@ -913,7 +913,7 @@ static inline int nvme_mi_mi_config_get_mctp_mtu(nvme_mi_ep_t ep, __u8 port,

dw0 = port << 24 | NVME_MI_CONFIG_MCTP_MTU;

rc = nvme_mi_mi_config_get(ep, dw0, 0, &tmp);
rc = nvme_mi_get_mi_config(ep, dw0, 0, &tmp);
if (!rc)
*mtu = tmp & 0xffff;
return rc;
Expand Down