blob: da863c91d1d03d79df3c59785d09162190e0c581 [file] [log] [blame]
Alan Cox055e5112008-07-03 23:43:12 -07001/* 8390 core for ISA devices needing bus delays */
2
3static const char version[] =
4 "8390p.c:v1.10cvs 9/23/94 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";
5
6#define ei_inb(_p) inb(_p)
Gustavo F. Padovancaa16872008-08-02 15:55:12 -03007#define ei_outb(_v, _p) outb(_v, _p)
Alan Cox055e5112008-07-03 23:43:12 -07008#define ei_inb_p(_p) inb_p(_p)
Gustavo F. Padovancaa16872008-08-02 15:55:12 -03009#define ei_outb_p(_v, _p) outb_p(_v, _p)
Alan Cox055e5112008-07-03 23:43:12 -070010
11#include "lib8390.c"
12
13int eip_open(struct net_device *dev)
14{
15 return __ei_open(dev);
16}
Gustavo F. Padovancaa16872008-08-02 15:55:12 -030017EXPORT_SYMBOL(eip_open);
Alan Cox055e5112008-07-03 23:43:12 -070018
19int eip_close(struct net_device *dev)
20{
21 return __ei_close(dev);
22}
Gustavo F. Padovancaa16872008-08-02 15:55:12 -030023EXPORT_SYMBOL(eip_close);
Alan Cox055e5112008-07-03 23:43:12 -070024
Stephen Hemminger8884c092008-11-25 18:12:49 -080025int eip_start_xmit(struct sk_buff *skb, struct net_device *dev)
26{
27 return __ei_start_xmit(skb, dev);
28}
29EXPORT_SYMBOL(eip_start_xmit);
30
31struct net_device_stats *eip_get_stats(struct net_device *dev)
32{
33 return __ei_get_stats(dev);
34}
35EXPORT_SYMBOL(eip_get_stats);
36
37void eip_set_multicast_list(struct net_device *dev)
38{
39 __ei_set_multicast_list(dev);
40}
41EXPORT_SYMBOL(eip_set_multicast_list);
42
43void eip_tx_timeout(struct net_device *dev)
44{
45 __ei_tx_timeout(dev);
46}
47EXPORT_SYMBOL(eip_tx_timeout);
48
Alan Cox055e5112008-07-03 23:43:12 -070049irqreturn_t eip_interrupt(int irq, void *dev_id)
50{
51 return __ei_interrupt(irq, dev_id);
52}
Gustavo F. Padovancaa16872008-08-02 15:55:12 -030053EXPORT_SYMBOL(eip_interrupt);
Alan Cox055e5112008-07-03 23:43:12 -070054
55#ifdef CONFIG_NET_POLL_CONTROLLER
56void eip_poll(struct net_device *dev)
57{
58 __ei_poll(dev);
59}
Gustavo F. Padovancaa16872008-08-02 15:55:12 -030060EXPORT_SYMBOL(eip_poll);
Alan Cox055e5112008-07-03 23:43:12 -070061#endif
62
Stephen Hemminger8884c092008-11-25 18:12:49 -080063const struct net_device_ops eip_netdev_ops = {
64 .ndo_open = eip_open,
65 .ndo_stop = eip_close,
66 .ndo_start_xmit = eip_start_xmit,
67 .ndo_tx_timeout = eip_tx_timeout,
68 .ndo_get_stats = eip_get_stats,
69 .ndo_set_multicast_list = eip_set_multicast_list,
70 .ndo_validate_addr = eth_validate_addr,
Stephen Hemmingerfe96aaa2009-01-09 11:13:14 +000071 .ndo_set_mac_address = eth_mac_addr,
Stephen Hemminger8884c092008-11-25 18:12:49 -080072 .ndo_change_mtu = eth_change_mtu,
73#ifdef CONFIG_NET_POLL_CONTROLLER
74 .ndo_poll_controller = eip_poll,
75#endif
76};
77EXPORT_SYMBOL(eip_netdev_ops);
78
Alan Cox055e5112008-07-03 23:43:12 -070079struct net_device *__alloc_eip_netdev(int size)
80{
David S. Miller9a4a8422008-12-15 15:14:59 -080081 struct net_device *dev = ____alloc_ei_netdev(size);
82#ifdef CONFIG_COMPAT_NET_DEV_OPS
83 if (dev) {
84 dev->hard_start_xmit = eip_start_xmit;
85 dev->get_stats = eip_get_stats;
86 dev->set_multicast_list = eip_set_multicast_list;
87 dev->tx_timeout = eip_tx_timeout;
88 }
89#endif
90 return dev;
Alan Cox055e5112008-07-03 23:43:12 -070091}
Gustavo F. Padovancaa16872008-08-02 15:55:12 -030092EXPORT_SYMBOL(__alloc_eip_netdev);
Alan Cox055e5112008-07-03 23:43:12 -070093
94void NS8390p_init(struct net_device *dev, int startp)
95{
Gustavo F. Padovan057b61a2008-08-02 15:55:11 -030096 __NS8390_init(dev, startp);
Alan Cox055e5112008-07-03 23:43:12 -070097}
Alan Cox055e5112008-07-03 23:43:12 -070098EXPORT_SYMBOL(NS8390p_init);
Alan Cox055e5112008-07-03 23:43:12 -070099
100#if defined(MODULE)
101
102int init_module(void)
103{
104 return 0;
105}
106
107void cleanup_module(void)
108{
109}
110
111#endif /* MODULE */
112MODULE_LICENSE("GPL");