File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -450,8 +450,9 @@ void json_nvme_id_ctrl(struct nvme_id_ctrl *ctrl,
450450 struct json_object * psd = json_create_object ();
451451
452452 obj_add_int (psd , "max_power" , le16_to_cpu (ctrl -> psd [i ].mp ));
453- obj_add_int (psd , "max_power_scale" , ctrl -> psd [i ].flags & 0x1 );
454- obj_add_int (psd , "non-operational_state" , (ctrl -> psd [i ].flags & 2 ) >> 1 );
453+ obj_add_int (psd , "max_power_scale" , ctrl -> psd [i ].flags & NVME_PSD_FLAGS_MXPS );
454+ obj_add_int (psd , "non-operational_state" ,
455+ !!(ctrl -> psd [i ].flags & NVME_PSD_FLAGS_NOPS ));
455456 obj_add_uint (psd , "entry_lat" , le32_to_cpu (ctrl -> psd [i ].enlat ));
456457 obj_add_uint (psd , "exit_lat" , le32_to_cpu (ctrl -> psd [i ].exlat ));
457458 obj_add_int (psd , "read_tput" , ctrl -> psd [i ].rrt );
You can’t perform that action at this time.
0 commit comments