From owner-freebsd-bugs Fri Oct 4 12:50:04 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id MAA10286 for bugs-outgoing; Fri, 4 Oct 1996 12:50:04 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id MAA10274; Fri, 4 Oct 1996 12:50:02 -0700 (PDT) Resent-Date: Fri, 4 Oct 1996 12:50:02 -0700 (PDT) Resent-Message-Id: <199610041950.MAA10274@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, Received: (from nobody@localhost)by.freefall.freebsd.org.id.MAA10202;Fri; (8.7.5/8.7.3);, 4 Oct 1996 12:49:07.-0700 (PDT) Message-Id: <199610041949.MAA10202@freefall.freebsd.org> Date: Fri, 4 Oct 1996 12:49:07 -0700 (PDT) From: curt@emergent.com To: freebsd-gnats-submit@freebsd.org X-Send-Pr-Version: www-1.0 Subject: kern/1724: HP colorado T4000S tape drive hangs system on many scsi controllers Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >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: