Implement a function to kill off all commands pending for a given
scsipi_link.
This commit is contained in:
parent
5116cf4fa5
commit
e8dded5513
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: scsipi_base.c,v 1.22 1999/06/16 07:35:31 pk Exp $ */
|
||||
/* $NetBSD: scsipi_base.c,v 1.23 1999/09/11 21:39:53 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -187,6 +187,24 @@ scsipi_wait_drain(sc_link)
|
||||
splx(s);
|
||||
}
|
||||
|
||||
/*
|
||||
* Kill off all pending xfers for a scsipi_link.
|
||||
*
|
||||
* Must be called at splbio().
|
||||
*/
|
||||
void
|
||||
scsipi_kill_pending(sc_link)
|
||||
struct scsipi_link *sc_link;
|
||||
{
|
||||
struct scsipi_xfer *xs;
|
||||
|
||||
while ((xs = TAILQ_FIRST(&sc_link->pending_xfers)) != NULL) {
|
||||
xs->flags |= ITSDONE;
|
||||
xs->error = ENODEV;
|
||||
scsipi_done(xs);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Look at the returned sense and act on the error, determining
|
||||
* the unix error number to pass back. (0 = report no error)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: scsipiconf.h,v 1.30 1999/04/08 11:29:01 bouyer Exp $ */
|
||||
/* $NetBSD: scsipiconf.h,v 1.31 1999/09/11 21:39:53 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -393,6 +393,7 @@ void scsipi_done __P((struct scsipi_xfer *));
|
||||
void scsipi_user_done __P((struct scsipi_xfer *));
|
||||
int scsipi_interpret_sense __P((struct scsipi_xfer *));
|
||||
void scsipi_wait_drain __P((struct scsipi_link *));
|
||||
void scsipi_kill_pending __P((struct scsipi_link *));
|
||||
#ifdef SCSIVERBOSE
|
||||
void scsipi_print_sense __P((struct scsipi_xfer *, int));
|
||||
void scsipi_print_sense_data __P((struct scsipi_sense_data *, int));
|
||||
|
Loading…
Reference in New Issue
Block a user