summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorse <se@FreeBSD.org>1997-01-05 23:10:23 +0000
committerse <se@FreeBSD.org>1997-01-05 23:10:23 +0000
commit9c95df7455d9e3da57c563478e2b6331567ff613 (patch)
tree982d02806cc6f8d364de20f7fce1b63f58c7f426
parent5ae941cca0023c4eac8489c791f6c82428c82338 (diff)
downloadFreeBSD-src-9c95df7455d9e3da57c563478e2b6331567ff613.zip
FreeBSD-src-9c95df7455d9e3da57c563478e2b6331567ff613.tar.gz
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 <khym@bga.com> for reporting the problem and suggesting a fix, though I chose a slightly different one.
-rw-r--r--sys/pci/ncr.c6
1 files changed, 3 insertions, 3 deletions
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));
OpenPOWER on IntegriCloud