Remove unneeded locking around xpt_bus_[de]register().
MFC after: 2 weeks
This commit is contained in:
parent
219f1919ab
commit
1553bf11b9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=367985
@ -121,17 +121,12 @@ isp_attach_chan(ispsoftc_t *isp, struct cam_devq *devq, int chan)
|
||||
if (sim == NULL)
|
||||
return (ENOMEM);
|
||||
|
||||
ISP_LOCK(isp);
|
||||
if (xpt_bus_register(sim, isp->isp_dev, chan) != CAM_SUCCESS) {
|
||||
ISP_UNLOCK(isp);
|
||||
cam_sim_free(sim, FALSE);
|
||||
return (EIO);
|
||||
}
|
||||
ISP_UNLOCK(isp);
|
||||
if (xpt_create_path(&path, NULL, cam_sim_path(sim), CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) {
|
||||
ISP_LOCK(isp);
|
||||
xpt_bus_deregister(cam_sim_path(sim));
|
||||
ISP_UNLOCK(isp);
|
||||
cam_sim_free(sim, FALSE);
|
||||
return (ENXIO);
|
||||
}
|
||||
@ -168,9 +163,7 @@ isp_attach_chan(ispsoftc_t *isp, struct cam_devq *devq, int chan)
|
||||
if (kproc_create(isp_kthread, fc, &fc->kproc, 0, 0,
|
||||
"%s_%d", device_get_nameunit(isp->isp_osinfo.dev), chan)) {
|
||||
xpt_free_path(fc->path);
|
||||
ISP_LOCK(isp);
|
||||
xpt_bus_deregister(cam_sim_path(fc->sim));
|
||||
ISP_UNLOCK(isp);
|
||||
cam_sim_free(fc->sim, FALSE);
|
||||
return (ENOMEM);
|
||||
}
|
||||
@ -285,9 +278,7 @@ isp_attach(ispsoftc_t *isp)
|
||||
ISP_GET_PC(isp, chan, sim, sim);
|
||||
ISP_GET_PC(isp, chan, path, path);
|
||||
xpt_free_path(path);
|
||||
ISP_LOCK(isp);
|
||||
xpt_bus_deregister(cam_sim_path(sim));
|
||||
ISP_UNLOCK(isp);
|
||||
cam_sim_free(sim, FALSE);
|
||||
}
|
||||
cam_simq_free(isp->isp_osinfo.devq);
|
||||
|
Loading…
Reference in New Issue
Block a user