1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

Add missing locking for SBus controllers.

This commit is contained in:
Scott Long 2007-11-05 11:22:18 +00:00
parent aefac17759
commit 762d6411cf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=173359

View File

@ -327,21 +327,26 @@ isp_sbus_attach(device_t dev)
/*
* Make sure we're in reset state.
*/
ISP_LOCK(isp);
isp_reset(isp);
if (isp->isp_state != ISP_RESETSTATE) {
isp_uninit(isp);
ISP_UNLOCK(isp);
goto bad;
}
isp_init(isp);
if (isp->isp_role != ISP_ROLE_NONE && isp->isp_state != ISP_INITSTATE) {
isp_uninit(isp);
ISP_UNLOCK(isp);
goto bad;
}
isp_attach(isp);
if (isp->isp_role != ISP_ROLE_NONE && isp->isp_state != ISP_RUNSTATE) {
isp_uninit(isp);
ISP_UNLOCK(isp);
goto bad;
}
ISP_UNLOCK(isp);
return (0);
bad: