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

Dell SMF driver hwmon number reorder fix for Dell S6100/Z9100 #2305

Merged
merged 2 commits into from
Dec 5, 2018
Merged
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
4 changes: 3 additions & 1 deletion device/dell/x86_64-dell_s6100_c2538-r0/plugins/psuutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
except ImportError as e:
raise ImportError(str(e) + "- required module not found")

HWMON_DIR = "/sys/devices/platform/SMF.512/hwmon/"
HWMON_NODE = os.listdir(HWMON_DIR)[0]

class PsuUtil(PsuBase):
"""Platform-specific PSUutil class"""
Expand All @@ -20,7 +22,7 @@ def __init__(self):

# Get a mailbox register
def get_pmc_register(self, reg_name):
mailbox_dir = "/sys/devices/platform/SMF.512/hwmon/hwmon1"
mailbox_dir = HWMON_DIR + HWMON_NODE
retval = 'ERR'
mb_reg_file = mailbox_dir+'/' + reg_name
if (not os.path.isfile(mb_reg_file)):
Expand Down
4 changes: 3 additions & 1 deletion device/dell/x86_64-dell_z9100_c2538-r0/plugins/psuutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
except ImportError as e:
raise ImportError(str(e) + "- required module not found")

HWMON_DIR = "/sys/devices/platform/SMF.512/hwmon/"
HWMON_NODE = os.listdir(HWMON_DIR)[0]

class PsuUtil(PsuBase):
"""Platform-specific PSUutil class"""
Expand All @@ -20,7 +22,7 @@ def __init__(self):

# Get a mailbox register
def get_pmc_register(self, reg_name):
mailbox_dir = "/sys/devices/platform/SMF.512/hwmon/hwmon1"
mailbox_dir = HWMON_DIR + HWMON_NODE
retval = 'ERR'
mb_reg_file = mailbox_dir+'/' + reg_name
if (not os.path.isfile(mb_reg_file)):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
S6100_MAX_PSUS = 2
S6100_MAX_IOMS = 4

MAILBOX_DIR = "/sys/devices/platform/SMF.512/hwmon/hwmon1"
HWMON_DIR = "/sys/devices/platform/SMF.512/hwmon/"
HWMON_NODE = os.listdir(HWMON_DIR)[0]
MAILBOX_DIR = HWMON_DIR + HWMON_NODE
iom_status_list = []

# Get a mailbox register
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
Z9100_MAX_PSUS = 2
S6100_MAX_IOMS = 4

MAILBOX_DIR = "/sys/devices/platform/SMF.512/hwmon/hwmon0"
HWMON_DIR = "/sys/devices/platform/SMF.512/hwmon/"
HWMON_NODE = os.listdir(HWMON_DIR)[0]
MAILBOX_DIR = HWMON_DIR + HWMON_NODE

# Get a mailbox register

Expand Down