diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2011-04-05 15:28:50 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2011-04-05 15:28:50 +0000 |
commit | c0f55b3c1cc3adf0af8492b86177020dc365cbc3 (patch) | |
tree | 0611154886e0e93465bb866e2b9726e3a5713abb | |
parent | 9224c06588d88e1bc9625a32b071d45267ea39bc (diff) |
provide VSCSI_STAT_RESET so userland can tell us that the connection to
the device was reset rather than blindly fail it.
requested by claudio@
-rw-r--r-- | sys/dev/vscsi.c | 5 | ||||
-rw-r--r-- | sys/dev/vscsivar.h | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/vscsi.c b/sys/dev/vscsi.c index c5444f55396..30fa71931cf 100644 --- a/sys/dev/vscsi.c +++ b/sys/dev/vscsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vscsi.c,v 1.21 2010/09/25 00:31:31 dlg Exp $ */ +/* $OpenBSD: vscsi.c,v 1.22 2011/04/05 15:28:49 dlg Exp $ */ /* * Copyright (c) 2008 David Gwynne <dlg@openbsd.org> @@ -456,6 +456,9 @@ vscsi_t2i(struct vscsi_softc *sc, struct vscsi_ioc_t2i *t2i) xs->error = XS_SENSE; bcopy(&t2i->sense, &xs->sense, sizeof(xs->sense)); break; + case VSCSI_STAT_RESET: + xs->error = XS_RESET; + break; case VSCSI_STAT_ERR: default: xs->error = XS_DRIVER_STUFFUP; diff --git a/sys/dev/vscsivar.h b/sys/dev/vscsivar.h index dd704f917b0..5fef5be5add 100644 --- a/sys/dev/vscsivar.h +++ b/sys/dev/vscsivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vscsivar.h,v 1.4 2011/01/07 02:21:51 dlg Exp $ */ +/* $OpenBSD: vscsivar.h,v 1.5 2011/04/05 15:28:49 dlg Exp $ */ /* * Copyright (c) 2008 David Gwynne <dlg@openbsd.org> @@ -53,7 +53,8 @@ struct vscsi_ioc_t2i { int status; #define VSCSI_STAT_DONE 0 #define VSCSI_STAT_SENSE 1 -#define VSCSI_STAT_ERR 2 +#define VSCSI_STAT_RESET 2 +#define VSCSI_STAT_ERR 3 struct scsi_sense_data sense; }; |