svn commit: r248897 - projects/camlock/sys/cam
Alexander Motin
mav at FreeBSD.org
Fri Mar 29 17:22:00 UTC 2013
Author: mav
Date: Fri Mar 29 17:21:59 2013
New Revision: 248897
URL: http://svnweb.freebsd.org/changeset/base/248897
Log:
Make request allocation code always permit immediate allocation for requests
with priority >= CAM_PRIORITY_OOB (special cases). Assume that caller knows
what it does and why and will not send more then request at a time, needed
for single-stepping error recovery.
Modified:
projects/camlock/sys/cam/cam.h
projects/camlock/sys/cam/cam_xpt.c
Modified: projects/camlock/sys/cam/cam.h
==============================================================================
--- projects/camlock/sys/cam/cam.h Fri Mar 29 16:26:25 2013 (r248896)
+++ projects/camlock/sys/cam/cam.h Fri Mar 29 17:21:59 2013 (r248897)
@@ -80,6 +80,7 @@ typedef struct {
#define CAM_PRIORITY_BUS ((CAM_RL_BUS << 8) + 0x80)
#define CAM_PRIORITY_XPT ((CAM_RL_XPT << 8) + 0x80)
#define CAM_PRIORITY_DEV ((CAM_RL_DEV << 8) + 0x80)
+#define CAM_PRIORITY_OOB (CAM_RL_DEV << 8)
#define CAM_PRIORITY_NORMAL ((CAM_RL_NORMAL << 8) + 0x80)
#define CAM_PRIORITY_NONE (u_int32_t)-1
#define CAM_PRIORITY_TO_RL(x) ((x) >> 8)
Modified: projects/camlock/sys/cam/cam_xpt.c
==============================================================================
--- projects/camlock/sys/cam/cam_xpt.c Fri Mar 29 16:26:25 2013 (r248896)
+++ projects/camlock/sys/cam/cam_xpt.c Fri Mar 29 17:21:59 2013 (r248897)
@@ -3179,7 +3179,8 @@ xpt_run_dev_allocq(struct cam_ed *device
CAM_DEBUG_PRINT(CAM_DEBUG_XPT, ("xpt_run_dev_allocq(%p)\n", device));
drvq = &device->drvq;
while ((drvq->entries > 0) &&
- (device->ccbq.devq_openings > 0) &&
+ (device->ccbq.devq_openings > 0 ||
+ CAMQ_GET_PRIO(drvq) >= CAM_PRIORITY_OOB) &&
(cam_ccbq_frozen(&device->ccbq, CAM_PRIORITY_TO_RL(
CAMQ_GET_PRIO(drvq))) == 0)) {
union ccb *work_ccb;
More information about the svn-src-projects
mailing list