Hello community,
here is the log from the commit of package powerpc-utils for openSUSE:Factory checked in at 2014-09-29 12:40:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/powerpc-utils (Old)
and /work/SRC/openSUSE:Factory/.powerpc-utils.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "powerpc-utils"
Changes:
--------
--- /work/SRC/openSUSE:Factory/powerpc-utils/powerpc-utils.changes 2014-09-10 17:02:39.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.powerpc-utils.new/powerpc-utils.changes 2014-09-29 12:40:16.000000000 +0200
@@ -1,0 +2,8 @@
+Fri Sep 19 09:55:35 UTC 2014 - stefan.fent@suse.com
+
+- Fix OF Patchnames with vscsi (bnc #886123)
+- added patches:
+ powerpc-utils-bug-886123_01-l2of_scsi.patch
+ powerpc-utils-bug-886123_02-of2l_scsi.patch
+
+-------------------------------------------------------------------
New:
----
powerpc-utils-bug-886123_01-l2of_scsi.patch
powerpc-utils-bug-886123_02-of2l_scsi.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ powerpc-utils.spec ++++++
--- /var/tmp/diff_new_pack.vfQjnN/_old 2014-09-29 12:40:17.000000000 +0200
+++ /var/tmp/diff_new_pack.vfQjnN/_new 2014-09-29 12:40:17.000000000 +0200
@@ -45,6 +45,8 @@
Source1: nvsetenv
Patch1: powerpc-utils-lsprop.patch
Patch3: powerpc-utils.ofpathname.bootlist.patch
+Patch4: powerpc-utils-bug-886123_01-l2of_scsi.patch
+Patch5: powerpc-utils-bug-886123_02-of2l_scsi.patch
ExclusiveArch: ppc ppc64 ppc64le
%description
@@ -55,6 +57,8 @@
%setup -q
%patch1 -p1
%patch3 -p1
+%patch4 -p1
+%patch5 -p1
%build
%configure
++++++ powerpc-utils-bug-886123_01-l2of_scsi.patch ++++++
commit e7ee16163122f5c6f1ae600a2bc59a4eeab0c965
Author: Aruna Balakrishnaiah
Date: Mon Sep 15 13:54:54 2014 +0530
ofpathname: Convert logical path to OF device path for virtio-scsi devices
Add support to convert logical device path to Open firmware device path
for virtio-scsi devices.
Signed-off-by: Aruna Balakrishnaiah
diff --git a/scripts/ofpathname b/scripts/ofpathname
index 52df06c..f7baef7 100755
--- a/scripts/ofpathname
+++ b/scripts/ofpathname
@@ -139,6 +139,39 @@ get_hbtl()
}
#
+# get_scsi_disk_no
+# Given a path that ends in an HBTL, convert the HBTL values into a
+# virtual disk number (not sure what the real terminology is for it).
+# To do the conversion, the HBTL (A:B:C:D) is split apart and
+# calculated as;
+# no = (0x1000000 | C << 16 | D)
+#
+# $1 path ending in HBTL
+get_scsi_disk_no()
+{
+ get_hbtl $1
+
+ local C D
+
+ C=$((0x$ID << 16))
+ D=$((0x$LUN))
+
+ local vdiskno vdisk
+ typeset -i vdiskno
+ vdiskno=$((0x1000000 | $C | $D ))
+ vdisk=${vdiskno##-}
+
+ vdisk=`echo \`bc << END
+ibase=10
+obase=16
+$vdisk
+END\``
+
+ local extrazeroes="00000000"
+ echo $vdisk$extrazeroes
+}
+
+#
# get_vdisk_no
# Given a path that ends in an HBTL, convert the HBTL values into a
# virtual disk number (not sure what the real terminology is for it).
@@ -804,7 +837,19 @@ l2of_scsi()
OF_PATH=$OF_PATH/$scsi_name
fi
- OF_PATH=$OF_PATH/sd@$ID,$LUN
+ local modalias=""
+ goto_dir $device_path "device"
+ if [ $? -eq 0 ]; then
+ modalias=`$CAT $PWD/modalias`
+ fi
+
+ if [[ $modalias =~ "virtio" ]]; then
+ local diskno
+ diskno=`get_scsi_disk_no $device_dir`
+ OF_PATH=$OF_PATH/disk\@$diskno
+ else
+ OF_PATH=$OF_PATH/sd@$ID,$LUN
+ fi
fi
}
++++++ powerpc-utils-bug-886123_02-of2l_scsi.patch ++++++
commit ae434a8e2f1bc90cb9344c112e71078f38f5f7ba
Author: Aruna Balakrishnaiah
Date: Mon Sep 15 15:01:04 2014 +0530
ofpathname: Convert OF format to logical device for virtio-scsi devices
Add support to convert a Open Firmware device path to logical
device path for virtio scsi device.
Signed-off-by: Aruna Balakrishnaiah
diff --git a/scripts/ofpathname b/scripts/ofpathname
index f7baef7..31000a6 100755
--- a/scripts/ofpathname
+++ b/scripts/ofpathname
@@ -873,6 +873,14 @@ ofpathname_to_logical()
DEVTYPE=${DEVICE%:*}
fi
+ if [[ $DEVTYPE = "disk" && $FC = "v-scsi" ]]; then
+ DEVTYPE="v-scsi"
+ fi
+
+ if [[ $DEVTYPE = "disk" && $FC = "scsi" ]]; then
+ DEVTYPE="scsi"
+ fi
+
if [[ $DEVTYPE = "disk" && $SAS = "sas" ]]; then
DEVTYPE="sas"
fi
@@ -1123,6 +1131,7 @@ of2l_vscsi()
#
of2l_scsi()
{
+ DEV_HBTL_NO=${DEVICE##*\@}
DEV_TARGET=${DEVICE##*\@}
DEV_TARGET=${DEV_TARGET%%,*}
DEV_LUN=${DEVICE##*,}
@@ -1147,16 +1156,19 @@ of2l_scsi()
fi
local hbtl=`is_hbtl $link`
+ local diskno
# Do not call get_hbtl for virtio block devices
if [[ $hbtl = 1 ]]; then
get_hbtl $link
+ diskno=`get_scsi_disk_no $link`
fi
cd $link
# save the name of the current directory, we may need it later...
local device_dir=${PWD##/*/}
- if [[ !$hbtl || ($ID = $DEV_TARGET && $LUN = $DEV_LUN) ]]; then
+ if [[ $hbtl = 0 || $diskno = $DEV_HBTL_NO ||
+ ($ID = $DEV_TARGET && $LUN = $DEV_LUN) ]]; then
goto_dir $PWD "devspec"
local devspec=`$CAT ./devspec 2>/dev/null`
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org