MFC r198382, r198385:
Replace most of priority numbers with defines. No logical changes.
This commit is contained in:
parent
01007372f2
commit
4956ef3a42
@ -270,7 +270,7 @@ adaclose(struct disk *dp)
|
||||
/* We only sync the cache if the drive is capable of it. */
|
||||
if (softc->flags & ADA_FLAG_CAN_FLUSHCACHE) {
|
||||
|
||||
ccb = cam_periph_getccb(periph, /*priority*/1);
|
||||
ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
|
||||
cam_fill_ataio(&ccb->ataio,
|
||||
1,
|
||||
adadone,
|
||||
@ -343,7 +343,7 @@ adastrategy(struct bio *bp)
|
||||
/*
|
||||
* Schedule ourselves for performing the work.
|
||||
*/
|
||||
xpt_schedule(periph, /* XXX priority */1);
|
||||
xpt_schedule(periph, CAM_PRIORITY_NORMAL);
|
||||
cam_periph_unlock(periph);
|
||||
|
||||
return;
|
||||
@ -377,7 +377,7 @@ adadump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t len
|
||||
|
||||
if (length > 0) {
|
||||
periph->flags |= CAM_PERIPH_POLLED;
|
||||
xpt_setup_ccb(&ccb.ccb_h, periph->path, /*priority*/1);
|
||||
xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
|
||||
ccb.ccb_h.ccb_state = ADA_CCB_DUMP;
|
||||
cam_fill_ataio(&ccb.ataio,
|
||||
0,
|
||||
@ -408,7 +408,7 @@ adadump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t len
|
||||
}
|
||||
|
||||
if (softc->flags & ADA_FLAG_CAN_FLUSHCACHE) {
|
||||
xpt_setup_ccb(&ccb.ccb_h, periph->path, /*priority*/1);
|
||||
xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
|
||||
|
||||
ccb.ccb_h.ccb_state = ADA_CCB_DUMP;
|
||||
cam_fill_ataio(&ccb.ataio,
|
||||
@ -563,7 +563,7 @@ adaasync(void *callback_arg, u_int32_t code,
|
||||
*/
|
||||
softc->state = ADA_STATE_SET_MULTI;
|
||||
cam_periph_acquire(periph);
|
||||
xpt_schedule(periph, 0);
|
||||
xpt_schedule(periph, CAM_PRIORITY_DEV);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -665,7 +665,7 @@ adaregister(struct cam_periph *periph, void *arg)
|
||||
|
||||
/* Check if the SIM does not want queued commands */
|
||||
bzero(&cpi, sizeof(cpi));
|
||||
xpt_setup_ccb(&cpi.ccb_h, periph->path, /*priority*/1);
|
||||
xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
|
||||
cpi.ccb_h.func_code = XPT_PATH_INQ;
|
||||
xpt_action((union ccb *)&cpi);
|
||||
if (cpi.ccb_h.status != CAM_REQ_CMP ||
|
||||
@ -897,7 +897,7 @@ adastart(struct cam_periph *periph, union ccb *start_ccb)
|
||||
|
||||
if (bp != NULL) {
|
||||
/* Have more work to do, so ensure we stay scheduled */
|
||||
xpt_schedule(periph, /* XXX priority */1);
|
||||
xpt_schedule(periph, CAM_PRIORITY_NORMAL);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1027,7 +1027,7 @@ adadone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
xpt_release_ccb(done_ccb);
|
||||
if (bioq_first(&softc->bio_queue) != NULL) {
|
||||
/* Have more work to do, so ensure we stay scheduled */
|
||||
xpt_schedule(periph, 1);
|
||||
xpt_schedule(periph, CAM_PRIORITY_NORMAL);
|
||||
}
|
||||
cam_periph_release_locked(periph);
|
||||
return;
|
||||
@ -1139,7 +1139,7 @@ adashutdown(void * arg, int howto)
|
||||
continue;
|
||||
}
|
||||
|
||||
xpt_setup_ccb(&ccb.ccb_h, periph->path, /*priority*/1);
|
||||
xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
|
||||
|
||||
ccb.ccb_h.ccb_state = ADA_CCB_DUMP;
|
||||
cam_fill_ataio(&ccb.ataio,
|
||||
|
@ -270,7 +270,7 @@ probeschedule(struct cam_periph *periph)
|
||||
softc = (probe_softc *)periph->softc;
|
||||
ccb = (union ccb *)TAILQ_FIRST(&softc->request_ccbs);
|
||||
|
||||
xpt_setup_ccb(&cpi.ccb_h, periph->path, /*priority*/1);
|
||||
xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
|
||||
cpi.ccb_h.func_code = XPT_PATH_INQ;
|
||||
xpt_action((union ccb *)&cpi);
|
||||
|
||||
@ -506,7 +506,7 @@ proberequestdefaultnegotiation(struct cam_periph *periph)
|
||||
{
|
||||
struct ccb_trans_settings cts;
|
||||
|
||||
xpt_setup_ccb(&cts.ccb_h, periph->path, /*priority*/1);
|
||||
xpt_setup_ccb(&cts.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
|
||||
cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
|
||||
cts.type = CTS_TYPE_USER_SETTINGS;
|
||||
xpt_action((union ccb *)&cts);
|
||||
@ -528,7 +528,7 @@ proberequestbackoff(struct cam_periph *periph, struct cam_ed *device)
|
||||
struct ccb_trans_settings_spi *spi;
|
||||
|
||||
memset(&cts, 0, sizeof (cts));
|
||||
xpt_setup_ccb(&cts.ccb_h, periph->path, /*priority*/1);
|
||||
xpt_setup_ccb(&cts.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
|
||||
cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
|
||||
cts.type = CTS_TYPE_CURRENT_SETTINGS;
|
||||
xpt_action((union ccb *)&cts);
|
||||
@ -655,7 +655,7 @@ probedone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
|
||||
/* Report SIM that PM is present. */
|
||||
bzero(&cts, sizeof(cts));
|
||||
xpt_setup_ccb(&cts.ccb_h, path, 1);
|
||||
xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
|
||||
cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS;
|
||||
cts.type = CTS_TYPE_CURRENT_SETTINGS;
|
||||
cts.xport_specific.sata.pm_present = 1;
|
||||
@ -1270,7 +1270,7 @@ ata_scan_lun(struct cam_periph *periph, struct cam_path *path,
|
||||
CAM_DEBUG(request_ccb->ccb_h.path, CAM_DEBUG_TRACE,
|
||||
("xpt_scan_lun\n"));
|
||||
|
||||
xpt_setup_ccb(&cpi.ccb_h, path, /*priority*/1);
|
||||
xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL);
|
||||
cpi.ccb_h.func_code = XPT_PATH_INQ;
|
||||
xpt_action((union ccb *)&cpi);
|
||||
|
||||
@ -1308,7 +1308,7 @@ ata_scan_lun(struct cam_periph *periph, struct cam_path *path,
|
||||
free(new_path, M_CAMXPT);
|
||||
return;
|
||||
}
|
||||
xpt_setup_ccb(&request_ccb->ccb_h, new_path, /*priority*/ 1);
|
||||
xpt_setup_ccb(&request_ccb->ccb_h, new_path, CAM_PRIORITY_NORMAL);
|
||||
request_ccb->ccb_h.cbfcnp = xptscandone;
|
||||
request_ccb->ccb_h.func_code = XPT_SCAN_LUN;
|
||||
request_ccb->crcn.flags = flags;
|
||||
@ -1407,7 +1407,7 @@ ata_device_transport(struct cam_path *path)
|
||||
struct ata_params *ident_buf = NULL;
|
||||
|
||||
/* Get transport information from the SIM */
|
||||
xpt_setup_ccb(&cpi.ccb_h, path, /*priority*/1);
|
||||
xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL);
|
||||
cpi.ccb_h.func_code = XPT_PATH_INQ;
|
||||
xpt_action((union ccb *)&cpi);
|
||||
|
||||
@ -1427,7 +1427,7 @@ ata_device_transport(struct cam_path *path)
|
||||
ata_version(ident_buf->version_major) : cpi.transport_version;
|
||||
|
||||
/* Tell the controller what we think */
|
||||
xpt_setup_ccb(&cts.ccb_h, path, /*priority*/1);
|
||||
xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
|
||||
cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS;
|
||||
cts.type = CTS_TYPE_CURRENT_SETTINGS;
|
||||
cts.transport = path->device->transport;
|
||||
@ -1555,7 +1555,7 @@ scsi_set_transfer_settings(struct ccb_trans_settings *cts, struct cam_ed *device
|
||||
|
||||
inq_data = &device->inq_data;
|
||||
scsi = &cts->proto_specific.scsi;
|
||||
xpt_setup_ccb(&cpi.ccb_h, cts->ccb_h.path, /*priority*/1);
|
||||
xpt_setup_ccb(&cpi.ccb_h, cts->ccb_h.path, CAM_PRIORITY_NORMAL);
|
||||
cpi.ccb_h.func_code = XPT_PATH_INQ;
|
||||
xpt_action((union ccb *)&cpi);
|
||||
|
||||
@ -1576,7 +1576,7 @@ scsi_set_transfer_settings(struct ccb_trans_settings *cts, struct cam_ed *device
|
||||
* Perform sanity checking against what the
|
||||
* controller and device can do.
|
||||
*/
|
||||
xpt_setup_ccb(&cur_cts.ccb_h, cts->ccb_h.path, /*priority*/1);
|
||||
xpt_setup_ccb(&cur_cts.ccb_h, cts->ccb_h.path, CAM_PRIORITY_NORMAL);
|
||||
cur_cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
|
||||
cur_cts.type = cts->type;
|
||||
xpt_action((union ccb *)&cur_cts);
|
||||
@ -1636,7 +1636,7 @@ scsi_set_transfer_settings(struct ccb_trans_settings *cts, struct cam_ed *device
|
||||
device->tag_delay_count = 0;
|
||||
|
||||
xpt_setup_ccb(&crs.ccb_h, cts->ccb_h.path,
|
||||
/*priority*/1);
|
||||
CAM_PRIORITY_NORMAL);
|
||||
crs.ccb_h.func_code = XPT_REL_SIMQ;
|
||||
crs.release_flags = RELSIM_RELEASE_AFTER_QEMPTY;
|
||||
crs.openings
|
||||
@ -1669,7 +1669,7 @@ scsi_toggle_tags(struct cam_path *path)
|
||||
&& (dev->inq_flags & (SID_Sync|SID_WBus16|SID_WBus32)) != 0)) {
|
||||
struct ccb_trans_settings cts;
|
||||
|
||||
xpt_setup_ccb(&cts.ccb_h, path, 1);
|
||||
xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
|
||||
cts.protocol = PROTO_SCSI;
|
||||
cts.protocol_version = PROTO_VERSION_UNSPECIFIED;
|
||||
cts.transport = XPORT_UNSPECIFIED;
|
||||
|
@ -66,6 +66,8 @@ struct cam_periph;
|
||||
*/
|
||||
typedef struct {
|
||||
u_int32_t priority;
|
||||
#define CAM_PRIORITY_DEV 0
|
||||
#define CAM_PRIORITY_NORMAL 1
|
||||
#define CAM_PRIORITY_NONE (u_int32_t)-1
|
||||
u_int32_t generation;
|
||||
int index;
|
||||
|
@ -534,13 +534,13 @@ camperiphfree(struct cam_periph *periph)
|
||||
switch (periph->deferred_ac) {
|
||||
case AC_FOUND_DEVICE:
|
||||
ccb.ccb_h.func_code = XPT_GDEV_TYPE;
|
||||
xpt_setup_ccb(&ccb.ccb_h, periph->path, /*priority*/ 1);
|
||||
xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
|
||||
xpt_action(&ccb);
|
||||
arg = &ccb;
|
||||
break;
|
||||
case AC_PATH_REGISTERED:
|
||||
ccb.ccb_h.func_code = XPT_PATH_INQ;
|
||||
xpt_setup_ccb(&ccb.ccb_h, periph->path, /*priority*/ 1);
|
||||
xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
|
||||
xpt_action(&ccb);
|
||||
arg = &ccb;
|
||||
break;
|
||||
@ -831,10 +831,10 @@ cam_periph_ioctl(struct cam_periph *periph, u_long cmd, caddr_t addr,
|
||||
|
||||
switch(cmd){
|
||||
case CAMGETPASSTHRU:
|
||||
ccb = cam_periph_getccb(periph, /* priority */ 1);
|
||||
ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
|
||||
xpt_setup_ccb(&ccb->ccb_h,
|
||||
ccb->ccb_h.path,
|
||||
/*priority*/1);
|
||||
CAM_PRIORITY_NORMAL);
|
||||
ccb->ccb_h.func_code = XPT_GDEVLIST;
|
||||
|
||||
/*
|
||||
@ -939,7 +939,7 @@ cam_freeze_devq(struct cam_path *path)
|
||||
{
|
||||
struct ccb_hdr ccb_h;
|
||||
|
||||
xpt_setup_ccb(&ccb_h, path, /*priority*/1);
|
||||
xpt_setup_ccb(&ccb_h, path, CAM_PRIORITY_NORMAL);
|
||||
ccb_h.func_code = XPT_NOOP;
|
||||
ccb_h.flags = CAM_DEV_QFREEZE;
|
||||
xpt_action((union ccb *)&ccb_h);
|
||||
@ -952,8 +952,7 @@ cam_release_devq(struct cam_path *path, u_int32_t relsim_flags,
|
||||
{
|
||||
struct ccb_relsim crs;
|
||||
|
||||
xpt_setup_ccb(&crs.ccb_h, path,
|
||||
/*priority*/1);
|
||||
xpt_setup_ccb(&crs.ccb_h, path, CAM_PRIORITY_NORMAL);
|
||||
crs.ccb_h.func_code = XPT_REL_SIMQ;
|
||||
crs.ccb_h.flags = getcount_only ? CAM_DEV_QFREEZE : 0;
|
||||
crs.release_flags = relsim_flags;
|
||||
@ -1070,7 +1069,7 @@ camperiphdone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
* Grab the inquiry data for this device.
|
||||
*/
|
||||
xpt_setup_ccb(&cgd.ccb_h, done_ccb->ccb_h.path,
|
||||
/*priority*/ 1);
|
||||
CAM_PRIORITY_NORMAL);
|
||||
cgd.ccb_h.func_code = XPT_GDEV_TYPE;
|
||||
xpt_action((union ccb *)&cgd);
|
||||
err_action = scsi_error_action(&done_ccb->csio,
|
||||
@ -1212,7 +1211,7 @@ cam_periph_bus_settle(struct cam_periph *periph, u_int bus_settle)
|
||||
{
|
||||
struct ccb_getdevstats cgds;
|
||||
|
||||
xpt_setup_ccb(&cgds.ccb_h, periph->path, /*priority*/1);
|
||||
xpt_setup_ccb(&cgds.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
|
||||
cgds.ccb_h.func_code = XPT_GDEV_STATS;
|
||||
xpt_action((union ccb *)&cgds);
|
||||
cam_periph_freeze_after_event(periph, &cgds.last_reset, bus_settle);
|
||||
@ -1280,7 +1279,7 @@ camperiphscsistatuserror(union ccb *ccb, cam_flags camflags,
|
||||
*/
|
||||
xpt_setup_ccb(&cgds.ccb_h,
|
||||
ccb->ccb_h.path,
|
||||
/*priority*/1);
|
||||
CAM_PRIORITY_NORMAL);
|
||||
cgds.ccb_h.func_code = XPT_GDEV_STATS;
|
||||
xpt_action((union ccb *)&cgds);
|
||||
|
||||
@ -1403,7 +1402,7 @@ camperiphscsisenseerror(union ccb *ccb, cam_flags camflags,
|
||||
/*
|
||||
* Grab the inquiry data for this device.
|
||||
*/
|
||||
xpt_setup_ccb(&cgd.ccb_h, ccb->ccb_h.path, /*priority*/ 1);
|
||||
xpt_setup_ccb(&cgd.ccb_h, ccb->ccb_h.path, CAM_PRIORITY_NORMAL);
|
||||
cgd.ccb_h.func_code = XPT_GDEV_TYPE;
|
||||
xpt_action((union ccb *)&cgd);
|
||||
|
||||
@ -1543,14 +1542,14 @@ camperiphscsisenseerror(union ccb *ccb, cam_flags camflags,
|
||||
|
||||
if ((err_action & SS_MASK) >= SS_START) {
|
||||
/*
|
||||
* Drop the priority to 0 so that the recovery
|
||||
* Drop the priority, so that the recovery
|
||||
* CCB is the first to execute. Freeze the queue
|
||||
* after this command is sent so that we can
|
||||
* restore the old csio and have it queued in
|
||||
* the proper order before we release normal
|
||||
* transactions to the device.
|
||||
*/
|
||||
ccb->ccb_h.pinfo.priority = 0;
|
||||
ccb->ccb_h.pinfo.priority = CAM_PRIORITY_DEV;
|
||||
ccb->ccb_h.flags |= CAM_DEV_QFREEZE;
|
||||
ccb->ccb_h.saved_ccb_ptr = save_ccb;
|
||||
error = ERESTART;
|
||||
|
@ -812,7 +812,7 @@ xpt_scanner_thread(void *dummy)
|
||||
else
|
||||
ccb->ccb_h.func_code = XPT_SCAN_LUN;
|
||||
ccb->ccb_h.cbfcnp = xptdone;
|
||||
xpt_setup_ccb(&ccb->ccb_h, ccb->ccb_h.path, 1);
|
||||
xpt_setup_ccb(&ccb->ccb_h, ccb->ccb_h.path, CAM_PRIORITY_NORMAL);
|
||||
cam_periph_runccb(ccb, NULL, 0, 0, NULL);
|
||||
xpt_free_path(ccb->ccb_h.path);
|
||||
xpt_free_ccb(ccb);
|
||||
@ -1059,7 +1059,7 @@ xpt_announce_periph(struct cam_periph *periph, char *announce_string)
|
||||
printf("%s%d: Serial Number %.60s\n", periph->periph_name,
|
||||
periph->unit_number, path->device->serial_num);
|
||||
}
|
||||
xpt_setup_ccb(&cts.ccb_h, path, /*priority*/1);
|
||||
xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
|
||||
cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
|
||||
cts.type = CTS_TYPE_CURRENT_SETTINGS;
|
||||
xpt_action((union ccb*)&cts);
|
||||
@ -1068,7 +1068,7 @@ xpt_announce_periph(struct cam_periph *periph, char *announce_string)
|
||||
}
|
||||
|
||||
/* Ask the SIM for its base transfer speed */
|
||||
xpt_setup_ccb(&cpi.ccb_h, path, /*priority*/1);
|
||||
xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL);
|
||||
cpi.ccb_h.func_code = XPT_PATH_INQ;
|
||||
xpt_action((union ccb *)&cpi);
|
||||
|
||||
@ -2335,7 +2335,7 @@ xptsetasyncfunc(struct cam_ed *device, void *arg)
|
||||
device->target->bus->path_id,
|
||||
device->target->target_id,
|
||||
device->lun_id);
|
||||
xpt_setup_ccb(&cgd.ccb_h, &path, /*priority*/1);
|
||||
xpt_setup_ccb(&cgd.ccb_h, &path, CAM_PRIORITY_NORMAL);
|
||||
cgd.ccb_h.func_code = XPT_GDEV_TYPE;
|
||||
xpt_action((union ccb *)&cgd);
|
||||
cur_entry->callback(cur_entry->callback_arg,
|
||||
@ -2359,7 +2359,7 @@ xptsetasyncbusfunc(struct cam_eb *bus, void *arg)
|
||||
bus->sim->path_id,
|
||||
CAM_TARGET_WILDCARD,
|
||||
CAM_LUN_WILDCARD);
|
||||
xpt_setup_ccb(&cpi.ccb_h, &path, /*priority*/1);
|
||||
xpt_setup_ccb(&cpi.ccb_h, &path, CAM_PRIORITY_NORMAL);
|
||||
cpi.ccb_h.func_code = XPT_PATH_INQ;
|
||||
xpt_action((union ccb *)&cpi);
|
||||
cur_entry->callback(cur_entry->callback_arg,
|
||||
@ -3799,7 +3799,7 @@ xpt_bus_register(struct cam_sim *sim, device_t parent, u_int32_t bus)
|
||||
if (status != CAM_REQ_CMP)
|
||||
printf("xpt_compile_path returned %d\n", status);
|
||||
|
||||
xpt_setup_ccb(&cpi.ccb_h, &path, /*priority*/1);
|
||||
xpt_setup_ccb(&cpi.ccb_h, &path, CAM_PRIORITY_NORMAL);
|
||||
cpi.ccb_h.func_code = XPT_PATH_INQ;
|
||||
xpt_action((union ccb *)&cpi);
|
||||
|
||||
@ -4544,7 +4544,7 @@ xpt_start_tags(struct cam_path *path)
|
||||
newopenings = min(device->maxtags,
|
||||
sim->max_tagged_dev_openings);
|
||||
xpt_dev_ccbq_resize(path, newopenings);
|
||||
xpt_setup_ccb(&crs.ccb_h, path, /*priority*/1);
|
||||
xpt_setup_ccb(&crs.ccb_h, path, CAM_PRIORITY_NORMAL);
|
||||
crs.ccb_h.func_code = XPT_REL_SIMQ;
|
||||
crs.release_flags = RELSIM_RELEASE_AFTER_QEMPTY;
|
||||
crs.openings
|
||||
@ -4571,7 +4571,7 @@ xptconfigbuscountfunc(struct cam_eb *bus, void *arg)
|
||||
busses_to_config++;
|
||||
xpt_compile_path(&path, NULL, bus->path_id,
|
||||
CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD);
|
||||
xpt_setup_ccb(&cpi.ccb_h, &path, /*priority*/1);
|
||||
xpt_setup_ccb(&cpi.ccb_h, &path, CAM_PRIORITY_NORMAL);
|
||||
cpi.ccb_h.func_code = XPT_PATH_INQ;
|
||||
xpt_action((union ccb *)&cpi);
|
||||
can_negotiate = cpi.hba_inquiry;
|
||||
@ -4614,7 +4614,7 @@ xptconfigfunc(struct cam_eb *bus, void *arg)
|
||||
xpt_finishconfig(xpt_periph, NULL);
|
||||
return(0);
|
||||
}
|
||||
xpt_setup_ccb(&work_ccb->ccb_h, path, /*priority*/1);
|
||||
xpt_setup_ccb(&work_ccb->ccb_h, path, CAM_PRIORITY_NORMAL);
|
||||
work_ccb->ccb_h.func_code = XPT_PATH_INQ;
|
||||
xpt_action(work_ccb);
|
||||
if (work_ccb->ccb_h.status != CAM_REQ_CMP) {
|
||||
@ -4629,7 +4629,7 @@ xptconfigfunc(struct cam_eb *bus, void *arg)
|
||||
can_negotiate &= (PI_WIDE_32|PI_WIDE_16|PI_SDTR_ABLE);
|
||||
if ((work_ccb->cpi.hba_misc & PIM_NOBUSRESET) == 0
|
||||
&& (can_negotiate != 0)) {
|
||||
xpt_setup_ccb(&work_ccb->ccb_h, path, /*priority*/1);
|
||||
xpt_setup_ccb(&work_ccb->ccb_h, path, CAM_PRIORITY_NORMAL);
|
||||
work_ccb->ccb_h.func_code = XPT_RESET_BUS;
|
||||
work_ccb->ccb_h.cbfcnp = NULL;
|
||||
CAM_DEBUG(path, CAM_DEBUG_SUBTRACE,
|
||||
|
@ -3004,7 +3004,7 @@ scsi_command_string(struct cam_device *device, struct ccb_scsiio *csio,
|
||||
*/
|
||||
xpt_setup_ccb(&cgd.ccb_h,
|
||||
csio->ccb_h.path,
|
||||
/*priority*/ 1);
|
||||
CAM_PRIORITY_NORMAL);
|
||||
cgd.ccb_h.func_code = XPT_GDEV_TYPE;
|
||||
xpt_action((union ccb *)&cgd);
|
||||
|
||||
@ -3088,7 +3088,7 @@ scsi_sense_sbuf(struct cam_device *device, struct ccb_scsiio *csio,
|
||||
*/
|
||||
xpt_setup_ccb(&cgd.ccb_h,
|
||||
csio->ccb_h.path,
|
||||
/*priority*/ 1);
|
||||
CAM_PRIORITY_NORMAL);
|
||||
cgd.ccb_h.func_code = XPT_GDEV_TYPE;
|
||||
xpt_action((union ccb *)&cgd);
|
||||
|
||||
|
@ -673,7 +673,7 @@ cdregister(struct cam_periph *periph, void *arg)
|
||||
softc->quirks = CD_Q_NONE;
|
||||
|
||||
/* Check if the SIM does not want 6 byte commands */
|
||||
xpt_setup_ccb(&cpi.ccb_h, periph->path, /*priority*/1);
|
||||
xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
|
||||
cpi.ccb_h.func_code = XPT_PATH_INQ;
|
||||
xpt_action((union ccb *)&cpi);
|
||||
if (cpi.ccb_h.status == CAM_REQ_CMP && (cpi.hba_misc & PIM_NO_6_BYTE))
|
||||
@ -1105,7 +1105,7 @@ cdschedule(struct cam_periph *periph, int priority)
|
||||
* We don't do anything with the priority here.
|
||||
* This is strictly a fifo queue.
|
||||
*/
|
||||
softc->pinfo.priority = 1;
|
||||
softc->pinfo.priority = CAM_PRIORITY_NORMAL;
|
||||
softc->pinfo.generation = ++softc->changer->devq.generation;
|
||||
camq_insert(&softc->changer->devq, (cam_pinfo *)softc);
|
||||
|
||||
@ -1206,7 +1206,7 @@ cdrunchangerqueue(void *arg)
|
||||
|
||||
/* Just in case this device is waiting */
|
||||
wakeup(&softc->changer);
|
||||
xpt_schedule(softc->periph, /*priority*/ 1);
|
||||
xpt_schedule(softc->periph, CAM_PRIORITY_NORMAL);
|
||||
|
||||
/*
|
||||
* Get rid of any pending timeouts, and set a flag to schedule new
|
||||
@ -1344,7 +1344,7 @@ cdgetccb(struct cam_periph *periph, u_int32_t priority)
|
||||
* If this changer isn't already queued, queue it up.
|
||||
*/
|
||||
if (softc->pinfo.index == CAM_UNQUEUED_INDEX) {
|
||||
softc->pinfo.priority = 1;
|
||||
softc->pinfo.priority = CAM_PRIORITY_NORMAL;
|
||||
softc->pinfo.generation =
|
||||
++softc->changer->devq.generation;
|
||||
camq_insert(&softc->changer->devq,
|
||||
@ -1421,9 +1421,9 @@ cdstrategy(struct bio *bp)
|
||||
* differently for changers.
|
||||
*/
|
||||
if ((softc->flags & CD_FLAG_CHANGER) == 0)
|
||||
xpt_schedule(periph, /* XXX priority */1);
|
||||
xpt_schedule(periph, CAM_PRIORITY_NORMAL);
|
||||
else
|
||||
cdschedule(periph, /* priority */ 1);
|
||||
cdschedule(periph, CAM_PRIORITY_NORMAL);
|
||||
|
||||
cam_periph_unlock(periph);
|
||||
return;
|
||||
@ -1493,7 +1493,7 @@ cdstart(struct cam_periph *periph, union ccb *start_ccb)
|
||||
}
|
||||
if (bp != NULL) {
|
||||
/* Have more work to do, so ensure we stay scheduled */
|
||||
xpt_schedule(periph, /* XXX priority */1);
|
||||
xpt_schedule(periph, CAM_PRIORITY_NORMAL);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1668,7 +1668,7 @@ cddone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
|
||||
xpt_setup_ccb(&cgd.ccb_h,
|
||||
done_ccb->ccb_h.path,
|
||||
/* priority */ 1);
|
||||
CAM_PRIORITY_NORMAL);
|
||||
cgd.ccb_h.func_code = XPT_GDEV_TYPE;
|
||||
xpt_action((union ccb *)&cgd);
|
||||
|
||||
@ -2727,7 +2727,7 @@ cdprevent(struct cam_periph *periph, int action)
|
||||
return;
|
||||
}
|
||||
|
||||
ccb = cdgetccb(periph, /* priority */ 1);
|
||||
ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
|
||||
|
||||
scsi_prevent(&ccb->csio,
|
||||
/*retries*/ 1,
|
||||
@ -2901,7 +2901,7 @@ cdsize(struct cam_periph *periph, u_int32_t *size)
|
||||
|
||||
softc = (struct cd_softc *)periph->softc;
|
||||
|
||||
ccb = cdgetccb(periph, /* priority */ 1);
|
||||
ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
|
||||
|
||||
/* XXX Should be M_WAITOK */
|
||||
rcap_buf = malloc(sizeof(struct scsi_read_capacity_data),
|
||||
@ -3153,7 +3153,7 @@ cdreadtoc(struct cam_periph *periph, u_int32_t mode, u_int32_t start,
|
||||
ntoc = len;
|
||||
error = 0;
|
||||
|
||||
ccb = cdgetccb(periph, /* priority */ 1);
|
||||
ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
|
||||
|
||||
csio = &ccb->csio;
|
||||
|
||||
@ -3200,7 +3200,7 @@ cdreadsubchannel(struct cam_periph *periph, u_int32_t mode,
|
||||
|
||||
error = 0;
|
||||
|
||||
ccb = cdgetccb(periph, /* priority */ 1);
|
||||
ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
|
||||
|
||||
csio = &ccb->csio;
|
||||
|
||||
@ -3252,7 +3252,7 @@ cdgetmode(struct cam_periph *periph, struct cd_mode_params *data,
|
||||
|
||||
softc = (struct cd_softc *)periph->softc;
|
||||
|
||||
ccb = cdgetccb(periph, /* priority */ 1);
|
||||
ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
|
||||
|
||||
csio = &ccb->csio;
|
||||
|
||||
@ -3351,7 +3351,7 @@ cdsetmode(struct cam_periph *periph, struct cd_mode_params *data)
|
||||
|
||||
softc = (struct cd_softc *)periph->softc;
|
||||
|
||||
ccb = cdgetccb(periph, /* priority */ 1);
|
||||
ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
|
||||
|
||||
csio = &ccb->csio;
|
||||
|
||||
@ -3443,7 +3443,7 @@ cdplay(struct cam_periph *periph, u_int32_t blk, u_int32_t len)
|
||||
u_int8_t cdb_len;
|
||||
|
||||
error = 0;
|
||||
ccb = cdgetccb(periph, /* priority */ 1);
|
||||
ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
|
||||
csio = &ccb->csio;
|
||||
/*
|
||||
* Use the smallest possible command to perform the operation.
|
||||
@ -3500,7 +3500,7 @@ cdplaymsf(struct cam_periph *periph, u_int32_t startm, u_int32_t starts,
|
||||
|
||||
error = 0;
|
||||
|
||||
ccb = cdgetccb(periph, /* priority */ 1);
|
||||
ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
|
||||
|
||||
csio = &ccb->csio;
|
||||
|
||||
@ -3546,7 +3546,7 @@ cdplaytracks(struct cam_periph *periph, u_int32_t strack, u_int32_t sindex,
|
||||
|
||||
error = 0;
|
||||
|
||||
ccb = cdgetccb(periph, /* priority */ 1);
|
||||
ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
|
||||
|
||||
csio = &ccb->csio;
|
||||
|
||||
@ -3588,7 +3588,7 @@ cdpause(struct cam_periph *periph, u_int32_t go)
|
||||
|
||||
error = 0;
|
||||
|
||||
ccb = cdgetccb(periph, /* priority */ 1);
|
||||
ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
|
||||
|
||||
csio = &ccb->csio;
|
||||
|
||||
@ -3625,7 +3625,7 @@ cdstartunit(struct cam_periph *periph, int load)
|
||||
|
||||
error = 0;
|
||||
|
||||
ccb = cdgetccb(periph, /* priority */ 1);
|
||||
ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
|
||||
|
||||
scsi_start_stop(&ccb->csio,
|
||||
/* retries */ 1,
|
||||
@ -3653,7 +3653,7 @@ cdstopunit(struct cam_periph *periph, u_int32_t eject)
|
||||
|
||||
error = 0;
|
||||
|
||||
ccb = cdgetccb(periph, /* priority */ 1);
|
||||
ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
|
||||
|
||||
scsi_start_stop(&ccb->csio,
|
||||
/* retries */ 1,
|
||||
@ -3682,7 +3682,7 @@ cdsetspeed(struct cam_periph *periph, u_int32_t rdspeed, u_int32_t wrspeed)
|
||||
int error;
|
||||
|
||||
error = 0;
|
||||
ccb = cdgetccb(periph, /* priority */ 1);
|
||||
ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
|
||||
csio = &ccb->csio;
|
||||
|
||||
/* Preserve old behavior: units in multiples of CDROM speed */
|
||||
@ -3730,7 +3730,7 @@ cdreportkey(struct cam_periph *periph, struct dvd_authinfo *authinfo)
|
||||
databuf = NULL;
|
||||
lba = 0;
|
||||
|
||||
ccb = cdgetccb(periph, /* priority */ 1);
|
||||
ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
|
||||
|
||||
switch (authinfo->format) {
|
||||
case DVD_REPORT_AGID:
|
||||
@ -3887,7 +3887,7 @@ cdsendkey(struct cam_periph *periph, struct dvd_authinfo *authinfo)
|
||||
error = 0;
|
||||
databuf = NULL;
|
||||
|
||||
ccb = cdgetccb(periph, /* priority */ 1);
|
||||
ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
|
||||
|
||||
switch(authinfo->format) {
|
||||
case DVD_SEND_CHALLENGE: {
|
||||
@ -3983,7 +3983,7 @@ cdreaddvdstructure(struct cam_periph *periph, struct dvd_struct *dvdstruct)
|
||||
/* The address is reserved for many of the formats */
|
||||
address = 0;
|
||||
|
||||
ccb = cdgetccb(periph, /* priority */ 1);
|
||||
ccb = cdgetccb(periph, CAM_PRIORITY_NORMAL);
|
||||
|
||||
switch(dvdstruct->format) {
|
||||
case DVD_STRUCT_PHYSICAL:
|
||||
|
@ -809,7 +809,7 @@ chmove(struct cam_periph *periph, struct changer_move *cm)
|
||||
fromelem = softc->sc_firsts[cm->cm_fromtype] + cm->cm_fromunit;
|
||||
toelem = softc->sc_firsts[cm->cm_totype] + cm->cm_tounit;
|
||||
|
||||
ccb = cam_periph_getccb(periph, /*priority*/ 1);
|
||||
ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
|
||||
|
||||
scsi_move_medium(&ccb->csio,
|
||||
/* retries */ 1,
|
||||
@ -868,7 +868,7 @@ chexchange(struct cam_periph *periph, struct changer_exchange *ce)
|
||||
dst1 = softc->sc_firsts[ce->ce_fdsttype] + ce->ce_fdstunit;
|
||||
dst2 = softc->sc_firsts[ce->ce_sdsttype] + ce->ce_sdstunit;
|
||||
|
||||
ccb = cam_periph_getccb(periph, /*priority*/ 1);
|
||||
ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
|
||||
|
||||
scsi_exchange_medium(&ccb->csio,
|
||||
/* retries */ 1,
|
||||
@ -918,7 +918,7 @@ chposition(struct cam_periph *periph, struct changer_position *cp)
|
||||
*/
|
||||
dst = softc->sc_firsts[cp->cp_type] + cp->cp_unit;
|
||||
|
||||
ccb = cam_periph_getccb(periph, /*priority*/ 1);
|
||||
ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
|
||||
|
||||
scsi_position_to_element(&ccb->csio,
|
||||
/* retries */ 1,
|
||||
@ -1075,7 +1075,7 @@ chgetelemstatus(struct cam_periph *periph,
|
||||
data = (caddr_t)malloc(1024, M_DEVBUF, M_WAITOK);
|
||||
|
||||
cam_periph_lock(periph);
|
||||
ccb = cam_periph_getccb(periph, /*priority*/ 1);
|
||||
ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
|
||||
|
||||
scsi_read_element_status(&ccb->csio,
|
||||
/* retries */ 1,
|
||||
@ -1201,7 +1201,7 @@ chielem(struct cam_periph *periph,
|
||||
error = 0;
|
||||
softc = (struct ch_softc *)periph->softc;
|
||||
|
||||
ccb = cam_periph_getccb(periph, /*priority*/ 1);
|
||||
ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
|
||||
|
||||
scsi_initialize_element_status(&ccb->csio,
|
||||
/* retries */ 1,
|
||||
@ -1285,7 +1285,7 @@ chsetvoltag(struct cam_periph *periph,
|
||||
min(strlen(csvr->csvr_voltag.cv_volid), sizeof(ssvtp.vitf)));
|
||||
scsi_ulto2b(csvr->csvr_voltag.cv_serial, ssvtp.minvsn);
|
||||
|
||||
ccb = cam_periph_getccb(periph, /*priority*/ 1);
|
||||
ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
|
||||
|
||||
scsi_send_volume_tag(&ccb->csio,
|
||||
/* retries */ 1,
|
||||
@ -1323,7 +1323,7 @@ chgetparams(struct cam_periph *periph)
|
||||
|
||||
softc = (struct ch_softc *)periph->softc;
|
||||
|
||||
ccb = cam_periph_getccb(periph, /*priority*/ 1);
|
||||
ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
|
||||
|
||||
/*
|
||||
* The scsi_mode_sense_data structure is just a convenience
|
||||
|
@ -729,7 +729,7 @@ daclose(struct disk *dp)
|
||||
if ((softc->quirks & DA_Q_NO_SYNC_CACHE) == 0) {
|
||||
union ccb *ccb;
|
||||
|
||||
ccb = cam_periph_getccb(periph, /*priority*/1);
|
||||
ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
|
||||
|
||||
scsi_synchronize_cache(&ccb->csio,
|
||||
/*retries*/1,
|
||||
@ -830,7 +830,7 @@ dastrategy(struct bio *bp)
|
||||
/*
|
||||
* Schedule ourselves for performing the work.
|
||||
*/
|
||||
xpt_schedule(periph, /* XXX priority */1);
|
||||
xpt_schedule(periph, CAM_PRIORITY_NORMAL);
|
||||
cam_periph_unlock(periph);
|
||||
|
||||
return;
|
||||
@ -860,7 +860,7 @@ dadump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t leng
|
||||
|
||||
if (length > 0) {
|
||||
periph->flags |= CAM_PERIPH_POLLED;
|
||||
xpt_setup_ccb(&csio.ccb_h, periph->path, /*priority*/1);
|
||||
xpt_setup_ccb(&csio.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
|
||||
csio.ccb_h.ccb_state = DA_CCB_DUMP;
|
||||
scsi_read_write(&csio,
|
||||
/*retries*/1,
|
||||
@ -897,7 +897,7 @@ dadump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t leng
|
||||
*/
|
||||
if ((softc->quirks & DA_Q_NO_SYNC_CACHE) == 0) {
|
||||
|
||||
xpt_setup_ccb(&csio.ccb_h, periph->path, /*priority*/1);
|
||||
xpt_setup_ccb(&csio.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
|
||||
csio.ccb_h.ccb_state = DA_CCB_DUMP;
|
||||
scsi_synchronize_cache(&csio,
|
||||
/*retries*/1,
|
||||
@ -1194,7 +1194,7 @@ daregister(struct cam_periph *periph, void *arg)
|
||||
|
||||
/* Check if the SIM does not want 6 byte commands */
|
||||
bzero(&cpi, sizeof(cpi));
|
||||
xpt_setup_ccb(&cpi.ccb_h, periph->path, /*priority*/1);
|
||||
xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
|
||||
cpi.ccb_h.func_code = XPT_PATH_INQ;
|
||||
xpt_action((union ccb *)&cpi);
|
||||
if (cpi.ccb_h.status == CAM_REQ_CMP && (cpi.hba_misc & PIM_NO_6_BYTE))
|
||||
@ -1381,7 +1381,7 @@ dastart(struct cam_periph *periph, union ccb *start_ccb)
|
||||
|
||||
if (bp != NULL) {
|
||||
/* Have more work to do, so ensure we stay scheduled */
|
||||
xpt_schedule(periph, /* XXX priority */1);
|
||||
xpt_schedule(periph, CAM_PRIORITY_NORMAL);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1678,7 +1678,7 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
|
||||
xpt_setup_ccb(&cgd.ccb_h,
|
||||
done_ccb->ccb_h.path,
|
||||
/* priority */ 1);
|
||||
CAM_PRIORITY_NORMAL);
|
||||
cgd.ccb_h.func_code = XPT_GDEV_TYPE;
|
||||
xpt_action((union ccb *)&cgd);
|
||||
|
||||
@ -1832,7 +1832,7 @@ daprevent(struct cam_periph *periph, int action)
|
||||
return;
|
||||
}
|
||||
|
||||
ccb = cam_periph_getccb(periph, /*priority*/1);
|
||||
ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
|
||||
|
||||
scsi_prevent(&ccb->csio,
|
||||
/*retries*/1,
|
||||
@ -1882,7 +1882,7 @@ dagetcapacity(struct cam_periph *periph)
|
||||
if (rcap == NULL)
|
||||
return (ENOMEM);
|
||||
|
||||
ccb = cam_periph_getccb(periph, /*priority*/1);
|
||||
ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
|
||||
scsi_read_capacity(&ccb->csio,
|
||||
/*retries*/4,
|
||||
/*cbfncp*/dadone,
|
||||
@ -1976,7 +1976,7 @@ dasetgeom(struct cam_periph *periph, uint32_t block_len, uint64_t maxsector)
|
||||
* up with something that will make this a bootable
|
||||
* device.
|
||||
*/
|
||||
xpt_setup_ccb(&ccg.ccb_h, periph->path, /*priority*/1);
|
||||
xpt_setup_ccb(&ccg.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
|
||||
ccg.ccb_h.func_code = XPT_CALC_GEOMETRY;
|
||||
ccg.block_size = dp->secsize;
|
||||
ccg.volume_size = dp->sectors;
|
||||
@ -2050,7 +2050,7 @@ dashutdown(void * arg, int howto)
|
||||
continue;
|
||||
}
|
||||
|
||||
xpt_setup_ccb(&ccb.ccb_h, periph->path, /*priority*/1);
|
||||
xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
|
||||
|
||||
ccb.ccb_h.ccb_state = DA_CCB_DUMP;
|
||||
scsi_synchronize_cache(&ccb.csio,
|
||||
|
@ -224,7 +224,7 @@ ptstrategy(struct bio *bp)
|
||||
/*
|
||||
* Schedule ourselves for performing the work.
|
||||
*/
|
||||
xpt_schedule(periph, /* XXX priority */1);
|
||||
xpt_schedule(periph, CAM_PRIORITY_NORMAL);
|
||||
cam_periph_unlock(periph);
|
||||
|
||||
return;
|
||||
@ -464,7 +464,7 @@ ptstart(struct cam_periph *periph, union ccb *start_ccb)
|
||||
|
||||
if (bp != NULL) {
|
||||
/* Have more work to do, so ensure we stay scheduled */
|
||||
xpt_schedule(periph, /* XXX priority */1);
|
||||
xpt_schedule(periph, CAM_PRIORITY_NORMAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -786,7 +786,7 @@ sastrategy(struct bio *bp)
|
||||
/*
|
||||
* Schedule ourselves for performing the work.
|
||||
*/
|
||||
xpt_schedule(periph, 1);
|
||||
xpt_schedule(periph, CAM_PRIORITY_NORMAL);
|
||||
cam_periph_unlock(periph);
|
||||
|
||||
return;
|
||||
@ -1689,7 +1689,7 @@ again:
|
||||
|
||||
if (bp != NULL) {
|
||||
/* Have more work to do, so ensure we stay scheduled */
|
||||
xpt_schedule(periph, 1);
|
||||
xpt_schedule(periph, CAM_PRIORITY_NORMAL);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ targbhenlun(struct cam_periph *periph)
|
||||
if ((softc->flags & TARGBH_FLAG_LUN_ENABLED) != 0)
|
||||
return (CAM_REQ_CMP);
|
||||
|
||||
xpt_setup_ccb(&immed_ccb.ccb_h, periph->path, /*priority*/1);
|
||||
xpt_setup_ccb(&immed_ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
|
||||
immed_ccb.ccb_h.func_code = XPT_EN_LUN;
|
||||
|
||||
/* Don't need support for any vendor specific commands */
|
||||
@ -280,7 +280,7 @@ targbhenlun(struct cam_periph *periph)
|
||||
break;
|
||||
}
|
||||
|
||||
xpt_setup_ccb(&atio->ccb_h, periph->path, /*priority*/1);
|
||||
xpt_setup_ccb(&atio->ccb_h, periph->path, CAM_PRIORITY_NORMAL);
|
||||
atio->ccb_h.func_code = XPT_ACCEPT_TARGET_IO;
|
||||
atio->ccb_h.cbfcnp = targbhdone;
|
||||
xpt_action((union ccb *)atio);
|
||||
@ -318,7 +318,7 @@ targbhenlun(struct cam_periph *periph)
|
||||
break;
|
||||
}
|
||||
|
||||
xpt_setup_ccb(&inot->ccb_h, periph->path, /*priority*/1);
|
||||
xpt_setup_ccb(&inot->ccb_h, periph->path, CAM_PRIORITY_NORMAL);
|
||||
inot->ccb_h.func_code = XPT_IMMED_NOTIFY;
|
||||
inot->ccb_h.cbfcnp = targbhdone;
|
||||
xpt_action((union ccb *)inot);
|
||||
@ -361,7 +361,7 @@ targbhdislun(struct cam_periph *periph)
|
||||
|
||||
softc->accept_tio_list =
|
||||
((struct targbh_cmd_desc*)atio->ccb_h.ccb_descr)->atio_link;
|
||||
xpt_setup_ccb(&ccb.cab.ccb_h, periph->path, /*priority*/1);
|
||||
xpt_setup_ccb(&ccb.cab.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
|
||||
ccb.cab.ccb_h.func_code = XPT_ABORT;
|
||||
ccb.cab.abort_ccb = (union ccb *)atio;
|
||||
xpt_action(&ccb);
|
||||
@ -369,7 +369,7 @@ targbhdislun(struct cam_periph *periph)
|
||||
|
||||
while ((ccb_h = SLIST_FIRST(&softc->immed_notify_slist)) != NULL) {
|
||||
SLIST_REMOVE_HEAD(&softc->immed_notify_slist, periph_links.sle);
|
||||
xpt_setup_ccb(&ccb.cab.ccb_h, periph->path, /*priority*/1);
|
||||
xpt_setup_ccb(&ccb.cab.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
|
||||
ccb.cab.ccb_h.func_code = XPT_ABORT;
|
||||
ccb.cab.abort_ccb = (union ccb *)ccb_h;
|
||||
xpt_action(&ccb);
|
||||
@ -378,7 +378,7 @@ targbhdislun(struct cam_periph *periph)
|
||||
/*
|
||||
* Dissable this lun.
|
||||
*/
|
||||
xpt_setup_ccb(&ccb.cel.ccb_h, periph->path, /*priority*/1);
|
||||
xpt_setup_ccb(&ccb.cel.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
|
||||
ccb.cel.ccb_h.func_code = XPT_EN_LUN;
|
||||
ccb.cel.enable = 0;
|
||||
xpt_action(&ccb);
|
||||
@ -528,7 +528,7 @@ targbhstart(struct cam_periph *periph, union ccb *start_ccb)
|
||||
ccbh = TAILQ_FIRST(&softc->work_queue);
|
||||
}
|
||||
if (ccbh != NULL)
|
||||
xpt_schedule(periph, /*priority*/1);
|
||||
xpt_schedule(periph, CAM_PRIORITY_NORMAL);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -647,7 +647,7 @@ targbhdone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
} else {
|
||||
TAILQ_INSERT_TAIL(&softc->work_queue, &atio->ccb_h,
|
||||
periph_links.tqe);
|
||||
priority = 1;
|
||||
priority = CAM_PRIORITY_NORMAL;
|
||||
}
|
||||
xpt_schedule(periph, priority);
|
||||
break;
|
||||
|
@ -296,7 +296,7 @@ targioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *t
|
||||
else
|
||||
cdbg.flags = CAM_DEBUG_NONE;
|
||||
cam_periph_lock(softc->periph);
|
||||
xpt_setup_ccb(&cdbg.ccb_h, softc->path, /*priority*/0);
|
||||
xpt_setup_ccb(&cdbg.ccb_h, softc->path, CAM_PRIORITY_NORMAL);
|
||||
cdbg.ccb_h.func_code = XPT_DEBUG;
|
||||
cdbg.ccb_h.cbfcnp = targdone;
|
||||
|
||||
@ -387,7 +387,7 @@ targendislun(struct cam_path *path, int enable, int grp6_len, int grp7_len)
|
||||
cam_status status;
|
||||
|
||||
/* Tell the lun to begin answering selects */
|
||||
xpt_setup_ccb(&en_ccb.ccb_h, path, /*priority*/1);
|
||||
xpt_setup_ccb(&en_ccb.ccb_h, path, CAM_PRIORITY_NORMAL);
|
||||
en_ccb.ccb_h.func_code = XPT_EN_LUN;
|
||||
/* Don't need support for any vendor specific commands */
|
||||
en_ccb.grp6_len = grp6_len;
|
||||
@ -415,7 +415,7 @@ targenable(struct targ_softc *softc, struct cam_path *path, int grp6_len,
|
||||
return (CAM_LUN_ALRDY_ENA);
|
||||
|
||||
/* Make sure SIM supports target mode */
|
||||
xpt_setup_ccb(&cpi.ccb_h, path, /*priority*/1);
|
||||
xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL);
|
||||
cpi.ccb_h.func_code = XPT_PATH_INQ;
|
||||
xpt_action((union ccb *)&cpi);
|
||||
status = cpi.ccb_h.status & CAM_STATUS_MASK;
|
||||
@ -563,7 +563,7 @@ targwrite(struct cdev *dev, struct uio *uio, int ioflag)
|
||||
break;
|
||||
}
|
||||
priority = fuword32(&user_ccb->ccb_h.pinfo.priority);
|
||||
if (priority == -1) {
|
||||
if (priority == CAM_PRIORITY_NONE) {
|
||||
error = EINVAL;
|
||||
break;
|
||||
}
|
||||
@ -1067,7 +1067,7 @@ abort_all_pending(struct targ_softc *softc)
|
||||
* Then abort all pending CCBs.
|
||||
* targdone() will return the aborted CCB via user_ccb_queue
|
||||
*/
|
||||
xpt_setup_ccb(&cab.ccb_h, softc->path, /*priority*/0);
|
||||
xpt_setup_ccb(&cab.ccb_h, softc->path, CAM_PRIORITY_NORMAL);
|
||||
cab.ccb_h.func_code = XPT_ABORT;
|
||||
cab.ccb_h.status = CAM_REQ_CMP_ERR;
|
||||
TAILQ_FOREACH(ccb_h, &softc->pending_ccb_queue, periph_links.tqe) {
|
||||
|
@ -629,7 +629,7 @@ probeschedule(struct cam_periph *periph)
|
||||
softc = (probe_softc *)periph->softc;
|
||||
ccb = (union ccb *)TAILQ_FIRST(&softc->request_ccbs);
|
||||
|
||||
xpt_setup_ccb(&cpi.ccb_h, periph->path, /*priority*/1);
|
||||
xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
|
||||
cpi.ccb_h.func_code = XPT_PATH_INQ;
|
||||
xpt_action((union ccb *)&cpi);
|
||||
|
||||
@ -880,7 +880,7 @@ proberequestdefaultnegotiation(struct cam_periph *periph)
|
||||
{
|
||||
struct ccb_trans_settings cts;
|
||||
|
||||
xpt_setup_ccb(&cts.ccb_h, periph->path, /*priority*/1);
|
||||
xpt_setup_ccb(&cts.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
|
||||
cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
|
||||
cts.type = CTS_TYPE_USER_SETTINGS;
|
||||
xpt_action((union ccb *)&cts);
|
||||
@ -902,7 +902,7 @@ proberequestbackoff(struct cam_periph *periph, struct cam_ed *device)
|
||||
struct ccb_trans_settings_spi *spi;
|
||||
|
||||
memset(&cts, 0, sizeof (cts));
|
||||
xpt_setup_ccb(&cts.ccb_h, periph->path, /*priority*/1);
|
||||
xpt_setup_ccb(&cts.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
|
||||
cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
|
||||
cts.type = CTS_TYPE_CURRENT_SETTINGS;
|
||||
xpt_action((union ccb *)&cts);
|
||||
@ -1748,7 +1748,7 @@ scsi_scan_lun(struct cam_periph *periph, struct cam_path *path,
|
||||
CAM_DEBUG(request_ccb->ccb_h.path, CAM_DEBUG_TRACE,
|
||||
("scsi_scan_lun\n"));
|
||||
|
||||
xpt_setup_ccb(&cpi.ccb_h, path, /*priority*/1);
|
||||
xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL);
|
||||
cpi.ccb_h.func_code = XPT_PATH_INQ;
|
||||
xpt_action((union ccb *)&cpi);
|
||||
|
||||
@ -1798,7 +1798,7 @@ scsi_scan_lun(struct cam_periph *periph, struct cam_path *path,
|
||||
free(new_path, M_CAMXPT);
|
||||
return;
|
||||
}
|
||||
xpt_setup_ccb(&request_ccb->ccb_h, new_path, /*priority*/ 1);
|
||||
xpt_setup_ccb(&request_ccb->ccb_h, new_path, CAM_PRIORITY_NORMAL);
|
||||
request_ccb->ccb_h.cbfcnp = xptscandone;
|
||||
request_ccb->ccb_h.func_code = XPT_SCAN_LUN;
|
||||
request_ccb->crcn.flags = flags;
|
||||
@ -1896,7 +1896,7 @@ scsi_devise_transport(struct cam_path *path)
|
||||
struct scsi_inquiry_data *inq_buf;
|
||||
|
||||
/* Get transport information from the SIM */
|
||||
xpt_setup_ccb(&cpi.ccb_h, path, /*priority*/1);
|
||||
xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL);
|
||||
cpi.ccb_h.func_code = XPT_PATH_INQ;
|
||||
xpt_action((union ccb *)&cpi);
|
||||
|
||||
@ -1956,7 +1956,7 @@ scsi_devise_transport(struct cam_path *path)
|
||||
*/
|
||||
|
||||
/* Tell the controller what we think */
|
||||
xpt_setup_ccb(&cts.ccb_h, path, /*priority*/1);
|
||||
xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
|
||||
cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS;
|
||||
cts.type = CTS_TYPE_CURRENT_SETTINGS;
|
||||
cts.transport = path->device->transport;
|
||||
@ -2084,7 +2084,7 @@ scsi_set_transfer_settings(struct ccb_trans_settings *cts, struct cam_ed *device
|
||||
|
||||
inq_data = &device->inq_data;
|
||||
scsi = &cts->proto_specific.scsi;
|
||||
xpt_setup_ccb(&cpi.ccb_h, cts->ccb_h.path, /*priority*/1);
|
||||
xpt_setup_ccb(&cpi.ccb_h, cts->ccb_h.path, CAM_PRIORITY_NORMAL);
|
||||
cpi.ccb_h.func_code = XPT_PATH_INQ;
|
||||
xpt_action((union ccb *)&cpi);
|
||||
|
||||
@ -2105,7 +2105,7 @@ scsi_set_transfer_settings(struct ccb_trans_settings *cts, struct cam_ed *device
|
||||
* Perform sanity checking against what the
|
||||
* controller and device can do.
|
||||
*/
|
||||
xpt_setup_ccb(&cur_cts.ccb_h, cts->ccb_h.path, /*priority*/1);
|
||||
xpt_setup_ccb(&cur_cts.ccb_h, cts->ccb_h.path, CAM_PRIORITY_NORMAL);
|
||||
cur_cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
|
||||
cur_cts.type = cts->type;
|
||||
xpt_action((union ccb *)&cur_cts);
|
||||
@ -2273,7 +2273,7 @@ scsi_set_transfer_settings(struct ccb_trans_settings *cts, struct cam_ed *device
|
||||
device->tag_delay_count = 0;
|
||||
|
||||
xpt_setup_ccb(&crs.ccb_h, cts->ccb_h.path,
|
||||
/*priority*/1);
|
||||
CAM_PRIORITY_NORMAL);
|
||||
crs.ccb_h.func_code = XPT_REL_SIMQ;
|
||||
crs.release_flags = RELSIM_RELEASE_AFTER_QEMPTY;
|
||||
crs.openings
|
||||
@ -2306,7 +2306,7 @@ scsi_toggle_tags(struct cam_path *path)
|
||||
&& (dev->inq_flags & (SID_Sync|SID_WBus16|SID_WBus32)) != 0)) {
|
||||
struct ccb_trans_settings cts;
|
||||
|
||||
xpt_setup_ccb(&cts.ccb_h, path, 1);
|
||||
xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL);
|
||||
cts.protocol = PROTO_SCSI;
|
||||
cts.protocol_version = PROTO_VERSION_UNSPECIFIED;
|
||||
cts.transport = XPORT_UNSPECIFIED;
|
||||
|
Loading…
x
Reference in New Issue
Block a user