mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
virtio: add names to virtqueue struct, mapping from devices to queues.
Add a linked list of all virtqueues for a virtio device: this helps for debugging and is also needed for upcoming interface change. Also, add a "name" field for clearer debug messages. Signed-off-by: Rusty Russell <[email protected]>
This commit is contained in:
parent
ef688e151c
commit
9499f5e7ed
14 changed files with 56 additions and 31 deletions
|
|
@ -906,20 +906,20 @@ static int virtnet_probe(struct virtio_device *vdev)
|
|||
vi->mergeable_rx_bufs = true;
|
||||
|
||||
/* We expect two virtqueues, receive then send. */
|
||||
vi->rvq = vdev->config->find_vq(vdev, 0, skb_recv_done);
|
||||
vi->rvq = vdev->config->find_vq(vdev, 0, skb_recv_done, "input");
|
||||
if (IS_ERR(vi->rvq)) {
|
||||
err = PTR_ERR(vi->rvq);
|
||||
goto free;
|
||||
}
|
||||
|
||||
vi->svq = vdev->config->find_vq(vdev, 1, skb_xmit_done);
|
||||
vi->svq = vdev->config->find_vq(vdev, 1, skb_xmit_done, "output");
|
||||
if (IS_ERR(vi->svq)) {
|
||||
err = PTR_ERR(vi->svq);
|
||||
goto free_recv;
|
||||
}
|
||||
|
||||
if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VQ)) {
|
||||
vi->cvq = vdev->config->find_vq(vdev, 2, NULL);
|
||||
vi->cvq = vdev->config->find_vq(vdev, 2, NULL, "control");
|
||||
if (IS_ERR(vi->cvq)) {
|
||||
err = PTR_ERR(vi->svq);
|
||||
goto free_send;
|
||||
|
|
|
|||
Loading…
Reference in a new issue