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

base: update ipmiComm patch to handle CODE_DESTINATION_UNAVAIL. #76

Merged
merged 1 commit into from
Sep 10, 2024
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
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Unreleased

### Bug fixes

* base: patch ipmiComm to handle `CODE_DESTINATION_UNAVAIL`. by
@gustavosr8 in https://github.com/cnpem/epics-in-docker/pull/76.

## v0.10.0

Users of `ipmiComm` should update to this release, since it makes the module
Expand Down
1 change: 1 addition & 0 deletions base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ ARG SCALER_VERSION
ARG MCA_VERSION

COPY backport-ipmicomm.patch .
COPY ipmicomm.patch .
COPY caputlog-waveform-fix.patch .
COPY install_modules.sh .
RUN ./install_modules.sh
Expand Down
1 change: 1 addition & 0 deletions base/install_modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ EPICS_BASE

download_from_github slac-epics-modules ipmiComm $IPMICOMM_VERSION
patch -d ipmiComm -Np1 < backport-ipmicomm.patch
patch -d ipmiComm -Np1 < ipmicomm.patch
JOBS=1 install_module ipmiComm IPMICOMM "
EPICS_BASE
ASYN
Expand Down
24 changes: 24 additions & 0 deletions base/ipmicomm.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From: https://github.com/slac-epics-modules/ipmiComm/pull/33/
From d73ee36351ac3914ed780d432e2a03c382f2c349 Mon Sep 17 00:00:00 2001
From: Gustavo de Souza dos Reis <[email protected]>
Date: Tue, 3 Sep 2024 10:50:43 -0300
Subject: [PATCH] Handles `IPMI_COMP_CODE_DESTINATION_UNAVAIL` completion code.
gustavosr8 marked this conversation as resolved.
Show resolved Hide resolved

This message is sent by MCH when the destination is not available. So,
in order to handle this, the sens->unavail flag must be set to 1.
---
src/drvMch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/drvMch.c b/src/drvMch.c
index 33e9b00..8a057d0 100644
--- a/src/drvMch.c
+++ b/src/drvMch.c
gustavosr8 marked this conversation as resolved.
Show resolved Hide resolved
@@ -1340,7 +1340,7 @@ size_t tmp = sens->readMsgLength; /* Initially set to requested msg length,

/* If error code ... */
if ( rval ) {
- if ( rval == IPMI_COMP_CODE_REQUESTED_DATA )
+ if ( rval == IPMI_COMP_CODE_REQUESTED_DATA || rval == IPMI_COMP_CODE_DESTINATION_UNAVAIL )
sens->unavail = 1;
return -1;
}
1 change: 1 addition & 0 deletions base/musl/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ ARG MCA_VERSION

WORKDIR ${EPICS_MODULES_PATH}
COPY backport-ipmicomm.patch .
COPY ipmicomm.patch .
COPY caputlog-waveform-fix.patch .
COPY install_modules.sh .
RUN NEEDS_TIRPC=YES ./install_modules.sh