qcacld-3.0: Modify DSC trans assert to check ancestors

Currently, APIs in the dsc_*_trans_assert() family assert a transition
is in flight on the given node itself. Instead, replace this API family
with another, dsc_*_assert_trans_protected(), which assert a
transition is in flight on the given node or any of its ancestors.

Change-Id: I5fb07000f955a49a4e5529806f4e49d9dbc8acb7
CRs-Fixed: 2347789
This commit is contained in:
Dustin Brown
2018-11-09 14:50:45 -08:00
committed by nshrivas
parent 8c282e4087
commit c35ea2d785
6 changed files with 28 additions and 20 deletions

View File

@@ -231,20 +231,22 @@ void dsc_vdev_trans_stop(struct dsc_vdev *vdev)
dsc_exit();
}
static void __dsc_vdev_trans_assert(struct dsc_vdev *vdev)
static void __dsc_vdev_assert_trans_protected(struct dsc_vdev *vdev)
{
if (!dsc_assert(vdev))
return;
__dsc_driver_lock(vdev);
dsc_assert(__dsc_trans_active(&vdev->trans));
dsc_assert(__dsc_trans_active(&vdev->trans) ||
__dsc_trans_active(&vdev->psoc->trans) ||
__dsc_trans_active(&vdev->psoc->driver->trans));
__dsc_driver_unlock(vdev);
}
void dsc_vdev_trans_assert(struct dsc_vdev *vdev)
void dsc_vdev_assert_trans_protected(struct dsc_vdev *vdev)
{
dsc_enter();
__dsc_vdev_trans_assert(vdev);
__dsc_vdev_assert_trans_protected(vdev);
dsc_exit();
}