From 53f311f0a2377ae5c0ea5e5b12740159f611d639 Mon Sep 17 00:00:00 2001 From: jkh Date: Sat, 5 Mar 1994 03:54:19 +0000 Subject: [PATCH] This should stop the false probes in their slimey little tracks. --- sys/dev/mcd/mcd.c | 7 +++++-- sys/i386/isa/mcd.c | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c index 141cb0e61786..b333d685d3c8 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.9 1994/02/07 15:46:22 davidg Exp $ + * $Id: mcd.c,v 1.10 1994/02/22 08:44:28 rgrimes Exp $ */ static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; @@ -99,6 +99,8 @@ static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; #define MCDDSKIN MCD_ST_DSKIN /* sensed disk in drive */ #define MCDDOOROPEN MCD_ST_DOOROPEN /* sensed door open */ +#define MCDEXISTS 0x0030 /* A real Mitsumi drive */ + /* toc */ #define MCD_MAXTOCS 104 /* from the Linux driver */ #define MCD_LASTPLUS1 170 /* special toc entry */ @@ -602,7 +604,8 @@ mcd_probe(struct isa_device *dev) return 0; /* Timeout */ } status = inb(port+MCD_DATA); - + if (status != MCDEXISTS) + return 0; /* Not actually a Mitsumi drive here */ /* Get version information */ outb(port+MCD_DATA, MCD_CMDCONTINFO); for (j = 0; j < 3; j++) { diff --git a/sys/i386/isa/mcd.c b/sys/i386/isa/mcd.c index 141cb0e61786..b333d685d3c8 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.9 1994/02/07 15:46:22 davidg Exp $ + * $Id: mcd.c,v 1.10 1994/02/22 08:44:28 rgrimes Exp $ */ static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; @@ -99,6 +99,8 @@ static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; #define MCDDSKIN MCD_ST_DSKIN /* sensed disk in drive */ #define MCDDOOROPEN MCD_ST_DOOROPEN /* sensed door open */ +#define MCDEXISTS 0x0030 /* A real Mitsumi drive */ + /* toc */ #define MCD_MAXTOCS 104 /* from the Linux driver */ #define MCD_LASTPLUS1 170 /* special toc entry */ @@ -602,7 +604,8 @@ mcd_probe(struct isa_device *dev) return 0; /* Timeout */ } status = inb(port+MCD_DATA); - + if (status != MCDEXISTS) + return 0; /* Not actually a Mitsumi drive here */ /* Get version information */ outb(port+MCD_DATA, MCD_CMDCONTINFO); for (j = 0; j < 3; j++) {