aboutsummaryrefslogtreecommitdiffstats
path: root/net/9p/trans_virtio.c
Commit message (Collapse)AuthorAge
* net/9p/trans_virtio.c: kmalloc() enough memoryAdrian Bunk2008-02-19
| | | | | | | | The Coverity checker spotted that less memory than required was allocated. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/9p/trans_virtio.c: Use BUG_ONJulia Lawall2008-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if (...) BUG(); should be replaced with BUG_ON(...) when the test has no side-effects to allow a definition of BUG_ON that drops the code completely. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @ disable unlikely @ expression E,f; @@ ( if (<... f(...) ...>) { BUG(); } | - if (unlikely(E)) { BUG(); } + BUG_ON(E); ) @@ expression E,f; @@ ( if (<... f(...) ...>) { BUG(); } | - if (E) { BUG(); } + BUG_ON(E); ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
* 9p: transport API reorganizationEric Van Hensbergen2008-02-06
| | | | | | | | | | This merges the mux.c (including the connection interface) with trans_fd in preparation for transport API changes. Ultimately, trans_fd will need to be rewritten to clean it up and simplify the implementation, but this reorganization is viewed as the first step. Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
* 9p: add remove function to trans_virtioEric Van Hensbergen2008-02-06
| | | | | | | | | | | Request from rusty: Just cleaning up patches for 2.6.25 merge, and noticed that net/9p/trans_virtio.c doesn't have a remove function. This will crash when removing the module (console doesn't have one because it can't really be removed). Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
* 9p: Fix soft lockup in virtio transportEric Van Hensbergen2008-02-06
| | | | | | | | This fixes a poorly placed spinlock which could result in a soft lockup condition. Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
* 9p: block-based virtio clientEric Van Hensbergen2008-02-06
| | | | | | | | This replaces the console-based virto client with a block-based client using a single request queue. Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
* virtio: explicit enable_cb/disable_cb rather than callback return.Rusty Russell2008-02-04
| | | | | | | | | | It seems that virtio_net wants to disable callbacks (interrupts) before calling netif_rx_schedule(), so we can't use the return value to do so. Rename "restart" to "cb_enable" and introduce "cb_disable" hook: callback now returns void, rather than a boolean. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* virtio: simplify config mechanism.Rusty Russell2008-02-04
| | | | | | | | | | | | | Previously we used a type/len pair within the config space, but this seems overkill. We now simply define a structure which represents the layout in the config space: the config space can now only be extended at the end. The main driver-visible changes: 1) We indicate what fields are present with an explicit feature bit. 2) Virtqueues are explicitly numbered, and not in the config space. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* 9p: add virtio transportEric Van Hensbergen2007-10-23
This adds a transport to 9p for communicating between guests and a host using a virtio based transport. Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>