diff options
author | ken <ken@FreeBSD.org> | 1998-10-02 05:15:51 +0000 |
---|---|---|
committer | ken <ken@FreeBSD.org> | 1998-10-02 05:15:51 +0000 |
commit | c19e09786ae641a353a484bb8ace2e97269c5b2b (patch) | |
tree | c462e9043840cc24de1150df5862c3baaa6b0700 /sys/cam | |
parent | 7d178bc52e7f2ca09e37c9528dba5b77596d8908 (diff) | |
download | FreeBSD-src-c19e09786ae641a353a484bb8ace2e97269c5b2b.zip FreeBSD-src-c19e09786ae641a353a484bb8ace2e97269c5b2b.tar.gz |
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>
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/scsi/scsi_sa.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c index b91b594..5e961da 100644 --- a/sys/cam/scsi/scsi_sa.c +++ b/sys/cam/scsi/scsi_sa.c @@ -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); |