Do the PREVENT before the START.

This commit is contained in:
mycroft 1995-01-23 18:17:22 +00:00
parent feb5b29596
commit 726fa4e94f
4 changed files with 18 additions and 16 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cd.c,v 1.49 1995/01/16 21:31:34 mycroft Exp $ */
/* $NetBSD: cd.c,v 1.50 1995/01/23 18:17:22 mycroft Exp $ */
/*
* Copyright (c) 1994 Charles Hannum. All rights reserved.
@ -238,15 +238,15 @@ cdopen(dev, flag, fmt)
SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_NOT_READY | SCSI_IGNORE_MEDIA_CHANGE))
goto bad3;
if ((error = scsi_start_and_wait(sc_link, 30, 0)) == EIO)
goto bad3;
sc_link->flags |= SDEV_OPEN; /* unit attn errors are now errors */
/* Lock the pack in. */
scsi_prevent(sc_link, PR_PREVENT,
SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_NOT_READY);
if ((error = scsi_start_and_wait(sc_link, 30, 0)) == EIO)
goto bad;
if ((sc_link->flags & SDEV_MEDIA_LOADED) == 0) {
sc_link->flags |= SDEV_MEDIA_LOADED;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sd.c,v 1.53 1995/01/16 21:40:17 mycroft Exp $ */
/* $NetBSD: sd.c,v 1.54 1995/01/23 18:17:24 mycroft Exp $ */
/*
* Copyright (c) 1994 Charles Hannum. All rights reserved.
@ -49,6 +49,7 @@
#include <sys/types.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/conf.h>
#include <sys/file.h>
#include <sys/stat.h>
@ -241,15 +242,15 @@ sdopen(dev, flag, fmt)
SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_NOT_READY | SCSI_IGNORE_MEDIA_CHANGE))
goto bad3;
if ((error = scsi_start_and_wait(sc_link, 30, 0)) == EIO)
goto bad3;
sc_link->flags |= SDEV_OPEN; /* unit attn becomes an err now */
/* Lock the pack in. */
scsi_prevent(sc_link, PR_PREVENT,
SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_NOT_READY);
if ((error = scsi_start_and_wait(sc_link, 30, 0)) == EIO)
goto bad;
if ((sc_link->flags & SDEV_MEDIA_LOADED) == 0) {
sc_link->flags |= SDEV_MEDIA_LOADED;

View File

@ -1,4 +1,4 @@
/* $NetBSD: cd.c,v 1.49 1995/01/16 21:31:34 mycroft Exp $ */
/* $NetBSD: cd.c,v 1.50 1995/01/23 18:17:22 mycroft Exp $ */
/*
* Copyright (c) 1994 Charles Hannum. All rights reserved.
@ -238,15 +238,15 @@ cdopen(dev, flag, fmt)
SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_NOT_READY | SCSI_IGNORE_MEDIA_CHANGE))
goto bad3;
if ((error = scsi_start_and_wait(sc_link, 30, 0)) == EIO)
goto bad3;
sc_link->flags |= SDEV_OPEN; /* unit attn errors are now errors */
/* Lock the pack in. */
scsi_prevent(sc_link, PR_PREVENT,
SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_NOT_READY);
if ((error = scsi_start_and_wait(sc_link, 30, 0)) == EIO)
goto bad;
if ((sc_link->flags & SDEV_MEDIA_LOADED) == 0) {
sc_link->flags |= SDEV_MEDIA_LOADED;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sd.c,v 1.53 1995/01/16 21:40:17 mycroft Exp $ */
/* $NetBSD: sd.c,v 1.54 1995/01/23 18:17:24 mycroft Exp $ */
/*
* Copyright (c) 1994 Charles Hannum. All rights reserved.
@ -49,6 +49,7 @@
#include <sys/types.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/conf.h>
#include <sys/file.h>
#include <sys/stat.h>
@ -241,15 +242,15 @@ sdopen(dev, flag, fmt)
SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_NOT_READY | SCSI_IGNORE_MEDIA_CHANGE))
goto bad3;
if ((error = scsi_start_and_wait(sc_link, 30, 0)) == EIO)
goto bad3;
sc_link->flags |= SDEV_OPEN; /* unit attn becomes an err now */
/* Lock the pack in. */
scsi_prevent(sc_link, PR_PREVENT,
SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_NOT_READY);
if ((error = scsi_start_and_wait(sc_link, 30, 0)) == EIO)
goto bad;
if ((sc_link->flags & SDEV_MEDIA_LOADED) == 0) {
sc_link->flags |= SDEV_MEDIA_LOADED;