summaryrefslogtreecommitdiffstats
path: root/sys/cam/cam_queue.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cam/cam_queue.h')
-rw-r--r--sys/cam/cam_queue.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/sys/cam/cam_queue.h b/sys/cam/cam_queue.h
index 0f74e82..33f6b1d 100644
--- a/sys/cam/cam_queue.h
+++ b/sys/cam/cam_queue.h
@@ -62,10 +62,9 @@ struct cam_ccbq {
struct ccb_hdr_tailq queue_extra_head;
int queue_extra_entries;
int total_openings;
- int devq_openings;
+ int allocated;
int dev_openings;
int dev_active;
- int held;
};
struct cam_ed;
@@ -188,8 +187,8 @@ cam_ccbq_pending_ccb_count(struct cam_ccbq *ccbq)
static __inline void
cam_ccbq_take_opening(struct cam_ccbq *ccbq)
{
- ccbq->devq_openings--;
- ccbq->held++;
+
+ ccbq->allocated++;
}
static __inline void
@@ -198,8 +197,6 @@ cam_ccbq_insert_ccb(struct cam_ccbq *ccbq, union ccb *new_ccb)
struct ccb_hdr *old_ccb;
struct camq *queue = &ccbq->queue;
- ccbq->held--;
-
/*
* If queue is already full, try to resize.
* If resize fail, push CCB with lowest priority out to the TAILQ.
@@ -264,7 +261,7 @@ cam_ccbq_send_ccb(struct cam_ccbq *ccbq, union ccb *send_ccb)
send_ccb->ccb_h.pinfo.index = CAM_ACTIVE_INDEX;
ccbq->dev_active++;
- ccbq->dev_openings--;
+ ccbq->dev_openings--;
}
static __inline void
@@ -272,15 +269,14 @@ cam_ccbq_ccb_done(struct cam_ccbq *ccbq, union ccb *done_ccb)
{
ccbq->dev_active--;
- ccbq->dev_openings++;
- ccbq->held++;
+ ccbq->dev_openings++;
}
static __inline void
cam_ccbq_release_opening(struct cam_ccbq *ccbq)
{
- ccbq->held--;
- ccbq->devq_openings++;
+
+ ccbq->allocated--;
}
#endif /* _KERNEL */
OpenPOWER on IntegriCloud