From owner-freebsd-scsi Wed Jul 4 0:13:13 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from beppo.feral.com (beppo.feral.com [192.67.166.79]) by hub.freebsd.org (Postfix) with ESMTP id DFFF137B406; Wed, 4 Jul 2001 00:13:05 -0700 (PDT) (envelope-from mjacob@feral.com) Received: from beppo (mjacob@beppo [192.67.166.79]) by beppo.feral.com (8.11.3/8.11.3) with ESMTP id f647D5S09340; Wed, 4 Jul 2001 00:13:05 -0700 (PDT) (envelope-from mjacob@feral.com) Date: Wed, 4 Jul 2001 00:13:04 -0700 (PDT) From: Matthew Jacob X-Sender: mjacob@beppo Reply-To: mjacob@feral.com To: scsi@freebsd.org Cc: audit@freebsd.org Subject: tunable retry count for DA Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org This change implements a sysctl for setting the retry count for normal I/O for scsi_da- this is useful if you're working with noisy Fibre Channel Loops. The principal node, cam, overlaps the same definition in scsi_cd. They probably ought to be moved to someplace else. Index: cam/scsi/scsi_da.c =================================================================== RCS file: /home/ncvs/src/sys/cam/scsi/scsi_da.c,v retrieving revision 1.73 diff -u -r1.73 scsi_da.c --- cam/scsi/scsi_da.c 2001/07/04 05:22:42 1.73 +++ cam/scsi/scsi_da.c 2001/07/04 07:11:13 @@ -38,6 +38,7 @@ #include #include #include +#include #endif /* _KERNEL */ #include @@ -277,6 +278,18 @@ #define DA_DEFAULT_TIMEOUT 60 /* Timeout in seconds */ #endif +#ifndef DA_DEFAULT_RETRY +#define DA_DEFAULT_RETRY 4 +#endif + +static int da_retry_count = DA_DEFAULT_RETRY; + +SYSCTL_NODE(_kern, OID_AUTO, cam, CTLFLAG_RD, 0, "CAM Subsystem"); +SYSCTL_NODE(_kern_cam, OID_AUTO, da, CTLFLAG_RD, 0, + "CAM Direct Access Disk driver"); +SYSCTL_INT(_kern_cam_da, OID_AUTO, retry_count, CTLFLAG_RW, + &da_retry_count, 0, "Normal I/O retry count"); + /* * DA_ORDEREDTAG_INTERVAL determines how often, relative * to the default timeout, we check to see whether an ordered @@ -1103,7 +1116,7 @@ tag_code = MSG_SIMPLE_Q_TAG; } scsi_read_write(&start_ccb->csio, - /*retries*/4, /* retry a few times */ + /*retries*/da_retry_count, dadone, tag_code, bp->bio_cmd == BIO_READ, To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message