diff options
| author | Andreas Schulz <ats@FreeBSD.org> | 1994-03-05 21:41:51 +0000 |
|---|---|---|
| committer | Andreas Schulz <ats@FreeBSD.org> | 1994-03-05 21:41:51 +0000 |
| commit | 563ac84861110c3f6c6ca5c4657eee6e13f2ceb6 (patch) | |
| tree | e673ae932e794f80b22a46f27c3b27c26d3e2134 /sys | |
| parent | 21eb6c6e63ab44c5e615cdc8e283a0d359e61efa (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/dev/mcd/mcd.c | 9 | ||||
| -rw-r--r-- | sys/i386/isa/mcd.c | 9 |
2 files changed, 14 insertions, 4 deletions
diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c index b333d685d3c84..db52bca7d9767 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.10 1994/02/22 08:44:28 rgrimes Exp $ + * $Id: mcd.c,v 1.11 1994/03/05 03:54:19 jkh Exp $ */ static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; @@ -604,7 +604,12 @@ mcd_probe(struct isa_device *dev) return 0; /* Timeout */ } status = inb(port+MCD_DATA); - if (status != MCDEXISTS) +/* 0x20 == empty drive */ +/* 0x30 == MCDEXISTS == drive closed with CDROM inserted */ +/* 0x80 == drive pulled out but door closed */ +/* 0xa0 == drive pulled out and door open */ + if (status != 0x20 && status != MCDEXISTS && status != 0x80 && + status != 0xa0) return 0; /* Not actually a Mitsumi drive here */ /* Get version information */ outb(port+MCD_DATA, MCD_CMDCONTINFO); diff --git a/sys/i386/isa/mcd.c b/sys/i386/isa/mcd.c index b333d685d3c84..db52bca7d9767 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.10 1994/02/22 08:44:28 rgrimes Exp $ + * $Id: mcd.c,v 1.11 1994/03/05 03:54:19 jkh Exp $ */ static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; @@ -604,7 +604,12 @@ mcd_probe(struct isa_device *dev) return 0; /* Timeout */ } status = inb(port+MCD_DATA); - if (status != MCDEXISTS) +/* 0x20 == empty drive */ +/* 0x30 == MCDEXISTS == drive closed with CDROM inserted */ +/* 0x80 == drive pulled out but door closed */ +/* 0xa0 == drive pulled out and door open */ + if (status != 0x20 && status != MCDEXISTS && status != 0x80 && + status != 0xa0) return 0; /* Not actually a Mitsumi drive here */ /* Get version information */ outb(port+MCD_DATA, MCD_CMDCONTINFO); |
