* free_anchored_buffers - free device's anchored items
* @mdev: the device
* @channel: channel ID
+ * @status: status of MBO termination
*/
-static void free_anchored_buffers(struct most_dev *mdev, unsigned int channel)
+static void free_anchored_buffers(struct most_dev *mdev, unsigned int channel,
+ enum mbo_status_flags status)
{
struct mbo *mbo;
struct buf_anchor *anchor, *tmp;
wait_for_completion(&anchor->urb_compl);
}
if ((mbo) && (mbo->complete)) {
- mbo->status = MBO_E_CLOSE;
+ mbo->status = status;
mbo->processed_length = 0;
mbo->complete(mbo);
}
mdev->is_channel_healthy[channel] = false;
mutex_lock(&mdev->io_mutex);
- free_anchored_buffers(mdev, channel);
+ free_anchored_buffers(mdev, channel, MBO_E_CLOSE);
if (mdev->padding_active[channel])
mdev->padding_active[channel] = false;