Skip to content

Commit ac6a86a

Browse files
Wer-Wolfdavem330
authored andcommitted
8390: Fix coding-style issues
Fix some coding-style issues, including one which made the function pointers in the struct ei_device hard to understand. Signed-off-by: Armin Wolf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 836e0e5 commit ac6a86a

File tree

1 file changed

+36
-25
lines changed
  • drivers/net/ethernet/8390

1 file changed

+36
-25
lines changed

drivers/net/ethernet/8390/8390.h

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
/* Generic NS8390 register definitions. */
2+
23
/* 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+
*/
68

79
#ifndef _8390_h
810
#define _8390_h
@@ -16,9 +18,9 @@
1618

1719
/* The 8390 specific per-packet-header format. */
1820
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 */
2224
};
2325

2426
#ifdef CONFIG_NET_POLL_CONTROLLER
@@ -66,18 +68,24 @@ static inline struct net_device *alloc_eip_netdev(void)
6668
/* You have one of these per-board */
6769
struct ei_device {
6870
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);
7378
unsigned long rmem_start;
7479
unsigned long rmem_end;
7580
void __iomem *mem;
7681
unsigned char mcfilter[8];
7782
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+
*/
8189
unsigned txing:1; /* Transmit Active */
8290
unsigned irqlock:1; /* 8390's intrs disabled when '1'. */
8391
unsigned dmaing:1; /* Remote DMA Active */
@@ -115,12 +123,16 @@ struct ei_device {
115123
#define E8390_RXCONFIG (ei_status.rxcr_base | 0x04)
116124
#define E8390_RXOFF (ei_status.rxcr_base | 0x20)
117125
#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
120130
#endif
121131

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
124136

125137

126138
/* Register accessed at EN_CMD, the 8390 base addr. */
@@ -134,17 +146,16 @@ struct ei_device {
134146
#define E8390_PAGE1 0x40 /* using the two high-order bits */
135147
#define E8390_PAGE2 0x80 /* Page 3 is invalid. */
136148

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.
141152
*/
142153

143154
#ifndef ei_inb
144155
#define ei_inb(_p) inb(_p)
145-
#define ei_outb(_v,_p) outb(_v,_p)
156+
#define ei_outb(_v, _p) outb(_v, _p)
146157
#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)
148159
#endif
149160

150161
#ifndef EI_SHIFT
@@ -153,9 +164,9 @@ struct ei_device {
153164

154165
#define E8390_CMD EI_SHIFT(0x00) /* The command register (for all pages) */
155166
/* 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 */
157168
#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 */
159170
#define EN0_STOPPG EI_SHIFT(0x02) /* Ending page +1 of ring bfr WR */
160171
#define EN0_BOUNDARY EI_SHIFT(0x03) /* Boundary page of ring bfr RD WR */
161172
#define EN0_TSR EI_SHIFT(0x04) /* Transmit status reg RD */

0 commit comments

Comments
 (0)