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.
This commit is contained in:
parent
14acc8410d
commit
4fe8838383
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user