diff options
author | ache <ache@FreeBSD.org> | 1994-08-27 15:28:34 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1994-08-27 15:28:34 +0000 |
commit | 109e9ae764615304685c48a081c80390ed957586 (patch) | |
tree | b74d4c65631dba31ec80888873efe4f39808ef4e | |
parent | 05b94180ee975281e5062276679e15003be493a3 (diff) | |
download | FreeBSD-src-109e9ae764615304685c48a081c80390ed957586.zip FreeBSD-src-109e9ae764615304685c48a081c80390ed957586.tar.gz |
Continue previous fix:
Add MIN_DELAY definition instead of hard-coded 10
-rw-r--r-- | sys/dev/mcd/mcd.c | 8 | ||||
-rw-r--r-- | sys/i386/isa/mcd.c | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c index 64a2dd6..1acd804 100644 --- a/sys/dev/mcd/mcd.c +++ b/sys/dev/mcd/mcd.c @@ -39,7 +39,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: mcd.c,v 1.18 1994/08/13 03:50:09 wollman Exp $ + * $Id: mcd.c,v 1.19 1994/08/27 13:15:25 ache Exp $ */ static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; @@ -62,6 +62,8 @@ static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; #include <i386/isa/isa_device.h> #include <i386/isa/mcdreg.h> +#define MIN_DELAY 10 + /* user definable options */ /*#define MCD_TO_WARNING_ON*/ /* define to get timeout messages */ /*#define MCDMINI*/ /* define for a mini configuration for boot kernel */ @@ -637,10 +639,10 @@ mcd_waitrdy(int port,int dly) int i; /* wait until xfer port senses data ready */ - for (i=0; i<dly; i++) { + for (i=0; i<dly; i+=MIN_DELAY) { if ((inb(port+mcd_xfer) & MCD_ST_BUSY)==0) return 0; - DELAY(10); + DELAY(MIN_DELAY); } return -1; } diff --git a/sys/i386/isa/mcd.c b/sys/i386/isa/mcd.c index 64a2dd6..1acd804 100644 --- a/sys/i386/isa/mcd.c +++ b/sys/i386/isa/mcd.c @@ -39,7 +39,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: mcd.c,v 1.18 1994/08/13 03:50:09 wollman Exp $ + * $Id: mcd.c,v 1.19 1994/08/27 13:15:25 ache Exp $ */ static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; @@ -62,6 +62,8 @@ static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; #include <i386/isa/isa_device.h> #include <i386/isa/mcdreg.h> +#define MIN_DELAY 10 + /* user definable options */ /*#define MCD_TO_WARNING_ON*/ /* define to get timeout messages */ /*#define MCDMINI*/ /* define for a mini configuration for boot kernel */ @@ -637,10 +639,10 @@ mcd_waitrdy(int port,int dly) int i; /* wait until xfer port senses data ready */ - for (i=0; i<dly; i++) { + for (i=0; i<dly; i+=MIN_DELAY) { if ((inb(port+mcd_xfer) & MCD_ST_BUSY)==0) return 0; - DELAY(10); + DELAY(MIN_DELAY); } return -1; } |