summaryrefslogtreecommitdiffstats
path: root/sys/cam/cam_xpt.c
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2009-09-06 19:06:50 +0000
committermav <mav@FreeBSD.org>2009-09-06 19:06:50 +0000
commitc72f8f5ba8562637ddb67724641056a0695cccbc (patch)
tree68d50f69e8f8a205a9c24748e3c41ede6be330aa /sys/cam/cam_xpt.c
parentdfd5ed3d446ef47de180761fc9814652df9f85e1 (diff)
downloadFreeBSD-src-c72f8f5ba8562637ddb67724641056a0695cccbc.zip
FreeBSD-src-c72f8f5ba8562637ddb67724641056a0695cccbc.tar.gz
MFp4:
Remove duplicate qfrozen_cnt variable from struct cam_ed. ccbq.queue.qfrozen_cnt should be used instead.
Diffstat (limited to 'sys/cam/cam_xpt.c')
-rw-r--r--sys/cam/cam_xpt.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c
index 15353e64..b506481 100644
--- a/sys/cam/cam_xpt.c
+++ b/sys/cam/cam_xpt.c
@@ -2472,7 +2472,7 @@ xpt_action_default(union ccb *start_ccb)
path = start_ccb->ccb_h.path;
cam_ccbq_insert_ccb(&path->device->ccbq, start_ccb);
- if (path->device->qfrozen_cnt == 0)
+ if (path->device->ccbq.queue.qfrozen_cnt == 0)
runq = xpt_schedule_dev_sendq(path->bus, path->device);
else
runq = 0;
@@ -2931,7 +2931,7 @@ xpt_action_default(union ccb *start_ccb)
xpt_release_devq(crs->ccb_h.path, /*count*/1,
/*run_queue*/TRUE);
}
- start_ccb->crs.qfrozen_cnt = dev->qfrozen_cnt;
+ start_ccb->crs.qfrozen_cnt = dev->ccbq.queue.qfrozen_cnt;
start_ccb->ccb_h.status = CAM_REQ_CMP;
break;
}
@@ -3227,7 +3227,7 @@ xpt_run_dev_sendq(struct cam_eb *bus)
* If the device has been "frozen", don't attempt
* to run it.
*/
- if (device->qfrozen_cnt > 0) {
+ if (device->ccbq.queue.qfrozen_cnt > 0) {
continue;
}
@@ -3250,7 +3250,7 @@ xpt_run_dev_sendq(struct cam_eb *bus)
* the device queue until we have a slot
* available.
*/
- device->qfrozen_cnt++;
+ device->ccbq.queue.qfrozen_cnt++;
STAILQ_INSERT_TAIL(&xsoftc.highpowerq,
&work_ccb->ccb_h,
xpt_links.stqe);
@@ -3282,7 +3282,7 @@ xpt_run_dev_sendq(struct cam_eb *bus)
* The client wants to freeze the queue
* after this CCB is sent.
*/
- device->qfrozen_cnt++;
+ device->ccbq.queue.qfrozen_cnt++;
}
/* In Target mode, the peripheral driver knows best... */
@@ -4031,7 +4031,7 @@ xpt_freeze_devq(struct cam_path *path, u_int count)
mtx_assert(path->bus->sim->mtx, MA_OWNED);
- path->device->qfrozen_cnt += count;
+ path->device->ccbq.queue.qfrozen_cnt += count;
/*
* Mark the last CCB in the queue as needing
@@ -4049,7 +4049,7 @@ xpt_freeze_devq(struct cam_path *path, u_int count)
ccbh = TAILQ_LAST(&path->device->ccbq.active_ccbs, ccb_hdr_tailq);
if (ccbh && ccbh->status == CAM_REQ_INPROG)
ccbh->status = CAM_REQUEUE_REQ;
- return (path->device->qfrozen_cnt);
+ return (path->device->ccbq.queue.qfrozen_cnt);
}
u_int32_t
@@ -4093,11 +4093,12 @@ xpt_release_devq_device(struct cam_ed *dev, u_int count, int run_queue)
int rundevq;
rundevq = 0;
- if (dev->qfrozen_cnt > 0) {
+ if (dev->ccbq.queue.qfrozen_cnt > 0) {
- count = (count > dev->qfrozen_cnt) ? dev->qfrozen_cnt : count;
- dev->qfrozen_cnt -= count;
- if (dev->qfrozen_cnt == 0) {
+ count = (count > dev->ccbq.queue.qfrozen_cnt) ?
+ dev->ccbq.queue.qfrozen_cnt : count;
+ dev->ccbq.queue.qfrozen_cnt -= count;
+ if (dev->ccbq.queue.qfrozen_cnt == 0) {
/*
* No longer need to wait for a successful
@@ -4402,7 +4403,6 @@ xpt_alloc_device(struct cam_eb *bus, struct cam_et *target, lun_id_t lun_id)
SLIST_INIT(&device->periphs);
device->generation = 0;
device->owner = NULL;
- device->qfrozen_cnt = 0;
device->flags = CAM_DEV_UNCONFIGURED;
device->tag_delay_count = 0;
device->tag_saved_openings = 0;
@@ -4971,7 +4971,7 @@ camisr_runqueue(void *V_queue)
xpt_start_tags(ccb_h->path);
if ((dev->ccbq.queue.entries > 0)
- && (dev->qfrozen_cnt == 0)
+ && (dev->ccbq.queue.qfrozen_cnt == 0)
&& (device_is_send_queued(dev) == 0)) {
runq = xpt_schedule_dev_sendq(ccb_h->path->bus,
dev);
OpenPOWER on IntegriCloud