Adapt previous change to recent scsipi. Pointed out by Simon Burge.
This commit is contained in:
parent
f1f29c8b8d
commit
514622c61f
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sd.c,v 1.242 2005/12/08 22:14:19 bouyer Exp $ */
|
||||
/* $NetBSD: sd.c,v 1.243 2005/12/09 09:24:30 bouyer Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2003, 2004 The NetBSD Foundation, Inc.
|
||||
@ -54,7 +54,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.242 2005/12/08 22:14:19 bouyer Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.243 2005/12/09 09:24:30 bouyer Exp $");
|
||||
|
||||
#include "opt_scsi.h"
|
||||
#include "rnd.h"
|
||||
@ -1361,10 +1361,10 @@ sd_interpret_sense(struct scsipi_xfer *xs)
|
||||
* lock the door of a digicam, which doesn't have a door that
|
||||
* can be locked) for the SCSI_PREVENT_ALLOW_MEDIUM_REMOVAL command.
|
||||
*/
|
||||
if (xs->cmd.opcode == SCSI_PREVENT_ALLOW_MEDIUM_REMOVAL &&
|
||||
(sense->flags & SSD_KEY) == SKEY_ILLEGAL_REQUEST &&
|
||||
sense->add_sense_code == 0x24 &&
|
||||
sense->add_sense_code_qual == 0x00) { /* Illegal field in CDB */
|
||||
if (xs->cmd->opcode == SCSI_PREVENT_ALLOW_MEDIUM_REMOVAL &&
|
||||
SSD_SENSE_KEY(sense->flags) == SKEY_ILLEGAL_REQUEST &&
|
||||
sense->asc == 0x24 &&
|
||||
sense->ascq == 0x00) { /* Illegal field in CDB */
|
||||
scsipi_printaddr(periph);
|
||||
printf("no door lock\n");
|
||||
periph->periph_flags &= ~PERIPH_REMOVABLE;
|
||||
|
Loading…
Reference in New Issue
Block a user