View | Details | Raw Unified | Return to bug 270459
Collapse All | Expand All

(-)b/sys/cam/ata/ata_xpt.c (-2 / +2 lines)
Lines 1003-1009 device_fail: if ((path->device->flags & CAM_DEV_UNCONFIGURED) == 0) Link Here
1003
		    path->bus->sim->max_tagged_dev_openings != 0) {
1003
		    path->bus->sim->max_tagged_dev_openings != 0) {
1004
			/* Check if the SIM does not want queued commands. */
1004
			/* Check if the SIM does not want queued commands. */
1005
			xpt_path_inq(&cpi, path);
1005
			xpt_path_inq(&cpi, path);
1006
			if (cpi.ccb_h.status == CAM_REQ_CMP &&
1006
			if (cam_stat(cpi.ccb_h.status) == CAM_REQ_CMP &&
1007
			    (cpi.hba_inquiry & PI_TAG_ABLE)) {
1007
			    (cpi.hba_inquiry & PI_TAG_ABLE)) {
1008
				/* Report SIM which tags are allowed. */
1008
				/* Report SIM which tags are allowed. */
1009
				bzero(&cts, sizeof(cts));
1009
				bzero(&cts, sizeof(cts));
Lines 1481-1487 ata_scan_bus(struct cam_periph *periph, union ccb *request_ccb) Link Here
1481
		/* If there is PMP... */
1481
		/* If there is PMP... */
1482
		if ((scan_info->cpi->hba_inquiry & PI_SATAPM) &&
1482
		if ((scan_info->cpi->hba_inquiry & PI_SATAPM) &&
1483
		    (scan_info->counter == scan_info->cpi->max_target)) {
1483
		    (scan_info->counter == scan_info->cpi->max_target)) {
1484
			if (work_ccb->ccb_h.status == CAM_REQ_CMP) {
1484
			if (cam_stat(work_ccb->ccb_h.status) == CAM_REQ_CMP) {
1485
				/* everything else will be probed by it */
1485
				/* everything else will be probed by it */
1486
				/* Free the current request path- we're done with it. */
1486
				/* Free the current request path- we're done with it. */
1487
				xpt_free_path(work_ccb->ccb_h.path);
1487
				xpt_free_path(work_ccb->ccb_h.path);
(-)b/sys/cam/cam.h (+5 lines)
Lines 309-314 typedef enum { Link Here
309
	CAM_SENT_SENSE		= 0x40000000
309
	CAM_SENT_SENSE		= 0x40000000
310
} cam_status;
310
} cam_status;
311
311
312
static inline cam_status cam_stat(cam_status s)
313
{
314
	return (s & CAM_STATUS_MASK);
315
}
316
312
typedef enum {
317
typedef enum {
313
	CAM_ESF_NONE		= 0x00,
318
	CAM_ESF_NONE		= 0x00,
314
	CAM_ESF_COMMAND		= 0x01,
319
	CAM_ESF_COMMAND		= 0x01,
(-)b/sys/cam/cam_xpt.c (-1 / +1 lines)
Lines 4018-4024 xpt_bus_register(struct cam_sim *sim, device_t parent, uint32_t bus) Link Here
4018
4018
4019
	xpt_path_inq(&cpi, path);
4019
	xpt_path_inq(&cpi, path);
4020
4020
4021
	if (cpi.ccb_h.status == CAM_REQ_CMP) {
4021
	if (cam_stat(cpi.ccb_h.status) == CAM_REQ_CMP) {
4022
		struct xpt_xport **xpt;
4022
		struct xpt_xport **xpt;
4023
4023
4024
		SET_FOREACH(xpt, cam_xpt_xport_set) {
4024
		SET_FOREACH(xpt, cam_xpt_xport_set) {
(-)b/sys/cam/nvme/nvme_da.c (-1 / +1 lines)
Lines 441-447 ndaioctl(struct disk *dp, u_long cmd, void *data, int fflag, Link Here
441
		 */
441
		 */
442
		cam_periph_unlock(periph);
442
		cam_periph_unlock(periph);
443
		cam_periph_unmapmem(ccb, &mapinfo);
443
		cam_periph_unmapmem(ccb, &mapinfo);
444
		error = (ccb->ccb_h.status == CAM_REQ_CMP) ? 0 : EIO;
444
		error = (cam_stat(ccb->ccb_h.status) == CAM_REQ_CMP) ? 0 : EIO;
445
out:
445
out:
446
		cam_periph_lock(periph);
446
		cam_periph_lock(periph);
447
		xpt_release_ccb(ccb);
447
		xpt_release_ccb(ccb);
(-)b/sys/cam/scsi/scsi_enc_ses.c (-2 / +2 lines)
Lines 986-992 ses_paths_iter(enc_softc_t *enc, enc_element_t *elm, Link Here
986
			xpt_setup_ccb(&cgd.ccb_h, path, CAM_PRIORITY_NORMAL);
986
			xpt_setup_ccb(&cgd.ccb_h, path, CAM_PRIORITY_NORMAL);
987
			cgd.ccb_h.func_code = XPT_GDEV_TYPE;
987
			cgd.ccb_h.func_code = XPT_GDEV_TYPE;
988
			xpt_action((union ccb *)&cgd);
988
			xpt_action((union ccb *)&cgd);
989
			if (cgd.ccb_h.status == CAM_REQ_CMP)
989
			if (cam_stat(cgd.ccb_h.status) == CAM_REQ_CMP)
990
				callback(enc, elm, path, callback_arg);
990
				callback(enc, elm, path, callback_arg);
991
991
992
			xpt_free_path(path);
992
			xpt_free_path(path);
Lines 1065-1071 ses_setphyspath_callback(enc_softc_t *enc, enc_element_t *elm, Link Here
1065
		xpt_action((union ccb *)&cdai);
1065
		xpt_action((union ccb *)&cdai);
1066
		if ((cdai.ccb_h.status & CAM_DEV_QFRZN) != 0)
1066
		if ((cdai.ccb_h.status & CAM_DEV_QFRZN) != 0)
1067
			cam_release_devq(cdai.ccb_h.path, 0, 0, 0, FALSE);
1067
			cam_release_devq(cdai.ccb_h.path, 0, 0, 0, FALSE);
1068
		if (cdai.ccb_h.status == CAM_REQ_CMP)
1068
		if (cam_stat(cdai.ccb_h.status) == CAM_REQ_CMP)
1069
			args->num_set++;
1069
			args->num_set++;
1070
	}
1070
	}
1071
	xpt_path_unlock(path);
1071
	xpt_path_unlock(path);

Return to bug 270459