Skip to content

set power mode with set feature should support character device #13

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

Open
kwzhu123 opened this issue Aug 5, 2024 · 1 comment
Open

Comments

@kwzhu123
Copy link

kwzhu123 commented Aug 5, 2024

1
/src/autoval_ssd/lib/utils/storage/nvme/nvme_drive.py
def set_power_mode(self, feature_value: int) -> int:
"""Set Power Mode.

    This method sets the value of the power mode using
    the power management feature of the drive.

    Returns
    -------
    feature_value : String
        Set feature value that gives current power-mode of
        the drive. Eg: "5".

    Raises
    ------
    TestError
        - When fails to set the power mode.
        - When fails to match the set-feature output with the
          given pattern.
    NotImplementedError
        - When the power mode is not supported by the drive.
    """

    cmd = "nvme set-feature /dev/%s -f 0x2 -v %s" % (
        self.block_name,
        feature_value,
    )

2
some vendor's drive used character device instead of block device for drive level feature(like Scaleflux /MEMBLAZE)
sudo nvme set-feature /dev/nvme0n1 -f 0x2 --value=0 #should be /dev/nvme0
NVMe status: Feature Not Namespace Specific: The Feature Identifier specified is not namespace specific(0x10f)]

@aarthi-manivel
Copy link
Collaborator

@kwzhu123 , The changes for the latest nvmecli version addresses the issues mentioned here and could you please retrigger the test with the latest codebase and let me know if you face issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants