diff options
author | gibbs <gibbs@FreeBSD.org> | 1999-04-07 22:57:54 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 1999-04-07 22:57:54 +0000 |
commit | e139476c732198be23f1fa3cba1c76800676123f (patch) | |
tree | ce105d288ac646b413cc30cb664116ad98a87fa9 /sys/cam | |
parent | 71072fc11358b4c222da690ee5866cc00f1a8fe3 (diff) | |
download | FreeBSD-src-e139476c732198be23f1fa3cba1c76800676123f.zip FreeBSD-src-e139476c732198be23f1fa3cba1c76800676123f.tar.gz |
Remove camq_regen(). We already perform modular comparisons
for generation counts, so no further steps to deal with generation
count wrap are required.
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/scsi/scsi_cd.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c index 209f937..d2ab42f 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: scsi_cd.c,v 1.14 1999/01/12 16:26:19 eivind Exp $ + * $Id: scsi_cd.c,v 1.15 1999/02/10 00:03:14 ken Exp $ */ /* * Portions of this driver taken from the original FreeBSD cd driver. @@ -1091,10 +1091,7 @@ cdschedule(struct cam_periph *periph, int priority) * This is strictly a fifo queue. */ softc->pinfo.priority = 1; - if (softc->changer->devq.generation++ == 0) - camq_regen(&softc->changer->devq); - softc->pinfo.generation = - softc->changer->devq.generation; + softc->pinfo.generation = ++softc->changer->devq.generation; camq_insert(&softc->changer->devq, (cam_pinfo *)softc); /* @@ -1185,11 +1182,8 @@ cdrunchangerqueue(void *arg) */ if (bufq_first(&changer->cur_device->buf_queue) != NULL) { - if (changer->devq.generation++ == 0) - camq_regen(&changer->devq); - changer->cur_device->pinfo.generation = - changer->devq.generation; + ++changer->devq.generation; camq_insert(&changer->devq, (cam_pinfo *)changer->cur_device); } @@ -1353,10 +1347,8 @@ cdgetccb(struct cam_periph *periph, u_int32_t priority) */ if (softc->pinfo.index == CAM_UNQUEUED_INDEX) { softc->pinfo.priority = 1; - if (softc->changer->devq.generation++ == 0) - camq_regen(&softc->changer->devq); softc->pinfo.generation = - softc->changer->devq.generation; + ++softc->changer->devq.generation; camq_insert(&softc->changer->devq, (cam_pinfo *)softc); } |