changeset 4037:9f7507400a7b

6475254 ST:Need st driver support for HP LTO-4 tape drive 6524285 tar command fails after a node c rewinds on HP LTO-4 tape drive
author yl194034
date Sun, 15 Apr 2007 20:28:41 -0700
parents 9db83fcc6245
children 7187705e6a23
files usr/src/uts/common/io/scsi/targets/st.c usr/src/uts/common/io/scsi/targets/st_conf.c
diffstat 2 files changed, 61 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/common/io/scsi/targets/st.c	Sun Apr 15 10:15:53 2007 -0700
+++ b/usr/src/uts/common/io/scsi/targets/st.c	Sun Apr 15 20:28:41 2007 -0700
@@ -9119,6 +9119,22 @@
 	switch (un->un_status = sensep->es_key) {
 	case KEY_NO_SENSE:
 		severity = SCSI_ERR_INFO;
+
+		/*
+		 * Erase, locate or rewind operation in progress, retry
+		 * ASC  ASCQ
+		 *  00   18    Erase operation in progress
+		 *  00   19    Locate operation in progress
+		 *  00   1A    Rewind operation in progress
+		 */
+		if (sensep->es_add_code == 0 &&
+		    ((sensep->es_qual_code == 0x18) ||
+		    (sensep->es_qual_code == 0x19) ||
+		    (sensep->es_qual_code == 0x1a))) {
+			rval = QUE_COMMAND;
+			break;
+		}
+
 		goto common;
 
 	case KEY_RECOVERABLE_ERROR:
@@ -11522,6 +11538,10 @@
 			ST_DEBUG2(ST_DEVINFO, st_label, SCSI_DEBUG,
 			    "Drive has standard Gen III media loaded\n");
 			break;
+		case 0x46:
+			ST_DEBUG2(ST_DEVINFO, st_label, SCSI_DEBUG,
+			    "Drive has standard Gen IV media loaded\n");
+			break;
 		default:
 			ST_DEBUG2(ST_DEVINFO, st_label, SCSI_DEBUG,
 			    "Drive has standard unknown 0x%X media loaded\n",
--- a/usr/src/uts/common/io/scsi/targets/st_conf.c	Sun Apr 15 10:15:53 2007 -0700
+++ b/usr/src/uts/common/io/scsi/targets/st_conf.c	Sun Apr 15 20:28:41 2007 -0700
@@ -1103,6 +1103,47 @@
   },
 
   /*
+   * HP Ultrium LTO Gen 4
+   * [1] This drive supports two densites at this time.
+   *     In reality the type of media GEN 3 or GEN 4 selects the density.
+   *     ST_MODE_SEL_COMP controls compression.
+   * [2] The Ultrium LTO has one speed.
+   * [3] max_rretries and max_wretries are not used but kept for
+   *     backward compatibility.
+   */
+  {                           /* Structure member Description                 */
+                              /* ---------------- -----------                 */
+    "HP Ultrium LTO 4",       /* .name            Display ("pretty") name     */
+    17,                       /* .length          Length of next item...      */
+    "HP      Ultrium 4*",     /* .vid             handles SCSI or FC          */
+    MT_LTO,                   /* .type            Numeric type (cf. mtio.h)   */
+    0,                        /* .bsize           Block size (0 = variable)   */
+                              /* .options         Drive option flags:         */
+    ST_VARIABLE         |     /*  0000001           Supports variable length  */
+    ST_BSF              |     /*  0000008           Supports SPACE block fwd  */
+    ST_BSR              |     /*  0000010           Supports SPACE block rev  */
+    ST_KNOWS_EOD        |     /*  0000200           Recognizes end-of-data    */
+    ST_UNLOADABLE       |     /*  0000400           Driver can be unloaded    */
+    ST_NO_RECSIZE_LIMIT |     /*  0008000           Supports blocks > 64KB    */
+    ST_MODE_SEL_COMP    |     /*  0010000           Mode select compression   */
+    ST_WORMABLE,              /*  1000000           Drive is WORM capable     */
+                              /*  -------                                     */
+                              /*  1018619                                     */
+    -1,                       /* .max_rretries    [Note 3]                    */
+    -1,                       /* .max_wretries    [Note 3]                    */
+    {0x44, 0x44, 0x46, 0x46}, /* .densities       Density codes [Note 1]      */
+    MT_DENSITY4,              /* .default_density (.densities[x])             */
+    {0, 0, 0, 0},             /* .speeds          Speed codes [Note 2]        */
+    MINUTES(1),               /* .non_motion_timeout                          */
+    MINUTES(20),              /* .io_timeout                                  */
+    MINUTES(10),              /* .rewind_timeout                              */
+    MINUTES(20),              /* .space_timeout                               */
+    MINUTES(10),              /* .load_timeout                                */
+    MINUTES(10),              /* .unload_timeout                              */
+    MINUTES(300)              /* .erase_timeout      Five Hours               */
+  },
+
+  /*
    * HP Ultrium LTO Gen 3
    * [1] This drive supports two densites at this time.
    *     In reality the type of media GEN 2 or GEN 3 selects the density.