From 0c4930f5255b198ff997e915f4e0c42d6bfd5754 Mon Sep 17 00:00:00 2001 From: "Justin T. Gibbs" Date: Sun, 20 Sep 1998 07:17:11 +0000 Subject: [PATCH] Don't invalidate devices due to unexpected unit attention errors. In a perfect world, we'd notice the UA and do some device validation to ensure that the device hasn't changed. We may get this before the year ends, but not before 3.0R. This change gives the adminstrator ample ammunition to take off a foot or two, but hey this *is* UN*X. --- sys/cam/scsi/scsi_cd.c | 8 +++++++- sys/cam/scsi/scsi_da.c | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c index 19a0e342da4..4a0ece77f95 100644 --- a/sys/cam/scsi/scsi_cd.c +++ b/sys/cam/scsi/scsi_cd.c @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: scsi_cd.c,v 1.1 1998/09/15 06:36:34 gibbs Exp $ */ /* * Portions of this driver taken from the original FreeBSD cd driver. @@ -2547,6 +2547,12 @@ cderror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags) periph = xpt_path_periph(ccb->ccb_h.path); softc = (struct cd_softc *)periph->softc; + /* + * XXX + * Until we have a better way of doing pack validation, + * don't treat UAs as errors. + */ + sense_flags |= SF_RETRY_UA; return (cam_periph_error(ccb, cam_flags, sense_flags, &softc->saved_ccb)); } diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index cccb317a028..3f3cd0f4380 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: scsi_da.c,v 1.3 1998/09/18 22:33:59 ken Exp $ + * $Id: scsi_da.c,v 1.4 1998/09/19 04:59:35 gibbs Exp $ */ #include @@ -1281,6 +1281,12 @@ daerror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags) periph = xpt_path_periph(ccb->ccb_h.path); softc = (struct da_softc *)periph->softc; + /* + * XXX + * Until we have a better way of doing pack validation, + * don't treat UAs as errors. + */ + sense_flags |= SF_RETRY_UA; return(cam_periph_error(ccb, cam_flags, sense_flags, &softc->saved_ccb)); }