Wen Xiong [Mon, 14 Dec 2015 19:12:53 +0000 (13:12 -0600)]
Subject: compilation issue on ppc.
We saw the following compilation issue on ppc.
[root@everest-lp2 nvme-cli]# make
cc -I ./src -D_GNU_SOURCE -std=gnu99 -O2 -g -Wall -Werror
-DNVME_VERSION='"0.2.15.gc4c2"' nvme.c -o nvme argconfig. o
suffix.o common.o
nvme.c: In function âmânvme.c:2227:2: error: passing argument 2 of
âgconfig_parse_comma_sep_array_longârom incompatible pointer type [-
Werror]
ns = argconfig_parse_comma_sep_array_long(cfg.slbas, slbas, 256);
^
In file included from nvme.c:52:0:
src/argconfig.h:106:10: note: expected âng long unsigned int *âut
argument is of type âu64 *âunsigned
argconfig_parse_comma_sep_array_long(char *string, unsigned long long
*ret,
^
cc1: all warnings being treated as errors
make: *** [nvme] Error 1
keithbusch [Tue, 8 Dec 2015 23:01:52 +0000 (16:01 -0700)]
Merge pull request #41 from samiWaheed/master
Added decoding of temp sensors to the SMART log page (02h)
Thanks for the fix. I did not catch that a previous commit did lot more than just _move_ the printing functions to a common library, creating this regression.
Sami Waheed [Tue, 8 Dec 2015 22:51:24 +0000 (14:51 -0800)]
Added decoding of temp sensors to the SMART log page (02h)
- Display temperature sensors data using smart-log command
- Removed code that truncated the last byte of fr, mn, sn in id-ctrl.
Matched string format with list command
Walter Doekes [Fri, 4 Dec 2015 13:41:39 +0000 (14:41 +0100)]
Improve debian package build process.
* The changes from 3686759 make the debian/rules a lot simpler.
* Fix so ld doesn't leave a.out turds.
* Add dist-orig make target that creates a reproducible orig.tar.gz.
A reproducible source archive is a first step towards reproducible
builds.
* Fix typo in debian package description.
* Add dist and pkg to the PHONY targets.
Patrick McCormick [Thu, 3 Dec 2015 17:56:22 +0000 (12:56 -0500)]
Makefile cleanup.
Don't link with unused libs: -lm, -lpthread
Don't hardcode in 64 bit compile, this will break cross compilation
Put preprocessor flags in CPPFLAGS
Add to existing variables instead of var = $var pattern
Signed-off-by: Patrick McCormick <patrick.m.mccormick@intel.com>
Modified the license of the code pulled from libargconfig to be GPLv2
There have been legal concerns of linking Apache licensed code with
GPLv2 code. This change modifies the license of the code originating
from libargconfig. All of the copyright holders (including myself and
PMC Sierra represented by Stephen Bates <Stephen.Bates@pmcs.com>) have
signed off on this change.
Sami Waheed [Tue, 15 Sep 2015 22:29:04 +0000 (15:29 -0700)]
Changed default NSID in get-feature function. Fixed format of LBA range output
- Changed default NSID to 1 in get-feature function. Some features
require a valid NSID (i.e. lba range type)
- Fixed format of LBA range output
- Added description to the attributes field in LBA range output
- Changed default NSID to 0xffffffff in get_log (Matches help
documentation now)
Keith Busch [Fri, 28 Aug 2015 14:42:00 +0000 (08:42 -0600)]
Use device maximum for error log entries
It's been reported that some controllers return error if more logs were
requested than the device's max. This patch overrides the user's request,
or the default if the option was not given, with the device's max if
the setting exceeds it.
Signed-off-by: Keith Busch <keith.busch@intel.com>
Paul Grabinar [Mon, 10 Aug 2015 12:28:03 +0000 (13:28 +0100)]
Allow for firmware activation that needs a reset
On a firmware activate, some drives require a reset before the new
firmware can be used. Such drives return a status 0x10b to the activate
request.
Rather than treat this as an error, tell this user the activation was
successful, but a reset is required.
kaoudis [Wed, 5 Aug 2015 16:39:14 +0000 (10:39 -0600)]
add help strings and submenus
Add relevant help to nvme commands and command options.
Don't seg fault when trying to print help strings.
Don't declare "-h" an unrecognized option; print help menu instead.
Keith Busch [Tue, 9 Jun 2015 15:35:24 +0000 (09:35 -0600)]
Makefile: install documentation without building
Fixes dependency timestamp problems on cloning that 'make' rules
require it rebuild manpages even though this is not needed. We don't
want an 'asciidoc' dependency to build and install the program unless
you explicitly want to build the documentation, so changing the make
target's dependencies to not rebuild it.
Signed-off-by: Keith Busch <keith.busch@intel.com>
Keith Busch [Wed, 3 Jun 2015 21:45:35 +0000 (15:45 -0600)]
Printf platform fixes
Changing the 64-bit printf formats to use an appropriate inttype macro
for the given architecture, and converting for appropriate endianess for
"__le64" types.
Signed-off-by: Keith Busch <keith.busch@intel.com>
stevegalbraith [Wed, 27 May 2015 16:36:38 +0000 (09:36 -0700)]
Fix to determine initial value for lba in print_list_item
The index used to determine lba value takes into accout the entire FLBAS field. Bit 4 determines whether an extended or separate is used to send metadata and if set to 1'b,
throws off the index value. Masked out the top 4 bits to only take into account Bits 3:0 which indicate the LBA format type used.
Jon Derrick [Tue, 12 May 2015 16:09:04 +0000 (10:09 -0600)]
Added a human-readable format option to id-ctrl and id-ns. This will
partially decode several relevant bitfields in the ID Controller and
Namespace commands. Reserved fields are displayed if not 0.
Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
Keith Busch [Fri, 20 Mar 2015 15:13:50 +0000 (09:13 -0600)]
Add data input option for set features
Some NVMe features perform a data transfer and this provides a user option
to specify where that data comes from when setting. Documentation updated
as well.
This also includes an unrelated fix to hush a warning for unused symbols
under precompile libudev dependencies.
Signed-off-by: Keith Busch <keith.busch@intel.com>
Stephen Bates [Sun, 15 Mar 2015 22:41:41 +0000 (16:41 -0600)]
Improved Makefile to use kernel uapi header.
Until now the CLI has relied on the header in the local Linux folder.
This is not safe as the kernel header may have differences that can
cause severe issues (e.g. new/different structure members). This
commit tries to use the uapi for the current kernel. Note this only
fixes at compile time.
Stephen Bates [Fri, 13 Mar 2015 19:24:47 +0000 (13:24 -0600)]
Fixed versioning for pre 1.2 devices
Prior to NVMe 1.2 there was no version field in controller ID and the
version had to come from the BAR register. This change ensures the
version is obtained from the right place for all devices.