import powerpc-utils-1.3.10-5.el9
This commit is contained in:
parent
04bb34a808
commit
464eeb126a
@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$1" = "--version" ]; then
|
||||
echo This version of nvsetenv is just a wrapper to invoke nvram
|
||||
exit 0
|
||||
fi
|
||||
if [ -z "$1" ]; then
|
||||
nvram --print-config
|
||||
elif [ -z "$2" ]; then
|
||||
nvram --print-config="$1"
|
||||
else
|
||||
nvram --update-config "$1"="$2"
|
||||
fi
|
||||
exit $?
|
1
SOURCES/nx-gzip.udev
Normal file
1
SOURCES/nx-gzip.udev
Normal file
@ -0,0 +1 @@
|
||||
KERNEL=="nx-gzip", MODE="0666"
|
@ -0,0 +1,110 @@
|
||||
commit 2fbd7c1ff428e534d80f60e03501d625ab594eca
|
||||
Author: Wen Xiong <wenxiong@linux.ibm.com>
|
||||
Date: Wed Jun 15 13:05:51 2022 -0500
|
||||
|
||||
ofpathname: Fix several issues in nvmf boot/install support
|
||||
|
||||
This patch fixes several issues in boot/install over nvme-over-fc
|
||||
device support.
|
||||
|
||||
- change cntlid to ffff
|
||||
- add devnisd from sysfs
|
||||
- add subsysnqn
|
||||
|
||||
Signed-off-by: Wen Xiong <wenxiong@linux.ibm.com>
|
||||
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
|
||||
|
||||
diff --git a/scripts/ofpathname b/scripts/ofpathname
|
||||
index b1d6b09..33d7702 100755
|
||||
--- a/scripts/ofpathname
|
||||
+++ b/scripts/ofpathname
|
||||
@@ -773,8 +773,7 @@ l2of_nvmf()
|
||||
t_wwpn="${t_wwpn#0x}"
|
||||
t_wwpn="${t_wwpn%,*}"
|
||||
nqn=`$CAT $PWD/subsysnqn`
|
||||
- cntlid_dec=`$CAT $PWD/cntlid`
|
||||
- cntlid=`echo "obase=16; $cntlid_dec" |bc`
|
||||
+ cntlid=`echo ffff`
|
||||
if [[ -n $h_wwpn ]]; then
|
||||
for f in `$FIND /sys/devices -name "port_name"`; do
|
||||
sys_wwpn=`$CAT $f 2>/dev/null`
|
||||
@@ -808,6 +807,9 @@ l2of_nvmf()
|
||||
if [[ ${#res} = 0 ]]; then
|
||||
OF_PATH=""
|
||||
else
|
||||
+ goto_dir $res
|
||||
+ devnsid=`$CAT $PWD/nsid | tr -d '\000'`
|
||||
+ devnsid=`echo "obase=16; $devnsid" |bc`
|
||||
OF_PATH="$OF_PATH/namespace@$devnsid"
|
||||
fi
|
||||
fi
|
||||
@@ -818,6 +820,8 @@ l2of_nvmf()
|
||||
if [[ ${#res} = 0 ]]; then
|
||||
OF_PATH=""
|
||||
else
|
||||
+ goto_dir $res
|
||||
+ devpart=`$CAT $PWD/partition | tr -d '\000'`
|
||||
OF_PATH="${OF_PATH}:${devpart}"
|
||||
fi
|
||||
fi
|
||||
@@ -1826,8 +1830,7 @@ of2l_nvmf()
|
||||
ctrl_name=`echo $DEVNAME | cut -d "/" -f 5`
|
||||
OF_WWPN=${ctrl_name%,*}
|
||||
OF_WWPN=${OF_WWPN#*@}
|
||||
- of_cntlid=${ctrl_name%%:*}
|
||||
- of_cntlid=${of_cntlid#*,}
|
||||
+ OF_NQN=`echo $ctrl_name | cut -d "=" -f 2`
|
||||
# set partition number only if ':' is present
|
||||
case "${nsid_part}" in
|
||||
*:*)
|
||||
@@ -1835,6 +1838,7 @@ of2l_nvmf()
|
||||
;;
|
||||
esac
|
||||
local dir
|
||||
+ local found=0
|
||||
|
||||
for dir in `$FIND /sys/devices/virtual/nvme-fabrics -name "nvme[0-9]*"`; do
|
||||
cd $dir
|
||||
@@ -1844,10 +1848,9 @@ of2l_nvmf()
|
||||
t_wwpn="${t_wwpn%,*}"
|
||||
h_wwpn=`$CAT $PWD/address | cut -f 5 -d "-"`
|
||||
h_wwpn="${h_wwpn#0x}"
|
||||
- cntlid_dec=`$CAT $PWD/cntlid 2>/dev/null`
|
||||
- cntlid=`echo "obase=16; $cntlid_dec" |bc`
|
||||
+ nqn=`$CAT $PWD/subsysnqn`
|
||||
if [[ $t_wwpn = $OF_WWPN ]] && \
|
||||
- [[ $cntlid == $of_cntlid ]]; then
|
||||
+ [[ $nqn == $OF_NQN ]]; then
|
||||
for f in `$FIND /sys/devices -name "port_name"`; do
|
||||
sys_wwpn=`$CAT $f 2>/dev/null`
|
||||
sys_wwpn="${sys_wwpn#0x}"
|
||||
@@ -1871,14 +1874,23 @@ of2l_nvmf()
|
||||
fi
|
||||
fi
|
||||
done
|
||||
+
|
||||
if [[ -n $LOGICAL_DEVNAME ]] && \
|
||||
[[ -n $nsid ]]; then
|
||||
- res=`$FIND /sys/devices/virtual -name ${LOGICAL_DEVNAME}n${nsid}`
|
||||
- if [[ ${#res} = 0 ]]; then
|
||||
- LOGICAL_DEVNAME=''
|
||||
- else
|
||||
- LOGICAL_DEVNAME="${LOGICAL_DEVNAME}n${nsid}"
|
||||
- fi
|
||||
+ for dir in `$FIND /sys/block -name "${LOGICAL_DEVNAME}n[0-9]*"`; do
|
||||
+ cd $dir
|
||||
+
|
||||
+ local devnsid=`$CAT ./nsid 2>/dev/null`
|
||||
+ devnsid=`echo "obase=16; $devnsid" |bc`
|
||||
+ if [[ $devnsid = $nsid ]]; then
|
||||
+ found=1
|
||||
+ LOGICAL_DEVNAME="${dir##*/}"
|
||||
+ break
|
||||
+ fi
|
||||
+ done
|
||||
+ if [[ $found -eq 0 ]]; then
|
||||
+ LOGICAL_DEVNAME=""
|
||||
+ fi
|
||||
fi
|
||||
|
||||
if [[ -n $LOGICAL_DEVNAME ]] && \
|
98
SOURCES/powerpc-utils-b1b9e7-LMB_size_4GB.patch
Normal file
98
SOURCES/powerpc-utils-b1b9e7-LMB_size_4GB.patch
Normal file
@ -0,0 +1,98 @@
|
||||
commit b1b9e76de0f3ab1dfcd9426779fa20fd77cd5625
|
||||
Author: Luciano Chavez <lnx1138@linux.ibm.com>
|
||||
Date: Wed Aug 24 21:11:32 2022 -0500
|
||||
|
||||
lsslot: Fix lsslot -c mem output when using 4GB LMB size
|
||||
|
||||
When using a LMB size of 4GB, the output of lsslot -c mem would get
|
||||
reported incorrectly as:
|
||||
|
||||
Dynamic Reconfiguration Memory (LMB size 0x0)
|
||||
:
|
||||
DRC Index: 80000001 Address: 100000000
|
||||
Removable: No Associativity: (index: 1) 0 1 4 9
|
||||
Section(s):
|
||||
|
||||
This patch changes the declaration of the _node_u._smem._lmb_size from
|
||||
a uint32_t to uint64_t to store the value properly. Any variables that
|
||||
store the lmb_size are also declared as uint64_t. In addition, we
|
||||
use the PRIx64 macro in printf statements to properly print the
|
||||
lmb_size value.
|
||||
|
||||
The patch also includes a necessary change to declare the global
|
||||
variable block_sz_bytes as a uint64_t to fix an infinite loop in
|
||||
the function get_mem_scns() when the above changes were introduced.
|
||||
|
||||
Signed-off-by: Luciano Chavez <lnx1138@linux.ibm.com>
|
||||
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
|
||||
|
||||
diff --git a/src/drmgr/drmem.h b/src/drmgr/drmem.h
|
||||
index db5a47f..48108c5 100644
|
||||
--- a/src/drmgr/drmem.h
|
||||
+++ b/src/drmgr/drmem.h
|
||||
@@ -58,7 +58,7 @@ struct drconf_mem_v2 {
|
||||
#define LMB_REVERSE_SORT 1
|
||||
#define LMB_RANDOM_SORT 2
|
||||
|
||||
-extern int block_sz_bytes;
|
||||
+extern uint64_t block_sz_bytes;
|
||||
|
||||
struct lmb_list_head *get_lmbs(unsigned int);
|
||||
void free_lmbs(struct lmb_list_head *);
|
||||
diff --git a/src/drmgr/drslot_chrp_mem.c b/src/drmgr/drslot_chrp_mem.c
|
||||
index 3b78723..d37ee80 100644
|
||||
--- a/src/drmgr/drslot_chrp_mem.c
|
||||
+++ b/src/drmgr/drslot_chrp_mem.c
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "drmem.h"
|
||||
#include "common_numa.h"
|
||||
|
||||
-int block_sz_bytes = 0;
|
||||
+uint64_t block_sz_bytes = 0;
|
||||
static char *state_strs[] = {"offline", "online"};
|
||||
|
||||
static char *usagestr = "-c mem {-a | -r} {-q <quantity> -p {variable_weight | ent_capacity} | {-q <quantity> | -s [<drc_name> | <drc_index>]}}";
|
||||
@@ -118,7 +118,7 @@ free_lmbs(struct lmb_list_head *lmb_list)
|
||||
static int
|
||||
get_mem_scns(struct dr_node *lmb)
|
||||
{
|
||||
- uint32_t lmb_sz = lmb->lmb_size;
|
||||
+ uint64_t lmb_sz = lmb->lmb_size;
|
||||
uint64_t phys_addr = lmb->lmb_address;
|
||||
uint32_t mem_scn;
|
||||
int rc = 0;
|
||||
diff --git a/src/drmgr/lsslot.c b/src/drmgr/lsslot.c
|
||||
index 87f876e..83e9e85 100644
|
||||
--- a/src/drmgr/lsslot.c
|
||||
+++ b/src/drmgr/lsslot.c
|
||||
@@ -741,7 +741,7 @@ int print_drconf_mem(struct lmb_list_head *lmb_list)
|
||||
if (usr_drc_name)
|
||||
drc_index = strtol(usr_drc_name, NULL, 0);
|
||||
|
||||
- printf("Dynamic Reconfiguration Memory (LMB size 0x%x)\n",
|
||||
+ printf("Dynamic Reconfiguration Memory (LMB size 0x%"PRIx64")\n",
|
||||
lmb_list->lmbs->lmb_size);
|
||||
|
||||
for (lmb = lmb_list->lmbs; lmb; lmb = lmb->next) {
|
||||
@@ -808,7 +808,7 @@ int lsslot_chrp_mem(void)
|
||||
if (lmb_list->drconf_buf) {
|
||||
print_drconf_mem(lmb_list);
|
||||
} else {
|
||||
- printf("lmb size: 0x%x\n", lmb_list->lmbs->lmb_size);
|
||||
+ printf("lmb size: 0x%"PRIx64"\n", lmb_list->lmbs->lmb_size);
|
||||
printf("%-20s %-5s %c %s\n", "Memory Node", "Name", 'R',
|
||||
"Sections");
|
||||
printf("%-20s %-5s %c %s\n", "-----------", "----", '-',
|
||||
diff --git a/src/drmgr/ofdt.h b/src/drmgr/ofdt.h
|
||||
index 26c943a..bd90810 100644
|
||||
--- a/src/drmgr/ofdt.h
|
||||
+++ b/src/drmgr/ofdt.h
|
||||
@@ -94,7 +94,7 @@ struct dr_node {
|
||||
union {
|
||||
struct mem_info {
|
||||
uint64_t _address;
|
||||
- uint32_t _lmb_size;
|
||||
+ uint64_t _lmb_size;
|
||||
uint32_t _lmb_aa_index;
|
||||
struct mem_scn *_mem_scns;
|
||||
struct of_node *_of_node;
|
@ -0,0 +1,131 @@
|
||||
commit c015807d5bef0ebdeaf99883793173f2b636e740
|
||||
Author: Wen Xiong <wenxiong@linux.ibm.com>
|
||||
Date: Wed Jun 15 13:05:18 2022 -0500
|
||||
|
||||
bootlist: Add install/boot support for nvmf devices
|
||||
|
||||
This patch adds the boot/installation support for nvme-over-fc devices.
|
||||
It can set nvmf device as boot device in both of logical device name
|
||||
and open firmware device path name.
|
||||
|
||||
Signed-off-by: Wen Xiong <wenxiong@linux.ibm.com>
|
||||
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
|
||||
|
||||
diff --git a/scripts/bootlist b/scripts/bootlist
|
||||
index b5cfbd9..1929f65 100755
|
||||
--- a/scripts/bootlist
|
||||
+++ b/scripts/bootlist
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
OFPATHNAME=/usr/sbin/ofpathname
|
||||
NVRAM=/usr/sbin/nvram
|
||||
+FIND=/usr/bin/find
|
||||
PSERIES_PLATFORM=$(dirname $0)/pseries_platform
|
||||
|
||||
#
|
||||
@@ -288,6 +289,63 @@ dm_to_part()
|
||||
done
|
||||
}
|
||||
|
||||
+# is_nvmf_device
|
||||
+# Check to see if this is a nvmf device
|
||||
+#
|
||||
+is_nvmf_device()
|
||||
+{
|
||||
+ local res
|
||||
+
|
||||
+ res=`$FIND /sys/devices/virtual/nvme-fabrics -name $1 2>/dev/null`
|
||||
+ if [[ ${#res} = 0 ]]; then
|
||||
+ echo "no"
|
||||
+ else
|
||||
+ echo "yes"
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
+# get_link
|
||||
+# return the directory path that a link points to.
|
||||
+# The only parameter is the link name.
|
||||
+#
|
||||
+get_link()
|
||||
+{
|
||||
+ local ln_name=$1;
|
||||
+
|
||||
+ echo `ls -l $ln_name 2>/dev/null | awk -F"->" '{print $2}'`
|
||||
+}
|
||||
+
|
||||
+add_nvmf()
|
||||
+{
|
||||
+ local DEVNAME=$1
|
||||
+
|
||||
+ ctrl_name=$DEVNAME
|
||||
+ local startctr=$ctr
|
||||
+
|
||||
+ local dir
|
||||
+ for dir in `$FIND /sys/devices/virtual/nvme-fabrics -name "$ctrl_name"`; do
|
||||
+ cd $dir
|
||||
+ link=`get_link "device"`
|
||||
+ cd $link
|
||||
+ for slave in $PWD/*; do
|
||||
+ slavedev=${slave##*/}
|
||||
+ if [[ "$slavedev" == nvme[0-9]* ]] ; then
|
||||
+ cd $slave
|
||||
+ res=`$FIND . -name "${ctrl_name}*"`
|
||||
+ if [[ ${#res} != 0 ]]; then
|
||||
+ LOGICAL_NAMES[$ctr]=${slavedev}
|
||||
+ ctr=$[$ctr + 1]
|
||||
+ fi
|
||||
+ fi
|
||||
+ done
|
||||
+ done
|
||||
+
|
||||
+ if [[ "$startctr" = "$ctr" ]] ; then
|
||||
+ LOGICAL_NAMES[$ctr]=$1
|
||||
+ ctr=$[$ctr + 1]
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
add_logical()
|
||||
{
|
||||
local DEVNAME=$1
|
||||
@@ -432,7 +490,30 @@ while [[ -n $1 ]]; do
|
||||
exit -1
|
||||
else
|
||||
# add this element to the array
|
||||
- add_logical $1
|
||||
+ if [[ "$1" == *"dm-"* ]] ; then
|
||||
+ add_logical $1
|
||||
+ else
|
||||
+ if [[ "$1" == *"nvme-of"* ]]; then
|
||||
+ ctrl_name=`get_logical_device_name $1`
|
||||
+ else
|
||||
+ ctrl_name=$1
|
||||
+ ctrl_name=${ctrl_name##*/}
|
||||
+ fi
|
||||
+ ctrl_name="${ctrl_name%n[0-9]*}"
|
||||
+ is_nvmf=$(is_nvmf_device $ctrl_name)
|
||||
+ if [[ $is_nvmf = "yes" ]]; then
|
||||
+ if [[ "$1" == *"nvme-of"* ]]; then
|
||||
+ master_of_path=$1
|
||||
+ else
|
||||
+ master_of_path=`get_of_device_name $1`
|
||||
+ fi
|
||||
+ namespace_base=${master_of_path##*/}
|
||||
+ DEVTYPE="nvme-of"
|
||||
+ add_nvmf $ctrl_name
|
||||
+ else
|
||||
+ add_logical $1
|
||||
+ fi
|
||||
+ fi
|
||||
fi
|
||||
|
||||
shift
|
||||
@@ -453,6 +534,9 @@ if [[ ${#LOGICAL_NAMES[*]} -ne 0 ]]; then
|
||||
if [[ -z ${OF_DEVPATH[$ctr]} ]]; then
|
||||
# See if this is an OF pathname
|
||||
OF_DEVPATH[$ctr]=`get_of_device_name ${LOGICAL_NAMES[$ctr]}`
|
||||
+ if [[ $DEVTYPE = "nvme-of" ]]; then
|
||||
+ OF_DEVPATH[$ctr]=${OF_DEVPATH[$ctr]}/$namespace_base
|
||||
+ fi
|
||||
else
|
||||
OF_DEVPATH[$ctr]=${LOGICAL_NAMES[$ctr]}
|
||||
fi
|
@ -0,0 +1,29 @@
|
||||
commit e1f1deb06d9168a95a381a2236e1d8c693d3d229
|
||||
Author: Luciano Chavez <lnx1138@linux.ibm.com>
|
||||
Date: Wed Aug 24 21:17:54 2022 -0500
|
||||
|
||||
lsslot: Explicity declare that lmb_address be displayed in hexadecimal
|
||||
|
||||
A printf statement used is lsslot.c was specifying the macro PRIu64 to
|
||||
display the lmb_address. Depending on the compilation, this would
|
||||
either display as a hexadecimal or decimal value.
|
||||
|
||||
This patch replaces PRIu64 with PRIx64 to explicitly declare to print
|
||||
the value as hexadecimal as that was is normally expected of an address.
|
||||
|
||||
Signed-off-by: Luciano Chavez <lnx1138@linux.ibm.com>
|
||||
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
|
||||
|
||||
diff --git a/src/drmgr/lsslot.c b/src/drmgr/lsslot.c
|
||||
index 7ea0f8b..87f876e 100644
|
||||
--- a/src/drmgr/lsslot.c
|
||||
+++ b/src/drmgr/lsslot.c
|
||||
@@ -756,7 +756,7 @@ int print_drconf_mem(struct lmb_list_head *lmb_list)
|
||||
printf("%s: %s\n", lmb->drc_name,
|
||||
lmb->is_owned ? "" : "Not Owned");
|
||||
|
||||
- printf(" DRC Index: %x Address: %"PRIu64"\n",
|
||||
+ printf(" DRC Index: %x Address: %"PRIx64"\n",
|
||||
lmb->drc_index, lmb->lmb_address);
|
||||
printf(" Removable: %s Associativity: ",
|
||||
lmb->is_removable ? "Yes" : "No ");
|
@ -0,0 +1,27 @@
|
||||
commit acaf9c45a340f9bb49d6b21ba7ad60c21326ea73
|
||||
Author: Mingming Cao <mmc@linux.vnet.ibm.com>
|
||||
Date: Mon Nov 7 14:39:02 2022 -0800
|
||||
|
||||
hcnmgr: Fix setting primary slave across reboots
|
||||
|
||||
Using nmcli to set bonding of primary slave so that is set correctly
|
||||
across reboots.
|
||||
|
||||
Signed-off-by: Mingming Cao <mmc@linux.vnet.ibm.com>
|
||||
[tyreld: Reworded commit log]
|
||||
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
|
||||
|
||||
diff --git a/scripts/hcnmgr b/scripts/hcnmgr
|
||||
index 6946ff9..b5a6bfb 100644
|
||||
--- a/scripts/hcnmgr
|
||||
+++ b/scripts/hcnmgr
|
||||
@@ -375,7 +375,8 @@ do_config_vdevice_nm() {
|
||||
# if the device is primary, and link is up, force it as primary se
|
||||
if [[ $MODE == "primary" ]]; then
|
||||
hcnlog INFO "Change bonding primary slave to $DEVNAME"
|
||||
- echo "$DEVNAME" >"$BOND_PATH"/primary
|
||||
+ nmcli con mod id "$BONDNAME" +bond.options "primary=$DEVNAME"
|
||||
+ nmcli con up "$BONDNAME"
|
||||
fi
|
||||
|
||||
hcnlog DEBUG "do_config_vdevice: exit"
|
40
SOURCES/powerpc-utils-git04e5c9-handle_nsid_as_hex.patch
Normal file
40
SOURCES/powerpc-utils-git04e5c9-handle_nsid_as_hex.patch
Normal file
@ -0,0 +1,40 @@
|
||||
commit 04e5c9646296e1f12048723bba4cee663c3f74ed
|
||||
Author: Wen Xiong <wenxiong@linux.ibm.com>
|
||||
Date: Thu Dec 1 05:22:37 2022 -0600
|
||||
|
||||
ofpathname: Handle nsid as hex in nvmf boot/install support
|
||||
|
||||
Didn't handle nsid correctly in nvmf boot/install support.
|
||||
Need to handle it as hexadecimal number
|
||||
|
||||
For example,
|
||||
/pci@800000020000132/fibre-channel@0,1/nvme-of/controller@50050768101935e5,ffff
|
||||
:nqn=nqn.1986-03.com.ibm:nvme:2145.0000020420006CEA/namespace@26c
|
||||
|
||||
26c should be a hexadecimal number.
|
||||
|
||||
Signed-off-by: Wen Xiong <wenxiong@linux.ibm.com>
|
||||
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
|
||||
|
||||
diff --git a/scripts/ofpathname b/scripts/ofpathname
|
||||
index c576fb8..3abe4d1 100755
|
||||
--- a/scripts/ofpathname
|
||||
+++ b/scripts/ofpathname
|
||||
@@ -809,7 +809,7 @@ l2of_nvmf()
|
||||
else
|
||||
goto_dir $res
|
||||
devnsid=`$CAT $PWD/nsid | tr -d '\000'`
|
||||
- devnsid=`echo "obase=16; $devnsid" |bc`
|
||||
+ devnsid=$(printf "%x" $devnsid)
|
||||
OF_PATH="$OF_PATH/namespace@$devnsid"
|
||||
fi
|
||||
fi
|
||||
@@ -1886,7 +1886,7 @@ of2l_nvmf()
|
||||
for dev_name in `$FIND /sys/block -name "${ana_name##*/}n[0-9]*"`; do
|
||||
cd $dev_name
|
||||
local devnsid=`$CAT ./nsid 2>/dev/null`
|
||||
- devnsid=`echo "obase=16; $devnsid" |bc`
|
||||
+ devnsid=$(printf "%x" $devnsid)
|
||||
if [[ $devnsid = $nsid ]]; then
|
||||
found=1
|
||||
NS_ID="${dev_name##*n}"
|
@ -0,0 +1,118 @@
|
||||
commit 3847a1c25a640394c4afd2b8938ad21190bf5dbe
|
||||
Author: Wen Xiong <wenxiong@linux.ibm.com>
|
||||
Date: Fri Oct 28 09:20:38 2022 -0500
|
||||
|
||||
Support multiple dev paths for a nvmf boot device
|
||||
|
||||
This patch adds the support for multiple dev/of paths with a nvmf boot dev
|
||||
|
||||
# bootlist -m normal -o nvme1n4
|
||||
nvme1n4
|
||||
nvme3n4
|
||||
nvme5n4
|
||||
nvme6n4
|
||||
# bootlist -m normal -o
|
||||
nvme1n4
|
||||
nvme3n4
|
||||
nvme5n4
|
||||
nvme6n4
|
||||
# bootlist -m normal -r
|
||||
/pci@800000020000017/fibre-channel@0/nvme-of/controller@50050768101935e5,ffff:nqn=nqn.1986-03.com.ibm:nvme:2145.0000020420006CEA/namespace@147
|
||||
/pci@800000020000017/fibre-channel@0/nvme-of/controller@5005076810193675,ffff:nqn=nqn.1986-03.com.ibm:nvme:2145.0000020420006CEA/namespace@147
|
||||
/pci@800000020000017/fibre-channel@0,1/nvme-of/controller@5005076810193675,ffff:nqn=nqn.1986-03.com.ibm:nvme:2145.0000020420006CEA/namespace@147
|
||||
/pci@800000020000017/fibre-channel@0,1/nvme-of/controller@50050768101935e5,ffff:nqn=nqn.1986-03.com.ibm:nvme:2145.0000020420006CEA/namespace@147
|
||||
|
||||
Signed-off-by: Wen Xiong <wenxiong@linux.ibm.com>
|
||||
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
|
||||
|
||||
diff --git a/scripts/bootlist b/scripts/bootlist
|
||||
index 1929f65..cc8718e 100755
|
||||
--- a/scripts/bootlist
|
||||
+++ b/scripts/bootlist
|
||||
@@ -327,16 +327,10 @@ add_nvmf()
|
||||
cd $dir
|
||||
link=`get_link "device"`
|
||||
cd $link
|
||||
- for slave in $PWD/*; do
|
||||
- slavedev=${slave##*/}
|
||||
- if [[ "$slavedev" == nvme[0-9]* ]] ; then
|
||||
- cd $slave
|
||||
- res=`$FIND . -name "${ctrl_name}*"`
|
||||
- if [[ ${#res} != 0 ]]; then
|
||||
- LOGICAL_NAMES[$ctr]=${slavedev}
|
||||
- ctr=$[$ctr + 1]
|
||||
- fi
|
||||
- fi
|
||||
+ for slave in `ls -d $PWD/nvme*`; do
|
||||
+ slavedev=${slave##*/}
|
||||
+ LOGICAL_NAMES[$ctr]=${slavedev}
|
||||
+ ctr=$[$ctr + 1]
|
||||
done
|
||||
done
|
||||
|
||||
@@ -502,11 +496,17 @@ while [[ -n $1 ]]; do
|
||||
ctrl_name="${ctrl_name%n[0-9]*}"
|
||||
is_nvmf=$(is_nvmf_device $ctrl_name)
|
||||
if [[ $is_nvmf = "yes" ]]; then
|
||||
- if [[ "$1" == *"nvme-of"* ]]; then
|
||||
- master_of_path=$1
|
||||
- else
|
||||
- master_of_path=`get_of_device_name $1`
|
||||
- fi
|
||||
+ if [[ "$1" == *"nvme-of"* ]]; then
|
||||
+ master_of_path=$1
|
||||
+ else
|
||||
+ master_of_path=`get_of_device_name $1`
|
||||
+ fi
|
||||
+
|
||||
+ if [[ -z $master_of_path ]]; then
|
||||
+ echo "Device $1 does not appear to be valid." >&2
|
||||
+ exit 1
|
||||
+ fi
|
||||
+
|
||||
namespace_base=${master_of_path##*/}
|
||||
DEVTYPE="nvme-of"
|
||||
add_nvmf $ctrl_name
|
||||
diff --git a/scripts/ofpathname b/scripts/ofpathname
|
||||
index 33d7702..c576fb8 100755
|
||||
--- a/scripts/ofpathname
|
||||
+++ b/scripts/ofpathname
|
||||
@@ -1875,19 +1875,28 @@ of2l_nvmf()
|
||||
fi
|
||||
done
|
||||
|
||||
+ local ana_dir
|
||||
if [[ -n $LOGICAL_DEVNAME ]] && \
|
||||
[[ -n $nsid ]]; then
|
||||
- for dir in `$FIND /sys/block -name "${LOGICAL_DEVNAME}n[0-9]*"`; do
|
||||
- cd $dir
|
||||
-
|
||||
- local devnsid=`$CAT ./nsid 2>/dev/null`
|
||||
- devnsid=`echo "obase=16; $devnsid" |bc`
|
||||
- if [[ $devnsid = $nsid ]]; then
|
||||
- found=1
|
||||
- LOGICAL_DEVNAME="${dir##*/}"
|
||||
- break
|
||||
- fi
|
||||
+ for ana_dir in `$FIND /sys/devices/virtual/nvme-fabrics -name "$LOGICAL_DEVNAME"`; do
|
||||
+ cd $ana_dir
|
||||
+ link=`get_link "device"`
|
||||
+ cd $link
|
||||
+ for ana_name in `ls -d $PWD/nvme*`; do
|
||||
+ for dev_name in `$FIND /sys/block -name "${ana_name##*/}n[0-9]*"`; do
|
||||
+ cd $dev_name
|
||||
+ local devnsid=`$CAT ./nsid 2>/dev/null`
|
||||
+ devnsid=`echo "obase=16; $devnsid" |bc`
|
||||
+ if [[ $devnsid = $nsid ]]; then
|
||||
+ found=1
|
||||
+ NS_ID="${dev_name##*n}"
|
||||
+ LOGICAL_DEVNAME="${LOGICAL_DEVNAME}n${NS_ID}"
|
||||
+ break
|
||||
+ fi
|
||||
+ done
|
||||
+ done
|
||||
done
|
||||
+
|
||||
if [[ $found -eq 0 ]]; then
|
||||
LOGICAL_DEVNAME=""
|
||||
fi
|
@ -1,14 +1,23 @@
|
||||
Name: powerpc-utils
|
||||
Version: 1.3.10
|
||||
Release: 2%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Summary: PERL-based scripts for maintaining and servicing PowerPC systems
|
||||
|
||||
License: GPLv2
|
||||
URL: https://github.com/ibm-power-utilities/powerpc-utils
|
||||
Source0: https://github.com/ibm-power-utilities/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
Source1: nvsetenv
|
||||
Source1: nx-gzip.udev
|
||||
Patch0: powerpc-utils-1.3.10-manpages.patch
|
||||
Patch1: powerpc-utils-1.3.10-distro.patch
|
||||
# bz#2121470, Fix lsslot -c mem output when using 4GB LMB size
|
||||
Patch3: powerpc-utils-b1b9e7-LMB_size_4GB.patch
|
||||
Patch4: powerpc-utils-e1f1de-lmb_address_in_hexadecimal.patch
|
||||
# bz#2110129, Add NVMf-FC boot support for Power - powerpc-utils
|
||||
Patch5: powerpc-utils-c01580-add_NVMf-FC_boot_support_part1.patch
|
||||
Patch6: powerpc-utils-2fbd7c-add_NVMf-FC_boot_support_part2.patch
|
||||
Patch7: powerpc-utils-git3847a1-support_multiple_dev_paths_for_a_nvmf_boot_device.patch
|
||||
Patch8: powerpc-utils-git04e5c9-handle_nsid_as_hex.patch
|
||||
Patch9: powerpc-utils-fix_setting_primary_slave_across_reboots.patch
|
||||
|
||||
ExclusiveArch: ppc %{power64}
|
||||
|
||||
@ -69,7 +78,6 @@ make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
make install DESTDIR=$RPM_BUILD_ROOT FILES= RCSCRIPTS=
|
||||
install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/nvsetenv
|
||||
|
||||
#define pkgdocdir {_datadir}/doc/{name}-{version}
|
||||
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
||||
@ -80,6 +88,9 @@ install $RPM_BUILD_ROOT/usr/share/doc/packages/powerpc-utils/* -t $RPM_BUILD_ROO
|
||||
rm -rf $RPM_BUILD_ROOT/usr/share/doc/packages/powerpc-utils
|
||||
rm -f $RPM_BUILD_ROOT%{_pkgdocdir}/COPYING
|
||||
|
||||
# install udev rule for the nx-gzip accelerator
|
||||
install -pDm 644 %{SOURCE1} %{buildroot}%{_udevrulesdir}/90-nx-gzip.rules
|
||||
|
||||
# remove init script and perl script. They are deprecated
|
||||
rm -rf $RPM_BUILD_ROOT/etc/init.d/ibmvscsis.sh $RPM_BUILD_ROOT/usr/sbin/vscsisadmin
|
||||
|
||||
@ -160,6 +171,7 @@ systemctl enable hcn-init.service >/dev/null 2>&1 || :
|
||||
%{_sbindir}/pseries_platform
|
||||
%{_sbindir}/drmgr
|
||||
%{_sbindir}/lparnumascore
|
||||
%{_udevrulesdir}/90-nx-gzip.rules
|
||||
%{_mandir}/man1/amsstat.1*
|
||||
%{_mandir}/man5/lparcfg.5*
|
||||
%{_mandir}/man8/activate_firmware.8*
|
||||
@ -195,6 +207,18 @@ systemctl enable hcn-init.service >/dev/null 2>&1 || :
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Dec 12 2022 Than Ngo <than@redhat.com> - 1.3.10-5
|
||||
- Resolves: #2125152, HNV bond fails to come up with sriov interface as active slave
|
||||
|
||||
* Thu Dec 08 2022 Than Ngo <than@redhat.com> - 1.3.10-4
|
||||
- Resolves: #2150698, handle nsid of nvmf device as hexadecimal number
|
||||
- Resolves: #2150697, setup multiple device path for a nvmf boot device
|
||||
|
||||
* Thu Nov 03 2022 Than Ngo <than@redhat.com> - 1.3.10-3
|
||||
- Resolves: #2111991, Add udev rule for the nx-gzip in to the core subpackage
|
||||
- Resolves: #2121470, Fix lsslot -c mem output when using 4GB LMB size
|
||||
- Resolves: #2110129, Add NVMf-FC boot support for Power
|
||||
|
||||
* Mon Jun 06 2022 Than Ngo <than@redhat.com> - 1.3.10-2
|
||||
- Related: #2089106, install smt.state as config file
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user