Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 355030
b: refs/heads/master
c: d7237e2
h: refs/heads/master
v: v3
  • Loading branch information
Jon Mason authored and Greg Kroah-Hartman committed Jan 20, 2013
1 parent 79753ed commit f7950bd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f766755c3057c36dc0796d2b0c633611dde6eccf
refs/heads/master: d7237e22bbcffc3237a234fdf165fde4c2b0a22d
13 changes: 10 additions & 3 deletions trunk/drivers/ntb/ntb_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,10 +368,14 @@ static ssize_t debugfs_read(struct file *filp, char __user *ubuf, size_t count,
loff_t *offp)
{
struct ntb_transport_qp *qp;
char buf[1024];
char *buf;
ssize_t ret, out_offset, out_count;

out_count = 1024;
out_count = 600;

buf = kmalloc(out_count, GFP_KERNEL);
if (!buf)
return -ENOMEM;

qp = filp->private_data;
out_offset = 0;
Expand Down Expand Up @@ -410,10 +414,13 @@ static ssize_t debugfs_read(struct file *filp, char __user *ubuf, size_t count,
"tx_mw_end - \t%p\n", qp->tx_mw_end);

out_offset += snprintf(buf + out_offset, out_count - out_offset,
"QP Link %s\n", (qp->qp_link == NTB_LINK_UP) ?
"\nQP Link %s\n", (qp->qp_link == NTB_LINK_UP) ?
"Up" : "Down");
if (out_offset > out_count)
out_offset = out_count;

ret = simple_read_from_buffer(ubuf, count, offp, buf, out_offset);
kfree(buf);
return ret;
}

Expand Down

0 comments on commit f7950bd

Please sign in to comment.