Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jan 2000 10:36:48 +0000 (GMT)
From:      Nick Hibma <n_hibma@webweaving.org>
To:        FreeBSD SCSI Mailing List <scsi@FreeBSD.org>
Subject:   bug in cam_periph.c
Message-ID:  <Pine.BSF.4.20.0001241034510.382-100000@localhost>

next in thread | raw e-mail | index | archive | help

the following diff code does not make sense to me. first check for a
retry count larger than zero and return EIO when it is. I guess that
this piee of code has not been exercised very much, because changing it
did not make a difference for the SCSI devices I have here.


                        } else if (ccb->ccb_h.retry_count > 0) {
                                /*
                                 * XXX KDM shouldn't there be a better
                                 * argument to return??
                                 */
                                error = EIO;
                        } else {
                                /* decrement the number of retries */
                                retry = ccb->ccb_h.retry_count > 0;
                                if (retry)
                                        ccb->ccb_h.retry_count--;
                                /*
                                 * If it was aborted with no
                                 * clue as to the reason, just
                                 * retry it again.
                                 */
                                error = ERESTART;
                        }




Patch below:

--- cam_periph.c.orig   Mon Jan 24 10:34:23 2000
+++ cam_periph.c        Mon Jan 24 10:34:27 2000
@@ -1439,7 +1439,7 @@
                                      "CAM_AUTOSENSE_FAILED");
                                /* NOTREACHED */
                                error = EIO;
-                       } else if (ccb->ccb_h.retry_count > 0) {
+                       } else if (ccb->ccb_h.retry_count == 0) {
                                /*
                                 * XXX KDM shouldn't there be a better
                                 * argument to return??

--
n_hibma@webweaving.org
n_hibma@freebsd.org                                          USB project
http://www.etla.net/~n_hibma/



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.20.0001241034510.382-100000>