]> git.baikalelectronics.ru Git - kernel.git/commit
caif_virtio: Introduce caif over virtio
authorErwan Yvin <erwan.yvin@stericsson.com>
Wed, 20 Mar 2013 03:22:24 +0000 (13:52 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 20 Mar 2013 03:36:06 +0000 (14:06 +1030)
commit708653892e139beb26c5fbafa07ca6d2248ad958
tree29f6397b0f544c60bfdbc8d9ad0aae5337fc7532
parenta4fba0e0d9dd0aa9d23542bf2cd5578cbc43d4b6
caif_virtio: Introduce caif over virtio

Add the CAIF Virtio shared memory driver for talking
to a modem.

This CAIF Link layer communicates to the modem over
shared memory. It is implemented as a virtio_driver.
The underlying virtio device is managed by the remoteproc
framework. The Virtio queue is used for transmitting data
to the modem, and the new vringh is used for receiving data.

Genalloc is used for managing the shared memory used for TX
data. The default dma-alloc-coherent allocator can only
allocate whole pages, and this wastes too much shared memory.

Flow control is implemented by stopping the TX-queues if the
virtio queues go full or we run out of memory. Queued are
reopened when queues are below the watermark.

NAPI is used in RX path, and a dedicated tasklet is used
for releasing TX buffers.

Signed-off-by: Erwan Yvin <erwan.yvin@stericsson.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (minor fixes)
drivers/net/caif/Kconfig
drivers/net/caif/Makefile
drivers/net/caif/caif_virtio.c [new file with mode: 0644]
include/linux/virtio_caif.h [new file with mode: 0644]
include/uapi/linux/virtio_ids.h