diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2021-10-31 01:36:51 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2021-10-31 01:36:51 +0000 |
commit | 901931cfdad6f06e22c24beba339bb08d2265498 (patch) | |
tree | 99378c1ca0db087eb17c3f1aeaadce8c30d3dbeb /src | |
parent | f0195003bb0c66ba55084b2f7e0fe982f08c5675 (diff) | |
download | sg3_utils-901931cfdad6f06e22c24beba339bb08d2265498.tar.gz |
sg_logs: additions to Command duration limits statistics log page [spc6r06]; configure.ac: tweak to accepts uclinux as linux
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@917 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src')
-rw-r--r-- | src/sg_logs.c | 31 | ||||
-rw-r--r-- | src/sg_ses.c | 21 |
2 files changed, 40 insertions, 12 deletions
diff --git a/src/sg_logs.c b/src/sg_logs.c index ef9c8fbc..99fd44aa 100644 --- a/src/sg_logs.c +++ b/src/sg_logs.c @@ -36,7 +36,7 @@ #include "sg_unaligned.h" #include "sg_pr2serr.h" -static const char * version_str = "1.86 20210924"; /* spc6r05 + sbc5r01 */ +static const char * version_str = "1.87 20211030"; /* spc6r06 + sbc5r01 */ #define MX_ALLOC_LEN (0xfffc) #define SHORT_RESP_LEN 128 @@ -2107,7 +2107,7 @@ show_cmd_dur_limits_page(const uint8_t * resp, int len, bp = &resp[0] + 4; while (num > 3) { pc = sg_get_unaligned_be16(bp + 0); - pl = bp[3] + 4; + pl = bp[3] + 4; /* parameter length */ if (op->filter_given) { if (pc != op->filter) goto skip; @@ -2158,6 +2158,33 @@ show_cmd_dur_limits_page(const uint8_t * resp, int len, printf(" Number of latency misses attributable to background " "operations = %u\n", sg_get_unaligned_be32(bp + 32)); break; + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + case 0x41: + case 0x42: + case 0x43: + case 0x44: + case 0x45: + case 0x46: + case 0x47: + /* This short form introduced in draft spc6r06 */ + printf(" Command duration limit T2%s %d [Parameter code 0x%x]:\n", + ((pc > 0x40) ? "B" : "A"), + ((pc > 0x40) ? (pc - 0x40) : (pc - 0x30)), pc); + printf(" Number of inactive target miss commands = %u\n", + sg_get_unaligned_be32(bp + 4)); + printf(" Number of active target miss commands = %u\n", + sg_get_unaligned_be32(bp + 8)); + printf(" Number of inactive+active target miss commands = %u\n", + sg_get_unaligned_be32(bp + 12)); + printf(" Number of commands = %u\n", + sg_get_unaligned_be32(bp + 16)); + break; default: printf(" <<unexpected parameter code 0x%x\n", pc); break; diff --git a/src/sg_ses.c b/src/sg_ses.c index ecebb9db..9b16134b 100644 --- a/src/sg_ses.c +++ b/src/sg_ses.c @@ -38,7 +38,7 @@ * commands tailored for SES (enclosure) devices. */ -static const char * version_str = "2.53 20211022"; /* ses4r04 */ +static const char * version_str = "2.54 20211028"; /* ses4r04 */ #define MX_ALLOC_LEN ((64 * 1024) - 4) /* max allowable for big enclosures */ #define MX_ELEM_HDR 1024 @@ -827,15 +827,15 @@ usage(int help_num) { if (2 != help_num) { pr2serr( - "Usage: sg_ses [--all] [--descriptor=DES] [--dev-slot-num=SN] " - "[--eiioe=A_F]\n" - " [--filter] [--get=STR] [--hex] " - "[--index=IIA | =TIA,II]\n" - " [--inner-hex] [--join] [--maxlen=LEN] " - "[--page=PG] [--quiet]\n" - " [--raw] [--readonly] [--sas-addr=SA] [--status] " - "[--verbose]\n" - " [--warn] DEVICE\n\n" + "Usage: sg_ses [--all] [--ALL] [--descriptor=DES] " + "[--dev-slot-num=SN]\n" + " [--eiioe=A_F] [--filter] [--get=STR] " + "[--hex]\n" + " [--index=IIA | =TIA,II] [--inner-hex] [--join] " + "[--maxlen=LEN]\n" + " [--page=PG] [--quiet] [--raw] [--readonly] " + "[--sas-addr=SA]\n" + " [--status] [--verbose] [--warn] DEVICE\n\n" " sg_ses --control [--byte1=B1] [--clear=STR] " "[--data=H,H...]\n" " [--descriptor=DES] [--dev-slot-num=SN] " @@ -927,6 +927,7 @@ usage(int help_num) } else { /* for '-hh' or '--help --help' */ pr2serr( " where the remaining sg_ses options are:\n" + " --ALL|-z same as --all twice (adds thresholds)\n" " --byte1=B1|-b B1 byte 1 (2nd byte) of control page set " "to B1\n" " --data=H,H...|-d H,H... string of ASCII hex bytes to " |