Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ppc64-diag for openSUSE:Factory 
checked in at 2023-10-22 21:01:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ppc64-diag (Old)
 and      /work/SRC/openSUSE:Factory/.ppc64-diag.new.1945 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ppc64-diag"

Sun Oct 22 21:01:42 2023 rev:50 rq:1119264 version:2.7.9

Changes:
--------
--- /work/SRC/openSUSE:Factory/ppc64-diag/ppc64-diag.changes    2023-07-19 
19:11:19.000805716 +0200
+++ /work/SRC/openSUSE:Factory/.ppc64-diag.new.1945/ppc64-diag.changes  
2023-10-22 21:01:56.249459628 +0200
@@ -1,0 +2,8 @@
+Fri Oct 20 16:43:03 UTC 2023 - Michal Suchanek <msucha...@suse.de>
+
+- Light path diagnostics: Support Enclosure Fault LEDs on new enclosures 
(bsc#1216074 ltc#201656)
+  + 0001-ppc64-diag-Move-trim_trail_space-function-to-common-.patch
+  + 0002-ppc64-diag-lp_diag-Utilize-trim_trail_space-function.patch
+  + 0003-ppc64-diag-lp_diag-Enable-light-path-diagnostics-for.patch
+
+-------------------------------------------------------------------
@@ -5 +13 @@
-  + 0001-rtas_errd-Handle-multiple-platform-dumps.patch
+  + rtas_errd-Handle-multiple-platform-dumps.patch

New:
----
  0001-ppc64-diag-Move-trim_trail_space-function-to-common-.patch
  0002-ppc64-diag-lp_diag-Utilize-trim_trail_space-function.patch
  0003-ppc64-diag-lp_diag-Enable-light-path-diagnostics-for.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ppc64-diag.spec ++++++
--- /var/tmp/diff_new_pack.tKguOy/_old  2023-10-22 21:01:58.209530898 +0200
+++ /var/tmp/diff_new_pack.tKguOy/_new  2023-10-22 21:01:58.209530898 +0200
@@ -26,8 +26,12 @@
 Source0:        
https://github.com/power-ras/ppc64-diag/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
 #PATCH-FIX-OPENSUSE - ppc64-diag.varunused.patch - fix unused variables
 Patch1:         ppc64-diag.varunused.patch
-#PATCH-FIX-UPSTREAM - 0001-rtas_errd-Handle-multiple-platform-dumps.patch - 
store multiple dumps
+#PATCH-FIX-UPSTREAM - rtas_errd-Handle-multiple-platform-dumps.patch - store 
multiple dumps
 Patch2:         rtas_errd-Handle-multiple-platform-dumps.patch
+#PATCH-FIX-UPSTREAM - Enclosure fault LED support
+Patch3:         0001-ppc64-diag-Move-trim_trail_space-function-to-common-.patch
+Patch4:         0002-ppc64-diag-lp_diag-Utilize-trim_trail_space-function.patch
+Patch5:         0003-ppc64-diag-lp_diag-Enable-light-path-diagnostics-for.patch
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  bison

++++++ 0001-ppc64-diag-Move-trim_trail_space-function-to-common-.patch ++++++
>From c507319d1b5f0286d67e08a3598949ca4144f475 Mon Sep 17 00:00:00 2001
From: Sathvika Vasireddy <s...@linux.ibm.com>
Date: Fri, 8 Sep 2023 12:35:12 +0530
Subject: [PATCH 1/3] ppc64-diag: Move trim_trail_space() function to
 common/utils.c

Upstream: merged, expected in 2.7.10
Git-commit: c507319d1b5f0286d67e08a3598949ca4144f475

Currently, trim_trail_space() function is used in diags/diag_nvme.c file
to be able to trim trailing white spaces from a given location code. Allow
code reusability by moving the trim_trail_space() function from
diags/diag_nvme.c to common/utils.c.

Signed-off-by: Sathvika Vasireddy <s...@linux.ibm.com>
Signed-off-by: Mahesh Salgaonkar <mah...@linux.ibm.com>
---
 common/utils.c    | 25 +++++++++++++++++++++++++
 common/utils.h    |  1 +
 diags/Makefile.am |  4 +++-
 diags/diag_nvme.c | 24 +-----------------------
 4 files changed, 30 insertions(+), 24 deletions(-)

diff --git a/common/utils.c b/common/utils.c
index 031294328fc3..2349878334b2 100644
--- a/common/utils.c
+++ b/common/utils.c
@@ -24,9 +24,34 @@
 #include <fcntl.h>
 #include <string.h>
 #include <assert.h>
+#include <ctype.h>
 
 #include "utils.h"
 
+/* trim_trail_space - Trim trailing white spaces from string
+ * @string - Null terminated string to remove white spaces from
+ *
+ * This function will alter the passed string by removing any trailing white 
spaces and null
+ * terminating it at that point.
+ */
+void trim_trail_space(char *string)
+{
+       char *end;
+       size_t length;
+
+       if (string == NULL)
+               return;
+
+       length = strlen(string);
+       if (length == 0)
+               return;
+
+       end = string + length - 1;
+       while (end >= string && isspace(*end))
+               end--;
+       *(end + 1) = '\0';
+}
+
 static int process_child(char *argv[], int pipefd[])
 {
        int     nullfd;
diff --git a/common/utils.h b/common/utils.h
index ec2072db5a5b..2459b5be330b 100644
--- a/common/utils.h
+++ b/common/utils.h
@@ -18,6 +18,7 @@
 #ifndef UTILS_H
 #define UTILS_H
 
+void trim_trail_space(char *string);
 FILE   *spopen(char **, pid_t *);
 int    spclose(FILE *, pid_t);
 
diff --git a/diags/Makefile.am b/diags/Makefile.am
index 4ac81b8160be..dea0a79e0d2d 100644
--- a/diags/Makefile.am
+++ b/diags/Makefile.am
@@ -13,7 +13,8 @@ encl_led_h_files = diags/encl_led.h \
                   $(diag_common_h_files)
 
 diag_nvme_h_files = diags/diag_nvme.h \
-                   common/platform.h
+                   common/platform.h \
+                   common/utils.h
 
 sbin_PROGRAMS += diags/diag_encl diags/encl_led diags/diag_nvme
 
@@ -41,6 +42,7 @@ diags_encl_led_SOURCES = diags/encl_led.c \
 
 diags_diag_nvme_SOURCES = diags/diag_nvme.c \
                          common/platform.c \
+                         common/utils.c    \
                          $(diag_nvme_h_files)
 diags_diag_nvme_LDADD = -lservicelog -lm
 diags_diag_nvme_CFLAGS = $(AM_CFLAGS) -Wno-stringop-truncation
diff --git a/diags/diag_nvme.c b/diags/diag_nvme.c
index 2a78034ecfd9..2606f2cb7784 100644
--- a/diags/diag_nvme.c
+++ b/diags/diag_nvme.c
@@ -27,6 +27,7 @@
 #include <sys/utsname.h>
 #include "diag_nvme.h"
 #include "platform.h"
+#include "utils.h"
 
 #define ITEM_DATA_LENGTH       255
 #define MIN_HOURS_ON           720
@@ -71,7 +72,6 @@ static int raw_data_smart(unsigned char **raw_data, uint32_t 
*raw_data_len, stru
 static int raw_data_vpd(unsigned char **raw_data, uint32_t *raw_data_len, 
struct nvme_ibm_vpd *vpd);
 static int regex_controller(char *controller_name, char *device_name);
 static void set_notify(struct notify *notify, struct dictionary *dict, int 
num_elements);
-static void trim_trail_space(char *string);
 static long double uint128_to_long_double(uint8_t *data);
 
 int main(int argc, char *argv[]) {
@@ -1426,28 +1426,6 @@ extern void set_vpd_pcie_field(const char *keyword, 
const char *vpd_data, struct
                strncpy(vpd->firmware_level, vpd_data, 
sizeof(vpd->firmware_level));
 }
 
-/* trim_trail_space - Trim trailing white spaces from string
- * @string - Null terminated string to remove white spaces from
- *
- * This function will alter the passed string by removing any trailing white 
spaces and null
- * terminating it at that point.
- */
-static void trim_trail_space(char *string) {
-       char *end;
-       size_t length;
-
-       if (string == NULL)
-               return;
-
-       if ((length = strlen(string)) == 0)
-               return;
-
-       end = string + length - 1;
-       while (end >= string && isspace(*end))
-               end--;
-       *(end + 1) = '\0';
-}
-
 static long double uint128_to_long_double(uint8_t *data) {
        int i;
        long double value = 0;
-- 
2.42.0


++++++ 0002-ppc64-diag-lp_diag-Utilize-trim_trail_space-function.patch ++++++
>From 476b0af7516b86c4d98cfa229fb0c6b856eea31d Mon Sep 17 00:00:00 2001
From: Sathvika Vasireddy <s...@linux.ibm.com>
Date: Fri, 8 Sep 2023 12:35:13 +0530
Subject: [PATCH 2/3] ppc64-diag/lp_diag: Utilize trim_trail_space() function
 in event_fru_callout()

Upstream: merged, expected in 2.7.10
Git-commit: 476b0af7516b86c4d98cfa229fb0c6b856eea31d

Update the event_fru_callout() function to use the trim_trail_space()
function to be able to remove any trailing spaces from the location code.
This change aims to address an issue where the presence of trailing spaces
in the location code results in failure to find an indicator for the given
location code. Use trim_trail_space() on the location to ensure that the
device location code is properly compared with the indicator list.

Signed-off-by: Sathvika Vasireddy <s...@linux.ibm.com>
Signed-off-by: Mahesh Salgaonkar <mah...@linux.ibm.com>
---
 lpd/lp_diag.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lpd/lp_diag.c b/lpd/lp_diag.c
index 988a021168b9..e6f5d3cb64cf 100644
--- a/lpd/lp_diag.c
+++ b/lpd/lp_diag.c
@@ -35,6 +35,7 @@
 #include "servicelog.h"
 #include "indicator.h"
 #include "lp_util.h"
+#include "utils.h"
 
 /* FRU callout priority as defined in PAPR+
  *
@@ -344,6 +345,8 @@ event_fru_callout(struct sl_callout *callouts, struct 
loc_code *list,
                /* get FRUs nearest fault indicator */
                strncpy(location, callout->location, LOCATION_LENGTH);
                location[LOCATION_LENGTH - 1] = '\0';
+               trim_trail_space(location);
+
                loc_led = get_fru_indicator(list, location, &truncated);
                if (!loc_led) { /* No indicator found for the given loc code */
                        *attn_on = 1;
-- 
2.42.0


++++++ 0003-ppc64-diag-lp_diag-Enable-light-path-diagnostics-for.patch ++++++
>From 0fa486dbe800bea05c81fc33eee197873573fefb Mon Sep 17 00:00:00 2001
From: Sathvika Vasireddy <s...@linux.ibm.com>
Date: Fri, 8 Sep 2023 12:35:14 +0530
Subject: [PATCH 3/3] ppc64-diag/lp_diag: Enable light path diagnostics for
 RTAS events

Upstream: merged, expected in 2.7.10
Git-commit: 0fa486dbe800bea05c81fc33eee197873573fefb

Currently, Light Path Diagnostics support is enabled only for OS and
Enclosure type events. Enable light path diagnostics support for RTAS
type events by turning on only the high priority FRU callouts.

Signed-off-by: Sathvika Vasireddy <s...@linux.ibm.com>
Signed-off-by: Mahesh Salgaonkar <mah...@linux.ibm.com>
---
 lpd/lp_diag.c | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/lpd/lp_diag.c b/lpd/lp_diag.c
index e6f5d3cb64cf..e67db0250ef4 100644
--- a/lpd/lp_diag.c
+++ b/lpd/lp_diag.c
@@ -37,6 +37,8 @@
 #include "lp_util.h"
 #include "utils.h"
 
+static int rtas_event;
+
 /* FRU callout priority as defined in PAPR+
  *
  * Note: Order of the priority is important!
@@ -173,8 +175,10 @@ service_event_supported(struct sl_event *event)
                        return 0;
                }
                break;
-       case SL_TYPE_BMC:
        case SL_TYPE_RTAS:
+               rtas_event = 1;
+               break;
+       case SL_TYPE_BMC:
        case SL_TYPE_BASIC:
        default:
                return 0;
@@ -446,14 +450,20 @@ parse_service_event(int event_id)
        attn_loc = &list[0];
 
        if (operating_mode == LED_MODE_LIGHT_PATH) {
-               if (event->callouts)
+               if (event->callouts) {
                        /* Run over FRU callout priority in order and
                         * enable fault indicator
                         */
-                       for (i = 0; FRU_CALLOUT_PRIORITY[i]; i++)
+                       if (!rtas_event) {
+                               for (i = 0; FRU_CALLOUT_PRIORITY[i]; i++)
+                                       rc = event_fru_callout(event->callouts, 
list,
+                                                       FRU_CALLOUT_PRIORITY[i],
+                                                       &attn_on);
+                       } else {
                                rc = event_fru_callout(event->callouts, list,
-                                                      FRU_CALLOUT_PRIORITY[i],
-                                                      &attn_on);
+                                               'H', &attn_on);
+                       }
+               }
                else {
                        /* No callout list, enable check log indicator */
                        indicator_log_write("Empty callout list");
-- 
2.42.0


++++++ rtas_errd-Handle-multiple-platform-dumps.patch ++++++
--- /var/tmp/diff_new_pack.tKguOy/_old  2023-10-22 21:01:58.261532789 +0200
+++ /var/tmp/diff_new_pack.tKguOy/_new  2023-10-22 21:01:58.265532935 +0200
@@ -4,6 +4,7 @@
 Subject: [PATCH] rtas_errd: Handle multiple platform dumps
 
 References: bsc#1209274 ltc#198526
+Upstream: merged, expected in 2.7.10
 Git-commit: d05654e5ec6f37cf6caa491fc7d95b336f9603e2
 
 Currently, whenever a new dump arrives, old dump file of that specific dump

Reply via email to