net/mlx5e: Add ethtool counter for RX buffer allocation failures
[cascardo/linux.git] / drivers / net / ethernet / wiznet / w5100.h
1 /*
2  * Ethernet driver for the WIZnet W5100 chip.
3  *
4  * Copyright (C) 2006-2008 WIZnet Co.,Ltd.
5  * Copyright (C) 2012 Mike Sinkovsky <msink@permonline.ru>
6  *
7  * Licensed under the GPL-2 or later.
8  */
9
10 enum {
11         W5100,
12         W5200,
13 };
14
15 struct w5100_ops {
16         bool may_sleep;
17         int chip_id;
18         int (*read)(struct net_device *ndev, u16 addr);
19         int (*write)(struct net_device *ndev, u16 addr, u8 data);
20         int (*read16)(struct net_device *ndev, u16 addr);
21         int (*write16)(struct net_device *ndev, u16 addr, u16 data);
22         int (*readbulk)(struct net_device *ndev, u16 addr, u8 *buf, int len);
23         int (*writebulk)(struct net_device *ndev, u16 addr, const u8 *buf,
24                          int len);
25         int (*reset)(struct net_device *ndev);
26         int (*init)(struct net_device *ndev);
27 };
28
29 void *w5100_ops_priv(const struct net_device *ndev);
30
31 int w5100_probe(struct device *dev, const struct w5100_ops *ops,
32                 int sizeof_ops_priv, u8 *mac_addr, int irq, int link_gpio);
33 int w5100_remove(struct device *dev);
34
35 extern const struct dev_pm_ops w5100_pm_ops;