23 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
26 #include <linux/module.h>
27 #include <linux/kernel.h>
28 #include <linux/netdevice.h>
30 #include <linux/ethtool.h>
33 #include <linux/mii.h>
36 #include <linux/slab.h>
39 #define DRV_NAME "ks8851_mll"
41 static u8 KS_DEFAULT_MAC_ADDRESS[] = { 0x00, 0x10, 0xA1, 0x86, 0x95, 0x11 };
42 #define MAX_RECV_FRAMES 255
43 #define MAX_BUF_SIZE 2048
44 #define TX_BUF_SIZE 2000
45 #define RX_BUF_SIZE 2000
48 #define CCR_EEPROM (1 << 9)
49 #define CCR_SPI (1 << 8)
50 #define CCR_8BIT (1 << 7)
51 #define CCR_16BIT (1 << 6)
52 #define CCR_32BIT (1 << 5)
53 #define CCR_SHARED (1 << 4)
54 #define CCR_32PIN (1 << 0)
62 #define OBCR_ODS_16MA (1 << 6)
65 #define EEPCR_EESA (1 << 4)
66 #define EEPCR_EESB (1 << 3)
67 #define EEPCR_EEDO (1 << 2)
68 #define EEPCR_EESCK (1 << 1)
69 #define EEPCR_EECS (1 << 0)
72 #define MBIR_TXMBF (1 << 12)
73 #define MBIR_TXMBFA (1 << 11)
74 #define MBIR_RXMBF (1 << 4)
75 #define MBIR_RXMBFA (1 << 3)
78 #define GRR_QMU (1 << 1)
79 #define GRR_GSR (1 << 0)
82 #define WFCR_MPRXE (1 << 7)
83 #define WFCR_WF3E (1 << 3)
84 #define WFCR_WF2E (1 << 2)
85 #define WFCR_WF1E (1 << 1)
86 #define WFCR_WF0E (1 << 0)
88 #define KS_WF0CRC0 0x30
89 #define KS_WF0CRC1 0x32
90 #define KS_WF0BM0 0x34
91 #define KS_WF0BM1 0x36
92 #define KS_WF0BM2 0x38
93 #define KS_WF0BM3 0x3A
95 #define KS_WF1CRC0 0x40
96 #define KS_WF1CRC1 0x42
97 #define KS_WF1BM0 0x44
98 #define KS_WF1BM1 0x46
99 #define KS_WF1BM2 0x48
100 #define KS_WF1BM3 0x4A
102 #define KS_WF2CRC0 0x50
103 #define KS_WF2CRC1 0x52
104 #define KS_WF2BM0 0x54
105 #define KS_WF2BM1 0x56
106 #define KS_WF2BM2 0x58
107 #define KS_WF2BM3 0x5A
109 #define KS_WF3CRC0 0x60
110 #define KS_WF3CRC1 0x62
111 #define KS_WF3BM0 0x64
112 #define KS_WF3BM1 0x66
113 #define KS_WF3BM2 0x68
114 #define KS_WF3BM3 0x6A
117 #define TXCR_TCGICMP (1 << 8)
118 #define TXCR_TCGUDP (1 << 7)
119 #define TXCR_TCGTCP (1 << 6)
120 #define TXCR_TCGIP (1 << 5)
121 #define TXCR_FTXQ (1 << 4)
122 #define TXCR_TXFCE (1 << 3)
123 #define TXCR_TXPE (1 << 2)
124 #define TXCR_TXCRC (1 << 1)
125 #define TXCR_TXE (1 << 0)
128 #define TXSR_TXLC (1 << 13)
129 #define TXSR_TXMC (1 << 12)
130 #define TXSR_TXFID_MASK (0x3f << 0)
131 #define TXSR_TXFID_SHIFT (0)
132 #define TXSR_TXFID_GET(_v) (((_v) >> 0) & 0x3f)
135 #define KS_RXCR1 0x74
136 #define RXCR1_FRXQ (1 << 15)
137 #define RXCR1_RXUDPFCC (1 << 14)
138 #define RXCR1_RXTCPFCC (1 << 13)
139 #define RXCR1_RXIPFCC (1 << 12)
140 #define RXCR1_RXPAFMA (1 << 11)
141 #define RXCR1_RXFCE (1 << 10)
142 #define RXCR1_RXEFE (1 << 9)
143 #define RXCR1_RXMAFMA (1 << 8)
144 #define RXCR1_RXBE (1 << 7)
145 #define RXCR1_RXME (1 << 6)
146 #define RXCR1_RXUE (1 << 5)
147 #define RXCR1_RXAE (1 << 4)
148 #define RXCR1_RXINVF (1 << 1)
149 #define RXCR1_RXE (1 << 0)
150 #define RXCR1_FILTER_MASK (RXCR1_RXINVF | RXCR1_RXAE | \
151 RXCR1_RXMAFMA | RXCR1_RXPAFMA)
153 #define KS_RXCR2 0x76
154 #define RXCR2_SRDBL_MASK (0x7 << 5)
155 #define RXCR2_SRDBL_SHIFT (5)
156 #define RXCR2_SRDBL_4B (0x0 << 5)
157 #define RXCR2_SRDBL_8B (0x1 << 5)
158 #define RXCR2_SRDBL_16B (0x2 << 5)
159 #define RXCR2_SRDBL_32B (0x3 << 5)
161 #define RXCR2_IUFFP (1 << 4)
162 #define RXCR2_RXIUFCEZ (1 << 3)
163 #define RXCR2_UDPLFE (1 << 2)
164 #define RXCR2_RXICMPFCC (1 << 1)
165 #define RXCR2_RXSAF (1 << 0)
167 #define KS_TXMIR 0x78
169 #define KS_RXFHSR 0x7C
170 #define RXFSHR_RXFV (1 << 15)
171 #define RXFSHR_RXICMPFCS (1 << 13)
172 #define RXFSHR_RXIPFCS (1 << 12)
173 #define RXFSHR_RXTCPFCS (1 << 11)
174 #define RXFSHR_RXUDPFCS (1 << 10)
175 #define RXFSHR_RXBF (1 << 7)
176 #define RXFSHR_RXMF (1 << 6)
177 #define RXFSHR_RXUF (1 << 5)
178 #define RXFSHR_RXMR (1 << 4)
179 #define RXFSHR_RXFT (1 << 3)
180 #define RXFSHR_RXFTL (1 << 2)
181 #define RXFSHR_RXRF (1 << 1)
182 #define RXFSHR_RXCE (1 << 0)
183 #define RXFSHR_ERR (RXFSHR_RXCE | RXFSHR_RXRF |\
184 RXFSHR_RXFTL | RXFSHR_RXMR |\
185 RXFSHR_RXICMPFCS | RXFSHR_RXIPFCS |\
187 #define KS_RXFHBCR 0x7E
188 #define RXFHBCR_CNT_MASK 0x0FFF
190 #define KS_TXQCR 0x80
191 #define TXQCR_AETFE (1 << 2)
192 #define TXQCR_TXQMAM (1 << 1)
193 #define TXQCR_METFE (1 << 0)
195 #define KS_RXQCR 0x82
196 #define RXQCR_RXDTTS (1 << 12)
197 #define RXQCR_RXDBCTS (1 << 11)
198 #define RXQCR_RXFCTS (1 << 10)
199 #define RXQCR_RXIPHTOE (1 << 9)
200 #define RXQCR_RXDTTE (1 << 7)
201 #define RXQCR_RXDBCTE (1 << 6)
202 #define RXQCR_RXFCTE (1 << 5)
203 #define RXQCR_ADRFE (1 << 4)
204 #define RXQCR_SDA (1 << 3)
205 #define RXQCR_RRXEF (1 << 0)
206 #define RXQCR_CMD_CNTL (RXQCR_RXFCTE|RXQCR_ADRFE)
208 #define KS_TXFDPR 0x84
209 #define TXFDPR_TXFPAI (1 << 14)
210 #define TXFDPR_TXFP_MASK (0x7ff << 0)
211 #define TXFDPR_TXFP_SHIFT (0)
213 #define KS_RXFDPR 0x86
214 #define RXFDPR_RXFPAI (1 << 14)
216 #define KS_RXDTTR 0x8C
217 #define KS_RXDBCTR 0x8E
221 #define IRQ_LCI (1 << 15)
222 #define IRQ_TXI (1 << 14)
223 #define IRQ_RXI (1 << 13)
224 #define IRQ_RXOI (1 << 11)
225 #define IRQ_TXPSI (1 << 9)
226 #define IRQ_RXPSI (1 << 8)
227 #define IRQ_TXSAI (1 << 6)
228 #define IRQ_RXWFDI (1 << 5)
229 #define IRQ_RXMPDI (1 << 4)
230 #define IRQ_LDI (1 << 3)
231 #define IRQ_EDI (1 << 2)
232 #define IRQ_SPIBEI (1 << 1)
233 #define IRQ_DEDI (1 << 0)
235 #define KS_RXFCTR 0x9C
236 #define RXFCTR_THRESHOLD_MASK 0x00FF
239 #define RXFCTR_RXFC_MASK (0xff << 8)
240 #define RXFCTR_RXFC_SHIFT (8)
241 #define RXFCTR_RXFC_GET(_v) (((_v) >> 8) & 0xff)
242 #define RXFCTR_RXFCT_MASK (0xff << 0)
243 #define RXFCTR_RXFCT_SHIFT (0)
245 #define KS_TXNTFSR 0x9E
247 #define KS_MAHTR0 0xA0
248 #define KS_MAHTR1 0xA2
249 #define KS_MAHTR2 0xA4
250 #define KS_MAHTR3 0xA6
252 #define KS_FCLWR 0xB0
253 #define KS_FCHWR 0xB2
254 #define KS_FCOWR 0xB4
256 #define KS_CIDER 0xC0
257 #define CIDER_ID 0x8870
258 #define CIDER_REV_MASK (0x7 << 1)
259 #define CIDER_REV_SHIFT (1)
260 #define CIDER_REV_GET(_v) (((_v) >> 1) & 0x7)
264 #define IACR_RDEN (1 << 12)
265 #define IACR_TSEL_MASK (0x3 << 10)
266 #define IACR_TSEL_SHIFT (10)
267 #define IACR_TSEL_MIB (0x3 << 10)
268 #define IACR_ADDR_MASK (0x1f << 0)
269 #define IACR_ADDR_SHIFT (0)
271 #define KS_IADLR 0xD0
272 #define KS_IAHDR 0xD2
274 #define KS_PMECR 0xD4
275 #define PMECR_PME_DELAY (1 << 14)
276 #define PMECR_PME_POL (1 << 12)
277 #define PMECR_WOL_WAKEUP (1 << 11)
278 #define PMECR_WOL_MAGICPKT (1 << 10)
279 #define PMECR_WOL_LINKUP (1 << 9)
280 #define PMECR_WOL_ENERGY (1 << 8)
281 #define PMECR_AUTO_WAKE_EN (1 << 7)
282 #define PMECR_WAKEUP_NORMAL (1 << 6)
283 #define PMECR_WKEVT_MASK (0xf << 2)
284 #define PMECR_WKEVT_SHIFT (2)
285 #define PMECR_WKEVT_GET(_v) (((_v) >> 2) & 0xf)
286 #define PMECR_WKEVT_ENERGY (0x1 << 2)
287 #define PMECR_WKEVT_LINK (0x2 << 2)
288 #define PMECR_WKEVT_MAGICPKT (0x4 << 2)
289 #define PMECR_WKEVT_FRAME (0x8 << 2)
290 #define PMECR_PM_MASK (0x3 << 0)
291 #define PMECR_PM_SHIFT (0)
292 #define PMECR_PM_NORMAL (0x0 << 0)
293 #define PMECR_PM_ENERGY (0x1 << 0)
294 #define PMECR_PM_SOFTDOWN (0x2 << 0)
295 #define PMECR_PM_POWERSAVE (0x3 << 0)
298 #define KS_P1MBCR 0xE4
299 #define P1MBCR_FORCE_FDX (1 << 8)
301 #define KS_P1MBSR 0xE6
302 #define P1MBSR_AN_COMPLETE (1 << 5)
303 #define P1MBSR_AN_CAPABLE (1 << 3)
304 #define P1MBSR_LINK_UP (1 << 2)
306 #define KS_PHY1ILR 0xE8
307 #define KS_PHY1IHR 0xEA
308 #define KS_P1ANAR 0xEC
309 #define KS_P1ANLPR 0xEE
311 #define KS_P1SCLMD 0xF4
312 #define P1SCLMD_LEDOFF (1 << 15)
313 #define P1SCLMD_TXIDS (1 << 14)
314 #define P1SCLMD_RESTARTAN (1 << 13)
315 #define P1SCLMD_DISAUTOMDIX (1 << 10)
316 #define P1SCLMD_FORCEMDIX (1 << 9)
317 #define P1SCLMD_AUTONEGEN (1 << 7)
318 #define P1SCLMD_FORCE100 (1 << 6)
319 #define P1SCLMD_FORCEFDX (1 << 5)
320 #define P1SCLMD_ADV_FLOW (1 << 4)
321 #define P1SCLMD_ADV_100BT_FDX (1 << 3)
322 #define P1SCLMD_ADV_100BT_HDX (1 << 2)
323 #define P1SCLMD_ADV_10BT_FDX (1 << 1)
324 #define P1SCLMD_ADV_10BT_HDX (1 << 0)
327 #define P1CR_HP_MDIX (1 << 15)
328 #define P1CR_REV_POL (1 << 13)
329 #define P1CR_OP_100M (1 << 10)
330 #define P1CR_OP_FDX (1 << 9)
331 #define P1CR_OP_MDI (1 << 7)
332 #define P1CR_AN_DONE (1 << 6)
333 #define P1CR_LINK_GOOD (1 << 5)
334 #define P1CR_PNTR_FLOW (1 << 4)
335 #define P1CR_PNTR_100BT_FDX (1 << 3)
336 #define P1CR_PNTR_100BT_HDX (1 << 2)
337 #define P1CR_PNTR_10BT_FDX (1 << 1)
338 #define P1CR_PNTR_10BT_HDX (1 << 0)
342 #define TXFR_TXIC (1 << 15)
343 #define TXFR_TXFID_MASK (0x3f << 0)
344 #define TXFR_TXFID_SHIFT (0)
347 #define P1SR_HP_MDIX (1 << 15)
348 #define P1SR_REV_POL (1 << 13)
349 #define P1SR_OP_100M (1 << 10)
350 #define P1SR_OP_FDX (1 << 9)
351 #define P1SR_OP_MDI (1 << 7)
352 #define P1SR_AN_DONE (1 << 6)
353 #define P1SR_LINK_GOOD (1 << 5)
354 #define P1SR_PNTR_FLOW (1 << 4)
355 #define P1SR_PNTR_100BT_FDX (1 << 3)
356 #define P1SR_PNTR_100BT_HDX (1 << 2)
357 #define P1SR_PNTR_10BT_FDX (1 << 1)
358 #define P1SR_PNTR_10BT_HDX (1 << 0)
360 #define ENUM_BUS_NONE 0
361 #define ENUM_BUS_8BIT 1
362 #define ENUM_BUS_16BIT 2
363 #define ENUM_BUS_32BIT 3
365 #define MAX_MCAST_LST 32
366 #define HW_MCAST_SIZE 8
484 u8 shift_bit = offset & 0x03;
485 u8 shift_data = (offset & 1) << 3;
489 return (
u8)(data >> shift_data);
514 static void ks_wrreg8(
struct ks_net *ks,
int offset,
u8 value)
516 u8 shift_bit = (offset & 0x03);
517 u16 value_write = (
u16)(value << ((offset & 1) << 3));
531 static void ks_wrreg16(
struct ks_net *ks,
int offset,
u16 value)
559 static inline void ks_outblk(
struct ks_net *ks,
u16 *wptr,
u32 len)
566 static void ks_disable_int(
struct ks_net *ks)
568 ks_wrreg16(ks,
KS_IER, 0x0000);
571 static void ks_enable_int(
struct ks_net *ks)
581 static inline u16 ks_tx_fifo_space(
struct ks_net *ks)
583 return ks_rdreg16(ks,
KS_TXMIR) & 0x1fff;
591 static inline void ks_save_cmd_reg(
struct ks_net *ks)
605 static inline void ks_restore_cmd_reg(
struct ks_net *ks)
618 static void ks_set_powermode(
struct ks_net *ks,
unsigned pwrmode)
637 static void ks_read_config(
struct ks_net *ks)
642 reg_data = ks_rdreg8(ks,
KS_CCR) & 0x00FF;
643 reg_data |= ks_rdreg8(ks,
KS_CCR+1) << 8;
677 static void ks_soft_reset(
struct ks_net *ks,
unsigned op)
680 ks_wrreg16(ks,
KS_IER, 0x0000);
681 ks_wrreg16(ks,
KS_GRR, op);
683 ks_wrreg16(ks,
KS_GRR, 0);
710 static void ks_disable_qmu(
struct ks_net *ks)
758 ks_inblk(ks, buf, w + 2 + 2);
761 ks_inblk(ks, buf,
ALIGN(len, 4));
795 skb = netdev_alloc_skb(netdev, frame_hdr->
len + 16);
800 ks_read_qmu(ks, (
u16 *)skb->
data, frame_hdr->
len);
805 pr_err(
"%s: err:skb alloc\n", __func__);
821 static void ks_update_link_status(
struct net_device *netdev,
struct ks_net *ks)
827 link_up_status =
true;
830 link_up_status =
false;
833 "%s: %s\n", __func__, link_up_status ?
"UP" :
"DOWN");
850 struct ks_net *ks = netdev_priv(netdev);
856 status = ks_rdreg16(ks,
KS_ISR);
858 ks_restore_cmd_reg(ks);
862 ks_wrreg16(ks,
KS_ISR, status);
868 ks_update_link_status(netdev, ks);
871 netif_wake_queue(netdev);
881 ks_restore_cmd_reg(ks);
893 static int ks_net_open(
struct net_device *netdev)
895 struct ks_net *ks = netdev_priv(netdev);
898 #define KS_INT_FLAGS (IRQF_DISABLED|IRQF_TRIGGER_LOW)
909 pr_err(
"Failed to request IRQ: %d: %d\n", netdev->
irq, err);
917 ks_wrreg16(ks,
KS_ISR, 0xffff);
920 netif_start_queue(ks->
netdev);
935 static int ks_net_stop(
struct net_device *netdev)
937 struct ks_net *ks = netdev_priv(netdev);
939 netif_info(ks, ifdown, netdev,
"shutting down\n");
941 netif_stop_queue(netdev);
946 ks_wrreg16(ks,
KS_IER, 0x0000);
947 ks_wrreg16(ks,
KS_ISR, 0xffff);
982 ks_outblk(ks, ks->txh.txw, 4);
984 ks_outblk(ks, (
u16 *)pdata,
ALIGN(len, 4));
1006 struct ks_net *ks = netdev_priv(netdev);
1016 if (
likely(ks_tx_fifo_space(ks) >= skb->
len + 12)) {
1017 ks_write_qmu(ks, skb->
data, skb->
len);
1032 static void ks_start_rx(
struct ks_net *ks)
1047 static void ks_stop_rx(
struct ks_net *ks)
1058 static unsigned long const ethernet_polynomial = 0x04c11db7
U;
1060 static unsigned long ether_gen_crc(
int length,
u8 *
data)
1063 while (--length >= 0) {
1064 u8 current_octet = *data++;
1067 for (bit = 0; bit < 8; bit++, current_octet >>= 1) {
1069 ((crc < 0) ^ (current_octet & 1) ?
1070 ethernet_polynomial : 0);
1073 return (
unsigned long)
crc;
1081 static void ks_set_grpaddr(
struct ks_net *ks)
1089 position = (ether_gen_crc(6, ks->
mcast_lst[i]) >> 26) & 0x3f;
1090 index = position >> 3;
1091 value = 1 << (position & 7);
1111 static void ks_clear_mcast(
struct ks_net *ks)
1117 mcast_size = HW_MCAST_SIZE >> 2;
1118 for (i = 0; i < mcast_size; i++)
1122 static void ks_set_promis(
struct ks_net *ks,
u16 promiscuous_mode)
1130 if (promiscuous_mode)
1144 static void ks_set_mcast(
struct ks_net *ks,
u16 mcast)
1168 static void ks_set_rx_mode(
struct net_device *netdev)
1170 struct ks_net *ks = netdev_priv(netdev);
1182 ks_set_promis(ks,
false);
1201 ks_set_mcast(ks,
true);
1209 static void ks_set_mac(
struct ks_net *ks,
u8 *data)
1217 w = ((u & 0xFF) << 8) | ((u >> 8) & 0xFF);
1221 w = ((u & 0xFF) << 8) | ((u >> 8) & 0xFF);
1225 w = ((u & 0xFF) << 8) | ((u >> 8) & 0xFF);
1236 struct ks_net *ks = netdev_priv(netdev);
1251 struct ks_net *ks = netdev_priv(netdev);
1253 if (!netif_running(netdev))
1260 .ndo_open = ks_net_open,
1261 .ndo_stop = ks_net_stop,
1262 .ndo_do_ioctl = ks_net_ioctl,
1263 .ndo_start_xmit = ks_start_xmit,
1264 .ndo_set_mac_address = ks_set_mac_address,
1265 .ndo_set_rx_mode = ks_set_rx_mode,
1272 static void ks_get_drvinfo(
struct net_device *netdev,
1283 struct ks_net *ks = netdev_priv(netdev);
1287 static void ks_set_msglevel(
struct net_device *netdev,
u32 to)
1289 struct ks_net *ks = netdev_priv(netdev);
1295 struct ks_net *ks = netdev_priv(netdev);
1301 struct ks_net *ks = netdev_priv(netdev);
1307 struct ks_net *ks = netdev_priv(netdev);
1311 static int ks_nway_reset(
struct net_device *netdev)
1313 struct ks_net *ks = netdev_priv(netdev);
1317 static const struct ethtool_ops ks_ethtool_ops = {
1318 .get_drvinfo = ks_get_drvinfo,
1319 .get_msglevel = ks_get_msglevel,
1320 .set_msglevel = ks_set_msglevel,
1321 .get_settings = ks_get_settings,
1322 .set_settings = ks_set_settings,
1323 .get_link = ks_get_link,
1324 .nway_reset = ks_nway_reset,
1337 static int ks_phy_reg(
int reg)
1372 static int ks_phy_read(
struct net_device *netdev,
int phy_addr,
int reg)
1374 struct ks_net *ks = netdev_priv(netdev);
1378 ksreg = ks_phy_reg(reg);
1383 result = ks_rdreg16(ks, ksreg);
1389 static void ks_phy_write(
struct net_device *netdev,
1390 int phy,
int reg,
int value)
1392 struct ks_net *ks = netdev_priv(netdev);
1395 ksreg = ks_phy_reg(reg);
1398 ks_wrreg16(ks, ksreg, value);
1409 static int ks_read_selftest(
struct ks_net *ks)
1417 if ((rd & both_done) != both_done) {
1418 netdev_warn(ks->
netdev,
"Memory selftest not finished\n");
1423 netdev_err(ks->
netdev,
"TX memory selftest fails\n");
1428 netdev_err(ks->
netdev,
"RX memory selftest fails\n");
1432 netdev_info(ks->
netdev,
"the selftest passes\n");
1436 static void ks_setup(
struct ks_net *ks)
1483 static void ks_setup_int(
struct ks_net *ks)
1487 ks_wrreg16(ks,
KS_ISR, 0xffff);
1493 static int ks_hw_init(
struct ks_net *ks)
1495 #define MHEADER_SIZE (sizeof(struct type_frame_head) * MAX_RECV_FRAMES)
1504 ks_set_mac(ks, KS_DEFAULT_MAC_ADDRESS);
1522 goto err_mem_region;
1525 goto err_mem_region1;
1527 netdev = alloc_etherdev(
sizeof(
struct ks_net));
1529 goto err_alloc_etherdev;
1533 ks = netdev_priv(netdev);
1546 if ((
int)netdev->
irq < 0) {
1560 ks->
mii.dev = netdev;
1562 ks->
mii.phy_id_mask = 1;
1563 ks->
mii.reg_num_mask = 0xf;
1564 ks->
mii.mdio_read = ks_phy_read;
1565 ks->
mii.mdio_write = ks_phy_write;
1567 netdev_info(netdev,
"message enable is %d\n",
msg_enable);
1576 netdev_err(netdev,
"failed to read device ID\n");
1581 if (ks_read_selftest(ks)) {
1582 netdev_err(netdev,
"failed to read device ID\n");
1591 platform_set_drvdata(pdev, netdev);
1599 data = ks_rdreg16(ks,
KS_OBCR);
1603 pdata = pdev->
dev.platform_data;
1605 netdev_err(netdev,
"No platform data\n");
1610 if (!is_valid_ether_addr(ks->
mac_addr)) {
1613 netdev_info(netdev,
"Using random mac address\n");
1615 netdev_info(netdev,
"Mac address is: %pM\n", ks->
mac_addr);
1623 netdev_info(netdev,
"Found chip, family: 0x%x, id: 0x%x, rev: 0x%x\n",
1624 (
id >> 8) & 0xff, (
id >> 4) & 0xf, (
id >> 1) & 0x7);
1646 struct net_device *netdev = platform_get_drvdata(pdev);
1647 struct ks_net *ks = netdev_priv(netdev);
1655 platform_set_drvdata(pdev,
NULL);
1665 .probe = ks8851_probe,