svn commit: r249014 - projects/camlock/sys/cam
Alexander Motin
mav at FreeBSD.org
Tue Apr 2 10:05:31 UTC 2013
Author: mav
Date: Tue Apr 2 10:05:30 2013
New Revision: 249014
URL: http://svnweb.freebsd.org/changeset/base/249014
Log:
- Drop alloc_ccb_entry field, unused since r248890.
- Rename send_ccb_entry field to devq_entry.
Modified:
projects/camlock/sys/cam/cam_xpt.c
projects/camlock/sys/cam/cam_xpt_internal.h
Modified: projects/camlock/sys/cam/cam_xpt.c
==============================================================================
--- projects/camlock/sys/cam/cam_xpt.c Tue Apr 2 09:51:36 2013 (r249013)
+++ projects/camlock/sys/cam/cam_xpt.c Tue Apr 2 10:05:30 2013 (r249014)
@@ -296,8 +296,7 @@ static xpt_busfunc_t xptsetasyncbusfunc;
static cam_status xptregister(struct cam_periph *periph,
void *arg);
static __inline int periph_is_queued(struct cam_periph *periph);
-static __inline int device_is_alloc_queued(struct cam_ed *device);
-static __inline int device_is_send_queued(struct cam_ed *device);
+static __inline int device_is_queued(struct cam_ed *device);
static __inline int
xpt_schedule_devq(struct cam_devq *devq, struct cam_ed *dev)
@@ -314,7 +313,7 @@ xpt_schedule_devq(struct cam_devq *devq,
*/
retval =
xpt_schedule_dev(&devq->send_queue,
- &dev->send_ccb_entry.pinfo,
+ &dev->devq_entry.pinfo,
CAMQ_GET_PRIO(&dev->ccbq.queue));
} else {
retval = 0;
@@ -329,15 +328,9 @@ periph_is_queued(struct cam_periph *peri
}
static __inline int
-device_is_alloc_queued(struct cam_ed *device)
+device_is_queued(struct cam_ed *device)
{
- return (device->alloc_ccb_entry.pinfo.index != CAM_UNQUEUED_INDEX);
-}
-
-static __inline int
-device_is_send_queued(struct cam_ed *device)
-{
- return (device->send_ccb_entry.pinfo.index != CAM_UNQUEUED_INDEX);
+ return (device->devq_entry.pinfo.index != CAM_UNQUEUED_INDEX);
}
static void
@@ -4112,9 +4105,9 @@ xpt_freeze_devq(struct cam_path *path, u
mtx_assert(path->bus->sim->mtx, MA_OWNED);
dev->ccbq.queue.qfrozen_cnt += count;
/* Remove frozen device from sendq. */
- if (device_is_send_queued(dev)) {
+ if (device_is_queued(dev)) {
camq_remove(&dev->sim->devq->send_queue,
- dev->send_ccb_entry.pinfo.index);
+ dev->devq_entry.pinfo.index);
}
return (dev->ccbq.queue.qfrozen_cnt);
}
@@ -4458,10 +4451,8 @@ xpt_alloc_device(struct cam_eb *bus, str
}
if (device != NULL) {
- cam_init_pinfo(&device->alloc_ccb_entry.pinfo);
- device->alloc_ccb_entry.device = device;
- cam_init_pinfo(&device->send_ccb_entry.pinfo);
- device->send_ccb_entry.device = device;
+ cam_init_pinfo(&device->devq_entry.pinfo);
+ device->devq_entry.device = device;
device->target = target;
device->lun_id = lun_id;
device->sim = bus->sim;
@@ -4509,8 +4500,7 @@ xpt_release_device(struct cam_ed *device
if (device->refcount == 1) {
struct cam_devq *devq;
- if (device->alloc_ccb_entry.pinfo.index != CAM_UNQUEUED_INDEX
- || device->send_ccb_entry.pinfo.index != CAM_UNQUEUED_INDEX)
+ if (device->devq_entry.pinfo.index != CAM_UNQUEUED_INDEX)
panic("Removing device while still queued for ccbs");
if ((device->flags & CAM_DEV_REL_TIMEOUT_PENDING) != 0)
@@ -4982,7 +4972,7 @@ camisr_runqueue(struct cam_sim *sim)
if ((dev->flags & CAM_DEV_TAG_AFTER_COUNT) != 0
&& (--dev->tag_delay_count == 0))
xpt_start_tags(ccb_h->path);
- if (!device_is_send_queued(dev)) {
+ if (!device_is_queued(dev)) {
(void)xpt_schedule_devq(sim->devq, dev);
}
}
Modified: projects/camlock/sys/cam/cam_xpt_internal.h
==============================================================================
--- projects/camlock/sys/cam/cam_xpt_internal.h Tue Apr 2 09:51:36 2013 (r249013)
+++ projects/camlock/sys/cam/cam_xpt_internal.h Tue Apr 2 10:05:30 2013 (r249014)
@@ -71,8 +71,7 @@ struct cam_ed_qinfo {
*/
struct cam_ed {
TAILQ_ENTRY(cam_ed) links;
- struct cam_ed_qinfo alloc_ccb_entry;
- struct cam_ed_qinfo send_ccb_entry;
+ struct cam_ed_qinfo devq_entry;
struct cam_et *target;
struct cam_sim *sim;
lun_id_t lun_id;
More information about the svn-src-projects
mailing list