Hello community, here is the log from the commit of package nvme-cli for openSUSE:Factory checked in at 2016-09-07 11:44:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nvme-cli (Old) and /work/SRC/openSUSE:Factory/.nvme-cli.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nvme-cli" Changes: -------- --- /work/SRC/openSUSE:Factory/nvme-cli/nvme-cli.changes 2016-08-25 09:56:31.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.nvme-cli.new/nvme-cli.changes 2016-09-07 11:44:42.000000000 +0200 @@ -1,0 +2,6 @@ +Wed Aug 31 11:31:15 UTC 2016 - [email protected] + +- Don't map controller registers in 'list' command (boo#986891) + + remove-version-from-list.patch + +------------------------------------------------------------------- New: ---- remove-version-from-list.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nvme-cli.spec ++++++ --- /var/tmp/diff_new_pack.K9gppu/_old 2016-09-07 11:44:43.000000000 +0200 +++ /var/tmp/diff_new_pack.K9gppu/_new 2016-09-07 11:44:43.000000000 +0200 @@ -24,6 +24,7 @@ Group: Hardware/Other Url: https://github.com/linux-nvme/nvme-cli Source: https://github.com/linux-nvme/%{name}/archive/v%{version}.tar.gz +Patch0: remove-version-from-list.patch BuildRequires: pkgconfig(libudev) BuildRoot: %{_tmppath}/%{name}-%{version}-build ExcludeArch: s390x @@ -34,6 +35,7 @@ %prep %setup -q +%patch0 -p1 %build echo %{version} > version ++++++ remove-version-from-list.patch ++++++ >From 6ab2e9ef204053d82c1eb40e514119286749cefe Mon Sep 17 00:00:00 2001 From: Keith Busch <[email protected]> Date: Tue, 30 Aug 2016 08:49:19 -0600 Subject: [PATCH] Remove version from list Git-commit: 6ab2e9ef204053d82c1eb40e514119286749cefe References: boo#986891 We can't reliably map controller registers due to kernel memory protections added in kernel commit 90a545e98, so we are removing its dependency for the 'list' command to run. Signed-off-by: Keith Busch <[email protected]> Acked-by: Johannes Thumshirn <[email protected]> --- nvme.c | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) --- a/nvme.c +++ b/nvme.c @@ -710,23 +710,9 @@ struct list_item { int nsid; struct nvme_id_ns ns; unsigned block; - __le32 ver; }; #ifdef LIBUDEV_EXISTS -/* For pre NVMe 1.2 devices we must get the version from the BAR, not the - * ctrl_id.*/ -static void get_version(struct list_item* list_item) -{ - struct nvme_bar *bar; - - list_item->ver = list_item->ctrl.ver; - if (list_item->ctrl.ver) - return; - get_registers(&bar); - list_item->ver = bar->vs; -} - static void print_list_item(struct list_item list_item) { @@ -748,25 +734,22 @@ static void print_list_item(struct list_ char format[128]; sprintf(format,"%3.0f %2sB + %2d B", (double)lba, l_suffix, list_item.ns.lbaf[(list_item.ns.flbas & 0x0f)].ms); - char version[128]; - sprintf(version,"%d.%d", (list_item.ver >> 16), - (list_item.ver >> 8) & 0xff); - printf("%-16s %-*.*s %-*.*s %-8s %-9d %-26s %-16s %-.*s\n", list_item.node, + printf("%-16s %-*.*s %-*.*s %-9d %-26s %-16s %-.*s\n", list_item.node, (int)sizeof(list_item.ctrl.sn), (int)sizeof(list_item.ctrl.sn), list_item.ctrl.sn, (int)sizeof(list_item.ctrl.mn), (int)sizeof(list_item.ctrl.mn), list_item.ctrl.mn, - version, list_item.nsid, usage, format, (int)sizeof(list_item.ctrl.fr), list_item.ctrl.fr); + list_item.nsid, usage, format, (int)sizeof(list_item.ctrl.fr), list_item.ctrl.fr); } static void print_list_items(struct list_item *list_items, unsigned len) { unsigned i; - printf("%-16s %-20s %-40s %-8s %-9s %-26s %-16s %-8s\n", - "Node", "SN", "Model", "Version", "Namespace", "Usage", "Format", "FW Rev"); - printf("%-16s %-20s %-40s %-8s %-9s %-26s %-16s %-8s\n", + printf("%-16s %-20s %-40s %-9s %-26s %-16s %-8s\n", + "Node", "SN", "Model", "Namespace", "Usage", "Format", "FW Rev"); + printf("%-16s %-20s %-40s %-9s %-26s %-16s %-8s\n", "----------------", "--------------------", "----------------------------------------", - "--------", "---------", "--------------------------", "----------------", "--------"); + "---------", "--------------------------", "----------------", "--------"); for (i = 0 ; i < len ; i++) print_list_item(list_items[i]); @@ -833,7 +816,6 @@ static int list(int argc, char **argv, s return err; strcpy(list_items[count].node, node); list_items[count].block = S_ISBLK(nvme_stat.st_mode); - get_version(&list_items[count]); count++; } }
