Commit 292f82c8 authored by Alexander Usyskin's avatar Alexander Usyskin Committed by Greg Kroah-Hartman

mei: debug prints with client info in read

Add client info to debug prints in the read function to
ease on debugging efforts.
Signed-off-by: default avatarAlexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 900f4450
...@@ -183,8 +183,7 @@ static ssize_t mei_read(struct file *file, char __user *ubuf, ...@@ -183,8 +183,7 @@ static ssize_t mei_read(struct file *file, char __user *ubuf,
err = mei_cl_read_start(cl, length, file); err = mei_cl_read_start(cl, length, file);
if (err && err != -EBUSY) { if (err && err != -EBUSY) {
dev_dbg(dev->dev, cl_dbg(dev, cl, "mei start read failure status = %d\n", err);
"mei start read failure with status = %d\n", err);
rets = err; rets = err;
goto out; goto out;
} }
...@@ -228,11 +227,11 @@ static ssize_t mei_read(struct file *file, char __user *ubuf, ...@@ -228,11 +227,11 @@ static ssize_t mei_read(struct file *file, char __user *ubuf,
/* now copy the data to user space */ /* now copy the data to user space */
if (cb->status) { if (cb->status) {
rets = cb->status; rets = cb->status;
dev_dbg(dev->dev, "read operation failed %d\n", rets); cl_dbg(dev, cl, "read operation failed %d\n", rets);
goto free; goto free;
} }
dev_dbg(dev->dev, "buf.size = %d buf.idx= %ld\n", cl_dbg(dev, cl, "buf.size = %d buf.idx = %ld\n",
cb->buf.size, cb->buf_idx); cb->buf.size, cb->buf_idx);
if (length == 0 || ubuf == NULL || *offset > cb->buf_idx) { if (length == 0 || ubuf == NULL || *offset > cb->buf_idx) {
rets = -EMSGSIZE; rets = -EMSGSIZE;
...@@ -258,7 +257,7 @@ static ssize_t mei_read(struct file *file, char __user *ubuf, ...@@ -258,7 +257,7 @@ static ssize_t mei_read(struct file *file, char __user *ubuf,
mei_io_cb_free(cb); mei_io_cb_free(cb);
out: out:
dev_dbg(dev->dev, "end mei read rets= %d\n", rets); cl_dbg(dev, cl, "end mei read rets = %d\n", rets);
mutex_unlock(&dev->device_lock); mutex_unlock(&dev->device_lock);
return rets; return rets;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment