diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-01-14 21:05:05 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-14 21:05:05 -0800 |
commit | 937f1ba56b4be37d9e2ad77412f95048662058d2 (patch) | |
tree | 154e0c5ce11b5afe25816d667c76b19ac679d530 /drivers/net/ibm_newemac/mal.h | |
parent | 2950e952920811be465ec95c6b56f03dc66a05c0 (diff) | |
download | linux-937f1ba56b4be37d9e2ad77412f95048662058d2.tar.bz2 |
net: Add init_dummy_netdev() and fix EMAC driver using it
This adds an init_dummy_netdev() function that gets a network device
structure (allocation and lifetime entirely under caller's control) and
initialize the minimum amount of fields so it can be used to schedule
NAPI polls without registering a full blown interface. This is to be
used by drivers that need to tie several hardware interfaces to a single
NAPI poll scheduler due to HW limitations.
It also updates the ibm_newemac driver to use that, this fixing the
oops on 2.6.29 due to passing NULL as "dev" to netif_napi_add()
Symbol is exported GPL only a I don't think we want binary drivers doing
that sort of acrobatics (if we want them at all).
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Tested-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ibm_newemac/mal.h')
-rw-r--r-- | drivers/net/ibm_newemac/mal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ibm_newemac/mal.h b/drivers/net/ibm_newemac/mal.h index 2f0a87360844..9ededfbf0726 100644 --- a/drivers/net/ibm_newemac/mal.h +++ b/drivers/net/ibm_newemac/mal.h @@ -214,6 +214,8 @@ struct mal_instance { int index; spinlock_t lock; + struct net_device dummy_dev; + unsigned int features; }; |