Skip to content

Commit

Permalink
base: patch ipmiComm to handle CODE_DESTINATION_UNAVAIL.
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavosr8 committed Sep 10, 2024
1 parent 93f7644 commit a2d5e9c
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 0 deletions.
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.

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
@@ -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

0 comments on commit a2d5e9c

Please sign in to comment.