aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMichael Grzeschik <m.grzeschik@pengutronix.de>2014-09-29 11:55:37 +0200
committerDavid S. Miller <davem@davemloft.net>2014-09-29 14:36:26 -0400
commitc51da42a6346c0c747e70a4f5ae873da1150a784 (patch)
treeb2a03fe83a1fc7f2cfb8ba864f8f93ce480e8261 /include
parentARCNET: add com20020 PCI IDs with metadata (diff)
downloadlinux-dev-c51da42a6346c0c747e70a4f5ae873da1150a784.tar.xz
linux-dev-c51da42a6346c0c747e70a4f5ae873da1150a784.zip
ARCNET: add support for multi interfaces on com20020
The com20020-pci driver is currently designed to instance one netdev with one pci device. This patch adds support to instance many cards with one pci device, depending on the device data in the private data. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/com20020.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/linux/com20020.h b/include/linux/com20020.h
index 6a1ceca61e7f..85898995b234 100644
--- a/include/linux/com20020.h
+++ b/include/linux/com20020.h
@@ -41,7 +41,7 @@ extern const struct net_device_ops com20020_netdev_ops;
#define BUS_ALIGN 1
#endif
-#define PLX_PCI_MAX_CARDS 1
+#define PLX_PCI_MAX_CARDS 2
struct com20020_pci_channel_map {
u32 bar;
@@ -58,6 +58,19 @@ struct com20020_pci_card_info {
unsigned int flags;
};
+struct com20020_priv {
+ struct com20020_pci_card_info *ci;
+ struct list_head list_dev;
+};
+
+struct com20020_dev {
+ struct list_head list;
+ struct net_device *dev;
+
+ struct com20020_priv *pci_priv;
+ int index;
+};
+
#define _INTMASK (ioaddr+BUS_ALIGN*0) /* writable */
#define _STATUS (ioaddr+BUS_ALIGN*0) /* readable */
#define _COMMAND (ioaddr+BUS_ALIGN*1) /* standard arcnet commands */