1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52int et131x_init_eeprom(struct et131x_adapter *etdev);
53
54
55void ConfigGlobalRegs(struct et131x_adapter *pAdapter);
56void ConfigMMCRegs(struct et131x_adapter *pAdapter);
57void et131x_enable_interrupts(struct et131x_adapter *adapter);
58void et131x_disable_interrupts(struct et131x_adapter *adapter);
59void et131x_align_allocated_memory(struct et131x_adapter *adapter,
60 u64 *phys_addr,
61 u64 *offset, u64 mask);
62
63int et131x_adapter_setup(struct et131x_adapter *adapter);
64int et131x_adapter_memory_alloc(struct et131x_adapter *adapter);
65void et131x_adapter_memory_free(struct et131x_adapter *adapter);
66void et131x_hwaddr_init(struct et131x_adapter *adapter);
67void et131x_soft_reset(struct et131x_adapter *adapter);
68
69
70irqreturn_t et131x_isr(int irq, void *dev_id);
71void et131x_isr_handler(struct work_struct *work);
72
73
74void ConfigMACRegs1(struct et131x_adapter *adapter);
75void ConfigMACRegs2(struct et131x_adapter *adapter);
76void ConfigRxMacRegs(struct et131x_adapter *adapter);
77void ConfigTxMacRegs(struct et131x_adapter *adapter);
78void ConfigMacStatRegs(struct et131x_adapter *adapter);
79void ConfigFlowControl(struct et131x_adapter *adapter);
80void UpdateMacStatHostCounters(struct et131x_adapter *adapter);
81void HandleMacStatInterrupt(struct et131x_adapter *adapter);
82void SetupDeviceForMulticast(struct et131x_adapter *adapter);
83void SetupDeviceForUnicast(struct et131x_adapter *adapter);
84
85
86struct net_device *et131x_device_alloc(void);
87
88
89void EnablePhyComa(struct et131x_adapter *adapter);
90void DisablePhyComa(struct et131x_adapter *adapter);
91
92
93void ET1310_PhyInit(struct et131x_adapter *adapter);
94void ET1310_PhyReset(struct et131x_adapter *adapter);
95void ET1310_PhyPowerDown(struct et131x_adapter *adapter, bool down);
96void ET1310_PhyAdvertise1000BaseT(struct et131x_adapter *adapter,
97 u16 duplex);
98void ET1310_PhyAccessMiBit(struct et131x_adapter *adapter,
99 u16 action,
100 u16 regnum, u16 bitnum, u8 *value);
101
102int et131x_xcvr_find(struct et131x_adapter *adapter);
103void et131x_setphy_normal(struct et131x_adapter *adapter);
104
105
106
107
108int PhyMiRead(struct et131x_adapter *adapter, u8 xcvrAddr,
109 u8 xcvrReg, u16 *value);
110#define MiRead(adapter, xcvrReg, value) \
111 PhyMiRead((adapter), (adapter)->Stats.xcvr_addr, (xcvrReg), (value))
112
113int32_t MiWrite(struct et131x_adapter *adapter,
114 u8 xcvReg, u16 value);
115void et131x_Mii_check(struct et131x_adapter *pAdapter,
116 MI_BMSR_t bmsr, MI_BMSR_t bmsr_ints);
117
118
119
120
121
122void SetPhy_10BaseTHalfDuplex(struct et131x_adapter *adapter);
123
124
125
126int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter);
127void et131x_rx_dma_memory_free(struct et131x_adapter *adapter);
128int et131x_rfd_resources_alloc(struct et131x_adapter *adapter,
129 struct rfd *rfd);
130void et131x_rfd_resources_free(struct et131x_adapter *adapter,
131 struct rfd *rfd);
132int et131x_init_recv(struct et131x_adapter *adapter);
133
134void ConfigRxDmaRegs(struct et131x_adapter *adapter);
135void SetRxDmaTimer(struct et131x_adapter *adapter);
136void et131x_rx_dma_disable(struct et131x_adapter *adapter);
137void et131x_rx_dma_enable(struct et131x_adapter *adapter);
138
139void et131x_reset_recv(struct et131x_adapter *adapter);
140
141void et131x_handle_recv_interrupt(struct et131x_adapter *adapter);
142
143
144int et131x_tx_dma_memory_alloc(struct et131x_adapter *adapter);
145void et131x_tx_dma_memory_free(struct et131x_adapter *adapter);
146void ConfigTxDmaRegs(struct et131x_adapter *adapter);
147void et131x_init_send(struct et131x_adapter *adapter);
148void et131x_tx_dma_disable(struct et131x_adapter *adapter);
149void et131x_tx_dma_enable(struct et131x_adapter *adapter);
150void et131x_handle_send_interrupt(struct et131x_adapter *adapter);
151void et131x_free_busy_send_packets(struct et131x_adapter *adapter);
152int et131x_send_packets(struct sk_buff *skb, struct net_device *netdev);
153
154