Index: sys/cam/cam_ccb.h =================================================================== --- sys/cam/cam_ccb.h +++ sys/cam/cam_ccb.h @@ -1298,12 +1298,6 @@ #define CAM_TIME_DEFAULT 0x00000000 /* Use SIM default value */ #define CAM_TIME_INFINITY 0xFFFFFFFF /* Infinite timeout */ -#define CAM_SUCCESS 0 /* For signaling general success */ -#define CAM_FAILURE 1 /* For signaling general failure */ - -#define CAM_FALSE 0 -#define CAM_TRUE 1 - #define XPT_CCB_INVALID -1 /* for signaling a bad CCB to free */ /* Index: sys/cam/cam_xpt.c =================================================================== --- sys/cam/cam_xpt.c +++ sys/cam/cam_xpt.c @@ -930,7 +930,7 @@ if (xpt_sim == NULL) return (ENOMEM); - if ((status = xpt_bus_register(xpt_sim, NULL, 0)) != CAM_SUCCESS) { + if ((status = xpt_bus_register(xpt_sim, NULL, 0)) != CAM_REQ_CMP) { printf("xpt_init: xpt_bus_register failed with status %#x," " failing attach\n", status); return (EINVAL); @@ -3999,7 +3999,7 @@ * information specified by the user. Once interrupt services are * available, the bus will be probed. */ -int32_t +cam_status xpt_bus_register(struct cam_sim *sim, device_t parent, u_int32_t bus) { struct cam_eb *new_bus; @@ -4096,10 +4096,10 @@ xpt_free_path(path); } else xpt_free_path(path); - return (CAM_SUCCESS); + return (CAM_REQ_CMP); } -int32_t +cam_status xpt_bus_deregister(path_id_t pathid) { struct cam_path bus_path; Index: sys/cam/cam_xpt_sim.h =================================================================== --- sys/cam/cam_xpt_sim.h +++ sys/cam/cam_xpt_sim.h @@ -39,9 +39,9 @@ /* Functions accessed by SIM drivers */ #ifdef _KERNEL -int32_t xpt_bus_register(struct cam_sim *sim, device_t parent, +cam_status xpt_bus_register(struct cam_sim *sim, device_t parent, u_int32_t bus); -int32_t xpt_bus_deregister(path_id_t path_id); +cam_status xpt_bus_deregister(path_id_t path_id); u_int32_t xpt_freeze_simq(struct cam_sim *sim, u_int count); void xpt_release_simq(struct cam_sim *sim, int run_queue); u_int32_t xpt_freeze_devq(struct cam_path *path, u_int count); Index: sys/cam/ctl/ctl_frontend_cam_sim.c =================================================================== --- sys/cam/ctl/ctl_frontend_cam_sim.c +++ sys/cam/ctl/ctl_frontend_cam_sim.c @@ -186,7 +186,7 @@ goto bailout; } - if (xpt_bus_register(softc->sim, NULL, 0) != CAM_SUCCESS) { + if (xpt_bus_register(softc->sim, NULL, 0) != CAM_REQ_CMP) { printf("%s: error registering SIM\n", __func__); retval = ENOMEM; goto bailout; Index: sys/cam/mmc/mmc_sim.c =================================================================== --- sys/cam/mmc/mmc_sim.c +++ sys/cam/mmc/mmc_sim.c @@ -216,7 +216,7 @@ } mtx_lock(&mmc_sim->mtx); - if (xpt_bus_register(mmc_sim->sim, dev, 0) != 0) { + if (xpt_bus_register(mmc_sim->sim, dev, 0) != CAM_REQ_CMP) { device_printf(dev, "cannot register SCSI pass-through bus\n"); cam_sim_free(mmc_sim->sim, FALSE); cam_simq_free(mmc_sim->devq); Index: sys/dev/aac/aac_cam.c =================================================================== --- sys/dev/aac/aac_cam.c +++ sys/dev/aac/aac_cam.c @@ -231,7 +231,7 @@ /* Since every bus has it's own sim, every bus 'appears' as bus 0 */ mtx_lock(&inf->aac_sc->aac_io_lock); - if (xpt_bus_register(sim, dev, 0) != CAM_SUCCESS) { + if (xpt_bus_register(sim, dev, 0) != CAM_REQ_CMP) { cam_sim_free(sim, TRUE); mtx_unlock(&inf->aac_sc->aac_io_lock); return (EIO); Index: sys/dev/aacraid/aacraid_cam.c =================================================================== --- sys/dev/aacraid/aacraid_cam.c +++ sys/dev/aacraid/aacraid_cam.c @@ -297,7 +297,7 @@ /* Since every bus has it's own sim, every bus 'appears' as bus 0 */ mtx_lock(&inf->aac_sc->aac_io_lock); - if (aac_xpt_bus_register(sim, dev, 0) != CAM_SUCCESS) { + if (aac_xpt_bus_register(sim, dev, 0) != CAM_REQ_CMP) { cam_sim_free(sim, TRUE); mtx_unlock(&inf->aac_sc->aac_io_lock); return (EIO); Index: sys/dev/ahci/ahci.c =================================================================== --- sys/dev/ahci/ahci.c +++ sys/dev/ahci/ahci.c @@ -901,7 +901,7 @@ error = ENOMEM; goto err1; } - if (xpt_bus_register(ch->sim, dev, 0) != CAM_SUCCESS) { + if (xpt_bus_register(ch->sim, dev, 0) != CAM_REQ_CMP) { device_printf(dev, "unable to register xpt bus\n"); error = ENXIO; goto err2; Index: sys/dev/ahci/ahciem.c =================================================================== --- sys/dev/ahci/ahciem.c +++ sys/dev/ahci/ahciem.c @@ -130,7 +130,7 @@ error = ENOMEM; goto err1; } - if (xpt_bus_register(enc->sim, dev, 0) != CAM_SUCCESS) { + if (xpt_bus_register(enc->sim, dev, 0) != CAM_REQ_CMP) { device_printf(dev, "unable to register xpt bus\n"); error = ENXIO; goto err2; Index: sys/dev/aic7xxx/aic79xx_osm.c =================================================================== --- sys/dev/aic7xxx/aic79xx_osm.c +++ sys/dev/aic7xxx/aic79xx_osm.c @@ -252,7 +252,7 @@ goto fail; } - if (xpt_bus_register(sim, ahd->dev_softc, /*bus_id*/0) != CAM_SUCCESS) { + if (xpt_bus_register(sim, ahd->dev_softc, 0) != CAM_REQ_CMP) { cam_sim_free(sim, /*free_devq*/TRUE); sim = NULL; goto fail; Index: sys/dev/aic7xxx/aic7xxx_osm.c =================================================================== --- sys/dev/aic7xxx/aic7xxx_osm.c +++ sys/dev/aic7xxx/aic7xxx_osm.c @@ -200,7 +200,7 @@ goto fail; } - if (xpt_bus_register(sim, ahc->dev_softc, bus_id) != CAM_SUCCESS) { + if (xpt_bus_register(sim, ahc->dev_softc, bus_id) != CAM_REQ_CMP) { cam_sim_free(sim, /*free_devq*/TRUE); sim = NULL; goto fail; @@ -236,8 +236,7 @@ goto fail; } - if (xpt_bus_register(sim2, ahc->dev_softc, bus_id2) != - CAM_SUCCESS) { + if (xpt_bus_register(sim2, ahc->dev_softc, bus_id2) != CAM_REQ_CMP) { printf("ahc_attach: Unable to attach second " "bus due to resource shortage"); /* Index: sys/dev/amr/amr_cam.c =================================================================== --- sys/dev/amr/amr_cam.c +++ sys/dev/amr/amr_cam.c @@ -154,7 +154,8 @@ { struct amr_softc *sc; struct cam_devq *devq; - int chn, error; + int chn; + cam_status status; sc = device_get_softc(dev); @@ -186,9 +187,9 @@ /* register the bus ID so we can get it later */ mtx_lock(&sc->amr_list_lock); - error = xpt_bus_register(sc->amr_cam_sim[chn], sc->amr_dev,chn); + status = xpt_bus_register(sc->amr_cam_sim[chn], sc->amr_dev,chn); mtx_unlock(&sc->amr_list_lock); - if (error) { + if (status != CAM_REQ_CMP) { device_printf(sc->amr_dev, "CAM XPT bus registration failed\n"); return(ENXIO); Index: sys/dev/arcmsr/arcmsr.c =================================================================== --- sys/dev/arcmsr/arcmsr.c +++ sys/dev/arcmsr/arcmsr.c @@ -4946,7 +4946,7 @@ goto sim_alloc_failed; } ARCMSR_LOCK_ACQUIRE(&acb->isr_lock); - if(xpt_bus_register(acb->psim, dev, 0) != CAM_SUCCESS) { + if (xpt_bus_register(acb->psim, dev, 0) != CAM_REQ_CMP) { printf("arcmsr%d: xpt_bus_register failure!\n", unit); goto xpt_bus_failed; } Index: sys/dev/ata/ata-all.c =================================================================== --- sys/dev/ata/ata-all.c +++ sys/dev/ata/ata-all.c @@ -192,7 +192,7 @@ error = ENOMEM; goto err1; } - if (xpt_bus_register(ch->sim, dev, 0) != CAM_SUCCESS) { + if (xpt_bus_register(ch->sim, dev, 0) != CAM_REQ_CMP) { device_printf(dev, "unable to register xpt bus\n"); error = ENXIO; goto err2; Index: sys/dev/ciss/ciss.c =================================================================== --- sys/dev/ciss/ciss.c +++ sys/dev/ciss/ciss.c @@ -2900,7 +2900,7 @@ */ mtx_lock(&sc->ciss_mtx); if (i == 0 || sc->ciss_controllers[i].physical.bus != 0) { - if (xpt_bus_register(sc->ciss_cam_sim[i], sc->ciss_dev, i) != 0) { + if (xpt_bus_register(sc->ciss_cam_sim[i], sc->ciss_dev, i) != CAM_REQ_CMP) { ciss_printf(sc, "can't register SCSI bus %d\n", i); mtx_unlock(&sc->ciss_mtx); return (ENXIO); @@ -2922,7 +2922,7 @@ } mtx_lock(&sc->ciss_mtx); - if (xpt_bus_register(sc->ciss_cam_sim[i], sc->ciss_dev, i) != 0) { + if (xpt_bus_register(sc->ciss_cam_sim[i], sc->ciss_dev, i) != CAM_REQ_CMP) { ciss_printf(sc, "can't register SCSI bus %d\n", i); mtx_unlock(&sc->ciss_mtx); return (ENXIO); Index: sys/dev/esp/ncr53c9x.c =================================================================== --- sys/dev/esp/ncr53c9x.c +++ sys/dev/esp/ncr53c9x.c @@ -350,7 +350,7 @@ NCR_LOCK(sc); - if (xpt_bus_register(sim, sc->sc_dev, 0) != CAM_SUCCESS) { + if (xpt_bus_register(sim, sc->sc_dev, 0) != CAM_REQ_CMP) { device_printf(sc->sc_dev, "cannot register bus\n"); error = EIO; goto fail_lock; Index: sys/dev/firewire/sbp.c =================================================================== --- sys/dev/firewire/sbp.c +++ sys/dev/firewire/sbp.c @@ -1969,7 +1969,7 @@ } SBP_LOCK(sbp); - if (xpt_bus_register(sbp->sim, dev, /*bus*/0) != CAM_SUCCESS) + if (xpt_bus_register(sbp->sim, dev, /*bus*/0) != CAM_REQ_CMP) goto fail; if (xpt_create_path(&sbp->path, NULL, cam_sim_path(sbp->sim), Index: sys/dev/firewire/sbp_targ.c =================================================================== --- sys/dev/firewire/sbp_targ.c +++ sys/dev/firewire/sbp_targ.c @@ -1973,7 +1973,7 @@ } SBP_LOCK(sc); - if (xpt_bus_register(sc->sim, dev, /*bus*/0) != CAM_SUCCESS) + if (xpt_bus_register(sc->sim, dev, /*bus*/0) != CAM_REQ_CMP) goto fail; if (xpt_create_path(&sc->path, /*periph*/ NULL, cam_sim_path(sc->sim), Index: sys/dev/hpt27xx/hpt27xx_osm_bsd.c =================================================================== --- sys/dev/hpt27xx/hpt27xx_osm_bsd.c +++ sys/dev/hpt27xx/hpt27xx_osm_bsd.c @@ -1232,7 +1232,7 @@ } hpt_lock_vbus(vbus_ext); - if (xpt_bus_register(vbus_ext->sim, NULL, 0) != CAM_SUCCESS) { + if (xpt_bus_register(vbus_ext->sim, NULL, 0) != CAM_REQ_CMP) { hpt_unlock_vbus(vbus_ext); os_printk("xpt_bus_register failed"); cam_sim_free(vbus_ext->sim, /*free devq*/ TRUE); Index: sys/dev/hptiop/hptiop.c =================================================================== --- sys/dev/hptiop/hptiop.c +++ sys/dev/hptiop/hptiop.c @@ -2022,7 +2022,7 @@ goto srb_dmamap_unload; } hptiop_lock_adapter(hba); - if (xpt_bus_register(hba->sim, dev, 0) != CAM_SUCCESS) + if (xpt_bus_register(hba->sim, dev, 0) != CAM_REQ_CMP) { device_printf(dev, "xpt_bus_register failed\n"); goto free_cam_sim; Index: sys/dev/hptmv/entry.c =================================================================== --- sys/dev/hptmv/entry.c +++ sys/dev/hptmv/entry.c @@ -2033,7 +2033,7 @@ } mtx_lock(&pAdapter->lock); - if (xpt_bus_register(hpt_vsim, dev, 0) != CAM_SUCCESS) + if (xpt_bus_register(hpt_vsim, dev, 0) != CAM_REQ_CMP) { cam_sim_free(hpt_vsim, /*free devq*/ TRUE); mtx_unlock(&pAdapter->lock); Index: sys/dev/hptnr/hptnr_osm_bsd.c =================================================================== --- sys/dev/hptnr/hptnr_osm_bsd.c +++ sys/dev/hptnr/hptnr_osm_bsd.c @@ -1418,7 +1418,7 @@ return ; } - if (xpt_bus_register(vbus_ext->sim, NULL, 0) != CAM_SUCCESS) { + if (xpt_bus_register(vbus_ext->sim, NULL, 0) != CAM_REQ_CMP) { os_printk("xpt_bus_register failed"); cam_sim_free(vbus_ext->sim, /*free devq*/ TRUE); vbus_ext->sim = NULL; Index: sys/dev/hptrr/hptrr_osm_bsd.c =================================================================== --- sys/dev/hptrr/hptrr_osm_bsd.c +++ sys/dev/hptrr/hptrr_osm_bsd.c @@ -1065,7 +1065,7 @@ } hpt_lock_vbus(vbus_ext); - if (xpt_bus_register(vbus_ext->sim, NULL, 0) != CAM_SUCCESS) { + if (xpt_bus_register(vbus_ext->sim, NULL, 0) != CAM_REQ_CMP) { os_printk("xpt_bus_register failed"); cam_sim_free(vbus_ext->sim, /*free devq*/ TRUE); hpt_unlock_vbus(vbus_ext); Index: sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c =================================================================== --- sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c +++ sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c @@ -1167,7 +1167,7 @@ mtx_lock(&sc->hs_lock); /* bus_id is set to 0, need to get it from VMBUS channel query? */ - if (xpt_bus_register(sc->hs_sim, dev, 0) != CAM_SUCCESS) { + if (xpt_bus_register(sc->hs_sim, dev, 0) != CAM_REQ_CMP) { cam_sim_free(sc->hs_sim, /*free_devq*/TRUE); mtx_unlock(&sc->hs_lock); device_printf(dev, "Unable to register SCSI bus\n"); Index: sys/dev/iir/iir.c =================================================================== --- sys/dev/iir/iir.c +++ sys/dev/iir/iir.c @@ -515,7 +515,7 @@ gdt, device_get_unit(gdt->sc_devnode), &gdt->sc_lock, /*untagged*/1, /*tagged*/GDT_MAXCMDS, devq); mtx_lock(&gdt->sc_lock); - if (xpt_bus_register(gdt->sims[i], gdt->sc_devnode, i) != CAM_SUCCESS) { + if (xpt_bus_register(gdt->sims[i], gdt->sc_devnode, i) != CAM_REQ_CMP) { cam_sim_free(gdt->sims[i], /*free_devq*/i == 0); mtx_unlock(&gdt->sc_lock); break; Index: sys/dev/isci/isci_controller.c =================================================================== --- sys/dev/isci/isci_controller.c +++ sys/dev/isci/isci_controller.c @@ -626,8 +626,7 @@ return (-1); } - if(xpt_bus_register(controller->sim, parent, controller->index) - != CAM_SUCCESS) { + if (xpt_bus_register(controller->sim, parent, controller->index) != CAM_REQ_CMP) { isci_log_message(0, "ISCI", "xpt_bus_register...fails \n"); cam_sim_free(controller->sim, TRUE); mtx_unlock(&controller->lock); Index: sys/dev/iscsi_initiator/isc_cam.c =================================================================== --- sys/dev/iscsi_initiator/isc_cam.c +++ sys/dev/iscsi_initiator/isc_cam.c @@ -327,9 +327,7 @@ return ENXIO; } - if(xpt_bus_register(sim, - NULL, - 0/*bus_number*/) != CAM_SUCCESS) { + if (xpt_bus_register(sim, NULL, 0) != CAM_REQ_CMP) { cam_sim_free(sim, /*free_devq*/TRUE); mtx_destroy(&sp->cam_mtx); return ENXIO; Index: sys/dev/isp/isp_freebsd.c =================================================================== --- sys/dev/isp/isp_freebsd.c +++ sys/dev/isp/isp_freebsd.c @@ -126,7 +126,7 @@ if (sim == NULL) return (ENOMEM); - if (xpt_bus_register(sim, isp->isp_dev, chan) != CAM_SUCCESS) { + if (xpt_bus_register(sim, isp->isp_dev, chan) != CAM_REQ_CMP) { cam_sim_free(sim, FALSE); return (EIO); } Index: sys/dev/mfi/mfi_cam.c =================================================================== --- sys/dev/mfi/mfi_cam.c +++ sys/dev/mfi/mfi_cam.c @@ -153,7 +153,7 @@ mfisc->mfi_cam_rescan_cb = mfip_cam_rescan; mtx_lock(&mfisc->mfi_io_lock); - if (xpt_bus_register(sc->sim, dev, 0) != 0) { + if (xpt_bus_register(sc->sim, dev, 0) != CAM_REQ_CMP) { device_printf(dev, "XPT bus registration failed\n"); cam_sim_free(sc->sim, FALSE); sc->sim = NULL; Index: sys/dev/mly/mly.c =================================================================== --- sys/dev/mly/mly.c +++ sys/dev/mly/mly.c @@ -1961,7 +1961,7 @@ return(ENOMEM); } MLY_LOCK(sc); - if (xpt_bus_register(sc->mly_cam_sim[chn], sc->mly_dev, chn)) { + if (xpt_bus_register(sc->mly_cam_sim[chn], sc->mly_dev, chn) != CAM_REQ_CMP) { MLY_UNLOCK(sc); mly_printf(sc, "CAM XPT phsyical channel registration failed\n"); return(ENXIO); @@ -1984,7 +1984,7 @@ return(ENOMEM); } MLY_LOCK(sc); - if (xpt_bus_register(sc->mly_cam_sim[chn], sc->mly_dev, chn)) { + if (xpt_bus_register(sc->mly_cam_sim[chn], sc->mly_dev, chn) != CAM_REQ_CMP) { MLY_UNLOCK(sc); mly_printf(sc, "CAM XPT virtual channel registration failed\n"); return(ENXIO); Index: sys/dev/mmcnull/mmcnull.c =================================================================== --- sys/dev/mmcnull/mmcnull.c +++ sys/dev/mmcnull/mmcnull.c @@ -127,7 +127,7 @@ } mtx_lock(&sc->sc_mtx); - if (xpt_bus_register(sc->sim, dev, 0) != 0) { + if (xpt_bus_register(sc->sim, dev, 0) != CAM_REQ_CMP) { device_printf(dev, "cannot register SCSI pass-through bus\n"); cam_sim_free(sc->sim, FALSE); Index: sys/dev/mpt/mpt_cam.c =================================================================== --- sys/dev/mpt/mpt_cam.c +++ sys/dev/mpt/mpt_cam.c @@ -340,7 +340,7 @@ * Register exactly this bus. */ MPT_LOCK(mpt); - if (xpt_bus_register(mpt->sim, mpt->dev, 0) != CAM_SUCCESS) { + if (xpt_bus_register(mpt->sim, mpt->dev, 0) != CAM_REQ_CMP) { mpt_prt(mpt, "Bus registration Failed!\n"); error = ENOMEM; MPT_UNLOCK(mpt); @@ -379,8 +379,7 @@ * Register this bus. */ MPT_LOCK(mpt); - if (xpt_bus_register(mpt->phydisk_sim, mpt->dev, 1) != - CAM_SUCCESS) { + if (xpt_bus_register(mpt->phydisk_sim, mpt->dev, 1) != CAM_REQ_CMP) { mpt_prt(mpt, "Physical Disk Bus registration Failed!\n"); error = ENOMEM; MPT_UNLOCK(mpt); Index: sys/dev/mrsas/mrsas_cam.c =================================================================== --- sys/dev/mrsas/mrsas_cam.c +++ sys/dev/mrsas/mrsas_cam.c @@ -180,7 +180,7 @@ taskqueue_start_threads(&sc->ev_tq, 1, 255, "%s taskq", device_get_nameunit(sc->mrsas_dev)); mtx_lock(&sc->sim_lock); - if (xpt_bus_register(sc->sim_0, sc->mrsas_dev, 0) != CAM_SUCCESS) { + if (xpt_bus_register(sc->sim_0, sc->mrsas_dev, 0) != CAM_REQ_CMP) { cam_sim_free(sc->sim_0, TRUE); /* passing true frees the devq */ mtx_unlock(&sc->sim_lock); return (ENXIO); @@ -207,7 +207,7 @@ return (ENXIO); } mtx_lock(&sc->sim_lock); - if (xpt_bus_register(sc->sim_1, sc->mrsas_dev, 1) != CAM_SUCCESS) { + if (xpt_bus_register(sc->sim_1, sc->mrsas_dev, 1) != CAM_REQ_CMP) { cam_sim_free(sc->sim_1, TRUE); /* passing true frees the devq */ mtx_unlock(&sc->sim_lock); return (ENXIO); Index: sys/dev/mvs/mvs.c =================================================================== --- sys/dev/mvs/mvs.c +++ sys/dev/mvs/mvs.c @@ -184,7 +184,7 @@ error = ENOMEM; goto err1; } - if (xpt_bus_register(ch->sim, dev, 0) != CAM_SUCCESS) { + if (xpt_bus_register(ch->sim, dev, 0) != CAM_REQ_CMP) { device_printf(dev, "unable to register xpt bus\n"); error = ENXIO; goto err2; Index: sys/dev/nvme/nvme_sim.c =================================================================== --- sys/dev/nvme/nvme_sim.c +++ sys/dev/nvme/nvme_sim.c @@ -297,7 +297,7 @@ cam_simq_free(devq); goto err1; } - if (xpt_bus_register(sc->s_sim, ctrlr->dev, 0) != CAM_SUCCESS) { + if (xpt_bus_register(sc->s_sim, ctrlr->dev, 0) != CAM_REQ_CMP) { printf("Failed to create a bus\n"); goto err2; } Index: sys/dev/ocs_fc/ocs_cam.c =================================================================== --- sys/dev/ocs_fc/ocs_cam.c +++ sys/dev/ocs_fc/ocs_cam.c @@ -116,7 +116,7 @@ } mtx_lock(&ocs->sim_lock); - if (CAM_SUCCESS != xpt_bus_register(sim, ocs->dev, chan)) { + if (xpt_bus_register(sim, ocs->dev, chan) != CAM_REQ_CMP) { device_printf(ocs->dev, "Can't register bus %d\n", 0); mtx_unlock(&ocs->sim_lock); cam_sim_free(sim, FALSE); Index: sys/dev/pms/freebsd/driver/ini/src/agtiapi.c =================================================================== --- sys/dev/pms/freebsd/driver/ini/src/agtiapi.c +++ sys/dev/pms/freebsd/driver/ini/src/agtiapi.c @@ -900,7 +900,7 @@ pmsc->dev_scan = agFALSE; //one cam sim per scsi bus mtx_lock( &thisCardInst->pmIOLock ); - if ( xpt_bus_register( lsim, devx, 0 ) != CAM_SUCCESS ) + if (xpt_bus_register(lsim, devx, 0) != CAM_REQ_CMP) { // bus 0 cam_sim_free( lsim, TRUE ); mtx_unlock( &thisCardInst->pmIOLock ); Index: sys/dev/rtsx/rtsx.c =================================================================== --- sys/dev/rtsx/rtsx.c +++ sys/dev/rtsx/rtsx.c @@ -3697,7 +3697,7 @@ goto destroy_rtsx_irq; } mtx_lock(&sc->rtsx_sim_mtx); - if (xpt_bus_register(sc->rtsx_sim, dev, 0) != 0) { + if (xpt_bus_register(sc->rtsx_sim, dev, 0) != CAM_REQ_CMP) { device_printf(dev, "Can't register SCSI pass-through bus\n"); mtx_unlock(&sc->rtsx_sim_mtx); goto destroy_rtsx_irq; Index: sys/dev/sdhci/sdhci.c =================================================================== --- sys/dev/sdhci/sdhci.c +++ sys/dev/sdhci/sdhci.c @@ -2494,7 +2494,7 @@ } mtx_lock(&slot->sim_mtx); - if (xpt_bus_register(slot->sim, slot->bus, 0) != 0) { + if (xpt_bus_register(slot->sim, slot->bus, 0) != CAM_REQ_CMP) { slot_printf(slot, "cannot register SCSI pass-through bus\n"); cam_sim_free(slot->sim, FALSE); cam_simq_free(slot->devq); Index: sys/dev/siis/siis.c =================================================================== --- sys/dev/siis/siis.c +++ sys/dev/siis/siis.c @@ -520,7 +520,7 @@ error = ENOMEM; goto err1; } - if (xpt_bus_register(ch->sim, dev, 0) != CAM_SUCCESS) { + if (xpt_bus_register(ch->sim, dev, 0) != CAM_REQ_CMP) { device_printf(dev, "unable to register xpt bus\n"); error = ENXIO; goto err2; Index: sys/dev/smartpqi/smartpqi_cam.c =================================================================== --- sys/dev/smartpqi/smartpqi_cam.c +++ sys/dev/smartpqi/smartpqi_cam.c @@ -1232,7 +1232,7 @@ softs->os_specific.sim = sim; mtx_lock(&softs->os_specific.cam_lock); status = xpt_bus_register(sim, softs->os_specific.pqi_dev, 0); - if (status != CAM_SUCCESS) { + if (status != CAM_REQ_CMP) { DBG_ERR("xpt_bus_register failed status=%d\n", status); cam_sim_free(softs->os_specific.sim, FALSE); cam_simq_free(softs->os_specific.devq); Index: sys/dev/sym/sym_hipd.c =================================================================== --- sys/dev/sym/sym_hipd.c +++ sys/dev/sym/sym_hipd.c @@ -8870,7 +8870,7 @@ SYM_LOCK(); - if (xpt_bus_register(sim, np->device, 0) != CAM_SUCCESS) + if (xpt_bus_register(sim, np->device, 0) != CAM_REQ_CMP) goto fail; np->sim = sim; sim = NULL; Index: sys/dev/twa/tw_osl_cam.c =================================================================== --- sys/dev/twa/tw_osl_cam.c +++ sys/dev/twa/tw_osl_cam.c @@ -114,7 +114,7 @@ */ tw_osli_dbg_dprintf(3, sc, "Calling xpt_bus_register"); mtx_lock(sc->sim_lock); - if (xpt_bus_register(sc->sim, sc->bus_dev, 0) != CAM_SUCCESS) { + if (xpt_bus_register(sc->sim, sc->bus_dev, 0) != CAM_REQ_CMP) { cam_sim_free(sc->sim, TRUE); sc->sim = NULL; /* so cam_detach will not try to free it */ tw_osli_printf(sc, "error = %d", Index: sys/dev/tws/tws_cam.c =================================================================== --- sys/dev/tws/tws_cam.c +++ sys/dev/tws/tws_cam.c @@ -163,9 +163,7 @@ } /* Register the bus. */ mtx_lock(&sc->sim_lock); - if (xpt_bus_register(sc->sim, - sc->tws_dev, - 0) != CAM_SUCCESS) { + if (xpt_bus_register(sc->sim, sc->tws_dev, 0) != CAM_REQ_CMP) { cam_sim_free(sc->sim, TRUE); /* passing true will free the devq */ sc->sim = NULL; /* so cam_detach will not try to free it */ mtx_unlock(&sc->sim_lock); Index: sys/dev/usb/storage/umass.c =================================================================== --- sys/dev/usb/storage/umass.c +++ sys/dev/usb/storage/umass.c @@ -2099,7 +2099,7 @@ mtx_lock(&sc->sc_mtx); status = xpt_bus_register(sc->sc_sim, sc->sc_dev, sc->sc_unit); - if (status != CAM_SUCCESS) { + if (status != CAM_REQ_CMP) { cam_sim_free(sc->sc_sim, /* free_devq */ TRUE); mtx_unlock(&sc->sc_mtx); printf("%s: xpt_bus_register failed with status %#x\n", Index: sys/dev/virtio/scsi/virtio_scsi.c =================================================================== --- sys/dev/virtio/scsi/virtio_scsi.c +++ sys/dev/virtio/scsi/virtio_scsi.c @@ -609,7 +609,7 @@ VTSCSI_LOCK(sc); - if (xpt_bus_register(sc->vtscsi_sim, dev, 0) != CAM_SUCCESS) { + if (xpt_bus_register(sc->vtscsi_sim, dev, 0) != CAM_REQ_CMP) { error = ENOMEM; device_printf(dev, "cannot register XPT bus\n"); goto fail; Index: sys/dev/vmware/pvscsi/pvscsi.c =================================================================== --- sys/dev/vmware/pvscsi/pvscsi.c +++ sys/dev/vmware/pvscsi/pvscsi.c @@ -1548,7 +1548,7 @@ { if (sc->sim) { - int32_t status; + cam_status status; if (sc->bus_path) { xpt_free_path(sc->bus_path); @@ -1730,7 +1730,7 @@ mtx_lock(&sc->lock); - if (xpt_bus_register(sc->sim, dev, 0) != CAM_SUCCESS) { + if (xpt_bus_register(sc->sim, dev, 0) != CAM_REQ_CMP) { device_printf(dev, "xpt bus register failed\n"); pvscsi_free_all(sc); mtx_unlock(&sc->lock); Index: sys/powerpc/mpc85xx/fsl_sata.c =================================================================== --- sys/powerpc/mpc85xx/fsl_sata.c +++ sys/powerpc/mpc85xx/fsl_sata.c @@ -392,7 +392,7 @@ error = ENOMEM; goto err1; } - if (xpt_bus_register(ch->sim, dev, 0) != CAM_SUCCESS) { + if (xpt_bus_register(ch->sim, dev, 0) != CAM_REQ_CMP) { device_printf(dev, "unable to register xpt bus\n"); error = ENXIO; goto err2; Index: sys/powerpc/ps3/ps3cdrom.c =================================================================== --- sys/powerpc/ps3/ps3cdrom.c +++ sys/powerpc/ps3/ps3cdrom.c @@ -165,6 +165,7 @@ struct ps3cdrom_xfer *xp; struct ccb_setasync csa; int i, err; + cam_status status; sc->sc_dev = dev; @@ -245,17 +246,17 @@ PS3CDROM_LOCK(sc); - err = xpt_bus_register(sc->sc_sim, dev, 0); - if (err != CAM_SUCCESS) { + status = xpt_bus_register(sc->sc_sim, dev, 0); + if (status != CAM_REQ_CMP) { device_printf(dev, "Could not register XPT bus\n"); err = ENXIO; PS3CDROM_UNLOCK(sc); goto fail_free_sim; } - err = xpt_create_path(&sc->sc_path, NULL, cam_sim_path(sc->sc_sim), + status = xpt_create_path(&sc->sc_path, NULL, cam_sim_path(sc->sc_sim), CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD); - if (err != CAM_REQ_CMP) { + if (status != CAM_REQ_CMP) { device_printf(dev, "Could not create XPT path\n"); err = ENOMEM; PS3CDROM_UNLOCK(sc); Index: sys/powerpc/pseries/phyp_vscsi.c =================================================================== --- sys/powerpc/pseries/phyp_vscsi.c +++ sys/powerpc/pseries/phyp_vscsi.c @@ -369,7 +369,7 @@ } mtx_lock(&sc->io_lock); - if (xpt_bus_register(sc->sim, dev, 0) != 0) { + if (xpt_bus_register(sc->sim, dev, 0) != CAM_REQ_CMP) { device_printf(dev, "XPT bus registration failed\n"); cam_sim_free(sc->sim, FALSE); sc->sim = NULL;