got 'bad mbi comp_stat 5' during DIOCGCACHE under Parallels, according

to linux driver it's possible status when controller thinks the CCB is invalid;
handle same as BHA_MBI_ABORT/BHA_MBI_UNKNOWN i.e. just clear the CCB anyway
This commit is contained in:
jdolecek 2017-02-26 23:30:14 +00:00
parent a8699550e3
commit 60fb3e6eda
2 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: bha.c,v 1.76 2016/07/14 04:19:27 msaitoh Exp $ */
/* $NetBSD: bha.c,v 1.77 2017/02/26 23:30:14 jdolecek Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: bha.c,v 1.76 2016/07/14 04:19:27 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: bha.c,v 1.77 2017/02/26 23:30:14 jdolecek Exp $");
#include "opt_ddb.h"
@ -1574,6 +1574,7 @@ bha_finish_ccbs(struct bha_softc *sc)
case BHA_MBI_ABORT:
case BHA_MBI_UNKNOWN:
case BHA_MBI_BADCCB:
/*
* Even if the CCB wasn't found, we clear it anyway.
* See preceding comment.

View File

@ -1,4 +1,4 @@
/* $NetBSD: bhareg.h,v 1.20 2008/04/28 20:23:49 martin Exp $ */
/* $NetBSD: bhareg.h,v 1.21 2017/02/26 23:30:14 jdolecek Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -166,6 +166,7 @@ struct bha_mbx_in {
#define BHA_MBI_ABORT 0x2 /* aborted ccb */
#define BHA_MBI_UNKNOWN 0x3 /* Tried to abort invalid CCB */
#define BHA_MBI_ERROR 0x4 /* Completed with error */
#define BHA_MBI_BADCCB 0x5 /* invalid CCB */
#if defined(BIG_DMA)
WARNING...THIS WON'T WORK(won't fit on 1 page)