.. | .. |
---|
1 | 1 | /* Generic NS8390 register definitions. */ |
---|
| 2 | + |
---|
2 | 3 | /* This file is part of Donald Becker's 8390 drivers, and is distributed |
---|
3 | | - under the same license. Auto-loading of 8390.o only in v2.2 - Paul G. |
---|
4 | | - Some of these names and comments originated from the Crynwr |
---|
5 | | - packet drivers, which are distributed under the GPL. */ |
---|
| 4 | + * under the same license. Auto-loading of 8390.o only in v2.2 - Paul G. |
---|
| 5 | + * Some of these names and comments originated from the Crynwr |
---|
| 6 | + * packet drivers, which are distributed under the GPL. |
---|
| 7 | + */ |
---|
6 | 8 | |
---|
7 | 9 | #ifndef _8390_h |
---|
8 | 10 | #define _8390_h |
---|
.. | .. |
---|
16 | 18 | |
---|
17 | 19 | /* The 8390 specific per-packet-header format. */ |
---|
18 | 20 | struct e8390_pkt_hdr { |
---|
19 | | - unsigned char status; /* status */ |
---|
20 | | - unsigned char next; /* pointer to next packet. */ |
---|
21 | | - unsigned short count; /* header + packet length in bytes */ |
---|
| 21 | + unsigned char status; /* status */ |
---|
| 22 | + unsigned char next; /* pointer to next packet. */ |
---|
| 23 | + unsigned short count; /* header + packet length in bytes */ |
---|
22 | 24 | }; |
---|
23 | 25 | |
---|
24 | 26 | #ifdef CONFIG_NET_POLL_CONTROLLER |
---|
.. | .. |
---|
32 | 34 | int ei_open(struct net_device *dev); |
---|
33 | 35 | int ei_close(struct net_device *dev); |
---|
34 | 36 | irqreturn_t ei_interrupt(int irq, void *dev_id); |
---|
35 | | -void ei_tx_timeout(struct net_device *dev); |
---|
| 37 | +void ei_tx_timeout(struct net_device *dev, unsigned int txqueue); |
---|
36 | 38 | netdev_tx_t ei_start_xmit(struct sk_buff *skb, struct net_device *dev); |
---|
37 | 39 | void ei_set_multicast_list(struct net_device *dev); |
---|
38 | 40 | struct net_device_stats *ei_get_stats(struct net_device *dev); |
---|
.. | .. |
---|
50 | 52 | int eip_open(struct net_device *dev); |
---|
51 | 53 | int eip_close(struct net_device *dev); |
---|
52 | 54 | irqreturn_t eip_interrupt(int irq, void *dev_id); |
---|
53 | | -void eip_tx_timeout(struct net_device *dev); |
---|
| 55 | +void eip_tx_timeout(struct net_device *dev, unsigned int txqueue); |
---|
54 | 56 | netdev_tx_t eip_start_xmit(struct sk_buff *skb, struct net_device *dev); |
---|
55 | 57 | void eip_set_multicast_list(struct net_device *dev); |
---|
56 | 58 | struct net_device_stats *eip_get_stats(struct net_device *dev); |
---|
.. | .. |
---|
66 | 68 | /* You have one of these per-board */ |
---|
67 | 69 | struct ei_device { |
---|
68 | 70 | const char *name; |
---|
69 | | - void (*reset_8390)(struct net_device *); |
---|
70 | | - void (*get_8390_hdr)(struct net_device *, struct e8390_pkt_hdr *, int); |
---|
71 | | - void (*block_output)(struct net_device *, int, const unsigned char *, int); |
---|
72 | | - void (*block_input)(struct net_device *, int, struct sk_buff *, int); |
---|
| 71 | + void (*reset_8390)(struct net_device *dev); |
---|
| 72 | + void (*get_8390_hdr)(struct net_device *dev, |
---|
| 73 | + struct e8390_pkt_hdr *hdr, int ring_page); |
---|
| 74 | + void (*block_output)(struct net_device *dev, int count, |
---|
| 75 | + const unsigned char *buf, int start_page); |
---|
| 76 | + void (*block_input)(struct net_device *dev, int count, |
---|
| 77 | + struct sk_buff *skb, int ring_offset); |
---|
73 | 78 | unsigned long rmem_start; |
---|
74 | 79 | unsigned long rmem_end; |
---|
75 | 80 | void __iomem *mem; |
---|
76 | 81 | unsigned char mcfilter[8]; |
---|
77 | 82 | unsigned open:1; |
---|
78 | | - unsigned word16:1; /* We have the 16-bit (vs 8-bit) version of the card. */ |
---|
79 | | - unsigned bigendian:1; /* 16-bit big endian mode. Do NOT */ |
---|
80 | | - /* set this on random 8390 clones! */ |
---|
| 83 | + unsigned word16:1; /* We have the 16-bit (vs 8-bit) |
---|
| 84 | + * version of the card. |
---|
| 85 | + */ |
---|
| 86 | + unsigned bigendian:1; /* 16-bit big endian mode. Do NOT |
---|
| 87 | + * set this on random 8390 clones! |
---|
| 88 | + */ |
---|
81 | 89 | unsigned txing:1; /* Transmit Active */ |
---|
82 | 90 | unsigned irqlock:1; /* 8390's intrs disabled when '1'. */ |
---|
83 | 91 | unsigned dmaing:1; /* Remote DMA Active */ |
---|
.. | .. |
---|
115 | 123 | #define E8390_RXCONFIG (ei_status.rxcr_base | 0x04) |
---|
116 | 124 | #define E8390_RXOFF (ei_status.rxcr_base | 0x20) |
---|
117 | 125 | #else |
---|
118 | | -#define E8390_RXCONFIG 0x4 /* EN0_RXCR: broadcasts, no multicast,errors */ |
---|
119 | | -#define E8390_RXOFF 0x20 /* EN0_RXCR: Accept no packets */ |
---|
| 126 | +/* EN0_RXCR: broadcasts, no multicast,errors */ |
---|
| 127 | +#define E8390_RXCONFIG 0x4 |
---|
| 128 | +/* EN0_RXCR: Accept no packets */ |
---|
| 129 | +#define E8390_RXOFF 0x20 |
---|
120 | 130 | #endif |
---|
121 | 131 | |
---|
122 | | -#define E8390_TXCONFIG 0x00 /* EN0_TXCR: Normal transmit mode */ |
---|
123 | | -#define E8390_TXOFF 0x02 /* EN0_TXCR: Transmitter off */ |
---|
| 132 | +/* EN0_TXCR: Normal transmit mode */ |
---|
| 133 | +#define E8390_TXCONFIG 0x00 |
---|
| 134 | +/* EN0_TXCR: Transmitter off */ |
---|
| 135 | +#define E8390_TXOFF 0x02 |
---|
124 | 136 | |
---|
125 | 137 | |
---|
126 | 138 | /* Register accessed at EN_CMD, the 8390 base addr. */ |
---|
.. | .. |
---|
134 | 146 | #define E8390_PAGE1 0x40 /* using the two high-order bits */ |
---|
135 | 147 | #define E8390_PAGE2 0x80 /* Page 3 is invalid. */ |
---|
136 | 148 | |
---|
137 | | -/* |
---|
138 | | - * Only generate indirect loads given a machine that needs them. |
---|
139 | | - * - removed AMIGA_PCMCIA from this list, handled as ISA io now |
---|
140 | | - * - the _p for generates no delay by default 8390p.c overrides this. |
---|
| 149 | +/* Only generate indirect loads given a machine that needs them. |
---|
| 150 | + * - removed AMIGA_PCMCIA from this list, handled as ISA io now |
---|
| 151 | + * - the _p for generates no delay by default 8390p.c overrides this. |
---|
141 | 152 | */ |
---|
142 | 153 | |
---|
143 | 154 | #ifndef ei_inb |
---|
144 | 155 | #define ei_inb(_p) inb(_p) |
---|
145 | | -#define ei_outb(_v,_p) outb(_v,_p) |
---|
| 156 | +#define ei_outb(_v, _p) outb(_v, _p) |
---|
146 | 157 | #define ei_inb_p(_p) inb(_p) |
---|
147 | | -#define ei_outb_p(_v,_p) outb(_v,_p) |
---|
| 158 | +#define ei_outb_p(_v, _p) outb(_v, _p) |
---|
148 | 159 | #endif |
---|
149 | 160 | |
---|
150 | 161 | #ifndef EI_SHIFT |
---|
.. | .. |
---|
153 | 164 | |
---|
154 | 165 | #define E8390_CMD EI_SHIFT(0x00) /* The command register (for all pages) */ |
---|
155 | 166 | /* Page 0 register offsets. */ |
---|
156 | | -#define EN0_CLDALO EI_SHIFT(0x01) /* Low byte of current local dma addr RD */ |
---|
| 167 | +#define EN0_CLDALO EI_SHIFT(0x01) /* Low byte of current local dma addr RD */ |
---|
157 | 168 | #define EN0_STARTPG EI_SHIFT(0x01) /* Starting page of ring bfr WR */ |
---|
158 | | -#define EN0_CLDAHI EI_SHIFT(0x02) /* High byte of current local dma addr RD */ |
---|
| 169 | +#define EN0_CLDAHI EI_SHIFT(0x02) /* High byte of current local dma addr RD */ |
---|
159 | 170 | #define EN0_STOPPG EI_SHIFT(0x02) /* Ending page +1 of ring bfr WR */ |
---|
160 | 171 | #define EN0_BOUNDARY EI_SHIFT(0x03) /* Boundary page of ring bfr RD WR */ |
---|
161 | 172 | #define EN0_TSR EI_SHIFT(0x04) /* Transmit status reg RD */ |
---|