From 9c95df7455d9e3da57c563478e2b6331567ff613 Mon Sep 17 00:00:00 2001 From: se Date: Sun, 5 Jan 1997 23:10:23 +0000 Subject: Fix NetBSD pr kern/3067, which also applies to FreeBSD: NCR driver dies when "xmcd" accesses the CD-ROM drive Restrict cacheing of INQUIRY results to LUN 0. Thanks to Dave Huang for reporting the problem and suggesting a fix, though I chose a slightly different one. --- sys/pci/ncr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/pci/ncr.c b/sys/pci/ncr.c index 41de44d..0eb01b4 100644 --- a/sys/pci/ncr.c +++ b/sys/pci/ncr.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: ncr.c,v 1.90 1996/12/21 12:32:34 se Exp $ +** $Id: ncr.c,v 1.91 1996/12/23 19:12:29 bde Exp $ ** ** Device driver for the NCR 53C810 PCI-SCSI-Controller. ** @@ -1263,7 +1263,7 @@ static void ncr_attach (pcici_t tag, int unit); static char ident[] = - "\n$Id: ncr.c,v 1.90 1996/12/21 12:32:34 se Exp $\n"; + "\n$Id: ncr.c,v 1.91 1996/12/23 19:12:29 bde Exp $\n"; static const u_long ncr_version = NCR_VERSION * 11 + (u_long) sizeof (struct ncb) * 7 @@ -4215,7 +4215,7 @@ void ncr_complete (ncb_p np, ccb_p cp) /* ** On inquire cmd (0x12) save some data. */ - if (xp->cmd->opcode == 0x12) { + if (xp->cmd.opcode == 0x12 && xp->sc_link->lun == 0) { bcopy ( xp->data, &tp->inqdata, sizeof (tp->inqdata)); -- cgit v1.1