Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Oct 1996 12:49:07 -0700 (PDT)
From:      curt@emergent.com
To:        freebsd-gnats-submit@freebsd.org
Subject:   kern/1724: HP colorado T4000S tape drive hangs system on many scsi controllers
Message-ID:  <199610041949.MAA10202@freefall.freebsd.org>
Resent-Message-ID: <199610041950.MAA10274@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         1724
>Category:       kern
>Synopsis:       HP colorado T4000S tape drive hangs system on many scsi controllers
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct  4 12:50:01 PDT 1996
>Last-Modified:
>Originator:     Curt Mayer
>Organization:
Emergent Corporation
>Release:        2.1.5
>Environment:
FreeBSD mofo.emergent.com 2.1.5-RELEASE FreeBSD 2.1.5-RELEASE #2: Tue Aug 20 13:00:22 PDT 1996     root@mofo.emergent.com:/usr/src/sys/compile/MOFO  i386

>Description:
the HP colorado T4000S is a scsi travan tape drive with performance 
in the 500Kb/sec range, with 4Gb capacity. It currently sells for
less than $400.00. any attempts to access it cause scsi bus hangs
due to a failed mode select. the T4000S does not support a density
select, as density is automatically determined by the mounted medium.

>How-To-Repeat:
od /dev/rst0.0
or any other thing like that.



>Fix:

the following patch to scsi/st.c:

*** st.c        Tue Aug 20 12:59:57 1996
--- /home/curt/st.c     Fri Oct  4 12:39:44 1996
***************
*** 92,97 ****
--- 92,98 ----
  #define       ST_Q_SNS_HLP            0x00008         /* must do READ for good
 MODE SENSE */
  #define       ST_Q_IGNORE_LOADS       0x00010
  #define       ST_Q_BLKSIZ             0x00020         /* variable-block media_
blksiz > 0 */
+ #define       ST_Q_NOMODESEL          0x00040         /* no mode select - use 
defaults */
  
  static struct rogues gallery[] =      /* ends with an all-null entry */
  {
***************
*** 149,154 ****
--- 150,164 ----
            {0, ST_Q_FORCE_VAR_MODE, 0x13}              /* minor  12,13,14,15 */
        }
      },
+     {"HP T4000s rev 1.05", "HP      ", "T4000s", "1.05",
+       ST_Q_NOMODESEL,
+       {
+           {0, 0, 0},                                  /* minor  0,1,2,3 */
+           {0, 0, 0},                                  /* minor  4,5,6,7 */
+           {0, 0, 0},                                  /* minor  8,9,10,11 */
+           {0, 0, 0}                                   /* minor  12,13,14,15 */
+       }
+     },
      {(char *) 0}
  };
  #endif /* NEW_SCSICONF */
***************
*** 718,730 ****
                        return errno;
                }
        }
! #ifdef notdef
!       if ( (errno = st_mode_select(unit, 0, NULL, 0)) ) {
!               printf("st%ld: Cannot set selected mode", unit);
!               return errno;
        }
! #endif
!       scsi_prevent(sc_link, PR_PREVENT, 0);   /* who cares if it fails? */
        st->flags &= ~ST_NEW_MOUNT;
        st->flags |= ST_MOUNTED;
        sc_link->flags |= SDEV_MEDIA_LOADED;
--- 728,741 ----
                        return errno;
                }
        }
!       if (!(st->quirks & ST_Q_NOMODESEL)) {
!               if ( (errno = st_mode_select(unit, 0, NULL, 0)) ) {
!                       printf("st%ld: Cannot set selected mode\n", unit);
!                       return errno;
!               }
        }
!       scsi_prevent(sc_link, PR_PREVENT, SCSI_SILENT);
!               /* who cares if it fails? */
        st->flags &= ~ST_NEW_MOUNT;
        st->flags |= ST_MOUNTED;***************
*** 1278,1284 ****
         * drive. If not, put it back the way it was.
         */
        if ( (errcode = st_mode_select(unit, 0, NULL, 0)) ) {   /* put back as i
t was */
!               printf("st%d: Cannot set selected mode", unit);
                st->density = hold_density;
                st->blksiz = hold_blksiz;
                if (st->blksiz) {
--- 1289,1295 ----
         * drive. If not, put it back the way it was.
         */
        if ( (errcode = st_mode_select(unit, 0, NULL, 0)) ) {   /* put back as i
t was */
!               printf("st%d: Cannot set selected mode\n", unit);
                st->density = hold_density;
                st->blksiz = hold_blksiz;
                if (st->blksiz) {

        sc_link->flags |= SDEV_MEDIA_LOADED;



>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610041949.MAA10202>