Bugfix: re-order buffers when they are released.

This commit is contained in:
haya 2001-09-07 11:04:35 +00:00
parent 66187ea9e9
commit c14e80bd30
1 changed files with 10 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: fwohci.c,v 1.41 2001/07/18 02:59:54 onoe Exp $ */
/* $NetBSD: fwohci.c,v 1.42 2001/09/07 11:04:35 haya Exp $ */
#define DOUBLEBUF 1
#define NO_THREAD 1
@ -1020,6 +1020,15 @@ fwohci_ctx_free(struct fwohci_softc *sc, struct fwohci_ctx *fc)
struct fwohci_buf *fb;
struct fwohci_handler *fh;
#if DOUBLEBUF
if (TAILQ_FIRST(&fc->fc_buf) > TAILQ_FIRST(&fc->fc_buf2)) {
struct fwohci_buf_s fctmp;
fctmp = fc->fc_buf;
fc->fc_buf = fc->fc_buf2;
fc->fc_buf2 = fctmp;
}
#endif
while ((fh = LIST_FIRST(&fc->fc_handler)) != NULL)
fwohci_handler_set(sc, fh->fh_tcode, fh->fh_key1, fh->fh_key2,
NULL, NULL);