mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
virtio: make add_buf return capacity remaining
This API change means that virtio_net can tell how much capacity remains for buffers. It's necessarily fuzzy, since VIRTIO_RING_F_INDIRECT_DESC means we can fit any number of descriptors in one, *if* we can kmalloc. Signed-off-by: Rusty Russell <[email protected]> Cc: Dinesh Subhraveti <[email protected]>
This commit is contained in:
parent
f68d24082e
commit
3c1b27d504
8 changed files with 19 additions and 15 deletions
|
|
@ -200,7 +200,7 @@ p9_virtio_request(struct p9_client *client, struct p9_req_t *req)
|
|||
|
||||
req->status = REQ_STATUS_SENT;
|
||||
|
||||
if (chan->vq->vq_ops->add_buf(chan->vq, chan->sg, out, in, req->tc)) {
|
||||
if (chan->vq->vq_ops->add_buf(chan->vq, chan->sg, out, in, req->tc) < 0) {
|
||||
P9_DPRINTK(P9_DEBUG_TRANS,
|
||||
"9p debug: virtio rpc add_buf returned failure");
|
||||
return -EIO;
|
||||
|
|
|
|||
Loading…
Reference in a new issue