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

Add nvme manager support #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

tonylee79
Copy link
Contributor

phosphor-nvme is the nvme manager service maintains
for NVMe drive information update and related notification
processing service.

Signed-off-by: Tony Lee [email protected]
Change-Id: I32678dc4cf246d67b3bdc3329b5c3f70901f66c2

phosphor-nvme is the nvme manager service maintains
for NVMe drive information update and related notification
processing service.

Signed-off-by: Tony Lee <[email protected]>
Change-Id: I32678dc4cf246d67b3bdc3329b5c3f70901f66c2
Copy link
Contributor

@BenjaminFair BenjaminFair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please split this up into smaller, logically-contained commits to make reviewing easier.

First add the README, then initial build files and the main module, followed by each major feature in a separate commit.

#define MAX_I2C_BUS 30
#define MONITOR_INTERVAL_SENCODS 1
#define NVME_SSD_SLAVE_ADDRESS 0x6a
#define GPIO_BASE_PATH "/sys/class/gpio/gpio"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the gpioplus library instead of accessing the GPIOs through sysfs. It will simplify some of the error handling and be easier to maintain.

std::string obj_path;
obj_path = ledPath;

try{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run this through clang-format to make the coding style consistent. You can reuse the .clang-format config file from another OpenBMC repo.


}catch (const sdbusplus::exception::SdBusError& ex)
{
std::cerr << "Call method fail: set fault LED Aasserted. ERROR = " << ex.what() << std::endl;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use phosphor-logging instead of std::cerr

@@ -0,0 +1,514 @@
/*
i2c-dev.h - i2c-bus driver, char device interface
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this file newly written or copied from somewhere? The copyright header doesn't seem to match

@BenjaminFair
Copy link
Contributor

Since Gerrit synchronization is working again, let's continue this on Gerrit instead.

@tonylee79
Copy link
Contributor Author

Since Gerrit synchronization is working again, let's continue this on Gerrit instead.

Thanks for your advice above, we'll continue this on Gerrit instead.

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

Successfully merging this pull request may close these issues.

2 participants