Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/ctl/scsi_ctl.c
| Show First 20 Lines • Show All 473 Lines • ▼ Show 20 Lines | if (bus_softc->sim->max_tagged_dev_openings > | ||||
| bus_softc->sim->max_dev_openings) { | bus_softc->sim->max_dev_openings) { | ||||
| cam_release_devq(periph->path, | cam_release_devq(periph->path, | ||||
| /*relsim_flags*/RELSIM_ADJUST_OPENINGS, | /*relsim_flags*/RELSIM_ADJUST_OPENINGS, | ||||
| /*openings*/bus_softc->sim->max_tagged_dev_openings, | /*openings*/bus_softc->sim->max_tagged_dev_openings, | ||||
| /*timeout*/0, | /*timeout*/0, | ||||
| /*getcount_only*/1); | /*getcount_only*/1); | ||||
| } | } | ||||
| memset(&ccb, 0, sizeof(ccb)); | |||||
| xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NONE); | xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NONE); | ||||
| ccb.ccb_h.func_code = XPT_EN_LUN; | ccb.ccb_h.func_code = XPT_EN_LUN; | ||||
| ccb.cel.grp6_len = 0; | ccb.cel.grp6_len = 0; | ||||
| ccb.cel.grp7_len = 0; | ccb.cel.grp7_len = 0; | ||||
| ccb.cel.enable = 1; | ccb.cel.enable = 1; | ||||
| xpt_action(&ccb); | xpt_action(&ccb); | ||||
| status = (ccb.ccb_h.status & CAM_STATUS_MASK); | status = (ccb.ccb_h.status & CAM_STATUS_MASK); | ||||
| if (status != CAM_REQ_CMP) { | if (status != CAM_REQ_CMP) { | ||||
| ▲ Show 20 Lines • Show All 118 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| struct ctlfe_lun_softc *softc = (struct ctlfe_lun_softc *)periph->softc; | struct ctlfe_lun_softc *softc = (struct ctlfe_lun_softc *)periph->softc; | ||||
| struct ctlfe_softc *bus_softc; | struct ctlfe_softc *bus_softc; | ||||
| union ccb ccb; | union ccb ccb; | ||||
| struct ccb_hdr *hdr; | struct ccb_hdr *hdr; | ||||
| cam_status status; | cam_status status; | ||||
| /* Abort all ATIOs and INOTs queued to SIM. */ | /* Abort all ATIOs and INOTs queued to SIM. */ | ||||
| memset(&ccb, 0, sizeof(ccb)); | |||||
| xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NONE); | xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NONE); | ||||
| ccb.ccb_h.func_code = XPT_ABORT; | ccb.ccb_h.func_code = XPT_ABORT; | ||||
| LIST_FOREACH(hdr, &softc->atio_list, periph_links.le) { | LIST_FOREACH(hdr, &softc->atio_list, periph_links.le) { | ||||
| ccb.cab.abort_ccb = (union ccb *)hdr; | ccb.cab.abort_ccb = (union ccb *)hdr; | ||||
| xpt_action(&ccb); | xpt_action(&ccb); | ||||
| } | } | ||||
| LIST_FOREACH(hdr, &softc->inot_list, periph_links.le) { | LIST_FOREACH(hdr, &softc->inot_list, periph_links.le) { | ||||
| ccb.cab.abort_ccb = (union ccb *)hdr; | ccb.cab.abort_ccb = (union ccb *)hdr; | ||||
| ▲ Show 20 Lines • Show All 1,223 Lines • ▼ Show 20 Lines | |||||
| static void | static void | ||||
| ctlfe_dump_queue(struct ctlfe_lun_softc *softc) | ctlfe_dump_queue(struct ctlfe_lun_softc *softc) | ||||
| { | { | ||||
| struct cam_periph *periph = softc->periph; | struct cam_periph *periph = softc->periph; | ||||
| struct ccb_hdr *hdr; | struct ccb_hdr *hdr; | ||||
| struct ccb_getdevstats cgds; | struct ccb_getdevstats cgds; | ||||
| int num_items; | int num_items; | ||||
| memset(&cgds, 0, sizeof(cgds)); | |||||
| xpt_setup_ccb(&cgds.ccb_h, periph->path, CAM_PRIORITY_NORMAL); | xpt_setup_ccb(&cgds.ccb_h, periph->path, CAM_PRIORITY_NORMAL); | ||||
| cgds.ccb_h.func_code = XPT_GDEV_STATS; | cgds.ccb_h.func_code = XPT_GDEV_STATS; | ||||
| xpt_action((union ccb *)&cgds); | xpt_action((union ccb *)&cgds); | ||||
| if ((cgds.ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) { | if ((cgds.ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) { | ||||
| xpt_print(periph->path, "devq: openings %d, active %d, " | xpt_print(periph->path, "devq: openings %d, active %d, " | ||||
| "allocated %d, queued %d, held %d\n", | "allocated %d, queued %d, held %d\n", | ||||
| cgds.dev_openings, cgds.dev_active, cgds.allocated, | cgds.dev_openings, cgds.dev_active, cgds.allocated, | ||||
| cgds.queued, cgds.held); | cgds.queued, cgds.held); | ||||
| ▲ Show 20 Lines • Show All 132 Lines • Show Last 20 Lines | |||||