Patches from DES to create three new kernel config options to control
timeouts in the SA driver (timeouts for space, rewind and erase). Folks can lengthen the timeouts if their hardware is especially slow, or shorten them if they want to be notified of errors a little sooner. Also, get rid of two OD driver options. The od driver has been made obsolete by the da driver. Reviewed by: ken, gibbs Submitted by: Dag-Erling Coidan Smørgrav <des@FreeBSD.ORG>
This commit is contained in:
parent
8fe644b289
commit
9dfb44710e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=39884
@ -25,7 +25,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: scsi_sa.c,v 1.1 1998/09/15 06:36:34 gibbs Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -61,6 +61,18 @@
|
||||
|
||||
#ifdef KERNEL
|
||||
|
||||
#include <opt_sa.h>
|
||||
|
||||
#ifndef SA_SPACE_TIMEOUT
|
||||
#define SA_SPACE_TIMEOUT 1 * 60
|
||||
#endif
|
||||
#ifndef SA_REWIND_TIMEOUT
|
||||
#define SA_REWIND_TIMEOUT 2 * 60
|
||||
#endif
|
||||
#ifndef SA_ERASE_TIMEOUT
|
||||
#define SA_ERASE_TIMEOUT 4 * 60
|
||||
#endif
|
||||
|
||||
#define SAUNIT(DEV) ((minor(DEV)&0xF0) >> 4) /* 4 bit unit. */
|
||||
#define SASETUNIT(DEV, U) makedev(major(DEV), ((U) << 4))
|
||||
|
||||
@ -1835,16 +1847,13 @@ sarewind(struct cam_periph *periph)
|
||||
|
||||
ccb = cam_periph_getccb(periph, /*priority*/1);
|
||||
|
||||
/*
|
||||
* Put in a 2 hour timeout to deal with especially slow tape drives.
|
||||
*/
|
||||
scsi_rewind(&ccb->csio,
|
||||
/*retries*/1,
|
||||
/*cbcfp*/sadone,
|
||||
MSG_SIMPLE_Q_TAG,
|
||||
/*immediate*/FALSE,
|
||||
SSD_FULL_SIZE,
|
||||
(120 * 60 * 1000)); /* 2 hours */
|
||||
(SA_REWIND_TIMEOUT) * 60 * 1000);
|
||||
|
||||
error = cam_periph_runccb(ccb, saerror, /*cam_flags*/0,
|
||||
/*sense_flags*/0, &softc->device_stats);
|
||||
@ -1878,7 +1887,7 @@ saspace(struct cam_periph *periph, int count, scsi_space_code code)
|
||||
MSG_SIMPLE_Q_TAG,
|
||||
code, count,
|
||||
SSD_FULL_SIZE,
|
||||
60 * 60 *1000);
|
||||
(SA_SPACE_TIMEOUT) * 60 * 1000);
|
||||
|
||||
error = cam_periph_runccb(ccb, saerror, /*cam_flags*/0,
|
||||
/*sense_flags*/0, &softc->device_stats);
|
||||
@ -2073,7 +2082,7 @@ saerase(struct cam_periph *periph, int longerase)
|
||||
/*immediate*/ FALSE,
|
||||
/*long_erase*/ longerase,
|
||||
/*sense_len*/ SSD_FULL_SIZE,
|
||||
/*timeout*/ 4 * 60 * 60 * 1000); /* 4 hours */
|
||||
/*timeout*/ (SA_ERASE_TIMEOUT) * 60 * 1000);
|
||||
|
||||
error = cam_periph_runccb(ccb, saerror, /*cam_flags*/0,
|
||||
/*sense_flags*/0, &softc->device_stats);
|
||||
|
@ -2,7 +2,7 @@
|
||||
# LINT -- config file for checking all the sources, tries to pull in
|
||||
# as much of the source tree as it can.
|
||||
#
|
||||
# $Id: LINT,v 1.478 1998/09/29 17:33:45 abial Exp $
|
||||
# $Id: LINT,v 1.479 1998/10/01 11:48:38 yokota Exp $
|
||||
#
|
||||
# NB: You probably don't want to try running a kernel built from this
|
||||
# file. Instead, you should start from GENERIC, and add options from
|
||||
@ -703,6 +703,14 @@ options SCSI_DELAY=8000 # Be pessimistic about Joe SCSI device
|
||||
options "CHANGER_MIN_BUSY_SECONDS=2"
|
||||
options "CHANGER_MAX_BUSY_SECONDS=10"
|
||||
|
||||
# Options for the CAM sequential access driver:
|
||||
# SA_SPACE_TIMEOUT: Timeout for space operations, in minutes
|
||||
# SA_REWIND_TIMEOUT: Timeout for rewind operations, in minutes
|
||||
# SA_ERASE_TIMEOUT: Timeout for erase operations, in minutes
|
||||
options "SA_SPACE_TIMEOUT=(60)"
|
||||
options "SA_REWIND_TIMEOUT=(2*60)"
|
||||
options "SA_ERASE_TIMEOUT=(4*60)"
|
||||
|
||||
|
||||
#####################################################################
|
||||
# MISCELLANEOUS DEVICES AND OPTIONS
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Id: options,v 1.100 1998/09/25 17:34:47 peter Exp $
|
||||
# $Id: options,v 1.101 1998/09/29 17:32:18 abial Exp $
|
||||
#
|
||||
# On the handling of kernel options
|
||||
#
|
||||
@ -159,9 +159,10 @@ SCSI_NO_OP_STRINGS opt_scsi.h
|
||||
CHANGER_MIN_BUSY_SECONDS opt_cd.h
|
||||
CHANGER_MAX_BUSY_SECONDS opt_cd.h
|
||||
|
||||
# Options used only in scsi/od.c.
|
||||
OD_AUTO_TURNOFF opt_od.h
|
||||
OD_BOGUS_NOT_READY opt_od.h
|
||||
# Options used only in cam/scsi/sa.c.
|
||||
SA_SPACE_TIMEOUT opt_sa.h
|
||||
SA_REWIND_TIMEOUT opt_sa.h
|
||||
SA_ERASE_TIMEOUT opt_sa.h
|
||||
|
||||
# Options used only in pci/ncr.c
|
||||
SCSI_NCR_DEBUG opt_ncr.h
|
||||
|
@ -2,7 +2,7 @@
|
||||
# LINT -- config file for checking all the sources, tries to pull in
|
||||
# as much of the source tree as it can.
|
||||
#
|
||||
# $Id: LINT,v 1.478 1998/09/29 17:33:45 abial Exp $
|
||||
# $Id: LINT,v 1.479 1998/10/01 11:48:38 yokota Exp $
|
||||
#
|
||||
# NB: You probably don't want to try running a kernel built from this
|
||||
# file. Instead, you should start from GENERIC, and add options from
|
||||
@ -703,6 +703,14 @@ options SCSI_DELAY=8000 # Be pessimistic about Joe SCSI device
|
||||
options "CHANGER_MIN_BUSY_SECONDS=2"
|
||||
options "CHANGER_MAX_BUSY_SECONDS=10"
|
||||
|
||||
# Options for the CAM sequential access driver:
|
||||
# SA_SPACE_TIMEOUT: Timeout for space operations, in minutes
|
||||
# SA_REWIND_TIMEOUT: Timeout for rewind operations, in minutes
|
||||
# SA_ERASE_TIMEOUT: Timeout for erase operations, in minutes
|
||||
options "SA_SPACE_TIMEOUT=(60)"
|
||||
options "SA_REWIND_TIMEOUT=(2*60)"
|
||||
options "SA_ERASE_TIMEOUT=(4*60)"
|
||||
|
||||
|
||||
#####################################################################
|
||||
# MISCELLANEOUS DEVICES AND OPTIONS
|
||||
|
@ -2,7 +2,7 @@
|
||||
# LINT -- config file for checking all the sources, tries to pull in
|
||||
# as much of the source tree as it can.
|
||||
#
|
||||
# $Id: LINT,v 1.478 1998/09/29 17:33:45 abial Exp $
|
||||
# $Id: LINT,v 1.479 1998/10/01 11:48:38 yokota Exp $
|
||||
#
|
||||
# NB: You probably don't want to try running a kernel built from this
|
||||
# file. Instead, you should start from GENERIC, and add options from
|
||||
@ -703,6 +703,14 @@ options SCSI_DELAY=8000 # Be pessimistic about Joe SCSI device
|
||||
options "CHANGER_MIN_BUSY_SECONDS=2"
|
||||
options "CHANGER_MAX_BUSY_SECONDS=10"
|
||||
|
||||
# Options for the CAM sequential access driver:
|
||||
# SA_SPACE_TIMEOUT: Timeout for space operations, in minutes
|
||||
# SA_REWIND_TIMEOUT: Timeout for rewind operations, in minutes
|
||||
# SA_ERASE_TIMEOUT: Timeout for erase operations, in minutes
|
||||
options "SA_SPACE_TIMEOUT=(60)"
|
||||
options "SA_REWIND_TIMEOUT=(2*60)"
|
||||
options "SA_ERASE_TIMEOUT=(4*60)"
|
||||
|
||||
|
||||
#####################################################################
|
||||
# MISCELLANEOUS DEVICES AND OPTIONS
|
||||
|
Loading…
Reference in New Issue
Block a user