aboutsummaryrefslogtreecommitdiff
path: root/testing/uapi_sg.h
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2019-02-06 23:24:46 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2019-02-06 23:24:46 +0000
commitd491f4c710d6d1d123d421eb0ba7aeddee9cf7d7 (patch)
treeef74075454c2237144874f57bdb21cae709b7631 /testing/uapi_sg.h
parent04adb7f5027fb9f8b4368e4eaa561e14591bb1a7 (diff)
downloadsg3_utils-d491f4c710d6d1d123d421eb0ba7aeddee9cf7d7.tar.gz
sg_logs+sg_vpd: tweaks for WDC SSD; sgh_dd add oflag=swait
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@810 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'testing/uapi_sg.h')
-rw-r--r--testing/uapi_sg.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/testing/uapi_sg.h b/testing/uapi_sg.h
index cfb0044b..d6cbf14d 100644
--- a/testing/uapi_sg.h
+++ b/testing/uapi_sg.h
@@ -14,7 +14,7 @@
* Later extensions (versions 2, 3 and 4) to driver:
* Copyright (C) 1998 - 2018 Douglas Gilbert
*
- * Version 4.0.05 (20190126)
+ * Version 4.0.06 (20190201)
* This version is for Linux 2.6, 3, 4 and 5 series kernels.
*
* Documentation
@@ -130,17 +130,19 @@ typedef struct sg_io_hdr {
#define SG_INFO_ANOTHER_WAITING 0x10 /* needs SG_CTL_FLAGM_CHECK_FOR_MORE */
#define SG_INFO_ABORTED 0x20 /* this command has been aborted */
-
-typedef struct sg_scsi_id { /* used by SG_GET_SCSI_ID ioctl() */
+/*
+ * Pointer to object of this structure filled by ioctl(SG_GET_SCSI_ID). Last
+ * field changed in v4 driver, was 'int unused[2]' so remains the same size.
+ */
+typedef struct sg_scsi_id {
int host_no; /* as in "scsi<n>" where 'n' is one of 0, 1, 2 etc */
int channel;
int scsi_id; /* scsi id of target device */
- int lun;
+ int lun; /* lower 32 bits of internal 64 bit integer */
int scsi_type; /* TYPE_... defined in scsi/scsi.h */
short h_cmd_per_lun;/* host (adapter) maximum commands per lun */
short d_queue_depth;/* device (or adapter) maximum queue length */
- int minor_num; /* new in sg v4 driver, example: 3 for /dev/sg3 */
- int unused[1]; /* held in reserve, set 0 for now */
+ __u8 scsi_lun[8]; /* full 8 byte SCSI LUN [new v4 driver] */
} sg_scsi_id_t;
/* For backward compatibility v4 driver yields at most SG_MAX_QUEUE of these */