If the adapter returned XS_RESET and the xfer specifies a retry count,
attempt to reissue the command (which was destroyed by the bus reset). Slightly modified from PR #6090, from Matt Jacob.
This commit is contained in:
parent
16cf223098
commit
fe56f257b2
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: scsipi_base.c,v 1.11 1998/09/18 05:53:07 scottr Exp $ */
|
||||
/* $NetBSD: scsipi_base.c,v 1.12 1998/10/10 03:42:53 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -498,7 +498,8 @@ sc_err1(xs, async)
|
||||
}
|
||||
case XS_TIMEOUT:
|
||||
retry:
|
||||
if (xs->retries--) {
|
||||
if (xs->retries) {
|
||||
xs->retries--;
|
||||
xs->error = XS_NOERROR;
|
||||
xs->flags &= ~ITSDONE;
|
||||
return (ERESTART);
|
||||
@ -513,6 +514,15 @@ sc_err1(xs, async)
|
||||
error = EIO;
|
||||
break;
|
||||
|
||||
case XS_RESET:
|
||||
if (xs->retries) {
|
||||
SC_DEBUG(xs->sc_link, SDEV_DB3,
|
||||
("restarting command destroyed by reset\n"));
|
||||
goto retry;
|
||||
}
|
||||
error = EIO;
|
||||
break;
|
||||
|
||||
default:
|
||||
(*xs->sc_link->sc_print_addr)(xs->sc_link);
|
||||
printf("unknown error category from scsipi driver\n");
|
||||
|
Loading…
Reference in New Issue
Block a user