summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorChristian Gromm <christian.gromm@microchip.com>2016-08-19 11:12:46 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-21 16:53:56 +0200
commit9ed745ff8e80fbb600f386013bab9c361202866c (patch)
treefb6cb79e0056564965dae3b953dbd963babed432 /drivers/staging
parentcce930193778f6f3bb0f57b871080da0ca3d1f88 (diff)
staging: most: hdm-usb: provide MBO status when freeing buffers
This patch adds the additional status parameter to function free_anchored_buffers. This allows to dispatch further processing based on this flag. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/most/hdm-usb/hdm_usb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c b/drivers/staging/most/hdm-usb/hdm_usb.c
index 79277ddf4e43..bc2d174c5fdf 100644
--- a/drivers/staging/most/hdm-usb/hdm_usb.c
+++ b/drivers/staging/most/hdm-usb/hdm_usb.c
@@ -190,8 +190,10 @@ static inline int drci_wr_reg(struct usb_device *dev, u16 reg, u16 data)
* 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;
@@ -212,7 +214,7 @@ static void free_anchored_buffers(struct most_dev *mdev, unsigned int channel)
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);
}
@@ -288,7 +290,7 @@ static int hdm_poison_channel(struct most_interface *iface, int channel)
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;