xref: /dragonfly/sys/dev/netif/re/re.c (revision 113ac07f)
1 /*
2  * Copyright (c) 1997, 1998
3  *	Bill Paul <wpaul@ctr.columbia.edu>.  All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  * 3. All advertising materials mentioning features or use of this software
14  *    must display the following acknowledgement:
15  *	This product includes software developed by Bill Paul.
16  * 4. Neither the name of the author nor the names of any co-contributors
17  *    may be used to endorse or promote products derived from this software
18  *    without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
21  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23  * ARE DISCLAIMED.  IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
24  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30  * THE POSSIBILITY OF SUCH DAMAGE.
31  *
32  * $FreeBSD: src/sys/dev/if_rl.c,v 1.38.2.7 2001/07/19 18:33:07 wpaul Exp $
33  */
34 
35 /*
36  * RealTek 8129/8139 PCI NIC driver
37  *
38  * Written by Bill Paul <wpaul@ctr.columbia.edu>
39  * Electrical Engineering Department
40  * Columbia University, New York City
41  */
42 
43 #ifndef __DragonFly__
44 #include <sys/cdefs.h>
45 
46 #ifdef ENABLE_FIBER_SUPPORT
47 #define FIBER_SUFFIX "-FIBER"
48 #else
49 #define FIBER_SUFFIX ""
50 #endif
51 #define RE_VERSION "1.96.04" FIBER_SUFFIX
52 
53 __FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v " RE_VERSION __DATE__ " " __TIME__ "  wpaul Exp $");
54 
55 /*
56 * This driver also support Realtek RTL8110/RTL8169, RTL8111/RTL8168, RTL8125, and RTL8136/RTL810x.
57 */
58 
59 #include <sys/param.h>
60 #include <sys/systm.h>
61 #include <sys/sockio.h>
62 #include <sys/mbuf.h>
63 #include <sys/malloc.h>
64 #include <sys/kernel.h>
65 #include <sys/socket.h>
66 #include <sys/taskqueue.h>
67 #include <sys/random.h>
68 
69 #include <net/if.h>
70 #include <net/if_var.h>
71 #include <net/if_arp.h>
72 #include <net/ethernet.h>
73 #include <net/if_dl.h>
74 #include <net/if_media.h>
75 
76 #include <net/bpf.h>
77 
78 #include <vm/vm.h>              /* for vtophys */
79 #include <vm/pmap.h>            /* for vtophys */
80 #include <machine/clock.h>      /* for DELAY */
81 
82 #include <machine/bus.h>
83 #include <machine/resource.h>
84 #include <sys/bus.h>
85 #include <sys/rman.h>
86 #include <sys/endian.h>
87 
88 #include <dev/mii/mii.h>
89 #include <dev/re/if_rereg.h>
90 #ifdef ENABLE_FIBER_SUPPORT
91 #include <dev/re/if_fiber.h>
92 #endif //ENABLE_FIBER_SUPPORT
93 
94 #if OS_VER < VERSION(5,3)
95 #include <pci/pcireg.h>
96 #include <pci/pcivar.h>
97 #include <machine/bus_pio.h>
98 #include <machine/bus_memio.h>
99 #else
100 #include <dev/pci/pcireg.h>
101 #include <dev/pci/pcivar.h>
102 #include <sys/module.h>
103 #endif
104 
105 #if OS_VER > VERSION(5,9)
106 #include <sys/cdefs.h>
107 #include <sys/endian.h>
108 #include <net/if_types.h>
109 #include <net/if_vlan_var.h>
110 #endif
111 #else	/* __DragonFly__ */
112 
113 #include <sys/param.h>
114 #include <sys/bus.h>
115 #include <sys/endian.h>
116 #include <sys/kernel.h>
117 #include <sys/systm.h>
118 
119 #include <net/ethernet.h>
120 #include <net/if.h>
121 #include <net/if_arp.h>
122 #include <net/if_dl.h>
123 #include <net/if_media.h>
124 #include <net/if_poll.h>
125 #include <net/vlan/if_vlan_var.h>
126 
127 #include <bus/pci/pcireg.h>
128 #include <bus/pci/pcivar.h>
129 
130 #include <dev/netif/mii_layer/mii.h>
131 #include <dev/netif/re/if_revar.h>
132 #include <dev/netif/re/re.h>
133 #include <dev/netif/re/re_dragonfly.h>
134 
135 #define RE_LOCK(sc)
136 #define RE_UNLOCK(sc)
137 #define RE_LOCK_ASSERT(sc)
138 
139 #define RE_GET_IFNET(sc)	&(sc)->arpcom.ac_if
140 
141 #endif	/* !__DragonFly__ */
142 
143 #define EE_SET(x)					\
144 	CSR_WRITE_1(sc, RE_EECMD,			\
145 		CSR_READ_1(sc, RE_EECMD) | x)
146 
147 #define EE_CLR(x)					\
148 	CSR_WRITE_1(sc, RE_EECMD,			\
149 		CSR_READ_1(sc, RE_EECMD) & ~x)
150 
151 #ifndef __DragonFly__
152 /*
153  * Various supported device vendors/types and their names.
154  */
155 static struct re_type re_devs[] = {
156         {
157                 RT_VENDORID, RT_DEVICEID_8169,
158                 "Realtek PCI GbE Family Controller"
159         },
160         {
161                 RT_VENDORID, RT_DEVICEID_8169SC,
162                 "Realtek PCI GbE Family Controller"
163         },
164         {
165                 RT_VENDORID, RT_DEVICEID_8168,
166                 "Realtek PCIe GbE Family Controller"
167         },
168         {
169                 RT_VENDORID, RT_DEVICEID_8161,
170                 "Realtek PCIe GbE Family Controller"
171         },
172         {
173                 RT_VENDORID, RT_DEVICEID_8136,
174                 "Realtek PCIe FE Family Controller"
175         },
176         {
177                 DLINK_VENDORID, 0x4300,
178                 "Realtek PCI GbE Family Controller"
179         },
180         {
181                 RT_VENDORID, RT_DEVICEID_8125,
182                 "Realtek PCIe 2.5GbE Family Controller"
183         },
184         { 0, 0, NULL }
185 };
186 
187 static int	re_probe			__P((device_t));
188 static int	re_attach			__P((device_t));
189 static int	re_detach			__P((device_t));
190 static int	re_suspend 			__P((device_t));
191 static int	re_resume 			__P((device_t));
192 static int	re_shutdown			__P((device_t));
193 
194 void MP_WritePhyUshort			__P((struct re_softc*, u_int8_t, u_int16_t));
195 u_int16_t MP_ReadPhyUshort		__P((struct re_softc*, u_int8_t));
196 static void MP_WriteEPhyUshort			__P((struct re_softc*, u_int8_t, u_int16_t));
197 static u_int16_t MP_ReadEPhyUshort		__P((struct re_softc*, u_int8_t));
198 static u_int8_t MP_ReadEfuse			__P((struct re_softc*, u_int16_t));
199 static void MP_RealWritePhyOcpRegWord       __P((struct re_softc*, u_int16_t, u_int16_t));
200 static u_int16_t MP_RealReadPhyOcpRegWord   __P((struct re_softc*, u_int16_t));
201 static void MP_WritePhyOcpRegWord       __P((struct re_softc*, u_int16_t, u_int8_t, u_int16_t));
202 static u_int16_t MP_ReadPhyOcpRegWord   __P((struct re_softc*, u_int16_t, u_int8_t));
203 void MP_WriteMcuAccessRegWord    __P((struct re_softc*, u_int16_t, u_int16_t));
204 u_int16_t MP_ReadMcuAccessRegWord  __P((struct re_softc*, u_int16_t));
205 static void MP_WriteOtherFunPciEConfigSpace    __P((struct re_softc *, u_int8_t, u_int16_t, u_int32_t Regata));
206 static u_int32_t MP_ReadOtherFunPciEConfigSpace   __P((struct re_softc *, u_int8_t, u_int16_t));
207 static void MP_WritePciEConfigSpace     __P((struct re_softc*, u_int16_t, u_int32_t));
208 static u_int32_t MP_ReadPciEConfigSpace __P((struct re_softc*, u_int16_t));
209 static u_int8_t MP_ReadByteFun0PciEConfigSpace __P((struct re_softc*, u_int16_t));
210 static bool re_set_phy_mcu_patch_request  __P((struct re_softc *));
211 static bool re_clear_phy_mcu_patch_request  __P((struct re_softc *));
212 #endif	/* !__DragonFly__ */
213 
214 static int re_check_dash  __P((struct re_softc *));
215 
216 #ifndef __DragonFly__
217 static void re_driver_start             __P((struct re_softc*));
218 static void re_driver_stop         	__P((struct re_softc*));
219 
220 static void re_hw_phy_config		__P((struct re_softc *));
221 static void re_init			__P((void *));
222 static int  re_var_init			__P((struct re_softc *));
223 static void re_reset			__P((struct re_softc *));
224 static void re_stop			__P((struct re_softc *));
225 static void re_setwol			__P((struct re_softc *));
226 #endif	/* !__DragonFly__ */
227 static void re_clrwol			__P((struct re_softc *));
228 static void re_set_wol_linkspeed 	__P((struct re_softc *));
229 
230 #ifndef __DragonFly__
231 static void re_start				__P((struct ifnet *));
232 static int re_encap				__P((struct re_softc *, struct mbuf *));
233 static void WritePacket				__P((struct re_softc *, caddr_t, int, int, int, uint32_t, uint32_t));
234 static int CountFreeTxDescNum			__P((struct re_descriptor));
235 static int CountMbufNum				__P((struct mbuf *));
236 #ifdef RE_FIXUP_RX
237 static __inline void re_fixup_rx		__P((struct mbuf *));
238 #endif
239 static void re_txeof				__P((struct re_softc *));
240 
241 static void re_rxeof				__P((struct re_softc *));
242 
243 #if OS_VER < VERSION(7,0)
244 static void re_intr				__P((void *));
245 #else
246 static int re_intr				__P((void *));
247 #endif //OS_VER < VERSION(7,0)
248 #if OS_VER < VERSION(7,0)
249 static void re_intr_8125				__P((void *));
250 #else
251 static int re_intr_8125				__P((void *));
252 #endif //OS_VER < VERSION(7,0)
253 #endif	/* !__DragonFly__ */
254 static void re_set_multicast_reg	__P((struct re_softc *, u_int32_t, u_int32_t));
255 #ifndef __DragonFly__
256 static void re_set_rx_packet_filter_in_sleep_state	__P((struct re_softc *));
257 #endif
258 static void re_set_rx_packet_filter	__P((struct re_softc *));
259 static void re_setmulti			__P((struct re_softc *));
260 #ifndef __DragonFly__
261 static int  re_ioctl			__P((struct ifnet *, u_long, caddr_t));
262 #endif
263 static u_int8_t re_link_ok	__P((struct re_softc *));
264 static void re_link_on_patch	__P((struct re_softc *));
265 #ifndef __DragonFly__
266 static void re_link_down_patch	__P((struct re_softc *));
267 static void re_init_timer	__P((struct re_softc *));
268 static void re_stop_timer	__P((struct re_softc *));
269 static void re_start_timer	__P((struct re_softc *));
270 static void re_tick				__P((void *));
271 #if OS_VER < VERSION(7,0)
272 static void re_watchdog				__P((struct ifnet *));
273 #endif
274 #endif	/* !__DragonFly__ */
275 
276 static int  re_ifmedia_upd			__P((struct ifnet *));
277 static void re_ifmedia_sts			__P((struct ifnet *, struct ifmediareq *));
278 
279 static int  re_ifmedia_upd_8125			__P((struct ifnet *));
280 static void re_ifmedia_sts_8125			__P((struct ifnet *, struct ifmediareq *));
281 
282 static void re_eeprom_ShiftOutBits		__P((struct re_softc *, int, int));
283 static u_int16_t re_eeprom_ShiftInBits		__P((struct re_softc *));
284 static void re_eeprom_EEpromCleanup		__P((struct re_softc *));
285 static void re_eeprom_getword			__P((struct re_softc *, int, u_int16_t *));
286 static void re_read_eeprom			__P((struct re_softc *, caddr_t, int, int, int));
287 #ifndef __DragonFly__
288 static void re_int_task				(void *, int);
289 static void re_int_task_8125		(void *, int);
290 #endif	/* !__DragonFly__ */
291 
292 static void re_phy_power_up(device_t dev);
293 static void re_phy_power_down(device_t dev);
294 #ifndef __DragonFly__
295 static int re_alloc_buf(struct re_softc *);
296 static void re_release_buf(struct re_softc *);
297 static void set_rxbufsize(struct re_softc*);
298 static void re_release_rx_buf(struct re_softc *);
299 static void re_release_tx_buf(struct re_softc *);
300 #endif	/* !__DragonFly__ */
301 static u_int32_t re_eri_read(struct re_softc *, int, int, int);
302 static int re_eri_write(struct re_softc *, int, int, u_int32_t, int);
303 static void OOB_mutex_lock(struct re_softc *);
304 static void OOB_mutex_unlock(struct re_softc *);
305 
306 #ifdef __DragonFly__
307 static u_int16_t MP_RealReadPhyOcpRegWord(struct re_softc*, u_int16_t);
308 static void MP_RealWritePhyOcpRegWord(struct re_softc*, u_int16_t, u_int16_t);
309 
310 u_int16_t MP_ReadMcuAccessRegWord(struct re_softc *, u_int16_t);
311 void MP_WriteMcuAccessRegWord(struct re_softc *, u_int16_t, u_int16_t);
312 
313 u_int16_t MP_ReadPhyOcpRegWord(struct re_softc *, u_int16_t, u_int8_t);
314 void MP_WritePhyOcpRegWord(struct re_softc *, u_int16_t, u_int8_t, u_int16_t);
315 
316 void MP_WritePhyUshort(struct re_softc *, u_int8_t, u_int16_t);
317 u_int16_t MP_ReadPhyUshort(struct re_softc *, u_int8_t);
318 
319 u_int32_t MP_ReadPciEConfigSpace(struct re_softc *, u_int16_t);
320 void MP_WritePciEConfigSpace(struct re_softc *, u_int16_t, u_int32_t);
321 u_int32_t MP_ReadOtherFunPciEConfigSpace(struct re_softc *, u_int8_t,
322     u_int16_t);
323 void MP_WriteOtherFunPciEConfigSpace(struct re_softc *, u_int8_t, u_int16_t,
324     u_int32_t);
325 static u_int8_t MP_ReadByteFun0PciEConfigSpace(struct re_softc*, u_int16_t);
326 
327 u_int16_t MP_ReadEPhyUshort(struct re_softc *, u_int8_t);
328 void MP_WriteEPhyUshort(struct re_softc *, u_int8_t, u_int16_t);
329 
330 u_int8_t MP_ReadEfuse(struct re_softc *, u_int16_t);
331 
332 void re_driver_start(struct re_softc *);
333 void re_driver_stop(struct re_softc *);
334 
335 static bool re_set_phy_mcu_patch_request(struct re_softc *);
336 static bool re_clear_phy_mcu_patch_request(struct re_softc *);
337 #endif	/* __DragonFly__ */
338 
339 static void re_hw_start_unlock(struct re_softc *sc);
340 static void re_hw_start_unlock_8125(struct re_softc *sc);
341 
342 /* Tunables. */
343 static int msi_disable = 1;
344 TUNABLE_INT("hw.re.msi_disable", &msi_disable);
345 static int msix_disable = 0;
346 TUNABLE_INT("hw.re.msix_disable", &msix_disable);
347 static int prefer_iomap = 0;
348 TUNABLE_INT("hw.re.prefer_iomap", &prefer_iomap);
349 #ifdef ENABLE_EEE
350 static int eee_enable = 1;
351 #else
352 static int eee_enable = 0;
353 #endif
354 TUNABLE_INT("hw.re.eee_enable", &eee_enable);
355 static int phy_power_saving = 1;
356 TUNABLE_INT("hw.re.phy_power_saving", &phy_power_saving);
357 static int phy_mdix_mode = RE_ETH_PHY_AUTO_MDI_MDIX;
358 TUNABLE_INT("hw.re.phy_mdix_mode", &phy_mdix_mode);
359 #ifdef ENABLE_S5WOL
360 static int s5wol = 1;
361 #else
362 static int s5wol = 0;
363 TUNABLE_INT("hw.re.s5wol", &s5wol);
364 #endif
365 #ifdef ENABLE_S0_MAGIC_PACKET
366 static int s0_magic_packet = 1;
367 #else
368 static int s0_magic_packet = 0;
369 #endif
370 TUNABLE_INT("hw.re.s0_magic_packet", &s0_magic_packet);
371 
372 #define RE_CSUM_FEATURES    (CSUM_IP | CSUM_TCP | CSUM_UDP)
373 
374 #ifndef __DragonFly__
375 static device_method_t re_methods[] = {
376         /* Device interface */
377         DEVMETHOD(device_probe, re_probe),
378         DEVMETHOD(device_attach, re_attach),
379         DEVMETHOD(device_detach, re_detach),
380         DEVMETHOD(device_suspend, re_suspend),
381         DEVMETHOD(device_resume, re_resume),
382         DEVMETHOD(device_shutdown, re_shutdown),
383         { 0, 0 }
384 };
385 
386 static driver_t re_driver = {
387         "re",
388         re_methods,
389         sizeof(struct re_softc)
390 };
391 
392 static devclass_t re_devclass;
393 
394 DRIVER_MODULE(if_re, pci, re_driver, re_devclass, 0, 0);
395 #endif	/* !__DragonFly__ */
396 
397 static void
398 ClearAndSetEthPhyBit(
399         struct re_softc *sc,
400         u_int8_t   addr,
401         u_int16_t   clearmask,
402         u_int16_t   setmask
403 )
404 {
405         u_int16_t PhyRegValue;
406 
407 
408         PhyRegValue = MP_ReadPhyUshort(sc, addr);
409         PhyRegValue &= ~clearmask;
410         PhyRegValue |= setmask;
411         MP_WritePhyUshort(sc, addr, PhyRegValue);
412 }
413 
414 static void
415 ClearEthPhyBit(
416         struct re_softc *sc,
417         u_int8_t   addr,
418         u_int16_t   mask
419 )
420 {
421         ClearAndSetEthPhyBit(sc,
422                              addr,
423                              mask,
424                              0
425                             );
426 }
427 
428 static void
429 SetEthPhyBit(
430         struct re_softc *sc,
431         u_int8_t   addr,
432         u_int16_t   mask
433 )
434 {
435         ClearAndSetEthPhyBit(sc,
436                              addr,
437                              0,
438                              mask
439                             );
440 }
441 
442 static void
443 ClearAndSetEthPhyOcpBit(
444         struct re_softc *sc,
445         u_int16_t   addr,
446         u_int16_t   clearmask,
447         u_int16_t   setmask
448 )
449 {
450         u_int16_t PhyRegValue;
451 
452         PhyRegValue = MP_RealReadPhyOcpRegWord(sc, addr);
453         PhyRegValue &= ~clearmask;
454         PhyRegValue |= setmask;
455         MP_RealWritePhyOcpRegWord(sc, addr, PhyRegValue);
456 }
457 
458 static void
459 ClearEthPhyOcpBit(
460         struct re_softc *sc,
461         u_int16_t   addr,
462         u_int16_t   mask
463 )
464 {
465         ClearAndSetEthPhyOcpBit(sc,
466                                 addr,
467                                 mask,
468                                 0
469                                );
470 }
471 
472 static void
473 SetEthPhyOcpBit(
474         struct re_softc *sc,
475         u_int16_t   addr,
476         u_int16_t   mask
477 )
478 {
479         ClearAndSetEthPhyOcpBit(sc,
480                                 addr,
481                                 0,
482                                 mask
483                                );
484 }
485 
486 static void
487 ClearAndSetMcuAccessRegBit(
488         struct re_softc *sc,
489         u_int16_t   addr,
490         u_int16_t   clearmask,
491         u_int16_t   setmask
492 )
493 {
494         u_int16_t PhyRegValue;
495 
496         PhyRegValue = MP_ReadMcuAccessRegWord(sc, addr);
497         PhyRegValue &= ~clearmask;
498         PhyRegValue |= setmask;
499         MP_WriteMcuAccessRegWord(sc, addr, PhyRegValue);
500 }
501 
502 static void
503 ClearMcuAccessRegBit(
504         struct re_softc *sc,
505         u_int16_t   addr,
506         u_int16_t   mask
507 )
508 {
509         ClearAndSetMcuAccessRegBit(sc,
510                                    addr,
511                                    mask,
512                                    0
513                                   );
514 }
515 
516 static void
517 SetMcuAccessRegBit(
518         struct re_softc *sc,
519         u_int16_t   addr,
520         u_int16_t   mask
521 )
522 {
523         ClearAndSetMcuAccessRegBit(sc,
524                                    addr,
525                                    0,
526                                    mask
527                                   );
528 }
529 
530 static void re_clear_phy_ups_reg(struct re_softc *sc)
531 {
532         switch(sc->re_type) {
533         case MACFG_80:
534         case MACFG_81:
535         case MACFG_82:
536         case MACFG_83:
537                 if (sc->re_type == MACFG_82 || sc->re_type == MACFG_83)
538                         ClearEthPhyOcpBit(sc, 0xA466, BIT_0);
539 
540                 ClearEthPhyOcpBit(sc, 0xA468, BIT_3 | BIT_1);
541                 break;
542         };
543 }
544 
545 static int re_is_ups_resume(struct re_softc *sc)
546 {
547         switch(sc->re_type) {
548         case MACFG_80:
549         case MACFG_81:
550         case MACFG_82:
551         case MACFG_83:
552                 return (MP_ReadMcuAccessRegWord(sc, 0xD42C) & BIT_8);
553         default:
554                 return (MP_ReadMcuAccessRegWord(sc, 0xD408) & BIT_0);
555         }
556 }
557 
558 static void re_clear_ups_resume_bit(struct re_softc *sc)
559 {
560         switch(sc->re_type) {
561         case MACFG_80:
562         case MACFG_81:
563         case MACFG_82:
564         case MACFG_83:
565                 MP_WriteMcuAccessRegWord(sc, 0xD408, MP_ReadMcuAccessRegWord(sc, 0xD408) & ~(BIT_8));
566                 break;
567         default:
568                 MP_WriteMcuAccessRegWord(sc, 0xD408, MP_ReadMcuAccessRegWord(sc, 0xD408) & ~(BIT_0));
569                 break;
570         }
571 }
572 
573 static void re_wait_phy_ups_resume(struct re_softc *sc, u_int16_t PhyState)
574 {
575         u_int16_t TmpPhyState;
576         int i=0;
577 
578         switch(sc->re_type) {
579         case MACFG_80:
580         case MACFG_81:
581         case MACFG_82:
582         case MACFG_83:
583                 do {
584                         TmpPhyState = MP_RealReadPhyOcpRegWord(sc, 0xA420);
585                         TmpPhyState &= 0x7;
586                         DELAY(1000);
587                         i++;
588                 } while ((i < 100) && (TmpPhyState != 2));
589                 break;
590         default:
591                 do {
592                         TmpPhyState = MP_ReadPhyOcpRegWord(sc, 0x0A42, 0x10);
593                         TmpPhyState &= 0x7;
594                         DELAY(1000);
595                         i++;
596                 } while ((i < 100) && (TmpPhyState != 2));
597                 break;
598         };
599 }
600 
601 static void re_phy_power_up(device_t dev)
602 {
603         struct re_softc		*sc;
604         u_int8_t Data8;
605 
606         sc = device_get_softc(dev);
607 
608         if ((sc->re_if_flags & RL_FLAG_PHYWAKE_PM) != 0)
609                 CSR_WRITE_1(sc, RE_PMCH, CSR_READ_1(sc, RE_PMCH) | (BIT_6|BIT_7));
610 
611         MP_WritePhyUshort(sc, 0x1F, 0x0000);
612 
613         switch (sc->re_type) {
614         case MACFG_4:
615         case MACFG_5:
616         case MACFG_6:
617         case MACFG_21:
618         case MACFG_22:
619         case MACFG_23:
620         case MACFG_24:
621         case MACFG_25:
622         case MACFG_26:
623         case MACFG_27:
624         case MACFG_28:
625         case MACFG_31:
626         case MACFG_32:
627         case MACFG_33:
628         case MACFG_63:
629         case MACFG_64:
630         case MACFG_65:
631         case MACFG_66:
632                 MP_WritePhyUshort(sc, 0x0e, 0x0000);
633                 break;
634         case MACFG_56:
635         case MACFG_57:
636         case MACFG_58:
637         case MACFG_61:
638                 Data8 = re_eri_read(sc, 0x1AB, 1, ERIAR_ExGMAC);
639                 Data8 |= (BIT_2 | BIT_3 | BIT_4 | BIT_5 | BIT_6 | BIT_7);
640                 re_eri_write(sc, 0x1AB, 1, Data8, ERIAR_ExGMAC);
641                 break;
642         default:
643                 break;
644         };
645 
646 
647         MP_WritePhyUshort(sc, MII_BMCR, BMCR_AUTOEN);
648 
649         //wait mdc/mdio ready
650         switch(sc->re_type) {
651         case MACFG_61:
652         case MACFG_62:
653         case MACFG_67:
654                 DELAY(10000);
655                 break;
656         }
657 
658         //wait ups resume (phy state 3)
659         switch(sc->re_type) {
660         case MACFG_68:
661         case MACFG_69:
662         case MACFG_70:
663         case MACFG_71:
664         case MACFG_72:
665         case MACFG_80:
666         case MACFG_81:
667         case MACFG_82:
668         case MACFG_83:
669                 re_wait_phy_ups_resume(sc, 3);
670                 break;
671         };
672 }
673 
674 static u_int16_t re_get_phy_lp_ability(struct re_softc *sc)
675 {
676         u_int16_t anlpar;
677 
678         MP_WritePhyUshort(sc, 0x1F, 0x0000);
679         anlpar = MP_ReadPhyUshort(sc, MII_ANLPAR);
680 
681         return anlpar;
682 }
683 
684 static void re_phy_power_down(device_t dev)
685 {
686         struct re_softc		*sc;
687         u_int8_t Data8;
688 
689         sc = device_get_softc(dev);
690 
691 #ifdef ENABLE_FIBER_SUPPORT
692         if (HW_FIBER_MODE_ENABLED(sc))
693                 return;
694 #endif //ENABLE_FIBER_SUPPORT
695 
696         if (sc->re_dash) {
697                 re_set_wol_linkspeed(sc);
698                 return;
699         }
700 
701         MP_WritePhyUshort(sc, 0x1F, 0x0000);
702 
703         switch (sc->re_type) {
704         case MACFG_21:
705         case MACFG_22:
706         case MACFG_23:
707         case MACFG_24:
708         case MACFG_25:
709         case MACFG_26:
710         case MACFG_27:
711         case MACFG_28:
712         case MACFG_31:
713         case MACFG_32:
714         case MACFG_33:
715         case MACFG_63:
716         case MACFG_64:
717         case MACFG_65:
718         case MACFG_66:
719                 MP_WritePhyUshort(sc, 0x0e, 0x0200);
720                 MP_WritePhyUshort(sc, MII_BMCR, (BMCR_AUTOEN|BMCR_PDOWN));
721                 break;
722         case MACFG_56:
723         case MACFG_57:
724         case MACFG_58:
725         case MACFG_61:
726                 Data8 = re_eri_read(sc, 0x1AB, 1, ERIAR_ExGMAC);
727                 Data8 &= ~(BIT_2 | BIT_3 | BIT_4 | BIT_5 | BIT_6 | BIT_7);
728                 re_eri_write(sc, 0x1AB, 1, Data8, ERIAR_ExGMAC);
729 
730                 MP_WritePhyUshort(sc, MII_BMCR, (BMCR_AUTOEN|BMCR_PDOWN));
731                 break;
732         default:
733                 MP_WritePhyUshort(sc, MII_BMCR, (BMCR_AUTOEN|BMCR_PDOWN));
734                 break;
735         }
736 
737         switch (sc->re_type) {
738         case MACFG_36:
739         case MACFG_37:
740         case MACFG_42:
741         case MACFG_43:
742         case MACFG_54:
743         case MACFG_55:
744                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) & ~BIT_6);
745                 break;
746         case MACFG_38:
747         case MACFG_39:
748         case MACFG_50:
749         case MACFG_51:
750         case MACFG_52:
751         case MACFG_56:
752         case MACFG_57:
753         case MACFG_58:
754         case MACFG_59:
755         case MACFG_60:
756         case MACFG_61:
757         case MACFG_62:
758         case MACFG_67:
759         case MACFG_68:
760         case MACFG_69:
761         case MACFG_70:
762         case MACFG_71:
763         case MACFG_72:
764                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) & ~BIT_6);
765                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) & ~BIT_6);
766                 break;
767         }
768 
769         if ((sc->re_if_flags & RL_FLAG_PHYWAKE_PM) != 0)
770                 CSR_WRITE_1(sc, RE_PMCH, CSR_READ_1(sc, RE_PMCH) & ~(BIT_6|BIT_7));
771 }
772 
773 #ifndef __DragonFly__
774 static void re_tx_dma_map_buf(void *arg, bus_dma_segment_t *segs, int nseg, int error)
775 {
776         union TxDesc *txptr = arg;
777 
778         if (error) {
779                 txptr->ul[0] &= ~htole32(RL_TDESC_CMD_BUFLEN);
780                 txptr->so1.TxBuffL = 0;
781                 txptr->so1.TxBuffH = 0;
782                 return;
783         }
784 
785         txptr->so1.TxBuffL = htole32(RL_ADDR_LO(segs->ds_addr));
786         txptr->so1.TxBuffH = htole32(RL_ADDR_HI(segs->ds_addr));
787 }
788 
789 static void re_rx_dma_map_buf(void *arg, bus_dma_segment_t *segs, int nseg, int error)
790 {
791         union RxDesc *rxptr = arg;
792 
793         if (error) {
794                 rxptr->ul[0] &= ~htole32(RL_RDESC_CMD_BUFLEN);
795                 rxptr->so0.RxBuffL = 0;
796                 rxptr->so0.RxBuffH = 0;
797                 return;
798         }
799 
800         rxptr->so0.RxBuffL = htole32(RL_ADDR_LO(segs->ds_addr));
801         rxptr->so0.RxBuffH = htole32(RL_ADDR_HI(segs->ds_addr));
802 }
803 
804 static void re_dma_map_rxdesc(void *arg, bus_dma_segment_t *segs, int nseg, int error)
805 {
806         struct re_softc *sc = arg;
807 
808 
809         if (error)
810                 return;
811 
812         CSR_WRITE_4(sc, 0xe4, RL_ADDR_LO(segs->ds_addr));
813         CSR_WRITE_4(sc, 0xe8, RL_ADDR_HI(segs->ds_addr));
814 }
815 
816 static void re_dma_map_txdesc(void *arg, bus_dma_segment_t *segs, int nseg, int error)
817 {
818         struct re_softc *sc = arg;
819 
820 
821         if (error)
822                 return;
823 
824         CSR_WRITE_4(sc, 0x20, RL_ADDR_LO(segs->ds_addr));
825         CSR_WRITE_4(sc, 0x24, RL_ADDR_HI(segs->ds_addr));
826 }
827 
828 /*
829  * Probe for a RealTek 8129/8139 chip. Check the PCI vendor and device
830  * IDs against our list and return a device name if we find a match.
831  */
832 static int re_probe(dev)	/* Search for Realtek NIC chip */
833 device_t		dev;
834 {
835         struct re_type		*t;
836         t = re_devs;
837         while (t->re_name != NULL) {
838                 if ((pci_get_vendor(dev) == t->re_vid) &&
839                     (pci_get_device(dev) == t->re_did)) {
840                         device_set_desc(dev, t->re_name);
841                         return(0);
842                 }
843                 t++;
844         }
845 
846         return(ENXIO);
847 }
848 #endif	/* !__DragonFly__ */
849 
850 
851 static u_int32_t re_eri_read_with_oob_base_address(struct re_softc *sc, int addr, int len, int type, const u_int32_t base_address)
852 {
853         int i, val_shift, shift = 0;
854         u_int32_t value1 = 0, value2 = 0, mask;
855         const u_int32_t transformed_base_address = ((base_address & 0x00FFF000) << 6) | (base_address & 0x000FFF);
856 
857         if (len > 4 || len <= 0)
858                 return -1;
859 
860         while (len > 0) {
861                 val_shift = addr % ERIAR_Addr_Align;
862                 addr = addr & ~0x3;
863 
864                 CSR_WRITE_4(sc,RE_ERIAR,
865                             ERIAR_Read |
866                             transformed_base_address |
867                             type << ERIAR_Type_shift |
868                             ERIAR_ByteEn << ERIAR_ByteEn_shift |
869                             addr);
870 
871                 for (i = 0; i < 10; i++) {
872                         DELAY(100);
873 
874                         /* Check if the RTL8168 has completed ERI read */
875                         if (CSR_READ_4(sc,RE_ERIAR) & ERIAR_Flag)
876                                 break;
877                 }
878 
879                 if (len == 1)		mask = (0xFF << (val_shift * 8)) & 0xFFFFFFFF;
880                 else if (len == 2)	mask = (0xFFFF << (val_shift * 8)) & 0xFFFFFFFF;
881                 else if (len == 3)	mask = (0xFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
882                 else			mask = (0xFFFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
883 
884                 value1 = CSR_READ_4(sc,RE_ERIDR) & mask;
885                 value2 |= (value1 >> val_shift * 8) << shift * 8;
886 
887                 if (len <= 4 - val_shift)
888                         len = 0;
889                 else {
890                         len -= (4 - val_shift);
891                         shift = 4 - val_shift;
892                         addr += 4;
893                 }
894         }
895 
896         return value2;
897 }
898 
899 static u_int32_t re_eri_read(struct re_softc *sc, int addr, int len, int type)
900 {
901         return re_eri_read_with_oob_base_address(sc, addr, len, type, 0);
902 }
903 
904 static int re_eri_write_with_oob_base_address(struct re_softc *sc, int addr, int len, u_int32_t value, int type, const u_int32_t base_address)
905 {
906 
907         int i, val_shift, shift = 0;
908         u_int32_t value1 = 0, mask;
909         const u_int32_t transformed_base_address = ((base_address & 0x00FFF000) << 6) | (base_address & 0x000FFF);
910 
911         if (len > 4 || len <= 0)
912                 return -1;
913 
914         while (len > 0) {
915                 val_shift = addr % ERIAR_Addr_Align;
916                 addr = addr & ~0x3;
917 
918                 if (len == 1)		mask = (0xFF << (val_shift * 8)) & 0xFFFFFFFF;
919                 else if (len == 2)	mask = (0xFFFF << (val_shift * 8)) & 0xFFFFFFFF;
920                 else if (len == 3)	mask = (0xFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
921                 else			mask = (0xFFFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
922 
923                 value1 = re_eri_read_with_oob_base_address(sc, addr, 4, type, base_address) & ~mask;
924                 value1 |= ((value << val_shift * 8) >> shift * 8);
925 
926                 CSR_WRITE_4(sc,RE_ERIDR, value1);
927                 CSR_WRITE_4(sc,RE_ERIAR,
928                             ERIAR_Write |
929                             transformed_base_address |
930                             type << ERIAR_Type_shift |
931                             ERIAR_ByteEn << ERIAR_ByteEn_shift |
932                             addr);
933 
934                 for (i = 0; i < 10; i++) {
935                         DELAY(100);
936 
937                         /* Check if the RTL8168 has completed ERI write */
938                         if (!(CSR_READ_4(sc,RE_ERIAR) & ERIAR_Flag))
939                                 break;
940                 }
941 
942                 if (len <= 4 - val_shift)
943                         len = 0;
944                 else {
945                         len -= (4 - val_shift);
946                         shift = 4 - val_shift;
947                         addr += 4;
948                 }
949         }
950 
951         return 0;
952 }
953 
954 static int re_eri_write(struct re_softc *sc, int addr, int len, u_int32_t value, int type)
955 {
956         return re_eri_write_with_oob_base_address(sc, addr, len, value, type, 0);
957 }
958 
959 #ifndef __DragonFly__
960 static void re_release_rx_buf(struct re_softc *sc)
961 {
962         struct ifnet		*ifp;
963         int i;
964         ifp = RE_GET_IFNET(sc);
965 
966         if (sc->re_desc.re_rx_mtag) {
967                 for (i = 0; i < RE_RX_BUF_NUM; i++) {
968                         if (sc->re_desc.rx_buf[i]!=NULL) {
969                                 bus_dmamap_sync(sc->re_desc.re_rx_mtag,
970                                                 sc->re_desc.re_rx_dmamap[i],
971                                                 BUS_DMASYNC_POSTREAD);
972                                 bus_dmamap_unload(sc->re_desc.re_rx_mtag,
973                                                   sc->re_desc.re_rx_dmamap[i]);
974                                 bus_dmamap_destroy(sc->re_desc.re_rx_mtag,
975                                                    sc->re_desc.re_rx_dmamap[i]);
976                                 m_freem(sc->re_desc.rx_buf[i]);
977                                 sc->re_desc.rx_buf[i] =NULL;
978                         }
979                 }
980                 bus_dma_tag_destroy(sc->re_desc.re_rx_mtag);
981                 sc->re_desc.re_rx_mtag =0;
982         }
983 
984 }
985 static void re_release_tx_buf(struct re_softc *sc)
986 {
987         struct ifnet		*ifp;
988         int i;
989         ifp = RE_GET_IFNET(sc);
990 
991         if (sc->re_desc.re_tx_mtag) {
992                 for (i = 0; i < RE_TX_BUF_NUM; i++) {
993 
994                         bus_dmamap_destroy(sc->re_desc.re_tx_mtag,
995                                            sc->re_desc.re_tx_dmamap[i]);
996                         m_freem(sc->re_desc.tx_buf[i]);
997 
998                 }
999                 bus_dma_tag_destroy(sc->re_desc.re_tx_mtag);
1000                 sc->re_desc.re_tx_mtag = 0;
1001         }
1002 
1003 
1004 }
1005 static void re_release_buf(struct re_softc *sc)
1006 {
1007         re_release_rx_buf(sc);
1008         re_release_tx_buf(sc);
1009 }
1010 
1011 
1012 
1013 static int re_alloc_buf(struct re_softc *sc)
1014 {
1015         int error =0;
1016         int i,size;
1017 
1018         error = bus_dma_tag_create(sc->re_parent_tag, 1, 0,
1019                                    BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL,
1020                                    NULL, MCLBYTES* RE_NTXSEGS, RE_NTXSEGS, 4096, 0,
1021                                    NULL, NULL, &sc->re_desc.re_tx_mtag);
1022 
1023         if (error) {
1024                 //device_printf(dev,"re_tx_mtag fail\n");
1025                 //goto fail;
1026                 return error;
1027         }
1028 
1029         error = bus_dma_tag_create(
1030                         sc->re_parent_tag,
1031                         RE_RX_BUFFER_ALIGN, 0,		/* alignment, boundary */
1032                         BUS_SPACE_MAXADDR,		/* lowaddr */
1033                         BUS_SPACE_MAXADDR,		/* highaddr */
1034                         NULL, NULL,			/* filter, filterarg */
1035                         sc->re_rx_desc_buf_sz, 1,			/* maxsize,nsegments */
1036                         sc->re_rx_desc_buf_sz,			/* maxsegsize */
1037                         0,				/* flags */
1038                         NULL, NULL,			/* lockfunc, lockarg */
1039                         &sc->re_desc.re_rx_mtag);
1040         if (error) {
1041                 //device_printf(dev,"re_rx_mtag fail\n");
1042                 //goto fail;
1043                 return error;
1044         }
1045 
1046         if (sc->re_rx_mbuf_sz <= MCLBYTES)
1047                 size = MCLBYTES;
1048         else if (sc->re_rx_mbuf_sz <=  MJUMPAGESIZE)
1049                 size = MJUMPAGESIZE;
1050         else
1051                 size =MJUM9BYTES;
1052         for (i = 0; i < RE_RX_BUF_NUM; i++) {
1053                 sc->re_desc.rx_buf[i] = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, size);
1054                 if (!sc->re_desc.rx_buf[i]) {
1055                         //device_printf(dev, "m_getcl fail!!!\n");
1056                         error = ENXIO;
1057                         //goto fail;
1058                         return error;
1059                 }
1060 
1061                 sc->re_desc.rx_buf[i]->m_len = sc->re_desc.rx_buf[i]->m_pkthdr.len = size;
1062 #ifdef RE_FIXUP_RX
1063                 /*
1064                  * This is part of an evil trick to deal with non-x86 platforms.
1065                  * The RealTek chip requires RX buffers to be aligned on 64-bit
1066                  * boundaries, but that will hose non-x86 machines. To get around
1067                  * this, we leave some empty space at the start of each buffer
1068                  * and for non-x86 hosts, we copy the buffer back six bytes
1069                  * to achieve word alignment. This is slightly more efficient
1070                  * than allocating a new buffer, copying the contents, and
1071                  * discarding the old buffer.
1072                  */
1073                 m_adj(sc->re_desc.rx_buf[i], RE_ETHER_ALIGN);
1074 #endif
1075 
1076                 error = bus_dmamap_create(sc->re_desc.re_rx_mtag, BUS_DMA_NOWAIT, &sc->re_desc.re_rx_dmamap[i]);
1077                 if (error) {
1078                         //device_printf(dev, "bus_dmamap_create fail!!!\n");
1079                         //goto fail;
1080                         return error;
1081                 }
1082         }
1083 
1084         for (i = 0; i < RE_TX_BUF_NUM; i++) {
1085                 error = bus_dmamap_create(sc->re_desc.re_tx_mtag, BUS_DMA_NOWAIT, &sc->re_desc.re_tx_dmamap[i]);
1086                 if (error) {
1087                         //device_printf(dev, "bus_dmamap_create fail!!!\n");
1088                         //goto fail;
1089                         return error;
1090                 }
1091         }
1092 
1093         return 0;
1094 }
1095 
1096 static void set_rxbufsize(struct re_softc *sc)
1097 {
1098 
1099         //printf("set size\n");
1100 
1101         struct ifnet		*ifp;
1102         ifp = RE_GET_IFNET(sc);
1103         sc->re_rx_desc_buf_sz = (ifp->if_mtu > ETHERMTU) ? ifp->if_mtu: ETHERMTU;
1104         sc->re_rx_desc_buf_sz += (ETHER_VLAN_ENCAP_LEN + ETHER_HDR_LEN + ETHER_CRC_LEN + 1);
1105         CSR_WRITE_2(sc, RE_RxMaxSize, sc->re_rx_desc_buf_sz);
1106 }
1107 #endif	/* !__DragonFly__ */
1108 
1109 static void re_enable_cfg9346_write(struct re_softc *sc)
1110 {
1111         EE_SET(RE_EEMODE_WRITECFG);
1112 }
1113 
1114 static void re_disable_cfg9346_write(struct re_softc *sc)
1115 {
1116         EE_CLR(RE_EEMODE_WRITECFG);
1117 }
1118 
1119 static void DisableMcuBPs(struct re_softc *sc)
1120 {
1121         switch(sc->re_type) {
1122         case MACFG_68:
1123         case MACFG_69:
1124         case MACFG_70:
1125         case MACFG_71:
1126         case MACFG_72:
1127         case MACFG_80:
1128         case MACFG_81:
1129         case MACFG_82:
1130         case MACFG_83:
1131                 MP_WriteMcuAccessRegWord(sc, 0xFC38, 0x0000);
1132                 break;
1133         }
1134 
1135         switch(sc->re_type) {
1136         case MACFG_56:
1137         case MACFG_57:
1138         case MACFG_58:
1139         case MACFG_59:
1140         case MACFG_60:
1141         case MACFG_61:
1142         case MACFG_62:
1143         case MACFG_67:
1144         case MACFG_68:
1145         case MACFG_69:
1146         case MACFG_70:
1147         case MACFG_71:
1148         case MACFG_72:
1149                 re_enable_cfg9346_write(sc);
1150                 CSR_WRITE_1(sc, RE_CFG5, CSR_READ_1(sc, RE_CFG5) & ~BIT_0);
1151                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) & ~BIT_7);
1152                 re_disable_cfg9346_write(sc);
1153 
1154                 MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x0000);
1155                 MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x0000);
1156                 MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x0000);
1157                 MP_WriteMcuAccessRegWord(sc, 0xFC2E, 0x0000);
1158                 MP_WriteMcuAccessRegWord(sc, 0xFC30, 0x0000);
1159                 MP_WriteMcuAccessRegWord(sc, 0xFC32, 0x0000);
1160                 MP_WriteMcuAccessRegWord(sc, 0xFC34, 0x0000);
1161                 MP_WriteMcuAccessRegWord(sc, 0xFC36, 0x0000);
1162 
1163                 DELAY(3000);
1164 
1165                 MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x0000);
1166                 break;
1167         }
1168 }
1169 
1170 static void re_set_mac_mcu_8168g_1(struct re_softc *sc)
1171 {
1172         MP_WriteMcuAccessRegWord(sc, 0xE43C, 0x0000);
1173         MP_WriteMcuAccessRegWord(sc, 0xE43E, 0x0000);
1174 
1175         MP_WriteMcuAccessRegWord(sc, 0xE434, 0x0004);
1176         MP_WriteMcuAccessRegWord(sc, 0xE43C, 0x0004);
1177 
1178         DisableMcuBPs(sc);
1179 
1180         MP_WriteMcuAccessRegWord(sc, 0xF800, 0xE008);
1181         MP_WriteMcuAccessRegWord(sc, 0xF802, 0xE01B);
1182         MP_WriteMcuAccessRegWord(sc, 0xF804, 0xE022);
1183         MP_WriteMcuAccessRegWord(sc, 0xF806, 0xE094);
1184         MP_WriteMcuAccessRegWord(sc, 0xF808, 0xE097);
1185         MP_WriteMcuAccessRegWord(sc, 0xF80A, 0xE09A);
1186         MP_WriteMcuAccessRegWord(sc, 0xF80C, 0xE0B3);
1187         MP_WriteMcuAccessRegWord(sc, 0xF80E, 0xE0BA);
1188         MP_WriteMcuAccessRegWord(sc, 0xF810, 0x49D2);
1189         MP_WriteMcuAccessRegWord(sc, 0xF812, 0xF10D);
1190         MP_WriteMcuAccessRegWord(sc, 0xF814, 0x766C);
1191         MP_WriteMcuAccessRegWord(sc, 0xF816, 0x49E2);
1192         MP_WriteMcuAccessRegWord(sc, 0xF818, 0xF00A);
1193         MP_WriteMcuAccessRegWord(sc, 0xF81A, 0x1EC0);
1194         MP_WriteMcuAccessRegWord(sc, 0xF81C, 0x8EE1);
1195         MP_WriteMcuAccessRegWord(sc, 0xF81E, 0xC60A);
1196         MP_WriteMcuAccessRegWord(sc, 0xF820, 0x77C0);
1197         MP_WriteMcuAccessRegWord(sc, 0xF822, 0x4870);
1198         MP_WriteMcuAccessRegWord(sc, 0xF824, 0x9FC0);
1199         MP_WriteMcuAccessRegWord(sc, 0xF826, 0x1EA0);
1200         MP_WriteMcuAccessRegWord(sc, 0xF828, 0xC707);
1201         MP_WriteMcuAccessRegWord(sc, 0xF82A, 0x8EE1);
1202         MP_WriteMcuAccessRegWord(sc, 0xF82C, 0x9D6C);
1203         MP_WriteMcuAccessRegWord(sc, 0xF82E, 0xC603);
1204         MP_WriteMcuAccessRegWord(sc, 0xF830, 0xBE00);
1205         MP_WriteMcuAccessRegWord(sc, 0xF832, 0xB416);
1206         MP_WriteMcuAccessRegWord(sc, 0xF834, 0x0076);
1207         MP_WriteMcuAccessRegWord(sc, 0xF836, 0xE86C);
1208         MP_WriteMcuAccessRegWord(sc, 0xF838, 0xC406);
1209         MP_WriteMcuAccessRegWord(sc, 0xF83A, 0x7580);
1210         MP_WriteMcuAccessRegWord(sc, 0xF83C, 0x4852);
1211         MP_WriteMcuAccessRegWord(sc, 0xF83E, 0x8D80);
1212         MP_WriteMcuAccessRegWord(sc, 0xF840, 0xC403);
1213         MP_WriteMcuAccessRegWord(sc, 0xF842, 0xBC00);
1214         MP_WriteMcuAccessRegWord(sc, 0xF844, 0xD3E0);
1215         MP_WriteMcuAccessRegWord(sc, 0xF846, 0x02C8);
1216         MP_WriteMcuAccessRegWord(sc, 0xF848, 0x8918);
1217         MP_WriteMcuAccessRegWord(sc, 0xF84A, 0xE815);
1218         MP_WriteMcuAccessRegWord(sc, 0xF84C, 0x1100);
1219         MP_WriteMcuAccessRegWord(sc, 0xF84E, 0xF011);
1220         MP_WriteMcuAccessRegWord(sc, 0xF850, 0xE812);
1221         MP_WriteMcuAccessRegWord(sc, 0xF852, 0x4990);
1222         MP_WriteMcuAccessRegWord(sc, 0xF854, 0xF002);
1223         MP_WriteMcuAccessRegWord(sc, 0xF856, 0xE817);
1224         MP_WriteMcuAccessRegWord(sc, 0xF858, 0xE80E);
1225         MP_WriteMcuAccessRegWord(sc, 0xF85A, 0x4992);
1226         MP_WriteMcuAccessRegWord(sc, 0xF85C, 0xF002);
1227         MP_WriteMcuAccessRegWord(sc, 0xF85E, 0xE80E);
1228         MP_WriteMcuAccessRegWord(sc, 0xF860, 0xE80A);
1229         MP_WriteMcuAccessRegWord(sc, 0xF862, 0x4993);
1230         MP_WriteMcuAccessRegWord(sc, 0xF864, 0xF002);
1231         MP_WriteMcuAccessRegWord(sc, 0xF866, 0xE818);
1232         MP_WriteMcuAccessRegWord(sc, 0xF868, 0xE806);
1233         MP_WriteMcuAccessRegWord(sc, 0xF86A, 0x4991);
1234         MP_WriteMcuAccessRegWord(sc, 0xF86C, 0xF002);
1235         MP_WriteMcuAccessRegWord(sc, 0xF86E, 0xE838);
1236         MP_WriteMcuAccessRegWord(sc, 0xF870, 0xC25E);
1237         MP_WriteMcuAccessRegWord(sc, 0xF872, 0xBA00);
1238         MP_WriteMcuAccessRegWord(sc, 0xF874, 0xC056);
1239         MP_WriteMcuAccessRegWord(sc, 0xF876, 0x7100);
1240         MP_WriteMcuAccessRegWord(sc, 0xF878, 0xFF80);
1241         MP_WriteMcuAccessRegWord(sc, 0xF87A, 0x7100);
1242         MP_WriteMcuAccessRegWord(sc, 0xF87C, 0x4892);
1243         MP_WriteMcuAccessRegWord(sc, 0xF87E, 0x4813);
1244         MP_WriteMcuAccessRegWord(sc, 0xF880, 0x8900);
1245         MP_WriteMcuAccessRegWord(sc, 0xF882, 0xE00A);
1246         MP_WriteMcuAccessRegWord(sc, 0xF884, 0x7100);
1247         MP_WriteMcuAccessRegWord(sc, 0xF886, 0x4890);
1248         MP_WriteMcuAccessRegWord(sc, 0xF888, 0x4813);
1249         MP_WriteMcuAccessRegWord(sc, 0xF88A, 0x8900);
1250         MP_WriteMcuAccessRegWord(sc, 0xF88C, 0xC74B);
1251         MP_WriteMcuAccessRegWord(sc, 0xF88E, 0x74F8);
1252         MP_WriteMcuAccessRegWord(sc, 0xF890, 0x48C2);
1253         MP_WriteMcuAccessRegWord(sc, 0xF892, 0x4841);
1254         MP_WriteMcuAccessRegWord(sc, 0xF894, 0x8CF8);
1255         MP_WriteMcuAccessRegWord(sc, 0xF896, 0xC746);
1256         MP_WriteMcuAccessRegWord(sc, 0xF898, 0x74FC);
1257         MP_WriteMcuAccessRegWord(sc, 0xF89A, 0x49C0);
1258         MP_WriteMcuAccessRegWord(sc, 0xF89C, 0xF120);
1259         MP_WriteMcuAccessRegWord(sc, 0xF89E, 0x49C1);
1260         MP_WriteMcuAccessRegWord(sc, 0xF8A0, 0xF11E);
1261         MP_WriteMcuAccessRegWord(sc, 0xF8A2, 0x74F8);
1262         MP_WriteMcuAccessRegWord(sc, 0xF8A4, 0x49C0);
1263         MP_WriteMcuAccessRegWord(sc, 0xF8A6, 0xF01B);
1264         MP_WriteMcuAccessRegWord(sc, 0xF8A8, 0x49C6);
1265         MP_WriteMcuAccessRegWord(sc, 0xF8AA, 0xF119);
1266         MP_WriteMcuAccessRegWord(sc, 0xF8AC, 0x74F8);
1267         MP_WriteMcuAccessRegWord(sc, 0xF8AE, 0x49C4);
1268         MP_WriteMcuAccessRegWord(sc, 0xF8B0, 0xF013);
1269         MP_WriteMcuAccessRegWord(sc, 0xF8B2, 0xC536);
1270         MP_WriteMcuAccessRegWord(sc, 0xF8B4, 0x74B0);
1271         MP_WriteMcuAccessRegWord(sc, 0xF8B6, 0x49C1);
1272         MP_WriteMcuAccessRegWord(sc, 0xF8B8, 0xF1FD);
1273         MP_WriteMcuAccessRegWord(sc, 0xF8BA, 0xC537);
1274         MP_WriteMcuAccessRegWord(sc, 0xF8BC, 0xC434);
1275         MP_WriteMcuAccessRegWord(sc, 0xF8BE, 0x9CA0);
1276         MP_WriteMcuAccessRegWord(sc, 0xF8C0, 0xC435);
1277         MP_WriteMcuAccessRegWord(sc, 0xF8C2, 0x1C13);
1278         MP_WriteMcuAccessRegWord(sc, 0xF8C4, 0x484F);
1279         MP_WriteMcuAccessRegWord(sc, 0xF8C6, 0x9CA2);
1280         MP_WriteMcuAccessRegWord(sc, 0xF8C8, 0xC52B);
1281         MP_WriteMcuAccessRegWord(sc, 0xF8CA, 0x74B0);
1282         MP_WriteMcuAccessRegWord(sc, 0xF8CC, 0x49C1);
1283         MP_WriteMcuAccessRegWord(sc, 0xF8CE, 0xF1FD);
1284         MP_WriteMcuAccessRegWord(sc, 0xF8D0, 0x74F8);
1285         MP_WriteMcuAccessRegWord(sc, 0xF8D2, 0x48C4);
1286         MP_WriteMcuAccessRegWord(sc, 0xF8D4, 0x8CF8);
1287         MP_WriteMcuAccessRegWord(sc, 0xF8D6, 0x7100);
1288         MP_WriteMcuAccessRegWord(sc, 0xF8D8, 0x4893);
1289         MP_WriteMcuAccessRegWord(sc, 0xF8DA, 0x8900);
1290         MP_WriteMcuAccessRegWord(sc, 0xF8DC, 0xFF80);
1291         MP_WriteMcuAccessRegWord(sc, 0xF8DE, 0xC520);
1292         MP_WriteMcuAccessRegWord(sc, 0xF8E0, 0x74B0);
1293         MP_WriteMcuAccessRegWord(sc, 0xF8E2, 0x49C1);
1294         MP_WriteMcuAccessRegWord(sc, 0xF8E4, 0xF11C);
1295         MP_WriteMcuAccessRegWord(sc, 0xF8E6, 0xC71E);
1296         MP_WriteMcuAccessRegWord(sc, 0xF8E8, 0x74FC);
1297         MP_WriteMcuAccessRegWord(sc, 0xF8EA, 0x49C1);
1298         MP_WriteMcuAccessRegWord(sc, 0xF8EC, 0xF118);
1299         MP_WriteMcuAccessRegWord(sc, 0xF8EE, 0x49C0);
1300         MP_WriteMcuAccessRegWord(sc, 0xF8F0, 0xF116);
1301         MP_WriteMcuAccessRegWord(sc, 0xF8F2, 0x74F8);
1302         MP_WriteMcuAccessRegWord(sc, 0xF8F4, 0x49C0);
1303         MP_WriteMcuAccessRegWord(sc, 0xF8F6, 0xF013);
1304         MP_WriteMcuAccessRegWord(sc, 0xF8F8, 0x48C3);
1305         MP_WriteMcuAccessRegWord(sc, 0xF8FA, 0x8CF8);
1306         MP_WriteMcuAccessRegWord(sc, 0xF8FC, 0xC516);
1307         MP_WriteMcuAccessRegWord(sc, 0xF8FE, 0x74A2);
1308         MP_WriteMcuAccessRegWord(sc, 0xF900, 0x49CE);
1309         MP_WriteMcuAccessRegWord(sc, 0xF902, 0xF1FE);
1310         MP_WriteMcuAccessRegWord(sc, 0xF904, 0xC411);
1311         MP_WriteMcuAccessRegWord(sc, 0xF906, 0x9CA0);
1312         MP_WriteMcuAccessRegWord(sc, 0xF908, 0xC411);
1313         MP_WriteMcuAccessRegWord(sc, 0xF90A, 0x1C13);
1314         MP_WriteMcuAccessRegWord(sc, 0xF90C, 0x484F);
1315         MP_WriteMcuAccessRegWord(sc, 0xF90E, 0x9CA2);
1316         MP_WriteMcuAccessRegWord(sc, 0xF910, 0x74A2);
1317         MP_WriteMcuAccessRegWord(sc, 0xF912, 0x49CF);
1318         MP_WriteMcuAccessRegWord(sc, 0xF914, 0xF1FE);
1319         MP_WriteMcuAccessRegWord(sc, 0xF916, 0x7100);
1320         MP_WriteMcuAccessRegWord(sc, 0xF918, 0x4891);
1321         MP_WriteMcuAccessRegWord(sc, 0xF91A, 0x8900);
1322         MP_WriteMcuAccessRegWord(sc, 0xF91C, 0xFF80);
1323         MP_WriteMcuAccessRegWord(sc, 0xF91E, 0xE400);
1324         MP_WriteMcuAccessRegWord(sc, 0xF920, 0xD3E0);
1325         MP_WriteMcuAccessRegWord(sc, 0xF922, 0xE000);
1326         MP_WriteMcuAccessRegWord(sc, 0xF924, 0x0481);
1327         MP_WriteMcuAccessRegWord(sc, 0xF926, 0x0C81);
1328         MP_WriteMcuAccessRegWord(sc, 0xF928, 0xDE20);
1329         MP_WriteMcuAccessRegWord(sc, 0xF92A, 0x0000);
1330         MP_WriteMcuAccessRegWord(sc, 0xF92C, 0x0992);
1331         MP_WriteMcuAccessRegWord(sc, 0xF92E, 0x1B76);
1332         MP_WriteMcuAccessRegWord(sc, 0xF930, 0xC602);
1333         MP_WriteMcuAccessRegWord(sc, 0xF932, 0xBE00);
1334         MP_WriteMcuAccessRegWord(sc, 0xF934, 0x059C);
1335         MP_WriteMcuAccessRegWord(sc, 0xF936, 0x1B76);
1336         MP_WriteMcuAccessRegWord(sc, 0xF938, 0xC602);
1337         MP_WriteMcuAccessRegWord(sc, 0xF93A, 0xBE00);
1338         MP_WriteMcuAccessRegWord(sc, 0xF93C, 0x065A);
1339         MP_WriteMcuAccessRegWord(sc, 0xF93E, 0xB400);
1340         MP_WriteMcuAccessRegWord(sc, 0xF940, 0x18DE);
1341         MP_WriteMcuAccessRegWord(sc, 0xF942, 0x2008);
1342         MP_WriteMcuAccessRegWord(sc, 0xF944, 0x4001);
1343         MP_WriteMcuAccessRegWord(sc, 0xF946, 0xF10F);
1344         MP_WriteMcuAccessRegWord(sc, 0xF948, 0x7342);
1345         MP_WriteMcuAccessRegWord(sc, 0xF94A, 0x1880);
1346         MP_WriteMcuAccessRegWord(sc, 0xF94C, 0x2008);
1347         MP_WriteMcuAccessRegWord(sc, 0xF94E, 0x0009);
1348         MP_WriteMcuAccessRegWord(sc, 0xF950, 0x4018);
1349         MP_WriteMcuAccessRegWord(sc, 0xF952, 0xF109);
1350         MP_WriteMcuAccessRegWord(sc, 0xF954, 0x7340);
1351         MP_WriteMcuAccessRegWord(sc, 0xF956, 0x25BC);
1352         MP_WriteMcuAccessRegWord(sc, 0xF958, 0x130F);
1353         MP_WriteMcuAccessRegWord(sc, 0xF95A, 0xF105);
1354         MP_WriteMcuAccessRegWord(sc, 0xF95C, 0xC00A);
1355         MP_WriteMcuAccessRegWord(sc, 0xF95E, 0x7300);
1356         MP_WriteMcuAccessRegWord(sc, 0xF960, 0x4831);
1357         MP_WriteMcuAccessRegWord(sc, 0xF962, 0x9B00);
1358         MP_WriteMcuAccessRegWord(sc, 0xF964, 0xB000);
1359         MP_WriteMcuAccessRegWord(sc, 0xF966, 0x7340);
1360         MP_WriteMcuAccessRegWord(sc, 0xF968, 0x8320);
1361         MP_WriteMcuAccessRegWord(sc, 0xF96A, 0xC302);
1362         MP_WriteMcuAccessRegWord(sc, 0xF96C, 0xBB00);
1363         MP_WriteMcuAccessRegWord(sc, 0xF96E, 0x0C12);
1364         MP_WriteMcuAccessRegWord(sc, 0xF970, 0xE860);
1365         MP_WriteMcuAccessRegWord(sc, 0xF972, 0xC406);
1366         MP_WriteMcuAccessRegWord(sc, 0xF974, 0x7580);
1367         MP_WriteMcuAccessRegWord(sc, 0xF976, 0x4851);
1368         MP_WriteMcuAccessRegWord(sc, 0xF978, 0x8D80);
1369         MP_WriteMcuAccessRegWord(sc, 0xF97A, 0xC403);
1370         MP_WriteMcuAccessRegWord(sc, 0xF97C, 0xBC00);
1371         MP_WriteMcuAccessRegWord(sc, 0xF97E, 0xD3E0);
1372         MP_WriteMcuAccessRegWord(sc, 0xF980, 0x02C8);
1373         MP_WriteMcuAccessRegWord(sc, 0xF982, 0xC406);
1374         MP_WriteMcuAccessRegWord(sc, 0xF984, 0x7580);
1375         MP_WriteMcuAccessRegWord(sc, 0xF986, 0x4850);
1376         MP_WriteMcuAccessRegWord(sc, 0xF988, 0x8D80);
1377         MP_WriteMcuAccessRegWord(sc, 0xF98A, 0xC403);
1378         MP_WriteMcuAccessRegWord(sc, 0xF98C, 0xBC00);
1379         MP_WriteMcuAccessRegWord(sc, 0xF98E, 0xD3E0);
1380         MP_WriteMcuAccessRegWord(sc, 0xF990, 0x0298);
1381 
1382         MP_WriteMcuAccessRegWord(sc, 0xDE30, 0x0080);
1383 
1384         MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
1385 
1386         MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x0075);
1387         MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x02B1);
1388         MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x0991);
1389         MP_WriteMcuAccessRegWord(sc, 0xFC2E, 0x059B);
1390         MP_WriteMcuAccessRegWord(sc, 0xFC30, 0x0659);
1391         MP_WriteMcuAccessRegWord(sc, 0xFC32, 0x0000);
1392         MP_WriteMcuAccessRegWord(sc, 0xFC34, 0x02BB);
1393         MP_WriteMcuAccessRegWord(sc, 0xFC36, 0x0279);
1394 }
1395 
1396 static void re_set_mac_mcu_8168gu_1(struct re_softc *sc)
1397 {
1398         DisableMcuBPs(sc);
1399 
1400         MP_WriteMcuAccessRegWord(sc, 0xF800, 0xE008);
1401         MP_WriteMcuAccessRegWord(sc, 0xF802, 0xE011);
1402         MP_WriteMcuAccessRegWord(sc, 0xF804, 0xE015);
1403         MP_WriteMcuAccessRegWord(sc, 0xF806, 0xE018);
1404         MP_WriteMcuAccessRegWord(sc, 0xF808, 0xE01B);
1405         MP_WriteMcuAccessRegWord(sc, 0xF80A, 0xE027);
1406         MP_WriteMcuAccessRegWord(sc, 0xF80C, 0xE043);
1407         MP_WriteMcuAccessRegWord(sc, 0xF80E, 0xE065);
1408         MP_WriteMcuAccessRegWord(sc, 0xF810, 0x49E2);
1409         MP_WriteMcuAccessRegWord(sc, 0xF812, 0xF005);
1410         MP_WriteMcuAccessRegWord(sc, 0xF814, 0x49EA);
1411         MP_WriteMcuAccessRegWord(sc, 0xF816, 0xF003);
1412         MP_WriteMcuAccessRegWord(sc, 0xF818, 0xC404);
1413         MP_WriteMcuAccessRegWord(sc, 0xF81A, 0xBC00);
1414         MP_WriteMcuAccessRegWord(sc, 0xF81C, 0xC403);
1415         MP_WriteMcuAccessRegWord(sc, 0xF81E, 0xBC00);
1416         MP_WriteMcuAccessRegWord(sc, 0xF820, 0x0496);
1417         MP_WriteMcuAccessRegWord(sc, 0xF822, 0x051A);
1418         MP_WriteMcuAccessRegWord(sc, 0xF824, 0x1D01);
1419         MP_WriteMcuAccessRegWord(sc, 0xF826, 0x8DE8);
1420         MP_WriteMcuAccessRegWord(sc, 0xF828, 0xC602);
1421         MP_WriteMcuAccessRegWord(sc, 0xF82A, 0xBE00);
1422         MP_WriteMcuAccessRegWord(sc, 0xF82C, 0x0206);
1423         MP_WriteMcuAccessRegWord(sc, 0xF82E, 0x1B76);
1424         MP_WriteMcuAccessRegWord(sc, 0xF830, 0xC202);
1425         MP_WriteMcuAccessRegWord(sc, 0xF832, 0xBA00);
1426         MP_WriteMcuAccessRegWord(sc, 0xF834, 0x058A);
1427         MP_WriteMcuAccessRegWord(sc, 0xF836, 0x1B76);
1428         MP_WriteMcuAccessRegWord(sc, 0xF838, 0xC602);
1429         MP_WriteMcuAccessRegWord(sc, 0xF83A, 0xBE00);
1430         MP_WriteMcuAccessRegWord(sc, 0xF83C, 0x0648);
1431         MP_WriteMcuAccessRegWord(sc, 0xF83E, 0x74E6);
1432         MP_WriteMcuAccessRegWord(sc, 0xF840, 0x1B78);
1433         MP_WriteMcuAccessRegWord(sc, 0xF842, 0x46DC);
1434         MP_WriteMcuAccessRegWord(sc, 0xF844, 0x1300);
1435         MP_WriteMcuAccessRegWord(sc, 0xF846, 0xF005);
1436         MP_WriteMcuAccessRegWord(sc, 0xF848, 0x74F8);
1437         MP_WriteMcuAccessRegWord(sc, 0xF84A, 0x48C3);
1438         MP_WriteMcuAccessRegWord(sc, 0xF84C, 0x48C4);
1439         MP_WriteMcuAccessRegWord(sc, 0xF84E, 0x8CF8);
1440         MP_WriteMcuAccessRegWord(sc, 0xF850, 0x64E7);
1441         MP_WriteMcuAccessRegWord(sc, 0xF852, 0xC302);
1442         MP_WriteMcuAccessRegWord(sc, 0xF854, 0xBB00);
1443         MP_WriteMcuAccessRegWord(sc, 0xF856, 0x068E);
1444         MP_WriteMcuAccessRegWord(sc, 0xF858, 0x74E4);
1445         MP_WriteMcuAccessRegWord(sc, 0xF85A, 0x49C5);
1446         MP_WriteMcuAccessRegWord(sc, 0xF85C, 0xF106);
1447         MP_WriteMcuAccessRegWord(sc, 0xF85E, 0x49C6);
1448         MP_WriteMcuAccessRegWord(sc, 0xF860, 0xF107);
1449         MP_WriteMcuAccessRegWord(sc, 0xF862, 0x48C8);
1450         MP_WriteMcuAccessRegWord(sc, 0xF864, 0x48C9);
1451         MP_WriteMcuAccessRegWord(sc, 0xF866, 0xE011);
1452         MP_WriteMcuAccessRegWord(sc, 0xF868, 0x48C9);
1453         MP_WriteMcuAccessRegWord(sc, 0xF86A, 0x4848);
1454         MP_WriteMcuAccessRegWord(sc, 0xF86C, 0xE00E);
1455         MP_WriteMcuAccessRegWord(sc, 0xF86E, 0x4848);
1456         MP_WriteMcuAccessRegWord(sc, 0xF870, 0x49C7);
1457         MP_WriteMcuAccessRegWord(sc, 0xF872, 0xF00A);
1458         MP_WriteMcuAccessRegWord(sc, 0xF874, 0x48C9);
1459         MP_WriteMcuAccessRegWord(sc, 0xF876, 0xC60D);
1460         MP_WriteMcuAccessRegWord(sc, 0xF878, 0x1D1F);
1461         MP_WriteMcuAccessRegWord(sc, 0xF87A, 0x8DC2);
1462         MP_WriteMcuAccessRegWord(sc, 0xF87C, 0x1D00);
1463         MP_WriteMcuAccessRegWord(sc, 0xF87E, 0x8DC3);
1464         MP_WriteMcuAccessRegWord(sc, 0xF880, 0x1D11);
1465         MP_WriteMcuAccessRegWord(sc, 0xF882, 0x8DC0);
1466         MP_WriteMcuAccessRegWord(sc, 0xF884, 0xE002);
1467         MP_WriteMcuAccessRegWord(sc, 0xF886, 0x4849);
1468         MP_WriteMcuAccessRegWord(sc, 0xF888, 0x94E5);
1469         MP_WriteMcuAccessRegWord(sc, 0xF88A, 0xC602);
1470         MP_WriteMcuAccessRegWord(sc, 0xF88C, 0xBE00);
1471         MP_WriteMcuAccessRegWord(sc, 0xF88E, 0x0238);
1472         MP_WriteMcuAccessRegWord(sc, 0xF890, 0xE434);
1473         MP_WriteMcuAccessRegWord(sc, 0xF892, 0x49D9);
1474         MP_WriteMcuAccessRegWord(sc, 0xF894, 0xF01B);
1475         MP_WriteMcuAccessRegWord(sc, 0xF896, 0xC31E);
1476         MP_WriteMcuAccessRegWord(sc, 0xF898, 0x7464);
1477         MP_WriteMcuAccessRegWord(sc, 0xF89A, 0x49C4);
1478         MP_WriteMcuAccessRegWord(sc, 0xF89C, 0xF114);
1479         MP_WriteMcuAccessRegWord(sc, 0xF89E, 0xC31B);
1480         MP_WriteMcuAccessRegWord(sc, 0xF8A0, 0x6460);
1481         MP_WriteMcuAccessRegWord(sc, 0xF8A2, 0x14FA);
1482         MP_WriteMcuAccessRegWord(sc, 0xF8A4, 0xFA02);
1483         MP_WriteMcuAccessRegWord(sc, 0xF8A6, 0xE00F);
1484         MP_WriteMcuAccessRegWord(sc, 0xF8A8, 0xC317);
1485         MP_WriteMcuAccessRegWord(sc, 0xF8AA, 0x7460);
1486         MP_WriteMcuAccessRegWord(sc, 0xF8AC, 0x49C0);
1487         MP_WriteMcuAccessRegWord(sc, 0xF8AE, 0xF10B);
1488         MP_WriteMcuAccessRegWord(sc, 0xF8B0, 0xC311);
1489         MP_WriteMcuAccessRegWord(sc, 0xF8B2, 0x7462);
1490         MP_WriteMcuAccessRegWord(sc, 0xF8B4, 0x48C1);
1491         MP_WriteMcuAccessRegWord(sc, 0xF8B6, 0x9C62);
1492         MP_WriteMcuAccessRegWord(sc, 0xF8B8, 0x4841);
1493         MP_WriteMcuAccessRegWord(sc, 0xF8BA, 0x9C62);
1494         MP_WriteMcuAccessRegWord(sc, 0xF8BC, 0xC30A);
1495         MP_WriteMcuAccessRegWord(sc, 0xF8BE, 0x1C04);
1496         MP_WriteMcuAccessRegWord(sc, 0xF8C0, 0x8C60);
1497         MP_WriteMcuAccessRegWord(sc, 0xF8C2, 0xE004);
1498         MP_WriteMcuAccessRegWord(sc, 0xF8C4, 0x1C15);
1499         MP_WriteMcuAccessRegWord(sc, 0xF8C6, 0xC305);
1500         MP_WriteMcuAccessRegWord(sc, 0xF8C8, 0x8C60);
1501         MP_WriteMcuAccessRegWord(sc, 0xF8CA, 0xC602);
1502         MP_WriteMcuAccessRegWord(sc, 0xF8CC, 0xBE00);
1503         MP_WriteMcuAccessRegWord(sc, 0xF8CE, 0x0374);
1504         MP_WriteMcuAccessRegWord(sc, 0xF8D0, 0xE434);
1505         MP_WriteMcuAccessRegWord(sc, 0xF8D2, 0xE030);
1506         MP_WriteMcuAccessRegWord(sc, 0xF8D4, 0xE61C);
1507         MP_WriteMcuAccessRegWord(sc, 0xF8D6, 0xE906);
1508         MP_WriteMcuAccessRegWord(sc, 0xF8D8, 0xC602);
1509         MP_WriteMcuAccessRegWord(sc, 0xF8DA, 0xBE00);
1510         MP_WriteMcuAccessRegWord(sc, 0xF8DC, 0x0000);
1511 
1512         MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
1513 
1514         MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x0493);
1515         MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x0205);
1516         MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x0589);
1517         MP_WriteMcuAccessRegWord(sc, 0xFC2E, 0x0647);
1518         MP_WriteMcuAccessRegWord(sc, 0xFC30, 0x0000);
1519         MP_WriteMcuAccessRegWord(sc, 0xFC32, 0x0215);
1520         MP_WriteMcuAccessRegWord(sc, 0xFC34, 0x0285);
1521 }
1522 
1523 static void re_set_mac_mcu_8168gu_2(struct re_softc *sc)
1524 {
1525         DisableMcuBPs(sc);
1526 
1527         MP_WriteMcuAccessRegWord(sc, 0xF800, 0xE008);
1528         MP_WriteMcuAccessRegWord(sc, 0xF802, 0xE00A);
1529         MP_WriteMcuAccessRegWord(sc, 0xF804, 0xE00D);
1530         MP_WriteMcuAccessRegWord(sc, 0xF806, 0xE02F);
1531         MP_WriteMcuAccessRegWord(sc, 0xF808, 0xE031);
1532         MP_WriteMcuAccessRegWord(sc, 0xF80A, 0xE038);
1533         MP_WriteMcuAccessRegWord(sc, 0xF80C, 0xE03A);
1534         MP_WriteMcuAccessRegWord(sc, 0xF80E, 0xE051);
1535         MP_WriteMcuAccessRegWord(sc, 0xF810, 0xC202);
1536         MP_WriteMcuAccessRegWord(sc, 0xF812, 0xBA00);
1537         MP_WriteMcuAccessRegWord(sc, 0xF814, 0x0DFC);
1538         MP_WriteMcuAccessRegWord(sc, 0xF816, 0x7444);
1539         MP_WriteMcuAccessRegWord(sc, 0xF818, 0xC502);
1540         MP_WriteMcuAccessRegWord(sc, 0xF81A, 0xBD00);
1541         MP_WriteMcuAccessRegWord(sc, 0xF81C, 0x0A30);
1542         MP_WriteMcuAccessRegWord(sc, 0xF81E, 0x49D9);
1543         MP_WriteMcuAccessRegWord(sc, 0xF820, 0xF019);
1544         MP_WriteMcuAccessRegWord(sc, 0xF822, 0xC520);
1545         MP_WriteMcuAccessRegWord(sc, 0xF824, 0x64A5);
1546         MP_WriteMcuAccessRegWord(sc, 0xF826, 0x1400);
1547         MP_WriteMcuAccessRegWord(sc, 0xF828, 0xF007);
1548         MP_WriteMcuAccessRegWord(sc, 0xF82A, 0x0C01);
1549         MP_WriteMcuAccessRegWord(sc, 0xF82C, 0x8CA5);
1550         MP_WriteMcuAccessRegWord(sc, 0xF82E, 0x1C15);
1551         MP_WriteMcuAccessRegWord(sc, 0xF830, 0xC515);
1552         MP_WriteMcuAccessRegWord(sc, 0xF832, 0x9CA0);
1553         MP_WriteMcuAccessRegWord(sc, 0xF834, 0xE00F);
1554         MP_WriteMcuAccessRegWord(sc, 0xF836, 0xC513);
1555         MP_WriteMcuAccessRegWord(sc, 0xF838, 0x74A0);
1556         MP_WriteMcuAccessRegWord(sc, 0xF83A, 0x48C8);
1557         MP_WriteMcuAccessRegWord(sc, 0xF83C, 0x48CA);
1558         MP_WriteMcuAccessRegWord(sc, 0xF83E, 0x9CA0);
1559         MP_WriteMcuAccessRegWord(sc, 0xF840, 0xC510);
1560         MP_WriteMcuAccessRegWord(sc, 0xF842, 0x1B00);
1561         MP_WriteMcuAccessRegWord(sc, 0xF844, 0x9BA0);
1562         MP_WriteMcuAccessRegWord(sc, 0xF846, 0x1B1C);
1563         MP_WriteMcuAccessRegWord(sc, 0xF848, 0x483F);
1564         MP_WriteMcuAccessRegWord(sc, 0xF84A, 0x9BA2);
1565         MP_WriteMcuAccessRegWord(sc, 0xF84C, 0x1B04);
1566         MP_WriteMcuAccessRegWord(sc, 0xF84E, 0xC506);
1567         MP_WriteMcuAccessRegWord(sc, 0xF850, 0x9BA0);
1568         MP_WriteMcuAccessRegWord(sc, 0xF852, 0xC603);
1569         MP_WriteMcuAccessRegWord(sc, 0xF854, 0xBE00);
1570         MP_WriteMcuAccessRegWord(sc, 0xF856, 0x0298);
1571         MP_WriteMcuAccessRegWord(sc, 0xF858, 0x03DE);
1572         MP_WriteMcuAccessRegWord(sc, 0xF85A, 0xE434);
1573         MP_WriteMcuAccessRegWord(sc, 0xF85C, 0xE096);
1574         MP_WriteMcuAccessRegWord(sc, 0xF85E, 0xE860);
1575         MP_WriteMcuAccessRegWord(sc, 0xF860, 0xDE20);
1576         MP_WriteMcuAccessRegWord(sc, 0xF862, 0xD3C0);
1577         MP_WriteMcuAccessRegWord(sc, 0xF864, 0xC602);
1578         MP_WriteMcuAccessRegWord(sc, 0xF866, 0xBE00);
1579         MP_WriteMcuAccessRegWord(sc, 0xF868, 0x0A64);
1580         MP_WriteMcuAccessRegWord(sc, 0xF86A, 0xC707);
1581         MP_WriteMcuAccessRegWord(sc, 0xF86C, 0x1D00);
1582         MP_WriteMcuAccessRegWord(sc, 0xF86E, 0x8DE2);
1583         MP_WriteMcuAccessRegWord(sc, 0xF870, 0x48C1);
1584         MP_WriteMcuAccessRegWord(sc, 0xF872, 0xC502);
1585         MP_WriteMcuAccessRegWord(sc, 0xF874, 0xBD00);
1586         MP_WriteMcuAccessRegWord(sc, 0xF876, 0x00AA);
1587         MP_WriteMcuAccessRegWord(sc, 0xF878, 0xE0C0);
1588         MP_WriteMcuAccessRegWord(sc, 0xF87A, 0xC502);
1589         MP_WriteMcuAccessRegWord(sc, 0xF87C, 0xBD00);
1590         MP_WriteMcuAccessRegWord(sc, 0xF87E, 0x0132);
1591         MP_WriteMcuAccessRegWord(sc, 0xF880, 0xC50C);
1592         MP_WriteMcuAccessRegWord(sc, 0xF882, 0x74A2);
1593         MP_WriteMcuAccessRegWord(sc, 0xF884, 0x49CE);
1594         MP_WriteMcuAccessRegWord(sc, 0xF886, 0xF1FE);
1595         MP_WriteMcuAccessRegWord(sc, 0xF888, 0x1C00);
1596         MP_WriteMcuAccessRegWord(sc, 0xF88A, 0x9EA0);
1597         MP_WriteMcuAccessRegWord(sc, 0xF88C, 0x1C1C);
1598         MP_WriteMcuAccessRegWord(sc, 0xF88E, 0x484F);
1599         MP_WriteMcuAccessRegWord(sc, 0xF890, 0x9CA2);
1600         MP_WriteMcuAccessRegWord(sc, 0xF892, 0xC402);
1601         MP_WriteMcuAccessRegWord(sc, 0xF894, 0xBC00);
1602         MP_WriteMcuAccessRegWord(sc, 0xF896, 0x0AFA);
1603         MP_WriteMcuAccessRegWord(sc, 0xF898, 0xDE20);
1604         MP_WriteMcuAccessRegWord(sc, 0xF89A, 0xE000);
1605         MP_WriteMcuAccessRegWord(sc, 0xF89C, 0xE092);
1606         MP_WriteMcuAccessRegWord(sc, 0xF89E, 0xE430);
1607         MP_WriteMcuAccessRegWord(sc, 0xF8A0, 0xDE20);
1608         MP_WriteMcuAccessRegWord(sc, 0xF8A2, 0xE0C0);
1609         MP_WriteMcuAccessRegWord(sc, 0xF8A4, 0xE860);
1610         MP_WriteMcuAccessRegWord(sc, 0xF8A6, 0xE84C);
1611         MP_WriteMcuAccessRegWord(sc, 0xF8A8, 0xB400);
1612         MP_WriteMcuAccessRegWord(sc, 0xF8AA, 0xB430);
1613         MP_WriteMcuAccessRegWord(sc, 0xF8AC, 0xE410);
1614         MP_WriteMcuAccessRegWord(sc, 0xF8AE, 0xC0AE);
1615         MP_WriteMcuAccessRegWord(sc, 0xF8B0, 0xB407);
1616         MP_WriteMcuAccessRegWord(sc, 0xF8B2, 0xB406);
1617         MP_WriteMcuAccessRegWord(sc, 0xF8B4, 0xB405);
1618         MP_WriteMcuAccessRegWord(sc, 0xF8B6, 0xB404);
1619         MP_WriteMcuAccessRegWord(sc, 0xF8B8, 0xB403);
1620         MP_WriteMcuAccessRegWord(sc, 0xF8BA, 0xB402);
1621         MP_WriteMcuAccessRegWord(sc, 0xF8BC, 0xB401);
1622         MP_WriteMcuAccessRegWord(sc, 0xF8BE, 0xC7EE);
1623         MP_WriteMcuAccessRegWord(sc, 0xF8C0, 0x76F4);
1624         MP_WriteMcuAccessRegWord(sc, 0xF8C2, 0xC2ED);
1625         MP_WriteMcuAccessRegWord(sc, 0xF8C4, 0xC3ED);
1626         MP_WriteMcuAccessRegWord(sc, 0xF8C6, 0xC1EF);
1627         MP_WriteMcuAccessRegWord(sc, 0xF8C8, 0xC5F3);
1628         MP_WriteMcuAccessRegWord(sc, 0xF8CA, 0x74A0);
1629         MP_WriteMcuAccessRegWord(sc, 0xF8CC, 0x49CD);
1630         MP_WriteMcuAccessRegWord(sc, 0xF8CE, 0xF001);
1631         MP_WriteMcuAccessRegWord(sc, 0xF8D0, 0xC5EE);
1632         MP_WriteMcuAccessRegWord(sc, 0xF8D2, 0x74A0);
1633         MP_WriteMcuAccessRegWord(sc, 0xF8D4, 0x49C1);
1634         MP_WriteMcuAccessRegWord(sc, 0xF8D6, 0xF105);
1635         MP_WriteMcuAccessRegWord(sc, 0xF8D8, 0xC5E4);
1636         MP_WriteMcuAccessRegWord(sc, 0xF8DA, 0x74A2);
1637         MP_WriteMcuAccessRegWord(sc, 0xF8DC, 0x49CE);
1638         MP_WriteMcuAccessRegWord(sc, 0xF8DE, 0xF00B);
1639         MP_WriteMcuAccessRegWord(sc, 0xF8E0, 0x7444);
1640         MP_WriteMcuAccessRegWord(sc, 0xF8E2, 0x484B);
1641         MP_WriteMcuAccessRegWord(sc, 0xF8E4, 0x9C44);
1642         MP_WriteMcuAccessRegWord(sc, 0xF8E6, 0x1C10);
1643         MP_WriteMcuAccessRegWord(sc, 0xF8E8, 0x9C62);
1644         MP_WriteMcuAccessRegWord(sc, 0xF8EA, 0x1C11);
1645         MP_WriteMcuAccessRegWord(sc, 0xF8EC, 0x8C60);
1646         MP_WriteMcuAccessRegWord(sc, 0xF8EE, 0x1C00);
1647         MP_WriteMcuAccessRegWord(sc, 0xF8F0, 0x9CF6);
1648         MP_WriteMcuAccessRegWord(sc, 0xF8F2, 0xE0EC);
1649         MP_WriteMcuAccessRegWord(sc, 0xF8F4, 0x49E7);
1650         MP_WriteMcuAccessRegWord(sc, 0xF8F6, 0xF016);
1651         MP_WriteMcuAccessRegWord(sc, 0xF8F8, 0x1D80);
1652         MP_WriteMcuAccessRegWord(sc, 0xF8FA, 0x8DF4);
1653         MP_WriteMcuAccessRegWord(sc, 0xF8FC, 0x74F8);
1654         MP_WriteMcuAccessRegWord(sc, 0xF8FE, 0x4843);
1655         MP_WriteMcuAccessRegWord(sc, 0xF900, 0x8CF8);
1656         MP_WriteMcuAccessRegWord(sc, 0xF902, 0x74F8);
1657         MP_WriteMcuAccessRegWord(sc, 0xF904, 0x74F8);
1658         MP_WriteMcuAccessRegWord(sc, 0xF906, 0x7444);
1659         MP_WriteMcuAccessRegWord(sc, 0xF908, 0x48C8);
1660         MP_WriteMcuAccessRegWord(sc, 0xF90A, 0x48C9);
1661         MP_WriteMcuAccessRegWord(sc, 0xF90C, 0x48CA);
1662         MP_WriteMcuAccessRegWord(sc, 0xF90E, 0x9C44);
1663         MP_WriteMcuAccessRegWord(sc, 0xF910, 0x74F8);
1664         MP_WriteMcuAccessRegWord(sc, 0xF912, 0x4844);
1665         MP_WriteMcuAccessRegWord(sc, 0xF914, 0x8CF8);
1666         MP_WriteMcuAccessRegWord(sc, 0xF916, 0x1E01);
1667         MP_WriteMcuAccessRegWord(sc, 0xF918, 0xE8DB);
1668         MP_WriteMcuAccessRegWord(sc, 0xF91A, 0x7420);
1669         MP_WriteMcuAccessRegWord(sc, 0xF91C, 0x48C1);
1670         MP_WriteMcuAccessRegWord(sc, 0xF91E, 0x9C20);
1671         MP_WriteMcuAccessRegWord(sc, 0xF920, 0xE0D5);
1672         MP_WriteMcuAccessRegWord(sc, 0xF922, 0x49E6);
1673         MP_WriteMcuAccessRegWord(sc, 0xF924, 0xF02A);
1674         MP_WriteMcuAccessRegWord(sc, 0xF926, 0x1D40);
1675         MP_WriteMcuAccessRegWord(sc, 0xF928, 0x8DF4);
1676         MP_WriteMcuAccessRegWord(sc, 0xF92A, 0x74FC);
1677         MP_WriteMcuAccessRegWord(sc, 0xF92C, 0x49C0);
1678         MP_WriteMcuAccessRegWord(sc, 0xF92E, 0xF124);
1679         MP_WriteMcuAccessRegWord(sc, 0xF930, 0x49C1);
1680         MP_WriteMcuAccessRegWord(sc, 0xF932, 0xF122);
1681         MP_WriteMcuAccessRegWord(sc, 0xF934, 0x74F8);
1682         MP_WriteMcuAccessRegWord(sc, 0xF936, 0x49C0);
1683         MP_WriteMcuAccessRegWord(sc, 0xF938, 0xF01F);
1684         MP_WriteMcuAccessRegWord(sc, 0xF93A, 0xE8D3);
1685         MP_WriteMcuAccessRegWord(sc, 0xF93C, 0x48C4);
1686         MP_WriteMcuAccessRegWord(sc, 0xF93E, 0x8CF8);
1687         MP_WriteMcuAccessRegWord(sc, 0xF940, 0x1E00);
1688         MP_WriteMcuAccessRegWord(sc, 0xF942, 0xE8C6);
1689         MP_WriteMcuAccessRegWord(sc, 0xF944, 0xC5B1);
1690         MP_WriteMcuAccessRegWord(sc, 0xF946, 0x74A0);
1691         MP_WriteMcuAccessRegWord(sc, 0xF948, 0x49C3);
1692         MP_WriteMcuAccessRegWord(sc, 0xF94A, 0xF016);
1693         MP_WriteMcuAccessRegWord(sc, 0xF94C, 0xC5AF);
1694         MP_WriteMcuAccessRegWord(sc, 0xF94E, 0x74A4);
1695         MP_WriteMcuAccessRegWord(sc, 0xF950, 0x49C2);
1696         MP_WriteMcuAccessRegWord(sc, 0xF952, 0xF005);
1697         MP_WriteMcuAccessRegWord(sc, 0xF954, 0xC5AA);
1698         MP_WriteMcuAccessRegWord(sc, 0xF956, 0x74B2);
1699         MP_WriteMcuAccessRegWord(sc, 0xF958, 0x49C9);
1700         MP_WriteMcuAccessRegWord(sc, 0xF95A, 0xF10E);
1701         MP_WriteMcuAccessRegWord(sc, 0xF95C, 0xC5A6);
1702         MP_WriteMcuAccessRegWord(sc, 0xF95E, 0x74A8);
1703         MP_WriteMcuAccessRegWord(sc, 0xF960, 0x4845);
1704         MP_WriteMcuAccessRegWord(sc, 0xF962, 0x4846);
1705         MP_WriteMcuAccessRegWord(sc, 0xF964, 0x4847);
1706         MP_WriteMcuAccessRegWord(sc, 0xF966, 0x4848);
1707         MP_WriteMcuAccessRegWord(sc, 0xF968, 0x9CA8);
1708         MP_WriteMcuAccessRegWord(sc, 0xF96A, 0x74B2);
1709         MP_WriteMcuAccessRegWord(sc, 0xF96C, 0x4849);
1710         MP_WriteMcuAccessRegWord(sc, 0xF96E, 0x9CB2);
1711         MP_WriteMcuAccessRegWord(sc, 0xF970, 0x74A0);
1712         MP_WriteMcuAccessRegWord(sc, 0xF972, 0x484F);
1713         MP_WriteMcuAccessRegWord(sc, 0xF974, 0x9CA0);
1714         MP_WriteMcuAccessRegWord(sc, 0xF976, 0xE0AA);
1715         MP_WriteMcuAccessRegWord(sc, 0xF978, 0x49E4);
1716         MP_WriteMcuAccessRegWord(sc, 0xF97A, 0xF018);
1717         MP_WriteMcuAccessRegWord(sc, 0xF97C, 0x1D10);
1718         MP_WriteMcuAccessRegWord(sc, 0xF97E, 0x8DF4);
1719         MP_WriteMcuAccessRegWord(sc, 0xF980, 0x74F8);
1720         MP_WriteMcuAccessRegWord(sc, 0xF982, 0x74F8);
1721         MP_WriteMcuAccessRegWord(sc, 0xF984, 0x74F8);
1722         MP_WriteMcuAccessRegWord(sc, 0xF986, 0x4843);
1723         MP_WriteMcuAccessRegWord(sc, 0xF988, 0x8CF8);
1724         MP_WriteMcuAccessRegWord(sc, 0xF98A, 0x74F8);
1725         MP_WriteMcuAccessRegWord(sc, 0xF98C, 0x74F8);
1726         MP_WriteMcuAccessRegWord(sc, 0xF98E, 0x74F8);
1727         MP_WriteMcuAccessRegWord(sc, 0xF990, 0x4844);
1728         MP_WriteMcuAccessRegWord(sc, 0xF992, 0x4842);
1729         MP_WriteMcuAccessRegWord(sc, 0xF994, 0x4841);
1730         MP_WriteMcuAccessRegWord(sc, 0xF996, 0x8CF8);
1731         MP_WriteMcuAccessRegWord(sc, 0xF998, 0x1E01);
1732         MP_WriteMcuAccessRegWord(sc, 0xF99A, 0xE89A);
1733         MP_WriteMcuAccessRegWord(sc, 0xF99C, 0x7420);
1734         MP_WriteMcuAccessRegWord(sc, 0xF99E, 0x4841);
1735         MP_WriteMcuAccessRegWord(sc, 0xF9A0, 0x9C20);
1736         MP_WriteMcuAccessRegWord(sc, 0xF9A2, 0x7444);
1737         MP_WriteMcuAccessRegWord(sc, 0xF9A4, 0x4848);
1738         MP_WriteMcuAccessRegWord(sc, 0xF9A6, 0x9C44);
1739         MP_WriteMcuAccessRegWord(sc, 0xF9A8, 0xE091);
1740         MP_WriteMcuAccessRegWord(sc, 0xF9AA, 0x49E5);
1741         MP_WriteMcuAccessRegWord(sc, 0xF9AC, 0xF03E);
1742         MP_WriteMcuAccessRegWord(sc, 0xF9AE, 0x1D20);
1743         MP_WriteMcuAccessRegWord(sc, 0xF9B0, 0x8DF4);
1744         MP_WriteMcuAccessRegWord(sc, 0xF9B2, 0x74F8);
1745         MP_WriteMcuAccessRegWord(sc, 0xF9B4, 0x48C2);
1746         MP_WriteMcuAccessRegWord(sc, 0xF9B6, 0x4841);
1747         MP_WriteMcuAccessRegWord(sc, 0xF9B8, 0x8CF8);
1748         MP_WriteMcuAccessRegWord(sc, 0xF9BA, 0x1E01);
1749         MP_WriteMcuAccessRegWord(sc, 0xF9BC, 0x7444);
1750         MP_WriteMcuAccessRegWord(sc, 0xF9BE, 0x49CA);
1751         MP_WriteMcuAccessRegWord(sc, 0xF9C0, 0xF103);
1752         MP_WriteMcuAccessRegWord(sc, 0xF9C2, 0x49C2);
1753         MP_WriteMcuAccessRegWord(sc, 0xF9C4, 0xF00C);
1754         MP_WriteMcuAccessRegWord(sc, 0xF9C6, 0x49C1);
1755         MP_WriteMcuAccessRegWord(sc, 0xF9C8, 0xF004);
1756         MP_WriteMcuAccessRegWord(sc, 0xF9CA, 0x6447);
1757         MP_WriteMcuAccessRegWord(sc, 0xF9CC, 0x2244);
1758         MP_WriteMcuAccessRegWord(sc, 0xF9CE, 0xE002);
1759         MP_WriteMcuAccessRegWord(sc, 0xF9D0, 0x1C01);
1760         MP_WriteMcuAccessRegWord(sc, 0xF9D2, 0x9C62);
1761         MP_WriteMcuAccessRegWord(sc, 0xF9D4, 0x1C11);
1762         MP_WriteMcuAccessRegWord(sc, 0xF9D6, 0x8C60);
1763         MP_WriteMcuAccessRegWord(sc, 0xF9D8, 0x1C00);
1764         MP_WriteMcuAccessRegWord(sc, 0xF9DA, 0x9CF6);
1765         MP_WriteMcuAccessRegWord(sc, 0xF9DC, 0x7444);
1766         MP_WriteMcuAccessRegWord(sc, 0xF9DE, 0x49C8);
1767         MP_WriteMcuAccessRegWord(sc, 0xF9E0, 0xF01D);
1768         MP_WriteMcuAccessRegWord(sc, 0xF9E2, 0x74FC);
1769         MP_WriteMcuAccessRegWord(sc, 0xF9E4, 0x49C0);
1770         MP_WriteMcuAccessRegWord(sc, 0xF9E6, 0xF11A);
1771         MP_WriteMcuAccessRegWord(sc, 0xF9E8, 0x49C1);
1772         MP_WriteMcuAccessRegWord(sc, 0xF9EA, 0xF118);
1773         MP_WriteMcuAccessRegWord(sc, 0xF9EC, 0x74F8);
1774         MP_WriteMcuAccessRegWord(sc, 0xF9EE, 0x49C0);
1775         MP_WriteMcuAccessRegWord(sc, 0xF9F0, 0xF015);
1776         MP_WriteMcuAccessRegWord(sc, 0xF9F2, 0x49C6);
1777         MP_WriteMcuAccessRegWord(sc, 0xF9F4, 0xF113);
1778         MP_WriteMcuAccessRegWord(sc, 0xF9F6, 0xE875);
1779         MP_WriteMcuAccessRegWord(sc, 0xF9F8, 0x48C4);
1780         MP_WriteMcuAccessRegWord(sc, 0xF9FA, 0x8CF8);
1781         MP_WriteMcuAccessRegWord(sc, 0xF9FC, 0x7420);
1782         MP_WriteMcuAccessRegWord(sc, 0xF9FE, 0x48C1);
1783         MP_WriteMcuAccessRegWord(sc, 0xFA00, 0x9C20);
1784         MP_WriteMcuAccessRegWord(sc, 0xFA02, 0xC50A);
1785         MP_WriteMcuAccessRegWord(sc, 0xFA04, 0x74A2);
1786         MP_WriteMcuAccessRegWord(sc, 0xFA06, 0x8CA5);
1787         MP_WriteMcuAccessRegWord(sc, 0xFA08, 0x74A0);
1788         MP_WriteMcuAccessRegWord(sc, 0xFA0A, 0xC505);
1789         MP_WriteMcuAccessRegWord(sc, 0xFA0C, 0x9CA2);
1790         MP_WriteMcuAccessRegWord(sc, 0xFA0E, 0x1C11);
1791         MP_WriteMcuAccessRegWord(sc, 0xFA10, 0x9CA0);
1792         MP_WriteMcuAccessRegWord(sc, 0xFA12, 0xE00A);
1793         MP_WriteMcuAccessRegWord(sc, 0xFA14, 0xE434);
1794         MP_WriteMcuAccessRegWord(sc, 0xFA16, 0xD3C0);
1795         MP_WriteMcuAccessRegWord(sc, 0xFA18, 0xDC00);
1796         MP_WriteMcuAccessRegWord(sc, 0xFA1A, 0x7444);
1797         MP_WriteMcuAccessRegWord(sc, 0xFA1C, 0x49CA);
1798         MP_WriteMcuAccessRegWord(sc, 0xFA1E, 0xF004);
1799         MP_WriteMcuAccessRegWord(sc, 0xFA20, 0x48CA);
1800         MP_WriteMcuAccessRegWord(sc, 0xFA22, 0x9C44);
1801         MP_WriteMcuAccessRegWord(sc, 0xFA24, 0xE855);
1802         MP_WriteMcuAccessRegWord(sc, 0xFA26, 0xE052);
1803         MP_WriteMcuAccessRegWord(sc, 0xFA28, 0x49E8);
1804         MP_WriteMcuAccessRegWord(sc, 0xFA2A, 0xF024);
1805         MP_WriteMcuAccessRegWord(sc, 0xFA2C, 0x1D01);
1806         MP_WriteMcuAccessRegWord(sc, 0xFA2E, 0x8DF5);
1807         MP_WriteMcuAccessRegWord(sc, 0xFA30, 0x7440);
1808         MP_WriteMcuAccessRegWord(sc, 0xFA32, 0x49C0);
1809         MP_WriteMcuAccessRegWord(sc, 0xFA34, 0xF11E);
1810         MP_WriteMcuAccessRegWord(sc, 0xFA36, 0x7444);
1811         MP_WriteMcuAccessRegWord(sc, 0xFA38, 0x49C8);
1812         MP_WriteMcuAccessRegWord(sc, 0xFA3A, 0xF01B);
1813         MP_WriteMcuAccessRegWord(sc, 0xFA3C, 0x49CA);
1814         MP_WriteMcuAccessRegWord(sc, 0xFA3E, 0xF119);
1815         MP_WriteMcuAccessRegWord(sc, 0xFA40, 0xC5EC);
1816         MP_WriteMcuAccessRegWord(sc, 0xFA42, 0x76A4);
1817         MP_WriteMcuAccessRegWord(sc, 0xFA44, 0x49E3);
1818         MP_WriteMcuAccessRegWord(sc, 0xFA46, 0xF015);
1819         MP_WriteMcuAccessRegWord(sc, 0xFA48, 0x49C0);
1820         MP_WriteMcuAccessRegWord(sc, 0xFA4A, 0xF103);
1821         MP_WriteMcuAccessRegWord(sc, 0xFA4C, 0x49C1);
1822         MP_WriteMcuAccessRegWord(sc, 0xFA4E, 0xF011);
1823         MP_WriteMcuAccessRegWord(sc, 0xFA50, 0x4849);
1824         MP_WriteMcuAccessRegWord(sc, 0xFA52, 0x9C44);
1825         MP_WriteMcuAccessRegWord(sc, 0xFA54, 0x1C00);
1826         MP_WriteMcuAccessRegWord(sc, 0xFA56, 0x9CF6);
1827         MP_WriteMcuAccessRegWord(sc, 0xFA58, 0x7444);
1828         MP_WriteMcuAccessRegWord(sc, 0xFA5A, 0x49C1);
1829         MP_WriteMcuAccessRegWord(sc, 0xFA5C, 0xF004);
1830         MP_WriteMcuAccessRegWord(sc, 0xFA5E, 0x6446);
1831         MP_WriteMcuAccessRegWord(sc, 0xFA60, 0x1E07);
1832         MP_WriteMcuAccessRegWord(sc, 0xFA62, 0xE003);
1833         MP_WriteMcuAccessRegWord(sc, 0xFA64, 0x1C01);
1834         MP_WriteMcuAccessRegWord(sc, 0xFA66, 0x1E03);
1835         MP_WriteMcuAccessRegWord(sc, 0xFA68, 0x9C62);
1836         MP_WriteMcuAccessRegWord(sc, 0xFA6A, 0x1C11);
1837         MP_WriteMcuAccessRegWord(sc, 0xFA6C, 0x8C60);
1838         MP_WriteMcuAccessRegWord(sc, 0xFA6E, 0xE830);
1839         MP_WriteMcuAccessRegWord(sc, 0xFA70, 0xE02D);
1840         MP_WriteMcuAccessRegWord(sc, 0xFA72, 0x49E9);
1841         MP_WriteMcuAccessRegWord(sc, 0xFA74, 0xF004);
1842         MP_WriteMcuAccessRegWord(sc, 0xFA76, 0x1D02);
1843         MP_WriteMcuAccessRegWord(sc, 0xFA78, 0x8DF5);
1844         MP_WriteMcuAccessRegWord(sc, 0xFA7A, 0xE79C);
1845         MP_WriteMcuAccessRegWord(sc, 0xFA7C, 0x49E3);
1846         MP_WriteMcuAccessRegWord(sc, 0xFA7E, 0xF006);
1847         MP_WriteMcuAccessRegWord(sc, 0xFA80, 0x1D08);
1848         MP_WriteMcuAccessRegWord(sc, 0xFA82, 0x8DF4);
1849         MP_WriteMcuAccessRegWord(sc, 0xFA84, 0x74F8);
1850         MP_WriteMcuAccessRegWord(sc, 0xFA86, 0x74F8);
1851         MP_WriteMcuAccessRegWord(sc, 0xFA88, 0xE73A);
1852         MP_WriteMcuAccessRegWord(sc, 0xFA8A, 0x49E1);
1853         MP_WriteMcuAccessRegWord(sc, 0xFA8C, 0xF007);
1854         MP_WriteMcuAccessRegWord(sc, 0xFA8E, 0x1D02);
1855         MP_WriteMcuAccessRegWord(sc, 0xFA90, 0x8DF4);
1856         MP_WriteMcuAccessRegWord(sc, 0xFA92, 0x1E01);
1857         MP_WriteMcuAccessRegWord(sc, 0xFA94, 0xE7A7);
1858         MP_WriteMcuAccessRegWord(sc, 0xFA96, 0xDE20);
1859         MP_WriteMcuAccessRegWord(sc, 0xFA98, 0xE410);
1860         MP_WriteMcuAccessRegWord(sc, 0xFA9A, 0x49E0);
1861         MP_WriteMcuAccessRegWord(sc, 0xFA9C, 0xF017);
1862         MP_WriteMcuAccessRegWord(sc, 0xFA9E, 0x1D01);
1863         MP_WriteMcuAccessRegWord(sc, 0xFAA0, 0x8DF4);
1864         MP_WriteMcuAccessRegWord(sc, 0xFAA2, 0xC5FA);
1865         MP_WriteMcuAccessRegWord(sc, 0xFAA4, 0x1C00);
1866         MP_WriteMcuAccessRegWord(sc, 0xFAA6, 0x8CA0);
1867         MP_WriteMcuAccessRegWord(sc, 0xFAA8, 0x1C1B);
1868         MP_WriteMcuAccessRegWord(sc, 0xFAAA, 0x9CA2);
1869         MP_WriteMcuAccessRegWord(sc, 0xFAAC, 0x74A2);
1870         MP_WriteMcuAccessRegWord(sc, 0xFAAE, 0x49CF);
1871         MP_WriteMcuAccessRegWord(sc, 0xFAB0, 0xF0FE);
1872         MP_WriteMcuAccessRegWord(sc, 0xFAB2, 0xC5F3);
1873         MP_WriteMcuAccessRegWord(sc, 0xFAB4, 0x74A0);
1874         MP_WriteMcuAccessRegWord(sc, 0xFAB6, 0x4849);
1875         MP_WriteMcuAccessRegWord(sc, 0xFAB8, 0x9CA0);
1876         MP_WriteMcuAccessRegWord(sc, 0xFABA, 0x74F8);
1877         MP_WriteMcuAccessRegWord(sc, 0xFABC, 0x49C0);
1878         MP_WriteMcuAccessRegWord(sc, 0xFABE, 0xF006);
1879         MP_WriteMcuAccessRegWord(sc, 0xFAC0, 0x48C3);
1880         MP_WriteMcuAccessRegWord(sc, 0xFAC2, 0x8CF8);
1881         MP_WriteMcuAccessRegWord(sc, 0xFAC4, 0xE820);
1882         MP_WriteMcuAccessRegWord(sc, 0xFAC6, 0x74F8);
1883         MP_WriteMcuAccessRegWord(sc, 0xFAC8, 0x74F8);
1884         MP_WriteMcuAccessRegWord(sc, 0xFACA, 0xC432);
1885         MP_WriteMcuAccessRegWord(sc, 0xFACC, 0xBC00);
1886         MP_WriteMcuAccessRegWord(sc, 0xFACE, 0xC5E4);
1887         MP_WriteMcuAccessRegWord(sc, 0xFAD0, 0x74A2);
1888         MP_WriteMcuAccessRegWord(sc, 0xFAD2, 0x49CE);
1889         MP_WriteMcuAccessRegWord(sc, 0xFAD4, 0xF1FE);
1890         MP_WriteMcuAccessRegWord(sc, 0xFAD6, 0x9EA0);
1891         MP_WriteMcuAccessRegWord(sc, 0xFAD8, 0x1C1C);
1892         MP_WriteMcuAccessRegWord(sc, 0xFADA, 0x484F);
1893         MP_WriteMcuAccessRegWord(sc, 0xFADC, 0x9CA2);
1894         MP_WriteMcuAccessRegWord(sc, 0xFADE, 0xFF80);
1895         MP_WriteMcuAccessRegWord(sc, 0xFAE0, 0xB404);
1896         MP_WriteMcuAccessRegWord(sc, 0xFAE2, 0xB405);
1897         MP_WriteMcuAccessRegWord(sc, 0xFAE4, 0xC5D9);
1898         MP_WriteMcuAccessRegWord(sc, 0xFAE6, 0x74A2);
1899         MP_WriteMcuAccessRegWord(sc, 0xFAE8, 0x49CE);
1900         MP_WriteMcuAccessRegWord(sc, 0xFAEA, 0xF1FE);
1901         MP_WriteMcuAccessRegWord(sc, 0xFAEC, 0xC41F);
1902         MP_WriteMcuAccessRegWord(sc, 0xFAEE, 0x9CA0);
1903         MP_WriteMcuAccessRegWord(sc, 0xFAF0, 0xC41C);
1904         MP_WriteMcuAccessRegWord(sc, 0xFAF2, 0x1C13);
1905         MP_WriteMcuAccessRegWord(sc, 0xFAF4, 0x484F);
1906         MP_WriteMcuAccessRegWord(sc, 0xFAF6, 0x9CA2);
1907         MP_WriteMcuAccessRegWord(sc, 0xFAF8, 0x74A2);
1908         MP_WriteMcuAccessRegWord(sc, 0xFAFA, 0x49CF);
1909         MP_WriteMcuAccessRegWord(sc, 0xFAFC, 0xF1FE);
1910         MP_WriteMcuAccessRegWord(sc, 0xFAFE, 0xB005);
1911         MP_WriteMcuAccessRegWord(sc, 0xFB00, 0xB004);
1912         MP_WriteMcuAccessRegWord(sc, 0xFB02, 0xFF80);
1913         MP_WriteMcuAccessRegWord(sc, 0xFB04, 0xB404);
1914         MP_WriteMcuAccessRegWord(sc, 0xFB06, 0xB405);
1915         MP_WriteMcuAccessRegWord(sc, 0xFB08, 0xC5C7);
1916         MP_WriteMcuAccessRegWord(sc, 0xFB0A, 0x74A2);
1917         MP_WriteMcuAccessRegWord(sc, 0xFB0C, 0x49CE);
1918         MP_WriteMcuAccessRegWord(sc, 0xFB0E, 0xF1FE);
1919         MP_WriteMcuAccessRegWord(sc, 0xFB10, 0xC40E);
1920         MP_WriteMcuAccessRegWord(sc, 0xFB12, 0x9CA0);
1921         MP_WriteMcuAccessRegWord(sc, 0xFB14, 0xC40A);
1922         MP_WriteMcuAccessRegWord(sc, 0xFB16, 0x1C13);
1923         MP_WriteMcuAccessRegWord(sc, 0xFB18, 0x484F);
1924         MP_WriteMcuAccessRegWord(sc, 0xFB1A, 0x9CA2);
1925         MP_WriteMcuAccessRegWord(sc, 0xFB1C, 0x74A2);
1926         MP_WriteMcuAccessRegWord(sc, 0xFB1E, 0x49CF);
1927         MP_WriteMcuAccessRegWord(sc, 0xFB20, 0xF1FE);
1928         MP_WriteMcuAccessRegWord(sc, 0xFB22, 0xB005);
1929         MP_WriteMcuAccessRegWord(sc, 0xFB24, 0xB004);
1930         MP_WriteMcuAccessRegWord(sc, 0xFB26, 0xFF80);
1931         MP_WriteMcuAccessRegWord(sc, 0xFB28, 0x0000);
1932         MP_WriteMcuAccessRegWord(sc, 0xFB2A, 0x0481);
1933         MP_WriteMcuAccessRegWord(sc, 0xFB2C, 0x0C81);
1934         MP_WriteMcuAccessRegWord(sc, 0xFB2E, 0x0AE0);
1935 
1936         MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
1937 
1938         MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x0000);
1939         MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x0000);
1940         MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x0297);
1941         MP_WriteMcuAccessRegWord(sc, 0xFC2E, 0x0000);
1942         MP_WriteMcuAccessRegWord(sc, 0xFC30, 0x00A9);
1943         MP_WriteMcuAccessRegWord(sc, 0xFC32, 0x012D);
1944         MP_WriteMcuAccessRegWord(sc, 0xFC34, 0x0000);
1945         MP_WriteMcuAccessRegWord(sc, 0xFC36, 0x08DF);
1946 }
1947 
1948 static void re_set_mac_mcu_8411b_1(struct re_softc *sc)
1949 {
1950         DisableMcuBPs(sc);
1951 
1952         MP_WriteMcuAccessRegWord(sc, 0xF800, 0xE008);
1953         MP_WriteMcuAccessRegWord(sc, 0xF802, 0xE00A);
1954         MP_WriteMcuAccessRegWord(sc, 0xF804, 0xE00C);
1955         MP_WriteMcuAccessRegWord(sc, 0xF806, 0xE00E);
1956         MP_WriteMcuAccessRegWord(sc, 0xF808, 0xE027);
1957         MP_WriteMcuAccessRegWord(sc, 0xF80A, 0xE04F);
1958         MP_WriteMcuAccessRegWord(sc, 0xF80C, 0xE05E);
1959         MP_WriteMcuAccessRegWord(sc, 0xF80E, 0xE065);
1960         MP_WriteMcuAccessRegWord(sc, 0xF810, 0xC602);
1961         MP_WriteMcuAccessRegWord(sc, 0xF812, 0xBE00);
1962         MP_WriteMcuAccessRegWord(sc, 0xF814, 0x0000);
1963         MP_WriteMcuAccessRegWord(sc, 0xF816, 0xC502);
1964         MP_WriteMcuAccessRegWord(sc, 0xF818, 0xBD00);
1965         MP_WriteMcuAccessRegWord(sc, 0xF81A, 0x074C);
1966         MP_WriteMcuAccessRegWord(sc, 0xF81C, 0xC302);
1967         MP_WriteMcuAccessRegWord(sc, 0xF81E, 0xBB00);
1968         MP_WriteMcuAccessRegWord(sc, 0xF820, 0x080A);
1969         MP_WriteMcuAccessRegWord(sc, 0xF822, 0x6420);
1970         MP_WriteMcuAccessRegWord(sc, 0xF824, 0x48C2);
1971         MP_WriteMcuAccessRegWord(sc, 0xF826, 0x8C20);
1972         MP_WriteMcuAccessRegWord(sc, 0xF828, 0xC516);
1973         MP_WriteMcuAccessRegWord(sc, 0xF82A, 0x64A4);
1974         MP_WriteMcuAccessRegWord(sc, 0xF82C, 0x49C0);
1975         MP_WriteMcuAccessRegWord(sc, 0xF82E, 0xF009);
1976         MP_WriteMcuAccessRegWord(sc, 0xF830, 0x74A2);
1977         MP_WriteMcuAccessRegWord(sc, 0xF832, 0x8CA5);
1978         MP_WriteMcuAccessRegWord(sc, 0xF834, 0x74A0);
1979         MP_WriteMcuAccessRegWord(sc, 0xF836, 0xC50E);
1980         MP_WriteMcuAccessRegWord(sc, 0xF838, 0x9CA2);
1981         MP_WriteMcuAccessRegWord(sc, 0xF83A, 0x1C11);
1982         MP_WriteMcuAccessRegWord(sc, 0xF83C, 0x9CA0);
1983         MP_WriteMcuAccessRegWord(sc, 0xF83E, 0xE006);
1984         MP_WriteMcuAccessRegWord(sc, 0xF840, 0x74F8);
1985         MP_WriteMcuAccessRegWord(sc, 0xF842, 0x48C4);
1986         MP_WriteMcuAccessRegWord(sc, 0xF844, 0x8CF8);
1987         MP_WriteMcuAccessRegWord(sc, 0xF846, 0xC404);
1988         MP_WriteMcuAccessRegWord(sc, 0xF848, 0xBC00);
1989         MP_WriteMcuAccessRegWord(sc, 0xF84A, 0xC403);
1990         MP_WriteMcuAccessRegWord(sc, 0xF84C, 0xBC00);
1991         MP_WriteMcuAccessRegWord(sc, 0xF84E, 0x0BF2);
1992         MP_WriteMcuAccessRegWord(sc, 0xF850, 0x0C0A);
1993         MP_WriteMcuAccessRegWord(sc, 0xF852, 0xE434);
1994         MP_WriteMcuAccessRegWord(sc, 0xF854, 0xD3C0);
1995         MP_WriteMcuAccessRegWord(sc, 0xF856, 0x49D9);
1996         MP_WriteMcuAccessRegWord(sc, 0xF858, 0xF01F);
1997         MP_WriteMcuAccessRegWord(sc, 0xF85A, 0xC526);
1998         MP_WriteMcuAccessRegWord(sc, 0xF85C, 0x64A5);
1999         MP_WriteMcuAccessRegWord(sc, 0xF85E, 0x1400);
2000         MP_WriteMcuAccessRegWord(sc, 0xF860, 0xF007);
2001         MP_WriteMcuAccessRegWord(sc, 0xF862, 0x0C01);
2002         MP_WriteMcuAccessRegWord(sc, 0xF864, 0x8CA5);
2003         MP_WriteMcuAccessRegWord(sc, 0xF866, 0x1C15);
2004         MP_WriteMcuAccessRegWord(sc, 0xF868, 0xC51B);
2005         MP_WriteMcuAccessRegWord(sc, 0xF86A, 0x9CA0);
2006         MP_WriteMcuAccessRegWord(sc, 0xF86C, 0xE013);
2007         MP_WriteMcuAccessRegWord(sc, 0xF86E, 0xC519);
2008         MP_WriteMcuAccessRegWord(sc, 0xF870, 0x74A0);
2009         MP_WriteMcuAccessRegWord(sc, 0xF872, 0x48C4);
2010         MP_WriteMcuAccessRegWord(sc, 0xF874, 0x8CA0);
2011         MP_WriteMcuAccessRegWord(sc, 0xF876, 0xC516);
2012         MP_WriteMcuAccessRegWord(sc, 0xF878, 0x74A4);
2013         MP_WriteMcuAccessRegWord(sc, 0xF87A, 0x48C8);
2014         MP_WriteMcuAccessRegWord(sc, 0xF87C, 0x48CA);
2015         MP_WriteMcuAccessRegWord(sc, 0xF87E, 0x9CA4);
2016         MP_WriteMcuAccessRegWord(sc, 0xF880, 0xC512);
2017         MP_WriteMcuAccessRegWord(sc, 0xF882, 0x1B00);
2018         MP_WriteMcuAccessRegWord(sc, 0xF884, 0x9BA0);
2019         MP_WriteMcuAccessRegWord(sc, 0xF886, 0x1B1C);
2020         MP_WriteMcuAccessRegWord(sc, 0xF888, 0x483F);
2021         MP_WriteMcuAccessRegWord(sc, 0xF88A, 0x9BA2);
2022         MP_WriteMcuAccessRegWord(sc, 0xF88C, 0x1B04);
2023         MP_WriteMcuAccessRegWord(sc, 0xF88E, 0xC508);
2024         MP_WriteMcuAccessRegWord(sc, 0xF890, 0x9BA0);
2025         MP_WriteMcuAccessRegWord(sc, 0xF892, 0xC505);
2026         MP_WriteMcuAccessRegWord(sc, 0xF894, 0xBD00);
2027         MP_WriteMcuAccessRegWord(sc, 0xF896, 0xC502);
2028         MP_WriteMcuAccessRegWord(sc, 0xF898, 0xBD00);
2029         MP_WriteMcuAccessRegWord(sc, 0xF89A, 0x0300);
2030         MP_WriteMcuAccessRegWord(sc, 0xF89C, 0x051E);
2031         MP_WriteMcuAccessRegWord(sc, 0xF89E, 0xE434);
2032         MP_WriteMcuAccessRegWord(sc, 0xF8A0, 0xE018);
2033         MP_WriteMcuAccessRegWord(sc, 0xF8A2, 0xE092);
2034         MP_WriteMcuAccessRegWord(sc, 0xF8A4, 0xDE20);
2035         MP_WriteMcuAccessRegWord(sc, 0xF8A6, 0xD3C0);
2036         MP_WriteMcuAccessRegWord(sc, 0xF8A8, 0xC50F);
2037         MP_WriteMcuAccessRegWord(sc, 0xF8AA, 0x76A4);
2038         MP_WriteMcuAccessRegWord(sc, 0xF8AC, 0x49E3);
2039         MP_WriteMcuAccessRegWord(sc, 0xF8AE, 0xF007);
2040         MP_WriteMcuAccessRegWord(sc, 0xF8B0, 0x49C0);
2041         MP_WriteMcuAccessRegWord(sc, 0xF8B2, 0xF103);
2042         MP_WriteMcuAccessRegWord(sc, 0xF8B4, 0xC607);
2043         MP_WriteMcuAccessRegWord(sc, 0xF8B6, 0xBE00);
2044         MP_WriteMcuAccessRegWord(sc, 0xF8B8, 0xC606);
2045         MP_WriteMcuAccessRegWord(sc, 0xF8BA, 0xBE00);
2046         MP_WriteMcuAccessRegWord(sc, 0xF8BC, 0xC602);
2047         MP_WriteMcuAccessRegWord(sc, 0xF8BE, 0xBE00);
2048         MP_WriteMcuAccessRegWord(sc, 0xF8C0, 0x0C4C);
2049         MP_WriteMcuAccessRegWord(sc, 0xF8C2, 0x0C28);
2050         MP_WriteMcuAccessRegWord(sc, 0xF8C4, 0x0C2C);
2051         MP_WriteMcuAccessRegWord(sc, 0xF8C6, 0xDC00);
2052         MP_WriteMcuAccessRegWord(sc, 0xF8C8, 0xC707);
2053         MP_WriteMcuAccessRegWord(sc, 0xF8CA, 0x1D00);
2054         MP_WriteMcuAccessRegWord(sc, 0xF8CC, 0x8DE2);
2055         MP_WriteMcuAccessRegWord(sc, 0xF8CE, 0x48C1);
2056         MP_WriteMcuAccessRegWord(sc, 0xF8D0, 0xC502);
2057         MP_WriteMcuAccessRegWord(sc, 0xF8D2, 0xBD00);
2058         MP_WriteMcuAccessRegWord(sc, 0xF8D4, 0x00AA);
2059         MP_WriteMcuAccessRegWord(sc, 0xF8D6, 0xE0C0);
2060         MP_WriteMcuAccessRegWord(sc, 0xF8D8, 0xC502);
2061         MP_WriteMcuAccessRegWord(sc, 0xF8DA, 0xBD00);
2062         MP_WriteMcuAccessRegWord(sc, 0xF8DC, 0x0132);
2063 
2064         MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
2065 
2066         MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x0743);
2067         MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x0801);
2068         MP_WriteMcuAccessRegWord(sc, 0xFC2E, 0x0BE9);
2069         MP_WriteMcuAccessRegWord(sc, 0xFC30, 0x02FD);
2070         MP_WriteMcuAccessRegWord(sc, 0xFC32, 0x0C25);
2071         MP_WriteMcuAccessRegWord(sc, 0xFC34, 0x00A9);
2072         MP_WriteMcuAccessRegWord(sc, 0xFC36, 0x012D);
2073 }
2074 
2075 static void re_set_mac_mcu_8168ep_1(struct re_softc *sc)
2076 {
2077         DisableMcuBPs(sc);
2078 
2079         MP_WriteMcuAccessRegWord(sc, 0xF800, 0xE008);
2080         MP_WriteMcuAccessRegWord(sc, 0xF802, 0xE0D3);
2081         MP_WriteMcuAccessRegWord(sc, 0xF804, 0xE0D6);
2082         MP_WriteMcuAccessRegWord(sc, 0xF806, 0xE0D9);
2083         MP_WriteMcuAccessRegWord(sc, 0xF808, 0xE0DB);
2084         MP_WriteMcuAccessRegWord(sc, 0xF80A, 0xE0DD);
2085         MP_WriteMcuAccessRegWord(sc, 0xF80C, 0xE0DF);
2086         MP_WriteMcuAccessRegWord(sc, 0xF80E, 0xE0E1);
2087         MP_WriteMcuAccessRegWord(sc, 0xF810, 0xC251);
2088         MP_WriteMcuAccessRegWord(sc, 0xF812, 0x7340);
2089         MP_WriteMcuAccessRegWord(sc, 0xF814, 0x49B1);
2090         MP_WriteMcuAccessRegWord(sc, 0xF816, 0xF010);
2091         MP_WriteMcuAccessRegWord(sc, 0xF818, 0x1D02);
2092         MP_WriteMcuAccessRegWord(sc, 0xF81A, 0x8D40);
2093         MP_WriteMcuAccessRegWord(sc, 0xF81C, 0xC202);
2094         MP_WriteMcuAccessRegWord(sc, 0xF81E, 0xBA00);
2095         MP_WriteMcuAccessRegWord(sc, 0xF820, 0x2C3A);
2096         MP_WriteMcuAccessRegWord(sc, 0xF822, 0xC0F0);
2097         MP_WriteMcuAccessRegWord(sc, 0xF824, 0xE8DE);
2098         MP_WriteMcuAccessRegWord(sc, 0xF826, 0x2000);
2099         MP_WriteMcuAccessRegWord(sc, 0xF828, 0x8000);
2100         MP_WriteMcuAccessRegWord(sc, 0xF82A, 0xC0B6);
2101         MP_WriteMcuAccessRegWord(sc, 0xF82C, 0x268C);
2102         MP_WriteMcuAccessRegWord(sc, 0xF82E, 0x752C);
2103         MP_WriteMcuAccessRegWord(sc, 0xF830, 0x49D4);
2104         MP_WriteMcuAccessRegWord(sc, 0xF832, 0xF112);
2105         MP_WriteMcuAccessRegWord(sc, 0xF834, 0xE025);
2106         MP_WriteMcuAccessRegWord(sc, 0xF836, 0xC2F6);
2107         MP_WriteMcuAccessRegWord(sc, 0xF838, 0x7146);
2108         MP_WriteMcuAccessRegWord(sc, 0xF83A, 0xC2F5);
2109         MP_WriteMcuAccessRegWord(sc, 0xF83C, 0x7340);
2110         MP_WriteMcuAccessRegWord(sc, 0xF83E, 0x49BE);
2111         MP_WriteMcuAccessRegWord(sc, 0xF840, 0xF103);
2112         MP_WriteMcuAccessRegWord(sc, 0xF842, 0xC7F2);
2113         MP_WriteMcuAccessRegWord(sc, 0xF844, 0xE002);
2114         MP_WriteMcuAccessRegWord(sc, 0xF846, 0xC7F1);
2115         MP_WriteMcuAccessRegWord(sc, 0xF848, 0x304F);
2116         MP_WriteMcuAccessRegWord(sc, 0xF84A, 0x6226);
2117         MP_WriteMcuAccessRegWord(sc, 0xF84C, 0x49A1);
2118         MP_WriteMcuAccessRegWord(sc, 0xF84E, 0xF1F0);
2119         MP_WriteMcuAccessRegWord(sc, 0xF850, 0x7222);
2120         MP_WriteMcuAccessRegWord(sc, 0xF852, 0x49A0);
2121         MP_WriteMcuAccessRegWord(sc, 0xF854, 0xF1ED);
2122         MP_WriteMcuAccessRegWord(sc, 0xF856, 0x2525);
2123         MP_WriteMcuAccessRegWord(sc, 0xF858, 0x1F28);
2124         MP_WriteMcuAccessRegWord(sc, 0xF85A, 0x3097);
2125         MP_WriteMcuAccessRegWord(sc, 0xF85C, 0x3091);
2126         MP_WriteMcuAccessRegWord(sc, 0xF85E, 0x9A36);
2127         MP_WriteMcuAccessRegWord(sc, 0xF860, 0x752C);
2128         MP_WriteMcuAccessRegWord(sc, 0xF862, 0x21DC);
2129         MP_WriteMcuAccessRegWord(sc, 0xF864, 0x25BC);
2130         MP_WriteMcuAccessRegWord(sc, 0xF866, 0xC6E2);
2131         MP_WriteMcuAccessRegWord(sc, 0xF868, 0x77C0);
2132         MP_WriteMcuAccessRegWord(sc, 0xF86A, 0x1304);
2133         MP_WriteMcuAccessRegWord(sc, 0xF86C, 0xF014);
2134         MP_WriteMcuAccessRegWord(sc, 0xF86E, 0x1303);
2135         MP_WriteMcuAccessRegWord(sc, 0xF870, 0xF014);
2136         MP_WriteMcuAccessRegWord(sc, 0xF872, 0x1302);
2137         MP_WriteMcuAccessRegWord(sc, 0xF874, 0xF014);
2138         MP_WriteMcuAccessRegWord(sc, 0xF876, 0x1301);
2139         MP_WriteMcuAccessRegWord(sc, 0xF878, 0xF014);
2140         MP_WriteMcuAccessRegWord(sc, 0xF87A, 0x49D4);
2141         MP_WriteMcuAccessRegWord(sc, 0xF87C, 0xF103);
2142         MP_WriteMcuAccessRegWord(sc, 0xF87E, 0xC3D7);
2143         MP_WriteMcuAccessRegWord(sc, 0xF880, 0xBB00);
2144         MP_WriteMcuAccessRegWord(sc, 0xF882, 0xC618);
2145         MP_WriteMcuAccessRegWord(sc, 0xF884, 0x67C6);
2146         MP_WriteMcuAccessRegWord(sc, 0xF886, 0x752E);
2147         MP_WriteMcuAccessRegWord(sc, 0xF888, 0x22D7);
2148         MP_WriteMcuAccessRegWord(sc, 0xF88A, 0x26DD);
2149         MP_WriteMcuAccessRegWord(sc, 0xF88C, 0x1505);
2150         MP_WriteMcuAccessRegWord(sc, 0xF88E, 0xF013);
2151         MP_WriteMcuAccessRegWord(sc, 0xF890, 0xC60A);
2152         MP_WriteMcuAccessRegWord(sc, 0xF892, 0xBE00);
2153         MP_WriteMcuAccessRegWord(sc, 0xF894, 0xC309);
2154         MP_WriteMcuAccessRegWord(sc, 0xF896, 0xBB00);
2155         MP_WriteMcuAccessRegWord(sc, 0xF898, 0xC308);
2156         MP_WriteMcuAccessRegWord(sc, 0xF89A, 0xBB00);
2157         MP_WriteMcuAccessRegWord(sc, 0xF89C, 0xC307);
2158         MP_WriteMcuAccessRegWord(sc, 0xF89E, 0xBB00);
2159         MP_WriteMcuAccessRegWord(sc, 0xF8A0, 0xC306);
2160         MP_WriteMcuAccessRegWord(sc, 0xF8A2, 0xBB00);
2161         MP_WriteMcuAccessRegWord(sc, 0xF8A4, 0x25C8);
2162         MP_WriteMcuAccessRegWord(sc, 0xF8A6, 0x25A6);
2163         MP_WriteMcuAccessRegWord(sc, 0xF8A8, 0x25AC);
2164         MP_WriteMcuAccessRegWord(sc, 0xF8AA, 0x25B2);
2165         MP_WriteMcuAccessRegWord(sc, 0xF8AC, 0x25B8);
2166         MP_WriteMcuAccessRegWord(sc, 0xF8AE, 0xCD08);
2167         MP_WriteMcuAccessRegWord(sc, 0xF8B0, 0x0000);
2168         MP_WriteMcuAccessRegWord(sc, 0xF8B2, 0xC0BC);
2169         MP_WriteMcuAccessRegWord(sc, 0xF8B4, 0xC2FF);
2170         MP_WriteMcuAccessRegWord(sc, 0xF8B6, 0x7340);
2171         MP_WriteMcuAccessRegWord(sc, 0xF8B8, 0x49B0);
2172         MP_WriteMcuAccessRegWord(sc, 0xF8BA, 0xF04E);
2173         MP_WriteMcuAccessRegWord(sc, 0xF8BC, 0x1F46);
2174         MP_WriteMcuAccessRegWord(sc, 0xF8BE, 0x308F);
2175         MP_WriteMcuAccessRegWord(sc, 0xF8C0, 0xC3F7);
2176         MP_WriteMcuAccessRegWord(sc, 0xF8C2, 0x1C04);
2177         MP_WriteMcuAccessRegWord(sc, 0xF8C4, 0xE84D);
2178         MP_WriteMcuAccessRegWord(sc, 0xF8C6, 0x1401);
2179         MP_WriteMcuAccessRegWord(sc, 0xF8C8, 0xF147);
2180         MP_WriteMcuAccessRegWord(sc, 0xF8CA, 0x7226);
2181         MP_WriteMcuAccessRegWord(sc, 0xF8CC, 0x49A7);
2182         MP_WriteMcuAccessRegWord(sc, 0xF8CE, 0xF044);
2183         MP_WriteMcuAccessRegWord(sc, 0xF8D0, 0x7222);
2184         MP_WriteMcuAccessRegWord(sc, 0xF8D2, 0x2525);
2185         MP_WriteMcuAccessRegWord(sc, 0xF8D4, 0x1F30);
2186         MP_WriteMcuAccessRegWord(sc, 0xF8D6, 0x3097);
2187         MP_WriteMcuAccessRegWord(sc, 0xF8D8, 0x3091);
2188         MP_WriteMcuAccessRegWord(sc, 0xF8DA, 0x7340);
2189         MP_WriteMcuAccessRegWord(sc, 0xF8DC, 0xC4EA);
2190         MP_WriteMcuAccessRegWord(sc, 0xF8DE, 0x401C);
2191         MP_WriteMcuAccessRegWord(sc, 0xF8E0, 0xF006);
2192         MP_WriteMcuAccessRegWord(sc, 0xF8E2, 0xC6E8);
2193         MP_WriteMcuAccessRegWord(sc, 0xF8E4, 0x75C0);
2194         MP_WriteMcuAccessRegWord(sc, 0xF8E6, 0x49D7);
2195         MP_WriteMcuAccessRegWord(sc, 0xF8E8, 0xF105);
2196         MP_WriteMcuAccessRegWord(sc, 0xF8EA, 0xE036);
2197         MP_WriteMcuAccessRegWord(sc, 0xF8EC, 0x1D08);
2198         MP_WriteMcuAccessRegWord(sc, 0xF8EE, 0x8DC1);
2199         MP_WriteMcuAccessRegWord(sc, 0xF8F0, 0x0208);
2200         MP_WriteMcuAccessRegWord(sc, 0xF8F2, 0x6640);
2201         MP_WriteMcuAccessRegWord(sc, 0xF8F4, 0x2764);
2202         MP_WriteMcuAccessRegWord(sc, 0xF8F6, 0x1606);
2203         MP_WriteMcuAccessRegWord(sc, 0xF8F8, 0xF12F);
2204         MP_WriteMcuAccessRegWord(sc, 0xF8FA, 0x6346);
2205         MP_WriteMcuAccessRegWord(sc, 0xF8FC, 0x133B);
2206         MP_WriteMcuAccessRegWord(sc, 0xF8FE, 0xF12C);
2207         MP_WriteMcuAccessRegWord(sc, 0xF900, 0x9B34);
2208         MP_WriteMcuAccessRegWord(sc, 0xF902, 0x1B18);
2209         MP_WriteMcuAccessRegWord(sc, 0xF904, 0x3093);
2210         MP_WriteMcuAccessRegWord(sc, 0xF906, 0xC32A);
2211         MP_WriteMcuAccessRegWord(sc, 0xF908, 0x1C10);
2212         MP_WriteMcuAccessRegWord(sc, 0xF90A, 0xE82A);
2213         MP_WriteMcuAccessRegWord(sc, 0xF90C, 0x1401);
2214         MP_WriteMcuAccessRegWord(sc, 0xF90E, 0xF124);
2215         MP_WriteMcuAccessRegWord(sc, 0xF910, 0x1A36);
2216         MP_WriteMcuAccessRegWord(sc, 0xF912, 0x308A);
2217         MP_WriteMcuAccessRegWord(sc, 0xF914, 0x7322);
2218         MP_WriteMcuAccessRegWord(sc, 0xF916, 0x25B5);
2219         MP_WriteMcuAccessRegWord(sc, 0xF918, 0x0B0E);
2220         MP_WriteMcuAccessRegWord(sc, 0xF91A, 0x1C00);
2221         MP_WriteMcuAccessRegWord(sc, 0xF91C, 0xE82C);
2222         MP_WriteMcuAccessRegWord(sc, 0xF91E, 0xC71F);
2223         MP_WriteMcuAccessRegWord(sc, 0xF920, 0x4027);
2224         MP_WriteMcuAccessRegWord(sc, 0xF922, 0xF11A);
2225         MP_WriteMcuAccessRegWord(sc, 0xF924, 0xE838);
2226         MP_WriteMcuAccessRegWord(sc, 0xF926, 0x1F42);
2227         MP_WriteMcuAccessRegWord(sc, 0xF928, 0x308F);
2228         MP_WriteMcuAccessRegWord(sc, 0xF92A, 0x1B08);
2229         MP_WriteMcuAccessRegWord(sc, 0xF92C, 0xE824);
2230         MP_WriteMcuAccessRegWord(sc, 0xF92E, 0x7236);
2231         MP_WriteMcuAccessRegWord(sc, 0xF930, 0x7746);
2232         MP_WriteMcuAccessRegWord(sc, 0xF932, 0x1700);
2233         MP_WriteMcuAccessRegWord(sc, 0xF934, 0xF00D);
2234         MP_WriteMcuAccessRegWord(sc, 0xF936, 0xC313);
2235         MP_WriteMcuAccessRegWord(sc, 0xF938, 0x401F);
2236         MP_WriteMcuAccessRegWord(sc, 0xF93A, 0xF103);
2237         MP_WriteMcuAccessRegWord(sc, 0xF93C, 0x1F00);
2238         MP_WriteMcuAccessRegWord(sc, 0xF93E, 0x9F46);
2239         MP_WriteMcuAccessRegWord(sc, 0xF940, 0x7744);
2240         MP_WriteMcuAccessRegWord(sc, 0xF942, 0x449F);
2241         MP_WriteMcuAccessRegWord(sc, 0xF944, 0x445F);
2242         MP_WriteMcuAccessRegWord(sc, 0xF946, 0xE817);
2243         MP_WriteMcuAccessRegWord(sc, 0xF948, 0xC70A);
2244         MP_WriteMcuAccessRegWord(sc, 0xF94A, 0x4027);
2245         MP_WriteMcuAccessRegWord(sc, 0xF94C, 0xF105);
2246         MP_WriteMcuAccessRegWord(sc, 0xF94E, 0xC302);
2247         MP_WriteMcuAccessRegWord(sc, 0xF950, 0xBB00);
2248         MP_WriteMcuAccessRegWord(sc, 0xF952, 0x2E08);
2249         MP_WriteMcuAccessRegWord(sc, 0xF954, 0x2DC2);
2250         MP_WriteMcuAccessRegWord(sc, 0xF956, 0xC7FF);
2251         MP_WriteMcuAccessRegWord(sc, 0xF958, 0xBF00);
2252         MP_WriteMcuAccessRegWord(sc, 0xF95A, 0xCDB8);
2253         MP_WriteMcuAccessRegWord(sc, 0xF95C, 0xFFFF);
2254         MP_WriteMcuAccessRegWord(sc, 0xF95E, 0x0C02);
2255         MP_WriteMcuAccessRegWord(sc, 0xF960, 0xA554);
2256         MP_WriteMcuAccessRegWord(sc, 0xF962, 0xA5DC);
2257         MP_WriteMcuAccessRegWord(sc, 0xF964, 0x402F);
2258         MP_WriteMcuAccessRegWord(sc, 0xF966, 0xF105);
2259         MP_WriteMcuAccessRegWord(sc, 0xF968, 0x1400);
2260         MP_WriteMcuAccessRegWord(sc, 0xF96A, 0xF1FA);
2261         MP_WriteMcuAccessRegWord(sc, 0xF96C, 0x1C01);
2262         MP_WriteMcuAccessRegWord(sc, 0xF96E, 0xE002);
2263         MP_WriteMcuAccessRegWord(sc, 0xF970, 0x1C00);
2264         MP_WriteMcuAccessRegWord(sc, 0xF972, 0xFF80);
2265         MP_WriteMcuAccessRegWord(sc, 0xF974, 0x49B0);
2266         MP_WriteMcuAccessRegWord(sc, 0xF976, 0xF004);
2267         MP_WriteMcuAccessRegWord(sc, 0xF978, 0x0B01);
2268         MP_WriteMcuAccessRegWord(sc, 0xF97A, 0xA1D3);
2269         MP_WriteMcuAccessRegWord(sc, 0xF97C, 0xE003);
2270         MP_WriteMcuAccessRegWord(sc, 0xF97E, 0x0B02);
2271         MP_WriteMcuAccessRegWord(sc, 0xF980, 0xA5D3);
2272         MP_WriteMcuAccessRegWord(sc, 0xF982, 0x3127);
2273         MP_WriteMcuAccessRegWord(sc, 0xF984, 0x3720);
2274         MP_WriteMcuAccessRegWord(sc, 0xF986, 0x0B02);
2275         MP_WriteMcuAccessRegWord(sc, 0xF988, 0xA5D3);
2276         MP_WriteMcuAccessRegWord(sc, 0xF98A, 0x3127);
2277         MP_WriteMcuAccessRegWord(sc, 0xF98C, 0x3720);
2278         MP_WriteMcuAccessRegWord(sc, 0xF98E, 0x1300);
2279         MP_WriteMcuAccessRegWord(sc, 0xF990, 0xF1FB);
2280         MP_WriteMcuAccessRegWord(sc, 0xF992, 0xFF80);
2281         MP_WriteMcuAccessRegWord(sc, 0xF994, 0x7322);
2282         MP_WriteMcuAccessRegWord(sc, 0xF996, 0x25B5);
2283         MP_WriteMcuAccessRegWord(sc, 0xF998, 0x1E28);
2284         MP_WriteMcuAccessRegWord(sc, 0xF99A, 0x30DE);
2285         MP_WriteMcuAccessRegWord(sc, 0xF99C, 0x30D9);
2286         MP_WriteMcuAccessRegWord(sc, 0xF99E, 0x7264);
2287         MP_WriteMcuAccessRegWord(sc, 0xF9A0, 0x1E11);
2288         MP_WriteMcuAccessRegWord(sc, 0xF9A2, 0x2368);
2289         MP_WriteMcuAccessRegWord(sc, 0xF9A4, 0x3116);
2290         MP_WriteMcuAccessRegWord(sc, 0xF9A6, 0xFF80);
2291         MP_WriteMcuAccessRegWord(sc, 0xF9A8, 0x1B7E);
2292         MP_WriteMcuAccessRegWord(sc, 0xF9AA, 0xC602);
2293         MP_WriteMcuAccessRegWord(sc, 0xF9AC, 0xBE00);
2294         MP_WriteMcuAccessRegWord(sc, 0xF9AE, 0x06A6);
2295         MP_WriteMcuAccessRegWord(sc, 0xF9B0, 0x1B7E);
2296         MP_WriteMcuAccessRegWord(sc, 0xF9B2, 0xC602);
2297         MP_WriteMcuAccessRegWord(sc, 0xF9B4, 0xBE00);
2298         MP_WriteMcuAccessRegWord(sc, 0xF9B6, 0x0764);
2299         MP_WriteMcuAccessRegWord(sc, 0xF9B8, 0xC602);
2300         MP_WriteMcuAccessRegWord(sc, 0xF9BA, 0xBE00);
2301         MP_WriteMcuAccessRegWord(sc, 0xF9BC, 0x0000);
2302         MP_WriteMcuAccessRegWord(sc, 0xF9BE, 0xC602);
2303         MP_WriteMcuAccessRegWord(sc, 0xF9C0, 0xBE00);
2304         MP_WriteMcuAccessRegWord(sc, 0xF9C2, 0x0000);
2305         MP_WriteMcuAccessRegWord(sc, 0xF9C4, 0xC602);
2306         MP_WriteMcuAccessRegWord(sc, 0xF9C6, 0xBE00);
2307         MP_WriteMcuAccessRegWord(sc, 0xF9C8, 0x0000);
2308         MP_WriteMcuAccessRegWord(sc, 0xF9CA, 0xC602);
2309         MP_WriteMcuAccessRegWord(sc, 0xF9CC, 0xBE00);
2310         MP_WriteMcuAccessRegWord(sc, 0xF9CE, 0x0000);
2311         MP_WriteMcuAccessRegWord(sc, 0xF9D0, 0xC602);
2312         MP_WriteMcuAccessRegWord(sc, 0xF9D2, 0xBE00);
2313         MP_WriteMcuAccessRegWord(sc, 0xF9D4, 0x0000);
2314 
2315         MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
2316 
2317         MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x2549);
2318         MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x06A5);
2319         MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x0763);
2320 }
2321 
2322 static void re_set_mac_mcu_8168ep_2(struct re_softc *sc)
2323 {
2324         DisableMcuBPs(sc);
2325 
2326         MP_WriteMcuAccessRegWord(sc, 0xF800, 0xE008);
2327         MP_WriteMcuAccessRegWord(sc, 0xF802, 0xE017);
2328         MP_WriteMcuAccessRegWord(sc, 0xF804, 0xE019);
2329         MP_WriteMcuAccessRegWord(sc, 0xF806, 0xE01B);
2330         MP_WriteMcuAccessRegWord(sc, 0xF808, 0xE01D);
2331         MP_WriteMcuAccessRegWord(sc, 0xF80A, 0xE01F);
2332         MP_WriteMcuAccessRegWord(sc, 0xF80C, 0xE021);
2333         MP_WriteMcuAccessRegWord(sc, 0xF80E, 0xE023);
2334         MP_WriteMcuAccessRegWord(sc, 0xF810, 0xC50F);
2335         MP_WriteMcuAccessRegWord(sc, 0xF812, 0x76A4);
2336         MP_WriteMcuAccessRegWord(sc, 0xF814, 0x49E3);
2337         MP_WriteMcuAccessRegWord(sc, 0xF816, 0xF007);
2338         MP_WriteMcuAccessRegWord(sc, 0xF818, 0x49C0);
2339         MP_WriteMcuAccessRegWord(sc, 0xF81A, 0xF103);
2340         MP_WriteMcuAccessRegWord(sc, 0xF81C, 0xC607);
2341         MP_WriteMcuAccessRegWord(sc, 0xF81E, 0xBE00);
2342         MP_WriteMcuAccessRegWord(sc, 0xF820, 0xC606);
2343         MP_WriteMcuAccessRegWord(sc, 0xF822, 0xBE00);
2344         MP_WriteMcuAccessRegWord(sc, 0xF824, 0xC602);
2345         MP_WriteMcuAccessRegWord(sc, 0xF826, 0xBE00);
2346         MP_WriteMcuAccessRegWord(sc, 0xF828, 0x0BDA);
2347         MP_WriteMcuAccessRegWord(sc, 0xF82A, 0x0BB0);
2348         MP_WriteMcuAccessRegWord(sc, 0xF82C, 0x0BBA);
2349         MP_WriteMcuAccessRegWord(sc, 0xF82E, 0xDC00);
2350         MP_WriteMcuAccessRegWord(sc, 0xF830, 0xC602);
2351         MP_WriteMcuAccessRegWord(sc, 0xF832, 0xBE00);
2352         MP_WriteMcuAccessRegWord(sc, 0xF834, 0x0000);
2353         MP_WriteMcuAccessRegWord(sc, 0xF836, 0xC602);
2354         MP_WriteMcuAccessRegWord(sc, 0xF838, 0xBE00);
2355         MP_WriteMcuAccessRegWord(sc, 0xF83A, 0x0000);
2356         MP_WriteMcuAccessRegWord(sc, 0xF83C, 0xC602);
2357         MP_WriteMcuAccessRegWord(sc, 0xF83E, 0xBE00);
2358         MP_WriteMcuAccessRegWord(sc, 0xF840, 0x0000);
2359         MP_WriteMcuAccessRegWord(sc, 0xF842, 0xC602);
2360         MP_WriteMcuAccessRegWord(sc, 0xF844, 0xBE00);
2361         MP_WriteMcuAccessRegWord(sc, 0xF846, 0x0000);
2362         MP_WriteMcuAccessRegWord(sc, 0xF848, 0xC602);
2363         MP_WriteMcuAccessRegWord(sc, 0xF84A, 0xBE00);
2364         MP_WriteMcuAccessRegWord(sc, 0xF84C, 0x0000);
2365         MP_WriteMcuAccessRegWord(sc, 0xF84E, 0xC602);
2366         MP_WriteMcuAccessRegWord(sc, 0xF850, 0xBE00);
2367         MP_WriteMcuAccessRegWord(sc, 0xF852, 0x0000);
2368         MP_WriteMcuAccessRegWord(sc, 0xF854, 0xC602);
2369         MP_WriteMcuAccessRegWord(sc, 0xF856, 0xBE00);
2370         MP_WriteMcuAccessRegWord(sc, 0xF858, 0x0000);
2371 
2372         MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
2373 
2374         MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x0BB3);
2375 }
2376 
2377 static void re_set_mac_mcu_8168h_1(struct re_softc *sc)
2378 {
2379         DisableMcuBPs(sc);
2380 
2381         MP_WriteMcuAccessRegWord(sc, 0xF800, 0xE008);
2382         MP_WriteMcuAccessRegWord(sc, 0xF802, 0xE00F);
2383         MP_WriteMcuAccessRegWord(sc, 0xF804, 0xE011);
2384         MP_WriteMcuAccessRegWord(sc, 0xF806, 0xE047);
2385         MP_WriteMcuAccessRegWord(sc, 0xF808, 0xE049);
2386         MP_WriteMcuAccessRegWord(sc, 0xF80A, 0xE073);
2387         MP_WriteMcuAccessRegWord(sc, 0xF80C, 0xE075);
2388         MP_WriteMcuAccessRegWord(sc, 0xF80E, 0xE077);
2389         MP_WriteMcuAccessRegWord(sc, 0xF810, 0xC707);
2390         MP_WriteMcuAccessRegWord(sc, 0xF812, 0x1D00);
2391         MP_WriteMcuAccessRegWord(sc, 0xF814, 0x8DE2);
2392         MP_WriteMcuAccessRegWord(sc, 0xF816, 0x48C1);
2393         MP_WriteMcuAccessRegWord(sc, 0xF818, 0xC502);
2394         MP_WriteMcuAccessRegWord(sc, 0xF81A, 0xBD00);
2395         MP_WriteMcuAccessRegWord(sc, 0xF81C, 0x00E4);
2396         MP_WriteMcuAccessRegWord(sc, 0xF81E, 0xE0C0);
2397         MP_WriteMcuAccessRegWord(sc, 0xF820, 0xC502);
2398         MP_WriteMcuAccessRegWord(sc, 0xF822, 0xBD00);
2399         MP_WriteMcuAccessRegWord(sc, 0xF824, 0x0216);
2400         MP_WriteMcuAccessRegWord(sc, 0xF826, 0xC634);
2401         MP_WriteMcuAccessRegWord(sc, 0xF828, 0x75C0);
2402         MP_WriteMcuAccessRegWord(sc, 0xF82A, 0x49D3);
2403         MP_WriteMcuAccessRegWord(sc, 0xF82C, 0xF027);
2404         MP_WriteMcuAccessRegWord(sc, 0xF82E, 0xC631);
2405         MP_WriteMcuAccessRegWord(sc, 0xF830, 0x75C0);
2406         MP_WriteMcuAccessRegWord(sc, 0xF832, 0x49D3);
2407         MP_WriteMcuAccessRegWord(sc, 0xF834, 0xF123);
2408         MP_WriteMcuAccessRegWord(sc, 0xF836, 0xC627);
2409         MP_WriteMcuAccessRegWord(sc, 0xF838, 0x75C0);
2410         MP_WriteMcuAccessRegWord(sc, 0xF83A, 0xB405);
2411         MP_WriteMcuAccessRegWord(sc, 0xF83C, 0xC525);
2412         MP_WriteMcuAccessRegWord(sc, 0xF83E, 0x9DC0);
2413         MP_WriteMcuAccessRegWord(sc, 0xF840, 0xC621);
2414         MP_WriteMcuAccessRegWord(sc, 0xF842, 0x75C8);
2415         MP_WriteMcuAccessRegWord(sc, 0xF844, 0x49D5);
2416         MP_WriteMcuAccessRegWord(sc, 0xF846, 0xF00A);
2417         MP_WriteMcuAccessRegWord(sc, 0xF848, 0x49D6);
2418         MP_WriteMcuAccessRegWord(sc, 0xF84A, 0xF008);
2419         MP_WriteMcuAccessRegWord(sc, 0xF84C, 0x49D7);
2420         MP_WriteMcuAccessRegWord(sc, 0xF84E, 0xF006);
2421         MP_WriteMcuAccessRegWord(sc, 0xF850, 0x49D8);
2422         MP_WriteMcuAccessRegWord(sc, 0xF852, 0xF004);
2423         MP_WriteMcuAccessRegWord(sc, 0xF854, 0x75D2);
2424         MP_WriteMcuAccessRegWord(sc, 0xF856, 0x49D9);
2425         MP_WriteMcuAccessRegWord(sc, 0xF858, 0xF111);
2426         MP_WriteMcuAccessRegWord(sc, 0xF85A, 0xC517);
2427         MP_WriteMcuAccessRegWord(sc, 0xF85C, 0x9DC8);
2428         MP_WriteMcuAccessRegWord(sc, 0xF85E, 0xC516);
2429         MP_WriteMcuAccessRegWord(sc, 0xF860, 0x9DD2);
2430         MP_WriteMcuAccessRegWord(sc, 0xF862, 0xC618);
2431         MP_WriteMcuAccessRegWord(sc, 0xF864, 0x75C0);
2432         MP_WriteMcuAccessRegWord(sc, 0xF866, 0x49D4);
2433         MP_WriteMcuAccessRegWord(sc, 0xF868, 0xF003);
2434         MP_WriteMcuAccessRegWord(sc, 0xF86A, 0x49D0);
2435         MP_WriteMcuAccessRegWord(sc, 0xF86C, 0xF104);
2436         MP_WriteMcuAccessRegWord(sc, 0xF86E, 0xC60A);
2437         MP_WriteMcuAccessRegWord(sc, 0xF870, 0xC50E);
2438         MP_WriteMcuAccessRegWord(sc, 0xF872, 0x9DC0);
2439         MP_WriteMcuAccessRegWord(sc, 0xF874, 0xB005);
2440         MP_WriteMcuAccessRegWord(sc, 0xF876, 0xC607);
2441         MP_WriteMcuAccessRegWord(sc, 0xF878, 0x9DC0);
2442         MP_WriteMcuAccessRegWord(sc, 0xF87A, 0xB007);
2443         MP_WriteMcuAccessRegWord(sc, 0xF87C, 0xC602);
2444         MP_WriteMcuAccessRegWord(sc, 0xF87E, 0xBE00);
2445         MP_WriteMcuAccessRegWord(sc, 0xF880, 0x1A06);
2446         MP_WriteMcuAccessRegWord(sc, 0xF882, 0xB400);
2447         MP_WriteMcuAccessRegWord(sc, 0xF884, 0xE86C);
2448         MP_WriteMcuAccessRegWord(sc, 0xF886, 0xA000);
2449         MP_WriteMcuAccessRegWord(sc, 0xF888, 0x01E1);
2450         MP_WriteMcuAccessRegWord(sc, 0xF88A, 0x0200);
2451         MP_WriteMcuAccessRegWord(sc, 0xF88C, 0x9200);
2452         MP_WriteMcuAccessRegWord(sc, 0xF88E, 0xE84C);
2453         MP_WriteMcuAccessRegWord(sc, 0xF890, 0xE004);
2454         MP_WriteMcuAccessRegWord(sc, 0xF892, 0xE908);
2455         MP_WriteMcuAccessRegWord(sc, 0xF894, 0xC502);
2456         MP_WriteMcuAccessRegWord(sc, 0xF896, 0xBD00);
2457         MP_WriteMcuAccessRegWord(sc, 0xF898, 0x0B58);
2458         MP_WriteMcuAccessRegWord(sc, 0xF89A, 0xB407);
2459         MP_WriteMcuAccessRegWord(sc, 0xF89C, 0xB404);
2460         MP_WriteMcuAccessRegWord(sc, 0xF89E, 0x2195);
2461         MP_WriteMcuAccessRegWord(sc, 0xF8A0, 0x25BD);
2462         MP_WriteMcuAccessRegWord(sc, 0xF8A2, 0x9BE0);
2463         MP_WriteMcuAccessRegWord(sc, 0xF8A4, 0x1C1C);
2464         MP_WriteMcuAccessRegWord(sc, 0xF8A6, 0x484F);
2465         MP_WriteMcuAccessRegWord(sc, 0xF8A8, 0x9CE2);
2466         MP_WriteMcuAccessRegWord(sc, 0xF8AA, 0x72E2);
2467         MP_WriteMcuAccessRegWord(sc, 0xF8AC, 0x49AE);
2468         MP_WriteMcuAccessRegWord(sc, 0xF8AE, 0xF1FE);
2469         MP_WriteMcuAccessRegWord(sc, 0xF8B0, 0x0B00);
2470         MP_WriteMcuAccessRegWord(sc, 0xF8B2, 0xF116);
2471         MP_WriteMcuAccessRegWord(sc, 0xF8B4, 0xC71C);
2472         MP_WriteMcuAccessRegWord(sc, 0xF8B6, 0xC419);
2473         MP_WriteMcuAccessRegWord(sc, 0xF8B8, 0x9CE0);
2474         MP_WriteMcuAccessRegWord(sc, 0xF8BA, 0x1C13);
2475         MP_WriteMcuAccessRegWord(sc, 0xF8BC, 0x484F);
2476         MP_WriteMcuAccessRegWord(sc, 0xF8BE, 0x9CE2);
2477         MP_WriteMcuAccessRegWord(sc, 0xF8C0, 0x74E2);
2478         MP_WriteMcuAccessRegWord(sc, 0xF8C2, 0x49CE);
2479         MP_WriteMcuAccessRegWord(sc, 0xF8C4, 0xF1FE);
2480         MP_WriteMcuAccessRegWord(sc, 0xF8C6, 0xC412);
2481         MP_WriteMcuAccessRegWord(sc, 0xF8C8, 0x9CE0);
2482         MP_WriteMcuAccessRegWord(sc, 0xF8CA, 0x1C13);
2483         MP_WriteMcuAccessRegWord(sc, 0xF8CC, 0x484F);
2484         MP_WriteMcuAccessRegWord(sc, 0xF8CE, 0x9CE2);
2485         MP_WriteMcuAccessRegWord(sc, 0xF8D0, 0x74E2);
2486         MP_WriteMcuAccessRegWord(sc, 0xF8D2, 0x49CE);
2487         MP_WriteMcuAccessRegWord(sc, 0xF8D4, 0xF1FE);
2488         MP_WriteMcuAccessRegWord(sc, 0xF8D6, 0xC70C);
2489         MP_WriteMcuAccessRegWord(sc, 0xF8D8, 0x74F8);
2490         MP_WriteMcuAccessRegWord(sc, 0xF8DA, 0x48C3);
2491         MP_WriteMcuAccessRegWord(sc, 0xF8DC, 0x8CF8);
2492         MP_WriteMcuAccessRegWord(sc, 0xF8DE, 0xB004);
2493         MP_WriteMcuAccessRegWord(sc, 0xF8E0, 0xB007);
2494         MP_WriteMcuAccessRegWord(sc, 0xF8E2, 0xC502);
2495         MP_WriteMcuAccessRegWord(sc, 0xF8E4, 0xBD00);
2496         MP_WriteMcuAccessRegWord(sc, 0xF8E6, 0x0F24);
2497         MP_WriteMcuAccessRegWord(sc, 0xF8E8, 0x0481);
2498         MP_WriteMcuAccessRegWord(sc, 0xF8EA, 0x0C81);
2499         MP_WriteMcuAccessRegWord(sc, 0xF8EC, 0xDE24);
2500         MP_WriteMcuAccessRegWord(sc, 0xF8EE, 0xE000);
2501         MP_WriteMcuAccessRegWord(sc, 0xF8F0, 0xC602);
2502         MP_WriteMcuAccessRegWord(sc, 0xF8F2, 0xBE00);
2503         MP_WriteMcuAccessRegWord(sc, 0xF8F4, 0x0CA4);
2504         MP_WriteMcuAccessRegWord(sc, 0xF8F6, 0xC502);
2505         MP_WriteMcuAccessRegWord(sc, 0xF8F8, 0xBD00);
2506         MP_WriteMcuAccessRegWord(sc, 0xF8FA, 0x0000);
2507         MP_WriteMcuAccessRegWord(sc, 0xF8FC, 0xC602);
2508         MP_WriteMcuAccessRegWord(sc, 0xF8FE, 0xBE00);
2509         MP_WriteMcuAccessRegWord(sc, 0xF900, 0x0000);
2510 
2511         MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
2512 
2513         MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x00E2);
2514         MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x0210);
2515         MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x1A04);
2516         MP_WriteMcuAccessRegWord(sc, 0xFC2E, 0x0B26);
2517         MP_WriteMcuAccessRegWord(sc, 0xFC30, 0x0F02);
2518         MP_WriteMcuAccessRegWord(sc, 0xFC32, 0x0CA0);
2519 
2520         if (sc->re_device_id == RT_DEVICEID_8136)
2521                 MP_WriteMcuAccessRegWord(sc, 0xFC38, 0x0033);
2522         else
2523                 MP_WriteMcuAccessRegWord(sc, 0xFC38, 0x003F);
2524 }
2525 
2526 static void re_set_mac_mcu_8168fp_1(struct re_softc *sc)
2527 {
2528         DisableMcuBPs(sc);
2529 
2530         MP_WriteMcuAccessRegWord(sc, 0xF800, 0xE00A);
2531         MP_WriteMcuAccessRegWord(sc, 0xF802, 0xE0C1);
2532         MP_WriteMcuAccessRegWord(sc, 0xF804, 0xE104);
2533         MP_WriteMcuAccessRegWord(sc, 0xF806, 0xE108);
2534         MP_WriteMcuAccessRegWord(sc, 0xF808, 0xE10D);
2535         MP_WriteMcuAccessRegWord(sc, 0xF80A, 0xE112);
2536         MP_WriteMcuAccessRegWord(sc, 0xF80C, 0xE11C);
2537         MP_WriteMcuAccessRegWord(sc, 0xF80E, 0xE121);
2538         MP_WriteMcuAccessRegWord(sc, 0xF810, 0xE000);
2539         MP_WriteMcuAccessRegWord(sc, 0xF812, 0xE0C8);
2540         MP_WriteMcuAccessRegWord(sc, 0xF814, 0xB400);
2541         MP_WriteMcuAccessRegWord(sc, 0xF816, 0xC1FE);
2542         MP_WriteMcuAccessRegWord(sc, 0xF818, 0x49E2);
2543         MP_WriteMcuAccessRegWord(sc, 0xF81A, 0xF04C);
2544         MP_WriteMcuAccessRegWord(sc, 0xF81C, 0x49EA);
2545         MP_WriteMcuAccessRegWord(sc, 0xF81E, 0xF04A);
2546         MP_WriteMcuAccessRegWord(sc, 0xF820, 0x74E6);
2547         MP_WriteMcuAccessRegWord(sc, 0xF822, 0xC246);
2548         MP_WriteMcuAccessRegWord(sc, 0xF824, 0x7542);
2549         MP_WriteMcuAccessRegWord(sc, 0xF826, 0x73EC);
2550         MP_WriteMcuAccessRegWord(sc, 0xF828, 0x1800);
2551         MP_WriteMcuAccessRegWord(sc, 0xF82A, 0x49C0);
2552         MP_WriteMcuAccessRegWord(sc, 0xF82C, 0xF10D);
2553         MP_WriteMcuAccessRegWord(sc, 0xF82E, 0x49C1);
2554         MP_WriteMcuAccessRegWord(sc, 0xF830, 0xF10B);
2555         MP_WriteMcuAccessRegWord(sc, 0xF832, 0x49C2);
2556         MP_WriteMcuAccessRegWord(sc, 0xF834, 0xF109);
2557         MP_WriteMcuAccessRegWord(sc, 0xF836, 0x49B0);
2558         MP_WriteMcuAccessRegWord(sc, 0xF838, 0xF107);
2559         MP_WriteMcuAccessRegWord(sc, 0xF83A, 0x49B1);
2560         MP_WriteMcuAccessRegWord(sc, 0xF83C, 0xF105);
2561         MP_WriteMcuAccessRegWord(sc, 0xF83E, 0x7220);
2562         MP_WriteMcuAccessRegWord(sc, 0xF840, 0x49A2);
2563         MP_WriteMcuAccessRegWord(sc, 0xF842, 0xF102);
2564         MP_WriteMcuAccessRegWord(sc, 0xF844, 0xE002);
2565         MP_WriteMcuAccessRegWord(sc, 0xF846, 0x4800);
2566         MP_WriteMcuAccessRegWord(sc, 0xF848, 0x49D0);
2567         MP_WriteMcuAccessRegWord(sc, 0xF84A, 0xF10A);
2568         MP_WriteMcuAccessRegWord(sc, 0xF84C, 0x49D1);
2569         MP_WriteMcuAccessRegWord(sc, 0xF84E, 0xF108);
2570         MP_WriteMcuAccessRegWord(sc, 0xF850, 0x49D2);
2571         MP_WriteMcuAccessRegWord(sc, 0xF852, 0xF106);
2572         MP_WriteMcuAccessRegWord(sc, 0xF854, 0x49D3);
2573         MP_WriteMcuAccessRegWord(sc, 0xF856, 0xF104);
2574         MP_WriteMcuAccessRegWord(sc, 0xF858, 0x49DF);
2575         MP_WriteMcuAccessRegWord(sc, 0xF85A, 0xF102);
2576         MP_WriteMcuAccessRegWord(sc, 0xF85C, 0xE00C);
2577         MP_WriteMcuAccessRegWord(sc, 0xF85E, 0x4801);
2578         MP_WriteMcuAccessRegWord(sc, 0xF860, 0x72E4);
2579         MP_WriteMcuAccessRegWord(sc, 0xF862, 0x49AD);
2580         MP_WriteMcuAccessRegWord(sc, 0xF864, 0xF108);
2581         MP_WriteMcuAccessRegWord(sc, 0xF866, 0xC225);
2582         MP_WriteMcuAccessRegWord(sc, 0xF868, 0x6741);
2583         MP_WriteMcuAccessRegWord(sc, 0xF86A, 0x48F0);
2584         MP_WriteMcuAccessRegWord(sc, 0xF86C, 0x8F41);
2585         MP_WriteMcuAccessRegWord(sc, 0xF86E, 0x4870);
2586         MP_WriteMcuAccessRegWord(sc, 0xF870, 0x8F41);
2587         MP_WriteMcuAccessRegWord(sc, 0xF872, 0xC7CF);
2588         MP_WriteMcuAccessRegWord(sc, 0xF874, 0x49B5);
2589         MP_WriteMcuAccessRegWord(sc, 0xF876, 0xF01F);
2590         MP_WriteMcuAccessRegWord(sc, 0xF878, 0x49B2);
2591         MP_WriteMcuAccessRegWord(sc, 0xF87A, 0xF00B);
2592         MP_WriteMcuAccessRegWord(sc, 0xF87C, 0x4980);
2593         MP_WriteMcuAccessRegWord(sc, 0xF87E, 0xF003);
2594         MP_WriteMcuAccessRegWord(sc, 0xF880, 0x484E);
2595         MP_WriteMcuAccessRegWord(sc, 0xF882, 0x94E7);
2596         MP_WriteMcuAccessRegWord(sc, 0xF884, 0x4981);
2597         MP_WriteMcuAccessRegWord(sc, 0xF886, 0xF004);
2598         MP_WriteMcuAccessRegWord(sc, 0xF888, 0x485E);
2599         MP_WriteMcuAccessRegWord(sc, 0xF88A, 0xC212);
2600         MP_WriteMcuAccessRegWord(sc, 0xF88C, 0x9543);
2601         MP_WriteMcuAccessRegWord(sc, 0xF88E, 0xE071);
2602         MP_WriteMcuAccessRegWord(sc, 0xF890, 0x49B6);
2603         MP_WriteMcuAccessRegWord(sc, 0xF892, 0xF003);
2604         MP_WriteMcuAccessRegWord(sc, 0xF894, 0x49B3);
2605         MP_WriteMcuAccessRegWord(sc, 0xF896, 0xF10F);
2606         MP_WriteMcuAccessRegWord(sc, 0xF898, 0x4980);
2607         MP_WriteMcuAccessRegWord(sc, 0xF89A, 0xF003);
2608         MP_WriteMcuAccessRegWord(sc, 0xF89C, 0x484E);
2609         MP_WriteMcuAccessRegWord(sc, 0xF89E, 0x94E7);
2610         MP_WriteMcuAccessRegWord(sc, 0xF8A0, 0x4981);
2611         MP_WriteMcuAccessRegWord(sc, 0xF8A2, 0xF004);
2612         MP_WriteMcuAccessRegWord(sc, 0xF8A4, 0x485E);
2613         MP_WriteMcuAccessRegWord(sc, 0xF8A6, 0xC204);
2614         MP_WriteMcuAccessRegWord(sc, 0xF8A8, 0x9543);
2615         MP_WriteMcuAccessRegWord(sc, 0xF8AA, 0xE005);
2616         MP_WriteMcuAccessRegWord(sc, 0xF8AC, 0xE000);
2617         MP_WriteMcuAccessRegWord(sc, 0xF8AE, 0xE0FC);
2618         MP_WriteMcuAccessRegWord(sc, 0xF8B0, 0xE0FA);
2619         MP_WriteMcuAccessRegWord(sc, 0xF8B2, 0xE065);
2620         MP_WriteMcuAccessRegWord(sc, 0xF8B4, 0x49B7);
2621         MP_WriteMcuAccessRegWord(sc, 0xF8B6, 0xF007);
2622         MP_WriteMcuAccessRegWord(sc, 0xF8B8, 0x4980);
2623         MP_WriteMcuAccessRegWord(sc, 0xF8BA, 0xF005);
2624         MP_WriteMcuAccessRegWord(sc, 0xF8BC, 0x1A38);
2625         MP_WriteMcuAccessRegWord(sc, 0xF8BE, 0x46D4);
2626         MP_WriteMcuAccessRegWord(sc, 0xF8C0, 0x1200);
2627         MP_WriteMcuAccessRegWord(sc, 0xF8C2, 0xF109);
2628         MP_WriteMcuAccessRegWord(sc, 0xF8C4, 0x4981);
2629         MP_WriteMcuAccessRegWord(sc, 0xF8C6, 0xF055);
2630         MP_WriteMcuAccessRegWord(sc, 0xF8C8, 0x49C3);
2631         MP_WriteMcuAccessRegWord(sc, 0xF8CA, 0xF105);
2632         MP_WriteMcuAccessRegWord(sc, 0xF8CC, 0x1A30);
2633         MP_WriteMcuAccessRegWord(sc, 0xF8CE, 0x46D5);
2634         MP_WriteMcuAccessRegWord(sc, 0xF8D0, 0x1200);
2635         MP_WriteMcuAccessRegWord(sc, 0xF8D2, 0xF04F);
2636         MP_WriteMcuAccessRegWord(sc, 0xF8D4, 0x7220);
2637         MP_WriteMcuAccessRegWord(sc, 0xF8D6, 0x49A2);
2638         MP_WriteMcuAccessRegWord(sc, 0xF8D8, 0xF130);
2639         MP_WriteMcuAccessRegWord(sc, 0xF8DA, 0x49C1);
2640         MP_WriteMcuAccessRegWord(sc, 0xF8DC, 0xF12E);
2641         MP_WriteMcuAccessRegWord(sc, 0xF8DE, 0x49B0);
2642         MP_WriteMcuAccessRegWord(sc, 0xF8E0, 0xF12C);
2643         MP_WriteMcuAccessRegWord(sc, 0xF8E2, 0xC2E6);
2644         MP_WriteMcuAccessRegWord(sc, 0xF8E4, 0x7240);
2645         MP_WriteMcuAccessRegWord(sc, 0xF8E6, 0x49A8);
2646         MP_WriteMcuAccessRegWord(sc, 0xF8E8, 0xF003);
2647         MP_WriteMcuAccessRegWord(sc, 0xF8EA, 0x49D0);
2648         MP_WriteMcuAccessRegWord(sc, 0xF8EC, 0xF126);
2649         MP_WriteMcuAccessRegWord(sc, 0xF8EE, 0x49A9);
2650         MP_WriteMcuAccessRegWord(sc, 0xF8F0, 0xF003);
2651         MP_WriteMcuAccessRegWord(sc, 0xF8F2, 0x49D1);
2652         MP_WriteMcuAccessRegWord(sc, 0xF8F4, 0xF122);
2653         MP_WriteMcuAccessRegWord(sc, 0xF8F6, 0x49AA);
2654         MP_WriteMcuAccessRegWord(sc, 0xF8F8, 0xF003);
2655         MP_WriteMcuAccessRegWord(sc, 0xF8FA, 0x49D2);
2656         MP_WriteMcuAccessRegWord(sc, 0xF8FC, 0xF11E);
2657         MP_WriteMcuAccessRegWord(sc, 0xF8FE, 0x49AB);
2658         MP_WriteMcuAccessRegWord(sc, 0xF900, 0xF003);
2659         MP_WriteMcuAccessRegWord(sc, 0xF902, 0x49DF);
2660         MP_WriteMcuAccessRegWord(sc, 0xF904, 0xF11A);
2661         MP_WriteMcuAccessRegWord(sc, 0xF906, 0x49AC);
2662         MP_WriteMcuAccessRegWord(sc, 0xF908, 0xF003);
2663         MP_WriteMcuAccessRegWord(sc, 0xF90A, 0x49D3);
2664         MP_WriteMcuAccessRegWord(sc, 0xF90C, 0xF116);
2665         MP_WriteMcuAccessRegWord(sc, 0xF90E, 0x4980);
2666         MP_WriteMcuAccessRegWord(sc, 0xF910, 0xF003);
2667         MP_WriteMcuAccessRegWord(sc, 0xF912, 0x49C7);
2668         MP_WriteMcuAccessRegWord(sc, 0xF914, 0xF105);
2669         MP_WriteMcuAccessRegWord(sc, 0xF916, 0x4981);
2670         MP_WriteMcuAccessRegWord(sc, 0xF918, 0xF02C);
2671         MP_WriteMcuAccessRegWord(sc, 0xF91A, 0x49D7);
2672         MP_WriteMcuAccessRegWord(sc, 0xF91C, 0xF02A);
2673         MP_WriteMcuAccessRegWord(sc, 0xF91E, 0x49C0);
2674         MP_WriteMcuAccessRegWord(sc, 0xF920, 0xF00C);
2675         MP_WriteMcuAccessRegWord(sc, 0xF922, 0xC721);
2676         MP_WriteMcuAccessRegWord(sc, 0xF924, 0x62F4);
2677         MP_WriteMcuAccessRegWord(sc, 0xF926, 0x49A0);
2678         MP_WriteMcuAccessRegWord(sc, 0xF928, 0xF008);
2679         MP_WriteMcuAccessRegWord(sc, 0xF92A, 0x49A4);
2680         MP_WriteMcuAccessRegWord(sc, 0xF92C, 0xF106);
2681         MP_WriteMcuAccessRegWord(sc, 0xF92E, 0x4824);
2682         MP_WriteMcuAccessRegWord(sc, 0xF930, 0x8AF4);
2683         MP_WriteMcuAccessRegWord(sc, 0xF932, 0xC71A);
2684         MP_WriteMcuAccessRegWord(sc, 0xF934, 0x1A40);
2685         MP_WriteMcuAccessRegWord(sc, 0xF936, 0x9AE0);
2686         MP_WriteMcuAccessRegWord(sc, 0xF938, 0x49B6);
2687         MP_WriteMcuAccessRegWord(sc, 0xF93A, 0xF017);
2688         MP_WriteMcuAccessRegWord(sc, 0xF93C, 0x200E);
2689         MP_WriteMcuAccessRegWord(sc, 0xF93E, 0xC7B8);
2690         MP_WriteMcuAccessRegWord(sc, 0xF940, 0x72E0);
2691         MP_WriteMcuAccessRegWord(sc, 0xF942, 0x4710);
2692         MP_WriteMcuAccessRegWord(sc, 0xF944, 0x92E1);
2693         MP_WriteMcuAccessRegWord(sc, 0xF946, 0xC70E);
2694         MP_WriteMcuAccessRegWord(sc, 0xF948, 0x77E0);
2695         MP_WriteMcuAccessRegWord(sc, 0xF94A, 0x49F0);
2696         MP_WriteMcuAccessRegWord(sc, 0xF94C, 0xF112);
2697         MP_WriteMcuAccessRegWord(sc, 0xF94E, 0xC70B);
2698         MP_WriteMcuAccessRegWord(sc, 0xF950, 0x77E0);
2699         MP_WriteMcuAccessRegWord(sc, 0xF952, 0x27FE);
2700         MP_WriteMcuAccessRegWord(sc, 0xF954, 0x1AFA);
2701         MP_WriteMcuAccessRegWord(sc, 0xF956, 0x4317);
2702         MP_WriteMcuAccessRegWord(sc, 0xF958, 0xC705);
2703         MP_WriteMcuAccessRegWord(sc, 0xF95A, 0x9AE2);
2704         MP_WriteMcuAccessRegWord(sc, 0xF95C, 0x1A11);
2705         MP_WriteMcuAccessRegWord(sc, 0xF95E, 0x8AE0);
2706         MP_WriteMcuAccessRegWord(sc, 0xF960, 0xE008);
2707         MP_WriteMcuAccessRegWord(sc, 0xF962, 0xE41C);
2708         MP_WriteMcuAccessRegWord(sc, 0xF964, 0xC0AE);
2709         MP_WriteMcuAccessRegWord(sc, 0xF966, 0xD23A);
2710         MP_WriteMcuAccessRegWord(sc, 0xF968, 0xC7A2);
2711         MP_WriteMcuAccessRegWord(sc, 0xF96A, 0x74E6);
2712         MP_WriteMcuAccessRegWord(sc, 0xF96C, 0x484F);
2713         MP_WriteMcuAccessRegWord(sc, 0xF96E, 0x94E7);
2714         MP_WriteMcuAccessRegWord(sc, 0xF970, 0xC79E);
2715         MP_WriteMcuAccessRegWord(sc, 0xF972, 0x8CE6);
2716         MP_WriteMcuAccessRegWord(sc, 0xF974, 0x8BEC);
2717         MP_WriteMcuAccessRegWord(sc, 0xF976, 0xC29C);
2718         MP_WriteMcuAccessRegWord(sc, 0xF978, 0x8D42);
2719         MP_WriteMcuAccessRegWord(sc, 0xF97A, 0x7220);
2720         MP_WriteMcuAccessRegWord(sc, 0xF97C, 0xB000);
2721         MP_WriteMcuAccessRegWord(sc, 0xF97E, 0xC502);
2722         MP_WriteMcuAccessRegWord(sc, 0xF980, 0xBD00);
2723         MP_WriteMcuAccessRegWord(sc, 0xF982, 0x0932);
2724         MP_WriteMcuAccessRegWord(sc, 0xF984, 0xB400);
2725         MP_WriteMcuAccessRegWord(sc, 0xF986, 0xC240);
2726         MP_WriteMcuAccessRegWord(sc, 0xF988, 0xC340);
2727         MP_WriteMcuAccessRegWord(sc, 0xF98A, 0x7060);
2728         MP_WriteMcuAccessRegWord(sc, 0xF98C, 0x498F);
2729         MP_WriteMcuAccessRegWord(sc, 0xF98E, 0xF014);
2730         MP_WriteMcuAccessRegWord(sc, 0xF990, 0x488F);
2731         MP_WriteMcuAccessRegWord(sc, 0xF992, 0x9061);
2732         MP_WriteMcuAccessRegWord(sc, 0xF994, 0x744C);
2733         MP_WriteMcuAccessRegWord(sc, 0xF996, 0x49C3);
2734         MP_WriteMcuAccessRegWord(sc, 0xF998, 0xF004);
2735         MP_WriteMcuAccessRegWord(sc, 0xF99A, 0x7562);
2736         MP_WriteMcuAccessRegWord(sc, 0xF99C, 0x485E);
2737         MP_WriteMcuAccessRegWord(sc, 0xF99E, 0x9563);
2738         MP_WriteMcuAccessRegWord(sc, 0xF9A0, 0x7446);
2739         MP_WriteMcuAccessRegWord(sc, 0xF9A2, 0x49C3);
2740         MP_WriteMcuAccessRegWord(sc, 0xF9A4, 0xF106);
2741         MP_WriteMcuAccessRegWord(sc, 0xF9A6, 0x7562);
2742         MP_WriteMcuAccessRegWord(sc, 0xF9A8, 0x1C30);
2743         MP_WriteMcuAccessRegWord(sc, 0xF9AA, 0x46E5);
2744         MP_WriteMcuAccessRegWord(sc, 0xF9AC, 0x1200);
2745         MP_WriteMcuAccessRegWord(sc, 0xF9AE, 0xF004);
2746         MP_WriteMcuAccessRegWord(sc, 0xF9B0, 0x7446);
2747         MP_WriteMcuAccessRegWord(sc, 0xF9B2, 0x484F);
2748         MP_WriteMcuAccessRegWord(sc, 0xF9B4, 0x9447);
2749         MP_WriteMcuAccessRegWord(sc, 0xF9B6, 0xC32A);
2750         MP_WriteMcuAccessRegWord(sc, 0xF9B8, 0x7466);
2751         MP_WriteMcuAccessRegWord(sc, 0xF9BA, 0x49C0);
2752         MP_WriteMcuAccessRegWord(sc, 0xF9BC, 0xF00F);
2753         MP_WriteMcuAccessRegWord(sc, 0xF9BE, 0x48C0);
2754         MP_WriteMcuAccessRegWord(sc, 0xF9C0, 0x9C66);
2755         MP_WriteMcuAccessRegWord(sc, 0xF9C2, 0x7446);
2756         MP_WriteMcuAccessRegWord(sc, 0xF9C4, 0x4840);
2757         MP_WriteMcuAccessRegWord(sc, 0xF9C6, 0x4841);
2758         MP_WriteMcuAccessRegWord(sc, 0xF9C8, 0x4842);
2759         MP_WriteMcuAccessRegWord(sc, 0xF9CA, 0x9C46);
2760         MP_WriteMcuAccessRegWord(sc, 0xF9CC, 0x744C);
2761         MP_WriteMcuAccessRegWord(sc, 0xF9CE, 0x4840);
2762         MP_WriteMcuAccessRegWord(sc, 0xF9D0, 0x9C4C);
2763         MP_WriteMcuAccessRegWord(sc, 0xF9D2, 0x744A);
2764         MP_WriteMcuAccessRegWord(sc, 0xF9D4, 0x484A);
2765         MP_WriteMcuAccessRegWord(sc, 0xF9D6, 0x9C4A);
2766         MP_WriteMcuAccessRegWord(sc, 0xF9D8, 0xE013);
2767         MP_WriteMcuAccessRegWord(sc, 0xF9DA, 0x498E);
2768         MP_WriteMcuAccessRegWord(sc, 0xF9DC, 0xF011);
2769         MP_WriteMcuAccessRegWord(sc, 0xF9DE, 0x488E);
2770         MP_WriteMcuAccessRegWord(sc, 0xF9E0, 0x9061);
2771         MP_WriteMcuAccessRegWord(sc, 0xF9E2, 0x744C);
2772         MP_WriteMcuAccessRegWord(sc, 0xF9E4, 0x49C3);
2773         MP_WriteMcuAccessRegWord(sc, 0xF9E6, 0xF004);
2774         MP_WriteMcuAccessRegWord(sc, 0xF9E8, 0x7446);
2775         MP_WriteMcuAccessRegWord(sc, 0xF9EA, 0x484E);
2776         MP_WriteMcuAccessRegWord(sc, 0xF9EC, 0x9447);
2777         MP_WriteMcuAccessRegWord(sc, 0xF9EE, 0x7446);
2778         MP_WriteMcuAccessRegWord(sc, 0xF9F0, 0x1D38);
2779         MP_WriteMcuAccessRegWord(sc, 0xF9F2, 0x46EC);
2780         MP_WriteMcuAccessRegWord(sc, 0xF9F4, 0x1500);
2781         MP_WriteMcuAccessRegWord(sc, 0xF9F6, 0xF004);
2782         MP_WriteMcuAccessRegWord(sc, 0xF9F8, 0x7446);
2783         MP_WriteMcuAccessRegWord(sc, 0xF9FA, 0x484F);
2784         MP_WriteMcuAccessRegWord(sc, 0xF9FC, 0x9447);
2785         MP_WriteMcuAccessRegWord(sc, 0xF9FE, 0xB000);
2786         MP_WriteMcuAccessRegWord(sc, 0xFA00, 0xC502);
2787         MP_WriteMcuAccessRegWord(sc, 0xFA02, 0xBD00);
2788         MP_WriteMcuAccessRegWord(sc, 0xFA04, 0x074C);
2789         MP_WriteMcuAccessRegWord(sc, 0xFA06, 0xE000);
2790         MP_WriteMcuAccessRegWord(sc, 0xFA08, 0xE0FC);
2791         MP_WriteMcuAccessRegWord(sc, 0xFA0A, 0xE0C0);
2792         MP_WriteMcuAccessRegWord(sc, 0xFA0C, 0x4830);
2793         MP_WriteMcuAccessRegWord(sc, 0xFA0E, 0x4837);
2794         MP_WriteMcuAccessRegWord(sc, 0xFA10, 0xC502);
2795         MP_WriteMcuAccessRegWord(sc, 0xFA12, 0xBD00);
2796         MP_WriteMcuAccessRegWord(sc, 0xFA14, 0x0978);
2797         MP_WriteMcuAccessRegWord(sc, 0xFA16, 0x63E2);
2798         MP_WriteMcuAccessRegWord(sc, 0xFA18, 0x4830);
2799         MP_WriteMcuAccessRegWord(sc, 0xFA1A, 0x4837);
2800         MP_WriteMcuAccessRegWord(sc, 0xFA1C, 0xC502);
2801         MP_WriteMcuAccessRegWord(sc, 0xFA1E, 0xBD00);
2802         MP_WriteMcuAccessRegWord(sc, 0xFA20, 0x09FE);
2803         MP_WriteMcuAccessRegWord(sc, 0xFA22, 0x73E2);
2804         MP_WriteMcuAccessRegWord(sc, 0xFA24, 0x4830);
2805         MP_WriteMcuAccessRegWord(sc, 0xFA26, 0x8BE2);
2806         MP_WriteMcuAccessRegWord(sc, 0xFA28, 0xC302);
2807         MP_WriteMcuAccessRegWord(sc, 0xFA2A, 0xBB00);
2808         MP_WriteMcuAccessRegWord(sc, 0xFA2C, 0x0A12);
2809         MP_WriteMcuAccessRegWord(sc, 0xFA2E, 0x73E2);
2810         MP_WriteMcuAccessRegWord(sc, 0xFA30, 0x48B0);
2811         MP_WriteMcuAccessRegWord(sc, 0xFA32, 0x48B3);
2812         MP_WriteMcuAccessRegWord(sc, 0xFA34, 0x48B4);
2813         MP_WriteMcuAccessRegWord(sc, 0xFA36, 0x48B5);
2814         MP_WriteMcuAccessRegWord(sc, 0xFA38, 0x48B6);
2815         MP_WriteMcuAccessRegWord(sc, 0xFA3A, 0x48B7);
2816         MP_WriteMcuAccessRegWord(sc, 0xFA3C, 0x8BE2);
2817         MP_WriteMcuAccessRegWord(sc, 0xFA3E, 0xC302);
2818         MP_WriteMcuAccessRegWord(sc, 0xFA40, 0xBB00);
2819         MP_WriteMcuAccessRegWord(sc, 0xFA42, 0x0A5A);
2820         MP_WriteMcuAccessRegWord(sc, 0xFA44, 0x73E2);
2821         MP_WriteMcuAccessRegWord(sc, 0xFA46, 0x4830);
2822         MP_WriteMcuAccessRegWord(sc, 0xFA48, 0x8BE2);
2823         MP_WriteMcuAccessRegWord(sc, 0xFA4A, 0xC302);
2824         MP_WriteMcuAccessRegWord(sc, 0xFA4C, 0xBB00);
2825         MP_WriteMcuAccessRegWord(sc, 0xFA4E, 0x0A6C);
2826         MP_WriteMcuAccessRegWord(sc, 0xFA50, 0x73E2);
2827         MP_WriteMcuAccessRegWord(sc, 0xFA52, 0x4830);
2828         MP_WriteMcuAccessRegWord(sc, 0xFA54, 0x4837);
2829         MP_WriteMcuAccessRegWord(sc, 0xFA56, 0xC502);
2830         MP_WriteMcuAccessRegWord(sc, 0xFA58, 0xBD00);
2831         MP_WriteMcuAccessRegWord(sc, 0xFA5A, 0x0A86);
2832 
2833         MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
2834 
2835         MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x0890);
2836         MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x0712);
2837         MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x0974);
2838         MP_WriteMcuAccessRegWord(sc, 0xFC2E, 0x09FC);
2839         MP_WriteMcuAccessRegWord(sc, 0xFC30, 0x0A0E);
2840         MP_WriteMcuAccessRegWord(sc, 0xFC32, 0x0A56);
2841         MP_WriteMcuAccessRegWord(sc, 0xFC34, 0x0A68);
2842         MP_WriteMcuAccessRegWord(sc, 0xFC36, 0x0A84);
2843 
2844         if (sc->HwPkgDet == 0x0)
2845                 MP_WriteMcuAccessRegWord(sc, 0xFC38, 0x00FC);
2846         else if(sc->HwPkgDet == 0xF)
2847                 MP_WriteMcuAccessRegWord(sc, 0xFC38, 0x00FF);
2848 }
2849 
2850 static void re_set_mac_mcu_8168fp_2(struct re_softc *sc)
2851 {
2852         DisableMcuBPs(sc);
2853 
2854         MP_WriteMcuAccessRegWord(sc, 0xF800, 0xE008);
2855         MP_WriteMcuAccessRegWord(sc, 0xF802, 0xE00A);
2856         MP_WriteMcuAccessRegWord(sc, 0xF804, 0xE031);
2857         MP_WriteMcuAccessRegWord(sc, 0xF806, 0xE033);
2858         MP_WriteMcuAccessRegWord(sc, 0xF808, 0xE035);
2859         MP_WriteMcuAccessRegWord(sc, 0xF80A, 0xE144);
2860         MP_WriteMcuAccessRegWord(sc, 0xF80C, 0xE166);
2861         MP_WriteMcuAccessRegWord(sc, 0xF80E, 0xE168);
2862         MP_WriteMcuAccessRegWord(sc, 0xF810, 0xC502);
2863         MP_WriteMcuAccessRegWord(sc, 0xF812, 0xBD00);
2864         MP_WriteMcuAccessRegWord(sc, 0xF814, 0x0000);
2865         MP_WriteMcuAccessRegWord(sc, 0xF816, 0xC725);
2866         MP_WriteMcuAccessRegWord(sc, 0xF818, 0x75E0);
2867         MP_WriteMcuAccessRegWord(sc, 0xF81A, 0x48D0);
2868         MP_WriteMcuAccessRegWord(sc, 0xF81C, 0x9DE0);
2869         MP_WriteMcuAccessRegWord(sc, 0xF81E, 0xC722);
2870         MP_WriteMcuAccessRegWord(sc, 0xF820, 0x75E0);
2871         MP_WriteMcuAccessRegWord(sc, 0xF822, 0x1C78);
2872         MP_WriteMcuAccessRegWord(sc, 0xF824, 0x416C);
2873         MP_WriteMcuAccessRegWord(sc, 0xF826, 0x1530);
2874         MP_WriteMcuAccessRegWord(sc, 0xF828, 0xF111);
2875         MP_WriteMcuAccessRegWord(sc, 0xF82A, 0xC71D);
2876         MP_WriteMcuAccessRegWord(sc, 0xF82C, 0x75F6);
2877         MP_WriteMcuAccessRegWord(sc, 0xF82E, 0x49D1);
2878         MP_WriteMcuAccessRegWord(sc, 0xF830, 0xF00D);
2879         MP_WriteMcuAccessRegWord(sc, 0xF832, 0x75E0);
2880         MP_WriteMcuAccessRegWord(sc, 0xF834, 0x1C1F);
2881         MP_WriteMcuAccessRegWord(sc, 0xF836, 0x416C);
2882         MP_WriteMcuAccessRegWord(sc, 0xF838, 0x1502);
2883         MP_WriteMcuAccessRegWord(sc, 0xF83A, 0xF108);
2884         MP_WriteMcuAccessRegWord(sc, 0xF83C, 0x75FA);
2885         MP_WriteMcuAccessRegWord(sc, 0xF83E, 0x49D3);
2886         MP_WriteMcuAccessRegWord(sc, 0xF840, 0xF005);
2887         MP_WriteMcuAccessRegWord(sc, 0xF842, 0x75EC);
2888         MP_WriteMcuAccessRegWord(sc, 0xF844, 0x9DE4);
2889         MP_WriteMcuAccessRegWord(sc, 0xF846, 0x4853);
2890         MP_WriteMcuAccessRegWord(sc, 0xF848, 0x9DFA);
2891         MP_WriteMcuAccessRegWord(sc, 0xF84A, 0xC70B);
2892         MP_WriteMcuAccessRegWord(sc, 0xF84C, 0x75E0);
2893         MP_WriteMcuAccessRegWord(sc, 0xF84E, 0x4852);
2894         MP_WriteMcuAccessRegWord(sc, 0xF850, 0x4850);
2895         MP_WriteMcuAccessRegWord(sc, 0xF852, 0x9DE0);
2896         MP_WriteMcuAccessRegWord(sc, 0xF854, 0xC602);
2897         MP_WriteMcuAccessRegWord(sc, 0xF856, 0xBE00);
2898         MP_WriteMcuAccessRegWord(sc, 0xF858, 0x04B8);
2899         MP_WriteMcuAccessRegWord(sc, 0xF85A, 0xE420);
2900         MP_WriteMcuAccessRegWord(sc, 0xF85C, 0xE000);
2901         MP_WriteMcuAccessRegWord(sc, 0xF85E, 0xE0FC);
2902         MP_WriteMcuAccessRegWord(sc, 0xF860, 0xE43C);
2903         MP_WriteMcuAccessRegWord(sc, 0xF862, 0xDC00);
2904         MP_WriteMcuAccessRegWord(sc, 0xF864, 0xEB00);
2905         MP_WriteMcuAccessRegWord(sc, 0xF866, 0xC202);
2906         MP_WriteMcuAccessRegWord(sc, 0xF868, 0xBA00);
2907         MP_WriteMcuAccessRegWord(sc, 0xF86A, 0x0000);
2908         MP_WriteMcuAccessRegWord(sc, 0xF86C, 0xC002);
2909         MP_WriteMcuAccessRegWord(sc, 0xF86E, 0xB800);
2910         MP_WriteMcuAccessRegWord(sc, 0xF870, 0x0000);
2911         MP_WriteMcuAccessRegWord(sc, 0xF872, 0xB401);
2912         MP_WriteMcuAccessRegWord(sc, 0xF874, 0xB402);
2913         MP_WriteMcuAccessRegWord(sc, 0xF876, 0xB403);
2914         MP_WriteMcuAccessRegWord(sc, 0xF878, 0xB404);
2915         MP_WriteMcuAccessRegWord(sc, 0xF87A, 0xB405);
2916         MP_WriteMcuAccessRegWord(sc, 0xF87C, 0xB406);
2917         MP_WriteMcuAccessRegWord(sc, 0xF87E, 0xC44D);
2918         MP_WriteMcuAccessRegWord(sc, 0xF880, 0xC54D);
2919         MP_WriteMcuAccessRegWord(sc, 0xF882, 0x1867);
2920         MP_WriteMcuAccessRegWord(sc, 0xF884, 0xE8A2);
2921         MP_WriteMcuAccessRegWord(sc, 0xF886, 0x2318);
2922         MP_WriteMcuAccessRegWord(sc, 0xF888, 0x276E);
2923         MP_WriteMcuAccessRegWord(sc, 0xF88A, 0x1601);
2924         MP_WriteMcuAccessRegWord(sc, 0xF88C, 0xF106);
2925         MP_WriteMcuAccessRegWord(sc, 0xF88E, 0x1A07);
2926         MP_WriteMcuAccessRegWord(sc, 0xF890, 0xE861);
2927         MP_WriteMcuAccessRegWord(sc, 0xF892, 0xE86B);
2928         MP_WriteMcuAccessRegWord(sc, 0xF894, 0xE873);
2929         MP_WriteMcuAccessRegWord(sc, 0xF896, 0xE037);
2930         MP_WriteMcuAccessRegWord(sc, 0xF898, 0x231E);
2931         MP_WriteMcuAccessRegWord(sc, 0xF89A, 0x276E);
2932         MP_WriteMcuAccessRegWord(sc, 0xF89C, 0x1602);
2933         MP_WriteMcuAccessRegWord(sc, 0xF89E, 0xF10B);
2934         MP_WriteMcuAccessRegWord(sc, 0xF8A0, 0x1A07);
2935         MP_WriteMcuAccessRegWord(sc, 0xF8A2, 0xE858);
2936         MP_WriteMcuAccessRegWord(sc, 0xF8A4, 0xE862);
2937         MP_WriteMcuAccessRegWord(sc, 0xF8A6, 0xC247);
2938         MP_WriteMcuAccessRegWord(sc, 0xF8A8, 0xC344);
2939         MP_WriteMcuAccessRegWord(sc, 0xF8AA, 0xE8E3);
2940         MP_WriteMcuAccessRegWord(sc, 0xF8AC, 0xC73B);
2941         MP_WriteMcuAccessRegWord(sc, 0xF8AE, 0x66E0);
2942         MP_WriteMcuAccessRegWord(sc, 0xF8B0, 0xE8B5);
2943         MP_WriteMcuAccessRegWord(sc, 0xF8B2, 0xE029);
2944         MP_WriteMcuAccessRegWord(sc, 0xF8B4, 0x231A);
2945         MP_WriteMcuAccessRegWord(sc, 0xF8B6, 0x276C);
2946         MP_WriteMcuAccessRegWord(sc, 0xF8B8, 0xC733);
2947         MP_WriteMcuAccessRegWord(sc, 0xF8BA, 0x9EE0);
2948         MP_WriteMcuAccessRegWord(sc, 0xF8BC, 0x1866);
2949         MP_WriteMcuAccessRegWord(sc, 0xF8BE, 0xE885);
2950         MP_WriteMcuAccessRegWord(sc, 0xF8C0, 0x251C);
2951         MP_WriteMcuAccessRegWord(sc, 0xF8C2, 0x120F);
2952         MP_WriteMcuAccessRegWord(sc, 0xF8C4, 0xF011);
2953         MP_WriteMcuAccessRegWord(sc, 0xF8C6, 0x1209);
2954         MP_WriteMcuAccessRegWord(sc, 0xF8C8, 0xF011);
2955         MP_WriteMcuAccessRegWord(sc, 0xF8CA, 0x2014);
2956         MP_WriteMcuAccessRegWord(sc, 0xF8CC, 0x240E);
2957         MP_WriteMcuAccessRegWord(sc, 0xF8CE, 0x1000);
2958         MP_WriteMcuAccessRegWord(sc, 0xF8D0, 0xF007);
2959         MP_WriteMcuAccessRegWord(sc, 0xF8D2, 0x120C);
2960         MP_WriteMcuAccessRegWord(sc, 0xF8D4, 0xF00D);
2961         MP_WriteMcuAccessRegWord(sc, 0xF8D6, 0x1203);
2962         MP_WriteMcuAccessRegWord(sc, 0xF8D8, 0xF00D);
2963         MP_WriteMcuAccessRegWord(sc, 0xF8DA, 0x1200);
2964         MP_WriteMcuAccessRegWord(sc, 0xF8DC, 0xF00D);
2965         MP_WriteMcuAccessRegWord(sc, 0xF8DE, 0x120C);
2966         MP_WriteMcuAccessRegWord(sc, 0xF8E0, 0xF00D);
2967         MP_WriteMcuAccessRegWord(sc, 0xF8E2, 0x1203);
2968         MP_WriteMcuAccessRegWord(sc, 0xF8E4, 0xF00D);
2969         MP_WriteMcuAccessRegWord(sc, 0xF8E6, 0x1A03);
2970         MP_WriteMcuAccessRegWord(sc, 0xF8E8, 0xE00C);
2971         MP_WriteMcuAccessRegWord(sc, 0xF8EA, 0x1A07);
2972         MP_WriteMcuAccessRegWord(sc, 0xF8EC, 0xE00A);
2973         MP_WriteMcuAccessRegWord(sc, 0xF8EE, 0x1A00);
2974         MP_WriteMcuAccessRegWord(sc, 0xF8F0, 0xE008);
2975         MP_WriteMcuAccessRegWord(sc, 0xF8F2, 0x1A01);
2976         MP_WriteMcuAccessRegWord(sc, 0xF8F4, 0xE006);
2977         MP_WriteMcuAccessRegWord(sc, 0xF8F6, 0x1A02);
2978         MP_WriteMcuAccessRegWord(sc, 0xF8F8, 0xE004);
2979         MP_WriteMcuAccessRegWord(sc, 0xF8FA, 0x1A04);
2980         MP_WriteMcuAccessRegWord(sc, 0xF8FC, 0xE002);
2981         MP_WriteMcuAccessRegWord(sc, 0xF8FE, 0x1A05);
2982         MP_WriteMcuAccessRegWord(sc, 0xF900, 0xE829);
2983         MP_WriteMcuAccessRegWord(sc, 0xF902, 0xE833);
2984         MP_WriteMcuAccessRegWord(sc, 0xF904, 0xB006);
2985         MP_WriteMcuAccessRegWord(sc, 0xF906, 0xB005);
2986         MP_WriteMcuAccessRegWord(sc, 0xF908, 0xB004);
2987         MP_WriteMcuAccessRegWord(sc, 0xF90A, 0xB003);
2988         MP_WriteMcuAccessRegWord(sc, 0xF90C, 0xB002);
2989         MP_WriteMcuAccessRegWord(sc, 0xF90E, 0xB001);
2990         MP_WriteMcuAccessRegWord(sc, 0xF910, 0x60C4);
2991         MP_WriteMcuAccessRegWord(sc, 0xF912, 0xC702);
2992         MP_WriteMcuAccessRegWord(sc, 0xF914, 0xBF00);
2993         MP_WriteMcuAccessRegWord(sc, 0xF916, 0x2786);
2994         MP_WriteMcuAccessRegWord(sc, 0xF918, 0xDD00);
2995         MP_WriteMcuAccessRegWord(sc, 0xF91A, 0xD030);
2996         MP_WriteMcuAccessRegWord(sc, 0xF91C, 0xE0C4);
2997         MP_WriteMcuAccessRegWord(sc, 0xF91E, 0xE0F8);
2998         MP_WriteMcuAccessRegWord(sc, 0xF920, 0xDC42);
2999         MP_WriteMcuAccessRegWord(sc, 0xF922, 0xD3F0);
3000         MP_WriteMcuAccessRegWord(sc, 0xF924, 0x0000);
3001         MP_WriteMcuAccessRegWord(sc, 0xF926, 0x0004);
3002         MP_WriteMcuAccessRegWord(sc, 0xF928, 0x0007);
3003         MP_WriteMcuAccessRegWord(sc, 0xF92A, 0x0014);
3004         MP_WriteMcuAccessRegWord(sc, 0xF92C, 0x0090);
3005         MP_WriteMcuAccessRegWord(sc, 0xF92E, 0x1000);
3006         MP_WriteMcuAccessRegWord(sc, 0xF930, 0x0F00);
3007         MP_WriteMcuAccessRegWord(sc, 0xF932, 0x1004);
3008         MP_WriteMcuAccessRegWord(sc, 0xF934, 0x1008);
3009         MP_WriteMcuAccessRegWord(sc, 0xF936, 0x3000);
3010         MP_WriteMcuAccessRegWord(sc, 0xF938, 0x3004);
3011         MP_WriteMcuAccessRegWord(sc, 0xF93A, 0x3008);
3012         MP_WriteMcuAccessRegWord(sc, 0xF93C, 0x4000);
3013         MP_WriteMcuAccessRegWord(sc, 0xF93E, 0x7777);
3014         MP_WriteMcuAccessRegWord(sc, 0xF940, 0x8000);
3015         MP_WriteMcuAccessRegWord(sc, 0xF942, 0x8001);
3016         MP_WriteMcuAccessRegWord(sc, 0xF944, 0x8008);
3017         MP_WriteMcuAccessRegWord(sc, 0xF946, 0x8003);
3018         MP_WriteMcuAccessRegWord(sc, 0xF948, 0x8004);
3019         MP_WriteMcuAccessRegWord(sc, 0xF94A, 0xC000);
3020         MP_WriteMcuAccessRegWord(sc, 0xF94C, 0xC004);
3021         MP_WriteMcuAccessRegWord(sc, 0xF94E, 0xF004);
3022         MP_WriteMcuAccessRegWord(sc, 0xF950, 0xFFFF);
3023         MP_WriteMcuAccessRegWord(sc, 0xF952, 0xB406);
3024         MP_WriteMcuAccessRegWord(sc, 0xF954, 0xB407);
3025         MP_WriteMcuAccessRegWord(sc, 0xF956, 0xC6E5);
3026         MP_WriteMcuAccessRegWord(sc, 0xF958, 0x77C0);
3027         MP_WriteMcuAccessRegWord(sc, 0xF95A, 0x27F3);
3028         MP_WriteMcuAccessRegWord(sc, 0xF95C, 0x23F3);
3029         MP_WriteMcuAccessRegWord(sc, 0xF95E, 0x47FA);
3030         MP_WriteMcuAccessRegWord(sc, 0xF960, 0x9FC0);
3031         MP_WriteMcuAccessRegWord(sc, 0xF962, 0xB007);
3032         MP_WriteMcuAccessRegWord(sc, 0xF964, 0xB006);
3033         MP_WriteMcuAccessRegWord(sc, 0xF966, 0xFF80);
3034         MP_WriteMcuAccessRegWord(sc, 0xF968, 0xB405);
3035         MP_WriteMcuAccessRegWord(sc, 0xF96A, 0xB407);
3036         MP_WriteMcuAccessRegWord(sc, 0xF96C, 0xC7D8);
3037         MP_WriteMcuAccessRegWord(sc, 0xF96E, 0x75E0);
3038         MP_WriteMcuAccessRegWord(sc, 0xF970, 0x48D0);
3039         MP_WriteMcuAccessRegWord(sc, 0xF972, 0x9DE0);
3040         MP_WriteMcuAccessRegWord(sc, 0xF974, 0xB007);
3041         MP_WriteMcuAccessRegWord(sc, 0xF976, 0xB005);
3042         MP_WriteMcuAccessRegWord(sc, 0xF978, 0xFF80);
3043         MP_WriteMcuAccessRegWord(sc, 0xF97A, 0xB401);
3044         MP_WriteMcuAccessRegWord(sc, 0xF97C, 0xC0EA);
3045         MP_WriteMcuAccessRegWord(sc, 0xF97E, 0xC2DC);
3046         MP_WriteMcuAccessRegWord(sc, 0xF980, 0xC3D8);
3047         MP_WriteMcuAccessRegWord(sc, 0xF982, 0xE865);
3048         MP_WriteMcuAccessRegWord(sc, 0xF984, 0xC0D3);
3049         MP_WriteMcuAccessRegWord(sc, 0xF986, 0xC1E0);
3050         MP_WriteMcuAccessRegWord(sc, 0xF988, 0xC2E3);
3051         MP_WriteMcuAccessRegWord(sc, 0xF98A, 0xE861);
3052         MP_WriteMcuAccessRegWord(sc, 0xF98C, 0xE817);
3053         MP_WriteMcuAccessRegWord(sc, 0xF98E, 0xC0CD);
3054         MP_WriteMcuAccessRegWord(sc, 0xF990, 0xC2CF);
3055         MP_WriteMcuAccessRegWord(sc, 0xF992, 0xE85D);
3056         MP_WriteMcuAccessRegWord(sc, 0xF994, 0xC0C9);
3057         MP_WriteMcuAccessRegWord(sc, 0xF996, 0xC1D6);
3058         MP_WriteMcuAccessRegWord(sc, 0xF998, 0xC2DB);
3059         MP_WriteMcuAccessRegWord(sc, 0xF99A, 0xE859);
3060         MP_WriteMcuAccessRegWord(sc, 0xF99C, 0xE80F);
3061         MP_WriteMcuAccessRegWord(sc, 0xF99E, 0xC1C7);
3062         MP_WriteMcuAccessRegWord(sc, 0xF9A0, 0xC2CE);
3063         MP_WriteMcuAccessRegWord(sc, 0xF9A2, 0xE855);
3064         MP_WriteMcuAccessRegWord(sc, 0xF9A4, 0xC0C0);
3065         MP_WriteMcuAccessRegWord(sc, 0xF9A6, 0xC1D1);
3066         MP_WriteMcuAccessRegWord(sc, 0xF9A8, 0xC2D3);
3067         MP_WriteMcuAccessRegWord(sc, 0xF9AA, 0xE851);
3068         MP_WriteMcuAccessRegWord(sc, 0xF9AC, 0xE807);
3069         MP_WriteMcuAccessRegWord(sc, 0xF9AE, 0xC0BE);
3070         MP_WriteMcuAccessRegWord(sc, 0xF9B0, 0xC2C2);
3071         MP_WriteMcuAccessRegWord(sc, 0xF9B2, 0xE84D);
3072         MP_WriteMcuAccessRegWord(sc, 0xF9B4, 0xE803);
3073         MP_WriteMcuAccessRegWord(sc, 0xF9B6, 0xB001);
3074         MP_WriteMcuAccessRegWord(sc, 0xF9B8, 0xFF80);
3075         MP_WriteMcuAccessRegWord(sc, 0xF9BA, 0xB402);
3076         MP_WriteMcuAccessRegWord(sc, 0xF9BC, 0xC2C6);
3077         MP_WriteMcuAccessRegWord(sc, 0xF9BE, 0xE859);
3078         MP_WriteMcuAccessRegWord(sc, 0xF9C0, 0x499F);
3079         MP_WriteMcuAccessRegWord(sc, 0xF9C2, 0xF1FE);
3080         MP_WriteMcuAccessRegWord(sc, 0xF9C4, 0xB002);
3081         MP_WriteMcuAccessRegWord(sc, 0xF9C6, 0xFF80);
3082         MP_WriteMcuAccessRegWord(sc, 0xF9C8, 0xB402);
3083         MP_WriteMcuAccessRegWord(sc, 0xF9CA, 0xB403);
3084         MP_WriteMcuAccessRegWord(sc, 0xF9CC, 0xB407);
3085         MP_WriteMcuAccessRegWord(sc, 0xF9CE, 0xE821);
3086         MP_WriteMcuAccessRegWord(sc, 0xF9D0, 0x8882);
3087         MP_WriteMcuAccessRegWord(sc, 0xF9D2, 0x1980);
3088         MP_WriteMcuAccessRegWord(sc, 0xF9D4, 0x8983);
3089         MP_WriteMcuAccessRegWord(sc, 0xF9D6, 0xE81D);
3090         MP_WriteMcuAccessRegWord(sc, 0xF9D8, 0x7180);
3091         MP_WriteMcuAccessRegWord(sc, 0xF9DA, 0x218B);
3092         MP_WriteMcuAccessRegWord(sc, 0xF9DC, 0x25BB);
3093         MP_WriteMcuAccessRegWord(sc, 0xF9DE, 0x1310);
3094         MP_WriteMcuAccessRegWord(sc, 0xF9E0, 0xF014);
3095         MP_WriteMcuAccessRegWord(sc, 0xF9E2, 0x1310);
3096         MP_WriteMcuAccessRegWord(sc, 0xF9E4, 0xFB03);
3097         MP_WriteMcuAccessRegWord(sc, 0xF9E6, 0x1F20);
3098         MP_WriteMcuAccessRegWord(sc, 0xF9E8, 0x38FB);
3099         MP_WriteMcuAccessRegWord(sc, 0xF9EA, 0x3288);
3100         MP_WriteMcuAccessRegWord(sc, 0xF9EC, 0x434B);
3101         MP_WriteMcuAccessRegWord(sc, 0xF9EE, 0x2491);
3102         MP_WriteMcuAccessRegWord(sc, 0xF9F0, 0x430B);
3103         MP_WriteMcuAccessRegWord(sc, 0xF9F2, 0x1F0F);
3104         MP_WriteMcuAccessRegWord(sc, 0xF9F4, 0x38FB);
3105         MP_WriteMcuAccessRegWord(sc, 0xF9F6, 0x4313);
3106         MP_WriteMcuAccessRegWord(sc, 0xF9F8, 0x2121);
3107         MP_WriteMcuAccessRegWord(sc, 0xF9FA, 0x4353);
3108         MP_WriteMcuAccessRegWord(sc, 0xF9FC, 0x2521);
3109         MP_WriteMcuAccessRegWord(sc, 0xF9FE, 0x418A);
3110         MP_WriteMcuAccessRegWord(sc, 0xFA00, 0x6282);
3111         MP_WriteMcuAccessRegWord(sc, 0xFA02, 0x2527);
3112         MP_WriteMcuAccessRegWord(sc, 0xFA04, 0x212F);
3113         MP_WriteMcuAccessRegWord(sc, 0xFA06, 0x418A);
3114         MP_WriteMcuAccessRegWord(sc, 0xFA08, 0xB007);
3115         MP_WriteMcuAccessRegWord(sc, 0xFA0A, 0xB003);
3116         MP_WriteMcuAccessRegWord(sc, 0xFA0C, 0xB002);
3117         MP_WriteMcuAccessRegWord(sc, 0xFA0E, 0xFF80);
3118         MP_WriteMcuAccessRegWord(sc, 0xFA10, 0x6183);
3119         MP_WriteMcuAccessRegWord(sc, 0xFA12, 0x2496);
3120         MP_WriteMcuAccessRegWord(sc, 0xFA14, 0x1100);
3121         MP_WriteMcuAccessRegWord(sc, 0xFA16, 0xF1FD);
3122         MP_WriteMcuAccessRegWord(sc, 0xFA18, 0xFF80);
3123         MP_WriteMcuAccessRegWord(sc, 0xFA1A, 0x4800);
3124         MP_WriteMcuAccessRegWord(sc, 0xFA1C, 0x4801);
3125         MP_WriteMcuAccessRegWord(sc, 0xFA1E, 0xC213);
3126         MP_WriteMcuAccessRegWord(sc, 0xFA20, 0xC313);
3127         MP_WriteMcuAccessRegWord(sc, 0xFA22, 0xE815);
3128         MP_WriteMcuAccessRegWord(sc, 0xFA24, 0x4860);
3129         MP_WriteMcuAccessRegWord(sc, 0xFA26, 0x8EE0);
3130         MP_WriteMcuAccessRegWord(sc, 0xFA28, 0xC210);
3131         MP_WriteMcuAccessRegWord(sc, 0xFA2A, 0xC310);
3132         MP_WriteMcuAccessRegWord(sc, 0xFA2C, 0xE822);
3133         MP_WriteMcuAccessRegWord(sc, 0xFA2E, 0x481E);
3134         MP_WriteMcuAccessRegWord(sc, 0xFA30, 0xC20C);
3135         MP_WriteMcuAccessRegWord(sc, 0xFA32, 0xC30C);
3136         MP_WriteMcuAccessRegWord(sc, 0xFA34, 0xE80C);
3137         MP_WriteMcuAccessRegWord(sc, 0xFA36, 0xC206);
3138         MP_WriteMcuAccessRegWord(sc, 0xFA38, 0x7358);
3139         MP_WriteMcuAccessRegWord(sc, 0xFA3A, 0x483A);
3140         MP_WriteMcuAccessRegWord(sc, 0xFA3C, 0x9B58);
3141         MP_WriteMcuAccessRegWord(sc, 0xFA3E, 0xFF80);
3142         MP_WriteMcuAccessRegWord(sc, 0xFA40, 0xE8E0);
3143         MP_WriteMcuAccessRegWord(sc, 0xFA42, 0xE000);
3144         MP_WriteMcuAccessRegWord(sc, 0xFA44, 0x1008);
3145         MP_WriteMcuAccessRegWord(sc, 0xFA46, 0x0F00);
3146         MP_WriteMcuAccessRegWord(sc, 0xFA48, 0x800C);
3147         MP_WriteMcuAccessRegWord(sc, 0xFA4A, 0x0F00);
3148         MP_WriteMcuAccessRegWord(sc, 0xFA4C, 0xB407);
3149         MP_WriteMcuAccessRegWord(sc, 0xFA4E, 0xB406);
3150         MP_WriteMcuAccessRegWord(sc, 0xFA50, 0xB403);
3151         MP_WriteMcuAccessRegWord(sc, 0xFA52, 0xC7F7);
3152         MP_WriteMcuAccessRegWord(sc, 0xFA54, 0x98E0);
3153         MP_WriteMcuAccessRegWord(sc, 0xFA56, 0x99E2);
3154         MP_WriteMcuAccessRegWord(sc, 0xFA58, 0x9AE4);
3155         MP_WriteMcuAccessRegWord(sc, 0xFA5A, 0x21B2);
3156         MP_WriteMcuAccessRegWord(sc, 0xFA5C, 0x4831);
3157         MP_WriteMcuAccessRegWord(sc, 0xFA5E, 0x483F);
3158         MP_WriteMcuAccessRegWord(sc, 0xFA60, 0x9BE6);
3159         MP_WriteMcuAccessRegWord(sc, 0xFA62, 0x66E7);
3160         MP_WriteMcuAccessRegWord(sc, 0xFA64, 0x49E6);
3161         MP_WriteMcuAccessRegWord(sc, 0xFA66, 0xF1FE);
3162         MP_WriteMcuAccessRegWord(sc, 0xFA68, 0xB003);
3163         MP_WriteMcuAccessRegWord(sc, 0xFA6A, 0xB006);
3164         MP_WriteMcuAccessRegWord(sc, 0xFA6C, 0xB007);
3165         MP_WriteMcuAccessRegWord(sc, 0xFA6E, 0xFF80);
3166         MP_WriteMcuAccessRegWord(sc, 0xFA70, 0xB407);
3167         MP_WriteMcuAccessRegWord(sc, 0xFA72, 0xB406);
3168         MP_WriteMcuAccessRegWord(sc, 0xFA74, 0xB403);
3169         MP_WriteMcuAccessRegWord(sc, 0xFA76, 0xC7E5);
3170         MP_WriteMcuAccessRegWord(sc, 0xFA78, 0x9AE4);
3171         MP_WriteMcuAccessRegWord(sc, 0xFA7A, 0x21B2);
3172         MP_WriteMcuAccessRegWord(sc, 0xFA7C, 0x4831);
3173         MP_WriteMcuAccessRegWord(sc, 0xFA7E, 0x9BE6);
3174         MP_WriteMcuAccessRegWord(sc, 0xFA80, 0x66E7);
3175         MP_WriteMcuAccessRegWord(sc, 0xFA82, 0x49E6);
3176         MP_WriteMcuAccessRegWord(sc, 0xFA84, 0xF1FE);
3177         MP_WriteMcuAccessRegWord(sc, 0xFA86, 0x70E0);
3178         MP_WriteMcuAccessRegWord(sc, 0xFA88, 0x71E2);
3179         MP_WriteMcuAccessRegWord(sc, 0xFA8A, 0xB003);
3180         MP_WriteMcuAccessRegWord(sc, 0xFA8C, 0xB006);
3181         MP_WriteMcuAccessRegWord(sc, 0xFA8E, 0xB007);
3182         MP_WriteMcuAccessRegWord(sc, 0xFA90, 0xFF80);
3183         MP_WriteMcuAccessRegWord(sc, 0xFA92, 0x4882);
3184         MP_WriteMcuAccessRegWord(sc, 0xFA94, 0xB406);
3185         MP_WriteMcuAccessRegWord(sc, 0xFA96, 0xB405);
3186         MP_WriteMcuAccessRegWord(sc, 0xFA98, 0xC71E);
3187         MP_WriteMcuAccessRegWord(sc, 0xFA9A, 0x76E0);
3188         MP_WriteMcuAccessRegWord(sc, 0xFA9C, 0x1D78);
3189         MP_WriteMcuAccessRegWord(sc, 0xFA9E, 0x4175);
3190         MP_WriteMcuAccessRegWord(sc, 0xFAA0, 0x1630);
3191         MP_WriteMcuAccessRegWord(sc, 0xFAA2, 0xF10C);
3192         MP_WriteMcuAccessRegWord(sc, 0xFAA4, 0xC715);
3193         MP_WriteMcuAccessRegWord(sc, 0xFAA6, 0x76E0);
3194         MP_WriteMcuAccessRegWord(sc, 0xFAA8, 0x4861);
3195         MP_WriteMcuAccessRegWord(sc, 0xFAAA, 0x9EE0);
3196         MP_WriteMcuAccessRegWord(sc, 0xFAAC, 0xC713);
3197         MP_WriteMcuAccessRegWord(sc, 0xFAAE, 0x1EFF);
3198         MP_WriteMcuAccessRegWord(sc, 0xFAB0, 0x9EE2);
3199         MP_WriteMcuAccessRegWord(sc, 0xFAB2, 0x75E0);
3200         MP_WriteMcuAccessRegWord(sc, 0xFAB4, 0x4850);
3201         MP_WriteMcuAccessRegWord(sc, 0xFAB6, 0x9DE0);
3202         MP_WriteMcuAccessRegWord(sc, 0xFAB8, 0xE005);
3203         MP_WriteMcuAccessRegWord(sc, 0xFABA, 0xC70B);
3204         MP_WriteMcuAccessRegWord(sc, 0xFABC, 0x76E0);
3205         MP_WriteMcuAccessRegWord(sc, 0xFABE, 0x4865);
3206         MP_WriteMcuAccessRegWord(sc, 0xFAC0, 0x9EE0);
3207         MP_WriteMcuAccessRegWord(sc, 0xFAC2, 0xB005);
3208         MP_WriteMcuAccessRegWord(sc, 0xFAC4, 0xB006);
3209         MP_WriteMcuAccessRegWord(sc, 0xFAC6, 0xC708);
3210         MP_WriteMcuAccessRegWord(sc, 0xFAC8, 0xC102);
3211         MP_WriteMcuAccessRegWord(sc, 0xFACA, 0xB900);
3212         MP_WriteMcuAccessRegWord(sc, 0xFACC, 0x279E);
3213         MP_WriteMcuAccessRegWord(sc, 0xFACE, 0xEB16);
3214         MP_WriteMcuAccessRegWord(sc, 0xFAD0, 0xEB00);
3215         MP_WriteMcuAccessRegWord(sc, 0xFAD2, 0xE43C);
3216         MP_WriteMcuAccessRegWord(sc, 0xFAD4, 0xDC00);
3217         MP_WriteMcuAccessRegWord(sc, 0xFAD6, 0xD3EC);
3218         MP_WriteMcuAccessRegWord(sc, 0xFAD8, 0xC602);
3219         MP_WriteMcuAccessRegWord(sc, 0xFADA, 0xBE00);
3220         MP_WriteMcuAccessRegWord(sc, 0xFADC, 0x0000);
3221         MP_WriteMcuAccessRegWord(sc, 0xFADE, 0xC602);
3222         MP_WriteMcuAccessRegWord(sc, 0xFAE0, 0xBE00);
3223         MP_WriteMcuAccessRegWord(sc, 0xFAE2, 0x0000);
3224 
3225         MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
3226 
3227         MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x0000);
3228         MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x04B4);
3229         MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x0000);
3230         MP_WriteMcuAccessRegWord(sc, 0xFC2E, 0x0000);
3231         MP_WriteMcuAccessRegWord(sc, 0xFC30, 0x0000);
3232         MP_WriteMcuAccessRegWord(sc, 0xFC32, 0x279C);
3233         MP_WriteMcuAccessRegWord(sc, 0xFC34, 0x0000);
3234         MP_WriteMcuAccessRegWord(sc, 0xFC36, 0x0000);
3235 
3236         MP_WriteMcuAccessRegWord(sc, 0xFC38, 0x0022);
3237 }
3238 
3239 static void re_set_mac_mcu_8168fp_3(struct re_softc *sc)
3240 {
3241         DisableMcuBPs(sc);
3242 
3243         MP_WriteMcuAccessRegWord(sc, 0xF800, 0xE008);
3244         MP_WriteMcuAccessRegWord(sc, 0xF802, 0xE00A);
3245         MP_WriteMcuAccessRegWord(sc, 0xF804, 0xE00F);
3246         MP_WriteMcuAccessRegWord(sc, 0xF806, 0xE014);
3247         MP_WriteMcuAccessRegWord(sc, 0xF808, 0xE016);
3248         MP_WriteMcuAccessRegWord(sc, 0xF80A, 0xE018);
3249         MP_WriteMcuAccessRegWord(sc, 0xF80C, 0xE01A);
3250         MP_WriteMcuAccessRegWord(sc, 0xF80E, 0xE01C);
3251         MP_WriteMcuAccessRegWord(sc, 0xF810, 0xC602);
3252         MP_WriteMcuAccessRegWord(sc, 0xF812, 0xBE00);
3253         MP_WriteMcuAccessRegWord(sc, 0xF814, 0x2AB2);
3254         MP_WriteMcuAccessRegWord(sc, 0xF816, 0x1BC0);
3255         MP_WriteMcuAccessRegWord(sc, 0xF818, 0x46EB);
3256         MP_WriteMcuAccessRegWord(sc, 0xF81A, 0x1BFE);
3257         MP_WriteMcuAccessRegWord(sc, 0xF81C, 0xC102);
3258         MP_WriteMcuAccessRegWord(sc, 0xF81E, 0xB900);
3259         MP_WriteMcuAccessRegWord(sc, 0xF820, 0x0B1A);
3260         MP_WriteMcuAccessRegWord(sc, 0xF822, 0x1BC0);
3261         MP_WriteMcuAccessRegWord(sc, 0xF824, 0x46EB);
3262         MP_WriteMcuAccessRegWord(sc, 0xF826, 0x1B7E);
3263         MP_WriteMcuAccessRegWord(sc, 0xF828, 0xC102);
3264         MP_WriteMcuAccessRegWord(sc, 0xF82A, 0xB900);
3265         MP_WriteMcuAccessRegWord(sc, 0xF82C, 0x0BEA);
3266         MP_WriteMcuAccessRegWord(sc, 0xF82E, 0xC602);
3267         MP_WriteMcuAccessRegWord(sc, 0xF830, 0xBE00);
3268         MP_WriteMcuAccessRegWord(sc, 0xF832, 0x0000);
3269         MP_WriteMcuAccessRegWord(sc, 0xF834, 0xC602);
3270         MP_WriteMcuAccessRegWord(sc, 0xF836, 0xBE00);
3271         MP_WriteMcuAccessRegWord(sc, 0xF838, 0x0000);
3272         MP_WriteMcuAccessRegWord(sc, 0xF83A, 0xC602);
3273         MP_WriteMcuAccessRegWord(sc, 0xF83C, 0xBE00);
3274         MP_WriteMcuAccessRegWord(sc, 0xF83E, 0x0000);
3275         MP_WriteMcuAccessRegWord(sc, 0xF840, 0xC602);
3276         MP_WriteMcuAccessRegWord(sc, 0xF842, 0xBE00);
3277         MP_WriteMcuAccessRegWord(sc, 0xF844, 0x0000);
3278         MP_WriteMcuAccessRegWord(sc, 0xF846, 0xC602);
3279         MP_WriteMcuAccessRegWord(sc, 0xF848, 0xBE00);
3280         MP_WriteMcuAccessRegWord(sc, 0xF84A, 0x0000);
3281 
3282         MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
3283 
3284         MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x2AAC);
3285         MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x0B14);
3286         MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x0BE4);
3287 
3288         if (sc->hw_hw_supp_serdes_phy_ver == 1) {
3289                 MP_WriteMcuAccessRegWord(sc, 0xFC38, 0x0007);
3290         } else {
3291                 MP_WriteMcuAccessRegWord(sc, 0xFC38, 0x0006);
3292         }
3293 }
3294 
3295 static void re_set_mac_mcu_8168fp_4(struct re_softc *sc)
3296 {
3297         DisableMcuBPs(sc);
3298 }
3299 
3300 static void re_set_mac_mcu_8125a_1(struct re_softc *sc)
3301 {
3302         DisableMcuBPs(sc);
3303 }
3304 
3305 static void re_set_mac_mcu_8125a_2(struct re_softc *sc)
3306 {
3307         u_int16_t i;
3308         static const u_int16_t mcu_patch_code_8125a_2[] =  {
3309                 0xE008, 0xE01E, 0xE02E, 0xE054, 0xE057, 0xE059, 0xE0C2, 0xE0CB, 0x9996,
3310                 0x49D1, 0xF005, 0x49D4, 0xF10A, 0x49D8, 0xF108, 0xC00F, 0x7100, 0x209C,
3311                 0x249C, 0xC009, 0x9900, 0xE004, 0xC006, 0x1900, 0x9900, 0xC602, 0xBE00,
3312                 0x5A48, 0xE0C2, 0x0004, 0xE10A, 0xC60F, 0x73C4, 0x49B3, 0xF106, 0x73C2,
3313                 0xC608, 0xB406, 0xC609, 0xFF80, 0xC605, 0xB406, 0xC605, 0xFF80, 0x0544,
3314                 0x0568, 0xE906, 0xCDE8, 0xC724, 0xC624, 0x9EE2, 0x1E01, 0x9EE0, 0x76E0,
3315                 0x49E0, 0xF1FE, 0x76E6, 0x486D, 0x4868, 0x9EE4, 0x1E03, 0x9EE0, 0x76E0,
3316                 0x49E0, 0xF1FE, 0xC615, 0x9EE2, 0x1E01, 0x9EE0, 0x76E0, 0x49E0, 0xF1FE,
3317                 0x76E6, 0x486F, 0x9EE4, 0x1E03, 0x9EE0, 0x76E0, 0x49E0, 0xF1FE, 0x7196,
3318                 0xC702, 0xBF00, 0x5A44, 0xEB0E, 0x0070, 0x00C3, 0x1BC0, 0xC602, 0xBE00,
3319                 0x0E26, 0xC602, 0xBE00, 0x0EBA, 0x1501, 0xF02A, 0x1500, 0xF15D, 0xC661,
3320                 0x75C8, 0x49D5, 0xF00A, 0x49D6, 0xF008, 0x49D7, 0xF006, 0x49D8, 0xF004,
3321                 0x75D2, 0x49D9, 0xF150, 0xC553, 0x77A0, 0x75C8, 0x4855, 0x4856, 0x4857,
3322                 0x4858, 0x48DA, 0x48DB, 0x49FE, 0xF002, 0x485A, 0x49FF, 0xF002, 0x485B,
3323                 0x9DC8, 0x75D2, 0x4859, 0x9DD2, 0xC643, 0x75C0, 0x49D4, 0xF033, 0x49D0,
3324                 0xF137, 0xE030, 0xC63A, 0x75C8, 0x49D5, 0xF00E, 0x49D6, 0xF00C, 0x49D7,
3325                 0xF00A, 0x49D8, 0xF008, 0x75D2, 0x49D9, 0xF005, 0xC62E, 0x75C0, 0x49D7,
3326                 0xF125, 0xC528, 0x77A0, 0xC627, 0x75C8, 0x4855, 0x4856, 0x4857, 0x4858,
3327                 0x48DA, 0x48DB, 0x49FE, 0xF002, 0x485A, 0x49FF, 0xF002, 0x485B, 0x9DC8,
3328                 0x75D2, 0x4859, 0x9DD2, 0xC616, 0x75C0, 0x4857, 0x9DC0, 0xC613, 0x75C0,
3329                 0x49DA, 0xF003, 0x49D0, 0xF107, 0xC60B, 0xC50E, 0x48D9, 0x9DC0, 0x4859,
3330                 0x9DC0, 0xC608, 0xC702, 0xBF00, 0x3AE0, 0xE860, 0xB400, 0xB5D4, 0xE908,
3331                 0xE86C, 0x1200, 0xC409, 0x6780, 0x48F1, 0x8F80, 0xC404, 0xC602, 0xBE00,
3332                 0x10AA, 0xC010, 0xEA7C, 0xC602, 0xBE00, 0x0000
3333         };
3334 
3335         DisableMcuBPs(sc);
3336 
3337         for (i = 0; i < ARRAY_SIZE(mcu_patch_code_8125a_2); i++) {
3338                 MP_WriteMcuAccessRegWord(sc, 0xF800 + i * 2, mcu_patch_code_8125a_2[i]);
3339         }
3340 
3341         MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
3342 
3343         MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x0540);
3344         MP_WriteMcuAccessRegWord(sc, 0xFC2E, 0x0E24);
3345         MP_WriteMcuAccessRegWord(sc, 0xFC30, 0x0EB8);
3346         MP_WriteMcuAccessRegWord(sc, 0xFC32, 0x3A5C);
3347         MP_WriteMcuAccessRegWord(sc, 0xFC34, 0x10A8);
3348 
3349         MP_WriteMcuAccessRegWord(sc, 0xFC48, 0x007A);
3350 }
3351 
3352 static void re_set_mac_mcu_8125b_1(struct re_softc *sc)
3353 {
3354         DisableMcuBPs(sc);
3355 }
3356 
3357 static void re_set_mac_mcu_8125b_2(struct re_softc *sc)
3358 {
3359         u_int16_t i;
3360         static const u_int16_t mcu_patch_code_8125b_2[] =   {
3361                 0xE008, 0xE013, 0xE01E, 0xE02F, 0xE035, 0xE04F, 0xE053, 0xE055, 0x740A,
3362                 0x4846, 0x4847, 0x9C0A, 0xC607, 0x74C0, 0x48C6, 0x9CC0, 0xC602, 0xBE00,
3363                 0x13F0, 0xE054, 0x72CA, 0x4826, 0x4827, 0x9ACA, 0xC607, 0x72C0, 0x48A6,
3364                 0x9AC0, 0xC602, 0xBE00, 0x081C, 0xE054, 0xC60F, 0x74C4, 0x49CC, 0xF109,
3365                 0xC60C, 0x74CA, 0x48C7, 0x9CCA, 0xC609, 0x74C0, 0x4846, 0x9CC0, 0xC602,
3366                 0xBE00, 0x2494, 0xE092, 0xE0C0, 0xE054, 0x7420, 0x48C0, 0x9C20, 0x7444,
3367                 0xC602, 0xBE00, 0x12DC, 0x733A, 0x21B5, 0x25BC, 0x1304, 0xF111, 0x1B12,
3368                 0x1D2A, 0x3168, 0x3ADA, 0x31AB, 0x1A00, 0x9AC0, 0x1300, 0xF1FB, 0x7620,
3369                 0x236E, 0x276F, 0x1A3C, 0x22A1, 0x41B5, 0x9EE2, 0x76E4, 0x486F, 0x9EE4,
3370                 0xC602, 0xBE00, 0x4A26, 0x733A, 0x49BB, 0xC602, 0xBE00, 0x47A2, 0xC602,
3371                 0xBE00, 0x0000, 0xC602, 0xBE00, 0x0000
3372         };
3373 
3374         DisableMcuBPs(sc);
3375 
3376         for (i = 0; i < ARRAY_SIZE(mcu_patch_code_8125b_2); i++) {
3377                 MP_WriteMcuAccessRegWord(sc, 0xF800 + i * 2, mcu_patch_code_8125b_2[i]);
3378         }
3379 
3380         MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
3381 
3382         MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x13E6);
3383         MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x0812);
3384         MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x248C);
3385         MP_WriteMcuAccessRegWord(sc, 0xFC2E, 0x12DA);
3386         MP_WriteMcuAccessRegWord(sc, 0xFC30, 0x4A20);
3387         MP_WriteMcuAccessRegWord(sc, 0xFC32, 0x47A0);
3388 
3389         MP_WriteMcuAccessRegWord(sc, 0xFC48, 0x003F);
3390 }
3391 
3392 static void re_hw_mac_mcu_config(struct re_softc *sc)
3393 {
3394         switch(sc->re_type) {
3395         case MACFG_56:
3396                 re_set_mac_mcu_8168g_1(sc);
3397                 break;
3398         case MACFG_58:
3399                 re_set_mac_mcu_8168gu_1(sc);
3400                 break;
3401         case MACFG_59:
3402                 re_set_mac_mcu_8168gu_2(sc);
3403                 break;
3404         case MACFG_60:
3405                 re_set_mac_mcu_8411b_1(sc);
3406                 break;
3407         case MACFG_62:
3408                 re_set_mac_mcu_8168ep_1(sc);
3409                 break;
3410         case MACFG_67:
3411                 re_set_mac_mcu_8168ep_2(sc);
3412                 break;
3413         case MACFG_68:
3414         case MACFG_69:
3415                 re_set_mac_mcu_8168h_1(sc);
3416                 break;
3417         case MACFG_70:
3418                 if (sc->HwPkgDet == 0x00 || sc->HwPkgDet == 0x0F)
3419                         re_set_mac_mcu_8168fp_1(sc);
3420                 else if (sc->HwPkgDet == 0x06)
3421                         re_set_mac_mcu_8168fp_2(sc);
3422                 break;
3423         case MACFG_71:
3424                 re_set_mac_mcu_8168fp_3(sc);
3425                 break;
3426         case MACFG_72:
3427                 re_set_mac_mcu_8168fp_4(sc);
3428                 break;
3429         case MACFG_80:
3430                 re_set_mac_mcu_8125a_1(sc);
3431                 break;
3432         case MACFG_81:
3433                 re_set_mac_mcu_8125a_2(sc);
3434                 break;
3435         case MACFG_82:
3436                 re_set_mac_mcu_8125b_1(sc);
3437                 break;
3438         case MACFG_83:
3439                 re_set_mac_mcu_8125b_2(sc);
3440                 break;
3441         }
3442 }
3443 
3444 #define ISRIMR_DASH_TYPE2_TX_DISABLE_IDLE BIT_5
3445 static void Dash2DisableTx(struct re_softc *sc)
3446 {
3447         //if (!sc->re_dash) return;
3448 
3449         if (HW_DASH_SUPPORT_TYPE_2(sc) || HW_DASH_SUPPORT_TYPE_3(sc)) {
3450                 u_int16_t WaitCnt;
3451                 u_int8_t TmpUchar;
3452 
3453                 //Disable oob Tx
3454                 RE_CMAC_WRITE_1(sc, RE_CMAC_IBCR2, RE_CMAC_READ_1(sc, RE_CMAC_IBCR2) & ~(BIT_0));
3455                 WaitCnt = 0;
3456 
3457                 //wait oob tx disable
3458                 do {
3459                         TmpUchar = RE_CMAC_READ_1(sc, RE_CMAC_IBISR0);
3460 
3461                         if (TmpUchar & ISRIMR_DASH_TYPE2_TX_DISABLE_IDLE) {
3462                                 break;
3463                         }
3464 
3465                         DELAY(50);
3466                         WaitCnt++;
3467                 } while(WaitCnt < 2000);
3468 
3469                 //Clear ISRIMR_DASH_TYPE2_TX_DISABLE_IDLE
3470                 RE_CMAC_WRITE_1(sc, RE_CMAC_IBISR0, RE_CMAC_READ_1(sc, RE_CMAC_IBISR0) | ISRIMR_DASH_TYPE2_TX_DISABLE_IDLE);
3471         }
3472 }
3473 
3474 static void Dash2DisableRx(struct re_softc *sc)
3475 {
3476         //if (!sc->re_dash) return;
3477 
3478         if (HW_DASH_SUPPORT_TYPE_2(sc) || HW_DASH_SUPPORT_TYPE_3(sc)) {
3479                 RE_CMAC_WRITE_1(sc, RE_CMAC_IBCR0, RE_CMAC_READ_1(sc, RE_CMAC_IBCR0) & ~(BIT_0));
3480         }
3481 }
3482 
3483 static void Dash2DisableTxRx(struct re_softc *sc)
3484 {
3485         if (HW_DASH_SUPPORT_TYPE_2(sc) || HW_DASH_SUPPORT_TYPE_3(sc)) {
3486                 Dash2DisableTx(sc);
3487                 Dash2DisableRx(sc);
3488         }
3489 }
3490 
3491 static inline bool
3492 is_zero_ether_addr(const u_int8_t * addr)
3493 {
3494         return ((addr[0] + addr[1] + addr[2] + addr[3] + addr[4] + addr[5]) == 0x00);
3495 }
3496 
3497 static inline bool
3498 is_multicast_ether_addr(const u_int8_t * addr)
3499 {
3500         return (0x01 & addr[0]);
3501 }
3502 
3503 /*
3504 static inline bool
3505 is_broadcast_ether_addr(const u_int8_t * addr)
3506 {
3507         return ((addr[0] + addr[1] + addr[2] + addr[3] + addr[4] + addr[5]) == (6 * 0xff));
3508 }
3509 */
3510 
3511 static inline bool
3512 is_valid_ether_addr(const u_int8_t * addr)
3513 {
3514         return !is_multicast_ether_addr(addr) && !is_zero_ether_addr(addr);
3515 }
3516 
3517 static inline void
3518 random_ether_addr(u_int8_t * dst)
3519 {
3520 #ifndef __DragonFly__
3521         if (read_random(dst, 6) == 0)
3522                 arc4rand(dst, 6, 0);
3523 #else
3524 	karc4rand(dst, 6);
3525 #endif
3526 
3527         dst[0] &= 0xfe;
3528         dst[0] |= 0x02;
3529 }
3530 
3531 static void re_disable_now_is_oob(struct re_softc *sc)
3532 {
3533         if (sc->re_hw_supp_now_is_oob_ver == 1)
3534                 CSR_WRITE_1(sc, RE_MCU_CMD, CSR_READ_1(sc, RE_MCU_CMD) & ~RE_NOW_IS_OOB);
3535 }
3536 
3537 static void re_switch_to_sgmii_mode(struct re_softc *sc)
3538 {
3539         if (FALSE == HW_SUPP_SERDES_PHY(sc)) return;
3540 
3541         switch (sc->hw_hw_supp_serdes_phy_ver) {
3542         case 1:
3543                 MP_WriteMcuAccessRegWord(sc, 0xEB00, 0x2);
3544                 SetMcuAccessRegBit(sc, 0xEB16, BIT_1);
3545                 break;
3546         }
3547 }
3548 
3549 static void
3550 re_enable_magic_packet(struct re_softc *sc)
3551 {
3552         if (sc->re_if_flags & RL_FLAG_MAGIC_PACKET_V3)
3553                 SetMcuAccessRegBit(sc, 0xC0B6, BIT_0);
3554         else if (sc->re_if_flags & RL_FLAG_MAGIC_PACKET_V2)
3555                 re_eri_write(sc, 0xDC, 4,
3556                              re_eri_read(sc, 0xDC, 4, ERIAR_ExGMAC) | BIT_16,
3557                              ERIAR_ExGMAC);
3558         else
3559                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) | RL_CFG3_WOL_MAGIC);
3560 }
3561 
3562 static void
3563 re_disable_magic_packet(struct re_softc *sc)
3564 {
3565         if (sc->re_if_flags & RL_FLAG_MAGIC_PACKET_V3)
3566                 ClearMcuAccessRegBit(sc, 0xC0B6, BIT_0);
3567         else if (sc->re_if_flags & RL_FLAG_MAGIC_PACKET_V2)
3568                 re_eri_write(sc, 0xDC, 4,
3569                              re_eri_read(sc, 0xDC, 4, ERIAR_ExGMAC) & ~BIT_16,
3570                              ERIAR_ExGMAC);
3571         else
3572                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~RL_CFG3_WOL_MAGIC);
3573 }
3574 
3575 static void re_exit_oob(struct re_softc *sc)
3576 {
3577         u_int16_t data16;
3578         int i;
3579 
3580         re_disable_cfg9346_write(sc);
3581 
3582         if (HW_SUPP_SERDES_PHY(sc)) {
3583                 if (sc->hw_hw_supp_serdes_phy_ver == 1) {
3584                         re_switch_to_sgmii_mode(sc);
3585                 }
3586         }
3587 
3588         switch(sc->re_type) {
3589         case MACFG_61:
3590         case MACFG_62:
3591         case MACFG_67:
3592         case MACFG_70:
3593         case MACFG_71:
3594         case MACFG_72:
3595                 Dash2DisableTxRx(sc);
3596                 break;
3597         }
3598 
3599         if (sc->re_dash)
3600                 re_driver_start(sc);
3601 
3602         switch(sc->re_type) {
3603         case MACFG_56:
3604         case MACFG_57:
3605         case MACFG_58:
3606         case MACFG_59:
3607         case MACFG_60:
3608         case MACFG_61:
3609         case MACFG_62:
3610         case MACFG_67:
3611         case MACFG_68:
3612         case MACFG_69:
3613         case MACFG_70:
3614         case MACFG_71:
3615         case MACFG_72:
3616                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | BIT_3);
3617                 DELAY(2000);
3618 
3619                 for (i = 0; i < 3000; i++) {
3620                         DELAY(50);
3621                         if (CSR_READ_4(sc, RE_TXCFG) & BIT_11)
3622                                 break;
3623                 }
3624 
3625                 if (CSR_READ_1(sc, RE_COMMAND) & (RE_CMD_TX_ENB | RE_CMD_RX_ENB)) {
3626                         DELAY(100);
3627                         CSR_WRITE_1(sc, RE_COMMAND, CSR_READ_1(sc, RE_COMMAND) & ~(RE_CMD_TX_ENB | RE_CMD_RX_ENB));
3628                 }
3629 
3630                 for (i = 0; i < 3000; i++) {
3631                         DELAY(50);
3632                         if ((CSR_READ_1(sc, RE_MCU_CMD) & (RE_TXFIFO_EMPTY | RE_RXFIFO_EMPTY)) == (RE_TXFIFO_EMPTY | RE_RXFIFO_EMPTY))
3633                                 break;
3634 
3635                 }
3636                 break;
3637         case MACFG_80:
3638         case MACFG_81:
3639         case MACFG_82:
3640         case MACFG_83:
3641                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | BIT_3);
3642                 DELAY(2000);
3643 
3644                 if (CSR_READ_1(sc, RE_COMMAND) & (RE_CMD_TX_ENB | RE_CMD_RX_ENB)) {
3645                         DELAY(100);
3646                         CSR_WRITE_1(sc, RE_COMMAND, CSR_READ_1(sc, RE_COMMAND) & ~(RE_CMD_TX_ENB | RE_CMD_RX_ENB));
3647                 }
3648 
3649                 for (i = 0; i < 3000; i++) {
3650                         DELAY(50);
3651                         if ((CSR_READ_1(sc, RE_MCU_CMD) & (RE_TXFIFO_EMPTY | RE_RXFIFO_EMPTY)) == (RE_TXFIFO_EMPTY | RE_RXFIFO_EMPTY))
3652                                 break;
3653 
3654                 }
3655 
3656                 if (sc->re_type == MACFG_82 || sc->re_type == MACFG_83) {
3657                         for (i = 0; i < 3000; i++) {
3658                                 DELAY(50);
3659                                 if ((CSR_READ_2(sc, RE_IntrMitigate) & (BIT_0 | BIT_1 | BIT_8)) == (BIT_0 | BIT_1 | BIT_8))
3660                                         break;
3661 
3662                         }
3663                 }
3664                 break;
3665         }
3666 
3667         //Disable realwow function
3668         switch (sc->re_type) {
3669         case MACFG_50:
3670         case MACFG_51:
3671                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xE5A90000);
3672                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xF2100010);
3673                 break;
3674         case MACFG_52:
3675                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xE5A90000);
3676                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xE4640000);
3677                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xF2100010);
3678                 break;
3679         case MACFG_56:
3680         case MACFG_57:
3681                 CSR_WRITE_4(sc, RE_MCUACCESS, 0x605E0000);
3682                 CSR_WRITE_4(sc, RE_MCUACCESS, (0xE05E << 16) | (CSR_READ_4(sc, RE_MCUACCESS) & 0xFFFE));
3683                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xE9720000);
3684                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xF2140010);
3685                 break;
3686         case MACFG_60:
3687                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xE05E00FF);
3688                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xE9720000);
3689                 MP_WriteMcuAccessRegWord(sc, 0xE428, 0x0010);
3690                 break;
3691         }
3692 
3693         if (sc->re_hw_supp_now_is_oob_ver >0)
3694                 re_disable_now_is_oob(sc);
3695 
3696         switch(sc->re_type) {
3697         case MACFG_52:
3698                 for (i = 0; i < 10; i++) {
3699                         DELAY(100);
3700                         if (CSR_READ_2(sc, 0xD2) & BIT_9)
3701                                 break;
3702                 }
3703 
3704                 data16 = MP_ReadMcuAccessRegWord(sc, 0xD4DE) | BIT_15;
3705                 MP_WriteMcuAccessRegWord(sc, 0xD4DE, data16);
3706 
3707                 for (i = 0; i < 10; i++) {
3708                         DELAY(100);
3709                         if (CSR_READ_2(sc, 0xD2) & BIT_9)
3710                                 break;
3711                 }
3712                 break;
3713         case MACFG_56:
3714         case MACFG_57:
3715         case MACFG_58:
3716         case MACFG_59:
3717         case MACFG_60:
3718         case MACFG_61:
3719         case MACFG_62:
3720         case MACFG_67:
3721         case MACFG_68:
3722         case MACFG_69:
3723         case MACFG_70:
3724         case MACFG_71:
3725         case MACFG_72:
3726                 data16 = MP_ReadMcuAccessRegWord(sc, 0xE8DE) & ~BIT_14;
3727                 MP_WriteMcuAccessRegWord(sc, 0xE8DE, data16);
3728                 for (i = 0; i < 10; i++) {
3729                         DELAY(100);
3730                         if (CSR_READ_2(sc, 0xD2) & BIT_9)
3731                                 break;
3732                 }
3733 
3734                 data16 = MP_ReadMcuAccessRegWord(sc, 0xE8DE) | BIT_15;
3735                 MP_WriteMcuAccessRegWord(sc, 0xE8DE, data16);
3736 
3737                 for (i = 0; i < 10; i++) {
3738                         DELAY(100);
3739                         if (CSR_READ_2(sc, 0xD2) & BIT_9)
3740                                 break;
3741                 }
3742                 break;
3743         case MACFG_80:
3744         case MACFG_81:
3745         case MACFG_82:
3746         case MACFG_83:
3747                 data16 = MP_ReadMcuAccessRegWord(sc, 0xE8DE) & ~BIT_14;
3748                 MP_WriteMcuAccessRegWord(sc, 0xE8DE, data16);
3749                 for (i = 0; i < 10; i++) {
3750                         DELAY(100);
3751                         if (CSR_READ_2(sc, 0xD2) & BIT_9)
3752                                 break;
3753                 }
3754 
3755                 MP_WriteMcuAccessRegWord(sc, 0xC0AA, 0x07D0);
3756                 MP_WriteMcuAccessRegWord(sc, 0xC0A6, 0x01B5);
3757                 MP_WriteMcuAccessRegWord(sc, 0xC01E, 0x5555);
3758 
3759                 for (i = 0; i < 10; i++) {
3760                         DELAY(100);
3761                         if (CSR_READ_2(sc, 0xD2) & BIT_9)
3762                                 break;
3763                 }
3764                 break;
3765         }
3766 
3767         //wait ups resume (phy state 2)
3768         switch(sc->re_type) {
3769         case MACFG_68:
3770         case MACFG_69:
3771         case MACFG_70:
3772         case MACFG_71:
3773         case MACFG_72:
3774         case MACFG_80:
3775         case MACFG_81:
3776         case MACFG_82:
3777         case MACFG_83:
3778                 if (re_is_ups_resume(sc)) {
3779                         re_wait_phy_ups_resume(sc, 2);
3780                         re_clear_ups_resume_bit(sc);
3781                         re_clear_phy_ups_reg(sc);
3782                 }
3783                 break;
3784         };
3785 
3786         /*
3787         * Config MAC MCU
3788         */
3789         re_hw_mac_mcu_config(sc);
3790 }
3791 
3792 static void re_hw_init(struct re_softc *sc)
3793 {
3794         /*
3795         * disable EDT.
3796         */
3797         switch(sc->re_type) {
3798         case MACFG_16:
3799         case MACFG_17:
3800         case MACFG_18:
3801         case MACFG_19:
3802         case MACFG_41:
3803                 CSR_WRITE_1(sc, 0xF4, CSR_READ_1(sc, 0xF4) & ~(BIT_0|BIT_1));
3804                 break;
3805         case MACFG_36:
3806         case MACFG_37:
3807         case MACFG_38:
3808         case MACFG_39:
3809         case MACFG_42:
3810         case MACFG_43:
3811         case MACFG_50:
3812         case MACFG_51:
3813         case MACFG_54:
3814         case MACFG_55:
3815                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) & ~(BIT_0|BIT_1|BIT_2));
3816                 break;
3817         }
3818 
3819         if (s0_magic_packet == 0)
3820                 re_disable_magic_packet(sc);
3821         else
3822                 re_enable_magic_packet(sc);
3823 
3824         switch(sc->re_type) {
3825         case MACFG_5:
3826                 if (CSR_READ_1(sc, RE_CFG2) & 1) {
3827                         CSR_WRITE_4(sc, 0x7C, 0x000FFFFF);
3828                 } else {
3829                         CSR_WRITE_4(sc, 0x7C, 0x000FFF00);
3830                 }
3831                 break;
3832         case MACFG_6:
3833                 if (CSR_READ_1(sc, RE_CFG2) & 1) {
3834                         CSR_WRITE_4(sc, 0x7C, 0x003FFFFF);
3835                 } else {
3836                         CSR_WRITE_4(sc, 0x7C, 0x003FFF00);
3837                 }
3838                 break;
3839         }
3840 
3841         switch(sc->re_type) {
3842         case MACFG_33:
3843         case MACFG_36:
3844         case MACFG_37:
3845                 CSR_WRITE_1(sc, 0xF3, CSR_READ_1(sc, 0xF3) | BIT_2);
3846                 break;
3847         }
3848 
3849         switch(sc->re_type) {
3850         case MACFG_36:
3851         case MACFG_37:
3852         case MACFG_38:
3853         case MACFG_39:
3854         case MACFG_42:
3855         case MACFG_43:
3856         case MACFG_50:
3857         case MACFG_51:
3858         case MACFG_52:
3859         case MACFG_53:
3860         case MACFG_54:
3861         case MACFG_55:
3862         case MACFG_56:
3863         case MACFG_57:
3864         case MACFG_58:
3865         case MACFG_59:
3866         case MACFG_60:
3867         case MACFG_61:
3868         case MACFG_62:
3869         case MACFG_67:
3870         case MACFG_68:
3871         case MACFG_69:
3872         case MACFG_70:
3873         case MACFG_71:
3874         case MACFG_72:
3875         case MACFG_80:
3876         case MACFG_81:
3877         case MACFG_82:
3878         case MACFG_83:
3879                 re_enable_cfg9346_write(sc);
3880                 CSR_WRITE_1(sc, RE_CFG5, CSR_READ_1(sc, RE_CFG5) & ~BIT_0);
3881                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) & ~BIT_7);
3882                 CSR_WRITE_1(sc, 0xF1, CSR_READ_1(sc, 0xF1) & ~BIT_7);
3883                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) | BIT_5);
3884                 re_disable_cfg9346_write(sc);
3885                 break;
3886         }
3887 
3888         if (sc->re_if_flags & RL_FLAG_PCIE) {
3889                 uint32_t Data32;
3890                 //Set PCIE uncorrectable error status mask pcie 0x108
3891                 Data32 = MP_ReadPciEConfigSpace(sc, 0xF108);
3892                 Data32 |= BIT_20;
3893                 MP_WritePciEConfigSpace(sc, 0xF108, Data32);
3894         }
3895 }
3896 
3897 static void re_rar_set(struct re_softc *sc, u_int8_t *eaddr)
3898 {
3899         re_enable_cfg9346_write(sc);
3900 
3901         CSR_WRITE_4(sc, RE_IDR0,
3902                     htole32(*(u_int32_t *)(&eaddr[0])));
3903         CSR_WRITE_2(sc, RE_IDR4,
3904                     htole16(*(u_int32_t *)(&eaddr[4])));
3905 
3906         switch (sc->re_type) {
3907         case MACFG_36:
3908         case MACFG_37:
3909         case MACFG_42:
3910         case MACFG_43:
3911         case MACFG_54:
3912         case MACFG_55:
3913                 CSR_WRITE_4(sc, RE_SecMAC0,
3914                             htole32(*(u_int32_t *)(&eaddr[0])));
3915                 CSR_WRITE_2(sc, RE_SecMAC4,
3916                             htole16(*(u_int16_t *)(&eaddr[4])));
3917                 break;
3918         }
3919 
3920         switch (sc->re_type) {
3921         case MACFG_38:
3922         case MACFG_39:
3923                 re_eri_write(sc, 0xF0, 4, *(u_int16_t *)(&eaddr[0])<<16, ERIAR_ExGMAC);
3924                 re_eri_write(sc, 0xF4, 4, *(u_int32_t *)(&eaddr[2]), ERIAR_ExGMAC);
3925                 break;
3926         }
3927 
3928         re_disable_cfg9346_write(sc);
3929 }
3930 
3931 static void re_get_hw_mac_address(struct re_softc *sc, u_int8_t *eaddr)
3932 {
3933         device_t dev = sc->dev;
3934         u_int16_t re_eeid = 0;
3935         int i;
3936 
3937         for (i = 0; i < ETHER_ADDR_LEN; i++)
3938                 eaddr[i] = CSR_READ_1(sc, RE_IDR0 + i);
3939 
3940         switch(sc->re_type) {
3941         case MACFG_50:
3942         case MACFG_51:
3943         case MACFG_52:
3944         case MACFG_53:
3945         case MACFG_56:
3946         case MACFG_57:
3947         case MACFG_58:
3948         case MACFG_59:
3949         case MACFG_60:
3950         case MACFG_61:
3951         case MACFG_62:
3952         case MACFG_67:
3953         case MACFG_68:
3954         case MACFG_69:
3955         case MACFG_70:
3956         case MACFG_71:
3957         case MACFG_72:
3958                 *(u_int32_t *)&eaddr[0] = re_eri_read(sc, 0xE0, 4, ERIAR_ExGMAC);
3959                 *(u_int16_t *)&eaddr[4] = (u_int16_t)re_eri_read(sc, 0xE4, 4, ERIAR_ExGMAC);
3960                 break;
3961         case MACFG_80:
3962         case MACFG_81:
3963         case MACFG_82:
3964         case MACFG_83:
3965                 *(u_int32_t *)&eaddr[0] = CSR_READ_4(sc, RE_BACKUP_ADDR0_8125);
3966                 *(u_int16_t *)&eaddr[4] = CSR_READ_2(sc, RE_BACKUP_ADDR4_8125);
3967                 break;
3968         case MACFG_63:
3969         case MACFG_64:
3970         case MACFG_65:
3971         case MACFG_66:
3972                 break;
3973         default:
3974                 re_read_eeprom(sc, (caddr_t)&re_eeid, RE_EE_ID, 1, 0);
3975                 if (re_eeid == 0x8129)
3976                         re_read_eeprom(sc, (caddr_t)&eaddr[0], RE_EE_EADDR, 3, 0);
3977                 break;
3978         }
3979 
3980         if (!is_valid_ether_addr(eaddr)) {
3981 #ifndef __DragonFly__
3982                 device_printf(dev,"Invalid ether addr: %6D\n", eaddr, ":");
3983 #else
3984 		device_printf(dev, "Invalid ether addr: "
3985 		    "%02x:%02x:%02x:%02x:%02x:%02x\n",
3986 		    eaddr[0], eaddr[1], eaddr[2], eaddr[3], eaddr[4], eaddr[5]);
3987 #endif
3988                 random_ether_addr(eaddr);
3989 #ifndef __DragonFly__
3990                 device_printf(dev,"Random ether addr: %6D\n", eaddr, ":");
3991 #else
3992 		device_printf(dev, "Random ether addr: "
3993 		    "%02x:%02x:%02x:%02x:%02x:%02x\n",
3994 		    eaddr[0], eaddr[1], eaddr[2], eaddr[3], eaddr[4], eaddr[5]);
3995 #endif
3996         }
3997 
3998         re_rar_set(sc, eaddr);
3999 }
4000 
4001 static int re_check_mac_version(struct re_softc *sc)
4002 {
4003         device_t dev = sc->dev;
4004         int error = 0;
4005 
4006         switch(CSR_READ_4(sc, RE_TXCFG) & 0xFCF00000) {
4007         case 0x00800000:
4008         case 0x04000000:
4009                 sc->re_type = MACFG_3;
4010                 sc->max_jumbo_frame_size = Jumbo_Frame_7k;
4011                 CSR_WRITE_4(sc, RE_RXCFG, 0xFF00);
4012                 break;
4013         case 0x10000000:
4014                 sc->re_type = MACFG_4;
4015                 sc->max_jumbo_frame_size = Jumbo_Frame_7k;
4016                 CSR_WRITE_4(sc, RE_RXCFG, 0xFF00);
4017                 break;
4018         case 0x18000000:
4019                 sc->re_type = MACFG_5;
4020                 sc->max_jumbo_frame_size = Jumbo_Frame_7k;
4021                 CSR_WRITE_4(sc, RE_RXCFG, 0xFF00);
4022                 break;
4023         case 0x98000000:
4024                 sc->re_type = MACFG_6;
4025                 sc->max_jumbo_frame_size = Jumbo_Frame_7k;
4026                 CSR_WRITE_4(sc, RE_RXCFG, 0xFF00);
4027                 break;
4028         case 0x34000000:
4029         case 0xB4000000:
4030                 sc->re_type = MACFG_11;
4031                 sc->max_jumbo_frame_size = ETHERMTU;
4032                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
4033                 break;
4034         case 0x34200000:
4035         case 0xB4200000:
4036                 sc->re_type = MACFG_12;
4037                 sc->max_jumbo_frame_size = ETHERMTU;
4038                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
4039                 break;
4040         case 0x34300000:
4041         case 0xB4300000:
4042                 sc->re_type = MACFG_13;
4043                 sc->max_jumbo_frame_size = ETHERMTU;
4044                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
4045                 break;
4046         case 0x34900000:
4047         case 0x24900000:
4048                 sc->re_type = MACFG_14;
4049                 sc->max_jumbo_frame_size = ETHERMTU;
4050                 sc->re_if_flags |= RL_FLAG_DESCV2;
4051                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
4052                 break;
4053         case 0x34A00000:
4054         case 0x24A00000:
4055                 sc->re_type = MACFG_15;
4056                 sc->max_jumbo_frame_size = ETHERMTU;
4057                 sc->re_if_flags |= RL_FLAG_DESCV2;
4058                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
4059                 break;
4060         case 0x34B00000:
4061         case 0x24B00000:
4062                 sc->re_type = MACFG_16;
4063                 sc->max_jumbo_frame_size = ETHERMTU;
4064                 sc->re_if_flags |= RL_FLAG_DESCV2;
4065                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
4066                 break;
4067         case 0x34C00000:
4068         case 0x24C00000:
4069                 sc->re_type = MACFG_17;
4070                 sc->max_jumbo_frame_size = ETHERMTU;
4071                 sc->re_if_flags |= RL_FLAG_DESCV2;
4072                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
4073                 break;
4074         case 0x34D00000:
4075         case 0x24D00000:
4076                 sc->re_type = MACFG_18;
4077                 sc->max_jumbo_frame_size = ETHERMTU;
4078                 sc->re_if_flags |= RL_FLAG_DESCV2;
4079                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
4080                 break;
4081         case 0x34E00000:
4082         case 0x24E00000:
4083                 sc->re_type = MACFG_19;
4084                 sc->max_jumbo_frame_size = ETHERMTU;
4085                 sc->re_if_flags |= RL_FLAG_DESCV2;
4086                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
4087                 break;
4088         case 0x30000000:
4089                 sc->re_type = MACFG_21;
4090                 sc->max_jumbo_frame_size = Jumbo_Frame_4k;
4091                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
4092                 break;
4093         case 0x38000000:
4094                 sc->re_type = MACFG_22;
4095                 sc->max_jumbo_frame_size = Jumbo_Frame_4k;
4096                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
4097                 break;
4098         case 0x38500000:
4099         case 0xB8500000:
4100         case 0x38700000:
4101         case 0xB8700000:
4102                 sc->re_type = MACFG_23;
4103                 sc->max_jumbo_frame_size = Jumbo_Frame_4k;
4104                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
4105                 break;
4106         case 0x3C000000:
4107                 sc->re_type = MACFG_24;
4108                 sc->max_jumbo_frame_size = Jumbo_Frame_6k;
4109                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
4110                 CSR_WRITE_4(sc, RE_RXCFG, 0xC700);
4111                 break;
4112         case 0x3C200000:
4113                 sc->re_type = MACFG_25;
4114                 sc->max_jumbo_frame_size = Jumbo_Frame_6k;
4115                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
4116                 CSR_WRITE_4(sc, RE_RXCFG, 0xC700);
4117                 break;
4118         case 0x3C400000:
4119                 sc->re_type = MACFG_26;
4120                 sc->max_jumbo_frame_size = Jumbo_Frame_6k;
4121                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
4122                 CSR_WRITE_4(sc, RE_RXCFG, 0xC700);
4123                 break;
4124         case 0x3C900000:
4125                 sc->re_type = MACFG_27;
4126                 sc->max_jumbo_frame_size = Jumbo_Frame_6k;
4127                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
4128                 CSR_WRITE_4(sc, RE_RXCFG, 0xC700);
4129                 break;
4130         case 0x3CB00000:
4131                 sc->re_type = MACFG_28;
4132                 sc->max_jumbo_frame_size = Jumbo_Frame_6k;
4133                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
4134                 CSR_WRITE_4(sc, RE_RXCFG, 0xC700);
4135                 break;
4136         case 0x28100000:
4137                 sc->re_type = MACFG_31;
4138                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4139                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
4140                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
4141                 break;
4142         case 0x28200000:
4143                 sc->re_type = MACFG_32;
4144                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4145                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
4146                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
4147                 break;
4148         case 0x28300000:
4149                 sc->re_type = MACFG_33;
4150                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4151                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
4152                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
4153                 break;
4154         case 0x2C100000:
4155                 sc->re_type = MACFG_36;
4156                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4157                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
4158                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
4159                 break;
4160         case 0x2C200000:
4161                 sc->re_type = MACFG_37;
4162                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4163                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
4164                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
4165                 break;
4166         case 0x2C800000:
4167                 sc->re_type = MACFG_38;
4168                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4169                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
4170                 CSR_WRITE_4(sc, RE_RXCFG, 0xBF00);
4171                 break;
4172         case 0x2C900000:
4173                 sc->re_type = MACFG_39;
4174                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4175                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
4176                 CSR_WRITE_4(sc, RE_RXCFG, 0xBF00);
4177                 break;
4178         case 0x24000000:
4179                 sc->re_type = MACFG_41;
4180                 sc->max_jumbo_frame_size = ETHERMTU;
4181                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
4182                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
4183                 break;
4184         case 0x40900000:
4185                 sc->re_type = MACFG_42;
4186                 sc->max_jumbo_frame_size = ETHERMTU;
4187                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
4188                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
4189                 break;
4190         case 0x40A00000:
4191         case 0x40B00000:
4192         case 0x40C00000:
4193                 sc->re_type = MACFG_43;
4194                 sc->max_jumbo_frame_size = ETHERMTU;
4195                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
4196                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
4197                 break;
4198         case 0x48000000:
4199                 sc->re_type = MACFG_50;
4200                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4201                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
4202                 CSR_WRITE_4(sc, RE_RXCFG, 0xBF00);
4203                 break;
4204         case 0x48100000:
4205                 sc->re_type = MACFG_51;
4206                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4207                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
4208                 CSR_WRITE_4(sc, RE_RXCFG, 0xBF00);
4209                 break;
4210         case 0x48800000:
4211                 sc->re_type = MACFG_52;
4212                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4213                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
4214                 CSR_WRITE_4(sc, RE_RXCFG, 0xBF00);
4215                 break;
4216         case 0x44000000:
4217                 sc->re_type = MACFG_53;
4218                 sc->max_jumbo_frame_size = ETHERMTU;
4219                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
4220                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
4221                 break;
4222         case 0x44800000:
4223                 sc->re_type = MACFG_54;
4224                 sc->max_jumbo_frame_size = ETHERMTU;
4225                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
4226                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
4227                 break;
4228         case 0x44900000:
4229                 sc->re_type = MACFG_55;
4230                 sc->max_jumbo_frame_size = ETHERMTU;
4231                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
4232                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
4233                 break;
4234         case 0x4C000000:
4235                 sc->re_type = MACFG_56;
4236                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4237                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
4238                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
4239                 break;
4240         case 0x4C100000:
4241                 sc->re_type = MACFG_57;
4242                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4243                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
4244                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
4245                 break;
4246         case 0x50800000:
4247                 sc->re_type = MACFG_58;
4248                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4249                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
4250                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
4251                 break;
4252         case 0x50900000:
4253                 sc->re_type = MACFG_59;
4254                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4255                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
4256                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
4257                 break;
4258         case 0x5C800000:
4259                 sc->re_type = MACFG_60;
4260                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4261                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
4262                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
4263                 break;
4264         case 0x50000000:
4265                 sc->re_type = MACFG_61;
4266                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4267                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
4268                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
4269                 break;
4270         case 0x50100000:
4271                 sc->re_type = MACFG_62;
4272                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4273                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
4274                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
4275                 break;
4276         case 0x50200000:
4277                 sc->re_type = MACFG_67;
4278                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4279                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
4280                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
4281                 break;
4282         case 0x28800000:
4283                 sc->re_type = MACFG_63;
4284                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4285                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
4286                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
4287                 break;
4288         case 0x28900000:
4289                 sc->re_type = MACFG_64;
4290                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4291                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
4292                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
4293                 break;
4294         case 0x28A00000:
4295                 sc->re_type = MACFG_65;
4296                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4297                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
4298                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
4299                 break;
4300         case 0x28B00000:
4301                 sc->re_type = MACFG_66;
4302                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4303                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
4304                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
4305                 break;
4306         case 0x54000000:
4307                 sc->re_type = MACFG_68;
4308                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4309                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
4310                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
4311                 break;
4312         case 0x54100000:
4313                 sc->re_type = MACFG_69;
4314                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4315                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
4316                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
4317                 break;
4318         case 0x54900000:
4319                 sc->re_type = MACFG_70;
4320                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4321                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
4322                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
4323                 break;
4324         case 0x54A00000:
4325                 sc->re_type = MACFG_71;
4326                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4327                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
4328                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
4329                 break;
4330         case 0x54B00000:
4331                 sc->re_type = MACFG_72;
4332                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4333                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
4334                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
4335                 break;
4336         case 0x60800000:
4337                 sc->re_type = MACFG_80;
4338                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4339                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V3;
4340                 CSR_WRITE_4(sc, RE_RXCFG, 0x40C00000);
4341                 break;
4342         case 0x60900000:
4343                 sc->re_type = MACFG_81;
4344                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4345                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V3;
4346                 CSR_WRITE_4(sc, RE_RXCFG, 0x40C00000);
4347                 break;
4348         case 0x64000000:
4349                 sc->re_type = MACFG_82;
4350                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4351                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V3;
4352                 CSR_WRITE_4(sc, RE_RXCFG, 0x40C00000);
4353                 break;
4354         case 0x64100000:
4355                 sc->re_type = MACFG_83;
4356                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
4357                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V3;
4358                 CSR_WRITE_4(sc, RE_RXCFG, 0x40C00000);
4359                 break;
4360         default:
4361                 device_printf(dev,"unknown device\n");
4362                 sc->re_type = MACFG_FF;
4363                 error = ENXIO;
4364                 break;
4365         }
4366 
4367         switch(sc->re_device_id) {
4368         case RT_DEVICEID_8169:
4369         case RT_DEVICEID_8169SC:
4370         case RT_DEVICEID_8168:
4371         case RT_DEVICEID_8161:
4372         case RT_DEVICEID_8125:
4373                 //do nothing
4374                 break;
4375         default:
4376                 sc->max_jumbo_frame_size = ETHERMTU;
4377                 break;
4378         }
4379 
4380         return error;
4381 }
4382 
4383 static void re_init_software_variable(struct re_softc *sc)
4384 {
4385         switch(sc->re_device_id) {
4386         case RT_DEVICEID_8168:
4387         case RT_DEVICEID_8161:
4388         case RT_DEVICEID_8136:
4389         case RT_DEVICEID_8125:
4390                 sc->re_if_flags |= RL_FLAG_PCIE;
4391                 break;
4392         }
4393 
4394         sc->re_rx_mbuf_sz = sc->max_jumbo_frame_size + ETHER_VLAN_ENCAP_LEN + ETHER_HDR_LEN + ETHER_CRC_LEN + RE_ETHER_ALIGN + 1;
4395 
4396         if (sc->re_rx_mbuf_sz > MJUM9BYTES) {
4397                 sc->max_jumbo_frame_size -= (sc->re_rx_mbuf_sz - MJUM9BYTES);
4398                 sc->re_rx_mbuf_sz = MJUM9BYTES;
4399         }
4400 
4401         switch(sc->re_type) {
4402         case MACFG_63:
4403         case MACFG_64:
4404         case MACFG_65:
4405         case MACFG_66:
4406                 sc->HwSuppDashVer = 1;
4407                 break;
4408         case MACFG_61:
4409         case MACFG_62:
4410         case MACFG_67:
4411                 sc->HwSuppDashVer = 2;
4412                 break;
4413         case MACFG_70:
4414         case MACFG_71:
4415         case MACFG_72:
4416                 sc->HwSuppDashVer = 3;
4417                 break;
4418         default:
4419                 sc->HwSuppDashVer = 0;
4420                 break;
4421         }
4422 
4423         switch(sc->re_type) {
4424         case MACFG_70:
4425         case MACFG_71:
4426         case MACFG_72:
4427                 sc->HwPkgDet = MP_ReadMcuAccessRegWord(sc, 0xDC00);
4428                 sc->HwPkgDet = (sc->HwPkgDet >> 3) & 0x0F;
4429                 break;
4430         }
4431 
4432         switch(sc->re_type) {
4433         case MACFG_71:
4434         case MACFG_72:
4435                 if (sc->HwPkgDet == 0x06) {
4436                         u_int8_t tmpUchar = re_eri_read(sc, 0xE6, 1, ERIAR_ExGMAC);
4437                         if (tmpUchar == 0x02)
4438                                 sc->hw_hw_supp_serdes_phy_ver = 1;
4439                         else if (tmpUchar == 0x00)
4440                                 sc->hw_hw_supp_serdes_phy_ver = 2;
4441                 }
4442                 break;
4443         }
4444 
4445         if (HW_SUPP_SERDES_PHY(sc))
4446                 eee_enable = 0;
4447 
4448         if (HW_DASH_SUPPORT_DASH(sc))
4449                 sc->re_dash = re_check_dash(sc);
4450 
4451         if (sc->re_dash) {
4452                 if (HW_DASH_SUPPORT_TYPE_3(sc)) {
4453                         u_int64_t CmacMemPhysAddress;
4454                         bus_space_handle_t cmac_ioaddr;
4455 
4456                         CmacMemPhysAddress = MP_ReadOtherFunPciEConfigSpace(sc, 0, 0xf018);
4457                         if (!(CmacMemPhysAddress & BIT_0)) {
4458                                 if (CmacMemPhysAddress & BIT_2)
4459                                         CmacMemPhysAddress |=  MP_ReadOtherFunPciEConfigSpace(sc, 0, 0xf01c) << 16;
4460 
4461                                 CmacMemPhysAddress &=  0xFFFFFFF0;
4462                                 /* ioremap MMIO region */
4463 #ifndef __DragonFly__
4464                                 sc->re_mapped_cmac_tag = X86_BUS_SPACE_MEM;
4465 #else
4466 				sc->re_mapped_cmac_tag = X86_64_BUS_SPACE_MEM;
4467 #endif
4468                                 if (bus_space_map(sc->re_mapped_cmac_tag, CmacMemPhysAddress, RE_REGS_SIZE, 0,
4469                                                   &cmac_ioaddr))
4470                                         sc->re_dash = 0;
4471                                 else
4472                                         sc->re_mapped_cmac_handle = cmac_ioaddr;
4473                         }
4474                 }
4475         }
4476 
4477         switch(sc->re_type) {
4478         case MACFG_61:
4479         case MACFG_62:
4480         case MACFG_67:
4481                 sc->re_cmac_handle = sc->re_bhandle;
4482                 sc->re_cmac_tag = sc->re_btag;
4483                 break;
4484         case MACFG_70:
4485         case MACFG_71:
4486         case MACFG_72:
4487                 sc->re_cmac_handle = sc->re_mapped_cmac_handle;
4488                 sc->re_cmac_tag = sc->re_mapped_cmac_tag;
4489                 break;
4490         }
4491 
4492         switch(sc->re_type) {
4493         case MACFG_14:
4494         case MACFG_15:
4495         case MACFG_16:
4496         case MACFG_17:
4497         case MACFG_18:
4498         case MACFG_19:
4499         case MACFG_31:
4500         case MACFG_32:
4501         case MACFG_33:
4502         case MACFG_41:
4503         case MACFG_63:
4504         case MACFG_64:
4505         case MACFG_65:
4506         case MACFG_66:
4507                 sc->re_efuse_ver = EFUSE_SUPPORT_V1;
4508                 break;
4509         case MACFG_36:
4510         case MACFG_37:
4511         case MACFG_42:
4512         case MACFG_43:
4513         case MACFG_54:
4514         case MACFG_55:
4515                 sc->re_efuse_ver = EFUSE_SUPPORT_V2;
4516                 break;
4517         case MACFG_38:
4518         case MACFG_39:
4519         case MACFG_50:
4520         case MACFG_51:
4521         case MACFG_52:
4522         case MACFG_53:
4523         case MACFG_56:
4524         case MACFG_57:
4525         case MACFG_58:
4526         case MACFG_59:
4527         case MACFG_60:
4528         case MACFG_61:
4529         case MACFG_62:
4530         case MACFG_67:
4531         case MACFG_68:
4532         case MACFG_69:
4533         case MACFG_70:
4534         case MACFG_71:
4535         case MACFG_72:
4536                 sc->re_efuse_ver = EFUSE_SUPPORT_V3;
4537                 break;
4538         case MACFG_80:
4539         case MACFG_81:
4540         case MACFG_82:
4541         case MACFG_83:
4542                 sc->re_efuse_ver = EFUSE_SUPPORT_V4;
4543                 break;
4544         default:
4545                 sc->re_efuse_ver = EFUSE_NOT_SUPPORT;
4546                 break;
4547         }
4548 
4549         switch(sc->re_type) {
4550         case MACFG_69: {
4551                 u_int16_t ioffset_p3, ioffset_p2, ioffset_p1, ioffset_p0;
4552                 u_int16_t TmpUshort;
4553 
4554                 MP_WriteMcuAccessRegWord(sc, 0xDD02, 0x807D);
4555 
4556                 TmpUshort = MP_ReadMcuAccessRegWord(sc, 0xDD02);
4557                 ioffset_p3 = ((TmpUshort & BIT_7) >>7);
4558                 ioffset_p3 <<= 3;
4559                 TmpUshort = MP_ReadMcuAccessRegWord(sc, 0xDD00);
4560 
4561                 ioffset_p3 |= ((TmpUshort & (BIT_15 | BIT_14 | BIT_13))>>13);
4562 
4563                 ioffset_p2 = ((TmpUshort & (BIT_12|BIT_11|BIT_10|BIT_9))>>9);
4564                 ioffset_p1 = ((TmpUshort & (BIT_8|BIT_7|BIT_6|BIT_5))>>5);
4565 
4566                 ioffset_p0 = ((TmpUshort & BIT_4) >>4);
4567                 ioffset_p0 <<= 3;
4568                 ioffset_p0 |= (TmpUshort & (BIT_2| BIT_1 | BIT_0));
4569 
4570                 if ((ioffset_p3 == 0x0F) && (ioffset_p2 == 0x0F) && (ioffset_p1 == 0x0F) && (ioffset_p0 == 0x0F)) {
4571                         sc->RequireAdcBiasPatch = FALSE;
4572                 } else {
4573                         sc->RequireAdcBiasPatch = TRUE;
4574                         sc->AdcBiasPatchIoffset = (ioffset_p3<<12)|(ioffset_p2<<8)|(ioffset_p1<<4)|(ioffset_p0);
4575                 }
4576         }
4577         break;
4578         }
4579 
4580         switch(sc->re_type) {
4581         case MACFG_68:
4582         case MACFG_69:
4583         case MACFG_70:
4584         case MACFG_71:
4585         case MACFG_72: {
4586                 u_int16_t rg_saw_cnt;
4587 
4588                 MP_WritePhyUshort(sc, 0x1F, 0x0C42);
4589                 rg_saw_cnt = MP_ReadPhyUshort(sc, 0x13);
4590                 rg_saw_cnt &= ~(BIT_15|BIT_14);
4591                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
4592 
4593                 if (rg_saw_cnt > 0) {
4594                         sc->SwrCnt1msIni = 16000000/rg_saw_cnt;
4595                         sc->SwrCnt1msIni &= 0x0FFF;
4596 
4597                         sc->RequireAdjustUpsTxLinkPulseTiming = TRUE;
4598                 }
4599         }
4600         break;
4601         }
4602 
4603 #ifdef ENABLE_FIBER_SUPPORT
4604         re_check_hw_fiber_mode_support(sc);
4605 #endif //ENABLE_FIBER_SUPPORT
4606 
4607         switch(sc->re_type) {
4608         case MACFG_31:
4609         case MACFG_32:
4610         case MACFG_33:
4611         case MACFG_36:
4612         case MACFG_37:
4613         case MACFG_38:
4614         case MACFG_39:
4615         case MACFG_42:
4616         case MACFG_43:
4617         case MACFG_50:
4618         case MACFG_51:
4619         case MACFG_52:
4620         case MACFG_53:
4621         case MACFG_54:
4622         case MACFG_55:
4623         case MACFG_56:
4624         case MACFG_57:
4625         case MACFG_58:
4626         case MACFG_59:
4627         case MACFG_60:
4628         case MACFG_61:
4629         case MACFG_62:
4630         case MACFG_63:
4631         case MACFG_64:
4632         case MACFG_65:
4633         case MACFG_66:
4634         case MACFG_67:
4635         case MACFG_68:
4636         case MACFG_69:
4637         case MACFG_70:
4638         case MACFG_71:
4639         case MACFG_72:
4640         case MACFG_80:
4641         case MACFG_81:
4642         case MACFG_82:
4643         case MACFG_83:
4644                 sc->re_hw_enable_msi_msix = TRUE;
4645                 break;
4646         }
4647 
4648         switch(sc->re_type) {
4649         case MACFG_3:
4650         case MACFG_4:
4651         case MACFG_5:
4652         case MACFG_6:
4653         case MACFG_11:
4654         case MACFG_12:
4655         case MACFG_13:
4656         case MACFG_21:
4657         case MACFG_22:
4658         case MACFG_23:
4659         case MACFG_24:
4660         case MACFG_25:
4661         case MACFG_26:
4662         case MACFG_27:
4663         case MACFG_28:
4664         case MACFG_41:
4665         case MACFG_42:
4666         case MACFG_43:
4667 #ifdef __DragonFly__
4668 	case MACFG_50:
4669 #endif
4670         case MACFG_54:
4671         case MACFG_55:
4672                 sc->re_coalesce_tx_pkt = TRUE;
4673 #ifdef __DragonFly__
4674 		if (sc->re_type != MACFG_50)
4675 			sc->re_pad_runt = TRUE;
4676 #endif
4677                 break;
4678         }
4679 
4680         switch(sc->re_type) {
4681         case MACFG_36:
4682         case MACFG_37:
4683         case MACFG_38:
4684         case MACFG_39:
4685         case MACFG_42:
4686         case MACFG_43:
4687         case MACFG_50:
4688         case MACFG_51:
4689         case MACFG_52:
4690         case MACFG_53:
4691         case MACFG_54:
4692         case MACFG_55:
4693         case MACFG_56:
4694         case MACFG_57:
4695         case MACFG_58:
4696         case MACFG_59:
4697         case MACFG_60:
4698         case MACFG_61:
4699         case MACFG_62:
4700         case MACFG_67:
4701         case MACFG_68:
4702         case MACFG_69:
4703         case MACFG_70:
4704         case MACFG_71:
4705         case MACFG_72:
4706         case MACFG_80:
4707         case MACFG_81:
4708         case MACFG_82:
4709         case MACFG_83:
4710                 sc->re_hw_supp_now_is_oob_ver = 1;
4711                 break;
4712         }
4713 
4714         switch (sc->re_type) {
4715         case MACFG_36:
4716         case MACFG_37:
4717                 sc->re_sw_ram_code_ver = NIC_RAMCODE_VERSION_8168E;
4718                 break;
4719         case MACFG_38:
4720         case MACFG_39:
4721                 sc->re_sw_ram_code_ver = NIC_RAMCODE_VERSION_8168EVL;
4722                 break;
4723         case MACFG_50:
4724         case MACFG_51:
4725                 sc->re_sw_ram_code_ver = NIC_RAMCODE_VERSION_8168F;
4726                 break;
4727         case MACFG_52:
4728                 sc->re_sw_ram_code_ver = NIC_RAMCODE_VERSION_8411;
4729                 break;
4730         case MACFG_56:
4731         case MACFG_57:
4732                 sc->re_sw_ram_code_ver = NIC_RAMCODE_VERSION_8168G;
4733                 break;
4734         case MACFG_58:
4735         case MACFG_59:
4736                 sc->re_sw_ram_code_ver = NIC_RAMCODE_VERSION_8168GU;
4737                 break;
4738         case MACFG_60:
4739                 sc->re_sw_ram_code_ver = NIC_RAMCODE_VERSION_8411B;
4740                 break;
4741         case MACFG_61:
4742         case MACFG_62:
4743         case MACFG_67:
4744                 sc->re_sw_ram_code_ver = NIC_RAMCODE_VERSION_8168EP;
4745                 break;
4746         case MACFG_68:
4747         case MACFG_69:
4748                 sc->re_sw_ram_code_ver = NIC_RAMCODE_VERSION_8168H;
4749                 break;
4750         case MACFG_70:
4751         case MACFG_71:
4752         case MACFG_72:
4753                 sc->re_sw_ram_code_ver = NIC_RAMCODE_VERSION_8168FP;
4754                 break;
4755         case MACFG_80:
4756                 sc->re_sw_ram_code_ver = NIC_RAMCODE_VERSION_8125A_REV_A;
4757                 break;
4758         case MACFG_81:
4759                 sc->re_sw_ram_code_ver = NIC_RAMCODE_VERSION_8125A_REV_B;
4760                 break;
4761         case MACFG_82:
4762                 sc->re_sw_ram_code_ver = NIC_RAMCODE_VERSION_8125B_REV_A;
4763                 break;
4764         case MACFG_83:
4765                 sc->re_sw_ram_code_ver = NIC_RAMCODE_VERSION_8125B_REV_B;
4766                 break;
4767         }
4768 
4769         switch (sc->re_type) {
4770         case MACFG_81:
4771                 if ((MP_ReadMcuAccessRegWord(sc, 0xD442) & BIT_5) &&
4772                     (MP_RealReadPhyOcpRegWord(sc, 0xD068) & BIT_1)
4773                    ) {
4774                         sc->RequirePhyMdiSwapPatch = TRUE;
4775                 }
4776                 break;
4777         }
4778 
4779         sc->re_8169_MacVersion = (CSR_READ_4(sc, RE_TXCFG)&0x7c800000)>>25;		/* Get bit 26~30 	*/
4780         sc->re_8169_MacVersion |= ((CSR_READ_4(sc, RE_TXCFG)&0x00800000)!=0 ? 1:0);	/* Get bit 23 		*/
4781         DBGPRINT1(sc->re_unit,"8169 Mac Version %d",sc->re_8169_MacVersion);
4782 
4783         /* Rtl8169s single chip detected */
4784         if (sc->re_type == MACFG_3) {
4785                 RE_LOCK(sc);
4786                 sc->re_8169_PhyVersion=(MP_ReadPhyUshort(sc, 0x03)&0x000f);
4787                 DBGPRINT1(sc->re_unit,"8169 Phy Version %d",sc->re_8169_PhyVersion);
4788                 RE_UNLOCK(sc);
4789         }
4790 
4791 #ifndef __DragonFly__
4792         sc->link_state = LINK_STATE_UNKNOWN;
4793 #endif
4794 
4795 #ifdef ENABLE_FIBER_SUPPORT
4796         if (HW_FIBER_MODE_ENABLED(sc))
4797                 re_set_fiber_mode_software_variable(sc);
4798 #endif //ENABLE_FIBER_SUPPORT
4799 }
4800 
4801 static void re_enable_ocp_phy_power_saving(struct re_softc *sc)
4802 {
4803         u_int16_t val;
4804 
4805         if (sc->re_type == MACFG_59 || sc->re_type == MACFG_60 ||
4806             sc->re_type == MACFG_62 || sc->re_type == MACFG_67 ||
4807             sc->re_type == MACFG_68 || sc->re_type == MACFG_69 ||
4808             sc->re_type == MACFG_70 || sc->re_type == MACFG_71 ||
4809             sc->re_type == MACFG_72) {
4810                 val = MP_ReadPhyOcpRegWord(sc, 0x0C41, 0x13);
4811                 if (val != 0x0050) {
4812                         re_set_phy_mcu_patch_request(sc);
4813                         MP_WritePhyOcpRegWord(sc, 0x0C41, 0x13, 0x0000);
4814                         MP_WritePhyOcpRegWord(sc, 0x0C41, 0x13, 0x0050);
4815                         re_clear_phy_mcu_patch_request(sc);
4816                 }
4817         } else if (sc->re_type == MACFG_80 || sc->re_type == MACFG_81 ||
4818                    sc->re_type == MACFG_82 || sc->re_type == MACFG_83) {
4819                 val = MP_RealReadPhyOcpRegWord(sc, 0xC416);
4820                 if (val != 0x0050) {
4821                         re_set_phy_mcu_patch_request(sc);
4822                         MP_RealWritePhyOcpRegWord(sc, 0xC416, 0x0000);
4823                         MP_RealWritePhyOcpRegWord(sc, 0xC416, 0x0050);
4824                         re_clear_phy_mcu_patch_request(sc);
4825                 }
4826         }
4827 }
4828 
4829 static void re_disable_ocp_phy_power_saving(struct re_softc *sc)
4830 {
4831         u_int16_t val;
4832 
4833         if (sc->re_type == MACFG_59 || sc->re_type == MACFG_60 ||
4834             sc->re_type == MACFG_62 || sc->re_type == MACFG_67 ||
4835             sc->re_type == MACFG_68 || sc->re_type == MACFG_69 ||
4836             sc->re_type == MACFG_70 || sc->re_type == MACFG_71 ||
4837             sc->re_type == MACFG_72) {
4838                 val = MP_ReadPhyOcpRegWord(sc, 0x0C41, 0x13);
4839                 if (val != 0x0500) {
4840                         re_set_phy_mcu_patch_request(sc);
4841                         MP_WritePhyOcpRegWord(sc, 0x0C41, 0x13, 0x0000);
4842                         MP_WritePhyOcpRegWord(sc, 0x0C41, 0x13, 0x0500);
4843                         re_clear_phy_mcu_patch_request(sc);
4844                 }
4845         } else if (sc->re_type == MACFG_80 || sc->re_type == MACFG_81 ||
4846                    sc->re_type == MACFG_82 || sc->re_type == MACFG_83) {
4847                 val = MP_RealReadPhyOcpRegWord(sc, 0xC416);
4848                 if (val != 0x0500) {
4849                         re_set_phy_mcu_patch_request(sc);
4850                         MP_RealWritePhyOcpRegWord(sc, 0xC416, 0x0000);
4851                         MP_RealWritePhyOcpRegWord(sc, 0xC416, 0x0500);
4852                         re_clear_phy_mcu_patch_request(sc);
4853                 }
4854         }
4855 }
4856 
4857 static void re_hw_d3_para(struct re_softc *sc)
4858 {
4859         switch (sc->re_type) {
4860         case MACFG_59:
4861         case MACFG_60:
4862         case MACFG_62:
4863         case MACFG_67:
4864         case MACFG_68:
4865         case MACFG_69:
4866         case MACFG_70:
4867         case MACFG_71:
4868         case MACFG_72:
4869         case MACFG_80:
4870         case MACFG_81:
4871         case MACFG_82:
4872         case MACFG_83:
4873                 re_disable_ocp_phy_power_saving(sc);
4874                 break;
4875         }
4876 }
4877 
4878 #ifndef __DragonFly__
4879 /*
4880 * Attach the interface. Allocate softc structures, do ifmedia
4881 * setup and ethernet/BPF attach.
4882 */
4883 static int re_attach(device_t dev)
4884 {
4885         /*int			s;*/
4886         u_char			eaddr[ETHER_ADDR_LEN];
4887         u_int32_t		command;
4888         struct re_softc		*sc;
4889         struct ifnet		*ifp;
4890         int			unit, error = 0, rid, i;
4891 //	int			mac_version;
4892 //	int			mode;
4893 //	u_int8_t		data8;
4894         int     reg;
4895         int		msic=0, msixc=0;
4896 
4897         /*s = splimp();*/
4898 
4899         sc = device_get_softc(dev);
4900         unit = device_get_unit(dev);
4901         bzero(sc, sizeof(struct re_softc));
4902         RE_LOCK_INIT(sc,device_get_nameunit(dev));
4903         sc->dev = dev;
4904 
4905         sc->driver_detach = 0;
4906 
4907         sc->re_vendor_id  = pci_get_vendor(dev);
4908         sc->re_device_id = pci_get_device(dev);
4909         sc->re_subvendor_id = pci_get_subvendor(dev);
4910         sc->re_subdevice_id = pci_get_subdevice(dev);
4911         sc->re_revid = pci_get_revid(dev);
4912         pci_enable_busmaster(dev);
4913 
4914         /*
4915          * Map control/status registers.
4916          */
4917         command = pci_read_config(dev, PCIR_COMMAND, 4);
4918         command |= (PCIM_CMD_PORTEN|PCIM_CMD_MEMEN|PCIM_CMD_BUSMASTEREN);
4919         pci_write_config(dev, PCIR_COMMAND, command, 4);
4920         command = pci_read_config(dev, PCIR_COMMAND, 4);
4921 
4922         if (prefer_iomap == 0) {
4923                 sc->re_res_id = PCIR_BAR(1);
4924                 sc->re_res_type = SYS_RES_MEMORY;
4925                 /* PCIE NIC use different BARs. */
4926                 if (sc->re_device_id == RT_DEVICEID_8168 || sc->re_device_id == RT_DEVICEID_8161 ||
4927                     sc->re_device_id == RT_DEVICEID_8136 || sc->re_device_id == RT_DEVICEID_8125)
4928                         sc->re_res_id = PCIR_BAR(2);
4929         } else {
4930                 sc->re_res_id = PCIR_BAR(0);
4931                 sc->re_res_type = SYS_RES_IOPORT;
4932         }
4933         sc->re_res = bus_alloc_resource(dev, sc->re_res_type, &sc->re_res_id,
4934                                         0, ~0, 1, RF_ACTIVE);
4935         if (sc->re_res == NULL && prefer_iomap == 0) {
4936                 sc->re_res_id = PCIR_BAR(0);
4937                 sc->re_res_type = SYS_RES_IOPORT;
4938                 sc->re_res = bus_alloc_resource(dev, sc->re_res_type, &sc->re_res_id,
4939                                                 0, ~0, 1, RF_ACTIVE);
4940         }
4941 
4942         if (sc->re_res == NULL) {
4943                 device_printf(dev,"couldn't map ports/memory\n");
4944                 error = ENXIO;
4945                 goto fail;
4946         }
4947 
4948         if (sc->re_res_type == SYS_RES_IOPORT)
4949                 device_printf(dev, "Using I/O Ports\n");
4950         else
4951                 device_printf(dev, "Using Memory Mapping!\n");
4952 
4953         sc->re_btag = rman_get_bustag(sc->re_res);
4954         sc->re_bhandle = rman_get_bushandle(sc->re_res);
4955 
4956         error = re_check_mac_version(sc);
4957 
4958         if (error) {
4959                 goto fail;
4960         }
4961 
4962         re_init_software_variable(sc);
4963 
4964 #if OS_VER >= VERSION(7,0)
4965         msic = pci_msi_count(dev);
4966         msixc = pci_msix_count(dev);
4967         if (pci_find_cap(dev, PCIY_EXPRESS, &reg) == 0) {
4968                 sc->re_if_flags |= RL_FLAG_PCIE;
4969                 sc->re_expcap = reg;
4970         } else {
4971                 sc->re_if_flags &= ~RL_FLAG_PCIE;
4972                 sc->re_expcap = 0;
4973         }
4974 
4975         //device_printf(dev, "MSI count : %d\n", msic);
4976         //device_printf(dev, "MSI-X count : %d\n", msixc);
4977         if (sc->re_hw_enable_msi_msix == FALSE) {
4978                 msixc = 0;
4979                 msic = 0;
4980         }
4981         if (msix_disable > 0)
4982                 msixc = 0;
4983         if (msi_disable > 0)
4984                 msic = 0;
4985 
4986         /* Prefer MSI-X to MSI. */
4987         if (msixc > 0) {
4988                 rid = PCIR_BAR(4);
4989                 msixc = RL_MSI_MESSAGES;
4990                 sc->re_res_pba = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
4991                                                         &rid, RF_ACTIVE);
4992                 if (sc->re_res_pba == NULL) {
4993                         device_printf(dev,
4994                                       "could not allocate MSI-X PBA resource\n");
4995                 }
4996                 if (sc->re_res_pba != NULL &&
4997                     pci_alloc_msix(dev, &msixc) == 0) {
4998                         if (msixc == RL_MSI_MESSAGES) {
4999                                 device_printf(dev, "Using %d MSI-X message\n",
5000                                               msixc);
5001                                 sc->re_if_flags |= RL_FLAG_MSIX;
5002                         } else
5003                                 pci_release_msi(dev);
5004                 }
5005                 if ((sc->re_if_flags & RL_FLAG_MSIX) == 0) {
5006                         if (sc->re_res_pba != NULL)
5007                                 bus_release_resource(dev, SYS_RES_MEMORY, rid,
5008                                                      sc->re_res_pba);
5009                         sc->re_res_pba = NULL;
5010                         msixc = 0;
5011                 }
5012         }
5013 
5014         /* Prefer MSI to INTx. */
5015         if (msixc == 0 && msic > 0) {
5016                 msic = RL_MSI_MESSAGES;
5017                 if (pci_alloc_msi(dev, &msic) == 0) {
5018                         if (msic == RL_MSI_MESSAGES) {
5019                                 device_printf(dev, "Using %d MSI message\n",
5020                                               msic);
5021                                 sc->re_if_flags |= RL_FLAG_MSI;
5022                         } else
5023                                 pci_release_msi(dev);
5024                 }
5025                 if ((sc->re_if_flags & RL_FLAG_MSI) == 0)
5026                         msic = 0;
5027         }
5028 #endif //OS_VER >= VERSION(7,0)
5029 
5030         if ((sc->re_if_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) == 0) {
5031                 rid = 0;
5032                 sc->re_irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0, 1,
5033                                                 RF_SHAREABLE | RF_ACTIVE);
5034 
5035                 if (sc->re_irq == NULL) {
5036                         device_printf(dev,"couldn't map interrupt\n");
5037                         error = ENXIO;
5038                         goto fail;
5039                 }
5040                 device_printf(dev, "Using line-based interrupt\n");
5041         } else {
5042                 rid = 1;
5043                 sc->re_irq = bus_alloc_resource_any(dev,
5044                                                     SYS_RES_IRQ, &rid, RF_ACTIVE);
5045                 if (sc->re_irq == NULL) {
5046                         device_printf(dev,
5047                                       "couldn't allocate IRQ resources for "
5048                                       "message %d\n", rid);
5049                         error = ENXIO;
5050                         goto fail;
5051                 }
5052         }
5053 
5054 #if OS_VER >= VERSION(7,3)
5055         /* Disable ASPM L0S/L1 and Clock Request. */
5056         if (sc->re_expcap != 0) {
5057                 u_int32_t		cap, ctl;
5058                 cap = pci_read_config(dev, sc->re_expcap +
5059                                       RE_PCIER_LINK_CAP, 2);
5060                 if ((cap & RE_PCIEM_LINK_CAP_ASPM) != 0) {
5061                         ctl = pci_read_config(dev, sc->re_expcap +
5062                                               RE_PCIER_LINK_CTL, 2);
5063                         if ((ctl & 0x0103) != 0) {
5064                                 ctl &= ~0x0103;
5065                                 pci_write_config(dev, sc->re_expcap +
5066                                                  RE_PCIER_LINK_CTL, ctl, 2);
5067                                 device_printf(dev, "ASPM disabled\n");
5068                         }
5069                 } else
5070                         device_printf(dev, "no ASPM capability\n");
5071         }
5072 #endif //OS_VER >= VERSION(7,3)
5073 
5074         re_init_timer(sc);
5075 
5076         RE_LOCK(sc);
5077         re_exit_oob(sc);
5078         re_hw_init(sc);
5079         RE_UNLOCK(sc);
5080 
5081         /*
5082          * Reset the adapter. Only take the lock here as it's needed in
5083          * order to call re_reset().
5084          */
5085         RE_LOCK(sc);
5086         re_reset(sc);
5087         RE_UNLOCK(sc);
5088 
5089         /* Get station address. */
5090         RE_LOCK(sc);
5091         re_get_hw_mac_address(sc, eaddr);
5092         RE_UNLOCK(sc);
5093 
5094         /*
5095          * A RealTek chip was detected. Inform the world.
5096          */
5097         device_printf(dev,"version:%s\n", RE_VERSION);
5098         device_printf(dev,"Ethernet address: %6D\n", eaddr, ":");
5099         printf("\nThis product is covered by one or more of the following patents: \
5100            \nUS6,570,884, US6,115,776, and US6,327,625.\n");
5101 
5102         sc->re_unit = unit;
5103 
5104 #if OS_VER < VERSION(6,0)
5105         bcopy(eaddr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN);
5106 #endif
5107 
5108         if (sc->re_type == MACFG_3) {	/* Change PCI Latency time*/
5109                 pci_write_config(dev, RE_PCI_LATENCY_TIMER, 0x40, 1);
5110         }
5111 
5112         error = bus_dma_tag_create(
5113 #if OS_VER < VERSION(7,0)
5114                         NULL,
5115 #else
5116                         bus_get_dma_tag(dev),		/* parent */
5117 #endif
5118                         1, 0,		/* alignment, boundary */
5119                         BUS_SPACE_MAXADDR,		/* lowaddr */
5120                         BUS_SPACE_MAXADDR,		/* highaddr */
5121                         NULL, NULL,			/* filter, filterarg */
5122                         BUS_SPACE_MAXSIZE_32BIT,	/* maxsize */
5123                         0,				/* nsegments */
5124                         BUS_SPACE_MAXSIZE_32BIT,	/* maxsegsize */
5125                         0,				/* flags */
5126                         NULL, NULL,			/* lockfunc, lockarg */
5127                         &sc->re_parent_tag);
5128 
5129         i = roundup2(sizeof(union RxDesc)*RE_RX_BUF_NUM, RE_DESC_ALIGN);
5130         error = bus_dma_tag_create(
5131                         sc->re_parent_tag,
5132                         RE_DESC_ALIGN, 0,		/* alignment, boundary */
5133                         BUS_SPACE_MAXADDR,		/* lowaddr */
5134                         BUS_SPACE_MAXADDR,		/* highaddr */
5135                         NULL, NULL,			/* filter, filterarg */
5136                         i,				/* maxsize */
5137                         1,				/* nsegments */
5138                         i,				/* maxsegsize */
5139                         0,				/* flags */
5140                         NULL, NULL,			/* lockfunc, lockarg */
5141                         &sc->re_desc.rx_desc_tag);
5142         if (error) {
5143                 device_printf(dev,"bus_dma_tag_create fail\n");
5144                 goto fail;
5145         }
5146 
5147         error = bus_dmamem_alloc(sc->re_desc.rx_desc_tag,
5148                                  (void**) &sc->re_desc.rx_desc,
5149                                  BUS_DMA_WAITOK|BUS_DMA_COHERENT|BUS_DMA_ZERO,
5150                                  &sc->re_desc.rx_desc_dmamap);
5151         if (error) {
5152                 device_printf(dev,"bus_dmamem_alloc fail\n");
5153                 goto fail;
5154         }
5155 
5156         i = roundup2(sizeof(union TxDesc)*RE_TX_BUF_NUM, RE_DESC_ALIGN);
5157         error = bus_dma_tag_create(
5158                         sc->re_parent_tag,
5159                         RE_DESC_ALIGN, 0,		/* alignment, boundary */
5160                         BUS_SPACE_MAXADDR,		/* lowaddr */
5161                         BUS_SPACE_MAXADDR,		/* highaddr */
5162                         NULL, NULL,			/* filter, filterarg */
5163                         i,				/* maxsize */
5164                         1,				/* nsegments */
5165                         i,				/* maxsegsize */
5166                         0,				/* flags */
5167                         NULL, NULL,			/* lockfunc, lockarg */
5168                         &sc->re_desc.tx_desc_tag);
5169         if (error) {
5170                 device_printf(dev,"bus_dma_tag_create fail\n");
5171                 goto fail;
5172         }
5173 
5174         error = bus_dmamem_alloc(sc->re_desc.tx_desc_tag,
5175                                  (void**) &sc->re_desc.tx_desc,
5176                                  BUS_DMA_WAITOK|BUS_DMA_COHERENT|BUS_DMA_ZERO,
5177                                  &sc->re_desc.tx_desc_dmamap);
5178 
5179         if (error) {
5180                 device_printf(dev,"bus_dmamem_alloc fail\n");
5181                 goto fail;
5182         }
5183 
5184         sc->re_tx_cstag =1;
5185         sc->re_rx_cstag =1;
5186 
5187 #if OS_VER < VERSION(6,0)
5188         ifp = &sc->arpcom.ac_if;
5189 #else
5190         ifp = sc->re_ifp = if_alloc(IFT_ETHER);
5191         if (ifp == NULL) {
5192                 device_printf(dev, "can not if_alloc()\n");
5193                 error = ENOSPC;
5194                 goto fail;
5195         }
5196 #endif
5197         ifp->if_softc = sc;
5198 #if OS_VER < VERSION(5,3)
5199         ifp->if_unit = unit;
5200         ifp->if_name = "re";
5201 #else
5202         if_initname(ifp, device_get_name(dev), device_get_unit(dev));
5203 #endif
5204         ifp->if_mtu = ETHERMTU;
5205         ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
5206         ifp->if_ioctl = re_ioctl;
5207         ifp->if_output = ether_output;
5208         ifp->if_start = re_start;
5209 #if OS_VER < VERSION(7,0)
5210         ifp->if_watchdog = re_watchdog;
5211 #endif
5212         if ((sc->re_type == MACFG_24) || (sc->re_type == MACFG_25) || (sc->re_type == MACFG_26))
5213                 ifp->if_hwassist |= CSUM_TCP | CSUM_UDP;
5214         else
5215                 ifp->if_hwassist |= RE_CSUM_FEATURES;
5216 
5217         ifp->if_capabilities = IFCAP_HWCSUM;
5218         ifp->if_capenable = ifp->if_capabilities;
5219         ifp->if_init = re_init;
5220         /* VLAN capability setup */
5221         ifp->if_capabilities |= IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING;
5222         ifp->if_capenable = ifp->if_capabilities;
5223 
5224         /* Enable WOL if PM is supported. */
5225         if (pci_find_cap(sc->dev, PCIY_PMG, &reg) == 0)
5226                 ifp->if_capabilities |= IFCAP_WOL;
5227         ifp->if_capenable = ifp->if_capabilities;
5228         ifp->if_capenable &= ~(IFCAP_WOL_UCAST | IFCAP_WOL_MCAST);
5229 
5230         RE_LOCK(sc);
5231         re_phy_power_up(dev);
5232         re_hw_phy_config(sc);
5233         re_clrwol(sc);
5234 
5235         set_rxbufsize(sc);
5236         error =re_alloc_buf(sc);
5237 
5238         if (error) {
5239                 RE_UNLOCK(sc);
5240                 goto fail;
5241         }
5242         /* Init descriptors. */
5243         re_var_init(sc);
5244 
5245         RE_UNLOCK(sc);
5246 
5247         switch(sc->re_device_id) {
5248         case RT_DEVICEID_8125:
5249                 ifp->if_baudrate = 25000000000;
5250                 break;
5251         case RT_DEVICEID_8169:
5252         case RT_DEVICEID_8169SC:
5253         case RT_DEVICEID_8168:
5254         case RT_DEVICEID_8161:
5255                 ifp->if_baudrate = 1000000000;
5256                 break;
5257         default:
5258                 ifp->if_baudrate = 100000000;
5259                 break;
5260         }
5261         IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN);
5262         ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN;
5263         IFQ_SET_READY(&ifp->if_snd);
5264 
5265         if (sc->re_device_id == RT_DEVICEID_8125) {
5266                 sc->ifmedia_upd = re_ifmedia_upd_8125;
5267                 sc->ifmedia_sts = re_ifmedia_sts_8125;
5268                 sc->intr = re_intr_8125;
5269                 sc->int_task = re_int_task_8125;
5270                 sc->hw_start_unlock = re_hw_start_unlock_8125;
5271         } else {
5272                 sc->ifmedia_upd = re_ifmedia_upd;
5273                 sc->ifmedia_sts = re_ifmedia_sts;
5274                 sc->intr = re_intr;
5275                 sc->int_task = re_int_task;
5276                 sc->hw_start_unlock = re_hw_start_unlock;
5277         }
5278 
5279 #if OS_VER>=VERSION(7,0)
5280         TASK_INIT(&sc->re_inttask, 0, sc->int_task, sc);
5281 #endif
5282 
5283         /*
5284          * Call MI attach routine.
5285          */
5286         /*#if OS_VER < VERSION(5, 1)*/
5287 #if OS_VER < VERSION(4,9)
5288         ether_ifattach(ifp, ETHER_BPF_SUPPORTED);
5289 #else
5290         ether_ifattach(ifp, eaddr);
5291 #endif
5292 
5293 #if OS_VER < VERSION(7,0)
5294         error = bus_setup_intr(dev, sc->re_irq, INTR_TYPE_NET,
5295                                sc->intr, sc, &sc->re_intrhand);
5296 #else
5297         error = bus_setup_intr(dev, sc->re_irq, INTR_TYPE_NET|INTR_MPSAFE,
5298                                sc->intr, NULL, sc, &sc->re_intrhand);
5299 #endif
5300 
5301         if (error) {
5302 #if OS_VER < VERSION(4,9)
5303                 ether_ifdetach(ifp, ETHER_BPF_SUPPORTED);
5304 #else
5305                 ether_ifdetach(ifp);
5306 #endif
5307                 device_printf(dev,"couldn't set up irq\n");
5308                 goto fail;
5309         }
5310 
5311         /*
5312          * Specify the media types supported by this adapter and register
5313          * callbacks to update media and link information
5314          */
5315         ifmedia_init(&sc->media, IFM_IMASK, sc->ifmedia_upd, sc->ifmedia_sts);
5316         ifmedia_add(&sc->media, IFM_ETHER | IFM_10_T, 0, NULL);
5317         ifmedia_add(&sc->media, IFM_ETHER | IFM_10_T | IFM_FDX, 0, NULL);
5318         ifmedia_add(&sc->media, IFM_ETHER | IFM_100_TX, 0, NULL);
5319         ifmedia_add(&sc->media, IFM_ETHER | IFM_100_TX | IFM_FDX, 0, NULL);
5320         switch(sc->re_device_id) {
5321         case RT_DEVICEID_8125:
5322         case RT_DEVICEID_8169:
5323         case RT_DEVICEID_8169SC:
5324         case RT_DEVICEID_8168:
5325         case RT_DEVICEID_8161:
5326                 ifmedia_add(&sc->media, IFM_ETHER | IFM_1000_T | IFM_FDX, 0, NULL);
5327                 //ifmedia_add(&sc->media, IFM_ETHER | IFM_1000_T, 0, NULL);
5328                 break;
5329         default:
5330                 break;
5331         }
5332         switch(sc->re_device_id) {
5333         case RT_DEVICEID_8125:
5334                 ifmedia_add(&sc->media, IFM_ETHER | IFM_2500_T | IFM_FDX, 0, NULL);
5335                 break;
5336         default:
5337                 break;
5338         }
5339         ifmedia_add(&sc->media, IFM_ETHER | IFM_AUTO, 0, NULL);
5340         ifmedia_set(&sc->media, IFM_ETHER | IFM_AUTO);
5341         sc->media.ifm_media = IFM_ETHER | IFM_AUTO;
5342         sc->ifmedia_upd(ifp);
5343 
5344 fail:
5345         if (error)
5346                 re_detach(dev);
5347 
5348         return(error);
5349 }
5350 
5351 static int re_detach(device_t dev)
5352 {
5353         struct re_softc		*sc;
5354         struct ifnet		*ifp;
5355         /*int			s;*/
5356         int			i;
5357         int			rid;
5358 
5359         /*s = splimp();*/
5360 
5361         sc = device_get_softc(dev);
5362 
5363         ifp = RE_GET_IFNET(sc);
5364 
5365         /* These should only be active if attach succeeded */
5366         if (device_is_attached(dev)) {
5367                 RE_LOCK(sc);
5368                 re_stop(sc);
5369                 RE_UNLOCK(sc);
5370 #if OS_VER>=VERSION(7,0)
5371                 taskqueue_drain(taskqueue_fast, &sc->re_inttask);
5372 #endif
5373 #if OS_VER < VERSION(4,9)
5374                 ether_ifdetach(ifp, ETHER_BPF_SUPPORTED);
5375 #else
5376                 ether_ifdetach(ifp);
5377 #endif
5378         }
5379 
5380         bus_generic_detach(dev);
5381 
5382         sc->driver_detach = 1;
5383 
5384         if (sc->re_intrhand)
5385                 bus_teardown_intr(dev, sc->re_irq, sc->re_intrhand);
5386 
5387 #if OS_VER>=VERSION(6,0)
5388         if (ifp)
5389                 if_free(ifp);
5390 #endif
5391 
5392         if ((sc->re_if_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) == 0)
5393                 rid = 0;
5394         else
5395                 rid = 1;
5396         if (sc->re_irq) {
5397                 bus_release_resource(dev, SYS_RES_IRQ, rid, sc->re_irq);
5398                 sc->re_irq = NULL;
5399         }
5400         if ((sc->re_if_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) != 0)
5401                 pci_release_msi(dev);
5402         if (sc->re_res_pba) {
5403                 rid = PCIR_BAR(4);
5404                 bus_release_resource(dev, SYS_RES_MEMORY, rid, sc->re_res_pba);
5405         }
5406         if (sc->re_res)
5407                 bus_release_resource(dev, sc->re_res_type, sc->re_res_id, sc->re_res);
5408 
5409         if (HW_DASH_SUPPORT_TYPE_3(sc) && sc->re_dash)
5410                 bus_space_unmap(sc->re_cmac_tag, sc->re_mapped_cmac_handle, RE_REGS_SIZE);
5411 
5412         if (sc->re_desc.re_rx_mtag) {
5413                 for (i = 0; i < RE_RX_BUF_NUM; i++) {
5414                         if (sc->re_desc.rx_buf[i]!=NULL) {
5415                                 bus_dmamap_sync(sc->re_desc.re_rx_mtag,
5416                                                 sc->re_desc.re_rx_dmamap[i],
5417                                                 BUS_DMASYNC_POSTREAD);
5418                                 bus_dmamap_unload(sc->re_desc.re_rx_mtag,
5419                                                   sc->re_desc.re_rx_dmamap[i]);
5420                                 bus_dmamap_destroy(sc->re_desc.re_rx_mtag,
5421                                                    sc->re_desc.re_rx_dmamap[i]);
5422                                 m_freem(sc->re_desc.rx_buf[i]);
5423                                 sc->re_desc.rx_buf[i] =NULL;
5424                         }
5425                 }
5426                 bus_dma_tag_destroy(sc->re_desc.re_rx_mtag);
5427                 sc->re_desc.re_rx_mtag =0;
5428         }
5429 
5430         if (sc->re_desc.re_tx_mtag) {
5431                 for (i = 0; i < RE_TX_BUF_NUM; i++) {
5432                         bus_dmamap_destroy(sc->re_desc.re_tx_mtag,
5433                                            sc->re_desc.re_tx_dmamap[i]);
5434                 }
5435                 bus_dma_tag_destroy(sc->re_desc.re_tx_mtag);
5436                 sc->re_desc.re_tx_mtag =0;
5437         }
5438 
5439         if (sc->re_desc.rx_desc_tag) {
5440                 bus_dmamap_sync(sc->re_desc.rx_desc_tag,
5441                                 sc->re_desc.rx_desc_dmamap,
5442                                 BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
5443                 bus_dmamap_unload(sc->re_desc.rx_desc_tag,
5444                                   sc->re_desc.rx_desc_dmamap);
5445                 bus_dmamem_free(sc->re_desc.rx_desc_tag,
5446                                 sc->re_desc.rx_desc,
5447                                 sc->re_desc.rx_desc_dmamap);
5448                 bus_dma_tag_destroy(sc->re_desc.rx_desc_tag);
5449         }
5450 
5451         if (sc->re_desc.tx_desc_tag) {
5452                 bus_dmamap_sync(sc->re_desc.tx_desc_tag,
5453                                 sc->re_desc.tx_desc_dmamap,
5454                                 BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
5455                 bus_dmamap_unload(sc->re_desc.tx_desc_tag,
5456                                   sc->re_desc.tx_desc_dmamap);
5457                 bus_dmamem_free(sc->re_desc.tx_desc_tag,
5458                                 sc->re_desc.tx_desc,
5459                                 sc->re_desc.tx_desc_dmamap);
5460                 bus_dma_tag_destroy(sc->re_desc.tx_desc_tag);
5461         }
5462 
5463         if (sc->re_parent_tag) {
5464                 bus_dma_tag_destroy(sc->re_parent_tag);
5465         }
5466 
5467         /*splx(s);*/
5468         RE_LOCK_DESTROY(sc);
5469 
5470         return(0);
5471 }
5472 #endif	/* !__DragonFly__ */
5473 
5474 #ifndef __DragonFly__
5475 static void
5476 re_link_state_change(struct ifnet *ifp, int link_state)
5477 {
5478 #if OS_VER>=VERSION(6,0)
5479         if_link_state_change(ifp, link_state);
5480 #else
5481         ifp->if_link_state = link_state
5482 #endif
5483 }
5484 
5485 /*
5486   * Device suspend routine.  Stop the interface and save some PCI
5487   * settings in case the BIOS doesn't restore them properly on
5488   * resume.
5489   */
5490 static int
5491 re_suspend(device_t dev)
5492 {
5493         struct re_softc         *sc;
5494         struct ifnet            *ifp;
5495 
5496         sc = device_get_softc(dev);
5497         RE_LOCK(sc);
5498         ifp = RE_GET_IFNET(sc);
5499         sc->re_link_chg_det = 0;
5500         sc->phy_reg_anlpar = re_get_phy_lp_ability(sc);
5501         re_stop(sc);
5502         re_hw_d3_para(sc);
5503         re_setwol(sc);
5504         sc->suspended = 1;
5505         sc->link_state = LINK_STATE_UNKNOWN;
5506         re_link_state_change(ifp, sc->link_state);
5507         sc->prohibit_access_reg = 1;
5508         RE_UNLOCK(sc);
5509 
5510         return (0);
5511 }
5512 
5513 /*
5514  * Device resume routine.  Restore some PCI settings in case the BIOS
5515  * doesn't, re-enable busmastering, and restart the interface if
5516  * appropriate.
5517  */
5518 static int
5519 re_resume(device_t dev)
5520 {
5521         struct re_softc         *sc;
5522         struct ifnet            *ifp;
5523 
5524         sc = device_get_softc(dev);
5525 
5526         RE_LOCK(sc);
5527 
5528         ifp = RE_GET_IFNET(sc);
5529 
5530         sc->prohibit_access_reg = 0;
5531 
5532         re_exit_oob(sc);
5533 
5534         re_hw_init(sc);
5535 
5536         re_reset(sc);
5537 
5538         re_phy_power_up(dev);
5539 
5540         re_hw_phy_config(sc);
5541 
5542         /*
5543          * Clear WOL matching such that normal Rx filtering
5544          * wouldn't interfere with WOL patterns.
5545          */
5546         re_clrwol(sc);
5547 
5548         RE_UNLOCK(sc);
5549 
5550         RE_LOCK(sc);
5551         sc->ifmedia_upd(ifp);
5552         sc->suspended = 0;
5553         if (ifp->if_flags & IFF_UP) {
5554                 sc->re_link_chg_det = 1;
5555                 re_start_timer(sc);
5556         }
5557         RE_UNLOCK(sc);
5558 
5559         return (0);
5560 }
5561 #endif	/* !__DragonFly__ */
5562 
5563 
5564 static void
5565 ClearAndSetPCIePhyBit(
5566         struct re_softc *sc,
5567         u_int8_t   addr,
5568         u_int16_t   clearmask,
5569         u_int16_t   setmask
5570 )
5571 {
5572         u_int16_t EphyValue;
5573 
5574         EphyValue = MP_ReadEPhyUshort(sc, addr);
5575         EphyValue &= ~clearmask;
5576         EphyValue |= setmask;
5577         MP_WriteEPhyUshort(sc, addr, EphyValue);
5578 }
5579 
5580 static void
5581 ClearPCIePhyBit(
5582         struct re_softc *sc,
5583         u_int8_t   addr,
5584         u_int16_t   mask
5585 )
5586 {
5587         ClearAndSetPCIePhyBit(sc,
5588                               addr,
5589                               mask,
5590                               0
5591                              );
5592 }
5593 
5594 static void
5595 SetPCIePhyBit(
5596         struct re_softc *sc,
5597         u_int8_t   addr,
5598         u_int16_t   mask
5599 )
5600 {
5601         ClearAndSetPCIePhyBit(sc,
5602                               addr,
5603                               0,
5604                               mask
5605                              );
5606 }
5607 
5608 #ifndef __DragonFly__
5609 /*
5610  * Stop all chip I/O so that the kernel's probe routines don't
5611  * get confused by errant DMAs when rebooting.
5612  */
5613 static int re_shutdown(dev)	/* The same with re_stop(sc) */
5614 device_t		dev;
5615 {
5616         struct re_softc		*sc;
5617 
5618         sc = device_get_softc(dev);
5619 
5620         if (sc->re_dash)
5621                 re_driver_stop(sc);
5622 
5623         RE_LOCK(sc);
5624         sc->re_link_chg_det = 0;
5625         sc->phy_reg_anlpar = re_get_phy_lp_ability(sc);
5626         re_stop(sc);
5627         RE_UNLOCK(sc);
5628 
5629         RE_LOCK(sc);
5630         re_hw_d3_para(sc);
5631         if (s5wol == 0) {
5632                 re_phy_power_down(dev);
5633         } else {
5634                 struct ifnet            *ifp;
5635                 ifp = RE_GET_IFNET(sc);
5636                 ifp->if_capenable = IFCAP_WOL_MAGIC;
5637                 re_setwol(sc);
5638         }
5639         RE_UNLOCK(sc);
5640 
5641         return 0;
5642 }
5643 #endif	/* !__DragonFly__ */
5644 
5645 static void re_hw_start_unlock(struct re_softc *sc)
5646 {
5647         struct ifnet		*ifp;
5648         u_int32_t		macver;
5649         u_int8_t		data8;
5650         u_int16_t		data16 = 0;
5651         u_int32_t		Data32;
5652 
5653         ifp = RE_GET_IFNET(sc);
5654 
5655 #ifndef __DragonFly__
5656         /* Init descriptors. */
5657         re_var_init(sc);
5658 #endif
5659 
5660         re_enable_cfg9346_write(sc);
5661 
5662         switch(sc->re_type) {
5663         case MACFG_36:
5664         case MACFG_37:
5665         case MACFG_38:
5666         case MACFG_39:
5667         case MACFG_42:
5668         case MACFG_43:
5669         case MACFG_50:
5670         case MACFG_51:
5671         case MACFG_52:
5672         case MACFG_53:
5673         case MACFG_54:
5674         case MACFG_55:
5675         case MACFG_56:
5676         case MACFG_57:
5677         case MACFG_58:
5678         case MACFG_59:
5679         case MACFG_60:
5680         case MACFG_61:
5681         case MACFG_62:
5682         case MACFG_67:
5683         case MACFG_68:
5684         case MACFG_69:
5685         case MACFG_70:
5686         case MACFG_71:
5687         case MACFG_72:
5688                 CSR_WRITE_1(sc, RE_CFG5, CSR_READ_1(sc, RE_CFG5) & ~BIT_0);
5689                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) & ~BIT_7);
5690                 CSR_WRITE_1(sc, 0xF1, CSR_READ_1(sc, 0xF1) & ~BIT_7);
5691                 break;
5692         }
5693 
5694         /*disable Link Down Power Saving(non-LDPS)*/
5695         /*CSR_WRITE_1(sc, RE_LDPS, 0x05);*/
5696         /*ldps= CSR_READ_1(sc, RE_LDPS);*/
5697 
5698         CSR_WRITE_2(sc, RE_CPlusCmd, 0x2060);
5699 
5700         CSR_WRITE_2(sc, RE_IM, 0x5151);
5701 
5702         CSR_WRITE_1(sc, RE_MTPS, 0x3f);
5703 
5704         if (sc->re_device_id == RT_DEVICEID_8169 || sc->re_device_id == RT_DEVICEID_8169SC) {
5705                 //do nothing
5706         } else {
5707                 /* Set the initial TX configuration.*/
5708                 CSR_WRITE_4(sc, RE_TXCFG, RE_TXCFG_CONFIG);
5709         }
5710 
5711         macver = CSR_READ_4(sc, RE_TXCFG) & 0xFC800000;
5712         if (macver == 0x00800000 || macver == 0x04000000 || macver == 0x10000000) {
5713                 CSR_WRITE_2(sc, RE_CPlusCmd, 0x0063| ((sc->re_type == MACFG_3 && sc->re_8169_MacVersion==1) ? 0x4008:0));
5714         } else if (macver == 0x18000000 || macver == 0x98000000) {
5715                 CSR_WRITE_2(sc, RE_CPlusCmd, 0x0068);
5716                 CSR_WRITE_2(sc, RE_IntrMitigate, 0x0000);
5717         } else if (macver == 0x30000000) {
5718                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
5719                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
5720 
5721                 if (ifp->if_mtu > ETHERMTU) {
5722                         data8 = pci_read_config(sc->dev, 0x69, 1);
5723                         data8 &= ~0x70;
5724                         data8 |= 0x28;
5725                         pci_write_config(sc->dev, 0x69, data8, 1);
5726                 } else {
5727                         data8 = pci_read_config(sc->dev, 0x69, 1);
5728                         data8 &= ~0x70;
5729                         data8 |= 0x58;
5730                         pci_write_config(sc->dev, 0x69, data8, 1);
5731                 }
5732         } else if (macver == 0x38000000) {
5733                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
5734                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
5735 
5736                 if (ifp->if_mtu > ETHERMTU) {
5737                         data8 = pci_read_config(sc->dev, 0x69, 1);
5738                         data8 &= ~0x70;
5739                         data8 |= 0x28;
5740                         pci_write_config(sc->dev, 0x69, data8, 1);
5741                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | BIT_0);
5742                 } else {
5743                         data8 = pci_read_config(sc->dev, 0x69, 1);
5744                         data8 &= ~0x70;
5745                         data8 |= 0x58;
5746                         pci_write_config(sc->dev, 0x69, data8, 1);
5747                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) & ~ BIT_0);
5748                 }
5749         } else if (macver == 0x34000000 || macver == 0xB4000000) {
5750                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
5751         } else if (macver == 0x34800000 || macver == 0x24800000) {
5752                 if (pci_read_config(sc->dev, 0x81, 1) == 1) {
5753                         CSR_WRITE_1(sc, RE_DBG_reg, 0x98);
5754                         CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) | 0x80);
5755                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | 0x04);
5756                         pci_write_config(sc->dev, 0x81, 1, 1);
5757                 }
5758 
5759                 data8 = pci_read_config(sc->dev, 0x79, 1);
5760                 data8 &= ~0x70;
5761                 data8 |= 0x50;
5762                 pci_write_config(sc->dev, 0x79, data8, 1);
5763 
5764                 /*set configuration space offset 0x70f to 0x3f*/
5765                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
5766                 Data32 &=0xC0FFFFFF;
5767                 Data32 |= (0x3F << 24);
5768                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
5769 
5770                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
5771 
5772                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
5773                 if (sc->re_type == MACFG_14) {
5774                         CSR_WRITE_1(sc,RE_CFG1, 0x0f);
5775 
5776                         MP_WriteEPhyUshort(sc, 0x03, 0xC2F9);
5777                 } else if (sc->re_type == MACFG_15) {
5778                         CSR_WRITE_1(sc,RE_CFG1, 0x0f);
5779 
5780                         MP_WriteEPhyUshort(sc, 0x01, 0x6FE5);
5781                         MP_WriteEPhyUshort(sc, 0x03, 0x07D9);
5782                 } else if (sc->re_type == MACFG_17) {
5783                         MP_WriteEPhyUshort(sc, 0x06, 0xAF35);
5784                 } else if (sc->re_type == MACFG_18) {
5785                         CSR_WRITE_1(sc, 0xF5, CSR_READ_1(sc, 0xF5)|0x04);
5786                         MP_WriteEPhyUshort(sc, 0x19, 0xEC90);
5787                         MP_WriteEPhyUshort(sc, 0x01, 0x6FE5);
5788                         MP_WriteEPhyUshort(sc, 0x03, 0x05D9);
5789                         MP_WriteEPhyUshort(sc, 0x06, 0xAF35);
5790                 } else if (sc->re_type == MACFG_19) {
5791                         if (pci_read_config(sc->dev, 0x80, 1)&3) {
5792                                 MP_WriteEPhyUshort(sc, 0x02, 0x011F);
5793                         }
5794                         CSR_WRITE_1(sc, 0xF4, CSR_READ_1(sc, 0xF4)|0x08);
5795                         CSR_WRITE_1(sc, 0xF5, CSR_READ_1(sc, 0xF5)|0x04);
5796                         MP_WriteEPhyUshort(sc, 0x19, 0xEC90);
5797                         MP_WriteEPhyUshort(sc, 0x01, 0x6FE5);
5798                         MP_WriteEPhyUshort(sc, 0x03, 0x05D9);
5799                         MP_WriteEPhyUshort(sc, 0x06, 0xAF35);
5800                 }
5801         } else if (macver == 0x3C000000) {
5802                 //disable clock request.
5803                 pci_write_config(sc->dev, 0x81, 0, 1);
5804 
5805                 /*set configuration space offset 0x70f to 0x27*/
5806                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
5807                 Data32 &=0xC0FFFFFF;
5808                 Data32 |= (0x27 << 24);
5809                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
5810 
5811                 CSR_WRITE_1(sc, RE_CFG1, CSR_READ_1(sc, RE_CFG1)|0x10);
5812                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
5813 
5814                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
5815                 if (sc->re_type == MACFG_24) {
5816                         /*set mac register offset 0xd1 to 0xf8*/
5817                         CSR_WRITE_1(sc, RE_DBG_reg, 0xF8);
5818 
5819                         data16 = MP_ReadEPhyUshort(sc, 0x02) & ~0x1800;
5820                         data16 |= 0x1000;
5821                         MP_WriteEPhyUshort(sc, 0x02, data16);
5822 
5823                         data16 = MP_ReadEPhyUshort(sc, 0x03) | 0x0002;
5824                         MP_WriteEPhyUshort(sc, 0x03, data16);
5825 
5826                         data16 = MP_ReadEPhyUshort(sc, 0x06) & ~0x0080;
5827                         MP_WriteEPhyUshort(sc, 0x06, data16);
5828 
5829                         if (ifp->if_mtu > ETHERMTU) {
5830                                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) | BIT_2); //Jumbo_en0
5831                                 CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | (1 << 1)); //Jumbo_en1
5832 
5833                                 data8 = pci_read_config(sc->dev, 0x79, 1);
5834                                 data8 &= ~0x70;
5835                                 data8 |= 0x20;
5836                                 pci_write_config(sc->dev, 0x79, data8, 1);
5837                                 ifp->if_capenable &= ~IFCAP_HWCSUM;
5838                                 CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) & ~RL_RxChkSum);
5839                                 ifp->if_hwassist &= ~RE_CSUM_FEATURES;
5840 
5841                         } else {
5842                                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_2); //Jumbo_en0
5843                                 CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) & ~(1 << 1)); //Jumbo_en1
5844                                 data8 = pci_read_config(sc->dev, 0x79, 1);
5845                                 data8 &= ~0x70;
5846                                 data8 |= 0x50;
5847                                 pci_write_config(sc->dev, 0x79, data8, 1);
5848                                 if (sc->re_tx_cstag) {
5849                                         ifp->if_capenable |= IFCAP_TXCSUM;
5850                                         if ((sc->re_type == MACFG_24) || (sc->re_type == MACFG_25) || (sc->re_type == MACFG_26))
5851                                                 ifp->if_hwassist |= CSUM_TCP | CSUM_UDP;
5852                                         else
5853                                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
5854                                 }
5855                                 if (sc->re_rx_cstag) {
5856                                         ifp->if_capenable |= IFCAP_RXCSUM;
5857                                         CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) |RL_RxChkSum);
5858                                 }
5859                         }
5860                 } else if (sc->re_type == MACFG_25) {
5861                         data16 = MP_ReadEPhyUshort(sc, 0x01) | 0x0001;
5862                         MP_WriteEPhyUshort(sc, 0x01, data16);
5863 
5864                         data16 = MP_ReadEPhyUshort(sc, 0x03) & ~0x0620;
5865                         data16 |= 0x0220;
5866                         MP_WriteEPhyUshort(sc, 0x03, data16);
5867 
5868                         if (ifp->if_mtu > ETHERMTU) {
5869                                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) | BIT_2); //Jumbo_en0
5870                                 CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | (1<<1)); //Jumbo_en1
5871 
5872                                 data8 = pci_read_config(sc->dev, 0x79, 1);
5873                                 data8 &= ~0x70;
5874                                 data8 |= 0x20;
5875                                 pci_write_config(sc->dev, 0x79, data8, 1);
5876                                 ifp->if_capenable &= ~IFCAP_HWCSUM;
5877                                 CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) & ~RL_RxChkSum);
5878                                 ifp->if_hwassist &= ~RE_CSUM_FEATURES;
5879 
5880                         } else {
5881                                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_2); //Jumbo_en0
5882                                 CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) & ~(1<<1)); //Jumbo_en1
5883                                 data8 = pci_read_config(sc->dev, 0x79, 1);
5884                                 data8 &= ~0x70;
5885                                 data8 |= 0x50;
5886                                 pci_write_config(sc->dev, 0x79, data8, 1);
5887                                 if (sc->re_tx_cstag) {
5888                                         ifp->if_capenable |= IFCAP_TXCSUM;
5889                                         if ((sc->re_type == MACFG_24) || (sc->re_type == MACFG_25) || (sc->re_type == MACFG_26))
5890                                                 ifp->if_hwassist |= CSUM_TCP | CSUM_UDP;
5891                                         else
5892                                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
5893                                 }
5894                                 if (sc->re_rx_cstag) {
5895                                         ifp->if_capenable |= IFCAP_RXCSUM;
5896                                         CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) |RL_RxChkSum);
5897                                 }
5898 
5899 
5900                         }
5901                 } else if (sc->re_type == MACFG_26) {
5902                         if (ifp->if_mtu > ETHERMTU) {
5903                                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) | BIT_2); //Jumbo_en0
5904                                 CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | (1<<1)); //Jumbo_en1
5905 
5906                                 data8 = pci_read_config(sc->dev, 0x79, 1);
5907                                 data8 &= ~0x70;
5908                                 data8 |= 0x20;
5909                                 pci_write_config(sc->dev, 0x79, data8, 1);
5910                                 ifp->if_capenable &= ~IFCAP_HWCSUM;
5911                                 CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) & ~RL_RxChkSum);
5912                                 ifp->if_hwassist &= ~RE_CSUM_FEATURES;
5913                         } else {
5914                                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_2); //Jumbo_en0
5915                                 CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) & ~(1<<1)); //Jumbo_en1
5916                                 data8 = pci_read_config(sc->dev, 0x79, 1);
5917                                 data8 &= ~0x70;
5918                                 data8 |= 0x50;
5919                                 pci_write_config(sc->dev, 0x79, data8, 1);
5920                                 if (sc->re_tx_cstag) {
5921                                         ifp->if_capenable |= IFCAP_TXCSUM;
5922                                         if ((sc->re_type == MACFG_24) || (sc->re_type == MACFG_25) || (sc->re_type == MACFG_26))
5923                                                 ifp->if_hwassist |= CSUM_TCP | CSUM_UDP;
5924                                         else
5925                                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
5926                                 }
5927                                 if (sc->re_rx_cstag) {
5928                                         ifp->if_capenable |= IFCAP_RXCSUM;
5929                                         CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) |RL_RxChkSum);
5930                                 }
5931                         }
5932                 }
5933         } else if (macver == 0x3C800000) {
5934                 //disable clock request.
5935                 pci_write_config(sc->dev, 0x81, 0x00, 1);
5936 
5937                 /*set configuration space offset 0x70f to 0x27*/
5938                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
5939                 Data32 &=0xC0FFFFFF;
5940                 Data32 |= (0x27 << 24);
5941                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
5942 
5943                 re_eri_write(sc, 0x1EC, 1, 0x07, ERIAR_ASF);
5944 
5945                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
5946                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
5947                 if (sc->re_type == MACFG_28)
5948                         CSR_WRITE_1(sc, 0xD1, 0x20);
5949 
5950                 if (ifp->if_mtu > ETHERMTU) {
5951                         CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) | BIT_2); //Jumbo_en0
5952                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | (1<<1)); //Jumbo_en1
5953 
5954                         data8 = pci_read_config(sc->dev, 0x79, 1);
5955                         data8 &= ~0x70;
5956                         data8 |= 0x20;
5957                         pci_write_config(sc->dev, 0x79, data8, 1);
5958                         ifp->if_capenable &= ~IFCAP_HWCSUM;
5959                         CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) & ~RL_RxChkSum);
5960                         ifp->if_hwassist &= ~RE_CSUM_FEATURES;
5961                 } else {
5962                         CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_2); //Jumbo_en0
5963                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) & ~(1<<1)); //Jumbo_en1
5964                         data8 = pci_read_config(sc->dev, 0x79, 1);
5965                         data8 &= ~0x70;
5966                         data8 |= 0x50;
5967                         pci_write_config(sc->dev, 0x79, data8, 1);
5968                         if (sc->re_tx_cstag) {
5969                                 ifp->if_capenable |= IFCAP_TXCSUM;
5970                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
5971                         }
5972                         if (sc->re_rx_cstag) {
5973                                 ifp->if_capenable |= IFCAP_RXCSUM;
5974                                 CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) |RL_RxChkSum);
5975                         }
5976                 }
5977         } else if (macver == 0x28000000) {
5978                 //disable clock request.
5979                 pci_write_config(sc->dev, 0x81, 0x00, 1);
5980 
5981                 /*set configuration space offset 0x70f to 0x13*/
5982                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
5983                 Data32 &=0xC0FFFFFF;
5984                 Data32 |= (0x27 << 24);
5985                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
5986 
5987                 CSR_WRITE_1(sc, RE_TDFNR, 0x8);
5988 
5989                 CSR_WRITE_1(sc, 0xD1, CSR_READ_1(sc, 0xD1) | 0x02);
5990 
5991                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
5992                 CSR_WRITE_1(sc, RE_DBG_reg, CSR_READ_1(sc, RE_DBG_reg)|0x82);
5993 
5994                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
5995 
5996                 if (ifp->if_mtu > ETHERMTU) {
5997                         CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) | BIT_2); //Jumbo_en0
5998                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | (1<<1)); //Jumbo_en1
5999 
6000                         data8 = pci_read_config(sc->dev, 0x79, 1);
6001                         data8 &= ~0x70;
6002                         data8 |= 0x20;
6003                         pci_write_config(sc->dev, 0x79, data8, 1);
6004                         ifp->if_capenable &= ~IFCAP_HWCSUM;
6005                         CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) & ~RL_RxChkSum);
6006                         ifp->if_hwassist &= ~RE_CSUM_FEATURES;
6007 
6008                 } else {
6009                         CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_2); //Jumbo_en0
6010                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) & ~(1<<1)); //Jumbo_en1
6011                         data8 = pci_read_config(sc->dev, 0x79, 1);
6012                         data8 &= ~0x70;
6013                         data8 |= 0x50;
6014                         pci_write_config(sc->dev, 0x79, data8, 1);
6015                         if (sc->re_tx_cstag) {
6016                                 ifp->if_capenable |= IFCAP_TXCSUM;
6017                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
6018                         }
6019                         if (sc->re_rx_cstag) {
6020                                 ifp->if_capenable |= IFCAP_RXCSUM;
6021                                 CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) |RL_RxChkSum);
6022                         }
6023                 }
6024 
6025                 if (sc->re_type == MACFG_31) {
6026                         CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~(1<<4));
6027 
6028                         MP_WriteEPhyUshort(sc, 0x01, 0x7C7F);
6029                         MP_WriteEPhyUshort(sc, 0x02, 0x011F);
6030                         MP_WriteEPhyUshort(sc, 0x06, 0xB271);
6031                         MP_WriteEPhyUshort(sc, 0x07, 0xCE00);
6032                 } else if (sc->re_type == MACFG_32) {
6033                         MP_WriteEPhyUshort(sc, 0x01, 0x7C7D);
6034                         MP_WriteEPhyUshort(sc, 0x02, 0x091F);
6035                         MP_WriteEPhyUshort(sc, 0x03, 0xC5BA);
6036                         MP_WriteEPhyUshort(sc, 0x06, 0xB279);
6037                         MP_WriteEPhyUshort(sc, 0x07, 0xAF00);
6038                         MP_WriteEPhyUshort(sc, 0x1E, 0xB8EB);
6039                 } else if (sc->re_type == MACFG_33) {
6040                         CSR_WRITE_1(sc, RE_CFG1, CSR_READ_1(sc, RE_CFG1)|0x10);
6041 
6042                         MP_WriteEPhyUshort(sc, 0x01, 0x6C7F);
6043                         MP_WriteEPhyUshort(sc, 0x02, 0x011F);
6044                         ClearAndSetPCIePhyBit(sc,
6045                                               0x03,
6046                                               0xFFF0,
6047                                               0x01B0
6048                                              );
6049                         MP_WriteEPhyUshort(sc, 0x1A, 0x0546);
6050                         MP_WriteEPhyUshort(sc, 0x1C, 0x80C4);
6051                         MP_WriteEPhyUshort(sc, 0x1D, 0x78E5);
6052                         MP_WriteEPhyUshort(sc, 0x0A, 0x8100);
6053                 }
6054         } else if (macver == 0x28800000) {
6055                 /* disable clock request. */
6056                 pci_write_config(sc->dev, 0x81, 0x00, 1);
6057 
6058                 /*set configuration space offset 0x70f to 0x17*/
6059                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
6060                 Data32 &=0xC0FFFFFF;
6061                 Data32 |= (0x27 << 24);
6062                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
6063 
6064                 CSR_WRITE_1(sc, RE_TDFNR, 0x8);
6065                 if (sc->re_dash &&
6066                     (sc->re_type == MACFG_63 || sc->re_type == MACFG_64))
6067                         CSR_WRITE_1(sc, RE_TDFNR, 0x1);
6068 
6069                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
6070                 CSR_WRITE_1(sc, RE_DBG_reg, CSR_READ_1(sc, RE_DBG_reg)|0x82);
6071 
6072                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
6073 
6074                 if (ifp->if_mtu > ETHERMTU) {
6075                         CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) | BIT_2); //Jumbo_en0
6076                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | (1<<1)); //Jumbo_en1
6077 
6078                         data8 = pci_read_config(sc->dev, 0x79, 1);
6079                         data8 &= ~0x70;
6080                         data8 |= 0x20;
6081                         pci_write_config(sc->dev, 0x79, data8, 1);
6082                         ifp->if_capenable &= ~IFCAP_HWCSUM;
6083                         CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) & ~RL_RxChkSum);
6084                         ifp->if_hwassist &= ~RE_CSUM_FEATURES;
6085 
6086                 } else {
6087                         CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_2); //Jumbo_en0
6088                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) & ~(1<<1)); //Jumbo_en1
6089                         data8 = pci_read_config(sc->dev, 0x79, 1);
6090                         data8 &= ~0x70;
6091                         data8 |= 0x50;
6092                         pci_write_config(sc->dev, 0x79, data8, 1);
6093                         if (sc->re_tx_cstag) {
6094                                 ifp->if_capenable |= IFCAP_TXCSUM;
6095                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
6096                         }
6097                         if (sc->re_rx_cstag) {
6098                                 ifp->if_capenable |= IFCAP_RXCSUM;
6099                                 CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) |RL_RxChkSum);
6100                         }
6101                 }
6102 
6103                 if (sc->re_type == MACFG_65 || sc->re_type == MACFG_66) {
6104                         SetPCIePhyBit(sc, 0x0B, (BIT_3 | BIT_6));
6105 
6106                         ClearAndSetPCIePhyBit(sc,
6107                                               0x19,
6108                                               BIT_5,
6109                                               (BIT_4 | BIT_6)
6110                                              );
6111 
6112                         ClearAndSetPCIePhyBit(sc,
6113                                               0x0C,
6114                                               BIT_8,
6115                                               BIT_5
6116                                              );
6117 
6118                         ClearPCIePhyBit(sc, 0x10, (BIT_2));
6119                 }
6120         } else if (macver == 0x2C000000) {
6121                 /* disable clock request. */
6122                 pci_write_config(sc->dev, 0x81, 0x00, 1);
6123 
6124                 /*set configuration space offset 0x70f to 0x20*/
6125                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
6126                 Data32 &=0xC0FFFFFF;
6127                 Data32 |= (0x27 << 24);
6128                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
6129 
6130                 CSR_WRITE_1(sc, 0xF3, CSR_READ_1(sc, 0xF3)|0x20);
6131                 CSR_WRITE_1(sc, 0xF3, CSR_READ_1(sc, 0xF3)& ~0x20);
6132 
6133                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0)|0xC0);
6134                 CSR_WRITE_1(sc, 0xF1, CSR_READ_1(sc, 0xF1)|0x73);
6135                 CSR_WRITE_1(sc, RE_CFG5, (CSR_READ_1(sc, RE_CFG5)& ~0x08));
6136                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
6137 
6138                 CSR_WRITE_1(sc, RE_TDFNR, 0x8);
6139 
6140                 if (sc->re_type == MACFG_36 || sc->re_type == MACFG_37) {
6141                         /* set EPHY registers */
6142                         data16 = MP_ReadEPhyUshort(sc, 0x00) & ~0x0200;
6143                         data16 |= 0x0100;
6144                         MP_WriteEPhyUshort(sc, 0x00, data16);
6145 
6146                         data16 = MP_ReadEPhyUshort(sc, 0x00);
6147                         data16 |= 0x0004;
6148                         MP_WriteEPhyUshort(sc, 0x00, data16);
6149 
6150                         data16 = MP_ReadEPhyUshort(sc, 0x06) & ~0x0002;
6151                         data16 |= 0x0001;
6152                         MP_WriteEPhyUshort(sc, 0x06, data16);
6153 
6154                         data16 = MP_ReadEPhyUshort(sc, 0x06);
6155                         data16 |= 0x0030;
6156                         MP_WriteEPhyUshort(sc, 0x06, data16);
6157 
6158                         data16 = MP_ReadEPhyUshort(sc, 0x07);
6159                         data16 |= 0x2000;
6160                         MP_WriteEPhyUshort(sc, 0x07, data16);
6161 
6162                         data16 = MP_ReadEPhyUshort(sc, 0x00);
6163                         data16 |= 0x0020;
6164                         MP_WriteEPhyUshort(sc, 0x00, data16);
6165 
6166                         data16 = MP_ReadEPhyUshort(sc, 0x03) & ~0x5800;
6167                         data16 |= 0x2000;
6168                         MP_WriteEPhyUshort(sc, 0x03, data16);
6169 
6170                         data16 = MP_ReadEPhyUshort(sc, 0x03);
6171                         data16 |= 0x0001;
6172                         MP_WriteEPhyUshort(sc, 0x03, data16);
6173 
6174                         data16 = MP_ReadEPhyUshort(sc, 0x01) & ~0x0800;
6175                         data16 |= 0x1000;
6176                         MP_WriteEPhyUshort(sc, 0x01, data16);
6177 
6178                         data16 = MP_ReadEPhyUshort(sc, 0x07);
6179                         data16 |= 0x4000;
6180                         MP_WriteEPhyUshort(sc, 0x07, data16);
6181 
6182                         data16 = MP_ReadEPhyUshort(sc, 0x1E);
6183                         data16 |= 0x2000;
6184                         MP_WriteEPhyUshort(sc, 0x1E, data16);
6185 
6186                         MP_WriteEPhyUshort(sc, 0x19, 0xFE6C);
6187 
6188                         data16 = MP_ReadEPhyUshort(sc, 0x0A);
6189                         data16 |= 0x0040;
6190                         MP_WriteEPhyUshort(sc, 0x0A, data16);
6191 
6192                         if (ifp->if_mtu > ETHERMTU) {
6193                                 CSR_WRITE_1 (sc, RE_MTPS, 0x24);
6194                                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) | BIT_2);
6195                                 CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) |0x01);
6196                                 data8 = pci_read_config(sc->dev, 0x79, 1);
6197                                 data8 &= ~0x70;
6198                                 data8 |= 0x20;
6199                                 pci_write_config(sc->dev, 0x79, data8, 1);
6200                                 ifp->if_capenable &= ~IFCAP_HWCSUM;
6201                                 CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) & ~RL_RxChkSum);
6202                                 ifp->if_hwassist &= ~RE_CSUM_FEATURES;
6203                         } else {
6204                                 CSR_WRITE_1 (sc, RE_MTPS, 0x0c);
6205                                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_2);
6206                                 CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) & ~0x01);
6207                                 data8 = pci_read_config(sc->dev, 0x79, 1);
6208                                 data8 &= ~0x70;
6209                                 data8 |= 0x50;
6210                                 pci_write_config(sc->dev, 0x79, data8, 1);
6211 
6212                                 if (sc->re_tx_cstag) {
6213                                         ifp->if_capenable |= IFCAP_TXCSUM;
6214                                         ifp->if_hwassist |= RE_CSUM_FEATURES;
6215                                 }
6216                                 if (sc->re_rx_cstag) {
6217                                         ifp->if_capenable |= IFCAP_RXCSUM;
6218                                         CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) |RL_RxChkSum);
6219                                 }
6220                         }
6221                 }
6222         } else if (macver == 0x2C800000) {
6223                 /* disable clock request. */
6224                 pci_write_config(sc->dev, 0x81, 0x00, 1);
6225 
6226                 /*set configuration space offset 0x70f to 0x27*/
6227                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
6228                 Data32 &=0xC0FFFFFF;
6229                 Data32 |= (0x27 << 24);
6230                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
6231 
6232                 data8 = pci_read_config(sc->dev, 0x79, 1);
6233                 data8 &= ~0x70;
6234                 data8 |= 0x50;
6235                 pci_write_config(sc->dev, 0x79, data8, 1);
6236 
6237                 CSR_WRITE_1(sc, RE_TDFNR, 0x8);
6238 
6239                 re_eri_write(sc, 0xC0, 2, 0x0000, ERIAR_ExGMAC);
6240                 re_eri_write(sc, 0xB8, 4, 0x00000000, ERIAR_ExGMAC);
6241                 re_eri_write(sc, 0xC8, 4, 0x00100002, ERIAR_ExGMAC);
6242                 re_eri_write(sc, 0xE8, 4, 0x00100006, ERIAR_ExGMAC);
6243                 Data32 = re_eri_read(sc, 0xdc, 4, ERIAR_ExGMAC);
6244                 Data32 &= ~BIT_0;
6245                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
6246                 Data32 |= BIT_0;
6247                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
6248 
6249                 Data32 = re_eri_read(sc, 0xD4, 4, ERIAR_ExGMAC);
6250                 Data32 |= (BIT_8 | BIT_9 | BIT_10 | BIT_11 | BIT_12);
6251                 re_eri_write(sc, 0xD4, 4, Data32, ERIAR_ExGMAC);
6252                 if (sc ->re_type == MACFG_39) {
6253                         Data32 = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
6254                         Data32 |= BIT_4;
6255                         re_eri_write(sc, 0x1B0, 4, Data32, ERIAR_ExGMAC);
6256                         re_eri_write(sc, 0xCC, 4, 0x00000050, ERIAR_ExGMAC);
6257                         re_eri_write(sc, 0xD0, 4, 0x07ff0060, ERIAR_ExGMAC);
6258                 }
6259 
6260                 CSR_WRITE_4(sc, RE_TXCFG, CSR_READ_4(sc, RE_TXCFG) |BIT_7);
6261                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) & ~BIT_7);
6262                 CSR_WRITE_1(sc, 0x1B, CSR_READ_1(sc, 0x1B) & ~0x07);
6263 
6264                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
6265 
6266                 if (sc ->re_type == MACFG_38) {
6267                         CSR_WRITE_4(sc, 0xB0, 0xEE480010);
6268                         CSR_WRITE_1(sc, 0x1A, CSR_READ_1(sc, 0x1A) & ~(BIT_2 |BIT_3));
6269                         re_eri_write(sc, 0x1DC, 1, 0x64, ERIAR_ExGMAC);
6270 
6271                         MP_WriteEPhyUshort(sc, 0x06, 0xF020);
6272                         MP_WriteEPhyUshort(sc, 0x07, 0x01FF);
6273                         MP_WriteEPhyUshort(sc, 0x00, 0x5027);
6274                         MP_WriteEPhyUshort(sc, 0x01, 0x0003);
6275                         MP_WriteEPhyUshort(sc, 0x02, 0x2D16);
6276                         MP_WriteEPhyUshort(sc, 0x03, 0x6D49);
6277                         MP_WriteEPhyUshort(sc, 0x08, 0x0006);
6278                         MP_WriteEPhyUshort(sc, 0x0A, 0x00C8);
6279                 }
6280 
6281                 data16 = MP_ReadEPhyUshort(sc, 0x09);
6282                 data16 |= BIT_7;
6283                 MP_WriteEPhyUshort(sc, 0x09, data16);
6284 
6285                 data16 = MP_ReadEPhyUshort(sc, 0x19);
6286                 data16 |= (BIT_2 | BIT_5 | BIT_9);
6287                 MP_WriteEPhyUshort(sc, 0x19, data16);
6288 
6289                 SetPCIePhyBit(sc, 0x00, BIT_3);
6290                 ClearAndSetPCIePhyBit(sc,
6291                                       0x0C,
6292                                       (BIT_13|BIT_12|BIT_11|BIT_10|BIT_8|BIT_7|BIT_6|BIT_5|BIT_4),
6293                                       BIT_9
6294                                      );
6295 
6296                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) | BIT_5);
6297                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
6298 
6299                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | BIT_6);
6300                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | BIT_6);
6301 
6302                 CSR_WRITE_1 (sc, RE_MTPS, 0x27);
6303                 ifp->if_capenable &= ~IFCAP_HWCSUM;
6304                 ifp->if_hwassist &= ~RE_CSUM_FEATURES;
6305         } else if (macver == 0x24000000) {
6306                 if (pci_read_config(sc->dev, 0x81, 1)==1) {
6307                         CSR_WRITE_1(sc, RE_DBG_reg, 0x98);
6308                         CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) | 0x80);
6309                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | 0x04);
6310                         pci_write_config(sc->dev, 0x81, 1, 1);
6311                 }
6312                 data8 = pci_read_config(sc->dev, 0x79, 1);
6313                 data8 &= ~0x70;
6314                 data8 |= 0x50;
6315                 pci_write_config(sc->dev, 0x79, data8, 1);
6316 
6317                 /*set configuration space offset 0x70f to 0x3F*/
6318                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
6319                 Data32 &=0xC0FFFFFF;
6320                 Data32 |= (0x3F << 24);
6321                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
6322 
6323                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
6324 
6325                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
6326 
6327                 MP_WriteEPhyUshort(sc, 0x06, 0xAF25);
6328                 MP_WriteEPhyUshort(sc, 0x07, 0x8E68);
6329         } else if (macver == 0x40800000) {
6330                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | 0x80);
6331                 CSR_WRITE_1(sc, 0xF1, CSR_READ_1(sc, 0xF1) | 0x28);
6332                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) | 0x0C);
6333                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) & ~BIT_7);
6334                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | 0x40);
6335                 CSR_WRITE_2(sc, 0xE0, CSR_READ_2(sc, 0xE0) & ~0xDF9C);
6336                 CSR_WRITE_1(sc, 0xD1, CSR_READ_1(sc, 0xD1) | 0x02);
6337 
6338                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
6339 
6340                 if (sc->re_type == MACFG_42) {
6341                         /* set EPHY registers */
6342                         SetPCIePhyBit(sc, 0x07, BIT_14);
6343                         SetPCIePhyBit(sc, 0x19, BIT_9);
6344                         SetPCIePhyBit(sc, 0x19, BIT_5);
6345                         SetPCIePhyBit(sc, 0x1E, BIT_13);
6346                         SetPCIePhyBit(sc, 0x03, BIT_0);
6347                         SetPCIePhyBit(sc, 0x19, BIT_8);
6348                         SetPCIePhyBit(sc, 0x19, BIT_2);
6349                         SetPCIePhyBit(sc, 0x0A, BIT_5);
6350                         SetPCIePhyBit(sc, 0x05, BIT_13);
6351                 }
6352                 if (sc->re_type == MACFG_43) {
6353                         SetPCIePhyBit(sc, 0x07, BIT_14);
6354                         SetPCIePhyBit(sc, 0x19, BIT_9);
6355                         SetPCIePhyBit(sc, 0x19, BIT_5);
6356                         SetPCIePhyBit(sc, 0x1E, BIT_13);
6357                         SetPCIePhyBit(sc, 0x03, BIT_0);
6358                         SetPCIePhyBit(sc, 0x19, BIT_8);
6359                         SetPCIePhyBit(sc, 0x19, BIT_2);
6360                         SetPCIePhyBit(sc, 0x0A, BIT_5);
6361                         SetPCIePhyBit(sc, 0x1E, BIT_15);
6362                         SetPCIePhyBit(sc, 0x05, BIT_13);
6363                 }
6364         } else if (macver == 0x44000000) {
6365 
6366                 CSR_WRITE_2(sc, 0xE0, CSR_READ_2(sc, 0xE0) & ~0xDF9C);
6367 
6368                 re_eri_write(sc, 0xC8, 4, 0x00000002, ERIAR_ExGMAC);
6369                 re_eri_write(sc, 0xE8, 4, 0x00000006, ERIAR_ExGMAC);
6370 
6371                 Data32 = re_eri_read(sc, 0xD4, 4, ERIAR_ExGMAC);
6372                 Data32 |= BIT_11 | BIT_10;
6373                 re_eri_write(sc, 0xD4, 4, Data32, ERIAR_ExGMAC);
6374 
6375                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
6376 
6377                 /* set EPHY registers */
6378                 MP_WriteEPhyUshort(sc, 0x19, 0xFF64);
6379 
6380                 CSR_WRITE_1 (sc, RE_MTPS, 0x27);
6381         } else if (macver == 0x48000000) {
6382                 /*set configuration space offset 0x70f to 0x27*/
6383                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
6384                 Data32 &=0xC0FFFFFF;
6385                 Data32 |= (0x27 << 24);
6386                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
6387 
6388                 data8 = pci_read_config(sc->dev, 0x79, 1);
6389                 data8 &= ~0x70;
6390                 data8 |= 0x50;
6391                 pci_write_config(sc->dev, 0x79, data8, 1);
6392 
6393                 CSR_WRITE_1(sc, RE_TDFNR, 0x8);
6394 
6395                 Data32 = re_eri_read(sc, 0xD4, 4, ERIAR_ExGMAC);
6396                 Data32 |= (BIT_8 | BIT_9 | BIT_10 | BIT_11 | BIT_12);
6397                 re_eri_write(sc, 0xD4, 4, Data32, ERIAR_ExGMAC);
6398                 re_eri_write(sc, 0xC0, 2, 0x0000, ERIAR_ExGMAC);
6399                 re_eri_write(sc, 0xB8, 4, 0x00000000, ERIAR_ExGMAC);
6400                 re_eri_write(sc, 0xC8, 4, 0x00100002, ERIAR_ExGMAC);
6401                 re_eri_write(sc, 0xE8, 4, 0x00100006, ERIAR_ExGMAC);
6402                 Data32 = re_eri_read(sc, 0xdc, 4, ERIAR_ExGMAC);
6403                 Data32 &= ~BIT_0;
6404                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
6405                 Data32 |= BIT_0;
6406                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
6407                 Data32 = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
6408                 Data32 |= BIT_4;
6409                 re_eri_write(sc, 0x1B0, 4, Data32, ERIAR_ExGMAC);
6410                 re_eri_write(sc, 0xCC, 4, 0x00000050, ERIAR_ExGMAC);
6411                 re_eri_write(sc, 0xD0, 4, 0x00000060, ERIAR_ExGMAC);
6412                 Data32 = re_eri_read(sc, 0x1D0, 4, ERIAR_ExGMAC);
6413                 Data32 |= BIT_4;
6414                 re_eri_write(sc, 0x1D0, 4, Data32, ERIAR_ExGMAC);
6415 
6416                 CSR_WRITE_4(sc, RE_TXCFG, CSR_READ_4(sc, RE_TXCFG) | BIT_7);
6417                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) & ~BIT_7);
6418                 CSR_WRITE_1(sc, 0x1B, CSR_READ_1(sc, 0x1B) & ~0x07);
6419 
6420                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
6421 
6422                 if (sc->re_type == MACFG_50) {
6423                         data16 = MP_ReadEPhyUshort(sc, 0x06);
6424                         data16 &= ~(BIT_7 | BIT_6);
6425                         data16 |= BIT_5;
6426                         MP_WriteEPhyUshort(sc, 0x06, data16);
6427 
6428                         data16 = MP_ReadEPhyUshort(sc, 0x08);
6429                         data16 &= ~BIT_0;
6430                         data16 |= BIT_1;
6431                         MP_WriteEPhyUshort(sc, 0x08, data16);
6432                 }
6433 
6434                 data16 = MP_ReadEPhyUshort(sc, 0x09);
6435                 data16 |= BIT_7;
6436                 MP_WriteEPhyUshort(sc, 0x09, data16);
6437 
6438                 data16 = MP_ReadEPhyUshort(sc, 0x19);
6439                 data16 |= (BIT_2 | BIT_5 | BIT_9);
6440                 MP_WriteEPhyUshort(sc, 0x19, data16);
6441 
6442                 SetPCIePhyBit(sc, 0x00, BIT_3);
6443                 ClearAndSetPCIePhyBit(sc,
6444                                       0x0C,
6445                                       (BIT_13|BIT_12|BIT_11|BIT_10|BIT_8|BIT_7|BIT_6|BIT_5|BIT_4),
6446                                       BIT_9
6447                                      );
6448 
6449                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
6450 
6451                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | BIT_6);
6452                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | BIT_6);
6453 
6454                 CSR_WRITE_1 (sc, RE_MTPS, 0x27);
6455 
6456                 if (ifp->if_mtu > ETHERMTU) {
6457                         ifp->if_capenable &= ~IFCAP_HWCSUM;
6458                         ifp->if_hwassist &= ~RE_CSUM_FEATURES;
6459                 } else {
6460                         if (sc->re_tx_cstag) {
6461                                 ifp->if_capenable |= IFCAP_TXCSUM;
6462                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
6463                         }
6464                         if (sc->re_rx_cstag) {
6465                                 ifp->if_capenable |= IFCAP_RXCSUM;
6466                         }
6467                 }
6468         } else if (macver == 0x48800000) {
6469                 /*set configuration space offset 0x70f to 0x27*/
6470                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
6471                 Data32 &=0xC0FFFFFF;
6472                 Data32 |= (0x27 << 24);
6473                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
6474 
6475                 data8 = pci_read_config(sc->dev, 0x79, 1);
6476                 data8 &= ~0x70;
6477                 data8 |= 0x50;
6478                 pci_write_config(sc->dev, 0x79, data8, 1);
6479 
6480                 CSR_WRITE_1(sc, RE_TDFNR, 0x8);
6481 
6482                 Data32 = re_eri_read(sc, 0xD4, 4, ERIAR_ExGMAC);
6483                 Data32 |= BIT_11 | BIT_10;
6484                 re_eri_write(sc, 0xD4, 4, Data32, ERIAR_ExGMAC);
6485                 re_eri_write(sc, 0xC0, 2, 0x0000, ERIAR_ExGMAC);
6486                 re_eri_write(sc, 0xB8, 4, 0x00000000, ERIAR_ExGMAC);
6487                 re_eri_write(sc, 0xC8, 4, 0x00100002, ERIAR_ExGMAC);
6488                 re_eri_write(sc, 0xE8, 4, 0x00100006, ERIAR_ExGMAC);
6489                 Data32 = re_eri_read(sc, 0xdc, 4, ERIAR_ExGMAC);
6490                 Data32 &= ~BIT_0;
6491                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
6492                 Data32 |= BIT_0;
6493                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
6494                 Data32 = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
6495                 Data32 |= BIT_4;
6496                 re_eri_write(sc, 0x1B0, 4, Data32, ERIAR_ExGMAC);
6497                 re_eri_write(sc, 0xCC, 4, 0x00000050, ERIAR_ExGMAC);
6498                 re_eri_write(sc, 0xD0, 4, 0x00000060, ERIAR_ExGMAC);
6499                 Data32 = re_eri_read(sc, 0x1D0, 4, ERIAR_ExGMAC);
6500                 Data32 |= BIT_4;
6501                 re_eri_write(sc, 0x1D0, 4, Data32, ERIAR_ExGMAC);
6502 
6503                 CSR_WRITE_4(sc, RE_TXCFG, CSR_READ_4(sc, RE_TXCFG) | BIT_7);
6504                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) & ~BIT_7);
6505                 //CSR_WRITE_1(sc, 0x1B, CSR_READ_1(sc, 0x1B) & ~0x07);
6506 
6507                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
6508 
6509                 data16 = MP_ReadEPhyUshort(sc, 0x06);
6510                 data16 &= ~(BIT_7 | BIT_6);
6511                 data16 |= BIT_5;
6512                 MP_WriteEPhyUshort(sc, 0x06, data16);
6513 
6514                 MP_WriteEPhyUshort(sc, 0x0f, 0x5200);
6515 
6516                 data16 = MP_ReadEPhyUshort(sc, 0x1e);
6517                 data16 |= BIT_14;
6518                 MP_WriteEPhyUshort(sc, 0x1e, data16);
6519 
6520                 data16 = MP_ReadEPhyUshort(sc, 0x19);
6521                 data16 |= (BIT_2 | BIT_5 | BIT_9);
6522                 MP_WriteEPhyUshort(sc, 0x19, data16);
6523 
6524                 SetPCIePhyBit(sc, 0x00, BIT_3);
6525                 ClearAndSetPCIePhyBit(sc,
6526                                       0x0C,
6527                                       (BIT_13|BIT_12|BIT_11|BIT_10|BIT_8|BIT_7|BIT_6|BIT_5|BIT_4),
6528                                       BIT_9
6529                                      );
6530 
6531                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
6532 
6533                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | BIT_6);
6534                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | BIT_6);
6535 
6536                 CSR_WRITE_1 (sc, RE_MTPS, 0x27);
6537 
6538                 if (ifp->if_mtu > ETHERMTU) {
6539                         ifp->if_capenable &= ~IFCAP_HWCSUM;
6540                         ifp->if_hwassist &= ~RE_CSUM_FEATURES;
6541                 } else {
6542                         if (sc->re_tx_cstag) {
6543                                 ifp->if_capenable |= IFCAP_TXCSUM;
6544                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
6545                         }
6546                         if (sc->re_rx_cstag) {
6547                                 ifp->if_capenable |= IFCAP_RXCSUM;
6548                         }
6549                 }
6550         } else if (macver == 0x44800000) {
6551                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | 0x80);
6552                 CSR_WRITE_1(sc, 0xF1, CSR_READ_1(sc, 0xF1) | 0x28);
6553                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) | 0x0C);
6554                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) & ~BIT_7);
6555                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | 0x40);
6556                 CSR_WRITE_2(sc, 0xE0, CSR_READ_2(sc, 0xE0) & ~0xDF9C);
6557 
6558                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
6559         } else if (macver == 0x4C000000 || macver == 0x50800000 ||
6560                    macver == 0x5C800000 || macver == 0x54000000) {
6561                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) | BIT_5);
6562 
6563                 if (sc->re_type == MACFG_59) {
6564                         MP_WriteMcuAccessRegWord(sc, 0xD3C0, 0x0B00);
6565                         MP_WriteMcuAccessRegWord(sc, 0xD3C2, 0x0000);
6566                 }
6567 
6568                 if (sc->re_type == MACFG_68 || sc->re_type == MACFG_69) {
6569                         MP_WriteMcuAccessRegWord(sc, 0xD400, MP_ReadMcuAccessRegWord(sc, 0xD400) & ~(BIT_0));
6570 
6571                         data16 = MP_ReadMcuAccessRegWord(sc, 0xE63E);
6572                         data16 &= ~(BIT_3 | BIT_2 | BIT_1);
6573                         MP_WriteMcuAccessRegWord(sc, 0xE63E, data16);
6574                         data16 |= (BIT_0);
6575                         MP_WriteMcuAccessRegWord(sc, 0xE63E, data16);
6576                         data16 &= ~(BIT_0);
6577                         MP_WriteMcuAccessRegWord(sc, 0xE63E, data16);
6578                         MP_WriteMcuAccessRegWord(sc, 0xC094, 0x0);
6579                         MP_WriteMcuAccessRegWord(sc, 0xC09E, 0x0);
6580 
6581                         MP_WriteMcuAccessRegWord(sc, 0xE098, 0x0AA2);
6582                 }
6583 
6584                 /*set configuration space offset 0x70f to 0x17*/
6585                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
6586                 Data32 &=0xC0FFFFFF;
6587                 Data32 |= (0x27 << 24);
6588                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
6589 
6590                 data8 = pci_read_config(sc->dev, 0x79, 1);
6591                 data8 &= ~0x70;
6592                 data8 |= 0x50;
6593                 pci_write_config(sc->dev, 0x79, data8, 1);
6594 
6595                 CSR_WRITE_1(sc, RE_TDFNR, 0x4);
6596 
6597                 if (sc->re_type == MACFG_56 || sc->re_type == MACFG_57) {
6598                         Data32 = MP_ReadPciEConfigSpace(sc, 0x2710);
6599                         Data32 &=0xFFFF0FFF;
6600                         Data32 |= (0x04 << 12);
6601                         MP_WritePciEConfigSpace(sc, 0x2710, Data32);
6602                 }
6603 
6604                 if (sc->re_type == MACFG_68 || sc->re_type == MACFG_69) {
6605                         Data32 = re_eri_read(sc, 0xD4, 4, ERIAR_ExGMAC);
6606                         Data32 |= (BIT_8 | BIT_9 | BIT_10 | BIT_11 | BIT_12);
6607                         re_eri_write(sc, 0xD4, 4, Data32, ERIAR_ExGMAC);
6608 
6609                         Data32 = re_eri_read(sc, 0xDC, 4, ERIAR_ExGMAC);
6610                         Data32 |= (BIT_2| BIT_3 | BIT_4);
6611                         re_eri_write(sc, 0xDC, 4, Data32, ERIAR_ExGMAC);
6612                 } else {
6613                         Data32 = re_eri_read(sc, 0xD4, 4, ERIAR_ExGMAC);
6614                         Data32 |= (BIT_7 | BIT_8 | BIT_9 | BIT_10 | BIT_11 | BIT_12);
6615                         re_eri_write(sc, 0xD4, 4, Data32, ERIAR_ExGMAC);
6616                 }
6617 
6618                 re_eri_write(sc, 0xC8, 4, 0x00080002, ERIAR_ExGMAC);
6619                 re_eri_write(sc, 0xCC, 1, 0x38, ERIAR_ExGMAC);
6620                 re_eri_write(sc, 0xD0, 1, 0x48, ERIAR_ExGMAC);
6621                 re_eri_write(sc, 0xE8, 4, 0x00100006, ERIAR_ExGMAC);
6622 
6623                 if (sc->re_type == MACFG_68 || sc->re_type == MACFG_69)
6624                         MP_WriteMcuAccessRegWord(sc, 0xE054, 0xFC01);
6625 
6626                 re_eri_write(sc, 0x5F0, 4, 0x4F87, ERIAR_ExGMAC);
6627 
6628                 Data32 = re_eri_read(sc, 0xdc, 4, ERIAR_ExGMAC);
6629                 Data32 &= ~BIT_0;
6630                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
6631                 Data32 |= BIT_0;
6632                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
6633 
6634                 Data32 = re_eri_read(sc, 0x2FC, 4, ERIAR_ExGMAC);
6635                 Data32 &= ~(BIT_0 | BIT_1 | BIT_2);
6636                 Data32 |= (BIT_0);
6637                 re_eri_write(sc, 0x2FC, 4, Data32, ERIAR_ExGMAC);
6638 
6639                 Data32 = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
6640                 Data32 &= ~BIT_12;
6641                 re_eri_write(sc, 0x1B0, 4, Data32, ERIAR_ExGMAC);
6642 
6643                 CSR_WRITE_4(sc, RE_TXCFG, CSR_READ_4(sc, RE_TXCFG) | BIT_7);
6644                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) & ~BIT_7);
6645                 CSR_WRITE_1(sc, 0x1B, CSR_READ_1(sc, 0x1B) & ~0x07);
6646 
6647                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
6648 
6649                 if (sc->re_type == MACFG_56 || sc->re_type == MACFG_57) {
6650                         ClearPCIePhyBit(sc, 0x00, BIT_3);
6651                         ClearAndSetPCIePhyBit(sc,
6652                                               0x0C,
6653                                               (BIT_13|BIT_12|BIT_10|BIT_9|BIT_8|BIT_7|BIT_6|BIT_4),
6654                                               (BIT_11|BIT_5)
6655                                              );
6656                         SetPCIePhyBit(sc, 0x1E, BIT_0);
6657                         ClearPCIePhyBit(sc, 0x19, BIT_15);
6658                 }  else if (sc->re_type == MACFG_58) {
6659                         SetPCIePhyBit(sc, 0x00, (BIT_3));
6660                         ClearAndSetPCIePhyBit(sc,
6661                                               0x0C,
6662                                               (BIT_13 | BIT_12 | BIT_11 | BIT_10 | BIT_8 | BIT_7 | BIT_6 | BIT_5 | BIT_4),
6663                                               BIT_9
6664                                              );
6665                 }  else if (sc->re_type == MACFG_59) {
6666                         ClearPCIePhyBit(sc, 0x00, BIT_3);
6667                         ClearAndSetPCIePhyBit(sc,
6668                                               0x0C,
6669                                               (BIT_13 | BIT_12 | BIT_10 | BIT_9 | BIT_8 | BIT_7 | BIT_6 | BIT_4),
6670                                               (BIT_5 | BIT_11)
6671                                              );
6672 
6673                         SetPCIePhyBit(sc, 0x1E, BIT_0);
6674                         ClearPCIePhyBit(sc, 0x19, BIT_15);
6675                         MP_WriteEPhyUshort(sc, 0x19, 0x7C00);
6676                         MP_WriteEPhyUshort(sc, 0x1E, 0x20EB);
6677                         MP_WriteEPhyUshort(sc, 0x0D, 0x1666);
6678                         MP_WriteEPhyUshort(sc, 0x00, 0x10A3);
6679 
6680                         MP_WriteEPhyUshort(sc, 0x06, 0xF050);
6681 
6682                         SetPCIePhyBit(sc, 0x04, BIT_4);
6683                         ClearPCIePhyBit(sc, 0x1D, BIT_14);
6684                 } else if (sc->re_type == MACFG_60) {
6685                         ClearPCIePhyBit(sc, 0x00, BIT_3);
6686                         ClearAndSetPCIePhyBit(sc,
6687                                               0x0C,
6688                                               (BIT_13 | BIT_12 | BIT_10 | BIT_9 | BIT_8 | BIT_7 | BIT_6 | BIT_4),
6689                                               (BIT_5 | BIT_11)
6690                                              );
6691                         SetPCIePhyBit(sc, 0x1E, BIT_0);
6692                         ClearPCIePhyBit(sc, 0x19, BIT_15);
6693 
6694                         ClearPCIePhyBit(sc, 0x19, (BIT_5 | BIT_0));
6695 
6696                         SetPCIePhyBit(sc, 0x1E, BIT_13);
6697                         ClearPCIePhyBit(sc, 0x0D, BIT_8);
6698                         SetPCIePhyBit(sc, 0x0D, BIT_9);
6699                         SetPCIePhyBit(sc, 0x00, BIT_7);
6700 
6701                         SetPCIePhyBit(sc, 0x06, BIT_4);
6702 
6703                         SetPCIePhyBit(sc, 0x04, BIT_4);
6704                         SetPCIePhyBit(sc, 0x1D, BIT_14);
6705                 } else if (sc->re_type == MACFG_68 || sc->re_type == MACFG_69) {
6706                         ClearPCIePhyBit(sc, 0x1E, BIT_11);
6707 
6708                         SetPCIePhyBit(sc, 0x1E, BIT_0);
6709                         SetPCIePhyBit(sc, 0x1D, BIT_11);
6710 
6711                         MP_WriteEPhyUshort(sc, 0x05, 0x2089);
6712                         MP_WriteEPhyUshort(sc, 0x06, 0x5881);
6713 
6714                         MP_WriteEPhyUshort(sc, 0x04, 0x854A);
6715                         MP_WriteEPhyUshort(sc, 0x01, 0x068B);
6716                 }
6717 
6718                 if (sc->re_type == MACFG_60) {
6719                         data16 = MP_ReadMcuAccessRegWord(sc, 0xD3C0);
6720                         data16 &= 0xF000;
6721                         data16 |= 0x3A9;
6722                         MP_WriteMcuAccessRegWord(sc, 0xD3C0, data16);
6723 
6724                         data16 = MP_ReadMcuAccessRegWord(sc, 0xD3C2);
6725                         data16 &= 0xFF00;
6726                         MP_WriteMcuAccessRegWord(sc, 0xD3C2, data16);
6727 
6728                         data16 = MP_ReadMcuAccessRegWord(sc, 0xD3C4);
6729                         data16 |= (BIT_0);
6730                         MP_WriteMcuAccessRegWord(sc, 0xD3C4, data16);
6731                 } else if (sc->re_type == MACFG_68 || sc->re_type == MACFG_69) {
6732                         if (sc->RequireAdjustUpsTxLinkPulseTiming) {
6733                                 data16 = MP_ReadMcuAccessRegWord(sc, 0xD412);
6734                                 data16 &= ~(0x0FFF);
6735                                 data16 |= sc->SwrCnt1msIni;
6736                                 MP_WriteMcuAccessRegWord(sc, 0xD412, data16);
6737                         }
6738 
6739                         data16 = MP_ReadMcuAccessRegWord(sc, 0xE056);
6740                         data16 &= ~(BIT_7 | BIT_6 | BIT_5 | BIT_4);
6741                         data16 |= (BIT_6 | BIT_5 | BIT_4);
6742                         MP_WriteMcuAccessRegWord(sc, 0xE056, data16);
6743 
6744                         data16 = MP_ReadMcuAccessRegWord(sc, 0xE052);
6745                         data16 &= ~(BIT_14 | BIT_13);
6746                         data16 |= BIT_15;
6747                         data16 |= BIT_3;
6748                         MP_WriteMcuAccessRegWord(sc, 0xE052, data16);
6749 
6750                         data16 = MP_ReadMcuAccessRegWord(sc, 0xD420);
6751                         data16 &= ~(BIT_11 | BIT_10 | BIT_9 | BIT_8 | BIT_7 | BIT_6 | BIT_5 | BIT_4 | BIT_3 | BIT_2 | BIT_1 | BIT_0);
6752                         data16 |= 0x47F;
6753                         MP_WriteMcuAccessRegWord(sc, 0xD420, data16);
6754 
6755                         data16 = MP_ReadMcuAccessRegWord(sc, 0xE0D6);
6756                         data16 &= ~(BIT_8 | BIT_7 | BIT_6 | BIT_5 | BIT_4 | BIT_3 | BIT_2 | BIT_1 | BIT_0);
6757                         data16 |= 0x17F;
6758                         MP_WriteMcuAccessRegWord(sc, 0xE0D6, data16);
6759                 }
6760 
6761                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
6762 
6763                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | BIT_6);
6764                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | BIT_6);
6765 
6766                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) & ~BIT_3);
6767 
6768                 CSR_WRITE_1 (sc, RE_MTPS, 0x27);
6769 
6770                 if (sc->re_type == MACFG_56 || sc->re_type == MACFG_57 ||
6771                     sc->re_type == MACFG_58 || sc->re_type == MACFG_59) {
6772                         MP_WriteMcuAccessRegWord(sc, 0xC140, 0xFFFF);
6773                 } else if (sc->re_type == MACFG_68 || sc->re_type == MACFG_69) {
6774                         MP_WriteMcuAccessRegWord(sc, 0xC140, 0xFFFF);
6775                         MP_WriteMcuAccessRegWord(sc, 0xC142, 0xFFFF);
6776                 }
6777 
6778                 if (ifp->if_mtu > ETHERMTU) {
6779                         ifp->if_capenable &= ~IFCAP_HWCSUM;
6780                         ifp->if_hwassist &= ~RE_CSUM_FEATURES;
6781                 } else {
6782                         if (sc->re_tx_cstag) {
6783                                 ifp->if_capenable |= IFCAP_TXCSUM;
6784                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
6785                         }
6786                         if (sc->re_rx_cstag) {
6787                                 ifp->if_capenable |= IFCAP_RXCSUM;
6788                         }
6789                 }
6790         } else if (macver == 0x50000000) {
6791                 /*set configuration space offset 0x70f to 0x17*/
6792                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
6793                 Data32 &=0xC0FFFFFF;
6794                 Data32 |= (0x27 << 24);
6795                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
6796 
6797                 data8 = pci_read_config(sc->dev, 0x79, 1);
6798                 data8 &= ~0x70;
6799                 data8 |= 0x50;
6800                 pci_write_config(sc->dev, 0x79, data8, 1);
6801 
6802                 Data32 = re_eri_read(sc, 0xD4, 4, ERIAR_ExGMAC);
6803                 Data32 |= BIT_7 | BIT_8 | BIT_9 | BIT_10 | BIT_11 | BIT_12;
6804                 re_eri_write(sc, 0xD4, 4, Data32, ERIAR_ExGMAC);
6805 
6806                 re_eri_write(sc, 0xC8, 4, 0x00080002, ERIAR_ExGMAC);
6807                 re_eri_write(sc, 0xCC, 1, 0x2F, ERIAR_ExGMAC);
6808                 re_eri_write(sc, 0xD0, 1, 0x5F, ERIAR_ExGMAC);
6809                 re_eri_write(sc, 0xE8, 4, 0x00100006, ERIAR_ExGMAC);
6810 
6811                 if (sc->re_type == MACFG_62 || sc->re_type == MACFG_67) {
6812                         OOB_mutex_lock(sc);
6813                         re_eri_write(sc, 0x5F0, 4, 0x4F87, ERIAR_ExGMAC);
6814                         OOB_mutex_unlock(sc);
6815                 }
6816 
6817                 Data32 = re_eri_read(sc, 0xdc, 4, ERIAR_ExGMAC);
6818                 Data32 &= ~BIT_0;
6819                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
6820                 Data32 |= BIT_0;
6821                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
6822 
6823                 Data32 = re_eri_read(sc, 0x2FC, 4, ERIAR_ExGMAC);
6824                 Data32 &= ~(BIT_0 | BIT_1 | BIT_2);
6825                 Data32 |= (BIT_0 | BIT_1);
6826                 re_eri_write(sc, 0x2FC, 4, Data32, ERIAR_ExGMAC);
6827 
6828                 Data32 = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
6829                 Data32 &= ~BIT_12;
6830                 re_eri_write(sc, 0x1B0, 4, Data32, ERIAR_ExGMAC);
6831 
6832                 CSR_WRITE_4(sc, RE_TXCFG, CSR_READ_4(sc, RE_TXCFG) | BIT_7);
6833                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) & ~BIT_7);
6834                 CSR_WRITE_1(sc, 0x1B, CSR_READ_1(sc, 0x1B) & ~0x07);
6835 
6836                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
6837 
6838                 if (sc->re_type == MACFG_61) {
6839                         MP_WriteEPhyUshort(sc, 0x00, 0x10AB);
6840                         MP_WriteEPhyUshort(sc, 0x06, 0xF030);
6841                         MP_WriteEPhyUshort(sc, 0x08, 0x2006);
6842                         MP_WriteEPhyUshort(sc, 0x0D, 0x1666);
6843                         ClearPCIePhyBit(sc, 0x0C, (BIT_13 | BIT_12 | BIT_11 | BIT_10 | BIT_9 | BIT_8 | BIT_7 | BIT_6 | BIT_5 | BIT_4));
6844                 }  else if (sc->re_type == MACFG_62) {
6845                         MP_WriteEPhyUshort(sc, 0x00, 0x10A3);
6846                         MP_WriteEPhyUshort(sc, 0x19, 0xFC00);
6847                         MP_WriteEPhyUshort(sc, 0x1E, 0x20EA);
6848                 } else if (sc->re_type == MACFG_67) {
6849                         MP_WriteEPhyUshort(sc, 0x00, 0x10AB);
6850                         MP_WriteEPhyUshort(sc, 0x19, 0xFC00);
6851                         MP_WriteEPhyUshort(sc, 0x1E, 0x20EB);
6852                         MP_WriteEPhyUshort(sc, 0x0D, 0x1666);
6853                         ClearPCIePhyBit(sc, 0x0B, BIT_0);
6854                         SetPCIePhyBit(sc, 0x1D, BIT_14);
6855                         ClearAndSetPCIePhyBit(sc,
6856                                               0x0C,
6857                                               BIT_13 | BIT_12 | BIT_11 | BIT_10 | BIT_8 | BIT_7 | BIT_6 | BIT_5,
6858                                               BIT_9 | BIT_4
6859                                              );
6860                 }
6861 
6862                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
6863 
6864                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | BIT_6);
6865                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | BIT_6);
6866 
6867                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) & ~BIT_3);
6868 
6869                 CSR_WRITE_1 (sc, RE_MTPS, 0x27);
6870 
6871                 if (sc->re_type == MACFG_67) {
6872                         data16 = MP_ReadMcuAccessRegWord(sc, 0xD3E2);
6873                         data16 &= 0xF000;
6874                         data16 |= 0xAFD;
6875                         MP_WriteMcuAccessRegWord(sc, 0xD3E2, data16);
6876 
6877                         data16 = MP_ReadMcuAccessRegWord(sc, 0xD3E4);
6878                         data16 &= 0xFF00;
6879                         MP_WriteMcuAccessRegWord(sc, 0xD3E4, data16);
6880 
6881                         data16 = MP_ReadMcuAccessRegWord(sc, 0xE860);
6882                         data16 |= BIT_7;
6883                         MP_WriteMcuAccessRegWord(sc, 0xE860, data16);
6884                 }
6885 
6886                 MP_WriteMcuAccessRegWord(sc, 0xC140, 0xFFFF);
6887                 MP_WriteMcuAccessRegWord(sc, 0xC142, 0xFFFF);
6888 
6889                 if (ifp->if_mtu > ETHERMTU) {
6890                         ifp->if_capenable &= ~IFCAP_HWCSUM;
6891                         ifp->if_hwassist &= ~RE_CSUM_FEATURES;
6892                 } else {
6893                         if (sc->re_tx_cstag) {
6894                                 ifp->if_capenable |= IFCAP_TXCSUM;
6895                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
6896                         }
6897                         if (sc->re_rx_cstag) {
6898                                 ifp->if_capenable |= IFCAP_RXCSUM;
6899                         }
6900                 }
6901         } else if (macver == 0x54800000) {
6902                 MP_WriteMcuAccessRegWord(sc, 0xE098, 0xC302);
6903 
6904                 MP_WriteMcuAccessRegWord(sc, 0xD400, MP_ReadMcuAccessRegWord(sc, 0xD400) & ~(BIT_0));
6905 
6906                 if (sc->RequireAdjustUpsTxLinkPulseTiming) {
6907                         data16 = MP_ReadMcuAccessRegWord(sc, 0xD412);
6908                         data16 &= ~(0x0FFF);
6909                         data16 |= sc->SwrCnt1msIni;
6910                         MP_WriteMcuAccessRegWord(sc, 0xD412, data16);
6911                 }
6912 
6913                 data16 = MP_ReadMcuAccessRegWord(sc, 0xE056);
6914                 data16 &= ~(BIT_7 | BIT_6 | BIT_5 | BIT_4);
6915                 if (FALSE == HW_SUPP_SERDES_PHY(sc))
6916                         data16 |= (BIT_6 | BIT_5 | BIT_4);
6917                 MP_WriteMcuAccessRegWord(sc, 0xE056, data16);
6918                 if (FALSE == HW_SUPP_SERDES_PHY(sc))
6919                         MP_WriteMcuAccessRegWord(sc, 0xEA80, 0x0003);
6920                 else
6921                         MP_WriteMcuAccessRegWord(sc, 0xEA80, 0x0000);
6922 
6923                 OOB_mutex_lock(sc);
6924                 data16 = MP_ReadMcuAccessRegWord(sc, 0xE052);
6925                 data16 &= ~(BIT_3 | BIT_0);
6926                 if (FALSE == HW_SUPP_SERDES_PHY(sc)) {
6927                         data16 |= BIT_0;
6928                         if (sc->re_type == MACFG_71 || sc->re_type == MACFG_72)
6929                                 data16 |= BIT_3;
6930                 }
6931                 MP_WriteMcuAccessRegWord(sc, 0xE052, data16);
6932                 OOB_mutex_unlock(sc);
6933 
6934                 data16 = MP_ReadMcuAccessRegWord(sc, 0xD420);
6935                 data16 &= ~(BIT_11 | BIT_10 | BIT_9 | BIT_8 | BIT_7 | BIT_6 | BIT_5 | BIT_4 | BIT_3 | BIT_2 | BIT_1 | BIT_0);
6936                 data16 |= 0x47F;
6937                 MP_WriteMcuAccessRegWord(sc, 0xD420, data16);
6938 
6939                 CSR_WRITE_1(sc, RE_TDFNR, 0x4);
6940 
6941                 data16 = MP_ReadMcuAccessRegWord(sc, 0xE63E);
6942                 data16 &= ~(BIT_3 | BIT_2 | BIT_1);
6943                 MP_WriteMcuAccessRegWord(sc, 0xE63E, data16);
6944                 data16 |= (BIT_0);
6945                 MP_WriteMcuAccessRegWord(sc, 0xE63E, data16);
6946                 data16 &= ~(BIT_0);
6947                 MP_WriteMcuAccessRegWord(sc, 0xE63E, data16);
6948                 MP_WriteMcuAccessRegWord(sc, 0xC094, 0x0);
6949                 MP_WriteMcuAccessRegWord(sc, 0xC09E, 0x0);
6950 
6951                 /*set configuration space offset 0x70f to 0x27*/
6952                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
6953                 Data32 &=0xC0FFFFFF;
6954                 Data32 |= (0x27 << 24);
6955                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
6956 
6957                 data8 = pci_read_config(sc->dev, 0x79, 1);
6958                 data8 &= ~0x70;
6959                 data8 |= 0x50;
6960                 pci_write_config(sc->dev, 0x79, data8, 1);
6961 
6962                 Data32 = re_eri_read(sc, 0xD4, 4, ERIAR_ExGMAC);
6963                 Data32 |= BIT_7 | BIT_8 | BIT_9 | BIT_10 | BIT_11 | BIT_12;
6964                 if (sc->re_type == MACFG_71 || sc->re_type == MACFG_72)
6965                         Data32 |= BIT_4;
6966                 re_eri_write(sc, 0xD4, 4, Data32, ERIAR_ExGMAC);
6967 
6968                 re_eri_write(sc, 0xC8, 4, 0x00080002, ERIAR_ExGMAC);
6969                 re_eri_write(sc, 0xCC, 1, 0x2F, ERIAR_ExGMAC);
6970                 re_eri_write(sc, 0xD0, 1, 0x5F, ERIAR_ExGMAC);
6971                 re_eri_write(sc, 0xE8, 4, 0x00100006, ERIAR_ExGMAC);
6972 
6973                 OOB_mutex_lock(sc);
6974                 if (FALSE == HW_SUPP_SERDES_PHY(sc))
6975                         re_eri_write(sc, 0x5F0, 2, 0x4F87, ERIAR_ExGMAC);
6976                 else
6977                         re_eri_write(sc, 0x5F0, 2, 0x4080, ERIAR_ExGMAC);
6978                 OOB_mutex_unlock(sc);
6979 
6980                 Data32 = re_eri_read(sc, 0xdc, 4, ERIAR_ExGMAC);
6981                 Data32 &= ~BIT_0;
6982                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
6983                 Data32 |= BIT_0;
6984                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
6985 
6986                 Data32 = re_eri_read(sc, 0x2FC, 4, ERIAR_ExGMAC);
6987                 Data32 &= ~(BIT_0 | BIT_1);
6988                 Data32 |= (BIT_0);
6989                 re_eri_write(sc, 0x2FC, 4, Data32, ERIAR_ExGMAC);
6990 
6991                 Data32 = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
6992                 Data32 &= ~BIT_12;
6993                 re_eri_write(sc, 0x1B0, 4, Data32, ERIAR_ExGMAC);
6994 
6995                 Data32 = re_eri_read(sc, 0x1D0, 1, ERIAR_ExGMAC);
6996                 Data32 &= ~BIT_1;
6997                 re_eri_write(sc, 0x1D0, 1, Data32, ERIAR_ExGMAC);
6998 
6999                 re_eri_write(sc, 0xC0, 2, 0x0000, ERIAR_ExGMAC);
7000                 re_eri_write(sc, 0xB8, 4, 0x00000000, ERIAR_ExGMAC);
7001 
7002                 CSR_WRITE_4(sc, RE_TXCFG, CSR_READ_4(sc, RE_TXCFG) | BIT_7);
7003                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) & ~BIT_7);
7004                 CSR_WRITE_1(sc, 0x1B, CSR_READ_1(sc, 0x1B) & ~0x07);
7005 
7006                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
7007 
7008                 ClearAndSetPCIePhyBit(sc,
7009                                       0x19,
7010                                       BIT_6,
7011                                       (BIT_12| BIT_8)
7012                                      );
7013                 ClearAndSetPCIePhyBit(sc,
7014                                       0x59,
7015                                       BIT_6,
7016                                       (BIT_12| BIT_8)
7017                                      );
7018                 ClearPCIePhyBit(sc, 0x0C, BIT_4);
7019                 ClearPCIePhyBit(sc, 0x4C, BIT_4);
7020                 ClearPCIePhyBit(sc, 0x0B, BIT_0);
7021 
7022                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
7023 
7024                 if (FALSE == HW_SUPP_SERDES_PHY(sc)) {
7025                         CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | BIT_6);
7026                         CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | BIT_6);
7027                         CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | BIT_7);
7028                 } else {
7029                         CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) & ~BIT_6);
7030                         CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) & ~BIT_6);
7031                         CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) & ~BIT_7);
7032                 }
7033 
7034                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) & ~BIT_3);
7035 
7036                 if (ifp->if_mtu > ETHERMTU)
7037                         CSR_WRITE_1 (sc, RE_MTPS, 0x27);
7038 
7039                 MP_WriteMcuAccessRegWord(sc, 0xC140, 0xFFFF);
7040                 MP_WriteMcuAccessRegWord(sc, 0xC142, 0xFFFF);
7041 
7042                 if (ifp->if_mtu > ETHERMTU) {
7043                         ifp->if_capenable &= ~IFCAP_HWCSUM;
7044                         ifp->if_hwassist &= ~RE_CSUM_FEATURES;
7045                 } else {
7046                         if (sc->re_tx_cstag) {
7047                                 ifp->if_capenable |= IFCAP_TXCSUM;
7048                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
7049                         }
7050                         if (sc->re_rx_cstag) {
7051                                 ifp->if_capenable |= IFCAP_RXCSUM;
7052                         }
7053                 }
7054         }
7055 
7056         //clear io_rdy_l23
7057         switch (sc->re_type) {
7058         case MACFG_42:
7059         case MACFG_43:
7060         case MACFG_52:
7061         case MACFG_53:
7062         case MACFG_54:
7063         case MACFG_55:
7064         case MACFG_56:
7065         case MACFG_57:
7066         case MACFG_58:
7067         case MACFG_59:
7068         case MACFG_60:
7069         case MACFG_61:
7070         case MACFG_62:
7071         case MACFG_67:
7072         case MACFG_68:
7073         case MACFG_69:
7074         case MACFG_70:
7075         case MACFG_71:
7076         case MACFG_72:
7077                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_1);
7078                 break;
7079         }
7080 
7081         switch(sc->re_type) {
7082         case MACFG_36:
7083         case MACFG_37:
7084         case MACFG_38:
7085         case MACFG_39:
7086         case MACFG_42:
7087         case MACFG_43:
7088         case MACFG_50:
7089         case MACFG_51:
7090         case MACFG_52:
7091         case MACFG_53:
7092         case MACFG_54:
7093         case MACFG_55:
7094         case MACFG_56:
7095         case MACFG_57:
7096         case MACFG_58:
7097         case MACFG_59:
7098         case MACFG_60:
7099         case MACFG_61:
7100         case MACFG_62:
7101         case MACFG_67:
7102         case MACFG_68:
7103         case MACFG_69:
7104         case MACFG_70:
7105         case MACFG_71:
7106         case MACFG_72:
7107                 CSR_WRITE_1(sc, RE_CFG5, CSR_READ_1(sc, RE_CFG5) | BIT_0);
7108                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) | BIT_7);
7109                 CSR_WRITE_1(sc, 0xF1, CSR_READ_1(sc, 0xF1) & ~BIT_7);
7110                 break;
7111         }
7112 
7113         //clear wol
7114         re_clrwol(sc);
7115 
7116         data16 = CSR_READ_2(sc, RE_CPlusCmd);
7117         if ((ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0)
7118                 data16 |= RL_CPLUSCMD_VLANSTRIP;
7119         else
7120                 data16 &= ~RL_CPLUSCMD_VLANSTRIP;
7121 
7122         if ((ifp->if_capenable & IFCAP_RXCSUM) != 0)
7123                 data16 |= RL_RxChkSum;
7124         else
7125                 data16 &= ~RL_RxChkSum;
7126         CSR_WRITE_2 (sc, RE_CPlusCmd, data16);
7127 
7128         re_disable_cfg9346_write(sc);
7129         //CSR_WRITE_1(sc, 0xec, 0x3f);
7130 
7131         if (sc->re_device_id == RT_DEVICEID_8169 || sc->re_device_id == RT_DEVICEID_8169SC) {
7132                 /* Enable transmit and receive.*/
7133                 CSR_WRITE_1(sc, RE_COMMAND, RE_CMD_TX_ENB | RE_CMD_RX_ENB);
7134 
7135                 /* Set the initial TX configuration.*/
7136                 CSR_WRITE_4(sc, RE_TXCFG, RE_TXCFG_CONFIG);
7137 
7138                 /* Set the initial RX configuration.*/
7139                 /*
7140                  * Program the multicast filter, if necessary.
7141                  */
7142                 re_set_rx_packet_filter(sc);
7143         } else {
7144                 /* Set the initial RX configuration.*/
7145                 /*
7146                  * Program the multicast filter, if necessary.
7147                  */
7148                 re_set_rx_packet_filter(sc);
7149 
7150                 /* Enable transmit and receive.*/
7151                 CSR_WRITE_1(sc, RE_COMMAND, RE_CMD_TX_ENB | RE_CMD_RX_ENB);
7152         }
7153 
7154 #ifndef __DragonFly__
7155         ifp->if_drv_flags |= IFF_DRV_RUNNING;
7156         ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
7157 
7158         /*
7159         * Enable interrupts.
7160         */
7161         CSR_WRITE_2(sc, RE_IMR, RE_INTRS);
7162 #endif
7163 }
7164 
7165 static void re_init_unlock(void *xsc)  	/* Software & Hardware Initialize */
7166 {
7167         struct re_softc		*sc = xsc;
7168         struct ifnet		*ifp;
7169 #ifndef __DragonFly__
7170 #if OS_VER < VERSION(6,0)
7171         int			i;
7172 #endif
7173 #endif	/* !__DragonFly__ */
7174         union {
7175                 uint32_t align_dummy;
7176                 u_char eaddr[ETHER_ADDR_LEN];
7177         } eaddr;
7178 
7179         ifp = RE_GET_IFNET(sc);
7180 
7181 #ifndef __DragonFly__
7182         /*
7183          * Cancel pending I/O and free all RX/TX buffers.
7184          */
7185         re_stop(sc);
7186 #endif	/* !__DragonFly__ */
7187 
7188         /* Copy MAC address on stack to align. */
7189 #ifndef __DragonFly__
7190 #if OS_VER < VERSION(6,0)
7191         bcopy((char *)&sc->arpcom.ac_enaddr, eaddr.eaddr, ETHER_ADDR_LEN);
7192 #elif OS_VER < VERSION(7,0)
7193         bcopy(IFP2ENADDR(ifp), eaddr.eaddr, ETHER_ADDR_LEN);
7194 #else
7195         bcopy(IF_LLADDR(ifp), eaddr.eaddr, ETHER_ADDR_LEN);
7196 #endif
7197 #else	/* __DragonFly__ */
7198         bcopy(IF_LLADDR(ifp), eaddr.eaddr, ETHER_ADDR_LEN);
7199 #endif	/* !__DragonFly__ */
7200 
7201         /* Init our MAC address */
7202         re_rar_set(sc, eaddr.eaddr);
7203 
7204 #ifndef __DragonFly__
7205         sc->hw_start_unlock(sc);
7206 #endif
7207 
7208         return;
7209 }
7210 
7211 #ifndef __DragonFly__
7212 static void re_init(void *xsc)  	/* Software & Hardware Initialize */
7213 {
7214         struct re_softc		*sc = xsc;
7215         struct ifnet		*ifp;
7216 
7217         RE_LOCK(sc);
7218         ifp = RE_GET_IFNET(sc);
7219 
7220         if (re_link_ok(sc)) {
7221                 sc->link_state = LINK_STATE_UP;
7222                 re_link_state_change(ifp, sc->link_state);
7223                 re_link_on_patch(sc);
7224         }
7225 
7226         sc->re_link_chg_det = 1;
7227         re_start_timer(sc);
7228 
7229         RE_UNLOCK(sc);
7230 }
7231 #endif	/* !__DragonFly__ */
7232 
7233 static void re_hw_start_unlock_8125(struct re_softc *sc)
7234 {
7235         struct ifnet		*ifp;
7236         u_int32_t		macver;
7237         u_int8_t		data8;
7238         u_int16_t		data16 = 0;
7239         u_int32_t		Data32;
7240 
7241         ifp = RE_GET_IFNET(sc);
7242 
7243 #ifndef __DragonFly__
7244         /* Init descriptors. */
7245         re_var_init(sc);
7246 #endif
7247 
7248         re_enable_cfg9346_write(sc);
7249 
7250         CSR_WRITE_1(sc, RE_CFG5, CSR_READ_1(sc, RE_CFG5) & ~BIT_0);
7251         CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) & ~BIT_7);
7252         CSR_WRITE_1(sc, 0xF1, CSR_READ_1(sc, 0xF1) & ~BIT_7);
7253 
7254         //Interrupt Mitigation
7255         CSR_WRITE_4(sc, 0x0A00, 0x00630063);
7256 
7257         CSR_WRITE_2(sc, RE_CPlusCmd, 0x2060);
7258 
7259         /* Set the initial TX configuration.*/
7260         CSR_WRITE_4(sc, RE_TXCFG, RE_TXCFG_CONFIG);
7261 
7262         macver = CSR_READ_4(sc, RE_TXCFG) & 0xFC800000;
7263         if (macver == 0x60800000 || macver == 0x64000000) {
7264                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) | BIT_5);
7265 
7266                 MP_WriteMcuAccessRegWord(sc, 0xE098, 0xC302);
7267 
7268                 /*set configuration space offset 0x70f to 0x17*/
7269                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
7270                 Data32 &=0xC0FFFFFF;
7271                 Data32 |= (0x27 << 24);
7272                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
7273 
7274                 data8 = pci_read_config(sc->dev, 0x79, 1);
7275                 data8 &= ~0x70;
7276                 data8 |= 0x50;
7277                 pci_write_config(sc->dev, 0x79, data8, 1);
7278 
7279                 CSR_WRITE_2(sc, 0x382, 0x221B);
7280 
7281                 CSR_WRITE_1(sc, 0x4500, 0x00);
7282                 CSR_WRITE_2(sc, 0x4800, 0x0000);
7283 
7284                 CSR_WRITE_1(sc, RE_CFG1, CSR_READ_1(sc, RE_CFG1) & ~0x10);
7285 
7286                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) & ~BIT_3);
7287 
7288                 CSR_WRITE_1(sc, RE_TDFNR, 0x10);
7289 
7290                 if (sc->re_type == MACFG_80) {
7291                         MP_WriteEPhyUshort(sc, 0x01, 0xA812);
7292                         MP_WriteEPhyUshort(sc, 0x09, 0x520C);
7293                         MP_WriteEPhyUshort(sc, 0x04, 0xD000);
7294                         MP_WriteEPhyUshort(sc, 0x0D, 0xF702);
7295                         MP_WriteEPhyUshort(sc, 0x0A, 0x8653);
7296                         MP_WriteEPhyUshort(sc, 0x06, 0x001E);
7297                         MP_WriteEPhyUshort(sc, 0x08, 0x3595);
7298                         MP_WriteEPhyUshort(sc, 0x20, 0x9455);
7299                         MP_WriteEPhyUshort(sc, 0x21, 0x99FF);
7300                         MP_WriteEPhyUshort(sc, 0x02, 0x6046);
7301                         MP_WriteEPhyUshort(sc, 0x29, 0xFE00);
7302                         MP_WriteEPhyUshort(sc, 0x23, 0xAB62);
7303                         ClearPCIePhyBit(sc, 0x24, BIT_11);
7304 
7305                         MP_WriteEPhyUshort(sc, 0x41, 0xA80C);
7306                         MP_WriteEPhyUshort(sc, 0x49, 0x520C);
7307                         MP_WriteEPhyUshort(sc, 0x44, 0xD000);
7308                         MP_WriteEPhyUshort(sc, 0x4D, 0xF702);
7309                         MP_WriteEPhyUshort(sc, 0x4A, 0x8653);
7310                         MP_WriteEPhyUshort(sc, 0x46, 0x001E);
7311                         MP_WriteEPhyUshort(sc, 0x48, 0x3595);
7312                         MP_WriteEPhyUshort(sc, 0x60, 0x9455);
7313                         MP_WriteEPhyUshort(sc, 0x61, 0x99FF);
7314                         MP_WriteEPhyUshort(sc, 0x42, 0x6046);
7315                         MP_WriteEPhyUshort(sc, 0x69, 0xFE00);
7316                         MP_WriteEPhyUshort(sc, 0x63, 0xAB62);
7317                         ClearPCIePhyBit(sc, 0x64, BIT_11);
7318                 }  else if (sc->re_type == MACFG_81) {
7319                         MP_WriteEPhyUshort(sc, 0x04, 0xD000);
7320                         MP_WriteEPhyUshort(sc, 0x0A, 0x8653);
7321                         MP_WriteEPhyUshort(sc, 0x23, 0xAB66);
7322                         MP_WriteEPhyUshort(sc, 0x20, 0x9455);
7323                         MP_WriteEPhyUshort(sc, 0x21, 0x99FF);
7324                         MP_WriteEPhyUshort(sc, 0x29, 0xFE04);
7325 
7326                         MP_WriteEPhyUshort(sc, 0x44, 0xD000);
7327                         MP_WriteEPhyUshort(sc, 0x4A, 0x8653);
7328                         MP_WriteEPhyUshort(sc, 0x63, 0xAB66);
7329                         MP_WriteEPhyUshort(sc, 0x60, 0x9455);
7330                         MP_WriteEPhyUshort(sc, 0x61, 0x99FF);
7331                         MP_WriteEPhyUshort(sc, 0x69, 0xFE04);
7332 
7333                         ClearAndSetPCIePhyBit(sc,
7334                                               0x2A,
7335                                               (BIT_14 | BIT_13 | BIT_12),
7336                                               (BIT_13 | BIT_12)
7337                                              );
7338                         ClearPCIePhyBit(sc, 0x19, BIT_6);
7339                         SetPCIePhyBit(sc, 0x1B, (BIT_11 | BIT_10 | BIT_9));
7340                         ClearPCIePhyBit(sc, 0x1B, (BIT_14 | BIT_13 | BIT_12));
7341                         MP_WriteEPhyUshort(sc, 0x02, 0x6042);
7342                         MP_WriteEPhyUshort(sc, 0x06, 0x0014);
7343 
7344                         ClearAndSetPCIePhyBit(sc,
7345                                               0x6A,
7346                                               (BIT_14 | BIT_13 | BIT_12),
7347                                               (BIT_13 | BIT_12)
7348                                              );
7349                         ClearPCIePhyBit(sc, 0x59, BIT_6);
7350                         SetPCIePhyBit(sc, 0x5B, (BIT_11 | BIT_10 | BIT_9));
7351                         ClearPCIePhyBit(sc, 0x5B, (BIT_14 | BIT_13 | BIT_12));
7352                         MP_WriteEPhyUshort(sc, 0x42, 0x6042);
7353                         MP_WriteEPhyUshort(sc, 0x46, 0x0014);
7354                 } else if (sc->re_type == MACFG_82) {
7355                         MP_WriteEPhyUshort(sc, 0x06, 0x001F);
7356                         MP_WriteEPhyUshort(sc, 0x0A, 0xB66B);
7357                         MP_WriteEPhyUshort(sc, 0x01, 0xA852);
7358                         MP_WriteEPhyUshort(sc, 0x24, 0x0008);
7359                         MP_WriteEPhyUshort(sc, 0x2F, 0x6052);
7360                         MP_WriteEPhyUshort(sc, 0x0D, 0xF716);
7361                         MP_WriteEPhyUshort(sc, 0x20, 0xD477);
7362                         MP_WriteEPhyUshort(sc, 0x21, 0x4477);
7363                         MP_WriteEPhyUshort(sc, 0x22, 0x0013);
7364                         MP_WriteEPhyUshort(sc, 0x23, 0xBB66);
7365                         MP_WriteEPhyUshort(sc, 0x0B, 0xA909);
7366                         MP_WriteEPhyUshort(sc, 0x29, 0xFF04);
7367                         MP_WriteEPhyUshort(sc, 0x1B, 0x1EA0);
7368 
7369                         MP_WriteEPhyUshort(sc, 0x46, 0x001F);
7370                         MP_WriteEPhyUshort(sc, 0x4A, 0xB66B);
7371                         MP_WriteEPhyUshort(sc, 0x41, 0xA84A);
7372                         MP_WriteEPhyUshort(sc, 0x64, 0x000C);
7373                         MP_WriteEPhyUshort(sc, 0x6F, 0x604A);
7374                         MP_WriteEPhyUshort(sc, 0x4D, 0xF716);
7375                         MP_WriteEPhyUshort(sc, 0x60, 0xD477);
7376                         MP_WriteEPhyUshort(sc, 0x61, 0x4477);
7377                         MP_WriteEPhyUshort(sc, 0x62, 0x0013);
7378                         MP_WriteEPhyUshort(sc, 0x63, 0xBB66);
7379                         MP_WriteEPhyUshort(sc, 0x4B, 0xA909);
7380                         MP_WriteEPhyUshort(sc, 0x69, 0xFF04);
7381                         MP_WriteEPhyUshort(sc, 0x5B, 0x1EA0);
7382                 } else if (sc->re_type == MACFG_83) {
7383                         MP_WriteEPhyUshort(sc, 0x0B, 0xA908);
7384                         MP_WriteEPhyUshort(sc, 0x1E, 0x20EB);
7385 
7386                         MP_WriteEPhyUshort(sc, 0x4B, 0xA908);
7387                         MP_WriteEPhyUshort(sc, 0x5E, 0x20EB);
7388 
7389                         ClearAndSetPCIePhyBit(sc,
7390                                               0x22,
7391                                               (BIT_5 | BIT_4),
7392                                               BIT_5
7393                                              );
7394                         ClearAndSetPCIePhyBit(sc,
7395                                               0x62,
7396                                               (BIT_5 | BIT_4),
7397                                               BIT_5
7398                                              );
7399                 }
7400 
7401                 MP_WriteMcuAccessRegWord(sc, 0xC140, 0xFFFF);
7402                 MP_WriteMcuAccessRegWord(sc, 0xC142, 0xFFFF);
7403 
7404                 //old tx desc format
7405                 data16 = MP_ReadMcuAccessRegWord(sc, 0xEB58);
7406                 data16 &= ~(BIT_0);
7407                 MP_WriteMcuAccessRegWord(sc, 0xEB58, data16);
7408 
7409                 data16 = MP_ReadMcuAccessRegWord(sc, 0xE614);
7410                 data16 &= ~( BIT_10 | BIT_9 | BIT_8);
7411                 if (sc->re_type == MACFG_82 || sc->re_type == MACFG_83) {
7412                         data16 |= ((2 & 0x07) << 8);
7413                 } else {
7414                         if (sc->re_dash && !(MP_ReadByteFun0PciEConfigSpace(sc, 0x79) & BIT_0))
7415                                 data16 |= ((3 & 0x07) << 8);
7416                         else
7417                                 data16 |= ((4 & 0x07) << 8);
7418                 }
7419                 MP_WriteMcuAccessRegWord(sc, 0xE614, data16);
7420 
7421                 data16 = MP_ReadMcuAccessRegWord(sc, 0xE63E);
7422                 data16 &= ~(BIT_11 | BIT_10);
7423                 data16 |= ((0 & 0x03) << 10);
7424                 MP_WriteMcuAccessRegWord(sc, 0xE63E, data16);
7425 
7426                 data16 = MP_ReadMcuAccessRegWord(sc, 0xE63E);
7427                 data16 &= ~(BIT_5 | BIT_4);
7428                 if (sc->re_type == MACFG_80 || sc->re_type == MACFG_81)
7429                         data16 |= ((0x02 & 0x03) << 4);
7430                 MP_WriteMcuAccessRegWord(sc, 0xE63E, data16);
7431 
7432                 data16 = MP_ReadMcuAccessRegWord(sc, 0xC0B4);
7433                 data16 |= (BIT_3|BIT_2);
7434                 MP_WriteMcuAccessRegWord(sc, 0xC0B4, data16);
7435 
7436                 data16 = MP_ReadMcuAccessRegWord(sc, 0xEB6A);
7437                 data16 &= ~(BIT_7 | BIT_6 | BIT_5 | BIT_4 | BIT_3 | BIT_2 | BIT_1 | BIT_0);
7438                 data16 |= (BIT_5 | BIT_4 | BIT_1 | BIT_0);
7439                 MP_WriteMcuAccessRegWord(sc, 0xEB6A, data16);
7440 
7441                 data16 = MP_ReadMcuAccessRegWord(sc, 0xEB50);
7442                 data16 &= ~(BIT_9 | BIT_8 | BIT_7 | BIT_6 | BIT_5);
7443                 data16 |= (BIT_6);
7444                 MP_WriteMcuAccessRegWord(sc, 0xEB50, data16);
7445 
7446                 data16 = MP_ReadMcuAccessRegWord(sc, 0xE056);
7447                 data16 &= ~(BIT_7 | BIT_6 | BIT_5 | BIT_4);
7448                 data16 |= (BIT_4 | BIT_5);
7449                 MP_WriteMcuAccessRegWord(sc, 0xE056, data16);
7450 
7451                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | BIT_7);
7452 
7453                 data16 = MP_ReadMcuAccessRegWord(sc, 0xE040);
7454                 data16 &= ~(BIT_12);
7455                 MP_WriteMcuAccessRegWord(sc, 0xE040, data16);
7456 
7457                 data16 = MP_ReadMcuAccessRegWord(sc, 0xEA1C);
7458                 data16 &= ~(BIT_1 | BIT_0);
7459                 data16 |= (BIT_0);
7460                 MP_WriteMcuAccessRegWord(sc, 0xEA1C, data16);
7461 
7462                 data16 = MP_ReadMcuAccessRegWord(sc, 0xE0C0);
7463                 data16 &= ~(BIT_14 | BIT_11 | BIT_10 | BIT_9 | BIT_8 | BIT_3 | BIT_2 | BIT_1 | BIT_0);
7464                 data16 |= (BIT_14 | BIT_10 | BIT_1 | BIT_0);
7465                 MP_WriteMcuAccessRegWord(sc, 0xE0C0, data16);
7466 
7467                 SetMcuAccessRegBit(sc, 0xE052, (BIT_6|BIT_5|BIT_3));
7468                 ClearMcuAccessRegBit(sc, 0xE052, BIT_7);
7469 
7470                 data16 = MP_ReadMcuAccessRegWord(sc, 0xC0AC);
7471                 data16 &= ~(BIT_7);
7472                 data16 |= (BIT_8|BIT_9|BIT_10|BIT_11|BIT_12);
7473                 MP_WriteMcuAccessRegWord(sc, 0xC0AC, data16);
7474 
7475                 data16 = MP_ReadMcuAccessRegWord(sc, 0xD430);
7476                 data16 &= ~(BIT_11 | BIT_10 | BIT_9 | BIT_8 | BIT_7 | BIT_6 | BIT_5 | BIT_4 | BIT_3 | BIT_2 | BIT_1 | BIT_0);
7477                 data16 |= 0x47F;
7478                 MP_WriteMcuAccessRegWord(sc, 0xD430, data16);
7479 
7480                 //MP_WriteMcuAccessRegWord(sc, 0xE0C0, 0x4F87);
7481                 data16 = MP_ReadMcuAccessRegWord(sc, 0xE84C);
7482                 data16 &= ~BIT_6;
7483                 if (sc->re_type == MACFG_80 || sc->re_type == MACFG_81)
7484                         data16 |= BIT_6;
7485                 data16 |= BIT_7;
7486                 MP_WriteMcuAccessRegWord(sc, 0xE84C, data16);
7487 
7488                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | BIT_6);
7489 
7490                 if (sc->re_type == MACFG_80 || sc->re_type == MACFG_81)
7491                         CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) | BIT_0);
7492 
7493                 MP_WriteMcuAccessRegWord(sc, 0xE080, MP_ReadMcuAccessRegWord(sc, 0xE080)&~BIT_1);
7494 
7495                 data16 = MP_ReadMcuAccessRegWord(sc, 0xEA1C);
7496                 data16 &= ~(BIT_2);
7497                 MP_WriteMcuAccessRegWord(sc, 0xEA1C, data16);
7498 
7499                 SetMcuAccessRegBit(sc, 0xEB54, BIT_0);
7500                 DELAY(1);
7501                 ClearMcuAccessRegBit(sc, 0xEB54, BIT_0);
7502                 CSR_WRITE_2(sc, 0x1880, CSR_READ_2(sc, 0x1880) & ~(BIT_4 | BIT_5));
7503 
7504                 if (sc->re_tx_cstag) {
7505                         ifp->if_capenable |= IFCAP_TXCSUM;
7506                         ifp->if_hwassist |= RE_CSUM_FEATURES;
7507                 }
7508                 if (sc->re_rx_cstag) {
7509                         ifp->if_capenable |= IFCAP_RXCSUM;
7510                 }
7511         }
7512 
7513         //clear io_rdy_l23
7514         CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_1);
7515 
7516         CSR_WRITE_1(sc, RE_CFG5, CSR_READ_1(sc, RE_CFG5) | BIT_0);
7517         CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) | BIT_7);
7518         CSR_WRITE_1(sc, 0xF1, CSR_READ_1(sc, 0xF1) & ~BIT_7);
7519 
7520         //clear wol
7521         re_clrwol(sc);
7522 
7523         if ((ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0)
7524                 CSR_WRITE_4(sc, RE_RXCFG, CSR_READ_4(sc, RE_RXCFG) | (BIT_22 | BIT_23));
7525         else
7526                 CSR_WRITE_4(sc, RE_RXCFG, CSR_READ_4(sc, RE_RXCFG) & ~(BIT_22 | BIT_23));
7527 
7528         data16 = CSR_READ_2(sc, RE_CPlusCmd);
7529         if ((ifp->if_capenable & IFCAP_RXCSUM) != 0)
7530                 data16 |= RL_RxChkSum;
7531         else
7532                 data16 &= ~RL_RxChkSum;
7533         CSR_WRITE_2 (sc, RE_CPlusCmd, data16);
7534 
7535         re_disable_cfg9346_write(sc);
7536 
7537         /* Set the initial RX configuration.*/
7538         /*
7539          * Program the multicast filter, if necessary.
7540          */
7541         re_set_rx_packet_filter(sc);
7542 
7543         /* Enable transmit and receive.*/
7544         CSR_WRITE_1(sc, RE_COMMAND, RE_CMD_TX_ENB | RE_CMD_RX_ENB);
7545 
7546 #ifndef __DragonFly__
7547         ifp->if_drv_flags |= IFF_DRV_RUNNING;
7548         ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
7549 
7550         /*
7551         * Enable interrupts.
7552         */
7553         CSR_WRITE_4(sc, RE_IMR0_8125, RE_INTRS);
7554 #endif	/* !__DragonFly__ */
7555 }
7556 
7557 #ifndef __DragonFly__
7558 /*
7559  * Initialize the transmit descriptors.
7560  */
7561 static int re_var_init(struct re_softc *sc)
7562 {
7563         int			i;
7564         union RxDesc *rxptr;
7565         union TxDesc *txptr;
7566 
7567         sc->re_desc.rx_cur_index = 0;
7568         sc->re_desc.rx_last_index = 0;
7569         rxptr = sc->re_desc.rx_desc;
7570         for (i = 0; i < RE_RX_BUF_NUM; i++) {
7571                 memset(&rxptr[i], 0, sizeof(union RxDesc));
7572 
7573                 /* Init the RX buffer pointer register. */
7574                 bus_dmamap_load(sc->re_desc.re_rx_mtag,
7575                                 sc->re_desc.re_rx_dmamap[i],
7576                                 sc->re_desc.rx_buf[i]->m_data, sc->re_rx_desc_buf_sz,
7577                                 re_rx_dma_map_buf,
7578                                 &rxptr[i],
7579                                 0);
7580                 bus_dmamap_sync(sc->re_desc.re_rx_mtag,
7581                                 sc->re_desc.re_rx_dmamap[i],
7582                                 BUS_DMASYNC_PREREAD);
7583 
7584                 rxptr[i].ul[0] = htole32(sc->re_rx_desc_buf_sz);
7585                 if (i == (RE_RX_BUF_NUM - 1))
7586                         rxptr[i].ul[0] |= htole32(RL_RDESC_CMD_EOR);
7587                 rxptr[i].ul[0] |= htole32(RL_RDESC_CMD_OWN);
7588         }
7589 
7590         bus_dmamap_load(sc->re_desc.rx_desc_tag,
7591                         sc->re_desc.rx_desc_dmamap,
7592                         sc->re_desc.rx_desc,
7593                         sizeof(union RxDesc)*RE_RX_BUF_NUM,
7594                         re_dma_map_rxdesc,
7595                         sc,
7596                         0);
7597         bus_dmamap_sync(sc->re_desc.rx_desc_tag,
7598                         sc->re_desc.rx_desc_dmamap,
7599                         BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
7600 
7601         sc->re_desc.tx_cur_index = 0;
7602         sc->re_desc.tx_last_index = 0;
7603         txptr = sc->re_desc.tx_desc;
7604         for (i = 0; i < RE_TX_BUF_NUM; i++) {
7605                 memset(&txptr[i], 0, sizeof(union TxDesc));
7606                 if (i == (RE_TX_BUF_NUM - 1))
7607                         txptr[i].ul[0] = htole32(RL_TDESC_CMD_EOR);
7608         }
7609 
7610         bus_dmamap_load(sc->re_desc.tx_desc_tag,
7611                         sc->re_desc.tx_desc_dmamap,
7612                         sc->re_desc.tx_desc,
7613                         sizeof(union RxDesc) * RE_TX_BUF_NUM,
7614                         re_dma_map_txdesc,
7615                         sc,
7616                         0);
7617         bus_dmamap_sync(sc->re_desc.tx_desc_tag,
7618                         sc->re_desc.tx_desc_dmamap,
7619                         BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
7620 
7621         return 0;
7622 }
7623 #endif	/* !__DragonFly__ */
7624 
7625 static void re_reset(struct re_softc *sc)
7626 {
7627         register int		i;
7628 
7629         CSR_WRITE_4(sc, RE_RXCFG, CSR_READ_4(sc, RE_RXCFG)& ~0x3F);
7630 
7631         switch (sc->re_type) {
7632         case MACFG_3:
7633         case MACFG_4:
7634         case MACFG_5:
7635         case MACFG_6:
7636                 DELAY(10000);
7637                 break;
7638         case MACFG_11:
7639         case MACFG_12:
7640         case MACFG_13:
7641         case MACFG_14:
7642         case MACFG_15:
7643         case MACFG_16:
7644         case MACFG_17:
7645         case MACFG_18:
7646         case MACFG_19:
7647         case MACFG_21:
7648         case MACFG_22:
7649         case MACFG_23:
7650         case MACFG_24:
7651         case MACFG_25:
7652         case MACFG_26:
7653         case MACFG_27:
7654         case MACFG_28:
7655         case MACFG_31:
7656         case MACFG_32:
7657         case MACFG_33:
7658         case MACFG_36:
7659         case MACFG_37:
7660         case MACFG_41:
7661         case MACFG_42:
7662         case MACFG_43:
7663         case MACFG_54:
7664         case MACFG_55:
7665         case MACFG_63:
7666         case MACFG_64:
7667         case MACFG_65:
7668         case MACFG_66:
7669                 CSR_WRITE_1(sc, RE_COMMAND, 0x8C);
7670                 break;
7671         case MACFG_38:
7672         case MACFG_39:
7673         case MACFG_50:
7674         case MACFG_51:
7675         case MACFG_52:
7676         case MACFG_53:
7677                 CSR_WRITE_1(sc, RE_COMMAND, 0x8C);
7678                 while (!(CSR_READ_4(sc,RE_TXCFG) & BIT_11)) DELAY(100);
7679                 break;
7680         case MACFG_56:
7681         case MACFG_57:
7682         case MACFG_58:
7683         case MACFG_59:
7684         case MACFG_60:
7685         case MACFG_61:
7686         case MACFG_62:
7687         case MACFG_67:
7688         case MACFG_68:
7689         case MACFG_69:
7690         case MACFG_70:
7691         case MACFG_71:
7692         case MACFG_72:
7693         case MACFG_80:
7694         case MACFG_81:
7695         case MACFG_82:
7696         case MACFG_83:
7697                 DELAY(2000);
7698                 break;
7699         default:
7700                 DELAY(10000);
7701                 break;
7702         }
7703         DELAY(200);
7704         CSR_WRITE_1(sc, RE_COMMAND, RE_CMD_RESET);
7705 
7706         for (i = 0; i < RE_TIMEOUT; i++) {
7707                 DELAY(10);
7708                 if (!(CSR_READ_1(sc, RE_COMMAND) & RE_CMD_RESET))
7709                         break;
7710         }
7711 
7712         if (i == RE_TIMEOUT)
7713                 device_printf(sc->dev,"reset never completed!\n");
7714 
7715         return;
7716 }
7717 
7718 static u_int8_t re_link_ok(struct re_softc *sc)
7719 {
7720         u_int8_t	retval;
7721 
7722         retval = (CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_LINK_STS) ? 1 : 0;
7723 
7724         return retval;
7725 }
7726 
7727 static void
7728 re_set_wol_linkspeed(struct re_softc *sc)
7729 {
7730         u_int8_t wol_link_speed;
7731         u_int16_t anar;
7732 
7733         if (HW_SUPP_SERDES_PHY(sc)) return;
7734 
7735 #ifdef ENABLE_FIBER_SUPPORT
7736         if (HW_FIBER_MODE_ENABLED(sc))
7737                 return;
7738 #endif //ENABLE_FIBER_SUPPORT
7739 
7740         MP_WritePhyUshort(sc, 0x1F, 0x0000);
7741 
7742         wol_link_speed = RE_WOL_LINK_SPEED_100M_FIRST;
7743         if (!sc->re_dash) {
7744                 u_int16_t anlpar;
7745 
7746                 anlpar = sc->phy_reg_anlpar;
7747 
7748                 if ((anlpar & ANLPAR_10_FD) || (anlpar & ANLPAR_10)) {
7749                         wol_link_speed = RE_WOL_LINK_SPEED_10M_FIRST;
7750                 } else {
7751                         wol_link_speed = RE_WOL_LINK_SPEED_100M_FIRST;
7752                 }
7753         }
7754 
7755         anar = MP_ReadPhyUshort(sc,MII_ANAR);
7756 
7757         if (wol_link_speed == RE_WOL_LINK_SPEED_10M_FIRST)
7758                 anar &= ~(ANAR_TX_FD | ANAR_TX);
7759         if (sc->re_device_id==RT_DEVICEID_8125) {
7760                 u_int16_t gbcr;
7761 
7762                 ClearEthPhyOcpBit(sc, 0xA5D4, RTK_ADVERTISE_2500FULL);
7763                 gbcr = MP_ReadPhyUshort(sc,MII_100T2CR);
7764                 gbcr &= ~(GTCR_ADV_1000TFDX|GTCR_ADV_1000THDX);
7765                 MP_WritePhyUshort(sc, MII_100T2CR, gbcr);
7766                 MP_WritePhyUshort(sc, MII_ANAR, anar);
7767                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_RESET | BMCR_AUTOEN | BMCR_STARTNEG);
7768         } else if (sc->re_device_id==RT_DEVICEID_8169 || sc->re_device_id==RT_DEVICEID_8169SC ||
7769                    sc->re_device_id==RT_DEVICEID_8168 || sc->re_device_id==RT_DEVICEID_8161) {
7770                 u_int16_t gbcr;
7771 
7772                 gbcr = MP_ReadPhyUshort(sc,MII_100T2CR);
7773                 gbcr &= ~(GTCR_ADV_1000TFDX|GTCR_ADV_1000THDX);
7774                 MP_WritePhyUshort(sc, MII_100T2CR, gbcr);
7775                 MP_WritePhyUshort(sc, MII_ANAR, anar);
7776                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_RESET | BMCR_AUTOEN | BMCR_STARTNEG);
7777         } else if (sc->re_type == MACFG_36) {
7778                 MP_WritePhyUshort(sc, MII_ANAR, anar);
7779                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_RESET | BMCR_AUTOEN | BMCR_STARTNEG);
7780         } else {
7781                 MP_WritePhyUshort(sc, MII_ANAR, anar);
7782                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_AUTOEN | BMCR_STARTNEG);
7783         }
7784 }
7785 
7786 #ifndef __DragonFly__
7787 static void
7788 re_setwol(struct re_softc *sc)
7789 {
7790         struct ifnet            *ifp;
7791         int                     pmc;
7792         uint16_t                pmstat;
7793         uint8_t                 v;
7794 
7795         RE_LOCK_ASSERT(sc);
7796 
7797         ifp = RE_GET_IFNET(sc);
7798 
7799         if ((ifp->if_capenable & IFCAP_WOL) == 0) {
7800                 re_phy_power_down(sc->dev);
7801                 return;
7802         }
7803 
7804         if (pci_find_cap(sc->dev, PCIY_PMG, &pmc) != 0)
7805                 return;
7806 
7807         /* Enable config register write. */
7808         re_enable_cfg9346_write(sc);
7809 
7810         /* Enable PME. */
7811         if (sc->re_device_id==RT_DEVICEID_8169 || sc->re_device_id==RT_DEVICEID_8169SC) {
7812                 v = CSR_READ_1(sc, RE_CFG1);
7813                 v &= ~RE_CFG1_PME;
7814                 if ((ifp->if_capenable & IFCAP_WOL) != 0)
7815                         v |= RE_CFG1_PME;
7816                 CSR_WRITE_1(sc, RE_CFG1, v);
7817         }
7818 
7819         if (ifp->if_capenable & IFCAP_WOL_MAGIC)
7820                 re_enable_magic_packet(sc);
7821         else
7822                 re_disable_magic_packet(sc);
7823 
7824         v = CSR_READ_1(sc, RE_CFG5);
7825         v &= ~(RL_CFG5_WOL_BCAST | RL_CFG5_WOL_MCAST | RL_CFG5_WOL_UCAST |
7826                RL_CFG5_WOL_LANWAKE);
7827 
7828         if ((ifp->if_capenable & IFCAP_WOL_UCAST) != 0)
7829                 v |= RL_CFG5_WOL_UCAST;
7830         if ((ifp->if_capenable & IFCAP_WOL_MCAST) != 0)
7831                 v |= RL_CFG5_WOL_MCAST | RL_CFG5_WOL_BCAST;
7832         if ((ifp->if_capenable & IFCAP_WOL) != 0)
7833                 v |= RL_CFG5_WOL_LANWAKE;
7834         CSR_WRITE_1(sc, RE_CFG5, v);
7835 
7836         /* Config register write done. */
7837         re_disable_cfg9346_write(sc);
7838 
7839         /*
7840          * It seems that hardware resets its link speed to 100Mbps in
7841          * power down mode so switching to 100Mbps in driver is not
7842          * needed.
7843          */
7844 
7845         /* Request PME if WOL is requested. */
7846         pmstat = pci_read_config(sc->dev, pmc + PCIR_POWER_STATUS, 2);
7847         pmstat &= ~(PCIM_PSTAT_PMEENABLE);
7848         if ((ifp->if_capenable & IFCAP_WOL) != 0)
7849                 pmstat |= PCIM_PSTAT_PMEENABLE;
7850         pci_write_config(sc->dev, pmc + PCIR_POWER_STATUS, pmstat, 2);
7851 
7852         /* Put controller into sleep mode. */
7853         if ((ifp->if_capenable & IFCAP_WOL) != 0) {
7854                 re_set_rx_packet_filter_in_sleep_state(sc);
7855                 re_set_wol_linkspeed(sc);
7856                 if (sc->re_type == MACFG_21 || sc->re_type == MACFG_22)
7857                         CSR_WRITE_1(sc, RE_COMMAND, RE_CMD_RX_ENB);
7858         }
7859 }
7860 #endif	/* !__DragonFly__ */
7861 
7862 static void
7863 re_clrwol(struct re_softc *sc)
7864 {
7865         int                     pmc;
7866         uint16_t                pmstat;
7867         uint8_t                 v;
7868 
7869         RE_LOCK_ASSERT(sc);
7870 
7871 #ifndef __DragonFly__
7872         if (pci_find_cap(sc->dev, PCIY_PMG, &pmc) != 0)
7873                 return;
7874 #else
7875 	if (pci_find_extcap(sc->dev, PCIY_PMG, &pmc) != 0)
7876                 return;
7877 #endif
7878 
7879         /* Disable PME and clear PME status. */
7880         pmstat = pci_read_config(sc->dev, pmc + PCIR_POWER_STATUS, 2);
7881         pmstat &= ~PCIM_PSTAT_PMEENABLE;
7882         pci_write_config(sc->dev, pmc + PCIR_POWER_STATUS, pmstat, 2);
7883 
7884         /* Enable config register write. */
7885         re_enable_cfg9346_write(sc);
7886 
7887         if (sc->re_device_id==RT_DEVICEID_8169 || sc->re_device_id==RT_DEVICEID_8169SC) {
7888                 v = CSR_READ_1(sc, RE_CFG1);
7889                 v &= ~RE_CFG1_PME;
7890                 CSR_WRITE_1(sc, RE_CFG1, v);
7891         }
7892 
7893         v = CSR_READ_1(sc, RE_CFG3);
7894         v &= ~(RL_CFG3_WOL_LINK);
7895         CSR_WRITE_1(sc, RE_CFG3, v);
7896 
7897         re_disable_magic_packet(sc);
7898 
7899         v = CSR_READ_1(sc, RE_CFG5);
7900         v &= ~(RL_CFG5_WOL_BCAST | RL_CFG5_WOL_MCAST | RL_CFG5_WOL_UCAST);
7901         v &= ~RL_CFG5_WOL_LANWAKE;
7902         CSR_WRITE_1(sc, RE_CFG5, v);
7903 
7904         /* Config register write done. */
7905         re_disable_cfg9346_write(sc);
7906 }
7907 
7908 /*
7909  * Stop the adapter and free any mbufs allocated to the
7910  * RX and TX lists.
7911  */
7912 #ifndef __DragonFly__
7913 static void re_stop(struct re_softc *sc)  	/* Stop Driver */
7914 #else	/* __DragonFly__ */
7915 static void
7916 re_stop_rtl(struct re_softc *sc)
7917 #endif	/* !__DragonFly__ */
7918 {
7919 #ifndef __DragonFly__
7920         struct ifnet		*ifp;
7921 
7922         /*	RE_LOCK_ASSERT(sc);*/
7923 
7924         ifp = RE_GET_IFNET(sc);
7925 #if OS_VER < VERSION(9,0)
7926         ifp->if_timer = 0;
7927 #endif
7928 
7929         re_stop_timer(sc);
7930 #endif	/* !__DragonFly__ */
7931 
7932         /*
7933          * Disable accepting frames to put RX MAC into idle state.
7934          * Otherwise it's possible to get frames while stop command
7935          * execution is in progress and controller can DMA the frame
7936          * to already freed RX buffer during that period.
7937          */
7938         CSR_WRITE_4(sc, RE_RXCFG, CSR_READ_4(sc, RE_RXCFG) &
7939                     ~(RE_RXCFG_RX_ALLPHYS | RE_RXCFG_RX_INDIV | RE_RXCFG_RX_MULTI |
7940                       RE_RXCFG_RX_BROAD | RE_RXCFG_RX_RUNT | RE_RXCFG_RX_ERRPKT));
7941 
7942         if (sc->re_device_id==RT_DEVICEID_8125) {
7943                 CSR_WRITE_4(sc, RE_IMR0_8125, 0x00000000);
7944                 CSR_WRITE_4(sc, RE_ISR0_8125, 0xffffffff);
7945         } else {
7946                 CSR_WRITE_2(sc, RE_IMR, 0x0000);
7947                 CSR_WRITE_2(sc, RE_ISR, 0xffff);
7948         }
7949         if (sc->re_type == MACFG_50 || sc->re_type == MACFG_51 || sc->re_type == MACFG_52) {
7950                 re_eri_write(sc, 0x1bc, 4, 0x0000001f, ERIAR_ExGMAC);
7951                 re_eri_write(sc, 0x1dc, 4, 0x0000002d, ERIAR_ExGMAC);
7952         } else if (sc->re_type == MACFG_38) {
7953                 re_eri_write(sc, 0x1bc, 4, 0x0000001f, ERIAR_ExGMAC);
7954                 re_eri_write(sc, 0x1dc, 4, 0x0000003f, ERIAR_ExGMAC);
7955         }
7956         re_reset(sc);
7957 
7958 #ifndef __DragonFly__
7959         /*
7960          * Free the TX list buffers.
7961          */
7962         while (sc->re_desc.tx_last_index!=sc->re_desc.tx_cur_index) {
7963                 if (sc->re_desc.re_tx_mtag) {
7964                         bus_dmamap_sync(sc->re_desc.re_tx_mtag,
7965                                         sc->re_desc.re_tx_dmamap[sc->re_desc.tx_last_index],
7966                                         BUS_DMASYNC_POSTWRITE);
7967                         bus_dmamap_unload(sc->re_desc.re_tx_mtag,
7968                                           sc->re_desc.re_tx_dmamap[sc->re_desc.tx_last_index]);
7969                 }
7970 
7971                 if (sc->re_desc.tx_buf[sc->re_desc.tx_last_index]!=NULL) {
7972                         m_freem(sc->re_desc.tx_buf[sc->re_desc.tx_last_index]);
7973                         sc->re_desc.tx_buf[sc->re_desc.tx_last_index] = NULL;
7974                 }
7975                 sc->re_desc.tx_last_index = (sc->re_desc.tx_last_index+1)%RE_TX_BUF_NUM;
7976         }
7977 
7978         ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
7979 
7980         return;
7981 #endif	/* !__DragonFly__ */
7982 }
7983 
7984 #ifndef __DragonFly__
7985 /*
7986  * Main transmit routine.
7987  */
7988 static void re_start(struct ifnet *ifp)  	/* Transmit Packet*/
7989 {
7990         struct re_softc		*sc;
7991         struct mbuf		*m_head = NULL;
7992 
7993         sc = ifp->if_softc;	/* Paste to ifp in function re_attach(dev) */
7994 
7995         RE_LOCK(sc);
7996 
7997         /*	RE_LOCK_ASSERT(sc);*/
7998 
7999         if ((sc->driver_detach == 1) || (sc->rx_fifo_overflow != 0)) {
8000                 RE_UNLOCK(sc);
8001                 return;
8002         }
8003 
8004         while (1) {
8005                 int fs = 1, ls = 0, TxLen = 0, PktLen;
8006                 struct mbuf *ptr;
8007                 uint32_t  opts1 =0;
8008                 uint32_t  opts2 =0;
8009                 IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head);	/* Remove(get) data from system transmit queue */
8010                 if (m_head == NULL) {
8011                         break;
8012                 }
8013 
8014                 if (sc->re_coalesce_tx_pkt) {
8015                         if (re_encap(sc, m_head)) {
8016                                 IFQ_DRV_PREPEND(&ifp->if_snd, m_head);
8017                                 ifp->if_drv_flags |= IFF_DRV_OACTIVE;
8018                                 break;
8019                         }
8020 
8021                         m_head = sc->re_desc.tx_buf[sc->re_desc.tx_cur_index];
8022                 }
8023 
8024                 if (CountMbufNum(m_head) > CountFreeTxDescNum(sc->re_desc)) {	/* No enough descriptor */
8025                         IFQ_DRV_PREPEND(&ifp->if_snd, m_head);
8026                         ifp->if_drv_flags |= IFF_DRV_OACTIVE;
8027                         break;
8028                 }
8029 
8030                 if (ifp->if_bpf) {		/* If there's a BPF listener, bounce a copy of this frame to him. */
8031                         //printf("If there's a BPF listener, bounce a copy of this frame to him. \n");
8032 
8033                         /*#if OS_VER < VERSION(5, 1)*/
8034 #if OS_VER < VERSION(4,9)
8035                         bpf_mtap(ifp, m_head);
8036 #else
8037                         bpf_mtap(ifp->if_bpf, m_head);
8038 #endif
8039                 }
8040 
8041                 //hw checksum
8042                 if (ifp->if_capenable & IFCAP_TXCSUM) {
8043                         if ((m_head->m_pkthdr.csum_flags & RE_CSUM_FEATURES) !=0) 	{
8044                                 if (!(sc->re_if_flags & RL_FLAG_DESCV2)) {
8045                                         opts1 |= RL_IPV4CS1;
8046                                         if ((m_head->m_pkthdr.csum_flags & CSUM_TCP)!=0)
8047                                                 opts1 |=RL_TCPCS1;
8048                                         if ((m_head->m_pkthdr.csum_flags & CSUM_UDP)!=0)
8049                                                 opts1 |=RL_UDPCS1;
8050                                 } else {
8051                                         opts2 |=  RL_IPV4CS;
8052                                         if ((m_head->m_pkthdr.csum_flags & CSUM_TCP)!=0)
8053                                                 opts2 |= RL_TCPCS;
8054                                         else if ((m_head->m_pkthdr.csum_flags & CSUM_UDP)!=0)
8055                                                 opts2 |= RL_UDPCS;
8056                                 }
8057                         }
8058                 }
8059 
8060                 //vlan
8061                 if (m_head->m_flags & M_VLANTAG)
8062                         opts2 |= bswap16(m_head->m_pkthdr.ether_vtag) | RL_TDESC_VLANCTL_TAG;
8063                 ptr = m_head;
8064                 PktLen = ptr->m_pkthdr.len;
8065 #ifdef _DEBUG_
8066                 printf("PktLen=%d",PktLen);
8067 #endif
8068                 while (ptr!=NULL) {
8069                         if (ptr->m_len >0) {
8070 #ifdef _DEBUG_
8071                                 printf(", len=%d T=%d F=%d",ptr->m_len,ptr->m_type,ptr->m_flags);
8072 #endif
8073                                 TxLen += ptr->m_len;
8074                                 if (TxLen >= PktLen) {
8075                                         ls=1;
8076                                         sc->re_desc.tx_buf[sc->re_desc.tx_cur_index] = m_head;
8077                                 } else
8078                                         sc->re_desc.tx_buf[sc->re_desc.tx_cur_index] = NULL;
8079 
8080                                 //vlan
8081                                 WritePacket(sc,ptr->m_data,ptr->m_len,fs,ls,opts2,opts1);
8082 
8083                                 fs=0;
8084                         }
8085                         ptr = ptr->m_next;
8086                 }
8087 #ifdef _DEBUG_
8088                 printf("\n");
8089 #endif
8090         }
8091 #if OS_VER < VERSION(9,0)
8092         ifp->if_timer = 5;
8093 #endif
8094 
8095         RE_UNLOCK(sc);
8096 
8097         return;
8098 }
8099 
8100 /*
8101  * Encapsulate an mbuf chain in a descriptor by coupling the mbuf data
8102  * pointers to the fragment pointers.
8103  */
8104 static int re_encap(struct re_softc *sc,struct mbuf *m_head)
8105 {
8106         struct mbuf		*m_new = NULL;
8107 
8108         m_new = m_defrag(m_head, M_DONTWAIT);
8109 
8110         if (m_new == NULL) {
8111                 printf("re%d: no memory for tx list", sc->re_unit);
8112                 return (1);
8113         }
8114         m_head = m_new;
8115 
8116         /* Pad frames to at least 60 bytes. */
8117         if (m_head->m_pkthdr.len < RE_MIN_FRAMELEN) {	/* Case length < 60 bytes */
8118                 /*
8119                  * Make security concious people happy: zero out the
8120                  * bytes in the pad area, since we don't know what
8121                  * this mbuf cluster buffer's previous user might
8122                  * have left in it.
8123                  */
8124                 bzero(mtod(m_head, char *) + m_head->m_pkthdr.len,
8125                       RE_MIN_FRAMELEN - m_head->m_pkthdr.len);
8126                 m_head->m_pkthdr.len = RE_MIN_FRAMELEN;
8127                 m_head->m_len = m_head->m_pkthdr.len;
8128         }
8129 
8130         sc->re_desc.tx_buf[sc->re_desc.tx_cur_index] = m_head;
8131 
8132         return(0);
8133 }
8134 
8135 static void WritePacket(struct re_softc	*sc, caddr_t addr, int len,int fs_flag,int ls_flag, uint32_t opts2,uint32_t opts1)
8136 {
8137         union TxDesc *txptr;
8138         uint32_t status;
8139         uint32_t tx_cur_index = sc->re_desc.tx_cur_index;
8140 
8141         txptr =&(sc->re_desc.tx_desc[tx_cur_index]);
8142 
8143         status = RL_TDESC_CMD_OWN | opts1 | len;
8144 
8145         if (fs_flag)
8146                 status |= RL_TDESC_CMD_SOF;
8147         if (ls_flag)
8148                 status |= RL_TDESC_CMD_EOF;
8149         if (tx_cur_index == (RE_TX_BUF_NUM - 1))
8150                 status |= RL_TDESC_CMD_EOR;
8151 
8152         bus_dmamap_load(sc->re_desc.re_tx_mtag,
8153                         sc->re_desc.re_tx_dmamap[tx_cur_index],
8154                         addr,
8155                         len,
8156                         re_tx_dma_map_buf, txptr,
8157                         0);
8158         bus_dmamap_sync(sc->re_desc.re_tx_mtag,
8159                         sc->re_desc.re_tx_dmamap[tx_cur_index],
8160                         BUS_DMASYNC_PREWRITE);
8161         txptr->ul[1] = htole32(opts2);
8162         txptr->ul[0] = htole32(status);
8163 
8164         bus_dmamap_sync(sc->re_desc.tx_desc_tag,
8165                         sc->re_desc.tx_desc_dmamap,
8166                         BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
8167 
8168         if (ls_flag) {
8169                 if (sc->re_device_id==RT_DEVICEID_8125) {
8170                         CSR_WRITE_2(sc, RE_TPPOLL_8125, RE_NPQ_8125);
8171                         CSR_WRITE_2(sc, RE_TPPOLL_8125, RE_NPQ_8125);
8172                 } else {
8173                         CSR_WRITE_1(sc, RE_TPPOLL, RE_NPQ);
8174                         CSR_WRITE_1(sc, RE_TPPOLL, RE_NPQ);
8175                 }
8176         }
8177 
8178         sc->re_desc.tx_cur_index = (tx_cur_index+1)%RE_TX_BUF_NUM;
8179 }
8180 
8181 static int CountFreeTxDescNum(struct re_descriptor desc)
8182 {
8183         int ret=desc.tx_last_index-desc.tx_cur_index;
8184         if (ret<=0)
8185                 ret+=RE_TX_BUF_NUM;
8186         ret--;
8187         return ret;
8188 }
8189 
8190 static int CountMbufNum(struct mbuf *m_head)
8191 {
8192         int ret=0;
8193         struct mbuf *ptr = m_head;
8194 
8195         while (ptr!=NULL) {
8196                 if (ptr->m_len >0)
8197                         ret++;
8198                 ptr=ptr->m_next;
8199         }
8200 
8201         return ret;
8202 }
8203 
8204 #ifdef RE_FIXUP_RX
8205 static __inline void re_fixup_rx(struct mbuf *m)
8206 {
8207         int                     i;
8208         uint16_t                *src, *dst;
8209 
8210         src = mtod(m, uint16_t *);
8211         dst = src - (RE_ETHER_ALIGN - ETHER_ALIGN) / sizeof *src;
8212 
8213         for (i = 0; i < (m->m_len / sizeof(uint16_t) + 1); i++)
8214                 *dst++ = *src++;
8215 
8216         m->m_data -= RE_ETHER_ALIGN - ETHER_ALIGN;
8217 }
8218 #endif
8219 
8220 /*
8221  * A frame was downloaded to the chip. It's safe for us to clean up
8222  * the list buffers.
8223  */
8224 static void re_txeof(struct re_softc *sc)  	/* Transmit OK/ERR handler */
8225 {
8226         union TxDesc *txptr;
8227         struct ifnet		*ifp;
8228         u_int32_t           txstat;
8229 
8230         /*	printf("X");*/
8231 
8232         ifp = RE_GET_IFNET(sc);
8233 
8234 #if OS_VER < VERSION(9,0)
8235         /* Clear the timeout timer. */
8236         ifp->if_timer = 0;
8237 #endif
8238 
8239         bus_dmamap_sync(sc->re_desc.tx_desc_tag,
8240                         sc->re_desc.tx_desc_dmamap,
8241                         BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
8242 
8243         while (sc->re_desc.tx_last_index!=sc->re_desc.tx_cur_index) {
8244                 txptr=&(sc->re_desc.tx_desc[sc->re_desc.tx_last_index]);
8245                 txstat = le32toh(txptr->ul[0]);
8246                 if (txstat & RL_TDESC_STAT_OWN)
8247                         break;
8248 #ifdef _DEBUG_
8249                 printf("**** Tx OK  ****\n");
8250 #endif
8251                 bus_dmamap_sync(sc->re_desc.re_tx_mtag,
8252                                 sc->re_desc.re_tx_dmamap[sc->re_desc.tx_last_index],
8253                                 BUS_DMASYNC_POSTWRITE);
8254                 bus_dmamap_unload(sc->re_desc.re_tx_mtag,
8255                                   sc->re_desc.re_tx_dmamap[sc->re_desc.tx_last_index]);
8256 
8257                 if (sc->re_desc.tx_buf[sc->re_desc.tx_last_index]!=NULL) {
8258                         m_freem(sc->re_desc.tx_buf[sc->re_desc.tx_last_index]);	/* Free Current MBuf in a Mbuf list*/
8259                         sc->re_desc.tx_buf[sc->re_desc.tx_last_index] = NULL;
8260                 }
8261 
8262                 sc->re_desc.tx_last_index = (sc->re_desc.tx_last_index+1)%RE_TX_BUF_NUM;
8263 #if OS_VER < VERSION(11,0)
8264                 if (txstat & (RL_TDESC_STAT_EXCESSCOL|
8265                               RL_TDESC_STAT_COLCNT))
8266                         ifp->if_collisions++;
8267                 if (txstat & RL_TDESC_STAT_TXERRSUM)
8268                         ifp->if_oerrors++;
8269                 else
8270                         ifp->if_opackets++;
8271 #else
8272                 if (txstat & (RL_TDESC_STAT_EXCESSCOL|
8273                               RL_TDESC_STAT_COLCNT))
8274                         if_inc_counter(ifp, IFCOUNTER_COLLISIONS, 1);
8275                 if (txstat & RL_TDESC_STAT_TXERRSUM)
8276                         if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
8277                 else
8278                         if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
8279 #endif
8280                 ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
8281         }
8282 
8283         return;
8284 }
8285 
8286 /*
8287  * A frame has been uploaded: pass the resulting mbuf chain up to
8288  * the higher level protocols.
8289  *
8290  * You know there's something wrong with a PCI bus-master chip design
8291  * when you have to use m_devget().
8292  *
8293  * The receive operation is badly documented in the datasheet, so I'll
8294  * attempt to document it here. The driver provides a buffer area and
8295  * places its base address in the RX buffer start address register.
8296  * The chip then begins copying frames into the RX buffer. Each frame
8297  * is preceeded by a 32-bit RX status word which specifies the length
8298  * of the frame and certain other status bits. Each frame (starting with
8299  * the status word) is also 32-bit aligned. The frame length is in the
8300  * first 16 bits of the status word; the lower 15 bits correspond with
8301  * the 'rx status register' mentioned in the datasheet.
8302  *
8303  * Note: to make the Alpha happy, the frame payload needs to be aligned
8304  * on a 32-bit boundary. To achieve this, we cheat a bit by copying from
8305  * the ring buffer starting at an address two bytes before the actual
8306  * data location. We can then shave off the first two bytes using m_adj().
8307  * The reason we do this is because m_devget() doesn't let us specify an
8308  * offset into the mbuf storage space, so we have to artificially create
8309  * one. The ring is allocated in such a way that there are a few unused
8310  * bytes of space preceecing it so that it will be safe for us to do the
8311  * 2-byte backstep even if reading from the ring at offset 0.
8312  */
8313 static void re_rxeof(sc)	/* Receive Data OK/ERR handler */
8314 struct re_softc		*sc;
8315 {
8316         struct ether_header	*eh;
8317         struct mbuf		*m;
8318         struct ifnet		*ifp;
8319         union RxDesc *rxptr;
8320         int bError;
8321         struct mbuf *buf;
8322         int size;
8323         int maxpkt = RE_RX_BUF_NUM;
8324         u_int32_t rx_cur_index;
8325         u_int32_t opts2,opts1,status;
8326 
8327         /*		RE_LOCK_ASSERT(sc);*/
8328 
8329         ifp = RE_GET_IFNET(sc);
8330 
8331         bus_dmamap_sync(sc->re_desc.rx_desc_tag,
8332                         sc->re_desc.rx_desc_dmamap,
8333                         BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
8334 
8335         rx_cur_index = sc->re_desc.rx_cur_index;
8336         rxptr=&(sc->re_desc.rx_desc[rx_cur_index]);
8337         opts1 = le32toh(rxptr->ul[0]);
8338         while ((opts1&RL_RDESC_STAT_OWN)==0) {	/* Receive OK */
8339                 bError = 0;
8340 
8341                 sc->re_desc.rx_cur_index = (rx_cur_index+1)%RE_RX_BUF_NUM;
8342 
8343                 /* Check if this packet is received correctly*/
8344                 if (opts1&0x200000) {	/*Check RES bit*/
8345                         bError=1;
8346 #if OS_VER < VERSION(11,0)
8347                         ifp->if_ierrors++;
8348 #else
8349                         if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
8350 #endif
8351                         goto update_desc;
8352                 }
8353                 opts2 = le32toh(rxptr->ul[1]);
8354 
8355                 //buf = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); /* Alloc a new mbuf */
8356 
8357                 if (sc->re_rx_mbuf_sz <= MCLBYTES)
8358                         size = MCLBYTES;
8359                 else if (sc->re_rx_mbuf_sz <= MJUMPAGESIZE)
8360                         size = MJUMPAGESIZE;
8361                 else
8362                         size = MJUM9BYTES;
8363 
8364                 buf = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, size);
8365                 if (buf==NULL) {
8366                         bError=1;
8367 #if OS_VER < VERSION(11,0)
8368                         ifp->if_iqdrops++;
8369 #else
8370                         if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1);
8371 #endif
8372                         goto update_desc;
8373                 }
8374 
8375                 buf->m_len = buf->m_pkthdr.len = size;
8376 #ifdef RE_FIXUP_RX
8377                 /*
8378                  * This is part of an evil trick to deal with non-x86 platforms.
8379                  * The RealTek chip requires RX buffers to be aligned on 64-bit
8380                  * boundaries, but that will hose non-x86 machines. To get around
8381                  * this, we leave some empty space at the start of each buffer
8382                  * and for non-x86 hosts, we copy the buffer back six bytes
8383                  * to achieve word alignment. This is slightly more efficient
8384                  * than allocating a new buffer, copying the contents, and
8385                  * discarding the old buffer.
8386                  */
8387                 m_adj(buf, RE_ETHER_ALIGN);
8388 #endif
8389 
8390                 bus_dmamap_sync(sc->re_desc.re_rx_mtag,
8391                                 sc->re_desc.re_rx_dmamap[rx_cur_index],
8392                                 BUS_DMASYNC_POSTREAD);
8393                 bus_dmamap_unload(sc->re_desc.re_rx_mtag,
8394                                   sc->re_desc.re_rx_dmamap[rx_cur_index]);
8395 
8396                 m = sc->re_desc.rx_buf[rx_cur_index];
8397                 sc->re_desc.rx_buf[rx_cur_index] = buf;
8398                 m->m_pkthdr.len = m->m_len = (opts1&RL_RDESC_STAT_GFRAGLEN)-ETHER_CRC_LEN;
8399                 m->m_pkthdr.rcvif = ifp;
8400 
8401 #ifdef RE_FIXUP_RX
8402                 re_fixup_rx(m);
8403 #endif
8404 
8405                 //vlan
8406                 if (opts2 & RL_RDESC_VLANCTL_TAG) {
8407                         m->m_pkthdr.ether_vtag =
8408                                 bswap16((opts2 & RL_RDESC_VLANCTL_DATA));
8409                         m->m_flags |= M_VLANTAG;
8410                 }
8411                 if (ifp->if_capenable & IFCAP_RXCSUM) {
8412                         if (!(sc->re_if_flags & RL_FLAG_DESCV2)) {
8413                                 if (opts1 & RL_ProtoIP)
8414                                         m->m_pkthdr.csum_flags |=  CSUM_IP_CHECKED;
8415                                 if (!(opts1 & RL_IPF))
8416                                         m->m_pkthdr.csum_flags |= CSUM_IP_VALID;
8417                                 if ((((opts1 & RL_ProtoIP)==(1<<17)) && !(opts1 & RL_TCPF))   || (((opts1 & RL_ProtoIP)==(1<<18)) && !(opts1 & RL_UDPF))) {
8418                                         m->m_pkthdr.csum_flags |= CSUM_DATA_VALID|CSUM_PSEUDO_HDR;
8419                                         m->m_pkthdr.csum_data = 0xffff;
8420                                 }
8421                         } else {
8422                                 if ((opts1 & RL_ProtoIP) && (opts2 & RL_V4F))
8423                                         m->m_pkthdr.csum_flags |=  CSUM_IP_CHECKED;
8424                                 if (!(opts1 & RL_IPF) && (opts2 & RL_V4F))
8425                                         m->m_pkthdr.csum_flags |= CSUM_IP_VALID;
8426                                 if (((opts1 & RL_TCPT) && !(opts2 & RL_TCPF)) || ((opts1 & RL_UDPT) && !(opts2 & RL_UDPF))) {
8427                                         m->m_pkthdr.csum_flags |= CSUM_DATA_VALID|CSUM_PSEUDO_HDR;
8428                                         m->m_pkthdr.csum_data = 0xffff;
8429                                 }
8430                         }
8431                 }
8432 
8433                 eh = mtod(m, struct ether_header *);
8434 #if OS_VER < VERSION(11,0)
8435                 ifp->if_ipackets++;
8436 #else
8437                 if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1);
8438 #endif
8439 #ifdef _DEBUG_
8440                 printf("Rcv Packet, Len=%d \n", m->m_len);
8441 #endif
8442 
8443                 RE_UNLOCK(sc);
8444 
8445                 /*#if OS_VER < VERSION(5, 1)*/
8446 #if OS_VER < VERSION(4,9)
8447                 /* Remove header from mbuf and pass it on. */
8448                 m_adj(m, sizeof(struct ether_header));
8449                 ether_input(ifp, eh, m);
8450 #else
8451                 (*ifp->if_input)(ifp, m);
8452 #endif
8453                 RE_LOCK(sc);
8454 
8455 update_desc:
8456                 //rxptr->ul[0]&=htole32(0x40000000);	/* keep EOR bit */
8457                 rxptr->ul[1]=0;
8458 
8459                 status = RL_RDESC_CMD_OWN | sc->re_rx_desc_buf_sz;
8460                 if (rx_cur_index == (RE_RX_BUF_NUM - 1))
8461                         status |= RL_RDESC_CMD_EOR;
8462                 if (!bError) {
8463                         bus_dmamap_load(sc->re_desc.re_rx_mtag,
8464                                         sc->re_desc.re_rx_dmamap[rx_cur_index],
8465                                         sc->re_desc.rx_buf[rx_cur_index]->m_data,
8466                                         sc->re_rx_desc_buf_sz,
8467                                         re_rx_dma_map_buf, rxptr,
8468                                         0);
8469                         bus_dmamap_sync(sc->re_desc.re_rx_mtag,
8470                                         sc->re_desc.re_rx_dmamap[rx_cur_index],
8471                                         BUS_DMASYNC_PREREAD);
8472                 }
8473                 rxptr->ul[0] = htole32(status);
8474                 rx_cur_index = sc->re_desc.rx_cur_index;
8475                 rxptr=&sc->re_desc.rx_desc[rx_cur_index];
8476                 opts1 = le32toh(rxptr->ul[0]);
8477 
8478                 maxpkt--;
8479                 if (maxpkt==0)
8480                         break;
8481         }
8482 
8483         bus_dmamap_sync(sc->re_desc.rx_desc_tag,
8484                         sc->re_desc.rx_desc_dmamap,
8485                         BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
8486 
8487         return;
8488 }
8489 
8490 #if OS_VER < VERSION(7,0)
8491 static void re_intr(void *arg)  	/* Interrupt Handler */
8492 #else
8493 static int re_intr(void *arg)  	/* Interrupt Handler */
8494 #endif //OS_VER < VERSION(7,0)
8495 {
8496         struct re_softc		*sc;
8497 
8498         sc = arg;
8499 
8500         if ((sc->re_if_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) == 0) {
8501                 if ((CSR_READ_2(sc, RE_ISR) & RE_INTRS) == 0) {
8502 #if OS_VER < VERSION(7,0)
8503                         return;
8504 #else
8505                         return (FILTER_STRAY);
8506 #endif
8507                 }
8508         }
8509 
8510         /* Disable interrupts. */
8511         CSR_WRITE_2(sc, RE_IMR, 0x0000);
8512 
8513 #if OS_VER < VERSION(7,0)
8514         re_int_task(arg, 0);
8515 #else //OS_VER < VERSION(7,0)
8516 #if OS_VER < VERSION(11,0)
8517         taskqueue_enqueue_fast(taskqueue_fast, &sc->re_inttask);
8518 #else ////OS_VER < VERSION(11,0)
8519         taskqueue_enqueue(taskqueue_fast, &sc->re_inttask);
8520 #endif //OS_VER < VERSION(11,0)
8521         return (FILTER_HANDLED);
8522 #endif //OS_VER < VERSION(7,0)
8523 }
8524 
8525 #if OS_VER < VERSION(7,0)
8526 static void re_intr_8125(void *arg)  	/* Interrupt Handler */
8527 #else
8528 static int re_intr_8125(void *arg)  	/* Interrupt Handler */
8529 #endif //OS_VER < VERSION(7,0)
8530 {
8531         struct re_softc		*sc;
8532 
8533         sc = arg;
8534 
8535         if ((sc->re_if_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) == 0) {
8536                 if ((CSR_READ_4(sc, RE_ISR0_8125) & RE_INTRS) == 0) {
8537 #if OS_VER < VERSION(7,0)
8538                         return;
8539 #else
8540                         return (FILTER_STRAY);
8541 #endif
8542                 }
8543         }
8544 
8545         /* Disable interrupts. */
8546         CSR_WRITE_4(sc, RE_IMR0_8125, 0x00000000);
8547 
8548 #if OS_VER < VERSION(7,0)
8549         re_int_task_8125(arg, 0);
8550 #else //OS_VER < VERSION(7,0)
8551 #if OS_VER < VERSION(11,0)
8552         taskqueue_enqueue_fast(taskqueue_fast, &sc->re_inttask);
8553 #else ////OS_VER < VERSION(11,0)
8554         taskqueue_enqueue(taskqueue_fast, &sc->re_inttask);
8555 #endif //OS_VER < VERSION(11,0)
8556         return (FILTER_HANDLED);
8557 #endif //OS_VER < VERSION(7,0)
8558 }
8559 
8560 static void re_int_task(void *arg, int npending)
8561 {
8562         struct re_softc		*sc;
8563         struct ifnet		*ifp;
8564         u_int32_t		status;
8565 
8566         sc = arg;
8567 
8568         RE_LOCK(sc);
8569 
8570         ifp = RE_GET_IFNET(sc);
8571 
8572         status = CSR_READ_2(sc, RE_ISR);
8573 
8574         if (status) {
8575                 CSR_WRITE_2(sc, RE_ISR, status & ~RE_ISR_FIFO_OFLOW);
8576         }
8577 
8578         if (sc->suspended ||
8579             (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) {
8580                 RE_UNLOCK(sc);
8581                 return;
8582         }
8583 
8584         re_rxeof(sc);
8585 
8586         if (sc->re_type == MACFG_21) {
8587                 if (status & RE_ISR_FIFO_OFLOW) {
8588                         sc->rx_fifo_overflow = 1;
8589                         CSR_WRITE_2(sc, RE_IntrMitigate, 0x0000);
8590                         CSR_WRITE_4(sc, RE_TIMERCNT, 0x4000);
8591                         CSR_WRITE_4(sc, RE_TIMERINT, 0x4000);
8592                 } else {
8593                         sc->rx_fifo_overflow = 0;
8594                         CSR_WRITE_4(sc,RE_CPlusCmd, 0x51512082);
8595                 }
8596 
8597                 if (status & RE_ISR_PCS_TIMEOUT) {
8598                         if ((status & RE_ISR_FIFO_OFLOW) &&
8599                             (!(status & (RE_ISR_RX_OK | RE_ISR_TX_OK | RE_ISR_RX_OVERRUN)))) {
8600                                 re_reset(sc);
8601                                 re_init(sc);
8602                                 sc->rx_fifo_overflow = 0;
8603                                 CSR_WRITE_2(sc, RE_ISR, RE_ISR_FIFO_OFLOW);
8604                         }
8605                 }
8606         }
8607 
8608         re_txeof(sc);
8609 
8610         if (status & RE_ISR_SYSTEM_ERR) {
8611                 re_reset(sc);
8612                 re_init(sc);
8613         }
8614 
8615         switch(sc->re_type) {
8616         case MACFG_21:
8617         case MACFG_22:
8618         case MACFG_23:
8619         case MACFG_24:
8620                 CSR_WRITE_1(sc, RE_TPPOLL, RE_NPQ);
8621                 break;
8622 
8623         default:
8624                 break;
8625         }
8626 
8627         RE_UNLOCK(sc);
8628 
8629         if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
8630                 re_start(ifp);
8631 
8632 #if OS_VER>=VERSION(7,0)
8633         if (CSR_READ_2(sc, RE_ISR) & RE_INTRS) {
8634 #if OS_VER < VERSION(11,0)
8635                 taskqueue_enqueue_fast(taskqueue_fast, &sc->re_inttask);
8636 #else ////OS_VER < VERSION(11,0)
8637                 taskqueue_enqueue(taskqueue_fast, &sc->re_inttask);
8638 #endif //OS_VER < VERSION(11,0)
8639                 return;
8640         }
8641 #endif //OS_VER>=VERSION(7,0)
8642 
8643         /* Re-enable interrupts. */
8644         CSR_WRITE_2(sc, RE_IMR, RE_INTRS);
8645 }
8646 
8647 static void re_int_task_8125(void *arg, int npending)
8648 {
8649         struct re_softc		*sc;
8650         struct ifnet		*ifp;
8651         u_int32_t		status;
8652 
8653         sc = arg;
8654 
8655         RE_LOCK(sc);
8656 
8657         ifp = RE_GET_IFNET(sc);
8658 
8659         status = CSR_READ_4(sc, RE_ISR0_8125);
8660 
8661         if (status) {
8662                 CSR_WRITE_4(sc, RE_ISR0_8125, status & ~RE_ISR_FIFO_OFLOW);
8663         }
8664 
8665         if (sc->suspended ||
8666             (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) {
8667                 RE_UNLOCK(sc);
8668                 return;
8669         }
8670 
8671         re_rxeof(sc);
8672 
8673         re_txeof(sc);
8674 
8675         if (status & RE_ISR_SYSTEM_ERR) {
8676                 re_reset(sc);
8677                 re_init(sc);
8678         }
8679 
8680         RE_UNLOCK(sc);
8681 
8682         if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
8683                 re_start(ifp);
8684 
8685 #if OS_VER>=VERSION(7,0)
8686         if (CSR_READ_4(sc, RE_ISR0_8125) & RE_INTRS) {
8687 #if OS_VER < VERSION(11,0)
8688                 taskqueue_enqueue_fast(taskqueue_fast, &sc->re_inttask);
8689 #else ////OS_VER < VERSION(11,0)
8690                 taskqueue_enqueue(taskqueue_fast, &sc->re_inttask);
8691 #endif //OS_VER < VERSION(11,0)
8692                 return;
8693         }
8694 #endif //OS_VER>=VERSION(7,0)
8695 
8696         /* Re-enable interrupts. */
8697         CSR_WRITE_4(sc, RE_IMR0_8125, RE_INTRS);
8698 }
8699 
8700 #endif	/* !__DragonFly__ */
8701 
8702 static void re_set_multicast_reg(struct re_softc *sc, u_int32_t mask0, u_int32_t mask4)
8703 {
8704         u_int8_t  enable_cfg_reg_write = 0;
8705 
8706         if (sc->re_type == MACFG_5 || sc->re_type == MACFG_6)
8707                 enable_cfg_reg_write = 1;
8708 
8709         if (enable_cfg_reg_write)
8710                 re_enable_cfg9346_write(sc);
8711         CSR_WRITE_4(sc, RE_MAR0, mask0);
8712         CSR_WRITE_4(sc, RE_MAR4, mask4);
8713         if (enable_cfg_reg_write)
8714                 re_disable_cfg9346_write(sc);
8715 
8716         return;
8717 }
8718 
8719 #ifndef __DragonFly__
8720 static void re_set_rx_packet_filter_in_sleep_state(sc)
8721 struct re_softc		*sc;
8722 {
8723         struct ifnet		*ifp;
8724         u_int32_t		rxfilt;
8725 
8726         ifp = RE_GET_IFNET(sc);
8727 
8728         rxfilt = CSR_READ_4(sc, RE_RXCFG);
8729 
8730         rxfilt &= ~(RE_RXCFG_RX_ALLPHYS | RE_RXCFG_RX_INDIV | RE_RXCFG_RX_MULTI | RE_RXCFG_RX_BROAD | RE_RXCFG_RX_RUNT | RE_RXCFG_RX_ERRPKT);
8731         rxfilt |= (RE_RXCFG_RX_INDIV | RE_RXCFG_RX_MULTI | RE_RXCFG_RX_BROAD);
8732 
8733         CSR_WRITE_4(sc, RE_RXCFG, rxfilt);
8734 
8735         re_set_multicast_reg(sc, 0xFFFFFFFF, 0xFFFFFFFF);
8736 
8737         return;
8738 }
8739 #endif	/* !__DragonFly__ */
8740 
8741 static void re_set_rx_packet_filter(struct re_softc *sc)
8742 {
8743         struct ifnet		*ifp;
8744         u_int32_t		rxfilt;
8745 
8746         ifp = RE_GET_IFNET(sc);
8747 
8748         rxfilt = CSR_READ_4(sc, RE_RXCFG);
8749 
8750         rxfilt |= RE_RXCFG_RX_INDIV;
8751 
8752         if (ifp->if_flags & (IFF_MULTICAST | IFF_ALLMULTI | IFF_PROMISC)) {
8753                 rxfilt |= (RE_RXCFG_RX_ALLPHYS | RE_RXCFG_RX_MULTI);
8754         } else {
8755                 rxfilt &= ~(RE_RXCFG_RX_MULTI);
8756         }
8757 
8758         if (ifp->if_flags & IFF_PROMISC) {
8759                 rxfilt |= (RE_RXCFG_RX_ALLPHYS | RE_RXCFG_RX_RUNT | RE_RXCFG_RX_ERRPKT);
8760         } else {
8761                 rxfilt &= ~(RE_RXCFG_RX_ALLPHYS | RE_RXCFG_RX_RUNT | RE_RXCFG_RX_ERRPKT);
8762         }
8763 
8764         if (ifp->if_flags & (IFF_BROADCAST | IFF_PROMISC)) {
8765                 rxfilt |= RE_RXCFG_RX_BROAD;
8766         } else {
8767                 rxfilt &= ~RE_RXCFG_RX_BROAD;
8768         }
8769 
8770         CSR_WRITE_4(sc, RE_RXCFG, rxfilt);
8771 
8772         re_setmulti(sc);
8773 
8774         return;
8775 }
8776 
8777 /*
8778  * Program the 64-bit multicast hash filter.
8779  */
8780 static void re_setmulti(struct re_softc *sc)
8781 {
8782         struct ifnet		*ifp;
8783         int			h = 0;
8784         u_int32_t		hashes[2] = { 0, 0 };
8785         struct ifmultiaddr	*ifma;
8786         u_int32_t		rxfilt;
8787         int			mcnt = 0;
8788 
8789         ifp = RE_GET_IFNET(sc);
8790 
8791         rxfilt = CSR_READ_4(sc, RE_RXCFG);
8792 
8793         if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) {
8794                 rxfilt |= RE_RXCFG_RX_MULTI;
8795                 CSR_WRITE_4(sc, RE_RXCFG, rxfilt);
8796                 re_set_multicast_reg(sc, 0xFFFFFFFF, 0xFFFFFFFF);
8797 
8798                 return;
8799         }
8800 
8801 #ifndef __DragonFly__
8802         /* now program new ones */
8803 #if OS_VER > VERSION(6,0)
8804         IF_ADDR_LOCK(ifp);
8805 #endif
8806 #if OS_VER < VERSION(4,9)
8807         for (ifma = ifp->if_multiaddrs.lh_first; ifma != NULL;
8808              ifma = ifma->ifma_link.le_next)
8809 #elif OS_VER < VERSION(12,0)
8810         TAILQ_FOREACH(ifma,&ifp->if_multiaddrs,ifma_link)
8811 #else
8812         CK_STAILQ_FOREACH(ifma,&ifp->if_multiaddrs,ifma_link)
8813 #endif
8814 #else	/* __DragonFly__ */
8815 	TAILQ_FOREACH(ifma,&ifp->if_multiaddrs,ifma_link)
8816 #endif	/* !__DragonFly__ */
8817         {
8818                 if (ifma->ifma_addr->sa_family != AF_LINK)
8819                         continue;
8820                 h = ether_crc32_be(LLADDR((struct sockaddr_dl *)
8821                                           ifma->ifma_addr), ETHER_ADDR_LEN) >> 26;
8822                 if (h < 32)
8823                         hashes[0] |= (1 << h);
8824                 else
8825                         hashes[1] |= (1 << (h - 32));
8826                 mcnt++;
8827         }
8828 #ifndef __DragonFly__
8829 #if OS_VER > VERSION(6,0)
8830         IF_ADDR_UNLOCK(ifp);
8831 #endif
8832 #endif	/* !__DragonFly__ */
8833 
8834         if (mcnt) {
8835                 if ((sc->re_if_flags & RL_FLAG_PCIE) != 0) {
8836                         h = bswap32(hashes[0]);
8837                         hashes[0] = bswap32(hashes[1]);
8838                         hashes[1] = h;
8839                 }
8840                 rxfilt |= RE_RXCFG_RX_MULTI;
8841         } else
8842                 rxfilt &= ~RE_RXCFG_RX_MULTI;
8843 
8844         CSR_WRITE_4(sc, RE_RXCFG, rxfilt);
8845         re_set_multicast_reg(sc, hashes[0], hashes[1]);
8846 
8847         return;
8848 }
8849 
8850 #ifndef __DragonFly__
8851 static int re_ioctl(ifp, command, data)
8852 struct ifnet		*ifp;
8853 u_long			command;
8854 caddr_t			data;
8855 {
8856         struct re_softc		*sc = ifp->if_softc;
8857         struct ifreq		*ifr = (struct ifreq *) data;
8858         /*int			s;*/
8859         int			error = 0;
8860         int mask, reinit;
8861         /*s = splimp();*/
8862 
8863         switch(command) {
8864         case SIOCSIFADDR:
8865         case SIOCGIFADDR:
8866                 error = ether_ioctl(ifp, command, data);
8867 
8868                 break;
8869         case SIOCSIFMTU:
8870 
8871                 //printf("before mtu =%d\n",(int)ifp->if_mtu);
8872                 if (ifr->ifr_mtu > sc->max_jumbo_frame_size)
8873                         error = EINVAL;
8874                 else {
8875                         ifp->if_mtu = ifr->ifr_mtu;
8876 
8877                         //if running
8878                         if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
8879                                 //printf("set mtu when running\n");
8880 
8881                                 RE_LOCK(sc);
8882                                 re_stop(sc);
8883 
8884                                 re_release_buf(sc);
8885                                 set_rxbufsize(sc);
8886                                 error =re_alloc_buf(sc);
8887 
8888                                 if (error == 0) {
8889                                         re_init(sc);
8890                                 }
8891                                 RE_UNLOCK(sc);
8892 
8893                         } else {
8894                                 //if not running
8895                                 RE_LOCK(sc);
8896                                 re_release_buf(sc);
8897                                 set_rxbufsize(sc);
8898                                 error =re_alloc_buf(sc);
8899                                 if (error == 0) {
8900                                         /* Init descriptors. */
8901                                         re_var_init(sc);
8902                                 }
8903                                 RE_UNLOCK(sc);
8904                         }
8905 
8906                 }
8907                 //	printf("after mtu =%d\n",(int)ifp->if_mtu);
8908                 break;
8909         case SIOCSIFFLAGS:
8910                 RE_LOCK(sc);
8911                 if (ifp->if_flags & IFF_UP) {
8912                         re_init(sc);
8913                 } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
8914                         re_stop(sc);
8915                 }
8916                 error = 0;
8917                 RE_UNLOCK(sc);
8918                 break;
8919         case SIOCADDMULTI:
8920         case SIOCDELMULTI:
8921                 RE_LOCK(sc);
8922                 re_set_rx_packet_filter(sc);
8923                 RE_UNLOCK(sc);
8924                 error = 0;
8925                 break;
8926         case SIOCGIFMEDIA:
8927         case SIOCSIFMEDIA:
8928                 error = ifmedia_ioctl(ifp, ifr, &sc->media, command);
8929                 break;
8930         case SIOCSIFCAP:
8931 
8932 
8933                 mask = ifr->ifr_reqcap ^ ifp->if_capenable;
8934                 reinit = 0;
8935 
8936                 if ((mask & IFCAP_TXCSUM) != 0 && (ifp->if_capabilities & IFCAP_TXCSUM) != 0) {
8937                         ifp->if_capenable ^= IFCAP_TXCSUM;
8938                         if ((ifp->if_capenable & IFCAP_TXCSUM) != 0)  {
8939                                 if ((sc->re_type == MACFG_24) || (sc->re_type == MACFG_25) || (sc->re_type == MACFG_26))
8940                                         ifp->if_hwassist |= CSUM_TCP | CSUM_UDP;
8941                                 else
8942                                         ifp->if_hwassist |= RE_CSUM_FEATURES;
8943                         } else
8944                                 ifp->if_hwassist &= ~RE_CSUM_FEATURES;
8945                         reinit = 1;
8946                 }
8947 
8948                 if ((mask & IFCAP_RXCSUM) != 0 &&
8949                     (ifp->if_capabilities & IFCAP_RXCSUM) != 0) {
8950                         ifp->if_capenable ^= IFCAP_RXCSUM;
8951                         reinit = 1;
8952                 }
8953 
8954                 if ((ifp->if_mtu <= ETHERMTU) || ((sc->re_type>= MACFG_3) &&(sc->re_type <=MACFG_6)) || ((sc->re_type>= MACFG_21) && (sc->re_type <=MACFG_23))) {
8955                         if (ifp->if_capenable & IFCAP_TXCSUM)
8956                                 sc->re_tx_cstag = 1;
8957                         else
8958                                 sc->re_tx_cstag = 0;
8959 
8960                         if (ifp->if_capenable & IFCAP_RXCSUM)
8961                                 sc->re_rx_cstag = 1;
8962                         else
8963                                 sc->re_rx_cstag = 0;
8964                 }
8965                 if ((mask & IFCAP_VLAN_HWTAGGING) != 0 &&
8966                     (ifp->if_capabilities & IFCAP_VLAN_HWTAGGING) != 0) {
8967                         ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING;
8968                         /* TSO over VLAN requires VLAN hardware tagging. */
8969                         //if ((ifp->if_capenable & IFCAP_VLAN_HWTAGGING) == 0)
8970                         //	ifp->if_capenable &= ~IFCAP_VLAN_HWTSO;
8971                         reinit = 1;
8972                 }
8973 
8974                 if ((mask & IFCAP_WOL) != 0 &&
8975                     (ifp->if_capabilities & IFCAP_WOL) != 0) {
8976                         if ((mask & IFCAP_WOL_UCAST) != 0)
8977                                 ifp->if_capenable ^= IFCAP_WOL_UCAST;
8978                         if ((mask & IFCAP_WOL_MCAST) != 0)
8979                                 ifp->if_capenable ^= IFCAP_WOL_MCAST;
8980                         if ((mask & IFCAP_WOL_MAGIC) != 0)
8981                                 ifp->if_capenable ^= IFCAP_WOL_MAGIC;
8982                 }
8983                 if (reinit && ifp->if_drv_flags & IFF_DRV_RUNNING) {
8984                         ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
8985                         re_init(sc);
8986                 }
8987                 VLAN_CAPABILITIES(ifp);
8988                 break;
8989         default:
8990                 error = EINVAL;
8991                 break;
8992         }
8993 
8994         /*(void)splx(s);*/
8995 
8996         return(error);
8997 }
8998 #endif	/* !__DragonFly__ */
8999 
9000 static void re_link_on_patch(struct re_softc *sc)
9001 {
9002         struct ifnet		*ifp;
9003 
9004         ifp = RE_GET_IFNET(sc);
9005 
9006         if (sc->re_type == MACFG_50 || sc->re_type == MACFG_51 || sc->re_type == MACFG_52) {
9007                 if (CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_1000MF) {
9008                         re_eri_write(sc, 0x1bc, 4, 0x00000011, ERIAR_ExGMAC);
9009                         re_eri_write(sc, 0x1dc, 4, 0x0000001f, ERIAR_ExGMAC);
9010                 } else if (CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_100M) {
9011                         re_eri_write(sc, 0x1bc, 4, 0x0000001f, ERIAR_ExGMAC);
9012                         re_eri_write(sc, 0x1dc, 4, 0x0000001f, ERIAR_ExGMAC);
9013                 } else {
9014                         re_eri_write(sc, 0x1bc, 4, 0x0000001f, ERIAR_ExGMAC);
9015                         re_eri_write(sc, 0x1dc, 4, 0x0000002d, ERIAR_ExGMAC);
9016                 }
9017         } else if ((sc->re_type == MACFG_38 || sc->re_type == MACFG_39) && (ifp->if_flags & IFF_UP)) {
9018                 if (sc->re_type == MACFG_38 && (CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_10M)) {
9019                         CSR_WRITE_4(sc, RE_RXCFG, CSR_READ_4(sc, RE_RXCFG) | RE_RXCFG_RX_ALLPHYS);
9020                 } else if (sc->re_type == MACFG_39) {
9021                         if (CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_1000MF) {
9022                                 re_eri_write(sc, 0x1bc, 4, 0x00000011, ERIAR_ExGMAC);
9023                                 re_eri_write(sc, 0x1dc, 4, 0x00000005, ERIAR_ExGMAC);
9024                         } else if (CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_100M) {
9025                                 re_eri_write(sc, 0x1bc, 4, 0x0000001f, ERIAR_ExGMAC);
9026                                 re_eri_write(sc, 0x1dc, 4, 0x00000005, ERIAR_ExGMAC);
9027                         } else {
9028                                 re_eri_write(sc, 0x1bc, 4, 0x0000001f, ERIAR_ExGMAC);
9029                                 re_eri_write(sc, 0x1dc, 4, 0x0000003f, ERIAR_ExGMAC);
9030                         }
9031                 }
9032         } else if ((sc->re_type == MACFG_36 || sc->re_type == MACFG_37) && eee_enable == 1) {
9033                 /*Full -Duplex  mode*/
9034                 if (CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_FULL_DUP) {
9035                         MP_WritePhyUshort(sc, 0x1F, 0x0006);
9036                         MP_WritePhyUshort(sc, 0x00, 0x5a30);
9037                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
9038                         if (CSR_READ_1(sc, RE_PHY_STATUS) & (RL_PHY_STATUS_10M | RL_PHY_STATUS_100M))
9039                                 CSR_WRITE_4(sc, RE_TXCFG, (CSR_READ_4(sc, RE_TXCFG) & ~BIT_19) | BIT_25);
9040 
9041                 } else {
9042                         MP_WritePhyUshort(sc, 0x1F, 0x0006);
9043                         MP_WritePhyUshort(sc, 0x00, 0x5a00);
9044                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
9045                         if (CSR_READ_1(sc, RE_PHY_STATUS) & (RL_PHY_STATUS_10M | RL_PHY_STATUS_100M))
9046                                 CSR_WRITE_4(sc, RE_TXCFG, (CSR_READ_4(sc, RE_TXCFG) & ~BIT_19) | RE_TXCFG_IFG);
9047                 }
9048         } else if ((sc->re_type == MACFG_56 || sc->re_type == MACFG_57 ||
9049                     sc->re_type == MACFG_58 || sc->re_type == MACFG_59 ||
9050                     sc->re_type == MACFG_60 || sc->re_type == MACFG_61 ||
9051                     sc->re_type == MACFG_62 || sc->re_type == MACFG_67 ||
9052                     sc->re_type == MACFG_68 || sc->re_type == MACFG_69 ||
9053                     sc->re_type == MACFG_70 || sc->re_type == MACFG_71 ||
9054                     sc->re_type == MACFG_72 || sc->re_type == MACFG_80 ||
9055                     sc->re_type == MACFG_81 || sc->re_type == MACFG_82 ||
9056                     sc->re_type == MACFG_83) &&
9057                    (ifp->if_flags & IFF_UP)) {
9058                 if (CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_FULL_DUP)
9059                         CSR_WRITE_4(sc, RE_TXCFG, (CSR_READ_4(sc, RE_TXCFG) | (BIT_24 | BIT_25)) & ~BIT_19);
9060                 else
9061                         CSR_WRITE_4(sc, RE_TXCFG, (CSR_READ_4(sc, RE_TXCFG) | BIT_25) & ~(BIT_19 | BIT_24));
9062         }
9063 
9064         if (sc->re_type == MACFG_56 || sc->re_type == MACFG_57 ||
9065             sc->re_type == MACFG_61 || sc->re_type == MACFG_62) {
9066                 /*half mode*/
9067                 if (!(CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_FULL_DUP)) {
9068                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
9069                         MP_WritePhyUshort(sc, MII_ANAR, MP_ReadPhyUshort(sc, MII_ANAR)&~(ANAR_PAUSE_SYM |ANAR_PAUSE_ASYM));
9070                 }
9071         }
9072 
9073         if (CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_10M) {
9074                 if (sc->re_type == MACFG_70 || sc->re_type == MACFG_71 ||
9075                     sc->re_type == MACFG_72) {
9076                         uint32_t Data32;
9077 
9078                         Data32 = re_eri_read(sc, 0x1D0, 1, ERIAR_ExGMAC);
9079                         Data32 |= BIT_1;
9080                         re_eri_write(sc, 0x1D0, 1, Data32, ERIAR_ExGMAC);
9081                 } else if (sc->re_type == MACFG_80 || sc->re_type == MACFG_81 ||
9082                            sc->re_type == MACFG_82 || sc->re_type == MACFG_83) {
9083                         MP_WriteMcuAccessRegWord(sc, 0xE080, MP_ReadMcuAccessRegWord(sc, 0xE080)|BIT_1);
9084                 }
9085         }
9086 
9087 #ifndef __DragonFly__
9088         re_init_unlock(sc);
9089 #endif
9090 }
9091 
9092 #ifndef __DragonFly__
9093 static void re_link_down_patch(struct re_softc *sc)
9094 {
9095         struct ifnet		*ifp;
9096 
9097         ifp = RE_GET_IFNET(sc);
9098 
9099         re_txeof(sc);
9100         re_rxeof(sc);
9101         re_stop(sc);
9102 
9103         sc->ifmedia_upd(ifp);
9104 }
9105 
9106 /*
9107  * Check Link Status.
9108  */
9109 static void re_check_link_status(struct re_softc *sc)
9110 {
9111         u_int8_t	link_state;
9112         struct ifnet		*ifp;
9113 
9114         ifp = RE_GET_IFNET(sc);
9115 
9116         if (re_link_ok(sc)) {
9117                 link_state = LINK_STATE_UP;
9118         } else {
9119                 link_state = LINK_STATE_DOWN;
9120         }
9121 
9122         if (link_state != sc->link_state) {
9123                 sc->link_state = link_state;
9124                 if (link_state == LINK_STATE_UP) {
9125                         re_link_on_patch(sc);
9126                         re_link_state_change(ifp, LINK_STATE_UP);
9127                 } else {
9128                         re_link_state_change(ifp, LINK_STATE_DOWN);
9129                         re_link_down_patch(sc);
9130                 }
9131         }
9132 }
9133 
9134 static void re_init_timer(struct re_softc *sc)
9135 {
9136 #ifdef RE_USE_NEW_CALLOUT_FUN
9137         callout_init(&sc->re_stat_ch, CALLOUT_MPSAFE);
9138 #else
9139         callout_handle_init(&sc->re_stat_ch);
9140 #endif
9141 }
9142 
9143 static void re_stop_timer(struct re_softc *sc)
9144 {
9145 #ifdef RE_USE_NEW_CALLOUT_FUN
9146         callout_stop(&sc->re_stat_ch);
9147 #else
9148         untimeout(re_tick, sc, sc->re_stat_ch);
9149 #endif
9150 }
9151 
9152 static void re_start_timer(struct re_softc *sc)
9153 {
9154 #ifdef RE_USE_NEW_CALLOUT_FUN
9155         callout_reset(&sc->re_stat_ch, hz, re_tick, sc);
9156 #else
9157         re_stop_timer(sc);
9158         sc->re_stat_ch = timeout(re_tick, sc, hz);
9159 #endif
9160 }
9161 
9162 static void re_tick(xsc)
9163 void			*xsc;
9164 {
9165         /*called per second*/
9166         struct re_softc		*sc;
9167         int			s;
9168 
9169         s = splimp();
9170 
9171         sc = xsc;
9172         /*mii = device_get_softc(sc->re_miibus);
9173 
9174         mii_tick(mii);*/
9175 
9176         splx(s);
9177 
9178         RE_LOCK(sc);
9179 
9180         if (sc->re_link_chg_det == 1) {
9181                 re_check_link_status(sc);
9182                 re_start_timer(sc);
9183         }
9184 
9185         RE_UNLOCK(sc);
9186 
9187         return;
9188 }
9189 
9190 #if OS_VER < VERSION(7,0)
9191 static void re_watchdog(ifp)
9192 struct ifnet		*ifp;
9193 {
9194         struct re_softc		*sc;
9195 
9196         sc = ifp->if_softc;
9197 
9198         printf("re%d: watchdog timeout\n", sc->re_unit);
9199 #if OS_VER < VERSION(11,0)
9200         ifp->if_oerrors++;
9201 #else
9202         if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
9203 #endif
9204 
9205         re_txeof(sc);
9206         re_rxeof(sc);
9207         re_init(sc);
9208 
9209         return;
9210 }
9211 #endif
9212 #endif	/* !__DragonFly__ */
9213 
9214 /*
9215  * Set media options.
9216  */
9217 static int re_ifmedia_upd(struct ifnet *ifp)
9218 {
9219         struct re_softc	*sc = ifp->if_softc;
9220         struct ifmedia	*ifm = &sc->media;
9221         int anar;
9222         int gbcr;
9223 
9224         if (IFM_TYPE(ifm->ifm_media) != IFM_ETHER)
9225                 return(EINVAL);
9226 
9227         if (sc->re_type == MACFG_68 || sc->re_type == MACFG_69 ||
9228             sc->re_type == MACFG_70 || sc->re_type == MACFG_71 ||
9229             sc->re_type == MACFG_72) {
9230                 //Disable Giga Lite
9231                 MP_WritePhyUshort(sc, 0x1F, 0x0A42);
9232                 ClearEthPhyBit(sc, 0x14, BIT_9);
9233                 if (sc->re_type == MACFG_70 || sc->re_type == MACFG_71 ||
9234                     sc->re_type == MACFG_72)
9235                         ClearEthPhyBit(sc, 0x14, BIT_7);
9236                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
9237                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
9238         }
9239 
9240 
9241         switch (IFM_SUBTYPE(ifm->ifm_media)) {
9242         case IFM_AUTO:
9243                 anar = ANAR_TX_FD |
9244                        ANAR_TX |
9245                        ANAR_10_FD |
9246                        ANAR_10;
9247                 gbcr = GTCR_ADV_1000TFDX |
9248                        GTCR_ADV_1000THDX;
9249                 break;
9250         case IFM_1000_SX:
9251 #ifndef __DragonFly__
9252 #if OS_VER < 500000
9253         case IFM_1000_TX:
9254 #else
9255         case IFM_1000_T:
9256 #endif
9257 #else	/* __DragonFly__ */
9258 	case IFM_1000_T:
9259 #endif	/* !__DragonFly__ */
9260                 anar = ANAR_TX_FD |
9261                        ANAR_TX |
9262                        ANAR_10_FD |
9263                        ANAR_10;
9264                 gbcr = GTCR_ADV_1000TFDX |
9265                        GTCR_ADV_1000THDX;
9266                 break;
9267         case IFM_100_TX:
9268                 gbcr = MP_ReadPhyUshort(sc, MII_100T2CR) &
9269                        ~(GTCR_ADV_1000TFDX | GTCR_ADV_1000THDX);
9270                 if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) {
9271                         anar = ANAR_TX_FD |
9272                                ANAR_TX |
9273                                ANAR_10_FD |
9274                                ANAR_10;
9275                 } else {
9276                         anar = ANAR_TX |
9277                                ANAR_10_FD |
9278                                ANAR_10;
9279                 }
9280                 break;
9281         case IFM_10_T:
9282                 gbcr = MP_ReadPhyUshort(sc, MII_100T2CR) &
9283                        ~(GTCR_ADV_1000TFDX | GTCR_ADV_1000THDX);
9284                 if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) {
9285                         anar = ANAR_10_FD |
9286                                ANAR_10;
9287                 } else {
9288                         anar = ANAR_10;
9289                 }
9290 
9291                 if (sc->re_type == MACFG_13) {
9292                         MP_WritePhyUshort(sc, MII_BMCR, 0x8000);
9293                 }
9294 
9295                 break;
9296         default:
9297 #ifndef __DragonFly__
9298                 printf("re%d: Unsupported media type\n", sc->re_unit);
9299                 return(0);
9300 #else
9301 		if_printf(ifp, "Unsupported media type\n");
9302 		return (EOPNOTSUPP);
9303 #endif
9304         }
9305 
9306         MP_WritePhyUshort(sc, 0x1F, 0x0000);
9307         if (sc->re_device_id==RT_DEVICEID_8169 || sc->re_device_id==RT_DEVICEID_8169SC ||
9308             sc->re_device_id==RT_DEVICEID_8168 || sc->re_device_id==RT_DEVICEID_8161) {
9309                 MP_WritePhyUshort(sc, MII_ANAR, anar | 0x0800 | ANAR_FC);
9310                 MP_WritePhyUshort(sc, MII_100T2CR, gbcr);
9311                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_RESET | BMCR_AUTOEN | BMCR_STARTNEG);
9312         } else if (sc->re_type == MACFG_36) {
9313                 MP_WritePhyUshort(sc, MII_ANAR, anar | 0x0800 | ANAR_FC);
9314                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_RESET | BMCR_AUTOEN | BMCR_STARTNEG);
9315         } else {
9316                 MP_WritePhyUshort(sc, MII_ANAR, anar | 1);
9317                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_AUTOEN | BMCR_STARTNEG);
9318         }
9319 
9320         return(0);
9321 }
9322 
9323 static int re_ifmedia_upd_8125(struct ifnet *ifp)
9324 {
9325         struct re_softc	*sc = ifp->if_softc;
9326         struct ifmedia	*ifm = &sc->media;
9327         int anar;
9328         int gbcr;
9329         int cr2500 = 0;
9330 
9331         if (IFM_TYPE(ifm->ifm_media) != IFM_ETHER)
9332                 return(EINVAL);
9333 
9334         //Disable Giga Lite
9335         ClearEthPhyOcpBit(sc, 0xA428, BIT_9);
9336         ClearEthPhyOcpBit(sc, 0xA5EA, BIT_0);
9337 
9338         cr2500 = MP_RealReadPhyOcpRegWord(sc, 0xA5D4);
9339         cr2500 &= ~RTK_ADVERTISE_2500FULL;
9340 
9341         switch (IFM_SUBTYPE(ifm->ifm_media)) {
9342         case IFM_AUTO:
9343                 cr2500 |= RTK_ADVERTISE_2500FULL;
9344                 anar = ANAR_TX_FD |
9345                        ANAR_TX |
9346                        ANAR_10_FD |
9347                        ANAR_10;
9348                 gbcr = GTCR_ADV_1000TFDX |
9349                        GTCR_ADV_1000THDX;
9350                 break;
9351         case IFM_2500_SX:
9352 #ifndef __DragonFly__
9353         case IFM_2500_X:
9354 #endif
9355 #ifdef IFM_2500_T
9356         case IFM_2500_T:
9357 #endif
9358                 cr2500 |= RTK_ADVERTISE_2500FULL;
9359                 anar = ANAR_TX_FD |
9360                        ANAR_TX |
9361                        ANAR_10_FD |
9362                        ANAR_10;
9363                 gbcr = GTCR_ADV_1000TFDX |
9364                        GTCR_ADV_1000THDX;
9365                 break;
9366         case IFM_1000_SX:
9367 #ifndef __DragonFly__
9368 #if OS_VER < 500000
9369         case IFM_1000_TX:
9370 #else
9371         case IFM_1000_T:
9372 #endif
9373 #else	/* __DragonFly__ */
9374 	case IFM_1000_T:
9375 #endif	/* !__DragonFly__ */
9376                 anar = ANAR_TX_FD |
9377                        ANAR_TX |
9378                        ANAR_10_FD |
9379                        ANAR_10;
9380                 gbcr = GTCR_ADV_1000TFDX |
9381                        GTCR_ADV_1000THDX;
9382                 break;
9383         case IFM_100_TX:
9384                 gbcr = MP_ReadPhyUshort(sc, MII_100T2CR) &
9385                        ~(GTCR_ADV_1000TFDX | GTCR_ADV_1000THDX);
9386                 if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) {
9387                         anar = ANAR_TX_FD |
9388                                ANAR_TX |
9389                                ANAR_10_FD |
9390                                ANAR_10;
9391                 } else {
9392                         anar = ANAR_TX |
9393                                ANAR_10_FD |
9394                                ANAR_10;
9395                 }
9396                 break;
9397         case IFM_10_T:
9398                 gbcr = MP_ReadPhyUshort(sc, MII_100T2CR) &
9399                        ~(GTCR_ADV_1000TFDX | GTCR_ADV_1000THDX);
9400                 if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) {
9401                         anar = ANAR_10_FD |
9402                                ANAR_10;
9403                 } else {
9404                         anar = ANAR_10;
9405                 }
9406 
9407                 if (sc->re_type == MACFG_13) {
9408                         MP_WritePhyUshort(sc, MII_BMCR, 0x8000);
9409                 }
9410 
9411                 break;
9412         default:
9413 #ifndef __DragonFly__
9414                 printf("re%d: Unsupported media type\n", sc->re_unit);
9415                 return(0);
9416 #else
9417 		if_printf(ifp, "Unsupported media type\n");
9418 		return (EOPNOTSUPP);
9419 #endif
9420         }
9421 
9422         MP_WritePhyUshort(sc, 0x1F, 0x0000);
9423         MP_RealWritePhyOcpRegWord(sc, 0xA5D4, cr2500);
9424         MP_WritePhyUshort(sc, MII_ANAR, anar | 0x0800 | ANAR_FC);
9425         MP_WritePhyUshort(sc, MII_100T2CR, gbcr);
9426         MP_WritePhyUshort(sc, MII_BMCR, BMCR_RESET | BMCR_AUTOEN | BMCR_STARTNEG);
9427 
9428         return(0);
9429 }
9430 
9431 /*
9432  * Report current media status.
9433  */
9434 static void re_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr)
9435 {
9436         struct re_softc		*sc;
9437 
9438         sc = ifp->if_softc;
9439 
9440         RE_LOCK(sc);
9441 
9442         ifmr->ifm_status = IFM_AVALID;
9443         ifmr->ifm_active = IFM_ETHER;
9444 
9445         if (re_link_ok(sc)) {
9446                 unsigned char msr;
9447 
9448                 ifmr->ifm_status |= IFM_ACTIVE;
9449 
9450                 msr = CSR_READ_1(sc, RE_PHY_STATUS);
9451                 if (msr & RL_PHY_STATUS_FULL_DUP)
9452                         ifmr->ifm_active |= IFM_FDX;
9453                 else
9454                         ifmr->ifm_active |= IFM_HDX;
9455 
9456                 if (msr & RL_PHY_STATUS_10M)
9457                         ifmr->ifm_active |= IFM_10_T;
9458                 else if (msr & RL_PHY_STATUS_100M)
9459                         ifmr->ifm_active |= IFM_100_TX;
9460                 else if (msr & RL_PHY_STATUS_1000MF)
9461                         ifmr->ifm_active |= IFM_1000_T;
9462 #ifdef __DragonFly__
9463         } else {
9464 		if (IFM_SUBTYPE(sc->media.ifm_media) == IFM_AUTO)
9465 			ifmr->ifm_active |= IFM_NONE;
9466 		else
9467 			ifmr->ifm_active |= sc->media.ifm_media;
9468 #endif
9469         }
9470 
9471         RE_UNLOCK(sc);
9472 
9473         return;
9474 }
9475 
9476 static void re_ifmedia_sts_8125(struct ifnet *ifp, struct ifmediareq *ifmr)
9477 {
9478         struct re_softc		*sc;
9479 
9480         sc = ifp->if_softc;
9481 
9482         RE_LOCK(sc);
9483 
9484         ifmr->ifm_status = IFM_AVALID;
9485         ifmr->ifm_active = IFM_ETHER;
9486 
9487         if (re_link_ok(sc)) {
9488                 u_int32_t msr;
9489 
9490                 ifmr->ifm_status |= IFM_ACTIVE;
9491 
9492                 msr = CSR_READ_4(sc, RE_PHY_STATUS);
9493 
9494                 if (msr & RL_PHY_STATUS_FULL_DUP)
9495                         ifmr->ifm_active |= IFM_FDX;
9496                 else
9497                         ifmr->ifm_active |= IFM_HDX;
9498 
9499                 if (msr & RL_PHY_STATUS_10M)
9500                         ifmr->ifm_active |= IFM_10_T;
9501                 else if (msr & RL_PHY_STATUS_100M)
9502                         ifmr->ifm_active |= IFM_100_TX;
9503                 else if (msr & RL_PHY_STATUS_1000MF)
9504                         ifmr->ifm_active |= IFM_1000_T;
9505                 else if (msr & RL_PHY_STATUS_500MF)
9506                         ifmr->ifm_active |= IFM_1000_T;
9507                 else if (msr & RL_PHY_STATUS_1250MF)
9508                         ifmr->ifm_active |= IFM_1000_T;
9509                 else if (msr & RL_PHY_STATUS_2500MF)
9510 #ifdef IFM_2500_T
9511                         ifmr->ifm_active |= IFM_2500_T;
9512 #else
9513                         ifmr->ifm_active |= IFM_2500_SX;
9514 #endif
9515 #ifdef __DragonFly__
9516         } else {
9517 		if (IFM_SUBTYPE(sc->media.ifm_media) == IFM_AUTO)
9518 			ifmr->ifm_active |= IFM_NONE;
9519 		else
9520 			ifmr->ifm_active |= sc->media.ifm_media;
9521 #endif
9522         }
9523 
9524         RE_UNLOCK(sc);
9525 
9526         return;
9527 }
9528 
9529 static int re_enable_EEE(struct re_softc *sc)
9530 {
9531         int ret;
9532         u_int16_t data;
9533 
9534         ret = 0;
9535         switch (sc->re_type) {
9536         case MACFG_42:
9537         case MACFG_43:
9538                 re_eri_write(sc, 0x1B0, 2, 0xED03, ERIAR_ExGMAC);
9539                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
9540                 if (CSR_READ_1(sc, 0xEF) & 0x02) {
9541                         MP_WritePhyUshort(sc, 0x10, 0x731F);
9542                         MP_WritePhyUshort(sc, 0x19, 0x7630);
9543                 } else {
9544                         MP_WritePhyUshort(sc, 0x10, 0x711F);
9545                         MP_WritePhyUshort(sc, 0x19, 0x7030);
9546                 }
9547                 MP_WritePhyUshort(sc, 0x1A, 0x1506);
9548                 MP_WritePhyUshort(sc, 0x1B, 0x0551);
9549                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
9550                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
9551                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
9552                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
9553                 MP_WritePhyUshort(sc, 0x0E, 0x0002);
9554                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
9555 
9556                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
9557                 MP_WritePhyUshort(sc, 0x0D, 0x0003);
9558                 MP_WritePhyUshort(sc, 0x0E, 0x0015);
9559                 MP_WritePhyUshort(sc, 0x0D, 0x4003);
9560                 MP_WritePhyUshort(sc, 0x0E, 0x0002);
9561                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
9562 
9563                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_AUTOEN | BMCR_STARTNEG);
9564                 break;
9565 
9566         case MACFG_53:
9567         case MACFG_54:
9568         case MACFG_55:
9569                 re_eri_write(sc, 0x1B0, 2, 0xED03, ERIAR_ExGMAC);
9570                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
9571                 MP_WritePhyUshort(sc, 0x10, 0x731F);
9572                 MP_WritePhyUshort(sc, 0x19, 0x7630);
9573                 MP_WritePhyUshort(sc, 0x1A, 0x1506);
9574                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
9575                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
9576                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
9577                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
9578                 MP_WritePhyUshort(sc, 0x0E, 0x0002);
9579                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
9580 
9581                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_AUTOEN | BMCR_STARTNEG);
9582                 break;
9583 
9584         case MACFG_36:
9585         case MACFG_37:
9586                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
9587                 MP_WritePhyUshort(sc, 0x1E, 0x0020);
9588                 data = MP_ReadPhyUshort(sc, 0x15) | 0x0100;
9589                 MP_WritePhyUshort(sc, 0x15, data);
9590                 MP_WritePhyUshort(sc, 0x1F, 0x0006);
9591                 MP_WritePhyUshort(sc, 0x00, 0x5A30);
9592                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
9593                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
9594                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
9595                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
9596                 MP_WritePhyUshort(sc, 0x0E, 0x0006);
9597                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
9598                 if ((CSR_READ_1(sc, RE_CFG4)&RL_CFG4_CUSTOMIZED_LED) && (CSR_READ_1(sc, RE_MACDBG) & BIT_7)) {
9599                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
9600                         MP_WritePhyUshort(sc, 0x05, 0x8AC8);
9601                         MP_WritePhyUshort(sc, 0x06, CSR_READ_1(sc, RE_CUSTOM_LED));
9602                         MP_WritePhyUshort(sc, 0x05, 0x8B82);
9603                         data = MP_ReadPhyUshort(sc, 0x06) | 0x0010;
9604                         MP_WritePhyUshort(sc, 0x05, 0x8B82);
9605                         MP_WritePhyUshort(sc, 0x06, data);
9606                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
9607                 }
9608                 break;
9609 
9610         case MACFG_50:
9611         case MACFG_51:
9612         case MACFG_52:
9613                 data = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC) | 0x0003;
9614                 re_eri_write(sc, 0x1B0, 4, data, ERIAR_ExGMAC);
9615                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
9616                 MP_WritePhyUshort(sc, 0x1E, 0x0020);
9617                 data = MP_ReadPhyUshort(sc, 0x15)|0x0100;
9618                 MP_WritePhyUshort(sc, 0x15, data);
9619                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
9620                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
9621                 data = MP_ReadPhyUshort(sc, 0x06)|0x2000;
9622                 MP_WritePhyUshort(sc, 0x06, data);
9623                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
9624                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
9625                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
9626                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
9627                 MP_WritePhyUshort(sc, 0x0E, 0x0006);
9628                 MP_WritePhyUshort(sc, 0x1D, 0x0000);
9629                 break;
9630 
9631         case MACFG_38:
9632         case MACFG_39:
9633                 data = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
9634                 data |= BIT_1 | BIT_0;
9635                 re_eri_write(sc, 0x1B0, 4, data, ERIAR_ExGMAC);
9636                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
9637                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
9638                 MP_WritePhyUshort(sc, 0x1e, 0x0020);
9639                 data = MP_ReadPhyUshort(sc, 0x15);
9640                 data |= BIT_8;
9641                 MP_WritePhyUshort(sc, 0x15, data);
9642                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
9643                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
9644                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
9645                 data = MP_ReadPhyUshort(sc, 0x06);
9646                 data |= BIT_13;
9647                 MP_WritePhyUshort(sc, 0x06, data);
9648                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
9649                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
9650                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
9651                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
9652                 MP_WritePhyUshort(sc, 0x0E, 0x0006);
9653                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
9654                 break;
9655 
9656         case MACFG_56:
9657         case MACFG_57:
9658         case MACFG_58:
9659         case MACFG_59:
9660         case MACFG_60:
9661         case MACFG_61:
9662         case MACFG_62:
9663         case MACFG_67:
9664         case MACFG_68:
9665         case MACFG_69:
9666         case MACFG_70:
9667         case MACFG_71:
9668         case MACFG_72:
9669                 data = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
9670                 data |= BIT_1 | BIT_0;
9671                 re_eri_write(sc, 0x1B0, 4, data, ERIAR_ExGMAC);
9672                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
9673                 data = MP_ReadPhyUshort(sc, 0x11);
9674                 MP_WritePhyUshort(sc, 0x11, data | BIT_4);
9675                 MP_WritePhyUshort(sc, 0x1F, 0x0A5D);
9676                 MP_WritePhyUshort(sc, 0x10, 0x0006);
9677                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
9678                 break;
9679 
9680         case MACFG_80:
9681         case MACFG_81:
9682                 SetMcuAccessRegBit(sc, 0xE040, (BIT_1|BIT_0));
9683                 SetMcuAccessRegBit(sc, 0xEB62, (BIT_2|BIT_1));
9684 
9685                 SetEthPhyOcpBit(sc, 0xA432, BIT_4);
9686                 SetEthPhyOcpBit(sc, 0xA5D0, (BIT_2 | BIT_1));
9687                 ClearEthPhyOcpBit(sc, 0xA6D4, BIT_0);
9688 
9689                 ClearEthPhyOcpBit(sc, 0xA6D8, BIT_4);
9690                 ClearEthPhyOcpBit(sc, 0xA428, BIT_7);
9691                 ClearEthPhyOcpBit(sc, 0xA4A2, BIT_9);
9692                 break;
9693 
9694         case MACFG_82:
9695         case MACFG_83:
9696                 SetMcuAccessRegBit(sc, 0xE040, (BIT_1|BIT_0));
9697 
9698                 SetEthPhyOcpBit(sc, 0xA5D0, (BIT_2 | BIT_1));
9699                 ClearEthPhyOcpBit(sc, 0xA6D4, BIT_0);
9700 
9701                 ClearEthPhyOcpBit(sc, 0xA6D8, BIT_4);
9702                 ClearEthPhyOcpBit(sc, 0xA428, BIT_7);
9703                 ClearEthPhyOcpBit(sc, 0xA4A2, BIT_9);
9704                 break;
9705 
9706         default:
9707                 ret = -EOPNOTSUPP;
9708                 break;
9709         }
9710 
9711         switch (sc->re_type) {
9712         case MACFG_68:
9713         case MACFG_69:
9714                 MP_WritePhyUshort(sc, 0x1F, 0x0A4A);
9715                 SetEthPhyBit(sc, 0x11, BIT_9);
9716                 MP_WritePhyUshort(sc, 0x1F, 0x0A42);
9717                 SetEthPhyBit(sc, 0x14, BIT_7);
9718                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
9719                 break;
9720         }
9721 
9722         /*Advanced EEE*/
9723         switch (sc->re_type) {
9724         case MACFG_58:
9725         case MACFG_59:
9726         case MACFG_60:
9727         case MACFG_68:
9728         case MACFG_69:
9729         case MACFG_70:
9730         case MACFG_71:
9731         case MACFG_72:
9732         case MACFG_80:
9733         case MACFG_81:
9734         case MACFG_82:
9735         case MACFG_83:
9736                 re_set_phy_mcu_patch_request(sc);
9737                 break;
9738         }
9739 
9740         switch (sc->re_type) {
9741         case MACFG_59:
9742                 re_eri_write(sc, 0x1EA, 1, 0xFA, ERIAR_ExGMAC);
9743 
9744                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
9745                 data = MP_ReadPhyUshort(sc, 0x10);
9746                 if (data & BIT_10) {
9747                         MP_WritePhyUshort(sc, 0x1F, 0x0A42);
9748                         data = MP_ReadPhyUshort(sc, 0x16);
9749                         data &= ~(BIT_1);
9750                         MP_WritePhyUshort(sc, 0x16, data);
9751                 } else {
9752                         MP_WritePhyUshort(sc, 0x1F, 0x0A42);
9753                         data = MP_ReadPhyUshort(sc, 0x16);
9754                         data |= BIT_1;
9755                         MP_WritePhyUshort(sc, 0x16, data);
9756                 }
9757                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
9758                 break;
9759         case MACFG_60:
9760                 data = MP_ReadMcuAccessRegWord(sc, 0xE052);
9761                 data |= BIT_0;
9762                 MP_WriteMcuAccessRegWord(sc, 0xE052, data);
9763                 data = MP_ReadMcuAccessRegWord(sc, 0xE056);
9764                 data &= 0xFF0F;
9765                 data |= (BIT_4 | BIT_5 | BIT_6);
9766                 MP_WriteMcuAccessRegWord(sc, 0xE056, data);
9767 
9768                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
9769                 data = MP_ReadPhyUshort(sc, 0x10);
9770                 if (data & BIT_10) {
9771                         MP_WritePhyUshort(sc, 0x1F, 0x0A42);
9772                         data = MP_ReadPhyUshort(sc, 0x16);
9773                         data &= ~(BIT_1);
9774                         MP_WritePhyUshort(sc, 0x16, data);
9775                 } else {
9776                         MP_WritePhyUshort(sc, 0x1F, 0x0A42);
9777                         data = MP_ReadPhyUshort(sc, 0x16);
9778                         data |= BIT_1;
9779                         MP_WritePhyUshort(sc, 0x16, data);
9780                 }
9781                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
9782                 break;
9783         case MACFG_61:
9784         case MACFG_62:
9785         case MACFG_67:
9786                 OOB_mutex_lock(sc);
9787                 data = MP_ReadMcuAccessRegWord(sc, 0xE052);
9788                 data &= ~BIT_0;
9789                 MP_WriteMcuAccessRegWord(sc, 0xE052, data);
9790                 OOB_mutex_unlock(sc);
9791                 data = MP_ReadMcuAccessRegWord(sc, 0xE056);
9792                 data &= 0xFF0F;
9793                 data |= (BIT_4 | BIT_5 | BIT_6);
9794                 MP_WriteMcuAccessRegWord(sc, 0xE056, data);
9795                 break;
9796         case MACFG_70:
9797         case MACFG_71:
9798         case MACFG_72:
9799                 OOB_mutex_lock(sc);
9800                 data = MP_ReadMcuAccessRegWord(sc, 0xE052);
9801                 data &= ~BIT_0;
9802                 MP_WriteMcuAccessRegWord(sc, 0xE052, data);
9803                 OOB_mutex_unlock(sc);
9804                 data = MP_ReadMcuAccessRegWord(sc, 0xE056);
9805                 data &= 0xFF0F;
9806                 data |= (BIT_4 | BIT_5 | BIT_6);
9807                 MP_WriteMcuAccessRegWord(sc, 0xE056, data);
9808                 break;
9809         case MACFG_68:
9810         case MACFG_69:
9811                 data = MP_ReadMcuAccessRegWord(sc, 0xE052);
9812                 data |= BIT_0;
9813                 MP_WriteMcuAccessRegWord(sc, 0xE052, data);
9814 
9815                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
9816                 data = MP_ReadPhyUshort(sc, 0x10) | BIT_15;
9817                 MP_WritePhyUshort(sc, 0x10, data);
9818 
9819                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
9820                 data = MP_ReadPhyUshort(sc, 0x11) | BIT_13 | BIT_14;
9821                 data &= ~(BIT_12);
9822                 MP_WritePhyUshort(sc, 0x11, data);
9823                 break;
9824         case MACFG_80:
9825         case MACFG_81:
9826         case MACFG_82:
9827         case MACFG_83:
9828                 ClearMcuAccessRegBit(sc, 0xE052, BIT_0);
9829                 ClearEthPhyOcpBit(sc, 0xA442, BIT_12 | BIT_13);
9830                 ClearEthPhyOcpBit(sc, 0xA430, BIT_15);
9831                 break;
9832         }
9833 
9834         switch (sc->re_type) {
9835         case MACFG_58:
9836         case MACFG_59:
9837         case MACFG_60:
9838         case MACFG_68:
9839         case MACFG_69:
9840         case MACFG_70:
9841         case MACFG_71:
9842         case MACFG_72:
9843         case MACFG_80:
9844         case MACFG_81:
9845         case MACFG_82:
9846         case MACFG_83:
9847                 re_clear_phy_mcu_patch_request(sc);
9848                 break;
9849         }
9850 
9851         return ret;
9852 }
9853 
9854 static int re_disable_EEE(struct re_softc *sc)
9855 {
9856         int ret;
9857         u_int16_t data;
9858 
9859         ret = 0;
9860         switch (sc->re_type) {
9861         case MACFG_42:
9862         case MACFG_43:
9863                 re_eri_write(sc, 0x1B0, 2, 0, ERIAR_ExGMAC);
9864                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
9865                 MP_WritePhyUshort(sc, 0x10, 0x401F);
9866                 MP_WritePhyUshort(sc, 0x19, 0x7030);
9867 
9868                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
9869                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
9870                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
9871                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
9872                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
9873                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
9874 
9875                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
9876                 MP_WritePhyUshort(sc, 0x0D, 0x0003);
9877                 MP_WritePhyUshort(sc, 0x0E, 0x0015);
9878                 MP_WritePhyUshort(sc, 0x0D, 0x4003);
9879                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
9880                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
9881 
9882                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_AUTOEN | BMCR_STARTNEG);
9883                 break;
9884 
9885         case MACFG_53:
9886                 re_eri_write(sc, 0x1B0, 2, 0, ERIAR_ExGMAC);
9887                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
9888                 MP_WritePhyUshort(sc, 0x10, 0x401F);
9889                 MP_WritePhyUshort(sc, 0x19, 0x7030);
9890 
9891                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
9892                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
9893                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
9894                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
9895                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
9896                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
9897 
9898                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_AUTOEN | BMCR_STARTNEG);
9899                 break;
9900 
9901         case MACFG_54:
9902         case MACFG_55:
9903                 re_eri_write(sc, 0x1B0, 2, 0, ERIAR_ExGMAC);
9904                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
9905                 MP_WritePhyUshort(sc, 0x10, 0xC07F);
9906                 MP_WritePhyUshort(sc, 0x19, 0x7030);
9907                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
9908 
9909                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
9910                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
9911                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
9912                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
9913                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
9914                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
9915 
9916                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_AUTOEN | BMCR_STARTNEG);
9917                 break;
9918 
9919         case MACFG_36:
9920         case MACFG_37:
9921                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
9922                 MP_WritePhyUshort(sc, 0x1E, 0x0020);
9923                 data = MP_ReadPhyUshort(sc, 0x15) & ~0x0100;
9924                 MP_WritePhyUshort(sc, 0x15, data);
9925                 MP_WritePhyUshort(sc, 0x1F, 0x0006);
9926                 MP_WritePhyUshort(sc, 0x00, 0x5A00);
9927                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
9928                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
9929                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
9930                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
9931                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
9932                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
9933                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
9934                 if (CSR_READ_1(sc, RE_CFG4) & RL_CFG4_CUSTOMIZED_LED) {
9935                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
9936                         MP_WritePhyUshort(sc, 0x05, 0x8B82);
9937                         data = MP_ReadPhyUshort(sc, 0x06) & ~0x0010;
9938                         MP_WritePhyUshort(sc, 0x05, 0x8B82);
9939                         MP_WritePhyUshort(sc, 0x06, data);
9940                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
9941                 }
9942                 break;
9943 
9944         case MACFG_50:
9945         case MACFG_51:
9946         case MACFG_52:
9947                 data = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC)& ~0x0003;
9948                 re_eri_write(sc, 0x1B0, 4, data, ERIAR_ExGMAC);
9949                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
9950                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
9951                 data = MP_ReadPhyUshort(sc, 0x06) & ~0x2000;
9952                 MP_WritePhyUshort(sc, 0x06, data);
9953                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
9954                 MP_WritePhyUshort(sc, 0x1E, 0x0020);
9955                 data = MP_ReadPhyUshort(sc, 0x15) & ~0x0100;
9956                 MP_WritePhyUshort(sc, 0x15, data);
9957                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
9958                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
9959                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
9960                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
9961                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
9962                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
9963                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
9964                 break;
9965 
9966         case MACFG_38:
9967         case MACFG_39:
9968                 data = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
9969                 data &= ~(BIT_1 | BIT_0);
9970                 re_eri_write(sc, 0x1B0, 4, data, ERIAR_ExGMAC);
9971                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
9972                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
9973                 data = MP_ReadPhyUshort(sc, 0x06);
9974                 data &= ~BIT_13;
9975                 MP_WritePhyUshort(sc, 0x06, data);
9976                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
9977                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
9978                 MP_WritePhyUshort(sc, 0x1e, 0x0020);
9979                 data = MP_ReadPhyUshort(sc, 0x15);
9980                 data &= ~BIT_8;
9981                 MP_WritePhyUshort(sc, 0x15, data);
9982                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
9983                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
9984                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
9985                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
9986                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
9987                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
9988                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
9989                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
9990                 break;
9991 
9992         case MACFG_56:
9993         case MACFG_57:
9994         case MACFG_58:
9995         case MACFG_59:
9996         case MACFG_60:
9997         case MACFG_61:
9998         case MACFG_62:
9999         case MACFG_67:
10000         case MACFG_68:
10001         case MACFG_69:
10002         case MACFG_70:
10003         case MACFG_71:
10004         case MACFG_72:
10005                 data = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
10006                 data &= ~(BIT_1 | BIT_0);
10007                 re_eri_write(sc, 0x1B0, 4, data, ERIAR_ExGMAC);
10008                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
10009                 data = MP_ReadPhyUshort(sc, 0x11);
10010                 MP_WritePhyUshort(sc, 0x11, data & ~BIT_4);
10011                 MP_WritePhyUshort(sc, 0x1F, 0x0A5D);
10012                 MP_WritePhyUshort(sc, 0x10, 0x0000);
10013                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
10014                 break;
10015 
10016         case MACFG_80:
10017         case MACFG_81:
10018                 ClearMcuAccessRegBit(sc, 0xE040, (BIT_1|BIT_0));
10019                 ClearMcuAccessRegBit(sc, 0xEB62, (BIT_2|BIT_1));
10020 
10021                 ClearEthPhyOcpBit(sc, 0xA432, BIT_4);
10022                 ClearEthPhyOcpBit(sc, 0xA5D0, (BIT_2 | BIT_1));
10023                 ClearEthPhyOcpBit(sc, 0xA6D4, BIT_0);
10024 
10025                 ClearEthPhyOcpBit(sc, 0xA6D8, BIT_4);
10026                 ClearEthPhyOcpBit(sc, 0xA428, BIT_7);
10027                 ClearEthPhyOcpBit(sc, 0xA4A2, BIT_9);
10028                 break;
10029 
10030         case MACFG_82:
10031         case MACFG_83:
10032                 ClearMcuAccessRegBit(sc, 0xE040, (BIT_1|BIT_0));
10033 
10034                 ClearEthPhyOcpBit(sc, 0xA5D0, (BIT_2 | BIT_1));
10035                 ClearEthPhyOcpBit(sc, 0xA6D4, BIT_0);
10036 
10037                 ClearEthPhyOcpBit(sc, 0xA6D8, BIT_4);
10038                 ClearEthPhyOcpBit(sc, 0xA428, BIT_7);
10039                 ClearEthPhyOcpBit(sc, 0xA4A2, BIT_9);
10040                 break;
10041 
10042         default:
10043                 ret = -EOPNOTSUPP;
10044                 break;
10045         }
10046 
10047         switch (sc->re_type) {
10048         case MACFG_68:
10049         case MACFG_69:
10050                 MP_WritePhyUshort(sc, 0x1F, 0x0A42);
10051                 ClearEthPhyBit(sc, 0x14, BIT_7);
10052                 MP_WritePhyUshort(sc, 0x1F, 0x0A4A);
10053                 ClearEthPhyBit(sc, 0x11, BIT_9);
10054                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
10055                 break;
10056         }
10057 
10058         /*Advanced EEE*/
10059         switch (sc->re_type) {
10060         case MACFG_58:
10061         case MACFG_59:
10062         case MACFG_60:
10063         case MACFG_68:
10064         case MACFG_69:
10065         case MACFG_70:
10066         case MACFG_71:
10067         case MACFG_72:
10068         case MACFG_80:
10069         case MACFG_81:
10070         case MACFG_82:
10071         case MACFG_83:
10072                 re_set_phy_mcu_patch_request(sc);
10073                 break;
10074         }
10075 
10076         switch (sc->re_type) {
10077         case MACFG_59:
10078                 re_eri_write(sc, 0x1EA, 1, 0x00, ERIAR_ExGMAC);
10079 
10080                 MP_WritePhyUshort(sc, 0x1F, 0x0A42);
10081                 data = MP_ReadPhyUshort(sc, 0x16);
10082                 data &= ~(BIT_1);
10083                 MP_WritePhyUshort(sc, 0x16, data);
10084                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
10085                 break;
10086         case MACFG_60:
10087                 data = MP_ReadMcuAccessRegWord(sc, 0xE052);
10088                 data &= ~(BIT_0);
10089                 MP_WriteMcuAccessRegWord(sc, 0xE052, data);
10090 
10091                 MP_WritePhyUshort(sc, 0x1F, 0x0A42);
10092                 data = MP_ReadPhyUshort(sc, 0x16);
10093                 data &= ~(BIT_1);
10094                 MP_WritePhyUshort(sc, 0x16, data);
10095                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
10096                 break;
10097         case MACFG_61:
10098         case MACFG_62:
10099         case MACFG_67:
10100         case MACFG_70:
10101         case MACFG_71:
10102         case MACFG_72:
10103                 data = MP_ReadMcuAccessRegWord(sc, 0xE052);
10104                 data &= ~(BIT_0);
10105                 MP_WriteMcuAccessRegWord(sc, 0xE052, data);
10106                 break;
10107         case MACFG_68:
10108         case MACFG_69:
10109                 data = MP_ReadMcuAccessRegWord(sc, 0xE052);
10110                 data &= ~(BIT_0);
10111                 MP_WriteMcuAccessRegWord(sc, 0xE052, data);
10112 
10113                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
10114                 data = MP_ReadPhyUshort(sc, 0x10) & ~(BIT_15);
10115                 MP_WritePhyUshort(sc, 0x10, data);
10116 
10117                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
10118                 data = MP_ReadPhyUshort(sc, 0x11) & ~(BIT_12 | BIT_13 | BIT_14);
10119                 MP_WritePhyUshort(sc, 0x11, data);
10120                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
10121                 break;
10122         case MACFG_80:
10123         case MACFG_81:
10124         case MACFG_82:
10125         case MACFG_83:
10126                 ClearMcuAccessRegBit(sc, 0xE052, BIT_0);
10127                 ClearEthPhyOcpBit(sc, 0xA442, BIT_12 | BIT_13);
10128                 ClearEthPhyOcpBit(sc, 0xA430, BIT_15);
10129                 break;
10130         }
10131 
10132         switch (sc->re_type) {
10133         case MACFG_58:
10134         case MACFG_59:
10135         case MACFG_60:
10136         case MACFG_68:
10137         case MACFG_69:
10138         case MACFG_70:
10139         case MACFG_71:
10140         case MACFG_72:
10141         case MACFG_80:
10142         case MACFG_81:
10143         case MACFG_82:
10144         case MACFG_83:
10145                 re_clear_phy_mcu_patch_request(sc);
10146                 break;
10147         }
10148 
10149         return ret;
10150 }
10151 
10152 static int re_phy_ram_code_check(struct re_softc *sc)
10153 {
10154         u_int16_t PhyRegValue;
10155         int retval = TRUE;
10156 
10157         switch(sc->re_type) {
10158         case MACFG_56:
10159                 MP_WritePhyUshort(sc, 0x1f, 0x0A40);
10160                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
10161                 PhyRegValue &= ~(BIT_11);
10162                 MP_WritePhyUshort(sc, 0x10, PhyRegValue);
10163 
10164 
10165                 MP_WritePhyUshort(sc, 0x1f, 0x0A00);
10166                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
10167                 PhyRegValue &= ~(BIT_12 | BIT_13 | BIT_14 | BIT_15);
10168                 MP_WritePhyUshort(sc, 0x10, PhyRegValue);
10169 
10170                 MP_WritePhyUshort(sc, 0x1f, 0x0A43);
10171                 MP_WritePhyUshort(sc, 0x13, 0x8010);
10172                 PhyRegValue = MP_ReadPhyUshort(sc, 0x14);
10173                 PhyRegValue &= ~(BIT_11);
10174                 MP_WritePhyUshort(sc, 0x14, PhyRegValue);
10175 
10176                 retval = re_set_phy_mcu_patch_request(sc);
10177 
10178                 MP_WritePhyUshort(sc, 0x1f, 0x0A40);
10179                 MP_WritePhyUshort(sc, 0x10, 0x0140);
10180 
10181                 MP_WritePhyUshort(sc, 0x1f, 0x0A4A);
10182                 PhyRegValue = MP_ReadPhyUshort(sc, 0x13);
10183                 PhyRegValue &= ~(BIT_6);
10184                 PhyRegValue |= (BIT_7);
10185                 MP_WritePhyUshort(sc, 0x13, PhyRegValue);
10186 
10187                 MP_WritePhyUshort(sc, 0x1f, 0x0A44);
10188                 PhyRegValue = MP_ReadPhyUshort(sc, 0x14);
10189                 PhyRegValue |= (BIT_2);
10190                 MP_WritePhyUshort(sc, 0x14, PhyRegValue);
10191 
10192                 MP_WritePhyUshort(sc, 0x1f, 0x0A50);
10193                 PhyRegValue = MP_ReadPhyUshort(sc, 0x11);
10194                 PhyRegValue |= (BIT_11|BIT_12);
10195                 MP_WritePhyUshort(sc, 0x11, PhyRegValue);
10196 
10197                 retval = re_clear_phy_mcu_patch_request(sc);
10198 
10199                 MP_WritePhyUshort(sc, 0x1f, 0x0A40);
10200                 MP_WritePhyUshort(sc, 0x10, 0x1040);
10201 
10202                 MP_WritePhyUshort(sc, 0x1f, 0x0A4A);
10203                 PhyRegValue = MP_ReadPhyUshort(sc, 0x13);
10204                 PhyRegValue &= ~(BIT_6|BIT_7);
10205                 MP_WritePhyUshort(sc, 0x13, PhyRegValue);
10206 
10207                 MP_WritePhyUshort(sc, 0x1f, 0x0A44);
10208                 PhyRegValue = MP_ReadPhyUshort(sc, 0x14);
10209                 PhyRegValue &= ~(BIT_2);
10210                 MP_WritePhyUshort(sc, 0x14, PhyRegValue);
10211 
10212                 MP_WritePhyUshort(sc, 0x1f, 0x0A50);
10213                 PhyRegValue = MP_ReadPhyUshort(sc, 0x11);
10214                 PhyRegValue &= ~(BIT_11|BIT_12);
10215                 MP_WritePhyUshort(sc, 0x11, PhyRegValue);
10216 
10217                 MP_WritePhyUshort(sc, 0x1f, 0x0A43);
10218                 MP_WritePhyUshort(sc, 0x13, 0x8010);
10219                 PhyRegValue = MP_ReadPhyUshort(sc, 0x14);
10220                 PhyRegValue |= (BIT_11);
10221                 MP_WritePhyUshort(sc, 0x14, PhyRegValue);
10222 
10223                 retval = re_set_phy_mcu_patch_request(sc);
10224 
10225                 MP_WritePhyUshort(sc, 0x1f, 0x0A20);
10226                 PhyRegValue = MP_ReadPhyUshort(sc, 0x13);
10227                 if (PhyRegValue & BIT_11) {
10228                         if (PhyRegValue & BIT_10) {
10229                                 retval = FALSE;
10230                         }
10231                 }
10232 
10233                 retval = re_clear_phy_mcu_patch_request(sc);
10234 
10235                 //delay 2ms
10236                 DELAY(2000);
10237                 break;
10238         default:
10239                 break;
10240         }
10241 
10242         MP_WritePhyUshort(sc, 0x1F, 0x0000);
10243 
10244         return retval;
10245 }
10246 
10247 static void re_set_phy_ram_code_check_fail_flag(struct re_softc *sc)
10248 {
10249         u_int16_t TmpUshort;
10250 
10251         switch(sc->re_type) {
10252         case MACFG_56:
10253                 TmpUshort = MP_ReadMcuAccessRegWord(sc, 0xD3C0);
10254                 TmpUshort |= BIT_0;
10255                 MP_WriteMcuAccessRegWord(sc, 0xD3C0, TmpUshort);
10256                 break;
10257         }
10258 }
10259 
10260 static int re_hw_phy_mcu_code_ver_matched(struct re_softc *sc)
10261 {
10262         int ram_code_ver_match = 0;
10263 
10264         switch (sc->re_type) {
10265         case MACFG_36:
10266         case MACFG_37:
10267                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
10268                 MP_WritePhyUshort(sc, 0x05, 0x8B60);
10269                 sc->re_hw_ram_code_ver = MP_ReadPhyUshort(sc, 0x06);
10270                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
10271                 break;
10272         case MACFG_38:
10273         case MACFG_39:
10274         case MACFG_50:
10275         case MACFG_51:
10276         case MACFG_52:
10277                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
10278                 MP_WritePhyUshort(sc, 0x05, 0x8B30);
10279                 sc->re_hw_ram_code_ver = MP_ReadPhyUshort(sc, 0x06);
10280                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
10281                 break;
10282         case MACFG_56:
10283         case MACFG_57:
10284         case MACFG_58:
10285         case MACFG_59:
10286         case MACFG_60:
10287         case MACFG_61:
10288         case MACFG_62:
10289         case MACFG_67:
10290         case MACFG_68:
10291         case MACFG_69:
10292         case MACFG_70:
10293         case MACFG_71:
10294         case MACFG_72:
10295                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
10296                 MP_WritePhyUshort(sc, 0x13, 0x801E);
10297                 sc->re_hw_ram_code_ver = MP_ReadPhyUshort(sc, 0x14);
10298                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
10299                 break;
10300         case MACFG_80:
10301         case MACFG_81:
10302         case MACFG_82:
10303         case MACFG_83:
10304                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x801E);
10305                 sc->re_hw_ram_code_ver = MP_RealReadPhyOcpRegWord(sc, 0xA438);
10306                 break;
10307         default:
10308                 sc->re_hw_ram_code_ver = ~0;
10309                 break;
10310         }
10311 
10312         if (sc->re_hw_ram_code_ver == sc->re_sw_ram_code_ver)
10313                 ram_code_ver_match = 1;
10314 
10315         return ram_code_ver_match;
10316 }
10317 
10318 static void re_write_hw_phy_mcu_code_ver(struct re_softc *sc)
10319 {
10320         switch (sc->re_type) {
10321         case MACFG_36:
10322         case MACFG_37:
10323                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
10324                 MP_WritePhyUshort(sc, 0x05, 0x8B60);
10325                 MP_WritePhyUshort(sc, 0x06, sc->re_sw_ram_code_ver);
10326                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
10327                 sc->re_hw_ram_code_ver = sc->re_sw_ram_code_ver;
10328                 break;
10329         case MACFG_38:
10330         case MACFG_39:
10331         case MACFG_50:
10332         case MACFG_51:
10333         case MACFG_52:
10334                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
10335                 MP_WritePhyUshort(sc, 0x05, 0x8B30);
10336                 MP_WritePhyUshort(sc, 0x06, sc->re_sw_ram_code_ver);
10337                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
10338                 sc->re_hw_ram_code_ver = sc->re_sw_ram_code_ver;
10339                 break;
10340         case MACFG_56:
10341         case MACFG_57:
10342         case MACFG_58:
10343         case MACFG_59:
10344         case MACFG_60:
10345         case MACFG_61:
10346         case MACFG_62:
10347         case MACFG_67:
10348         case MACFG_68:
10349         case MACFG_69:
10350         case MACFG_70:
10351         case MACFG_71:
10352         case MACFG_72:
10353                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
10354                 MP_WritePhyUshort(sc, 0x13, 0x801E);
10355                 MP_WritePhyUshort(sc, 0x14, sc->re_sw_ram_code_ver);
10356                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
10357                 sc->re_hw_ram_code_ver = sc->re_sw_ram_code_ver;
10358                 break;
10359         case MACFG_80:
10360         case MACFG_81:
10361         case MACFG_82:
10362         case MACFG_83:
10363                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x801E);
10364                 MP_RealWritePhyOcpRegWord(sc, 0xA438, sc->re_sw_ram_code_ver);
10365                 sc->re_hw_ram_code_ver = sc->re_sw_ram_code_ver;
10366                 break;
10367         }
10368 }
10369 
10370 static void
10371 re_acquire_phy_mcu_patch_key_lock(struct re_softc *sc)
10372 {
10373         u_int16_t PatchKey;
10374 
10375         switch (sc->re_type) {
10376         case MACFG_80:
10377                 PatchKey = 0x8600;
10378                 break;
10379         case MACFG_81:
10380                 PatchKey = 0x8601;
10381                 break;
10382         case MACFG_82:
10383                 PatchKey = 0x3700;
10384                 break;
10385         case MACFG_83:
10386                 PatchKey = 0x3701;
10387                 break;
10388         default:
10389                 return;
10390         }
10391         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x8024);
10392         MP_RealWritePhyOcpRegWord(sc, 0xA438, PatchKey);
10393         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xB82E);
10394         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0001);
10395 }
10396 
10397 static void
10398 re_release_phy_mcu_patch_key_lock(struct re_softc *sc)
10399 {
10400         switch (sc->re_type) {
10401         case MACFG_80:
10402         case MACFG_81:
10403         case MACFG_82:
10404         case MACFG_83:
10405                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x0000);
10406                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
10407                 ClearEthPhyOcpBit(sc, 0xB82E, BIT_0);
10408                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x8024);
10409                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
10410                 break;
10411         default:
10412                 break;
10413         }
10414 }
10415 
10416 bool
10417 re_set_phy_mcu_patch_request(struct re_softc *sc)
10418 {
10419         u_int16_t PhyRegValue;
10420         u_int16_t WaitCount = 0;
10421         int i;
10422         bool bSuccess = TRUE;
10423 
10424         switch (sc->re_type) {
10425         case MACFG_56:
10426         case MACFG_57:
10427         case MACFG_58:
10428         case MACFG_59:
10429         case MACFG_60:
10430         case MACFG_61:
10431         case MACFG_62:
10432         case MACFG_67:
10433         case MACFG_68:
10434         case MACFG_69:
10435         case MACFG_70:
10436         case MACFG_71:
10437         case MACFG_72:
10438                 MP_WritePhyUshort(sc, 0x1f, 0x0B82);
10439                 SetEthPhyBit(sc, 0x10, BIT_4);
10440 
10441                 MP_WritePhyUshort(sc, 0x1f, 0x0B80);
10442                 WaitCount = 0;
10443                 do {
10444                         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
10445                         PhyRegValue &= BIT_6;
10446                         DELAY(50);
10447                         DELAY(50);
10448                         WaitCount++;
10449                 } while(PhyRegValue != BIT_6 && WaitCount < 1000);
10450 
10451                 if (PhyRegValue != BIT_6 && WaitCount == 1000) bSuccess = FALSE;
10452 
10453                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
10454                 break;
10455         case MACFG_80:
10456         case MACFG_81:
10457         case MACFG_82:
10458         case MACFG_83:
10459                 SetEthPhyOcpBit(sc, 0xB820, BIT_4);
10460 
10461                 i = 0;
10462                 do {
10463                         PhyRegValue = MP_RealReadPhyOcpRegWord(sc, 0xB800);
10464                         PhyRegValue &= BIT_6;
10465                         DELAY(50);
10466                         DELAY(50);
10467                         i++;
10468                 } while(PhyRegValue != BIT_6 && i < 1000);
10469 
10470                 if (PhyRegValue != BIT_6 && WaitCount == 1000) bSuccess = FALSE;
10471                 break;
10472         }
10473 
10474         return bSuccess;
10475 }
10476 
10477 bool
10478 re_clear_phy_mcu_patch_request(struct re_softc *sc)
10479 {
10480         u_int16_t PhyRegValue;
10481         u_int16_t WaitCount = 0;
10482         int i;
10483         bool bSuccess = TRUE;
10484 
10485         switch (sc->re_type) {
10486         case MACFG_56:
10487         case MACFG_57:
10488         case MACFG_58:
10489         case MACFG_59:
10490         case MACFG_60:
10491         case MACFG_61:
10492         case MACFG_62:
10493         case MACFG_67:
10494         case MACFG_68:
10495         case MACFG_69:
10496         case MACFG_70:
10497         case MACFG_71:
10498         case MACFG_72:
10499                 MP_WritePhyUshort(sc, 0x1f, 0x0B82);
10500                 ClearEthPhyBit(sc, 0x10, BIT_4);
10501 
10502                 MP_WritePhyUshort(sc, 0x1f, 0x0B80);
10503                 WaitCount = 0;
10504                 do {
10505                         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
10506                         PhyRegValue &= BIT_6;
10507                         DELAY(50);
10508                         DELAY(50);
10509                         WaitCount++;
10510                 } while(PhyRegValue != BIT_6 && WaitCount < 1000);
10511 
10512                 if (PhyRegValue != BIT_6 && WaitCount == 1000) bSuccess = FALSE;
10513 
10514                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
10515                 break;
10516         case MACFG_80:
10517         case MACFG_81:
10518         case MACFG_82:
10519         case MACFG_83:
10520                 ClearEthPhyOcpBit(sc, 0xB820, BIT_4);
10521 
10522                 i = 0;
10523                 do {
10524                         PhyRegValue = MP_RealReadPhyOcpRegWord(sc, 0xB800);
10525                         PhyRegValue &= BIT_6;
10526                         DELAY(50);
10527                         DELAY(50);
10528                         i++;
10529                 } while(PhyRegValue != BIT_6 && i < 1000);
10530 
10531                 if (PhyRegValue != BIT_6 && WaitCount == 1000) bSuccess = FALSE;
10532                 break;
10533         }
10534 
10535         return bSuccess;
10536 }
10537 
10538 static void
10539 re_set_phy_mcu_ram_code(struct re_softc *sc, const u_int16_t *ramcode, u_int16_t codesize)
10540 {
10541         u_int16_t i;
10542         u_int16_t addr;
10543         u_int16_t val;
10544 
10545         if (ramcode == NULL || codesize % 2) {
10546                 goto out;
10547         }
10548 
10549         for (i = 0; i < codesize; i += 2) {
10550                 addr = ramcode[i];
10551                 val = ramcode[i + 1];
10552                 if (addr == 0xFFFF && val == 0xFFFF) {
10553                         break;
10554                 }
10555                 MP_RealWritePhyOcpRegWord(sc, addr, val);
10556         }
10557 
10558 out:
10559         return;
10560 }
10561 
10562 static void re_set_phy_mcu_8168e_1(struct re_softc *sc)
10563 {
10564         u_int16_t PhyRegValue;
10565         int i;
10566 
10567         MP_WritePhyUshort(sc, 0x1f, 0x0000);
10568         MP_WritePhyUshort(sc, 0x00, 0x1800);
10569         MP_WritePhyUshort(sc, 0x1f, 0x0007);
10570         MP_WritePhyUshort(sc, 0x1e, 0x0023);
10571         MP_WritePhyUshort(sc, 0x17, 0x0117);
10572         MP_WritePhyUshort(sc, 0x1f, 0x0007);
10573         MP_WritePhyUshort(sc, 0x1E, 0x002C);
10574         MP_WritePhyUshort(sc, 0x1B, 0x5000);
10575         MP_WritePhyUshort(sc, 0x1f, 0x0000);
10576         MP_WritePhyUshort(sc, 0x16, 0x4104);
10577         for (i=0; i<200; i++) {
10578                 DELAY(100);
10579                 PhyRegValue = MP_ReadPhyUshort(sc, 0x1E);
10580                 PhyRegValue &= 0x03FF;
10581                 if (PhyRegValue== 0x000C)
10582                         break;
10583         }
10584         MP_WritePhyUshort(sc, 0x1f, 0x0005);
10585         for (i=0; i<200; i++) {
10586                 DELAY(100);
10587                 PhyRegValue = MP_ReadPhyUshort(sc, 0x07);
10588                 if ((PhyRegValue&0x0020)==0)
10589                         break;
10590         }
10591         PhyRegValue = MP_ReadPhyUshort(sc, 0x07);
10592         if (PhyRegValue & 0x0020) {
10593                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
10594                 MP_WritePhyUshort(sc, 0x1e, 0x00a1);
10595                 MP_WritePhyUshort(sc, 0x17, 0x1000);
10596                 MP_WritePhyUshort(sc, 0x17, 0x0000);
10597                 MP_WritePhyUshort(sc, 0x17, 0x2000);
10598                 MP_WritePhyUshort(sc, 0x1e, 0x002f);
10599                 MP_WritePhyUshort(sc, 0x18, 0x9bfb);
10600                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
10601                 MP_WritePhyUshort(sc, 0x07, 0x0000);
10602                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
10603         }
10604 
10605         MP_WritePhyUshort(sc, 0x1f, 0x0005);
10606         MP_WritePhyUshort(sc, 0x05, 0xfff6);
10607         MP_WritePhyUshort(sc, 0x06, 0x0080);
10608         PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
10609         PhyRegValue &= ~(BIT_7);
10610         MP_WritePhyUshort(sc, 0x00, PhyRegValue);
10611         MP_WritePhyUshort(sc, 0x1f, 0x0002);
10612         PhyRegValue = MP_ReadPhyUshort(sc, 0x08);
10613         PhyRegValue &= ~(BIT_7);
10614         MP_WritePhyUshort(sc, 0x08, PhyRegValue);
10615         MP_WritePhyUshort(sc, 0x1f, 0x0000);
10616         MP_WritePhyUshort(sc, 0x1f, 0x0007);
10617         MP_WritePhyUshort(sc, 0x1e, 0x0023);
10618         MP_WritePhyUshort(sc, 0x16, 0x0306);
10619         MP_WritePhyUshort(sc, 0x16, 0x0307);
10620         MP_WritePhyUshort(sc, 0x15, 0x000e);
10621         MP_WritePhyUshort(sc, 0x19, 0x000a);
10622         MP_WritePhyUshort(sc, 0x15, 0x0010);
10623         MP_WritePhyUshort(sc, 0x19, 0x0008);
10624         MP_WritePhyUshort(sc, 0x15, 0x0018);
10625         MP_WritePhyUshort(sc, 0x19, 0x4801);
10626         MP_WritePhyUshort(sc, 0x15, 0x0019);
10627         MP_WritePhyUshort(sc, 0x19, 0x6801);
10628         MP_WritePhyUshort(sc, 0x15, 0x001a);
10629         MP_WritePhyUshort(sc, 0x19, 0x66a1);
10630         MP_WritePhyUshort(sc, 0x15, 0x001f);
10631         MP_WritePhyUshort(sc, 0x19, 0x0000);
10632         MP_WritePhyUshort(sc, 0x15, 0x0020);
10633         MP_WritePhyUshort(sc, 0x19, 0x0000);
10634         MP_WritePhyUshort(sc, 0x15, 0x0021);
10635         MP_WritePhyUshort(sc, 0x19, 0x0000);
10636         MP_WritePhyUshort(sc, 0x15, 0x0022);
10637         MP_WritePhyUshort(sc, 0x19, 0x0000);
10638         MP_WritePhyUshort(sc, 0x15, 0x0023);
10639         MP_WritePhyUshort(sc, 0x19, 0x0000);
10640         MP_WritePhyUshort(sc, 0x15, 0x0024);
10641         MP_WritePhyUshort(sc, 0x19, 0x0000);
10642         MP_WritePhyUshort(sc, 0x15, 0x0025);
10643         MP_WritePhyUshort(sc, 0x19, 0x64a1);
10644         MP_WritePhyUshort(sc, 0x15, 0x0026);
10645         MP_WritePhyUshort(sc, 0x19, 0x40ea);
10646         MP_WritePhyUshort(sc, 0x15, 0x0027);
10647         MP_WritePhyUshort(sc, 0x19, 0x4503);
10648         MP_WritePhyUshort(sc, 0x15, 0x0028);
10649         MP_WritePhyUshort(sc, 0x19, 0x9f00);
10650         MP_WritePhyUshort(sc, 0x15, 0x0029);
10651         MP_WritePhyUshort(sc, 0x19, 0xa631);
10652         MP_WritePhyUshort(sc, 0x15, 0x002a);
10653         MP_WritePhyUshort(sc, 0x19, 0x9717);
10654         MP_WritePhyUshort(sc, 0x15, 0x002b);
10655         MP_WritePhyUshort(sc, 0x19, 0x302c);
10656         MP_WritePhyUshort(sc, 0x15, 0x002c);
10657         MP_WritePhyUshort(sc, 0x19, 0x4802);
10658         MP_WritePhyUshort(sc, 0x15, 0x002d);
10659         MP_WritePhyUshort(sc, 0x19, 0x58da);
10660         MP_WritePhyUshort(sc, 0x15, 0x002e);
10661         MP_WritePhyUshort(sc, 0x19, 0x400d);
10662         MP_WritePhyUshort(sc, 0x15, 0x002f);
10663         MP_WritePhyUshort(sc, 0x19, 0x4488);
10664         MP_WritePhyUshort(sc, 0x15, 0x0030);
10665         MP_WritePhyUshort(sc, 0x19, 0x9e00);
10666         MP_WritePhyUshort(sc, 0x15, 0x0031);
10667         MP_WritePhyUshort(sc, 0x19, 0x63c8);
10668         MP_WritePhyUshort(sc, 0x15, 0x0032);
10669         MP_WritePhyUshort(sc, 0x19, 0x6481);
10670         MP_WritePhyUshort(sc, 0x15, 0x0033);
10671         MP_WritePhyUshort(sc, 0x19, 0x0000);
10672         MP_WritePhyUshort(sc, 0x15, 0x0034);
10673         MP_WritePhyUshort(sc, 0x19, 0x0000);
10674         MP_WritePhyUshort(sc, 0x15, 0x0035);
10675         MP_WritePhyUshort(sc, 0x19, 0x0000);
10676         MP_WritePhyUshort(sc, 0x15, 0x0036);
10677         MP_WritePhyUshort(sc, 0x19, 0x0000);
10678         MP_WritePhyUshort(sc, 0x15, 0x0037);
10679         MP_WritePhyUshort(sc, 0x19, 0x0000);
10680         MP_WritePhyUshort(sc, 0x15, 0x0038);
10681         MP_WritePhyUshort(sc, 0x19, 0x0000);
10682         MP_WritePhyUshort(sc, 0x15, 0x0039);
10683         MP_WritePhyUshort(sc, 0x19, 0x0000);
10684         MP_WritePhyUshort(sc, 0x15, 0x003a);
10685         MP_WritePhyUshort(sc, 0x19, 0x0000);
10686         MP_WritePhyUshort(sc, 0x15, 0x003b);
10687         MP_WritePhyUshort(sc, 0x19, 0x63e8);
10688         MP_WritePhyUshort(sc, 0x15, 0x003c);
10689         MP_WritePhyUshort(sc, 0x19, 0x7d00);
10690         MP_WritePhyUshort(sc, 0x15, 0x003d);
10691         MP_WritePhyUshort(sc, 0x19, 0x59d4);
10692         MP_WritePhyUshort(sc, 0x15, 0x003e);
10693         MP_WritePhyUshort(sc, 0x19, 0x63f8);
10694         MP_WritePhyUshort(sc, 0x15, 0x0040);
10695         MP_WritePhyUshort(sc, 0x19, 0x64a1);
10696         MP_WritePhyUshort(sc, 0x15, 0x0041);
10697         MP_WritePhyUshort(sc, 0x19, 0x30de);
10698         MP_WritePhyUshort(sc, 0x15, 0x0044);
10699         MP_WritePhyUshort(sc, 0x19, 0x480f);
10700         MP_WritePhyUshort(sc, 0x15, 0x0045);
10701         MP_WritePhyUshort(sc, 0x19, 0x6800);
10702         MP_WritePhyUshort(sc, 0x15, 0x0046);
10703         MP_WritePhyUshort(sc, 0x19, 0x6680);
10704         MP_WritePhyUshort(sc, 0x15, 0x0047);
10705         MP_WritePhyUshort(sc, 0x19, 0x7c10);
10706         MP_WritePhyUshort(sc, 0x15, 0x0048);
10707         MP_WritePhyUshort(sc, 0x19, 0x63c8);
10708         MP_WritePhyUshort(sc, 0x15, 0x0049);
10709         MP_WritePhyUshort(sc, 0x19, 0x0000);
10710         MP_WritePhyUshort(sc, 0x15, 0x004a);
10711         MP_WritePhyUshort(sc, 0x19, 0x0000);
10712         MP_WritePhyUshort(sc, 0x15, 0x004b);
10713         MP_WritePhyUshort(sc, 0x19, 0x0000);
10714         MP_WritePhyUshort(sc, 0x15, 0x004c);
10715         MP_WritePhyUshort(sc, 0x19, 0x0000);
10716         MP_WritePhyUshort(sc, 0x15, 0x004d);
10717         MP_WritePhyUshort(sc, 0x19, 0x0000);
10718         MP_WritePhyUshort(sc, 0x15, 0x004e);
10719         MP_WritePhyUshort(sc, 0x19, 0x0000);
10720         MP_WritePhyUshort(sc, 0x15, 0x004f);
10721         MP_WritePhyUshort(sc, 0x19, 0x40ea);
10722         MP_WritePhyUshort(sc, 0x15, 0x0050);
10723         MP_WritePhyUshort(sc, 0x19, 0x4503);
10724         MP_WritePhyUshort(sc, 0x15, 0x0051);
10725         MP_WritePhyUshort(sc, 0x19, 0x58ca);
10726         MP_WritePhyUshort(sc, 0x15, 0x0052);
10727         MP_WritePhyUshort(sc, 0x19, 0x63c8);
10728         MP_WritePhyUshort(sc, 0x15, 0x0053);
10729         MP_WritePhyUshort(sc, 0x19, 0x63d8);
10730         MP_WritePhyUshort(sc, 0x15, 0x0054);
10731         MP_WritePhyUshort(sc, 0x19, 0x66a0);
10732         MP_WritePhyUshort(sc, 0x15, 0x0055);
10733         MP_WritePhyUshort(sc, 0x19, 0x9f00);
10734         MP_WritePhyUshort(sc, 0x15, 0x0056);
10735         MP_WritePhyUshort(sc, 0x19, 0x3000);
10736         MP_WritePhyUshort(sc, 0x15, 0x006E);
10737         MP_WritePhyUshort(sc, 0x19, 0x9afa);
10738         MP_WritePhyUshort(sc, 0x15, 0x00a1);
10739         MP_WritePhyUshort(sc, 0x19, 0x3044);
10740         MP_WritePhyUshort(sc, 0x15, 0x00ab);
10741         MP_WritePhyUshort(sc, 0x19, 0x5820);
10742         MP_WritePhyUshort(sc, 0x15, 0x00ac);
10743         MP_WritePhyUshort(sc, 0x19, 0x5e04);
10744         MP_WritePhyUshort(sc, 0x15, 0x00ad);
10745         MP_WritePhyUshort(sc, 0x19, 0xb60c);
10746         MP_WritePhyUshort(sc, 0x15, 0x00af);
10747         MP_WritePhyUshort(sc, 0x19, 0x000a);
10748         MP_WritePhyUshort(sc, 0x15, 0x00b2);
10749         MP_WritePhyUshort(sc, 0x19, 0x30b9);
10750         MP_WritePhyUshort(sc, 0x15, 0x00b9);
10751         MP_WritePhyUshort(sc, 0x19, 0x4408);
10752         MP_WritePhyUshort(sc, 0x15, 0x00ba);
10753         MP_WritePhyUshort(sc, 0x19, 0x480b);
10754         MP_WritePhyUshort(sc, 0x15, 0x00bb);
10755         MP_WritePhyUshort(sc, 0x19, 0x5e00);
10756         MP_WritePhyUshort(sc, 0x15, 0x00bc);
10757         MP_WritePhyUshort(sc, 0x19, 0x405f);
10758         MP_WritePhyUshort(sc, 0x15, 0x00bd);
10759         MP_WritePhyUshort(sc, 0x19, 0x4448);
10760         MP_WritePhyUshort(sc, 0x15, 0x00be);
10761         MP_WritePhyUshort(sc, 0x19, 0x4020);
10762         MP_WritePhyUshort(sc, 0x15, 0x00bf);
10763         MP_WritePhyUshort(sc, 0x19, 0x4468);
10764         MP_WritePhyUshort(sc, 0x15, 0x00c0);
10765         MP_WritePhyUshort(sc, 0x19, 0x9c02);
10766         MP_WritePhyUshort(sc, 0x15, 0x00c1);
10767         MP_WritePhyUshort(sc, 0x19, 0x58a0);
10768         MP_WritePhyUshort(sc, 0x15, 0x00c2);
10769         MP_WritePhyUshort(sc, 0x19, 0xb605);
10770         MP_WritePhyUshort(sc, 0x15, 0x00c3);
10771         MP_WritePhyUshort(sc, 0x19, 0xc0d3);
10772         MP_WritePhyUshort(sc, 0x15, 0x00c4);
10773         MP_WritePhyUshort(sc, 0x19, 0x00e6);
10774         MP_WritePhyUshort(sc, 0x15, 0x00c5);
10775         MP_WritePhyUshort(sc, 0x19, 0xdaec);
10776         MP_WritePhyUshort(sc, 0x15, 0x00c6);
10777         MP_WritePhyUshort(sc, 0x19, 0x00fa);
10778         MP_WritePhyUshort(sc, 0x15, 0x00c7);
10779         MP_WritePhyUshort(sc, 0x19, 0x9df9);
10780         MP_WritePhyUshort(sc, 0x15, 0x00c8);
10781         MP_WritePhyUshort(sc, 0x19, 0x307a);
10782         MP_WritePhyUshort(sc, 0x15, 0x0112);
10783         MP_WritePhyUshort(sc, 0x19, 0x6421);
10784         MP_WritePhyUshort(sc, 0x15, 0x0113);
10785         MP_WritePhyUshort(sc, 0x19, 0x7c08);
10786         MP_WritePhyUshort(sc, 0x15, 0x0114);
10787         MP_WritePhyUshort(sc, 0x19, 0x63f0);
10788         MP_WritePhyUshort(sc, 0x15, 0x0115);
10789         MP_WritePhyUshort(sc, 0x19, 0x4003);
10790         MP_WritePhyUshort(sc, 0x15, 0x0116);
10791         MP_WritePhyUshort(sc, 0x19, 0x4418);
10792         MP_WritePhyUshort(sc, 0x15, 0x0117);
10793         MP_WritePhyUshort(sc, 0x19, 0x9b00);
10794         MP_WritePhyUshort(sc, 0x15, 0x0118);
10795         MP_WritePhyUshort(sc, 0x19, 0x6461);
10796         MP_WritePhyUshort(sc, 0x15, 0x0119);
10797         MP_WritePhyUshort(sc, 0x19, 0x64e1);
10798         MP_WritePhyUshort(sc, 0x15, 0x011a);
10799         MP_WritePhyUshort(sc, 0x19, 0x0000);
10800         MP_WritePhyUshort(sc, 0x15, 0x0150);
10801         MP_WritePhyUshort(sc, 0x19, 0x7c80);
10802         MP_WritePhyUshort(sc, 0x15, 0x0151);
10803         MP_WritePhyUshort(sc, 0x19, 0x6461);
10804         MP_WritePhyUshort(sc, 0x15, 0x0152);
10805         MP_WritePhyUshort(sc, 0x19, 0x4003);
10806         MP_WritePhyUshort(sc, 0x15, 0x0153);
10807         MP_WritePhyUshort(sc, 0x19, 0x4540);
10808         MP_WritePhyUshort(sc, 0x15, 0x0154);
10809         MP_WritePhyUshort(sc, 0x19, 0x9f00);
10810         MP_WritePhyUshort(sc, 0x15, 0x0155);
10811         MP_WritePhyUshort(sc, 0x19, 0x9d00);
10812         MP_WritePhyUshort(sc, 0x15, 0x0156);
10813         MP_WritePhyUshort(sc, 0x19, 0x7c40);
10814         MP_WritePhyUshort(sc, 0x15, 0x0157);
10815         MP_WritePhyUshort(sc, 0x19, 0x6421);
10816         MP_WritePhyUshort(sc, 0x15, 0x0158);
10817         MP_WritePhyUshort(sc, 0x19, 0x7c80);
10818         MP_WritePhyUshort(sc, 0x15, 0x0159);
10819         MP_WritePhyUshort(sc, 0x19, 0x64a1);
10820         MP_WritePhyUshort(sc, 0x15, 0x015a);
10821         MP_WritePhyUshort(sc, 0x19, 0x30fe);
10822         MP_WritePhyUshort(sc, 0x15, 0x021e);
10823         MP_WritePhyUshort(sc, 0x19, 0x5410);
10824         MP_WritePhyUshort(sc, 0x15, 0x0225);
10825         MP_WritePhyUshort(sc, 0x19, 0x5400);
10826         MP_WritePhyUshort(sc, 0x15, 0x023D);
10827         MP_WritePhyUshort(sc, 0x19, 0x4050);
10828         MP_WritePhyUshort(sc, 0x15, 0x0295);
10829         MP_WritePhyUshort(sc, 0x19, 0x6c08);
10830         MP_WritePhyUshort(sc, 0x15, 0x02bd);
10831         MP_WritePhyUshort(sc, 0x19, 0xa523);
10832         MP_WritePhyUshort(sc, 0x15, 0x02be);
10833         MP_WritePhyUshort(sc, 0x19, 0x32ca);
10834         MP_WritePhyUshort(sc, 0x15, 0x02ca);
10835         MP_WritePhyUshort(sc, 0x19, 0x48b3);
10836         MP_WritePhyUshort(sc, 0x15, 0x02cb);
10837         MP_WritePhyUshort(sc, 0x19, 0x4020);
10838         MP_WritePhyUshort(sc, 0x15, 0x02cc);
10839         MP_WritePhyUshort(sc, 0x19, 0x4823);
10840         MP_WritePhyUshort(sc, 0x15, 0x02cd);
10841         MP_WritePhyUshort(sc, 0x19, 0x4510);
10842         MP_WritePhyUshort(sc, 0x15, 0x02ce);
10843         MP_WritePhyUshort(sc, 0x19, 0xb63a);
10844         MP_WritePhyUshort(sc, 0x15, 0x02cf);
10845         MP_WritePhyUshort(sc, 0x19, 0x7dc8);
10846         MP_WritePhyUshort(sc, 0x15, 0x02d6);
10847         MP_WritePhyUshort(sc, 0x19, 0x9bf8);
10848         MP_WritePhyUshort(sc, 0x15, 0x02d8);
10849         MP_WritePhyUshort(sc, 0x19, 0x85f6);
10850         MP_WritePhyUshort(sc, 0x15, 0x02d9);
10851         MP_WritePhyUshort(sc, 0x19, 0x32e0);
10852         MP_WritePhyUshort(sc, 0x15, 0x02e0);
10853         MP_WritePhyUshort(sc, 0x19, 0x4834);
10854         MP_WritePhyUshort(sc, 0x15, 0x02e1);
10855         MP_WritePhyUshort(sc, 0x19, 0x6c08);
10856         MP_WritePhyUshort(sc, 0x15, 0x02e2);
10857         MP_WritePhyUshort(sc, 0x19, 0x4020);
10858         MP_WritePhyUshort(sc, 0x15, 0x02e3);
10859         MP_WritePhyUshort(sc, 0x19, 0x4824);
10860         MP_WritePhyUshort(sc, 0x15, 0x02e4);
10861         MP_WritePhyUshort(sc, 0x19, 0x4520);
10862         MP_WritePhyUshort(sc, 0x15, 0x02e5);
10863         MP_WritePhyUshort(sc, 0x19, 0x4008);
10864         MP_WritePhyUshort(sc, 0x15, 0x02e6);
10865         MP_WritePhyUshort(sc, 0x19, 0x4560);
10866         MP_WritePhyUshort(sc, 0x15, 0x02e7);
10867         MP_WritePhyUshort(sc, 0x19, 0x9d04);
10868         MP_WritePhyUshort(sc, 0x15, 0x02e8);
10869         MP_WritePhyUshort(sc, 0x19, 0x48c4);
10870         MP_WritePhyUshort(sc, 0x15, 0x02e9);
10871         MP_WritePhyUshort(sc, 0x19, 0x0000);
10872         MP_WritePhyUshort(sc, 0x15, 0x02ea);
10873         MP_WritePhyUshort(sc, 0x19, 0x4844);
10874         MP_WritePhyUshort(sc, 0x15, 0x02eb);
10875         MP_WritePhyUshort(sc, 0x19, 0x7dc8);
10876         MP_WritePhyUshort(sc, 0x15, 0x02f0);
10877         MP_WritePhyUshort(sc, 0x19, 0x9cf7);
10878         MP_WritePhyUshort(sc, 0x15, 0x02f1);
10879         MP_WritePhyUshort(sc, 0x19, 0xdf94);
10880         MP_WritePhyUshort(sc, 0x15, 0x02f2);
10881         MP_WritePhyUshort(sc, 0x19, 0x0002);
10882         MP_WritePhyUshort(sc, 0x15, 0x02f3);
10883         MP_WritePhyUshort(sc, 0x19, 0x6810);
10884         MP_WritePhyUshort(sc, 0x15, 0x02f4);
10885         MP_WritePhyUshort(sc, 0x19, 0xb614);
10886         MP_WritePhyUshort(sc, 0x15, 0x02f5);
10887         MP_WritePhyUshort(sc, 0x19, 0xc42b);
10888         MP_WritePhyUshort(sc, 0x15, 0x02f6);
10889         MP_WritePhyUshort(sc, 0x19, 0x00d4);
10890         MP_WritePhyUshort(sc, 0x15, 0x02f7);
10891         MP_WritePhyUshort(sc, 0x19, 0xc455);
10892         MP_WritePhyUshort(sc, 0x15, 0x02f8);
10893         MP_WritePhyUshort(sc, 0x19, 0x0093);
10894         MP_WritePhyUshort(sc, 0x15, 0x02f9);
10895         MP_WritePhyUshort(sc, 0x19, 0x92ee);
10896         MP_WritePhyUshort(sc, 0x15, 0x02fa);
10897         MP_WritePhyUshort(sc, 0x19, 0xefed);
10898         MP_WritePhyUshort(sc, 0x15, 0x02fb);
10899         MP_WritePhyUshort(sc, 0x19, 0x3312);
10900         MP_WritePhyUshort(sc, 0x15, 0x0312);
10901         MP_WritePhyUshort(sc, 0x19, 0x49b5);
10902         MP_WritePhyUshort(sc, 0x15, 0x0313);
10903         MP_WritePhyUshort(sc, 0x19, 0x7d00);
10904         MP_WritePhyUshort(sc, 0x15, 0x0314);
10905         MP_WritePhyUshort(sc, 0x19, 0x4d00);
10906         MP_WritePhyUshort(sc, 0x15, 0x0315);
10907         MP_WritePhyUshort(sc, 0x19, 0x6810);
10908         MP_WritePhyUshort(sc, 0x15, 0x031e);
10909         MP_WritePhyUshort(sc, 0x19, 0x404f);
10910         MP_WritePhyUshort(sc, 0x15, 0x031f);
10911         MP_WritePhyUshort(sc, 0x19, 0x44c8);
10912         MP_WritePhyUshort(sc, 0x15, 0x0320);
10913         MP_WritePhyUshort(sc, 0x19, 0xd64f);
10914         MP_WritePhyUshort(sc, 0x15, 0x0321);
10915         MP_WritePhyUshort(sc, 0x19, 0x00e7);
10916         MP_WritePhyUshort(sc, 0x15, 0x0322);
10917         MP_WritePhyUshort(sc, 0x19, 0x7c08);
10918         MP_WritePhyUshort(sc, 0x15, 0x0323);
10919         MP_WritePhyUshort(sc, 0x19, 0x8203);
10920         MP_WritePhyUshort(sc, 0x15, 0x0324);
10921         MP_WritePhyUshort(sc, 0x19, 0x4d48);
10922         MP_WritePhyUshort(sc, 0x15, 0x0325);
10923         MP_WritePhyUshort(sc, 0x19, 0x3327);
10924         MP_WritePhyUshort(sc, 0x15, 0x0326);
10925         MP_WritePhyUshort(sc, 0x19, 0x4d40);
10926         MP_WritePhyUshort(sc, 0x15, 0x0327);
10927         MP_WritePhyUshort(sc, 0x19, 0xc8d7);
10928         MP_WritePhyUshort(sc, 0x15, 0x0328);
10929         MP_WritePhyUshort(sc, 0x19, 0x0003);
10930         MP_WritePhyUshort(sc, 0x15, 0x0329);
10931         MP_WritePhyUshort(sc, 0x19, 0x7c20);
10932         MP_WritePhyUshort(sc, 0x15, 0x032a);
10933         MP_WritePhyUshort(sc, 0x19, 0x4c20);
10934         MP_WritePhyUshort(sc, 0x15, 0x032b);
10935         MP_WritePhyUshort(sc, 0x19, 0xc8ed);
10936         MP_WritePhyUshort(sc, 0x15, 0x032c);
10937         MP_WritePhyUshort(sc, 0x19, 0x00f4);
10938         MP_WritePhyUshort(sc, 0x15, 0x032d);
10939         MP_WritePhyUshort(sc, 0x19, 0x82b3);
10940         MP_WritePhyUshort(sc, 0x15, 0x032e);
10941         MP_WritePhyUshort(sc, 0x19, 0xd11d);
10942         MP_WritePhyUshort(sc, 0x15, 0x032f);
10943         MP_WritePhyUshort(sc, 0x19, 0x00b1);
10944         MP_WritePhyUshort(sc, 0x15, 0x0330);
10945         MP_WritePhyUshort(sc, 0x19, 0xde18);
10946         MP_WritePhyUshort(sc, 0x15, 0x0331);
10947         MP_WritePhyUshort(sc, 0x19, 0x0008);
10948         MP_WritePhyUshort(sc, 0x15, 0x0332);
10949         MP_WritePhyUshort(sc, 0x19, 0x91ee);
10950         MP_WritePhyUshort(sc, 0x15, 0x0333);
10951         MP_WritePhyUshort(sc, 0x19, 0x3339);
10952         MP_WritePhyUshort(sc, 0x15, 0x033a);
10953         MP_WritePhyUshort(sc, 0x19, 0x4064);
10954         MP_WritePhyUshort(sc, 0x15, 0x0340);
10955         MP_WritePhyUshort(sc, 0x19, 0x9e06);
10956         MP_WritePhyUshort(sc, 0x15, 0x0341);
10957         MP_WritePhyUshort(sc, 0x19, 0x7c08);
10958         MP_WritePhyUshort(sc, 0x15, 0x0342);
10959         MP_WritePhyUshort(sc, 0x19, 0x8203);
10960         MP_WritePhyUshort(sc, 0x15, 0x0343);
10961         MP_WritePhyUshort(sc, 0x19, 0x4d48);
10962         MP_WritePhyUshort(sc, 0x15, 0x0344);
10963         MP_WritePhyUshort(sc, 0x19, 0x3346);
10964         MP_WritePhyUshort(sc, 0x15, 0x0345);
10965         MP_WritePhyUshort(sc, 0x19, 0x4d40);
10966         MP_WritePhyUshort(sc, 0x15, 0x0346);
10967         MP_WritePhyUshort(sc, 0x19, 0xd11d);
10968         MP_WritePhyUshort(sc, 0x15, 0x0347);
10969         MP_WritePhyUshort(sc, 0x19, 0x0099);
10970         MP_WritePhyUshort(sc, 0x15, 0x0348);
10971         MP_WritePhyUshort(sc, 0x19, 0xbb17);
10972         MP_WritePhyUshort(sc, 0x15, 0x0349);
10973         MP_WritePhyUshort(sc, 0x19, 0x8102);
10974         MP_WritePhyUshort(sc, 0x15, 0x034a);
10975         MP_WritePhyUshort(sc, 0x19, 0x334d);
10976         MP_WritePhyUshort(sc, 0x15, 0x034b);
10977         MP_WritePhyUshort(sc, 0x19, 0xa22c);
10978         MP_WritePhyUshort(sc, 0x15, 0x034c);
10979         MP_WritePhyUshort(sc, 0x19, 0x3397);
10980         MP_WritePhyUshort(sc, 0x15, 0x034d);
10981         MP_WritePhyUshort(sc, 0x19, 0x91f2);
10982         MP_WritePhyUshort(sc, 0x15, 0x034e);
10983         MP_WritePhyUshort(sc, 0x19, 0xc218);
10984         MP_WritePhyUshort(sc, 0x15, 0x034f);
10985         MP_WritePhyUshort(sc, 0x19, 0x00f0);
10986         MP_WritePhyUshort(sc, 0x15, 0x0350);
10987         MP_WritePhyUshort(sc, 0x19, 0x3397);
10988         MP_WritePhyUshort(sc, 0x15, 0x0351);
10989         MP_WritePhyUshort(sc, 0x19, 0x0000);
10990         MP_WritePhyUshort(sc, 0x15, 0x0364);
10991         MP_WritePhyUshort(sc, 0x19, 0xbc05);
10992         MP_WritePhyUshort(sc, 0x15, 0x0367);
10993         MP_WritePhyUshort(sc, 0x19, 0xa1fc);
10994         MP_WritePhyUshort(sc, 0x15, 0x0368);
10995         MP_WritePhyUshort(sc, 0x19, 0x3377);
10996         MP_WritePhyUshort(sc, 0x15, 0x0369);
10997         MP_WritePhyUshort(sc, 0x19, 0x328b);
10998         MP_WritePhyUshort(sc, 0x15, 0x036a);
10999         MP_WritePhyUshort(sc, 0x19, 0x0000);
11000         MP_WritePhyUshort(sc, 0x15, 0x0377);
11001         MP_WritePhyUshort(sc, 0x19, 0x4b97);
11002         MP_WritePhyUshort(sc, 0x15, 0x0378);
11003         MP_WritePhyUshort(sc, 0x19, 0x6818);
11004         MP_WritePhyUshort(sc, 0x15, 0x0379);
11005         MP_WritePhyUshort(sc, 0x19, 0x4b07);
11006         MP_WritePhyUshort(sc, 0x15, 0x037a);
11007         MP_WritePhyUshort(sc, 0x19, 0x40ac);
11008         MP_WritePhyUshort(sc, 0x15, 0x037b);
11009         MP_WritePhyUshort(sc, 0x19, 0x4445);
11010         MP_WritePhyUshort(sc, 0x15, 0x037c);
11011         MP_WritePhyUshort(sc, 0x19, 0x404e);
11012         MP_WritePhyUshort(sc, 0x15, 0x037d);
11013         MP_WritePhyUshort(sc, 0x19, 0x4461);
11014         MP_WritePhyUshort(sc, 0x15, 0x037e);
11015         MP_WritePhyUshort(sc, 0x19, 0x9c09);
11016         MP_WritePhyUshort(sc, 0x15, 0x037f);
11017         MP_WritePhyUshort(sc, 0x19, 0x63da);
11018         MP_WritePhyUshort(sc, 0x15, 0x0380);
11019         MP_WritePhyUshort(sc, 0x19, 0x5440);
11020         MP_WritePhyUshort(sc, 0x15, 0x0381);
11021         MP_WritePhyUshort(sc, 0x19, 0x4b98);
11022         MP_WritePhyUshort(sc, 0x15, 0x0382);
11023         MP_WritePhyUshort(sc, 0x19, 0x7c60);
11024         MP_WritePhyUshort(sc, 0x15, 0x0383);
11025         MP_WritePhyUshort(sc, 0x19, 0x4c00);
11026         MP_WritePhyUshort(sc, 0x15, 0x0384);
11027         MP_WritePhyUshort(sc, 0x19, 0x4b08);
11028         MP_WritePhyUshort(sc, 0x15, 0x0385);
11029         MP_WritePhyUshort(sc, 0x19, 0x63d8);
11030         MP_WritePhyUshort(sc, 0x15, 0x0386);
11031         MP_WritePhyUshort(sc, 0x19, 0x338d);
11032         MP_WritePhyUshort(sc, 0x15, 0x0387);
11033         MP_WritePhyUshort(sc, 0x19, 0xd64f);
11034         MP_WritePhyUshort(sc, 0x15, 0x0388);
11035         MP_WritePhyUshort(sc, 0x19, 0x0080);
11036         MP_WritePhyUshort(sc, 0x15, 0x0389);
11037         MP_WritePhyUshort(sc, 0x19, 0x820c);
11038         MP_WritePhyUshort(sc, 0x15, 0x038a);
11039         MP_WritePhyUshort(sc, 0x19, 0xa10b);
11040         MP_WritePhyUshort(sc, 0x15, 0x038b);
11041         MP_WritePhyUshort(sc, 0x19, 0x9df3);
11042         MP_WritePhyUshort(sc, 0x15, 0x038c);
11043         MP_WritePhyUshort(sc, 0x19, 0x3395);
11044         MP_WritePhyUshort(sc, 0x15, 0x038d);
11045         MP_WritePhyUshort(sc, 0x19, 0xd64f);
11046         MP_WritePhyUshort(sc, 0x15, 0x038e);
11047         MP_WritePhyUshort(sc, 0x19, 0x00f9);
11048         MP_WritePhyUshort(sc, 0x15, 0x038f);
11049         MP_WritePhyUshort(sc, 0x19, 0xc017);
11050         MP_WritePhyUshort(sc, 0x15, 0x0390);
11051         MP_WritePhyUshort(sc, 0x19, 0x0005);
11052         MP_WritePhyUshort(sc, 0x15, 0x0391);
11053         MP_WritePhyUshort(sc, 0x19, 0x6c0b);
11054         MP_WritePhyUshort(sc, 0x15, 0x0392);
11055         MP_WritePhyUshort(sc, 0x19, 0xa103);
11056         MP_WritePhyUshort(sc, 0x15, 0x0393);
11057         MP_WritePhyUshort(sc, 0x19, 0x6c08);
11058         MP_WritePhyUshort(sc, 0x15, 0x0394);
11059         MP_WritePhyUshort(sc, 0x19, 0x9df9);
11060         MP_WritePhyUshort(sc, 0x15, 0x0395);
11061         MP_WritePhyUshort(sc, 0x19, 0x6c08);
11062         MP_WritePhyUshort(sc, 0x15, 0x0396);
11063         MP_WritePhyUshort(sc, 0x19, 0x3397);
11064         MP_WritePhyUshort(sc, 0x15, 0x0399);
11065         MP_WritePhyUshort(sc, 0x19, 0x6810);
11066         MP_WritePhyUshort(sc, 0x15, 0x03a4);
11067         MP_WritePhyUshort(sc, 0x19, 0x7c08);
11068         MP_WritePhyUshort(sc, 0x15, 0x03a5);
11069         MP_WritePhyUshort(sc, 0x19, 0x8203);
11070         MP_WritePhyUshort(sc, 0x15, 0x03a6);
11071         MP_WritePhyUshort(sc, 0x19, 0x4d08);
11072         MP_WritePhyUshort(sc, 0x15, 0x03a7);
11073         MP_WritePhyUshort(sc, 0x19, 0x33a9);
11074         MP_WritePhyUshort(sc, 0x15, 0x03a8);
11075         MP_WritePhyUshort(sc, 0x19, 0x4d00);
11076         MP_WritePhyUshort(sc, 0x15, 0x03a9);
11077         MP_WritePhyUshort(sc, 0x19, 0x9bfa);
11078         MP_WritePhyUshort(sc, 0x15, 0x03aa);
11079         MP_WritePhyUshort(sc, 0x19, 0x33b6);
11080         MP_WritePhyUshort(sc, 0x15, 0x03bb);
11081         MP_WritePhyUshort(sc, 0x19, 0x4056);
11082         MP_WritePhyUshort(sc, 0x15, 0x03bc);
11083         MP_WritePhyUshort(sc, 0x19, 0x44e9);
11084         MP_WritePhyUshort(sc, 0x15, 0x03bd);
11085         MP_WritePhyUshort(sc, 0x19, 0x405e);
11086         MP_WritePhyUshort(sc, 0x15, 0x03be);
11087         MP_WritePhyUshort(sc, 0x19, 0x44f8);
11088         MP_WritePhyUshort(sc, 0x15, 0x03bf);
11089         MP_WritePhyUshort(sc, 0x19, 0xd64f);
11090         MP_WritePhyUshort(sc, 0x15, 0x03c0);
11091         MP_WritePhyUshort(sc, 0x19, 0x0037);
11092         MP_WritePhyUshort(sc, 0x15, 0x03c1);
11093         MP_WritePhyUshort(sc, 0x19, 0xbd37);
11094         MP_WritePhyUshort(sc, 0x15, 0x03c2);
11095         MP_WritePhyUshort(sc, 0x19, 0x9cfd);
11096         MP_WritePhyUshort(sc, 0x15, 0x03c3);
11097         MP_WritePhyUshort(sc, 0x19, 0xc639);
11098         MP_WritePhyUshort(sc, 0x15, 0x03c4);
11099         MP_WritePhyUshort(sc, 0x19, 0x0011);
11100         MP_WritePhyUshort(sc, 0x15, 0x03c5);
11101         MP_WritePhyUshort(sc, 0x19, 0x9b03);
11102         MP_WritePhyUshort(sc, 0x15, 0x03c6);
11103         MP_WritePhyUshort(sc, 0x19, 0x7c01);
11104         MP_WritePhyUshort(sc, 0x15, 0x03c7);
11105         MP_WritePhyUshort(sc, 0x19, 0x4c01);
11106         MP_WritePhyUshort(sc, 0x15, 0x03c8);
11107         MP_WritePhyUshort(sc, 0x19, 0x9e03);
11108         MP_WritePhyUshort(sc, 0x15, 0x03c9);
11109         MP_WritePhyUshort(sc, 0x19, 0x7c20);
11110         MP_WritePhyUshort(sc, 0x15, 0x03ca);
11111         MP_WritePhyUshort(sc, 0x19, 0x4c20);
11112         MP_WritePhyUshort(sc, 0x15, 0x03cb);
11113         MP_WritePhyUshort(sc, 0x19, 0x9af4);
11114         MP_WritePhyUshort(sc, 0x15, 0x03cc);
11115         MP_WritePhyUshort(sc, 0x19, 0x7c12);
11116         MP_WritePhyUshort(sc, 0x15, 0x03cd);
11117         MP_WritePhyUshort(sc, 0x19, 0x4c52);
11118         MP_WritePhyUshort(sc, 0x15, 0x03ce);
11119         MP_WritePhyUshort(sc, 0x19, 0x4470);
11120         MP_WritePhyUshort(sc, 0x15, 0x03cf);
11121         MP_WritePhyUshort(sc, 0x19, 0x7c12);
11122         MP_WritePhyUshort(sc, 0x15, 0x03d0);
11123         MP_WritePhyUshort(sc, 0x19, 0x4c40);
11124         MP_WritePhyUshort(sc, 0x15, 0x03d1);
11125         MP_WritePhyUshort(sc, 0x19, 0x33bf);
11126         MP_WritePhyUshort(sc, 0x15, 0x03d6);
11127         MP_WritePhyUshort(sc, 0x19, 0x4047);
11128         MP_WritePhyUshort(sc, 0x15, 0x03d7);
11129         MP_WritePhyUshort(sc, 0x19, 0x4469);
11130         MP_WritePhyUshort(sc, 0x15, 0x03d8);
11131         MP_WritePhyUshort(sc, 0x19, 0x492b);
11132         MP_WritePhyUshort(sc, 0x15, 0x03d9);
11133         MP_WritePhyUshort(sc, 0x19, 0x4479);
11134         MP_WritePhyUshort(sc, 0x15, 0x03da);
11135         MP_WritePhyUshort(sc, 0x19, 0x7c09);
11136         MP_WritePhyUshort(sc, 0x15, 0x03db);
11137         MP_WritePhyUshort(sc, 0x19, 0x8203);
11138         MP_WritePhyUshort(sc, 0x15, 0x03dc);
11139         MP_WritePhyUshort(sc, 0x19, 0x4d48);
11140         MP_WritePhyUshort(sc, 0x15, 0x03dd);
11141         MP_WritePhyUshort(sc, 0x19, 0x33df);
11142         MP_WritePhyUshort(sc, 0x15, 0x03de);
11143         MP_WritePhyUshort(sc, 0x19, 0x4d40);
11144         MP_WritePhyUshort(sc, 0x15, 0x03df);
11145         MP_WritePhyUshort(sc, 0x19, 0xd64f);
11146         MP_WritePhyUshort(sc, 0x15, 0x03e0);
11147         MP_WritePhyUshort(sc, 0x19, 0x0017);
11148         MP_WritePhyUshort(sc, 0x15, 0x03e1);
11149         MP_WritePhyUshort(sc, 0x19, 0xbd17);
11150         MP_WritePhyUshort(sc, 0x15, 0x03e2);
11151         MP_WritePhyUshort(sc, 0x19, 0x9b03);
11152         MP_WritePhyUshort(sc, 0x15, 0x03e3);
11153         MP_WritePhyUshort(sc, 0x19, 0x7c20);
11154         MP_WritePhyUshort(sc, 0x15, 0x03e4);
11155         MP_WritePhyUshort(sc, 0x19, 0x4c20);
11156         MP_WritePhyUshort(sc, 0x15, 0x03e5);
11157         MP_WritePhyUshort(sc, 0x19, 0x88f5);
11158         MP_WritePhyUshort(sc, 0x15, 0x03e6);
11159         MP_WritePhyUshort(sc, 0x19, 0xc428);
11160         MP_WritePhyUshort(sc, 0x15, 0x03e7);
11161         MP_WritePhyUshort(sc, 0x19, 0x0008);
11162         MP_WritePhyUshort(sc, 0x15, 0x03e8);
11163         MP_WritePhyUshort(sc, 0x19, 0x9af2);
11164         MP_WritePhyUshort(sc, 0x15, 0x03e9);
11165         MP_WritePhyUshort(sc, 0x19, 0x7c12);
11166         MP_WritePhyUshort(sc, 0x15, 0x03ea);
11167         MP_WritePhyUshort(sc, 0x19, 0x4c52);
11168         MP_WritePhyUshort(sc, 0x15, 0x03eb);
11169         MP_WritePhyUshort(sc, 0x19, 0x4470);
11170         MP_WritePhyUshort(sc, 0x15, 0x03ec);
11171         MP_WritePhyUshort(sc, 0x19, 0x7c12);
11172         MP_WritePhyUshort(sc, 0x15, 0x03ed);
11173         MP_WritePhyUshort(sc, 0x19, 0x4c40);
11174         MP_WritePhyUshort(sc, 0x15, 0x03ee);
11175         MP_WritePhyUshort(sc, 0x19, 0x33da);
11176         MP_WritePhyUshort(sc, 0x15, 0x03ef);
11177         MP_WritePhyUshort(sc, 0x19, 0x3312);
11178         MP_WritePhyUshort(sc, 0x16, 0x0306);
11179         MP_WritePhyUshort(sc, 0x16, 0x0300);
11180         MP_WritePhyUshort(sc, 0x1f, 0x0000);
11181         MP_WritePhyUshort(sc, 0x17, 0x2179);
11182         MP_WritePhyUshort(sc, 0x1f, 0x0007);
11183         MP_WritePhyUshort(sc, 0x1e, 0x0040);
11184         MP_WritePhyUshort(sc, 0x18, 0x0645);
11185         MP_WritePhyUshort(sc, 0x19, 0xe200);
11186         MP_WritePhyUshort(sc, 0x18, 0x0655);
11187         MP_WritePhyUshort(sc, 0x19, 0x9000);
11188         MP_WritePhyUshort(sc, 0x18, 0x0d05);
11189         MP_WritePhyUshort(sc, 0x19, 0xbe00);
11190         MP_WritePhyUshort(sc, 0x18, 0x0d15);
11191         MP_WritePhyUshort(sc, 0x19, 0xd300);
11192         MP_WritePhyUshort(sc, 0x18, 0x0d25);
11193         MP_WritePhyUshort(sc, 0x19, 0xfe00);
11194         MP_WritePhyUshort(sc, 0x18, 0x0d35);
11195         MP_WritePhyUshort(sc, 0x19, 0x4000);
11196         MP_WritePhyUshort(sc, 0x18, 0x0d45);
11197         MP_WritePhyUshort(sc, 0x19, 0x7f00);
11198         MP_WritePhyUshort(sc, 0x18, 0x0d55);
11199         MP_WritePhyUshort(sc, 0x19, 0x1000);
11200         MP_WritePhyUshort(sc, 0x18, 0x0d65);
11201         MP_WritePhyUshort(sc, 0x19, 0x0000);
11202         MP_WritePhyUshort(sc, 0x18, 0x0d75);
11203         MP_WritePhyUshort(sc, 0x19, 0x8200);
11204         MP_WritePhyUshort(sc, 0x18, 0x0d85);
11205         MP_WritePhyUshort(sc, 0x19, 0x0000);
11206         MP_WritePhyUshort(sc, 0x18, 0x0d95);
11207         MP_WritePhyUshort(sc, 0x19, 0x7000);
11208         MP_WritePhyUshort(sc, 0x18, 0x0da5);
11209         MP_WritePhyUshort(sc, 0x19, 0x0f00);
11210         MP_WritePhyUshort(sc, 0x18, 0x0db5);
11211         MP_WritePhyUshort(sc, 0x19, 0x0100);
11212         MP_WritePhyUshort(sc, 0x18, 0x0dc5);
11213         MP_WritePhyUshort(sc, 0x19, 0x9b00);
11214         MP_WritePhyUshort(sc, 0x18, 0x0dd5);
11215         MP_WritePhyUshort(sc, 0x19, 0x7f00);
11216         MP_WritePhyUshort(sc, 0x18, 0x0de5);
11217         MP_WritePhyUshort(sc, 0x19, 0xe000);
11218         MP_WritePhyUshort(sc, 0x18, 0x0df5);
11219         MP_WritePhyUshort(sc, 0x19, 0xef00);
11220         MP_WritePhyUshort(sc, 0x18, 0x16d5);
11221         MP_WritePhyUshort(sc, 0x19, 0xe200);
11222         MP_WritePhyUshort(sc, 0x18, 0x16e5);
11223         MP_WritePhyUshort(sc, 0x19, 0xab00);
11224         MP_WritePhyUshort(sc, 0x18, 0x2904);
11225         MP_WritePhyUshort(sc, 0x19, 0x4000);
11226         MP_WritePhyUshort(sc, 0x18, 0x2914);
11227         MP_WritePhyUshort(sc, 0x19, 0x7f00);
11228         MP_WritePhyUshort(sc, 0x18, 0x2924);
11229         MP_WritePhyUshort(sc, 0x19, 0x0100);
11230         MP_WritePhyUshort(sc, 0x18, 0x2934);
11231         MP_WritePhyUshort(sc, 0x19, 0x2000);
11232         MP_WritePhyUshort(sc, 0x18, 0x2944);
11233         MP_WritePhyUshort(sc, 0x19, 0x0000);
11234         MP_WritePhyUshort(sc, 0x18, 0x2954);
11235         MP_WritePhyUshort(sc, 0x19, 0x4600);
11236         MP_WritePhyUshort(sc, 0x18, 0x2964);
11237         MP_WritePhyUshort(sc, 0x19, 0xfc00);
11238         MP_WritePhyUshort(sc, 0x18, 0x2974);
11239         MP_WritePhyUshort(sc, 0x19, 0x0000);
11240         MP_WritePhyUshort(sc, 0x18, 0x2984);
11241         MP_WritePhyUshort(sc, 0x19, 0x5000);
11242         MP_WritePhyUshort(sc, 0x18, 0x2994);
11243         MP_WritePhyUshort(sc, 0x19, 0x9d00);
11244         MP_WritePhyUshort(sc, 0x18, 0x29a4);
11245         MP_WritePhyUshort(sc, 0x19, 0xff00);
11246         MP_WritePhyUshort(sc, 0x18, 0x29b4);
11247         MP_WritePhyUshort(sc, 0x19, 0x4000);
11248         MP_WritePhyUshort(sc, 0x18, 0x29c4);
11249         MP_WritePhyUshort(sc, 0x19, 0x7f00);
11250         MP_WritePhyUshort(sc, 0x18, 0x29d4);
11251         MP_WritePhyUshort(sc, 0x19, 0x0000);
11252         MP_WritePhyUshort(sc, 0x18, 0x29e4);
11253         MP_WritePhyUshort(sc, 0x19, 0x2000);
11254         MP_WritePhyUshort(sc, 0x18, 0x29f4);
11255         MP_WritePhyUshort(sc, 0x19, 0x0000);
11256         MP_WritePhyUshort(sc, 0x18, 0x2a04);
11257         MP_WritePhyUshort(sc, 0x19, 0xe600);
11258         MP_WritePhyUshort(sc, 0x18, 0x2a14);
11259         MP_WritePhyUshort(sc, 0x19, 0xff00);
11260         MP_WritePhyUshort(sc, 0x18, 0x2a24);
11261         MP_WritePhyUshort(sc, 0x19, 0x0000);
11262         MP_WritePhyUshort(sc, 0x18, 0x2a34);
11263         MP_WritePhyUshort(sc, 0x19, 0x5000);
11264         MP_WritePhyUshort(sc, 0x18, 0x2a44);
11265         MP_WritePhyUshort(sc, 0x19, 0x8500);
11266         MP_WritePhyUshort(sc, 0x18, 0x2a54);
11267         MP_WritePhyUshort(sc, 0x19, 0x7f00);
11268         MP_WritePhyUshort(sc, 0x18, 0x2a64);
11269         MP_WritePhyUshort(sc, 0x19, 0xac00);
11270         MP_WritePhyUshort(sc, 0x18, 0x2a74);
11271         MP_WritePhyUshort(sc, 0x19, 0x0800);
11272         MP_WritePhyUshort(sc, 0x18, 0x2a84);
11273         MP_WritePhyUshort(sc, 0x19, 0xfc00);
11274         MP_WritePhyUshort(sc, 0x18, 0x2a94);
11275         MP_WritePhyUshort(sc, 0x19, 0xe000);
11276         MP_WritePhyUshort(sc, 0x18, 0x2aa4);
11277         MP_WritePhyUshort(sc, 0x19, 0x7400);
11278         MP_WritePhyUshort(sc, 0x18, 0x2ab4);
11279         MP_WritePhyUshort(sc, 0x19, 0x4000);
11280         MP_WritePhyUshort(sc, 0x18, 0x2ac4);
11281         MP_WritePhyUshort(sc, 0x19, 0x7f00);
11282         MP_WritePhyUshort(sc, 0x18, 0x2ad4);
11283         MP_WritePhyUshort(sc, 0x19, 0x0100);
11284         MP_WritePhyUshort(sc, 0x18, 0x2ae4);
11285         MP_WritePhyUshort(sc, 0x19, 0xff00);
11286         MP_WritePhyUshort(sc, 0x18, 0x2af4);
11287         MP_WritePhyUshort(sc, 0x19, 0x0000);
11288         MP_WritePhyUshort(sc, 0x18, 0x2b04);
11289         MP_WritePhyUshort(sc, 0x19, 0x4400);
11290         MP_WritePhyUshort(sc, 0x18, 0x2b14);
11291         MP_WritePhyUshort(sc, 0x19, 0xfc00);
11292         MP_WritePhyUshort(sc, 0x18, 0x2b24);
11293         MP_WritePhyUshort(sc, 0x19, 0x0000);
11294         MP_WritePhyUshort(sc, 0x18, 0x2b34);
11295         MP_WritePhyUshort(sc, 0x19, 0x4000);
11296         MP_WritePhyUshort(sc, 0x18, 0x2b44);
11297         MP_WritePhyUshort(sc, 0x19, 0x9d00);
11298         MP_WritePhyUshort(sc, 0x18, 0x2b54);
11299         MP_WritePhyUshort(sc, 0x19, 0xff00);
11300         MP_WritePhyUshort(sc, 0x18, 0x2b64);
11301         MP_WritePhyUshort(sc, 0x19, 0x4000);
11302         MP_WritePhyUshort(sc, 0x18, 0x2b74);
11303         MP_WritePhyUshort(sc, 0x19, 0x7f00);
11304         MP_WritePhyUshort(sc, 0x18, 0x2b84);
11305         MP_WritePhyUshort(sc, 0x19, 0x0000);
11306         MP_WritePhyUshort(sc, 0x18, 0x2b94);
11307         MP_WritePhyUshort(sc, 0x19, 0xff00);
11308         MP_WritePhyUshort(sc, 0x18, 0x2ba4);
11309         MP_WritePhyUshort(sc, 0x19, 0x0000);
11310         MP_WritePhyUshort(sc, 0x18, 0x2bb4);
11311         MP_WritePhyUshort(sc, 0x19, 0xfc00);
11312         MP_WritePhyUshort(sc, 0x18, 0x2bc4);
11313         MP_WritePhyUshort(sc, 0x19, 0xff00);
11314         MP_WritePhyUshort(sc, 0x18, 0x2bd4);
11315         MP_WritePhyUshort(sc, 0x19, 0x0000);
11316         MP_WritePhyUshort(sc, 0x18, 0x2be4);
11317         MP_WritePhyUshort(sc, 0x19, 0x4000);
11318         MP_WritePhyUshort(sc, 0x18, 0x2bf4);
11319         MP_WritePhyUshort(sc, 0x19, 0x8900);
11320         MP_WritePhyUshort(sc, 0x18, 0x2c04);
11321         MP_WritePhyUshort(sc, 0x19, 0x8300);
11322         MP_WritePhyUshort(sc, 0x18, 0x2c14);
11323         MP_WritePhyUshort(sc, 0x19, 0xe000);
11324         MP_WritePhyUshort(sc, 0x18, 0x2c24);
11325         MP_WritePhyUshort(sc, 0x19, 0x0000);
11326         MP_WritePhyUshort(sc, 0x18, 0x2c34);
11327         MP_WritePhyUshort(sc, 0x19, 0xac00);
11328         MP_WritePhyUshort(sc, 0x18, 0x2c44);
11329         MP_WritePhyUshort(sc, 0x19, 0x0800);
11330         MP_WritePhyUshort(sc, 0x18, 0x2c54);
11331         MP_WritePhyUshort(sc, 0x19, 0xfa00);
11332         MP_WritePhyUshort(sc, 0x18, 0x2c64);
11333         MP_WritePhyUshort(sc, 0x19, 0xe100);
11334         MP_WritePhyUshort(sc, 0x18, 0x2c74);
11335         MP_WritePhyUshort(sc, 0x19, 0x7f00);
11336         MP_WritePhyUshort(sc, 0x18, 0x0001);
11337         MP_WritePhyUshort(sc, 0x1f, 0x0000);
11338         MP_WritePhyUshort(sc, 0x17, 0x2100);
11339         MP_WritePhyUshort(sc, 0x1f, 0x0005);
11340         MP_WritePhyUshort(sc, 0x05, 0xfff6);
11341         MP_WritePhyUshort(sc, 0x06, 0x0080);
11342         MP_WritePhyUshort(sc, 0x05, 0x8b88);
11343         MP_WritePhyUshort(sc, 0x06, 0x0000);
11344         MP_WritePhyUshort(sc, 0x06, 0x0000);
11345         MP_WritePhyUshort(sc, 0x06, 0x0000);
11346         MP_WritePhyUshort(sc, 0x06, 0x0000);
11347         MP_WritePhyUshort(sc, 0x05, 0x8000);
11348         MP_WritePhyUshort(sc, 0x06, 0xd480);
11349         MP_WritePhyUshort(sc, 0x06, 0xc1e4);
11350         MP_WritePhyUshort(sc, 0x06, 0x8b9a);
11351         MP_WritePhyUshort(sc, 0x06, 0xe58b);
11352         MP_WritePhyUshort(sc, 0x06, 0x9bee);
11353         MP_WritePhyUshort(sc, 0x06, 0x8b83);
11354         MP_WritePhyUshort(sc, 0x06, 0x41bf);
11355         MP_WritePhyUshort(sc, 0x06, 0x8b88);
11356         MP_WritePhyUshort(sc, 0x06, 0xec00);
11357         MP_WritePhyUshort(sc, 0x06, 0x19a9);
11358         MP_WritePhyUshort(sc, 0x06, 0x8b90);
11359         MP_WritePhyUshort(sc, 0x06, 0xf9ee);
11360         MP_WritePhyUshort(sc, 0x06, 0xfff6);
11361         MP_WritePhyUshort(sc, 0x06, 0x00ee);
11362         MP_WritePhyUshort(sc, 0x06, 0xfff7);
11363         MP_WritePhyUshort(sc, 0x06, 0xffe0);
11364         MP_WritePhyUshort(sc, 0x06, 0xe140);
11365         MP_WritePhyUshort(sc, 0x06, 0xe1e1);
11366         MP_WritePhyUshort(sc, 0x06, 0x41f7);
11367         MP_WritePhyUshort(sc, 0x06, 0x2ff6);
11368         MP_WritePhyUshort(sc, 0x06, 0x28e4);
11369         MP_WritePhyUshort(sc, 0x06, 0xe140);
11370         MP_WritePhyUshort(sc, 0x06, 0xe5e1);
11371         MP_WritePhyUshort(sc, 0x06, 0x41f7);
11372         MP_WritePhyUshort(sc, 0x06, 0x0002);
11373         MP_WritePhyUshort(sc, 0x06, 0x020c);
11374         MP_WritePhyUshort(sc, 0x06, 0x0202);
11375         MP_WritePhyUshort(sc, 0x06, 0x1d02);
11376         MP_WritePhyUshort(sc, 0x06, 0x0230);
11377         MP_WritePhyUshort(sc, 0x06, 0x0202);
11378         MP_WritePhyUshort(sc, 0x06, 0x4002);
11379         MP_WritePhyUshort(sc, 0x06, 0x028b);
11380         MP_WritePhyUshort(sc, 0x06, 0x0280);
11381         MP_WritePhyUshort(sc, 0x06, 0x6c02);
11382         MP_WritePhyUshort(sc, 0x06, 0x8085);
11383         MP_WritePhyUshort(sc, 0x06, 0xe08b);
11384         MP_WritePhyUshort(sc, 0x06, 0x88e1);
11385         MP_WritePhyUshort(sc, 0x06, 0x8b89);
11386         MP_WritePhyUshort(sc, 0x06, 0x1e01);
11387         MP_WritePhyUshort(sc, 0x06, 0xe18b);
11388         MP_WritePhyUshort(sc, 0x06, 0x8a1e);
11389         MP_WritePhyUshort(sc, 0x06, 0x01e1);
11390         MP_WritePhyUshort(sc, 0x06, 0x8b8b);
11391         MP_WritePhyUshort(sc, 0x06, 0x1e01);
11392         MP_WritePhyUshort(sc, 0x06, 0xe18b);
11393         MP_WritePhyUshort(sc, 0x06, 0x8c1e);
11394         MP_WritePhyUshort(sc, 0x06, 0x01e1);
11395         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
11396         MP_WritePhyUshort(sc, 0x06, 0x1e01);
11397         MP_WritePhyUshort(sc, 0x06, 0xe18b);
11398         MP_WritePhyUshort(sc, 0x06, 0x8e1e);
11399         MP_WritePhyUshort(sc, 0x06, 0x01a0);
11400         MP_WritePhyUshort(sc, 0x06, 0x00c7);
11401         MP_WritePhyUshort(sc, 0x06, 0xaec3);
11402         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
11403         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
11404         MP_WritePhyUshort(sc, 0x06, 0xad20);
11405         MP_WritePhyUshort(sc, 0x06, 0x10ee);
11406         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
11407         MP_WritePhyUshort(sc, 0x06, 0x0002);
11408         MP_WritePhyUshort(sc, 0x06, 0x1310);
11409         MP_WritePhyUshort(sc, 0x06, 0x021f);
11410         MP_WritePhyUshort(sc, 0x06, 0x9d02);
11411         MP_WritePhyUshort(sc, 0x06, 0x1f0c);
11412         MP_WritePhyUshort(sc, 0x06, 0x0227);
11413         MP_WritePhyUshort(sc, 0x06, 0x49fc);
11414         MP_WritePhyUshort(sc, 0x06, 0x04f8);
11415         MP_WritePhyUshort(sc, 0x06, 0xe08b);
11416         MP_WritePhyUshort(sc, 0x06, 0x8ead);
11417         MP_WritePhyUshort(sc, 0x06, 0x200b);
11418         MP_WritePhyUshort(sc, 0x06, 0xf620);
11419         MP_WritePhyUshort(sc, 0x06, 0xe48b);
11420         MP_WritePhyUshort(sc, 0x06, 0x8e02);
11421         MP_WritePhyUshort(sc, 0x06, 0x830e);
11422         MP_WritePhyUshort(sc, 0x06, 0x021b);
11423         MP_WritePhyUshort(sc, 0x06, 0x67ad);
11424         MP_WritePhyUshort(sc, 0x06, 0x2211);
11425         MP_WritePhyUshort(sc, 0x06, 0xf622);
11426         MP_WritePhyUshort(sc, 0x06, 0xe48b);
11427         MP_WritePhyUshort(sc, 0x06, 0x8e02);
11428         MP_WritePhyUshort(sc, 0x06, 0x2ba5);
11429         MP_WritePhyUshort(sc, 0x06, 0x022a);
11430         MP_WritePhyUshort(sc, 0x06, 0x2402);
11431         MP_WritePhyUshort(sc, 0x06, 0x80c6);
11432         MP_WritePhyUshort(sc, 0x06, 0x022a);
11433         MP_WritePhyUshort(sc, 0x06, 0xf0ad);
11434         MP_WritePhyUshort(sc, 0x06, 0x2511);
11435         MP_WritePhyUshort(sc, 0x06, 0xf625);
11436         MP_WritePhyUshort(sc, 0x06, 0xe48b);
11437         MP_WritePhyUshort(sc, 0x06, 0x8e02);
11438         MP_WritePhyUshort(sc, 0x06, 0x8226);
11439         MP_WritePhyUshort(sc, 0x06, 0x0204);
11440         MP_WritePhyUshort(sc, 0x06, 0x0302);
11441         MP_WritePhyUshort(sc, 0x06, 0x19cc);
11442         MP_WritePhyUshort(sc, 0x06, 0x022b);
11443         MP_WritePhyUshort(sc, 0x06, 0x5bfc);
11444         MP_WritePhyUshort(sc, 0x06, 0x04ee);
11445         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
11446         MP_WritePhyUshort(sc, 0x06, 0x0105);
11447         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
11448         MP_WritePhyUshort(sc, 0x06, 0x8b83);
11449         MP_WritePhyUshort(sc, 0x06, 0xad24);
11450         MP_WritePhyUshort(sc, 0x06, 0x44e0);
11451         MP_WritePhyUshort(sc, 0x06, 0xe022);
11452         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
11453         MP_WritePhyUshort(sc, 0x06, 0x23ad);
11454         MP_WritePhyUshort(sc, 0x06, 0x223b);
11455         MP_WritePhyUshort(sc, 0x06, 0xe08a);
11456         MP_WritePhyUshort(sc, 0x06, 0xbea0);
11457         MP_WritePhyUshort(sc, 0x06, 0x0005);
11458         MP_WritePhyUshort(sc, 0x06, 0x0228);
11459         MP_WritePhyUshort(sc, 0x06, 0xdeae);
11460         MP_WritePhyUshort(sc, 0x06, 0x42a0);
11461         MP_WritePhyUshort(sc, 0x06, 0x0105);
11462         MP_WritePhyUshort(sc, 0x06, 0x0228);
11463         MP_WritePhyUshort(sc, 0x06, 0xf1ae);
11464         MP_WritePhyUshort(sc, 0x06, 0x3aa0);
11465         MP_WritePhyUshort(sc, 0x06, 0x0205);
11466         MP_WritePhyUshort(sc, 0x06, 0x0281);
11467         MP_WritePhyUshort(sc, 0x06, 0x25ae);
11468         MP_WritePhyUshort(sc, 0x06, 0x32a0);
11469         MP_WritePhyUshort(sc, 0x06, 0x0305);
11470         MP_WritePhyUshort(sc, 0x06, 0x0229);
11471         MP_WritePhyUshort(sc, 0x06, 0x9aae);
11472         MP_WritePhyUshort(sc, 0x06, 0x2aa0);
11473         MP_WritePhyUshort(sc, 0x06, 0x0405);
11474         MP_WritePhyUshort(sc, 0x06, 0x0229);
11475         MP_WritePhyUshort(sc, 0x06, 0xaeae);
11476         MP_WritePhyUshort(sc, 0x06, 0x22a0);
11477         MP_WritePhyUshort(sc, 0x06, 0x0505);
11478         MP_WritePhyUshort(sc, 0x06, 0x0229);
11479         MP_WritePhyUshort(sc, 0x06, 0xd7ae);
11480         MP_WritePhyUshort(sc, 0x06, 0x1aa0);
11481         MP_WritePhyUshort(sc, 0x06, 0x0605);
11482         MP_WritePhyUshort(sc, 0x06, 0x0229);
11483         MP_WritePhyUshort(sc, 0x06, 0xfeae);
11484         MP_WritePhyUshort(sc, 0x06, 0x12ee);
11485         MP_WritePhyUshort(sc, 0x06, 0x8ac0);
11486         MP_WritePhyUshort(sc, 0x06, 0x00ee);
11487         MP_WritePhyUshort(sc, 0x06, 0x8ac1);
11488         MP_WritePhyUshort(sc, 0x06, 0x00ee);
11489         MP_WritePhyUshort(sc, 0x06, 0x8ac6);
11490         MP_WritePhyUshort(sc, 0x06, 0x00ee);
11491         MP_WritePhyUshort(sc, 0x06, 0x8abe);
11492         MP_WritePhyUshort(sc, 0x06, 0x00ae);
11493         MP_WritePhyUshort(sc, 0x06, 0x00fc);
11494         MP_WritePhyUshort(sc, 0x06, 0x04f8);
11495         MP_WritePhyUshort(sc, 0x06, 0x022a);
11496         MP_WritePhyUshort(sc, 0x06, 0x67e0);
11497         MP_WritePhyUshort(sc, 0x06, 0xe022);
11498         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
11499         MP_WritePhyUshort(sc, 0x06, 0x230d);
11500         MP_WritePhyUshort(sc, 0x06, 0x0658);
11501         MP_WritePhyUshort(sc, 0x06, 0x03a0);
11502         MP_WritePhyUshort(sc, 0x06, 0x0202);
11503         MP_WritePhyUshort(sc, 0x06, 0xae2d);
11504         MP_WritePhyUshort(sc, 0x06, 0xa001);
11505         MP_WritePhyUshort(sc, 0x06, 0x02ae);
11506         MP_WritePhyUshort(sc, 0x06, 0x2da0);
11507         MP_WritePhyUshort(sc, 0x06, 0x004d);
11508         MP_WritePhyUshort(sc, 0x06, 0xe0e2);
11509         MP_WritePhyUshort(sc, 0x06, 0x00e1);
11510         MP_WritePhyUshort(sc, 0x06, 0xe201);
11511         MP_WritePhyUshort(sc, 0x06, 0xad24);
11512         MP_WritePhyUshort(sc, 0x06, 0x44e0);
11513         MP_WritePhyUshort(sc, 0x06, 0x8ac2);
11514         MP_WritePhyUshort(sc, 0x06, 0xe48a);
11515         MP_WritePhyUshort(sc, 0x06, 0xc4e0);
11516         MP_WritePhyUshort(sc, 0x06, 0x8ac3);
11517         MP_WritePhyUshort(sc, 0x06, 0xe48a);
11518         MP_WritePhyUshort(sc, 0x06, 0xc5ee);
11519         MP_WritePhyUshort(sc, 0x06, 0x8abe);
11520         MP_WritePhyUshort(sc, 0x06, 0x03e0);
11521         MP_WritePhyUshort(sc, 0x06, 0x8b83);
11522         MP_WritePhyUshort(sc, 0x06, 0xad25);
11523         MP_WritePhyUshort(sc, 0x06, 0x3aee);
11524         MP_WritePhyUshort(sc, 0x06, 0x8abe);
11525         MP_WritePhyUshort(sc, 0x06, 0x05ae);
11526         MP_WritePhyUshort(sc, 0x06, 0x34e0);
11527         MP_WritePhyUshort(sc, 0x06, 0x8ace);
11528         MP_WritePhyUshort(sc, 0x06, 0xae03);
11529         MP_WritePhyUshort(sc, 0x06, 0xe08a);
11530         MP_WritePhyUshort(sc, 0x06, 0xcfe1);
11531         MP_WritePhyUshort(sc, 0x06, 0x8ac2);
11532         MP_WritePhyUshort(sc, 0x06, 0x4905);
11533         MP_WritePhyUshort(sc, 0x06, 0xe58a);
11534         MP_WritePhyUshort(sc, 0x06, 0xc4e1);
11535         MP_WritePhyUshort(sc, 0x06, 0x8ac3);
11536         MP_WritePhyUshort(sc, 0x06, 0x4905);
11537         MP_WritePhyUshort(sc, 0x06, 0xe58a);
11538         MP_WritePhyUshort(sc, 0x06, 0xc5ee);
11539         MP_WritePhyUshort(sc, 0x06, 0x8abe);
11540         MP_WritePhyUshort(sc, 0x06, 0x0502);
11541         MP_WritePhyUshort(sc, 0x06, 0x2ab6);
11542         MP_WritePhyUshort(sc, 0x06, 0xac20);
11543         MP_WritePhyUshort(sc, 0x06, 0x1202);
11544         MP_WritePhyUshort(sc, 0x06, 0x819b);
11545         MP_WritePhyUshort(sc, 0x06, 0xac20);
11546         MP_WritePhyUshort(sc, 0x06, 0x0cee);
11547         MP_WritePhyUshort(sc, 0x06, 0x8ac1);
11548         MP_WritePhyUshort(sc, 0x06, 0x00ee);
11549         MP_WritePhyUshort(sc, 0x06, 0x8ac6);
11550         MP_WritePhyUshort(sc, 0x06, 0x00ee);
11551         MP_WritePhyUshort(sc, 0x06, 0x8abe);
11552         MP_WritePhyUshort(sc, 0x06, 0x02fc);
11553         MP_WritePhyUshort(sc, 0x06, 0x04d0);
11554         MP_WritePhyUshort(sc, 0x06, 0x0002);
11555         MP_WritePhyUshort(sc, 0x06, 0x81ad);
11556         MP_WritePhyUshort(sc, 0x06, 0x590f);
11557         MP_WritePhyUshort(sc, 0x06, 0x3902);
11558         MP_WritePhyUshort(sc, 0x06, 0xaa04);
11559         MP_WritePhyUshort(sc, 0x06, 0xd001);
11560         MP_WritePhyUshort(sc, 0x06, 0xae02);
11561         MP_WritePhyUshort(sc, 0x06, 0xd000);
11562         MP_WritePhyUshort(sc, 0x06, 0x04f9);
11563         MP_WritePhyUshort(sc, 0x06, 0xfae2);
11564         MP_WritePhyUshort(sc, 0x06, 0xe2d2);
11565         MP_WritePhyUshort(sc, 0x06, 0xe3e2);
11566         MP_WritePhyUshort(sc, 0x06, 0xd3f9);
11567         MP_WritePhyUshort(sc, 0x06, 0x5af7);
11568         MP_WritePhyUshort(sc, 0x06, 0xe6e2);
11569         MP_WritePhyUshort(sc, 0x06, 0xd2e7);
11570         MP_WritePhyUshort(sc, 0x06, 0xe2d3);
11571         MP_WritePhyUshort(sc, 0x06, 0xe2e0);
11572         MP_WritePhyUshort(sc, 0x06, 0x2ce3);
11573         MP_WritePhyUshort(sc, 0x06, 0xe02d);
11574         MP_WritePhyUshort(sc, 0x06, 0xf95b);
11575         MP_WritePhyUshort(sc, 0x06, 0xe01e);
11576         MP_WritePhyUshort(sc, 0x06, 0x30e6);
11577         MP_WritePhyUshort(sc, 0x06, 0xe02c);
11578         MP_WritePhyUshort(sc, 0x06, 0xe7e0);
11579         MP_WritePhyUshort(sc, 0x06, 0x2de2);
11580         MP_WritePhyUshort(sc, 0x06, 0xe2cc);
11581         MP_WritePhyUshort(sc, 0x06, 0xe3e2);
11582         MP_WritePhyUshort(sc, 0x06, 0xcdf9);
11583         MP_WritePhyUshort(sc, 0x06, 0x5a0f);
11584         MP_WritePhyUshort(sc, 0x06, 0x6a50);
11585         MP_WritePhyUshort(sc, 0x06, 0xe6e2);
11586         MP_WritePhyUshort(sc, 0x06, 0xcce7);
11587         MP_WritePhyUshort(sc, 0x06, 0xe2cd);
11588         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
11589         MP_WritePhyUshort(sc, 0x06, 0x3ce1);
11590         MP_WritePhyUshort(sc, 0x06, 0xe03d);
11591         MP_WritePhyUshort(sc, 0x06, 0xef64);
11592         MP_WritePhyUshort(sc, 0x06, 0xfde0);
11593         MP_WritePhyUshort(sc, 0x06, 0xe2cc);
11594         MP_WritePhyUshort(sc, 0x06, 0xe1e2);
11595         MP_WritePhyUshort(sc, 0x06, 0xcd58);
11596         MP_WritePhyUshort(sc, 0x06, 0x0f5a);
11597         MP_WritePhyUshort(sc, 0x06, 0xf01e);
11598         MP_WritePhyUshort(sc, 0x06, 0x02e4);
11599         MP_WritePhyUshort(sc, 0x06, 0xe2cc);
11600         MP_WritePhyUshort(sc, 0x06, 0xe5e2);
11601         MP_WritePhyUshort(sc, 0x06, 0xcdfd);
11602         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
11603         MP_WritePhyUshort(sc, 0x06, 0x2ce1);
11604         MP_WritePhyUshort(sc, 0x06, 0xe02d);
11605         MP_WritePhyUshort(sc, 0x06, 0x59e0);
11606         MP_WritePhyUshort(sc, 0x06, 0x5b1f);
11607         MP_WritePhyUshort(sc, 0x06, 0x1e13);
11608         MP_WritePhyUshort(sc, 0x06, 0xe4e0);
11609         MP_WritePhyUshort(sc, 0x06, 0x2ce5);
11610         MP_WritePhyUshort(sc, 0x06, 0xe02d);
11611         MP_WritePhyUshort(sc, 0x06, 0xfde0);
11612         MP_WritePhyUshort(sc, 0x06, 0xe2d2);
11613         MP_WritePhyUshort(sc, 0x06, 0xe1e2);
11614         MP_WritePhyUshort(sc, 0x06, 0xd358);
11615         MP_WritePhyUshort(sc, 0x06, 0xf75a);
11616         MP_WritePhyUshort(sc, 0x06, 0x081e);
11617         MP_WritePhyUshort(sc, 0x06, 0x02e4);
11618         MP_WritePhyUshort(sc, 0x06, 0xe2d2);
11619         MP_WritePhyUshort(sc, 0x06, 0xe5e2);
11620         MP_WritePhyUshort(sc, 0x06, 0xd3ef);
11621         MP_WritePhyUshort(sc, 0x06, 0x46fe);
11622         MP_WritePhyUshort(sc, 0x06, 0xfd04);
11623         MP_WritePhyUshort(sc, 0x06, 0xf8f9);
11624         MP_WritePhyUshort(sc, 0x06, 0xfaef);
11625         MP_WritePhyUshort(sc, 0x06, 0x69e0);
11626         MP_WritePhyUshort(sc, 0x06, 0xe022);
11627         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
11628         MP_WritePhyUshort(sc, 0x06, 0x2358);
11629         MP_WritePhyUshort(sc, 0x06, 0xc4e1);
11630         MP_WritePhyUshort(sc, 0x06, 0x8b6e);
11631         MP_WritePhyUshort(sc, 0x06, 0x1f10);
11632         MP_WritePhyUshort(sc, 0x06, 0x9e58);
11633         MP_WritePhyUshort(sc, 0x06, 0xe48b);
11634         MP_WritePhyUshort(sc, 0x06, 0x6ead);
11635         MP_WritePhyUshort(sc, 0x06, 0x2222);
11636         MP_WritePhyUshort(sc, 0x06, 0xac27);
11637         MP_WritePhyUshort(sc, 0x06, 0x55ac);
11638         MP_WritePhyUshort(sc, 0x06, 0x2602);
11639         MP_WritePhyUshort(sc, 0x06, 0xae1a);
11640         MP_WritePhyUshort(sc, 0x06, 0xd106);
11641         MP_WritePhyUshort(sc, 0x06, 0xbf3b);
11642         MP_WritePhyUshort(sc, 0x06, 0xba02);
11643         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
11644         MP_WritePhyUshort(sc, 0x06, 0xd107);
11645         MP_WritePhyUshort(sc, 0x06, 0xbf3b);
11646         MP_WritePhyUshort(sc, 0x06, 0xbd02);
11647         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
11648         MP_WritePhyUshort(sc, 0x06, 0xd107);
11649         MP_WritePhyUshort(sc, 0x06, 0xbf3b);
11650         MP_WritePhyUshort(sc, 0x06, 0xc002);
11651         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
11652         MP_WritePhyUshort(sc, 0x06, 0xae30);
11653         MP_WritePhyUshort(sc, 0x06, 0xd103);
11654         MP_WritePhyUshort(sc, 0x06, 0xbf3b);
11655         MP_WritePhyUshort(sc, 0x06, 0xc302);
11656         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
11657         MP_WritePhyUshort(sc, 0x06, 0xd100);
11658         MP_WritePhyUshort(sc, 0x06, 0xbf3b);
11659         MP_WritePhyUshort(sc, 0x06, 0xc602);
11660         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
11661         MP_WritePhyUshort(sc, 0x06, 0xd100);
11662         MP_WritePhyUshort(sc, 0x06, 0xbf82);
11663         MP_WritePhyUshort(sc, 0x06, 0xca02);
11664         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
11665         MP_WritePhyUshort(sc, 0x06, 0xd10f);
11666         MP_WritePhyUshort(sc, 0x06, 0xbf3b);
11667         MP_WritePhyUshort(sc, 0x06, 0xba02);
11668         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
11669         MP_WritePhyUshort(sc, 0x06, 0xd101);
11670         MP_WritePhyUshort(sc, 0x06, 0xbf3b);
11671         MP_WritePhyUshort(sc, 0x06, 0xbd02);
11672         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
11673         MP_WritePhyUshort(sc, 0x06, 0xd101);
11674         MP_WritePhyUshort(sc, 0x06, 0xbf3b);
11675         MP_WritePhyUshort(sc, 0x06, 0xc002);
11676         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
11677         MP_WritePhyUshort(sc, 0x06, 0xef96);
11678         MP_WritePhyUshort(sc, 0x06, 0xfefd);
11679         MP_WritePhyUshort(sc, 0x06, 0xfc04);
11680         MP_WritePhyUshort(sc, 0x06, 0xd100);
11681         MP_WritePhyUshort(sc, 0x06, 0xbf3b);
11682         MP_WritePhyUshort(sc, 0x06, 0xc302);
11683         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
11684         MP_WritePhyUshort(sc, 0x06, 0xd011);
11685         MP_WritePhyUshort(sc, 0x06, 0x022b);
11686         MP_WritePhyUshort(sc, 0x06, 0xfb59);
11687         MP_WritePhyUshort(sc, 0x06, 0x03ef);
11688         MP_WritePhyUshort(sc, 0x06, 0x01d1);
11689         MP_WritePhyUshort(sc, 0x06, 0x00a0);
11690         MP_WritePhyUshort(sc, 0x06, 0x0002);
11691         MP_WritePhyUshort(sc, 0x06, 0xd101);
11692         MP_WritePhyUshort(sc, 0x06, 0xbf3b);
11693         MP_WritePhyUshort(sc, 0x06, 0xc602);
11694         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
11695         MP_WritePhyUshort(sc, 0x06, 0xd111);
11696         MP_WritePhyUshort(sc, 0x06, 0xad20);
11697         MP_WritePhyUshort(sc, 0x06, 0x020c);
11698         MP_WritePhyUshort(sc, 0x06, 0x11ad);
11699         MP_WritePhyUshort(sc, 0x06, 0x2102);
11700         MP_WritePhyUshort(sc, 0x06, 0x0c12);
11701         MP_WritePhyUshort(sc, 0x06, 0xbf82);
11702         MP_WritePhyUshort(sc, 0x06, 0xca02);
11703         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
11704         MP_WritePhyUshort(sc, 0x06, 0xaec8);
11705         MP_WritePhyUshort(sc, 0x06, 0x70e4);
11706         MP_WritePhyUshort(sc, 0x06, 0x2602);
11707         MP_WritePhyUshort(sc, 0x06, 0x82d1);
11708         MP_WritePhyUshort(sc, 0x06, 0x05f8);
11709         MP_WritePhyUshort(sc, 0x06, 0xfaef);
11710         MP_WritePhyUshort(sc, 0x06, 0x69e0);
11711         MP_WritePhyUshort(sc, 0x06, 0xe2fe);
11712         MP_WritePhyUshort(sc, 0x06, 0xe1e2);
11713         MP_WritePhyUshort(sc, 0x06, 0xffad);
11714         MP_WritePhyUshort(sc, 0x06, 0x2d1a);
11715         MP_WritePhyUshort(sc, 0x06, 0xe0e1);
11716         MP_WritePhyUshort(sc, 0x06, 0x4ee1);
11717         MP_WritePhyUshort(sc, 0x06, 0xe14f);
11718         MP_WritePhyUshort(sc, 0x06, 0xac2d);
11719         MP_WritePhyUshort(sc, 0x06, 0x22f6);
11720         MP_WritePhyUshort(sc, 0x06, 0x0302);
11721         MP_WritePhyUshort(sc, 0x06, 0x033b);
11722         MP_WritePhyUshort(sc, 0x06, 0xf703);
11723         MP_WritePhyUshort(sc, 0x06, 0xf706);
11724         MP_WritePhyUshort(sc, 0x06, 0xbf84);
11725         MP_WritePhyUshort(sc, 0x06, 0x4402);
11726         MP_WritePhyUshort(sc, 0x06, 0x2d21);
11727         MP_WritePhyUshort(sc, 0x06, 0xae11);
11728         MP_WritePhyUshort(sc, 0x06, 0xe0e1);
11729         MP_WritePhyUshort(sc, 0x06, 0x4ee1);
11730         MP_WritePhyUshort(sc, 0x06, 0xe14f);
11731         MP_WritePhyUshort(sc, 0x06, 0xad2d);
11732         MP_WritePhyUshort(sc, 0x06, 0x08bf);
11733         MP_WritePhyUshort(sc, 0x06, 0x844f);
11734         MP_WritePhyUshort(sc, 0x06, 0x022d);
11735         MP_WritePhyUshort(sc, 0x06, 0x21f6);
11736         MP_WritePhyUshort(sc, 0x06, 0x06ef);
11737         MP_WritePhyUshort(sc, 0x06, 0x96fe);
11738         MP_WritePhyUshort(sc, 0x06, 0xfc04);
11739         MP_WritePhyUshort(sc, 0x06, 0xf8fa);
11740         MP_WritePhyUshort(sc, 0x06, 0xef69);
11741         MP_WritePhyUshort(sc, 0x06, 0x0283);
11742         MP_WritePhyUshort(sc, 0x06, 0x4502);
11743         MP_WritePhyUshort(sc, 0x06, 0x83a2);
11744         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
11745         MP_WritePhyUshort(sc, 0x06, 0x00e1);
11746         MP_WritePhyUshort(sc, 0x06, 0xe001);
11747         MP_WritePhyUshort(sc, 0x06, 0xad27);
11748         MP_WritePhyUshort(sc, 0x06, 0x1fd1);
11749         MP_WritePhyUshort(sc, 0x06, 0x01bf);
11750         MP_WritePhyUshort(sc, 0x06, 0x843b);
11751         MP_WritePhyUshort(sc, 0x06, 0x022d);
11752         MP_WritePhyUshort(sc, 0x06, 0xc1e0);
11753         MP_WritePhyUshort(sc, 0x06, 0xe020);
11754         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
11755         MP_WritePhyUshort(sc, 0x06, 0x21ad);
11756         MP_WritePhyUshort(sc, 0x06, 0x200e);
11757         MP_WritePhyUshort(sc, 0x06, 0xd100);
11758         MP_WritePhyUshort(sc, 0x06, 0xbf84);
11759         MP_WritePhyUshort(sc, 0x06, 0x3b02);
11760         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
11761         MP_WritePhyUshort(sc, 0x06, 0xbf3b);
11762         MP_WritePhyUshort(sc, 0x06, 0x9602);
11763         MP_WritePhyUshort(sc, 0x06, 0x2d21);
11764         MP_WritePhyUshort(sc, 0x06, 0xef96);
11765         MP_WritePhyUshort(sc, 0x06, 0xfefc);
11766         MP_WritePhyUshort(sc, 0x06, 0x04f8);
11767         MP_WritePhyUshort(sc, 0x06, 0xf9fa);
11768         MP_WritePhyUshort(sc, 0x06, 0xef69);
11769         MP_WritePhyUshort(sc, 0x06, 0xe08b);
11770         MP_WritePhyUshort(sc, 0x06, 0x87ad);
11771         MP_WritePhyUshort(sc, 0x06, 0x204c);
11772         MP_WritePhyUshort(sc, 0x06, 0xd200);
11773         MP_WritePhyUshort(sc, 0x06, 0xe0e2);
11774         MP_WritePhyUshort(sc, 0x06, 0x0058);
11775         MP_WritePhyUshort(sc, 0x06, 0x010c);
11776         MP_WritePhyUshort(sc, 0x06, 0x021e);
11777         MP_WritePhyUshort(sc, 0x06, 0x20e0);
11778         MP_WritePhyUshort(sc, 0x06, 0xe000);
11779         MP_WritePhyUshort(sc, 0x06, 0x5810);
11780         MP_WritePhyUshort(sc, 0x06, 0x1e20);
11781         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
11782         MP_WritePhyUshort(sc, 0x06, 0x3658);
11783         MP_WritePhyUshort(sc, 0x06, 0x031e);
11784         MP_WritePhyUshort(sc, 0x06, 0x20e0);
11785         MP_WritePhyUshort(sc, 0x06, 0xe022);
11786         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
11787         MP_WritePhyUshort(sc, 0x06, 0x2358);
11788         MP_WritePhyUshort(sc, 0x06, 0xe01e);
11789         MP_WritePhyUshort(sc, 0x06, 0x20e0);
11790         MP_WritePhyUshort(sc, 0x06, 0x8b64);
11791         MP_WritePhyUshort(sc, 0x06, 0x1f02);
11792         MP_WritePhyUshort(sc, 0x06, 0x9e22);
11793         MP_WritePhyUshort(sc, 0x06, 0xe68b);
11794         MP_WritePhyUshort(sc, 0x06, 0x64ad);
11795         MP_WritePhyUshort(sc, 0x06, 0x3214);
11796         MP_WritePhyUshort(sc, 0x06, 0xad34);
11797         MP_WritePhyUshort(sc, 0x06, 0x11ef);
11798         MP_WritePhyUshort(sc, 0x06, 0x0258);
11799         MP_WritePhyUshort(sc, 0x06, 0x039e);
11800         MP_WritePhyUshort(sc, 0x06, 0x07ad);
11801         MP_WritePhyUshort(sc, 0x06, 0x3508);
11802         MP_WritePhyUshort(sc, 0x06, 0x5ac0);
11803         MP_WritePhyUshort(sc, 0x06, 0x9f04);
11804         MP_WritePhyUshort(sc, 0x06, 0xd101);
11805         MP_WritePhyUshort(sc, 0x06, 0xae02);
11806         MP_WritePhyUshort(sc, 0x06, 0xd100);
11807         MP_WritePhyUshort(sc, 0x06, 0xbf84);
11808         MP_WritePhyUshort(sc, 0x06, 0x3e02);
11809         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
11810         MP_WritePhyUshort(sc, 0x06, 0xef96);
11811         MP_WritePhyUshort(sc, 0x06, 0xfefd);
11812         MP_WritePhyUshort(sc, 0x06, 0xfc04);
11813         MP_WritePhyUshort(sc, 0x06, 0xf8f9);
11814         MP_WritePhyUshort(sc, 0x06, 0xfbe0);
11815         MP_WritePhyUshort(sc, 0x06, 0x8b85);
11816         MP_WritePhyUshort(sc, 0x06, 0xad25);
11817         MP_WritePhyUshort(sc, 0x06, 0x22e0);
11818         MP_WritePhyUshort(sc, 0x06, 0xe022);
11819         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
11820         MP_WritePhyUshort(sc, 0x06, 0x23e2);
11821         MP_WritePhyUshort(sc, 0x06, 0xe036);
11822         MP_WritePhyUshort(sc, 0x06, 0xe3e0);
11823         MP_WritePhyUshort(sc, 0x06, 0x375a);
11824         MP_WritePhyUshort(sc, 0x06, 0xc40d);
11825         MP_WritePhyUshort(sc, 0x06, 0x0158);
11826         MP_WritePhyUshort(sc, 0x06, 0x021e);
11827         MP_WritePhyUshort(sc, 0x06, 0x20e3);
11828         MP_WritePhyUshort(sc, 0x06, 0x8ae7);
11829         MP_WritePhyUshort(sc, 0x06, 0xac31);
11830         MP_WritePhyUshort(sc, 0x06, 0x60ac);
11831         MP_WritePhyUshort(sc, 0x06, 0x3a08);
11832         MP_WritePhyUshort(sc, 0x06, 0xac3e);
11833         MP_WritePhyUshort(sc, 0x06, 0x26ae);
11834         MP_WritePhyUshort(sc, 0x06, 0x67af);
11835         MP_WritePhyUshort(sc, 0x06, 0x8437);
11836         MP_WritePhyUshort(sc, 0x06, 0xad37);
11837         MP_WritePhyUshort(sc, 0x06, 0x61e0);
11838         MP_WritePhyUshort(sc, 0x06, 0x8ae8);
11839         MP_WritePhyUshort(sc, 0x06, 0x10e4);
11840         MP_WritePhyUshort(sc, 0x06, 0x8ae8);
11841         MP_WritePhyUshort(sc, 0x06, 0xe18a);
11842         MP_WritePhyUshort(sc, 0x06, 0xe91b);
11843         MP_WritePhyUshort(sc, 0x06, 0x109e);
11844         MP_WritePhyUshort(sc, 0x06, 0x02ae);
11845         MP_WritePhyUshort(sc, 0x06, 0x51d1);
11846         MP_WritePhyUshort(sc, 0x06, 0x00bf);
11847         MP_WritePhyUshort(sc, 0x06, 0x8441);
11848         MP_WritePhyUshort(sc, 0x06, 0x022d);
11849         MP_WritePhyUshort(sc, 0x06, 0xc1ee);
11850         MP_WritePhyUshort(sc, 0x06, 0x8ae8);
11851         MP_WritePhyUshort(sc, 0x06, 0x00ae);
11852         MP_WritePhyUshort(sc, 0x06, 0x43ad);
11853         MP_WritePhyUshort(sc, 0x06, 0x3627);
11854         MP_WritePhyUshort(sc, 0x06, 0xe08a);
11855         MP_WritePhyUshort(sc, 0x06, 0xeee1);
11856         MP_WritePhyUshort(sc, 0x06, 0x8aef);
11857         MP_WritePhyUshort(sc, 0x06, 0xef74);
11858         MP_WritePhyUshort(sc, 0x06, 0xe08a);
11859         MP_WritePhyUshort(sc, 0x06, 0xeae1);
11860         MP_WritePhyUshort(sc, 0x06, 0x8aeb);
11861         MP_WritePhyUshort(sc, 0x06, 0x1b74);
11862         MP_WritePhyUshort(sc, 0x06, 0x9e2e);
11863         MP_WritePhyUshort(sc, 0x06, 0x14e4);
11864         MP_WritePhyUshort(sc, 0x06, 0x8aea);
11865         MP_WritePhyUshort(sc, 0x06, 0xe58a);
11866         MP_WritePhyUshort(sc, 0x06, 0xebef);
11867         MP_WritePhyUshort(sc, 0x06, 0x74e0);
11868         MP_WritePhyUshort(sc, 0x06, 0x8aee);
11869         MP_WritePhyUshort(sc, 0x06, 0xe18a);
11870         MP_WritePhyUshort(sc, 0x06, 0xef1b);
11871         MP_WritePhyUshort(sc, 0x06, 0x479e);
11872         MP_WritePhyUshort(sc, 0x06, 0x0fae);
11873         MP_WritePhyUshort(sc, 0x06, 0x19ee);
11874         MP_WritePhyUshort(sc, 0x06, 0x8aea);
11875         MP_WritePhyUshort(sc, 0x06, 0x00ee);
11876         MP_WritePhyUshort(sc, 0x06, 0x8aeb);
11877         MP_WritePhyUshort(sc, 0x06, 0x00ae);
11878         MP_WritePhyUshort(sc, 0x06, 0x0fac);
11879         MP_WritePhyUshort(sc, 0x06, 0x390c);
11880         MP_WritePhyUshort(sc, 0x06, 0xd101);
11881         MP_WritePhyUshort(sc, 0x06, 0xbf84);
11882         MP_WritePhyUshort(sc, 0x06, 0x4102);
11883         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
11884         MP_WritePhyUshort(sc, 0x06, 0xee8a);
11885         MP_WritePhyUshort(sc, 0x06, 0xe800);
11886         MP_WritePhyUshort(sc, 0x06, 0xe68a);
11887         MP_WritePhyUshort(sc, 0x06, 0xe7ff);
11888         MP_WritePhyUshort(sc, 0x06, 0xfdfc);
11889         MP_WritePhyUshort(sc, 0x06, 0x0400);
11890         MP_WritePhyUshort(sc, 0x06, 0xe234);
11891         MP_WritePhyUshort(sc, 0x06, 0xcce2);
11892         MP_WritePhyUshort(sc, 0x06, 0x0088);
11893         MP_WritePhyUshort(sc, 0x06, 0xe200);
11894         MP_WritePhyUshort(sc, 0x06, 0xa725);
11895         MP_WritePhyUshort(sc, 0x06, 0xe50a);
11896         MP_WritePhyUshort(sc, 0x06, 0x1de5);
11897         MP_WritePhyUshort(sc, 0x06, 0x0a2c);
11898         MP_WritePhyUshort(sc, 0x06, 0xe50a);
11899         MP_WritePhyUshort(sc, 0x06, 0x6de5);
11900         MP_WritePhyUshort(sc, 0x06, 0x0a1d);
11901         MP_WritePhyUshort(sc, 0x06, 0xe50a);
11902         MP_WritePhyUshort(sc, 0x06, 0x1ce5);
11903         MP_WritePhyUshort(sc, 0x06, 0x0a2d);
11904         MP_WritePhyUshort(sc, 0x06, 0xa755);
11905         MP_WritePhyUshort(sc, 0x05, 0x8b64);
11906         MP_WritePhyUshort(sc, 0x06, 0x0000);
11907         MP_WritePhyUshort(sc, 0x05, 0x8b94);
11908         MP_WritePhyUshort(sc, 0x06, 0x82cd);
11909         MP_WritePhyUshort(sc, 0x05, 0x8b85);
11910         MP_WritePhyUshort(sc, 0x06, 0x2000);
11911         MP_WritePhyUshort(sc, 0x05, 0x8aee);
11912         MP_WritePhyUshort(sc, 0x06, 0x03b8);
11913         MP_WritePhyUshort(sc, 0x05, 0x8ae8);
11914         MP_WritePhyUshort(sc, 0x06, 0x0002);
11915         PhyRegValue = MP_ReadPhyUshort(sc, 0x01);
11916         PhyRegValue |= BIT_0;
11917         MP_WritePhyUshort(sc, 0x01, PhyRegValue);
11918         PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
11919         PhyRegValue |= BIT_0;
11920         MP_WritePhyUshort(sc, 0x00, PhyRegValue);
11921         MP_WritePhyUshort(sc, 0x1f, 0x0);
11922         MP_WritePhyUshort(sc, 0x1f, 0x0005);
11923         for (i=0; i<200; i++) {
11924                 DELAY(100);
11925                 PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
11926                 if (PhyRegValue&0x0080)
11927                         break;
11928         }
11929         MP_WritePhyUshort(sc, 0x1f, 0x0007);
11930         MP_WritePhyUshort(sc, 0x1e, 0x0023);
11931         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
11932         PhyRegValue &= ~(BIT_0);
11933         if (sc->RequiredSecLanDonglePatch)
11934                 PhyRegValue &= ~(BIT_2);
11935         MP_WritePhyUshort(sc, 0x17, PhyRegValue);
11936         MP_WritePhyUshort(sc, 0x1f, 0x0007);
11937         MP_WritePhyUshort(sc, 0x1e, 0x0028);
11938         MP_WritePhyUshort(sc, 0x15, 0x0010);
11939         MP_WritePhyUshort(sc, 0x1f, 0x0007);
11940         MP_WritePhyUshort(sc, 0x1e, 0x0041);
11941         MP_WritePhyUshort(sc, 0x15, 0x0802);
11942         MP_WritePhyUshort(sc, 0x16, 0x2185);
11943         MP_WritePhyUshort(sc, 0x1f, 0x0000);
11944 }
11945 
11946 static void re_set_phy_mcu_8168e_2(struct re_softc *sc)
11947 {
11948         u_int16_t PhyRegValue;
11949         int	i;
11950 
11951         if (MP_ReadEfuse(sc, 0x22) == 0x0c) {
11952                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
11953                 MP_WritePhyUshort(sc, 0x00, 0x1800);
11954                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
11955                 MP_WritePhyUshort(sc, 0x1e, 0x0023);
11956                 MP_WritePhyUshort(sc, 0x17, 0x0117);
11957                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
11958                 MP_WritePhyUshort(sc, 0x1E, 0x002C);
11959                 MP_WritePhyUshort(sc, 0x1B, 0x5000);
11960                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
11961                 MP_WritePhyUshort(sc, 0x16, 0x4104);
11962                 for (i=0; i<200; i++) {
11963                         DELAY(100);
11964                         PhyRegValue = MP_ReadPhyUshort(sc, 0x1E);
11965                         PhyRegValue &= 0x03FF;
11966                         if (PhyRegValue== 0x000C)
11967                                 break;
11968                 }
11969                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
11970                 for (i=0; i<200; i++) {
11971                         DELAY(100);
11972                         PhyRegValue = MP_ReadPhyUshort(sc, 0x07);
11973                         if ((PhyRegValue&0x0020)==0)
11974                                 break;
11975                 }
11976                 PhyRegValue = MP_ReadPhyUshort(sc, 0x07);
11977                 if (PhyRegValue & 0x0020) {
11978                         MP_WritePhyUshort(sc, 0x1f, 0x0007);
11979                         MP_WritePhyUshort(sc, 0x1e, 0x00a1);
11980                         MP_WritePhyUshort(sc, 0x17, 0x1000);
11981                         MP_WritePhyUshort(sc, 0x17, 0x0000);
11982                         MP_WritePhyUshort(sc, 0x17, 0x2000);
11983                         MP_WritePhyUshort(sc, 0x1e, 0x002f);
11984                         MP_WritePhyUshort(sc, 0x18, 0x9bfb);
11985                         MP_WritePhyUshort(sc, 0x1f, 0x0005);
11986                         MP_WritePhyUshort(sc, 0x07, 0x0000);
11987                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
11988                 }
11989                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
11990                 MP_WritePhyUshort(sc, 0x05, 0xfff6);
11991                 MP_WritePhyUshort(sc, 0x06, 0x0080);
11992                 PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
11993                 PhyRegValue &= ~(BIT_7);
11994                 MP_WritePhyUshort(sc, 0x00, PhyRegValue);
11995                 MP_WritePhyUshort(sc, 0x1f, 0x0002);
11996                 PhyRegValue = MP_ReadPhyUshort(sc, 0x08);
11997                 PhyRegValue &= ~(BIT_7);
11998                 MP_WritePhyUshort(sc, 0x08, PhyRegValue);
11999                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
12000                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
12001                 MP_WritePhyUshort(sc, 0x1e, 0x0023);
12002                 MP_WritePhyUshort(sc, 0x16, 0x0306);
12003                 MP_WritePhyUshort(sc, 0x16, 0x0307);
12004                 MP_WritePhyUshort(sc, 0x15, 0x000e);
12005                 MP_WritePhyUshort(sc, 0x19, 0x000a);
12006                 MP_WritePhyUshort(sc, 0x15, 0x0010);
12007                 MP_WritePhyUshort(sc, 0x19, 0x0008);
12008                 MP_WritePhyUshort(sc, 0x15, 0x0018);
12009                 MP_WritePhyUshort(sc, 0x19, 0x4801);
12010                 MP_WritePhyUshort(sc, 0x15, 0x0019);
12011                 MP_WritePhyUshort(sc, 0x19, 0x6801);
12012                 MP_WritePhyUshort(sc, 0x15, 0x001a);
12013                 MP_WritePhyUshort(sc, 0x19, 0x66a1);
12014                 MP_WritePhyUshort(sc, 0x15, 0x001f);
12015                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12016                 MP_WritePhyUshort(sc, 0x15, 0x0020);
12017                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12018                 MP_WritePhyUshort(sc, 0x15, 0x0021);
12019                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12020                 MP_WritePhyUshort(sc, 0x15, 0x0022);
12021                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12022                 MP_WritePhyUshort(sc, 0x15, 0x0023);
12023                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12024                 MP_WritePhyUshort(sc, 0x15, 0x0024);
12025                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12026                 MP_WritePhyUshort(sc, 0x15, 0x0025);
12027                 MP_WritePhyUshort(sc, 0x19, 0x64a1);
12028                 MP_WritePhyUshort(sc, 0x15, 0x0026);
12029                 MP_WritePhyUshort(sc, 0x19, 0x40ea);
12030                 MP_WritePhyUshort(sc, 0x15, 0x0027);
12031                 MP_WritePhyUshort(sc, 0x19, 0x4503);
12032                 MP_WritePhyUshort(sc, 0x15, 0x0028);
12033                 MP_WritePhyUshort(sc, 0x19, 0x9f00);
12034                 MP_WritePhyUshort(sc, 0x15, 0x0029);
12035                 MP_WritePhyUshort(sc, 0x19, 0xa631);
12036                 MP_WritePhyUshort(sc, 0x15, 0x002a);
12037                 MP_WritePhyUshort(sc, 0x19, 0x9717);
12038                 MP_WritePhyUshort(sc, 0x15, 0x002b);
12039                 MP_WritePhyUshort(sc, 0x19, 0x302c);
12040                 MP_WritePhyUshort(sc, 0x15, 0x002c);
12041                 MP_WritePhyUshort(sc, 0x19, 0x4802);
12042                 MP_WritePhyUshort(sc, 0x15, 0x002d);
12043                 MP_WritePhyUshort(sc, 0x19, 0x58da);
12044                 MP_WritePhyUshort(sc, 0x15, 0x002e);
12045                 MP_WritePhyUshort(sc, 0x19, 0x400d);
12046                 MP_WritePhyUshort(sc, 0x15, 0x002f);
12047                 MP_WritePhyUshort(sc, 0x19, 0x4488);
12048                 MP_WritePhyUshort(sc, 0x15, 0x0030);
12049                 MP_WritePhyUshort(sc, 0x19, 0x9e00);
12050                 MP_WritePhyUshort(sc, 0x15, 0x0031);
12051                 MP_WritePhyUshort(sc, 0x19, 0x63c8);
12052                 MP_WritePhyUshort(sc, 0x15, 0x0032);
12053                 MP_WritePhyUshort(sc, 0x19, 0x6481);
12054                 MP_WritePhyUshort(sc, 0x15, 0x0033);
12055                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12056                 MP_WritePhyUshort(sc, 0x15, 0x0034);
12057                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12058                 MP_WritePhyUshort(sc, 0x15, 0x0035);
12059                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12060                 MP_WritePhyUshort(sc, 0x15, 0x0036);
12061                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12062                 MP_WritePhyUshort(sc, 0x15, 0x0037);
12063                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12064                 MP_WritePhyUshort(sc, 0x15, 0x0038);
12065                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12066                 MP_WritePhyUshort(sc, 0x15, 0x0039);
12067                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12068                 MP_WritePhyUshort(sc, 0x15, 0x003a);
12069                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12070                 MP_WritePhyUshort(sc, 0x15, 0x003b);
12071                 MP_WritePhyUshort(sc, 0x19, 0x63e8);
12072                 MP_WritePhyUshort(sc, 0x15, 0x003c);
12073                 MP_WritePhyUshort(sc, 0x19, 0x7d00);
12074                 MP_WritePhyUshort(sc, 0x15, 0x003d);
12075                 MP_WritePhyUshort(sc, 0x19, 0x59d4);
12076                 MP_WritePhyUshort(sc, 0x15, 0x003e);
12077                 MP_WritePhyUshort(sc, 0x19, 0x63f8);
12078                 MP_WritePhyUshort(sc, 0x15, 0x0040);
12079                 MP_WritePhyUshort(sc, 0x19, 0x64a1);
12080                 MP_WritePhyUshort(sc, 0x15, 0x0041);
12081                 MP_WritePhyUshort(sc, 0x19, 0x30de);
12082                 MP_WritePhyUshort(sc, 0x15, 0x0044);
12083                 MP_WritePhyUshort(sc, 0x19, 0x480f);
12084                 MP_WritePhyUshort(sc, 0x15, 0x0045);
12085                 MP_WritePhyUshort(sc, 0x19, 0x6800);
12086                 MP_WritePhyUshort(sc, 0x15, 0x0046);
12087                 MP_WritePhyUshort(sc, 0x19, 0x6680);
12088                 MP_WritePhyUshort(sc, 0x15, 0x0047);
12089                 MP_WritePhyUshort(sc, 0x19, 0x7c10);
12090                 MP_WritePhyUshort(sc, 0x15, 0x0048);
12091                 MP_WritePhyUshort(sc, 0x19, 0x63c8);
12092                 MP_WritePhyUshort(sc, 0x15, 0x0049);
12093                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12094                 MP_WritePhyUshort(sc, 0x15, 0x004a);
12095                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12096                 MP_WritePhyUshort(sc, 0x15, 0x004b);
12097                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12098                 MP_WritePhyUshort(sc, 0x15, 0x004c);
12099                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12100                 MP_WritePhyUshort(sc, 0x15, 0x004d);
12101                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12102                 MP_WritePhyUshort(sc, 0x15, 0x004e);
12103                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12104                 MP_WritePhyUshort(sc, 0x15, 0x004f);
12105                 MP_WritePhyUshort(sc, 0x19, 0x40ea);
12106                 MP_WritePhyUshort(sc, 0x15, 0x0050);
12107                 MP_WritePhyUshort(sc, 0x19, 0x4503);
12108                 MP_WritePhyUshort(sc, 0x15, 0x0051);
12109                 MP_WritePhyUshort(sc, 0x19, 0x58ca);
12110                 MP_WritePhyUshort(sc, 0x15, 0x0052);
12111                 MP_WritePhyUshort(sc, 0x19, 0x63c8);
12112                 MP_WritePhyUshort(sc, 0x15, 0x0053);
12113                 MP_WritePhyUshort(sc, 0x19, 0x63d8);
12114                 MP_WritePhyUshort(sc, 0x15, 0x0054);
12115                 MP_WritePhyUshort(sc, 0x19, 0x66a0);
12116                 MP_WritePhyUshort(sc, 0x15, 0x0055);
12117                 MP_WritePhyUshort(sc, 0x19, 0x9f00);
12118                 MP_WritePhyUshort(sc, 0x15, 0x0056);
12119                 MP_WritePhyUshort(sc, 0x19, 0x3000);
12120                 MP_WritePhyUshort(sc, 0x15, 0x00a1);
12121                 MP_WritePhyUshort(sc, 0x19, 0x3044);
12122                 MP_WritePhyUshort(sc, 0x15, 0x00ab);
12123                 MP_WritePhyUshort(sc, 0x19, 0x5820);
12124                 MP_WritePhyUshort(sc, 0x15, 0x00ac);
12125                 MP_WritePhyUshort(sc, 0x19, 0x5e04);
12126                 MP_WritePhyUshort(sc, 0x15, 0x00ad);
12127                 MP_WritePhyUshort(sc, 0x19, 0xb60c);
12128                 MP_WritePhyUshort(sc, 0x15, 0x00af);
12129                 MP_WritePhyUshort(sc, 0x19, 0x000a);
12130                 MP_WritePhyUshort(sc, 0x15, 0x00b2);
12131                 MP_WritePhyUshort(sc, 0x19, 0x30b9);
12132                 MP_WritePhyUshort(sc, 0x15, 0x00b9);
12133                 MP_WritePhyUshort(sc, 0x19, 0x4408);
12134                 MP_WritePhyUshort(sc, 0x15, 0x00ba);
12135                 MP_WritePhyUshort(sc, 0x19, 0x480b);
12136                 MP_WritePhyUshort(sc, 0x15, 0x00bb);
12137                 MP_WritePhyUshort(sc, 0x19, 0x5e00);
12138                 MP_WritePhyUshort(sc, 0x15, 0x00bc);
12139                 MP_WritePhyUshort(sc, 0x19, 0x405f);
12140                 MP_WritePhyUshort(sc, 0x15, 0x00bd);
12141                 MP_WritePhyUshort(sc, 0x19, 0x4448);
12142                 MP_WritePhyUshort(sc, 0x15, 0x00be);
12143                 MP_WritePhyUshort(sc, 0x19, 0x4020);
12144                 MP_WritePhyUshort(sc, 0x15, 0x00bf);
12145                 MP_WritePhyUshort(sc, 0x19, 0x4468);
12146                 MP_WritePhyUshort(sc, 0x15, 0x00c0);
12147                 MP_WritePhyUshort(sc, 0x19, 0x9c02);
12148                 MP_WritePhyUshort(sc, 0x15, 0x00c1);
12149                 MP_WritePhyUshort(sc, 0x19, 0x58a0);
12150                 MP_WritePhyUshort(sc, 0x15, 0x00c2);
12151                 MP_WritePhyUshort(sc, 0x19, 0xb605);
12152                 MP_WritePhyUshort(sc, 0x15, 0x00c3);
12153                 MP_WritePhyUshort(sc, 0x19, 0xc0d3);
12154                 MP_WritePhyUshort(sc, 0x15, 0x00c4);
12155                 MP_WritePhyUshort(sc, 0x19, 0x00e6);
12156                 MP_WritePhyUshort(sc, 0x15, 0x00c5);
12157                 MP_WritePhyUshort(sc, 0x19, 0xdaec);
12158                 MP_WritePhyUshort(sc, 0x15, 0x00c6);
12159                 MP_WritePhyUshort(sc, 0x19, 0x00fa);
12160                 MP_WritePhyUshort(sc, 0x15, 0x00c7);
12161                 MP_WritePhyUshort(sc, 0x19, 0x9df9);
12162                 MP_WritePhyUshort(sc, 0x15, 0x0112);
12163                 MP_WritePhyUshort(sc, 0x19, 0x6421);
12164                 MP_WritePhyUshort(sc, 0x15, 0x0113);
12165                 MP_WritePhyUshort(sc, 0x19, 0x7c08);
12166                 MP_WritePhyUshort(sc, 0x15, 0x0114);
12167                 MP_WritePhyUshort(sc, 0x19, 0x63f0);
12168                 MP_WritePhyUshort(sc, 0x15, 0x0115);
12169                 MP_WritePhyUshort(sc, 0x19, 0x4003);
12170                 MP_WritePhyUshort(sc, 0x15, 0x0116);
12171                 MP_WritePhyUshort(sc, 0x19, 0x4418);
12172                 MP_WritePhyUshort(sc, 0x15, 0x0117);
12173                 MP_WritePhyUshort(sc, 0x19, 0x9b00);
12174                 MP_WritePhyUshort(sc, 0x15, 0x0118);
12175                 MP_WritePhyUshort(sc, 0x19, 0x6461);
12176                 MP_WritePhyUshort(sc, 0x15, 0x0119);
12177                 MP_WritePhyUshort(sc, 0x19, 0x64e1);
12178                 MP_WritePhyUshort(sc, 0x15, 0x011a);
12179                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12180                 MP_WritePhyUshort(sc, 0x15, 0x0150);
12181                 MP_WritePhyUshort(sc, 0x19, 0x7c80);
12182                 MP_WritePhyUshort(sc, 0x15, 0x0151);
12183                 MP_WritePhyUshort(sc, 0x19, 0x6461);
12184                 MP_WritePhyUshort(sc, 0x15, 0x0152);
12185                 MP_WritePhyUshort(sc, 0x19, 0x4003);
12186                 MP_WritePhyUshort(sc, 0x15, 0x0153);
12187                 MP_WritePhyUshort(sc, 0x19, 0x4540);
12188                 MP_WritePhyUshort(sc, 0x15, 0x0154);
12189                 MP_WritePhyUshort(sc, 0x19, 0x9f00);
12190                 MP_WritePhyUshort(sc, 0x15, 0x0155);
12191                 MP_WritePhyUshort(sc, 0x19, 0x9d00);
12192                 MP_WritePhyUshort(sc, 0x15, 0x0156);
12193                 MP_WritePhyUshort(sc, 0x19, 0x7c40);
12194                 MP_WritePhyUshort(sc, 0x15, 0x0157);
12195                 MP_WritePhyUshort(sc, 0x19, 0x6421);
12196                 MP_WritePhyUshort(sc, 0x15, 0x0158);
12197                 MP_WritePhyUshort(sc, 0x19, 0x7c80);
12198                 MP_WritePhyUshort(sc, 0x15, 0x0159);
12199                 MP_WritePhyUshort(sc, 0x19, 0x64a1);
12200                 MP_WritePhyUshort(sc, 0x15, 0x015a);
12201                 MP_WritePhyUshort(sc, 0x19, 0x30fe);
12202                 MP_WritePhyUshort(sc, 0x15, 0x029c);
12203                 MP_WritePhyUshort(sc, 0x19, 0x0070);
12204                 MP_WritePhyUshort(sc, 0x15, 0x02b2);
12205                 MP_WritePhyUshort(sc, 0x19, 0x005a);
12206                 MP_WritePhyUshort(sc, 0x15, 0x02bd);
12207                 MP_WritePhyUshort(sc, 0x19, 0xa522);
12208                 MP_WritePhyUshort(sc, 0x15, 0x02ce);
12209                 MP_WritePhyUshort(sc, 0x19, 0xb63e);
12210                 MP_WritePhyUshort(sc, 0x15, 0x02d9);
12211                 MP_WritePhyUshort(sc, 0x19, 0x32df);
12212                 MP_WritePhyUshort(sc, 0x15, 0x02df);
12213                 MP_WritePhyUshort(sc, 0x19, 0x4500);
12214                 MP_WritePhyUshort(sc, 0x15, 0x02e7);
12215                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12216                 MP_WritePhyUshort(sc, 0x15, 0x02f4);
12217                 MP_WritePhyUshort(sc, 0x19, 0xb618);
12218                 MP_WritePhyUshort(sc, 0x15, 0x02fb);
12219                 MP_WritePhyUshort(sc, 0x19, 0xb900);
12220                 MP_WritePhyUshort(sc, 0x15, 0x02fc);
12221                 MP_WritePhyUshort(sc, 0x19, 0x49b5);
12222                 MP_WritePhyUshort(sc, 0x15, 0x02fd);
12223                 MP_WritePhyUshort(sc, 0x19, 0x6812);
12224                 MP_WritePhyUshort(sc, 0x15, 0x02fe);
12225                 MP_WritePhyUshort(sc, 0x19, 0x66a0);
12226                 MP_WritePhyUshort(sc, 0x15, 0x02ff);
12227                 MP_WritePhyUshort(sc, 0x19, 0x9900);
12228                 MP_WritePhyUshort(sc, 0x15, 0x0300);
12229                 MP_WritePhyUshort(sc, 0x19, 0x64a0);
12230                 MP_WritePhyUshort(sc, 0x15, 0x0301);
12231                 MP_WritePhyUshort(sc, 0x19, 0x3316);
12232                 MP_WritePhyUshort(sc, 0x15, 0x0308);
12233                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12234                 MP_WritePhyUshort(sc, 0x15, 0x030c);
12235                 MP_WritePhyUshort(sc, 0x19, 0x3000);
12236                 MP_WritePhyUshort(sc, 0x15, 0x0312);
12237                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12238                 MP_WritePhyUshort(sc, 0x15, 0x0313);
12239                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12240                 MP_WritePhyUshort(sc, 0x15, 0x0314);
12241                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12242                 MP_WritePhyUshort(sc, 0x15, 0x0315);
12243                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12244                 MP_WritePhyUshort(sc, 0x15, 0x0316);
12245                 MP_WritePhyUshort(sc, 0x19, 0x49b5);
12246                 MP_WritePhyUshort(sc, 0x15, 0x0317);
12247                 MP_WritePhyUshort(sc, 0x19, 0x7d00);
12248                 MP_WritePhyUshort(sc, 0x15, 0x0318);
12249                 MP_WritePhyUshort(sc, 0x19, 0x4d00);
12250                 MP_WritePhyUshort(sc, 0x15, 0x0319);
12251                 MP_WritePhyUshort(sc, 0x19, 0x6810);
12252                 MP_WritePhyUshort(sc, 0x15, 0x031a);
12253                 MP_WritePhyUshort(sc, 0x19, 0x6c08);
12254                 MP_WritePhyUshort(sc, 0x15, 0x031b);
12255                 MP_WritePhyUshort(sc, 0x19, 0x4925);
12256                 MP_WritePhyUshort(sc, 0x15, 0x031c);
12257                 MP_WritePhyUshort(sc, 0x19, 0x403b);
12258                 MP_WritePhyUshort(sc, 0x15, 0x031d);
12259                 MP_WritePhyUshort(sc, 0x19, 0xa602);
12260                 MP_WritePhyUshort(sc, 0x15, 0x031e);
12261                 MP_WritePhyUshort(sc, 0x19, 0x402f);
12262                 MP_WritePhyUshort(sc, 0x15, 0x031f);
12263                 MP_WritePhyUshort(sc, 0x19, 0x4484);
12264                 MP_WritePhyUshort(sc, 0x15, 0x0320);
12265                 MP_WritePhyUshort(sc, 0x19, 0x40c8);
12266                 MP_WritePhyUshort(sc, 0x15, 0x0321);
12267                 MP_WritePhyUshort(sc, 0x19, 0x44c4);
12268                 MP_WritePhyUshort(sc, 0x15, 0x0322);
12269                 MP_WritePhyUshort(sc, 0x19, 0x404f);
12270                 MP_WritePhyUshort(sc, 0x15, 0x0323);
12271                 MP_WritePhyUshort(sc, 0x19, 0x44c8);
12272                 MP_WritePhyUshort(sc, 0x15, 0x0324);
12273                 MP_WritePhyUshort(sc, 0x19, 0xd64f);
12274                 MP_WritePhyUshort(sc, 0x15, 0x0325);
12275                 MP_WritePhyUshort(sc, 0x19, 0x00e7);
12276                 MP_WritePhyUshort(sc, 0x15, 0x0326);
12277                 MP_WritePhyUshort(sc, 0x19, 0x7c08);
12278                 MP_WritePhyUshort(sc, 0x15, 0x0327);
12279                 MP_WritePhyUshort(sc, 0x19, 0x8203);
12280                 MP_WritePhyUshort(sc, 0x15, 0x0328);
12281                 MP_WritePhyUshort(sc, 0x19, 0x4d48);
12282                 MP_WritePhyUshort(sc, 0x15, 0x0329);
12283                 MP_WritePhyUshort(sc, 0x19, 0x332b);
12284                 MP_WritePhyUshort(sc, 0x15, 0x032a);
12285                 MP_WritePhyUshort(sc, 0x19, 0x4d40);
12286                 MP_WritePhyUshort(sc, 0x15, 0x032c);
12287                 MP_WritePhyUshort(sc, 0x19, 0x00f8);
12288                 MP_WritePhyUshort(sc, 0x15, 0x032d);
12289                 MP_WritePhyUshort(sc, 0x19, 0x82b2);
12290                 MP_WritePhyUshort(sc, 0x15, 0x032f);
12291                 MP_WritePhyUshort(sc, 0x19, 0x00b0);
12292                 MP_WritePhyUshort(sc, 0x15, 0x0332);
12293                 MP_WritePhyUshort(sc, 0x19, 0x91f2);
12294                 MP_WritePhyUshort(sc, 0x15, 0x033f);
12295                 MP_WritePhyUshort(sc, 0x19, 0xb6cd);
12296                 MP_WritePhyUshort(sc, 0x15, 0x0340);
12297                 MP_WritePhyUshort(sc, 0x19, 0x9e01);
12298                 MP_WritePhyUshort(sc, 0x15, 0x0341);
12299                 MP_WritePhyUshort(sc, 0x19, 0xd11d);
12300                 MP_WritePhyUshort(sc, 0x15, 0x0342);
12301                 MP_WritePhyUshort(sc, 0x19, 0x009d);
12302                 MP_WritePhyUshort(sc, 0x15, 0x0343);
12303                 MP_WritePhyUshort(sc, 0x19, 0xbb1c);
12304                 MP_WritePhyUshort(sc, 0x15, 0x0344);
12305                 MP_WritePhyUshort(sc, 0x19, 0x8102);
12306                 MP_WritePhyUshort(sc, 0x15, 0x0345);
12307                 MP_WritePhyUshort(sc, 0x19, 0x3348);
12308                 MP_WritePhyUshort(sc, 0x15, 0x0346);
12309                 MP_WritePhyUshort(sc, 0x19, 0xa231);
12310                 MP_WritePhyUshort(sc, 0x15, 0x0347);
12311                 MP_WritePhyUshort(sc, 0x19, 0x335b);
12312                 MP_WritePhyUshort(sc, 0x15, 0x0348);
12313                 MP_WritePhyUshort(sc, 0x19, 0x91f7);
12314                 MP_WritePhyUshort(sc, 0x15, 0x0349);
12315                 MP_WritePhyUshort(sc, 0x19, 0xc218);
12316                 MP_WritePhyUshort(sc, 0x15, 0x034a);
12317                 MP_WritePhyUshort(sc, 0x19, 0x00f5);
12318                 MP_WritePhyUshort(sc, 0x15, 0x034b);
12319                 MP_WritePhyUshort(sc, 0x19, 0x335b);
12320                 MP_WritePhyUshort(sc, 0x15, 0x034c);
12321                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12322                 MP_WritePhyUshort(sc, 0x15, 0x034d);
12323                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12324                 MP_WritePhyUshort(sc, 0x15, 0x034e);
12325                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12326                 MP_WritePhyUshort(sc, 0x15, 0x034f);
12327                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12328                 MP_WritePhyUshort(sc, 0x15, 0x0350);
12329                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12330                 MP_WritePhyUshort(sc, 0x15, 0x035b);
12331                 MP_WritePhyUshort(sc, 0x19, 0xa23c);
12332                 MP_WritePhyUshort(sc, 0x15, 0x035c);
12333                 MP_WritePhyUshort(sc, 0x19, 0x7c08);
12334                 MP_WritePhyUshort(sc, 0x15, 0x035d);
12335                 MP_WritePhyUshort(sc, 0x19, 0x4c00);
12336                 MP_WritePhyUshort(sc, 0x15, 0x035e);
12337                 MP_WritePhyUshort(sc, 0x19, 0x3397);
12338                 MP_WritePhyUshort(sc, 0x15, 0x0363);
12339                 MP_WritePhyUshort(sc, 0x19, 0xb6a9);
12340                 MP_WritePhyUshort(sc, 0x15, 0x0366);
12341                 MP_WritePhyUshort(sc, 0x19, 0x00f5);
12342                 MP_WritePhyUshort(sc, 0x15, 0x0382);
12343                 MP_WritePhyUshort(sc, 0x19, 0x7c40);
12344                 MP_WritePhyUshort(sc, 0x15, 0x0388);
12345                 MP_WritePhyUshort(sc, 0x19, 0x0084);
12346                 MP_WritePhyUshort(sc, 0x15, 0x0389);
12347                 MP_WritePhyUshort(sc, 0x19, 0xdd17);
12348                 MP_WritePhyUshort(sc, 0x15, 0x038a);
12349                 MP_WritePhyUshort(sc, 0x19, 0x000b);
12350                 MP_WritePhyUshort(sc, 0x15, 0x038b);
12351                 MP_WritePhyUshort(sc, 0x19, 0xa10a);
12352                 MP_WritePhyUshort(sc, 0x15, 0x038c);
12353                 MP_WritePhyUshort(sc, 0x19, 0x337e);
12354                 MP_WritePhyUshort(sc, 0x15, 0x038d);
12355                 MP_WritePhyUshort(sc, 0x19, 0x6c0b);
12356                 MP_WritePhyUshort(sc, 0x15, 0x038e);
12357                 MP_WritePhyUshort(sc, 0x19, 0xa107);
12358                 MP_WritePhyUshort(sc, 0x15, 0x038f);
12359                 MP_WritePhyUshort(sc, 0x19, 0x6c08);
12360                 MP_WritePhyUshort(sc, 0x15, 0x0390);
12361                 MP_WritePhyUshort(sc, 0x19, 0xc017);
12362                 MP_WritePhyUshort(sc, 0x15, 0x0391);
12363                 MP_WritePhyUshort(sc, 0x19, 0x0004);
12364                 MP_WritePhyUshort(sc, 0x15, 0x0392);
12365                 MP_WritePhyUshort(sc, 0x19, 0xd64f);
12366                 MP_WritePhyUshort(sc, 0x15, 0x0393);
12367                 MP_WritePhyUshort(sc, 0x19, 0x00f4);
12368                 MP_WritePhyUshort(sc, 0x15, 0x0397);
12369                 MP_WritePhyUshort(sc, 0x19, 0x4098);
12370                 MP_WritePhyUshort(sc, 0x15, 0x0398);
12371                 MP_WritePhyUshort(sc, 0x19, 0x4408);
12372                 MP_WritePhyUshort(sc, 0x15, 0x0399);
12373                 MP_WritePhyUshort(sc, 0x19, 0x55bf);
12374                 MP_WritePhyUshort(sc, 0x15, 0x039a);
12375                 MP_WritePhyUshort(sc, 0x19, 0x4bb9);
12376                 MP_WritePhyUshort(sc, 0x15, 0x039b);
12377                 MP_WritePhyUshort(sc, 0x19, 0x6810);
12378                 MP_WritePhyUshort(sc, 0x15, 0x039c);
12379                 MP_WritePhyUshort(sc, 0x19, 0x4b29);
12380                 MP_WritePhyUshort(sc, 0x15, 0x039d);
12381                 MP_WritePhyUshort(sc, 0x19, 0x4041);
12382                 MP_WritePhyUshort(sc, 0x15, 0x039e);
12383                 MP_WritePhyUshort(sc, 0x19, 0x442a);
12384                 MP_WritePhyUshort(sc, 0x15, 0x039f);
12385                 MP_WritePhyUshort(sc, 0x19, 0x4029);
12386                 MP_WritePhyUshort(sc, 0x15, 0x03aa);
12387                 MP_WritePhyUshort(sc, 0x19, 0x33b8);
12388                 MP_WritePhyUshort(sc, 0x15, 0x03b6);
12389                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12390                 MP_WritePhyUshort(sc, 0x15, 0x03b7);
12391                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12392                 MP_WritePhyUshort(sc, 0x15, 0x03b8);
12393                 MP_WritePhyUshort(sc, 0x19, 0x543f);
12394                 MP_WritePhyUshort(sc, 0x15, 0x03b9);
12395                 MP_WritePhyUshort(sc, 0x19, 0x499a);
12396                 MP_WritePhyUshort(sc, 0x15, 0x03ba);
12397                 MP_WritePhyUshort(sc, 0x19, 0x7c40);
12398                 MP_WritePhyUshort(sc, 0x15, 0x03bb);
12399                 MP_WritePhyUshort(sc, 0x19, 0x4c40);
12400                 MP_WritePhyUshort(sc, 0x15, 0x03bc);
12401                 MP_WritePhyUshort(sc, 0x19, 0x490a);
12402                 MP_WritePhyUshort(sc, 0x15, 0x03bd);
12403                 MP_WritePhyUshort(sc, 0x19, 0x405e);
12404                 MP_WritePhyUshort(sc, 0x15, 0x03c2);
12405                 MP_WritePhyUshort(sc, 0x19, 0x9a03);
12406                 MP_WritePhyUshort(sc, 0x15, 0x03c4);
12407                 MP_WritePhyUshort(sc, 0x19, 0x0015);
12408                 MP_WritePhyUshort(sc, 0x15, 0x03c5);
12409                 MP_WritePhyUshort(sc, 0x19, 0x9e03);
12410                 MP_WritePhyUshort(sc, 0x15, 0x03c8);
12411                 MP_WritePhyUshort(sc, 0x19, 0x9cf7);
12412                 MP_WritePhyUshort(sc, 0x15, 0x03c9);
12413                 MP_WritePhyUshort(sc, 0x19, 0x7c12);
12414                 MP_WritePhyUshort(sc, 0x15, 0x03ca);
12415                 MP_WritePhyUshort(sc, 0x19, 0x4c52);
12416                 MP_WritePhyUshort(sc, 0x15, 0x03cb);
12417                 MP_WritePhyUshort(sc, 0x19, 0x4458);
12418                 MP_WritePhyUshort(sc, 0x15, 0x03cd);
12419                 MP_WritePhyUshort(sc, 0x19, 0x4c40);
12420                 MP_WritePhyUshort(sc, 0x15, 0x03ce);
12421                 MP_WritePhyUshort(sc, 0x19, 0x33bf);
12422                 MP_WritePhyUshort(sc, 0x15, 0x03cf);
12423                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12424                 MP_WritePhyUshort(sc, 0x15, 0x03d0);
12425                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12426                 MP_WritePhyUshort(sc, 0x15, 0x03d1);
12427                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12428                 MP_WritePhyUshort(sc, 0x15, 0x03d5);
12429                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12430                 MP_WritePhyUshort(sc, 0x15, 0x03d6);
12431                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12432                 MP_WritePhyUshort(sc, 0x15, 0x03d7);
12433                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12434                 MP_WritePhyUshort(sc, 0x15, 0x03d8);
12435                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12436                 MP_WritePhyUshort(sc, 0x15, 0x03d9);
12437                 MP_WritePhyUshort(sc, 0x19, 0x49bb);
12438                 MP_WritePhyUshort(sc, 0x15, 0x03da);
12439                 MP_WritePhyUshort(sc, 0x19, 0x4478);
12440                 MP_WritePhyUshort(sc, 0x15, 0x03db);
12441                 MP_WritePhyUshort(sc, 0x19, 0x492b);
12442                 MP_WritePhyUshort(sc, 0x15, 0x03dc);
12443                 MP_WritePhyUshort(sc, 0x19, 0x7c01);
12444                 MP_WritePhyUshort(sc, 0x15, 0x03dd);
12445                 MP_WritePhyUshort(sc, 0x19, 0x4c00);
12446                 MP_WritePhyUshort(sc, 0x15, 0x03de);
12447                 MP_WritePhyUshort(sc, 0x19, 0xbd1a);
12448                 MP_WritePhyUshort(sc, 0x15, 0x03df);
12449                 MP_WritePhyUshort(sc, 0x19, 0xc428);
12450                 MP_WritePhyUshort(sc, 0x15, 0x03e0);
12451                 MP_WritePhyUshort(sc, 0x19, 0x0008);
12452                 MP_WritePhyUshort(sc, 0x15, 0x03e1);
12453                 MP_WritePhyUshort(sc, 0x19, 0x9cfd);
12454                 MP_WritePhyUshort(sc, 0x15, 0x03e2);
12455                 MP_WritePhyUshort(sc, 0x19, 0x7c12);
12456                 MP_WritePhyUshort(sc, 0x15, 0x03e3);
12457                 MP_WritePhyUshort(sc, 0x19, 0x4c52);
12458                 MP_WritePhyUshort(sc, 0x15, 0x03e4);
12459                 MP_WritePhyUshort(sc, 0x19, 0x4458);
12460                 MP_WritePhyUshort(sc, 0x15, 0x03e5);
12461                 MP_WritePhyUshort(sc, 0x19, 0x7c12);
12462                 MP_WritePhyUshort(sc, 0x15, 0x03e6);
12463                 MP_WritePhyUshort(sc, 0x19, 0x4c40);
12464                 MP_WritePhyUshort(sc, 0x15, 0x03e7);
12465                 MP_WritePhyUshort(sc, 0x19, 0x33de);
12466                 MP_WritePhyUshort(sc, 0x15, 0x03e8);
12467                 MP_WritePhyUshort(sc, 0x19, 0xc218);
12468                 MP_WritePhyUshort(sc, 0x15, 0x03e9);
12469                 MP_WritePhyUshort(sc, 0x19, 0x0002);
12470                 MP_WritePhyUshort(sc, 0x15, 0x03ea);
12471                 MP_WritePhyUshort(sc, 0x19, 0x32df);
12472                 MP_WritePhyUshort(sc, 0x15, 0x03eb);
12473                 MP_WritePhyUshort(sc, 0x19, 0x3316);
12474                 MP_WritePhyUshort(sc, 0x15, 0x03ec);
12475                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12476                 MP_WritePhyUshort(sc, 0x15, 0x03ed);
12477                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12478                 MP_WritePhyUshort(sc, 0x15, 0x03ee);
12479                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12480                 MP_WritePhyUshort(sc, 0x15, 0x03ef);
12481                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12482                 MP_WritePhyUshort(sc, 0x15, 0x03f7);
12483                 MP_WritePhyUshort(sc, 0x19, 0x330c);
12484                 MP_WritePhyUshort(sc, 0x16, 0x0306);
12485                 MP_WritePhyUshort(sc, 0x16, 0x0300);
12486                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
12487                 MP_WritePhyUshort(sc, 0x05, 0xfff6);
12488                 MP_WritePhyUshort(sc, 0x06, 0x0080);
12489                 MP_WritePhyUshort(sc, 0x05, 0x8000);
12490                 MP_WritePhyUshort(sc, 0x06, 0x0280);
12491                 MP_WritePhyUshort(sc, 0x06, 0x48f7);
12492                 MP_WritePhyUshort(sc, 0x06, 0x00e0);
12493                 MP_WritePhyUshort(sc, 0x06, 0xfff7);
12494                 MP_WritePhyUshort(sc, 0x06, 0xa080);
12495                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
12496                 MP_WritePhyUshort(sc, 0x06, 0xf602);
12497                 MP_WritePhyUshort(sc, 0x06, 0x0200);
12498                 MP_WritePhyUshort(sc, 0x06, 0x0280);
12499                 MP_WritePhyUshort(sc, 0x06, 0x9002);
12500                 MP_WritePhyUshort(sc, 0x06, 0x0224);
12501                 MP_WritePhyUshort(sc, 0x06, 0x0202);
12502                 MP_WritePhyUshort(sc, 0x06, 0x3402);
12503                 MP_WritePhyUshort(sc, 0x06, 0x027f);
12504                 MP_WritePhyUshort(sc, 0x06, 0x0280);
12505                 MP_WritePhyUshort(sc, 0x06, 0xa602);
12506                 MP_WritePhyUshort(sc, 0x06, 0x80bf);
12507                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
12508                 MP_WritePhyUshort(sc, 0x06, 0x88e1);
12509                 MP_WritePhyUshort(sc, 0x06, 0x8b89);
12510                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
12511                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
12512                 MP_WritePhyUshort(sc, 0x06, 0x8a1e);
12513                 MP_WritePhyUshort(sc, 0x06, 0x01e1);
12514                 MP_WritePhyUshort(sc, 0x06, 0x8b8b);
12515                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
12516                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
12517                 MP_WritePhyUshort(sc, 0x06, 0x8c1e);
12518                 MP_WritePhyUshort(sc, 0x06, 0x01e1);
12519                 MP_WritePhyUshort(sc, 0x06, 0x8b8d);
12520                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
12521                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
12522                 MP_WritePhyUshort(sc, 0x06, 0x8e1e);
12523                 MP_WritePhyUshort(sc, 0x06, 0x01a0);
12524                 MP_WritePhyUshort(sc, 0x06, 0x00c7);
12525                 MP_WritePhyUshort(sc, 0x06, 0xaebb);
12526                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
12527                 MP_WritePhyUshort(sc, 0x06, 0xe600);
12528                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
12529                 MP_WritePhyUshort(sc, 0x06, 0xee03);
12530                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
12531                 MP_WritePhyUshort(sc, 0x06, 0xefb8);
12532                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
12533                 MP_WritePhyUshort(sc, 0x06, 0xe902);
12534                 MP_WritePhyUshort(sc, 0x06, 0xee8b);
12535                 MP_WritePhyUshort(sc, 0x06, 0x8285);
12536                 MP_WritePhyUshort(sc, 0x06, 0xee8b);
12537                 MP_WritePhyUshort(sc, 0x06, 0x8520);
12538                 MP_WritePhyUshort(sc, 0x06, 0xee8b);
12539                 MP_WritePhyUshort(sc, 0x06, 0x8701);
12540                 MP_WritePhyUshort(sc, 0x06, 0xd481);
12541                 MP_WritePhyUshort(sc, 0x06, 0x35e4);
12542                 MP_WritePhyUshort(sc, 0x06, 0x8b94);
12543                 MP_WritePhyUshort(sc, 0x06, 0xe58b);
12544                 MP_WritePhyUshort(sc, 0x06, 0x95bf);
12545                 MP_WritePhyUshort(sc, 0x06, 0x8b88);
12546                 MP_WritePhyUshort(sc, 0x06, 0xec00);
12547                 MP_WritePhyUshort(sc, 0x06, 0x19a9);
12548                 MP_WritePhyUshort(sc, 0x06, 0x8b90);
12549                 MP_WritePhyUshort(sc, 0x06, 0xf9ee);
12550                 MP_WritePhyUshort(sc, 0x06, 0xfff6);
12551                 MP_WritePhyUshort(sc, 0x06, 0x00ee);
12552                 MP_WritePhyUshort(sc, 0x06, 0xfff7);
12553                 MP_WritePhyUshort(sc, 0x06, 0xffe0);
12554                 MP_WritePhyUshort(sc, 0x06, 0xe140);
12555                 MP_WritePhyUshort(sc, 0x06, 0xe1e1);
12556                 MP_WritePhyUshort(sc, 0x06, 0x41f7);
12557                 MP_WritePhyUshort(sc, 0x06, 0x2ff6);
12558                 MP_WritePhyUshort(sc, 0x06, 0x28e4);
12559                 MP_WritePhyUshort(sc, 0x06, 0xe140);
12560                 MP_WritePhyUshort(sc, 0x06, 0xe5e1);
12561                 MP_WritePhyUshort(sc, 0x06, 0x4104);
12562                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
12563                 MP_WritePhyUshort(sc, 0x06, 0x8b89);
12564                 MP_WritePhyUshort(sc, 0x06, 0xad20);
12565                 MP_WritePhyUshort(sc, 0x06, 0x0dee);
12566                 MP_WritePhyUshort(sc, 0x06, 0x8b89);
12567                 MP_WritePhyUshort(sc, 0x06, 0x0002);
12568                 MP_WritePhyUshort(sc, 0x06, 0x82f4);
12569                 MP_WritePhyUshort(sc, 0x06, 0x021f);
12570                 MP_WritePhyUshort(sc, 0x06, 0x4102);
12571                 MP_WritePhyUshort(sc, 0x06, 0x2812);
12572                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
12573                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
12574                 MP_WritePhyUshort(sc, 0x06, 0x8b8d);
12575                 MP_WritePhyUshort(sc, 0x06, 0xad20);
12576                 MP_WritePhyUshort(sc, 0x06, 0x10ee);
12577                 MP_WritePhyUshort(sc, 0x06, 0x8b8d);
12578                 MP_WritePhyUshort(sc, 0x06, 0x0002);
12579                 MP_WritePhyUshort(sc, 0x06, 0x139d);
12580                 MP_WritePhyUshort(sc, 0x06, 0x0281);
12581                 MP_WritePhyUshort(sc, 0x06, 0xd602);
12582                 MP_WritePhyUshort(sc, 0x06, 0x1f99);
12583                 MP_WritePhyUshort(sc, 0x06, 0x0227);
12584                 MP_WritePhyUshort(sc, 0x06, 0xeafc);
12585                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
12586                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
12587                 MP_WritePhyUshort(sc, 0x06, 0x8ead);
12588                 MP_WritePhyUshort(sc, 0x06, 0x2014);
12589                 MP_WritePhyUshort(sc, 0x06, 0xf620);
12590                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
12591                 MP_WritePhyUshort(sc, 0x06, 0x8e02);
12592                 MP_WritePhyUshort(sc, 0x06, 0x8104);
12593                 MP_WritePhyUshort(sc, 0x06, 0x021b);
12594                 MP_WritePhyUshort(sc, 0x06, 0xf402);
12595                 MP_WritePhyUshort(sc, 0x06, 0x2c9c);
12596                 MP_WritePhyUshort(sc, 0x06, 0x0281);
12597                 MP_WritePhyUshort(sc, 0x06, 0x7902);
12598                 MP_WritePhyUshort(sc, 0x06, 0x8443);
12599                 MP_WritePhyUshort(sc, 0x06, 0xad22);
12600                 MP_WritePhyUshort(sc, 0x06, 0x11f6);
12601                 MP_WritePhyUshort(sc, 0x06, 0x22e4);
12602                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
12603                 MP_WritePhyUshort(sc, 0x06, 0x022c);
12604                 MP_WritePhyUshort(sc, 0x06, 0x4602);
12605                 MP_WritePhyUshort(sc, 0x06, 0x2ac5);
12606                 MP_WritePhyUshort(sc, 0x06, 0x0229);
12607                 MP_WritePhyUshort(sc, 0x06, 0x2002);
12608                 MP_WritePhyUshort(sc, 0x06, 0x2b91);
12609                 MP_WritePhyUshort(sc, 0x06, 0xad25);
12610                 MP_WritePhyUshort(sc, 0x06, 0x11f6);
12611                 MP_WritePhyUshort(sc, 0x06, 0x25e4);
12612                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
12613                 MP_WritePhyUshort(sc, 0x06, 0x0284);
12614                 MP_WritePhyUshort(sc, 0x06, 0xe202);
12615                 MP_WritePhyUshort(sc, 0x06, 0x043a);
12616                 MP_WritePhyUshort(sc, 0x06, 0x021a);
12617                 MP_WritePhyUshort(sc, 0x06, 0x5902);
12618                 MP_WritePhyUshort(sc, 0x06, 0x2bfc);
12619                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
12620                 MP_WritePhyUshort(sc, 0x06, 0xf8fa);
12621                 MP_WritePhyUshort(sc, 0x06, 0xef69);
12622                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
12623                 MP_WritePhyUshort(sc, 0x06, 0x00e1);
12624                 MP_WritePhyUshort(sc, 0x06, 0xe001);
12625                 MP_WritePhyUshort(sc, 0x06, 0xad27);
12626                 MP_WritePhyUshort(sc, 0x06, 0x1fd1);
12627                 MP_WritePhyUshort(sc, 0x06, 0x01bf);
12628                 MP_WritePhyUshort(sc, 0x06, 0x8638);
12629                 MP_WritePhyUshort(sc, 0x06, 0x022f);
12630                 MP_WritePhyUshort(sc, 0x06, 0x50e0);
12631                 MP_WritePhyUshort(sc, 0x06, 0xe020);
12632                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
12633                 MP_WritePhyUshort(sc, 0x06, 0x21ad);
12634                 MP_WritePhyUshort(sc, 0x06, 0x200e);
12635                 MP_WritePhyUshort(sc, 0x06, 0xd100);
12636                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
12637                 MP_WritePhyUshort(sc, 0x06, 0x3802);
12638                 MP_WritePhyUshort(sc, 0x06, 0x2f50);
12639                 MP_WritePhyUshort(sc, 0x06, 0xbf3d);
12640                 MP_WritePhyUshort(sc, 0x06, 0x3902);
12641                 MP_WritePhyUshort(sc, 0x06, 0x2eb0);
12642                 MP_WritePhyUshort(sc, 0x06, 0xef96);
12643                 MP_WritePhyUshort(sc, 0x06, 0xfefc);
12644                 MP_WritePhyUshort(sc, 0x06, 0x0402);
12645                 MP_WritePhyUshort(sc, 0x06, 0x8591);
12646                 MP_WritePhyUshort(sc, 0x06, 0x0281);
12647                 MP_WritePhyUshort(sc, 0x06, 0x3c05);
12648                 MP_WritePhyUshort(sc, 0x06, 0xf8fa);
12649                 MP_WritePhyUshort(sc, 0x06, 0xef69);
12650                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
12651                 MP_WritePhyUshort(sc, 0x06, 0xfee1);
12652                 MP_WritePhyUshort(sc, 0x06, 0xe2ff);
12653                 MP_WritePhyUshort(sc, 0x06, 0xad2d);
12654                 MP_WritePhyUshort(sc, 0x06, 0x1ae0);
12655                 MP_WritePhyUshort(sc, 0x06, 0xe14e);
12656                 MP_WritePhyUshort(sc, 0x06, 0xe1e1);
12657                 MP_WritePhyUshort(sc, 0x06, 0x4fac);
12658                 MP_WritePhyUshort(sc, 0x06, 0x2d22);
12659                 MP_WritePhyUshort(sc, 0x06, 0xf603);
12660                 MP_WritePhyUshort(sc, 0x06, 0x0203);
12661                 MP_WritePhyUshort(sc, 0x06, 0x36f7);
12662                 MP_WritePhyUshort(sc, 0x06, 0x03f7);
12663                 MP_WritePhyUshort(sc, 0x06, 0x06bf);
12664                 MP_WritePhyUshort(sc, 0x06, 0x8622);
12665                 MP_WritePhyUshort(sc, 0x06, 0x022e);
12666                 MP_WritePhyUshort(sc, 0x06, 0xb0ae);
12667                 MP_WritePhyUshort(sc, 0x06, 0x11e0);
12668                 MP_WritePhyUshort(sc, 0x06, 0xe14e);
12669                 MP_WritePhyUshort(sc, 0x06, 0xe1e1);
12670                 MP_WritePhyUshort(sc, 0x06, 0x4fad);
12671                 MP_WritePhyUshort(sc, 0x06, 0x2d08);
12672                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
12673                 MP_WritePhyUshort(sc, 0x06, 0x2d02);
12674                 MP_WritePhyUshort(sc, 0x06, 0x2eb0);
12675                 MP_WritePhyUshort(sc, 0x06, 0xf606);
12676                 MP_WritePhyUshort(sc, 0x06, 0xef96);
12677                 MP_WritePhyUshort(sc, 0x06, 0xfefc);
12678                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
12679                 MP_WritePhyUshort(sc, 0x06, 0xf9fa);
12680                 MP_WritePhyUshort(sc, 0x06, 0xef69);
12681                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
12682                 MP_WritePhyUshort(sc, 0x06, 0x87ad);
12683                 MP_WritePhyUshort(sc, 0x06, 0x204c);
12684                 MP_WritePhyUshort(sc, 0x06, 0xd200);
12685                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
12686                 MP_WritePhyUshort(sc, 0x06, 0x0058);
12687                 MP_WritePhyUshort(sc, 0x06, 0x010c);
12688                 MP_WritePhyUshort(sc, 0x06, 0x021e);
12689                 MP_WritePhyUshort(sc, 0x06, 0x20e0);
12690                 MP_WritePhyUshort(sc, 0x06, 0xe000);
12691                 MP_WritePhyUshort(sc, 0x06, 0x5810);
12692                 MP_WritePhyUshort(sc, 0x06, 0x1e20);
12693                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
12694                 MP_WritePhyUshort(sc, 0x06, 0x3658);
12695                 MP_WritePhyUshort(sc, 0x06, 0x031e);
12696                 MP_WritePhyUshort(sc, 0x06, 0x20e0);
12697                 MP_WritePhyUshort(sc, 0x06, 0xe022);
12698                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
12699                 MP_WritePhyUshort(sc, 0x06, 0x2358);
12700                 MP_WritePhyUshort(sc, 0x06, 0xe01e);
12701                 MP_WritePhyUshort(sc, 0x06, 0x20e0);
12702                 MP_WritePhyUshort(sc, 0x06, 0x8ae6);
12703                 MP_WritePhyUshort(sc, 0x06, 0x1f02);
12704                 MP_WritePhyUshort(sc, 0x06, 0x9e22);
12705                 MP_WritePhyUshort(sc, 0x06, 0xe68a);
12706                 MP_WritePhyUshort(sc, 0x06, 0xe6ad);
12707                 MP_WritePhyUshort(sc, 0x06, 0x3214);
12708                 MP_WritePhyUshort(sc, 0x06, 0xad34);
12709                 MP_WritePhyUshort(sc, 0x06, 0x11ef);
12710                 MP_WritePhyUshort(sc, 0x06, 0x0258);
12711                 MP_WritePhyUshort(sc, 0x06, 0x039e);
12712                 MP_WritePhyUshort(sc, 0x06, 0x07ad);
12713                 MP_WritePhyUshort(sc, 0x06, 0x3508);
12714                 MP_WritePhyUshort(sc, 0x06, 0x5ac0);
12715                 MP_WritePhyUshort(sc, 0x06, 0x9f04);
12716                 MP_WritePhyUshort(sc, 0x06, 0xd101);
12717                 MP_WritePhyUshort(sc, 0x06, 0xae02);
12718                 MP_WritePhyUshort(sc, 0x06, 0xd100);
12719                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
12720                 MP_WritePhyUshort(sc, 0x06, 0x3e02);
12721                 MP_WritePhyUshort(sc, 0x06, 0x2f50);
12722                 MP_WritePhyUshort(sc, 0x06, 0xef96);
12723                 MP_WritePhyUshort(sc, 0x06, 0xfefd);
12724                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
12725                 MP_WritePhyUshort(sc, 0x06, 0xf8f9);
12726                 MP_WritePhyUshort(sc, 0x06, 0xfae0);
12727                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
12728                 MP_WritePhyUshort(sc, 0x06, 0xac26);
12729                 MP_WritePhyUshort(sc, 0x06, 0x0ee0);
12730                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
12731                 MP_WritePhyUshort(sc, 0x06, 0xac21);
12732                 MP_WritePhyUshort(sc, 0x06, 0x08e0);
12733                 MP_WritePhyUshort(sc, 0x06, 0x8b87);
12734                 MP_WritePhyUshort(sc, 0x06, 0xac24);
12735                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
12736                 MP_WritePhyUshort(sc, 0x06, 0x6bee);
12737                 MP_WritePhyUshort(sc, 0x06, 0xe0ea);
12738                 MP_WritePhyUshort(sc, 0x06, 0x00ee);
12739                 MP_WritePhyUshort(sc, 0x06, 0xe0eb);
12740                 MP_WritePhyUshort(sc, 0x06, 0x00e2);
12741                 MP_WritePhyUshort(sc, 0x06, 0xe07c);
12742                 MP_WritePhyUshort(sc, 0x06, 0xe3e0);
12743                 MP_WritePhyUshort(sc, 0x06, 0x7da5);
12744                 MP_WritePhyUshort(sc, 0x06, 0x1111);
12745                 MP_WritePhyUshort(sc, 0x06, 0x15d2);
12746                 MP_WritePhyUshort(sc, 0x06, 0x60d6);
12747                 MP_WritePhyUshort(sc, 0x06, 0x6666);
12748                 MP_WritePhyUshort(sc, 0x06, 0x0207);
12749                 MP_WritePhyUshort(sc, 0x06, 0xf9d2);
12750                 MP_WritePhyUshort(sc, 0x06, 0xa0d6);
12751                 MP_WritePhyUshort(sc, 0x06, 0xaaaa);
12752                 MP_WritePhyUshort(sc, 0x06, 0x0207);
12753                 MP_WritePhyUshort(sc, 0x06, 0xf902);
12754                 MP_WritePhyUshort(sc, 0x06, 0x825c);
12755                 MP_WritePhyUshort(sc, 0x06, 0xae44);
12756                 MP_WritePhyUshort(sc, 0x06, 0xa566);
12757                 MP_WritePhyUshort(sc, 0x06, 0x6602);
12758                 MP_WritePhyUshort(sc, 0x06, 0xae38);
12759                 MP_WritePhyUshort(sc, 0x06, 0xa5aa);
12760                 MP_WritePhyUshort(sc, 0x06, 0xaa02);
12761                 MP_WritePhyUshort(sc, 0x06, 0xae32);
12762                 MP_WritePhyUshort(sc, 0x06, 0xeee0);
12763                 MP_WritePhyUshort(sc, 0x06, 0xea04);
12764                 MP_WritePhyUshort(sc, 0x06, 0xeee0);
12765                 MP_WritePhyUshort(sc, 0x06, 0xeb06);
12766                 MP_WritePhyUshort(sc, 0x06, 0xe2e0);
12767                 MP_WritePhyUshort(sc, 0x06, 0x7ce3);
12768                 MP_WritePhyUshort(sc, 0x06, 0xe07d);
12769                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
12770                 MP_WritePhyUshort(sc, 0x06, 0x38e1);
12771                 MP_WritePhyUshort(sc, 0x06, 0xe039);
12772                 MP_WritePhyUshort(sc, 0x06, 0xad2e);
12773                 MP_WritePhyUshort(sc, 0x06, 0x21ad);
12774                 MP_WritePhyUshort(sc, 0x06, 0x3f13);
12775                 MP_WritePhyUshort(sc, 0x06, 0xe0e4);
12776                 MP_WritePhyUshort(sc, 0x06, 0x14e1);
12777                 MP_WritePhyUshort(sc, 0x06, 0xe415);
12778                 MP_WritePhyUshort(sc, 0x06, 0x6880);
12779                 MP_WritePhyUshort(sc, 0x06, 0xe4e4);
12780                 MP_WritePhyUshort(sc, 0x06, 0x14e5);
12781                 MP_WritePhyUshort(sc, 0x06, 0xe415);
12782                 MP_WritePhyUshort(sc, 0x06, 0x0282);
12783                 MP_WritePhyUshort(sc, 0x06, 0x5cae);
12784                 MP_WritePhyUshort(sc, 0x06, 0x0bac);
12785                 MP_WritePhyUshort(sc, 0x06, 0x3e02);
12786                 MP_WritePhyUshort(sc, 0x06, 0xae06);
12787                 MP_WritePhyUshort(sc, 0x06, 0x0282);
12788                 MP_WritePhyUshort(sc, 0x06, 0x8602);
12789                 MP_WritePhyUshort(sc, 0x06, 0x82b0);
12790                 MP_WritePhyUshort(sc, 0x06, 0xfefd);
12791                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
12792                 MP_WritePhyUshort(sc, 0x06, 0xf8e1);
12793                 MP_WritePhyUshort(sc, 0x06, 0x8b2e);
12794                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
12795                 MP_WritePhyUshort(sc, 0x06, 0x81ad);
12796                 MP_WritePhyUshort(sc, 0x06, 0x2605);
12797                 MP_WritePhyUshort(sc, 0x06, 0x0221);
12798                 MP_WritePhyUshort(sc, 0x06, 0xf3f7);
12799                 MP_WritePhyUshort(sc, 0x06, 0x28e0);
12800                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
12801                 MP_WritePhyUshort(sc, 0x06, 0xad21);
12802                 MP_WritePhyUshort(sc, 0x06, 0x0502);
12803                 MP_WritePhyUshort(sc, 0x06, 0x22f8);
12804                 MP_WritePhyUshort(sc, 0x06, 0xf729);
12805                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
12806                 MP_WritePhyUshort(sc, 0x06, 0x87ad);
12807                 MP_WritePhyUshort(sc, 0x06, 0x2405);
12808                 MP_WritePhyUshort(sc, 0x06, 0x0282);
12809                 MP_WritePhyUshort(sc, 0x06, 0xebf7);
12810                 MP_WritePhyUshort(sc, 0x06, 0x2ae5);
12811                 MP_WritePhyUshort(sc, 0x06, 0x8b2e);
12812                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
12813                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
12814                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
12815                 MP_WritePhyUshort(sc, 0x06, 0xad26);
12816                 MP_WritePhyUshort(sc, 0x06, 0x0302);
12817                 MP_WritePhyUshort(sc, 0x06, 0x2134);
12818                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
12819                 MP_WritePhyUshort(sc, 0x06, 0x81ad);
12820                 MP_WritePhyUshort(sc, 0x06, 0x2109);
12821                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
12822                 MP_WritePhyUshort(sc, 0x06, 0x2eac);
12823                 MP_WritePhyUshort(sc, 0x06, 0x2003);
12824                 MP_WritePhyUshort(sc, 0x06, 0x0283);
12825                 MP_WritePhyUshort(sc, 0x06, 0x52e0);
12826                 MP_WritePhyUshort(sc, 0x06, 0x8b87);
12827                 MP_WritePhyUshort(sc, 0x06, 0xad24);
12828                 MP_WritePhyUshort(sc, 0x06, 0x09e0);
12829                 MP_WritePhyUshort(sc, 0x06, 0x8b2e);
12830                 MP_WritePhyUshort(sc, 0x06, 0xac21);
12831                 MP_WritePhyUshort(sc, 0x06, 0x0302);
12832                 MP_WritePhyUshort(sc, 0x06, 0x8337);
12833                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
12834                 MP_WritePhyUshort(sc, 0x06, 0xf8e1);
12835                 MP_WritePhyUshort(sc, 0x06, 0x8b2e);
12836                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
12837                 MP_WritePhyUshort(sc, 0x06, 0x81ad);
12838                 MP_WritePhyUshort(sc, 0x06, 0x2608);
12839                 MP_WritePhyUshort(sc, 0x06, 0xe085);
12840                 MP_WritePhyUshort(sc, 0x06, 0xd2ad);
12841                 MP_WritePhyUshort(sc, 0x06, 0x2502);
12842                 MP_WritePhyUshort(sc, 0x06, 0xf628);
12843                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
12844                 MP_WritePhyUshort(sc, 0x06, 0x81ad);
12845                 MP_WritePhyUshort(sc, 0x06, 0x210a);
12846                 MP_WritePhyUshort(sc, 0x06, 0xe086);
12847                 MP_WritePhyUshort(sc, 0x06, 0x0af6);
12848                 MP_WritePhyUshort(sc, 0x06, 0x27a0);
12849                 MP_WritePhyUshort(sc, 0x06, 0x0502);
12850                 MP_WritePhyUshort(sc, 0x06, 0xf629);
12851                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
12852                 MP_WritePhyUshort(sc, 0x06, 0x87ad);
12853                 MP_WritePhyUshort(sc, 0x06, 0x2408);
12854                 MP_WritePhyUshort(sc, 0x06, 0xe08a);
12855                 MP_WritePhyUshort(sc, 0x06, 0xedad);
12856                 MP_WritePhyUshort(sc, 0x06, 0x2002);
12857                 MP_WritePhyUshort(sc, 0x06, 0xf62a);
12858                 MP_WritePhyUshort(sc, 0x06, 0xe58b);
12859                 MP_WritePhyUshort(sc, 0x06, 0x2ea1);
12860                 MP_WritePhyUshort(sc, 0x06, 0x0003);
12861                 MP_WritePhyUshort(sc, 0x06, 0x0221);
12862                 MP_WritePhyUshort(sc, 0x06, 0x11fc);
12863                 MP_WritePhyUshort(sc, 0x06, 0x04ee);
12864                 MP_WritePhyUshort(sc, 0x06, 0x8aed);
12865                 MP_WritePhyUshort(sc, 0x06, 0x00ee);
12866                 MP_WritePhyUshort(sc, 0x06, 0x8aec);
12867                 MP_WritePhyUshort(sc, 0x06, 0x0004);
12868                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
12869                 MP_WritePhyUshort(sc, 0x06, 0x8b87);
12870                 MP_WritePhyUshort(sc, 0x06, 0xad24);
12871                 MP_WritePhyUshort(sc, 0x06, 0x3ae0);
12872                 MP_WritePhyUshort(sc, 0x06, 0xe0ea);
12873                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
12874                 MP_WritePhyUshort(sc, 0x06, 0xeb58);
12875                 MP_WritePhyUshort(sc, 0x06, 0xf8d1);
12876                 MP_WritePhyUshort(sc, 0x06, 0x01e4);
12877                 MP_WritePhyUshort(sc, 0x06, 0xe0ea);
12878                 MP_WritePhyUshort(sc, 0x06, 0xe5e0);
12879                 MP_WritePhyUshort(sc, 0x06, 0xebe0);
12880                 MP_WritePhyUshort(sc, 0x06, 0xe07c);
12881                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
12882                 MP_WritePhyUshort(sc, 0x06, 0x7d5c);
12883                 MP_WritePhyUshort(sc, 0x06, 0x00ff);
12884                 MP_WritePhyUshort(sc, 0x06, 0x3c00);
12885                 MP_WritePhyUshort(sc, 0x06, 0x1eab);
12886                 MP_WritePhyUshort(sc, 0x06, 0x1ce0);
12887                 MP_WritePhyUshort(sc, 0x06, 0xe04c);
12888                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
12889                 MP_WritePhyUshort(sc, 0x06, 0x4d58);
12890                 MP_WritePhyUshort(sc, 0x06, 0xc1e4);
12891                 MP_WritePhyUshort(sc, 0x06, 0xe04c);
12892                 MP_WritePhyUshort(sc, 0x06, 0xe5e0);
12893                 MP_WritePhyUshort(sc, 0x06, 0x4de0);
12894                 MP_WritePhyUshort(sc, 0x06, 0xe0ee);
12895                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
12896                 MP_WritePhyUshort(sc, 0x06, 0xef69);
12897                 MP_WritePhyUshort(sc, 0x06, 0x3ce4);
12898                 MP_WritePhyUshort(sc, 0x06, 0xe0ee);
12899                 MP_WritePhyUshort(sc, 0x06, 0xe5e0);
12900                 MP_WritePhyUshort(sc, 0x06, 0xeffc);
12901                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
12902                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
12903                 MP_WritePhyUshort(sc, 0x06, 0x87ad);
12904                 MP_WritePhyUshort(sc, 0x06, 0x2412);
12905                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
12906                 MP_WritePhyUshort(sc, 0x06, 0xeee1);
12907                 MP_WritePhyUshort(sc, 0x06, 0xe0ef);
12908                 MP_WritePhyUshort(sc, 0x06, 0x59c3);
12909                 MP_WritePhyUshort(sc, 0x06, 0xe4e0);
12910                 MP_WritePhyUshort(sc, 0x06, 0xeee5);
12911                 MP_WritePhyUshort(sc, 0x06, 0xe0ef);
12912                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
12913                 MP_WritePhyUshort(sc, 0x06, 0xed01);
12914                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
12915                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
12916                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
12917                 MP_WritePhyUshort(sc, 0x06, 0xac25);
12918                 MP_WritePhyUshort(sc, 0x06, 0x0502);
12919                 MP_WritePhyUshort(sc, 0x06, 0x8363);
12920                 MP_WritePhyUshort(sc, 0x06, 0xae03);
12921                 MP_WritePhyUshort(sc, 0x06, 0x0225);
12922                 MP_WritePhyUshort(sc, 0x06, 0x16fc);
12923                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
12924                 MP_WritePhyUshort(sc, 0x06, 0xf9fa);
12925                 MP_WritePhyUshort(sc, 0x06, 0xef69);
12926                 MP_WritePhyUshort(sc, 0x06, 0xfae0);
12927                 MP_WritePhyUshort(sc, 0x06, 0x860a);
12928                 MP_WritePhyUshort(sc, 0x06, 0xa000);
12929                 MP_WritePhyUshort(sc, 0x06, 0x19e0);
12930                 MP_WritePhyUshort(sc, 0x06, 0x860b);
12931                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
12932                 MP_WritePhyUshort(sc, 0x06, 0x331b);
12933                 MP_WritePhyUshort(sc, 0x06, 0x109e);
12934                 MP_WritePhyUshort(sc, 0x06, 0x04aa);
12935                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
12936                 MP_WritePhyUshort(sc, 0x06, 0x06ee);
12937                 MP_WritePhyUshort(sc, 0x06, 0x860a);
12938                 MP_WritePhyUshort(sc, 0x06, 0x01ae);
12939                 MP_WritePhyUshort(sc, 0x06, 0xe602);
12940                 MP_WritePhyUshort(sc, 0x06, 0x241e);
12941                 MP_WritePhyUshort(sc, 0x06, 0xae14);
12942                 MP_WritePhyUshort(sc, 0x06, 0xa001);
12943                 MP_WritePhyUshort(sc, 0x06, 0x1402);
12944                 MP_WritePhyUshort(sc, 0x06, 0x2426);
12945                 MP_WritePhyUshort(sc, 0x06, 0xbf26);
12946                 MP_WritePhyUshort(sc, 0x06, 0x6d02);
12947                 MP_WritePhyUshort(sc, 0x06, 0x2eb0);
12948                 MP_WritePhyUshort(sc, 0x06, 0xee86);
12949                 MP_WritePhyUshort(sc, 0x06, 0x0b00);
12950                 MP_WritePhyUshort(sc, 0x06, 0xee86);
12951                 MP_WritePhyUshort(sc, 0x06, 0x0a02);
12952                 MP_WritePhyUshort(sc, 0x06, 0xaf84);
12953                 MP_WritePhyUshort(sc, 0x06, 0x3ca0);
12954                 MP_WritePhyUshort(sc, 0x06, 0x0252);
12955                 MP_WritePhyUshort(sc, 0x06, 0xee86);
12956                 MP_WritePhyUshort(sc, 0x06, 0x0400);
12957                 MP_WritePhyUshort(sc, 0x06, 0xee86);
12958                 MP_WritePhyUshort(sc, 0x06, 0x0500);
12959                 MP_WritePhyUshort(sc, 0x06, 0xe086);
12960                 MP_WritePhyUshort(sc, 0x06, 0x0be1);
12961                 MP_WritePhyUshort(sc, 0x06, 0x8b32);
12962                 MP_WritePhyUshort(sc, 0x06, 0x1b10);
12963                 MP_WritePhyUshort(sc, 0x06, 0x9e04);
12964                 MP_WritePhyUshort(sc, 0x06, 0xaa02);
12965                 MP_WritePhyUshort(sc, 0x06, 0xaecb);
12966                 MP_WritePhyUshort(sc, 0x06, 0xee86);
12967                 MP_WritePhyUshort(sc, 0x06, 0x0b00);
12968                 MP_WritePhyUshort(sc, 0x06, 0x0224);
12969                 MP_WritePhyUshort(sc, 0x06, 0x3ae2);
12970                 MP_WritePhyUshort(sc, 0x06, 0x8604);
12971                 MP_WritePhyUshort(sc, 0x06, 0xe386);
12972                 MP_WritePhyUshort(sc, 0x06, 0x05ef);
12973                 MP_WritePhyUshort(sc, 0x06, 0x65e2);
12974                 MP_WritePhyUshort(sc, 0x06, 0x8606);
12975                 MP_WritePhyUshort(sc, 0x06, 0xe386);
12976                 MP_WritePhyUshort(sc, 0x06, 0x071b);
12977                 MP_WritePhyUshort(sc, 0x06, 0x56aa);
12978                 MP_WritePhyUshort(sc, 0x06, 0x0eef);
12979                 MP_WritePhyUshort(sc, 0x06, 0x56e6);
12980                 MP_WritePhyUshort(sc, 0x06, 0x8606);
12981                 MP_WritePhyUshort(sc, 0x06, 0xe786);
12982                 MP_WritePhyUshort(sc, 0x06, 0x07e2);
12983                 MP_WritePhyUshort(sc, 0x06, 0x8609);
12984                 MP_WritePhyUshort(sc, 0x06, 0xe686);
12985                 MP_WritePhyUshort(sc, 0x06, 0x08e0);
12986                 MP_WritePhyUshort(sc, 0x06, 0x8609);
12987                 MP_WritePhyUshort(sc, 0x06, 0xa000);
12988                 MP_WritePhyUshort(sc, 0x06, 0x07ee);
12989                 MP_WritePhyUshort(sc, 0x06, 0x860a);
12990                 MP_WritePhyUshort(sc, 0x06, 0x03af);
12991                 MP_WritePhyUshort(sc, 0x06, 0x8369);
12992                 MP_WritePhyUshort(sc, 0x06, 0x0224);
12993                 MP_WritePhyUshort(sc, 0x06, 0x8e02);
12994                 MP_WritePhyUshort(sc, 0x06, 0x2426);
12995                 MP_WritePhyUshort(sc, 0x06, 0xae48);
12996                 MP_WritePhyUshort(sc, 0x06, 0xa003);
12997                 MP_WritePhyUshort(sc, 0x06, 0x21e0);
12998                 MP_WritePhyUshort(sc, 0x06, 0x8608);
12999                 MP_WritePhyUshort(sc, 0x06, 0xe186);
13000                 MP_WritePhyUshort(sc, 0x06, 0x091b);
13001                 MP_WritePhyUshort(sc, 0x06, 0x019e);
13002                 MP_WritePhyUshort(sc, 0x06, 0x0caa);
13003                 MP_WritePhyUshort(sc, 0x06, 0x0502);
13004                 MP_WritePhyUshort(sc, 0x06, 0x249d);
13005                 MP_WritePhyUshort(sc, 0x06, 0xaee7);
13006                 MP_WritePhyUshort(sc, 0x06, 0x0224);
13007                 MP_WritePhyUshort(sc, 0x06, 0x8eae);
13008                 MP_WritePhyUshort(sc, 0x06, 0xe2ee);
13009                 MP_WritePhyUshort(sc, 0x06, 0x860a);
13010                 MP_WritePhyUshort(sc, 0x06, 0x04ee);
13011                 MP_WritePhyUshort(sc, 0x06, 0x860b);
13012                 MP_WritePhyUshort(sc, 0x06, 0x00af);
13013                 MP_WritePhyUshort(sc, 0x06, 0x8369);
13014                 MP_WritePhyUshort(sc, 0x06, 0xa004);
13015                 MP_WritePhyUshort(sc, 0x06, 0x15e0);
13016                 MP_WritePhyUshort(sc, 0x06, 0x860b);
13017                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
13018                 MP_WritePhyUshort(sc, 0x06, 0x341b);
13019                 MP_WritePhyUshort(sc, 0x06, 0x109e);
13020                 MP_WritePhyUshort(sc, 0x06, 0x05aa);
13021                 MP_WritePhyUshort(sc, 0x06, 0x03af);
13022                 MP_WritePhyUshort(sc, 0x06, 0x8383);
13023                 MP_WritePhyUshort(sc, 0x06, 0xee86);
13024                 MP_WritePhyUshort(sc, 0x06, 0x0a05);
13025                 MP_WritePhyUshort(sc, 0x06, 0xae0c);
13026                 MP_WritePhyUshort(sc, 0x06, 0xa005);
13027                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
13028                 MP_WritePhyUshort(sc, 0x06, 0x0702);
13029                 MP_WritePhyUshort(sc, 0x06, 0x2309);
13030                 MP_WritePhyUshort(sc, 0x06, 0xee86);
13031                 MP_WritePhyUshort(sc, 0x06, 0x0a00);
13032                 MP_WritePhyUshort(sc, 0x06, 0xfeef);
13033                 MP_WritePhyUshort(sc, 0x06, 0x96fe);
13034                 MP_WritePhyUshort(sc, 0x06, 0xfdfc);
13035                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
13036                 MP_WritePhyUshort(sc, 0x06, 0xf9fa);
13037                 MP_WritePhyUshort(sc, 0x06, 0xef69);
13038                 MP_WritePhyUshort(sc, 0x06, 0xfbe0);
13039                 MP_WritePhyUshort(sc, 0x06, 0x8b85);
13040                 MP_WritePhyUshort(sc, 0x06, 0xad25);
13041                 MP_WritePhyUshort(sc, 0x06, 0x22e0);
13042                 MP_WritePhyUshort(sc, 0x06, 0xe022);
13043                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
13044                 MP_WritePhyUshort(sc, 0x06, 0x23e2);
13045                 MP_WritePhyUshort(sc, 0x06, 0xe036);
13046                 MP_WritePhyUshort(sc, 0x06, 0xe3e0);
13047                 MP_WritePhyUshort(sc, 0x06, 0x375a);
13048                 MP_WritePhyUshort(sc, 0x06, 0xc40d);
13049                 MP_WritePhyUshort(sc, 0x06, 0x0158);
13050                 MP_WritePhyUshort(sc, 0x06, 0x021e);
13051                 MP_WritePhyUshort(sc, 0x06, 0x20e3);
13052                 MP_WritePhyUshort(sc, 0x06, 0x8ae7);
13053                 MP_WritePhyUshort(sc, 0x06, 0xac31);
13054                 MP_WritePhyUshort(sc, 0x06, 0x60ac);
13055                 MP_WritePhyUshort(sc, 0x06, 0x3a08);
13056                 MP_WritePhyUshort(sc, 0x06, 0xac3e);
13057                 MP_WritePhyUshort(sc, 0x06, 0x26ae);
13058                 MP_WritePhyUshort(sc, 0x06, 0x67af);
13059                 MP_WritePhyUshort(sc, 0x06, 0x84db);
13060                 MP_WritePhyUshort(sc, 0x06, 0xad37);
13061                 MP_WritePhyUshort(sc, 0x06, 0x61e0);
13062                 MP_WritePhyUshort(sc, 0x06, 0x8ae8);
13063                 MP_WritePhyUshort(sc, 0x06, 0x10e4);
13064                 MP_WritePhyUshort(sc, 0x06, 0x8ae8);
13065                 MP_WritePhyUshort(sc, 0x06, 0xe18a);
13066                 MP_WritePhyUshort(sc, 0x06, 0xe91b);
13067                 MP_WritePhyUshort(sc, 0x06, 0x109e);
13068                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
13069                 MP_WritePhyUshort(sc, 0x06, 0x51d1);
13070                 MP_WritePhyUshort(sc, 0x06, 0x00bf);
13071                 MP_WritePhyUshort(sc, 0x06, 0x863b);
13072                 MP_WritePhyUshort(sc, 0x06, 0x022f);
13073                 MP_WritePhyUshort(sc, 0x06, 0x50ee);
13074                 MP_WritePhyUshort(sc, 0x06, 0x8ae8);
13075                 MP_WritePhyUshort(sc, 0x06, 0x00ae);
13076                 MP_WritePhyUshort(sc, 0x06, 0x43ad);
13077                 MP_WritePhyUshort(sc, 0x06, 0x3627);
13078                 MP_WritePhyUshort(sc, 0x06, 0xe08a);
13079                 MP_WritePhyUshort(sc, 0x06, 0xeee1);
13080                 MP_WritePhyUshort(sc, 0x06, 0x8aef);
13081                 MP_WritePhyUshort(sc, 0x06, 0xef74);
13082                 MP_WritePhyUshort(sc, 0x06, 0xe08a);
13083                 MP_WritePhyUshort(sc, 0x06, 0xeae1);
13084                 MP_WritePhyUshort(sc, 0x06, 0x8aeb);
13085                 MP_WritePhyUshort(sc, 0x06, 0x1b74);
13086                 MP_WritePhyUshort(sc, 0x06, 0x9e2e);
13087                 MP_WritePhyUshort(sc, 0x06, 0x14e4);
13088                 MP_WritePhyUshort(sc, 0x06, 0x8aea);
13089                 MP_WritePhyUshort(sc, 0x06, 0xe58a);
13090                 MP_WritePhyUshort(sc, 0x06, 0xebef);
13091                 MP_WritePhyUshort(sc, 0x06, 0x74e0);
13092                 MP_WritePhyUshort(sc, 0x06, 0x8aee);
13093                 MP_WritePhyUshort(sc, 0x06, 0xe18a);
13094                 MP_WritePhyUshort(sc, 0x06, 0xef1b);
13095                 MP_WritePhyUshort(sc, 0x06, 0x479e);
13096                 MP_WritePhyUshort(sc, 0x06, 0x0fae);
13097                 MP_WritePhyUshort(sc, 0x06, 0x19ee);
13098                 MP_WritePhyUshort(sc, 0x06, 0x8aea);
13099                 MP_WritePhyUshort(sc, 0x06, 0x00ee);
13100                 MP_WritePhyUshort(sc, 0x06, 0x8aeb);
13101                 MP_WritePhyUshort(sc, 0x06, 0x00ae);
13102                 MP_WritePhyUshort(sc, 0x06, 0x0fac);
13103                 MP_WritePhyUshort(sc, 0x06, 0x390c);
13104                 MP_WritePhyUshort(sc, 0x06, 0xd101);
13105                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
13106                 MP_WritePhyUshort(sc, 0x06, 0x3b02);
13107                 MP_WritePhyUshort(sc, 0x06, 0x2f50);
13108                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
13109                 MP_WritePhyUshort(sc, 0x06, 0xe800);
13110                 MP_WritePhyUshort(sc, 0x06, 0xe68a);
13111                 MP_WritePhyUshort(sc, 0x06, 0xe7ff);
13112                 MP_WritePhyUshort(sc, 0x06, 0xef96);
13113                 MP_WritePhyUshort(sc, 0x06, 0xfefd);
13114                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
13115                 MP_WritePhyUshort(sc, 0x06, 0xf8f9);
13116                 MP_WritePhyUshort(sc, 0x06, 0xfaef);
13117                 MP_WritePhyUshort(sc, 0x06, 0x69e0);
13118                 MP_WritePhyUshort(sc, 0x06, 0xe022);
13119                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
13120                 MP_WritePhyUshort(sc, 0x06, 0x2358);
13121                 MP_WritePhyUshort(sc, 0x06, 0xc4e1);
13122                 MP_WritePhyUshort(sc, 0x06, 0x8b6e);
13123                 MP_WritePhyUshort(sc, 0x06, 0x1f10);
13124                 MP_WritePhyUshort(sc, 0x06, 0x9e24);
13125                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
13126                 MP_WritePhyUshort(sc, 0x06, 0x6ead);
13127                 MP_WritePhyUshort(sc, 0x06, 0x2218);
13128                 MP_WritePhyUshort(sc, 0x06, 0xac27);
13129                 MP_WritePhyUshort(sc, 0x06, 0x0dac);
13130                 MP_WritePhyUshort(sc, 0x06, 0x2605);
13131                 MP_WritePhyUshort(sc, 0x06, 0x0203);
13132                 MP_WritePhyUshort(sc, 0x06, 0x8fae);
13133                 MP_WritePhyUshort(sc, 0x06, 0x1302);
13134                 MP_WritePhyUshort(sc, 0x06, 0x03c8);
13135                 MP_WritePhyUshort(sc, 0x06, 0xae0e);
13136                 MP_WritePhyUshort(sc, 0x06, 0x0203);
13137                 MP_WritePhyUshort(sc, 0x06, 0xe102);
13138                 MP_WritePhyUshort(sc, 0x06, 0x8520);
13139                 MP_WritePhyUshort(sc, 0x06, 0xae06);
13140                 MP_WritePhyUshort(sc, 0x06, 0x0203);
13141                 MP_WritePhyUshort(sc, 0x06, 0x8f02);
13142                 MP_WritePhyUshort(sc, 0x06, 0x8566);
13143                 MP_WritePhyUshort(sc, 0x06, 0xef96);
13144                 MP_WritePhyUshort(sc, 0x06, 0xfefd);
13145                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
13146                 MP_WritePhyUshort(sc, 0x06, 0xf8fa);
13147                 MP_WritePhyUshort(sc, 0x06, 0xef69);
13148                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
13149                 MP_WritePhyUshort(sc, 0x06, 0x82ad);
13150                 MP_WritePhyUshort(sc, 0x06, 0x2737);
13151                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
13152                 MP_WritePhyUshort(sc, 0x06, 0x4402);
13153                 MP_WritePhyUshort(sc, 0x06, 0x2f23);
13154                 MP_WritePhyUshort(sc, 0x06, 0xac28);
13155                 MP_WritePhyUshort(sc, 0x06, 0x2ed1);
13156                 MP_WritePhyUshort(sc, 0x06, 0x01bf);
13157                 MP_WritePhyUshort(sc, 0x06, 0x8647);
13158                 MP_WritePhyUshort(sc, 0x06, 0x022f);
13159                 MP_WritePhyUshort(sc, 0x06, 0x50bf);
13160                 MP_WritePhyUshort(sc, 0x06, 0x8641);
13161                 MP_WritePhyUshort(sc, 0x06, 0x022f);
13162                 MP_WritePhyUshort(sc, 0x06, 0x23e5);
13163                 MP_WritePhyUshort(sc, 0x06, 0x8af0);
13164                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
13165                 MP_WritePhyUshort(sc, 0x06, 0x22e1);
13166                 MP_WritePhyUshort(sc, 0x06, 0xe023);
13167                 MP_WritePhyUshort(sc, 0x06, 0xac2e);
13168                 MP_WritePhyUshort(sc, 0x06, 0x04d1);
13169                 MP_WritePhyUshort(sc, 0x06, 0x01ae);
13170                 MP_WritePhyUshort(sc, 0x06, 0x02d1);
13171                 MP_WritePhyUshort(sc, 0x06, 0x00bf);
13172                 MP_WritePhyUshort(sc, 0x06, 0x8641);
13173                 MP_WritePhyUshort(sc, 0x06, 0x022f);
13174                 MP_WritePhyUshort(sc, 0x06, 0x50d1);
13175                 MP_WritePhyUshort(sc, 0x06, 0x01bf);
13176                 MP_WritePhyUshort(sc, 0x06, 0x8644);
13177                 MP_WritePhyUshort(sc, 0x06, 0x022f);
13178                 MP_WritePhyUshort(sc, 0x06, 0x50ef);
13179                 MP_WritePhyUshort(sc, 0x06, 0x96fe);
13180                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
13181                 MP_WritePhyUshort(sc, 0x06, 0xf8fa);
13182                 MP_WritePhyUshort(sc, 0x06, 0xef69);
13183                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
13184                 MP_WritePhyUshort(sc, 0x06, 0x4702);
13185                 MP_WritePhyUshort(sc, 0x06, 0x2f23);
13186                 MP_WritePhyUshort(sc, 0x06, 0xad28);
13187                 MP_WritePhyUshort(sc, 0x06, 0x19d1);
13188                 MP_WritePhyUshort(sc, 0x06, 0x00bf);
13189                 MP_WritePhyUshort(sc, 0x06, 0x8644);
13190                 MP_WritePhyUshort(sc, 0x06, 0x022f);
13191                 MP_WritePhyUshort(sc, 0x06, 0x50e1);
13192                 MP_WritePhyUshort(sc, 0x06, 0x8af0);
13193                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
13194                 MP_WritePhyUshort(sc, 0x06, 0x4102);
13195                 MP_WritePhyUshort(sc, 0x06, 0x2f50);
13196                 MP_WritePhyUshort(sc, 0x06, 0xd100);
13197                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
13198                 MP_WritePhyUshort(sc, 0x06, 0x4702);
13199                 MP_WritePhyUshort(sc, 0x06, 0x2f50);
13200                 MP_WritePhyUshort(sc, 0x06, 0xef96);
13201                 MP_WritePhyUshort(sc, 0x06, 0xfefc);
13202                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
13203                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
13204                 MP_WritePhyUshort(sc, 0x06, 0xfee1);
13205                 MP_WritePhyUshort(sc, 0x06, 0xe2ff);
13206                 MP_WritePhyUshort(sc, 0x06, 0xad2e);
13207                 MP_WritePhyUshort(sc, 0x06, 0x63e0);
13208                 MP_WritePhyUshort(sc, 0x06, 0xe038);
13209                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
13210                 MP_WritePhyUshort(sc, 0x06, 0x39ad);
13211                 MP_WritePhyUshort(sc, 0x06, 0x2f10);
13212                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
13213                 MP_WritePhyUshort(sc, 0x06, 0x34e1);
13214                 MP_WritePhyUshort(sc, 0x06, 0xe035);
13215                 MP_WritePhyUshort(sc, 0x06, 0xf726);
13216                 MP_WritePhyUshort(sc, 0x06, 0xe4e0);
13217                 MP_WritePhyUshort(sc, 0x06, 0x34e5);
13218                 MP_WritePhyUshort(sc, 0x06, 0xe035);
13219                 MP_WritePhyUshort(sc, 0x06, 0xae0e);
13220                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
13221                 MP_WritePhyUshort(sc, 0x06, 0xd6e1);
13222                 MP_WritePhyUshort(sc, 0x06, 0xe2d7);
13223                 MP_WritePhyUshort(sc, 0x06, 0xf728);
13224                 MP_WritePhyUshort(sc, 0x06, 0xe4e2);
13225                 MP_WritePhyUshort(sc, 0x06, 0xd6e5);
13226                 MP_WritePhyUshort(sc, 0x06, 0xe2d7);
13227                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
13228                 MP_WritePhyUshort(sc, 0x06, 0x34e1);
13229                 MP_WritePhyUshort(sc, 0x06, 0xe235);
13230                 MP_WritePhyUshort(sc, 0x06, 0xf72b);
13231                 MP_WritePhyUshort(sc, 0x06, 0xe4e2);
13232                 MP_WritePhyUshort(sc, 0x06, 0x34e5);
13233                 MP_WritePhyUshort(sc, 0x06, 0xe235);
13234                 MP_WritePhyUshort(sc, 0x06, 0xd07d);
13235                 MP_WritePhyUshort(sc, 0x06, 0xb0fe);
13236                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
13237                 MP_WritePhyUshort(sc, 0x06, 0x34e1);
13238                 MP_WritePhyUshort(sc, 0x06, 0xe235);
13239                 MP_WritePhyUshort(sc, 0x06, 0xf62b);
13240                 MP_WritePhyUshort(sc, 0x06, 0xe4e2);
13241                 MP_WritePhyUshort(sc, 0x06, 0x34e5);
13242                 MP_WritePhyUshort(sc, 0x06, 0xe235);
13243                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
13244                 MP_WritePhyUshort(sc, 0x06, 0x34e1);
13245                 MP_WritePhyUshort(sc, 0x06, 0xe035);
13246                 MP_WritePhyUshort(sc, 0x06, 0xf626);
13247                 MP_WritePhyUshort(sc, 0x06, 0xe4e0);
13248                 MP_WritePhyUshort(sc, 0x06, 0x34e5);
13249                 MP_WritePhyUshort(sc, 0x06, 0xe035);
13250                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
13251                 MP_WritePhyUshort(sc, 0x06, 0xd6e1);
13252                 MP_WritePhyUshort(sc, 0x06, 0xe2d7);
13253                 MP_WritePhyUshort(sc, 0x06, 0xf628);
13254                 MP_WritePhyUshort(sc, 0x06, 0xe4e2);
13255                 MP_WritePhyUshort(sc, 0x06, 0xd6e5);
13256                 MP_WritePhyUshort(sc, 0x06, 0xe2d7);
13257                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
13258                 MP_WritePhyUshort(sc, 0x06, 0xae20);
13259                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13260                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13261                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13262                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13263                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13264                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13265                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13266                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13267                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13268                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13269                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13270                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13271                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13272                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13273                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13274                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13275                 MP_WritePhyUshort(sc, 0x06, 0xa725);
13276                 MP_WritePhyUshort(sc, 0x06, 0xe50a);
13277                 MP_WritePhyUshort(sc, 0x06, 0x1de5);
13278                 MP_WritePhyUshort(sc, 0x06, 0x0a2c);
13279                 MP_WritePhyUshort(sc, 0x06, 0xe50a);
13280                 MP_WritePhyUshort(sc, 0x06, 0x6de5);
13281                 MP_WritePhyUshort(sc, 0x06, 0x0a1d);
13282                 MP_WritePhyUshort(sc, 0x06, 0xe50a);
13283                 MP_WritePhyUshort(sc, 0x06, 0x1ce5);
13284                 MP_WritePhyUshort(sc, 0x06, 0x0a2d);
13285                 MP_WritePhyUshort(sc, 0x06, 0xa755);
13286                 MP_WritePhyUshort(sc, 0x06, 0x00e2);
13287                 MP_WritePhyUshort(sc, 0x06, 0x3488);
13288                 MP_WritePhyUshort(sc, 0x06, 0xe200);
13289                 MP_WritePhyUshort(sc, 0x06, 0xcce2);
13290                 MP_WritePhyUshort(sc, 0x06, 0x0055);
13291                 MP_WritePhyUshort(sc, 0x06, 0xe020);
13292                 MP_WritePhyUshort(sc, 0x06, 0x55e2);
13293                 MP_WritePhyUshort(sc, 0x06, 0xd600);
13294                 MP_WritePhyUshort(sc, 0x06, 0xe24a);
13295                 PhyRegValue = MP_ReadPhyUshort(sc, 0x01);
13296                 PhyRegValue |= BIT_0;
13297                 MP_WritePhyUshort(sc, 0x01, PhyRegValue);
13298                 PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
13299                 PhyRegValue |= BIT_0;
13300                 MP_WritePhyUshort(sc, 0x00, PhyRegValue);
13301                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
13302                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
13303                 MP_WritePhyUshort(sc, 0x17, 0x2179);
13304                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
13305                 MP_WritePhyUshort(sc, 0x10, 0xf274);
13306                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
13307                 MP_WritePhyUshort(sc, 0x1e, 0x0042);
13308                 MP_WritePhyUshort(sc, 0x15, 0x0f00);
13309                 MP_WritePhyUshort(sc, 0x15, 0x0f00);
13310                 MP_WritePhyUshort(sc, 0x16, 0x7408);
13311                 MP_WritePhyUshort(sc, 0x15, 0x0e00);
13312                 MP_WritePhyUshort(sc, 0x15, 0x0f00);
13313                 MP_WritePhyUshort(sc, 0x15, 0x0f01);
13314                 MP_WritePhyUshort(sc, 0x16, 0x4000);
13315                 MP_WritePhyUshort(sc, 0x15, 0x0e01);
13316                 MP_WritePhyUshort(sc, 0x15, 0x0f01);
13317                 MP_WritePhyUshort(sc, 0x15, 0x0f02);
13318                 MP_WritePhyUshort(sc, 0x16, 0x9400);
13319                 MP_WritePhyUshort(sc, 0x15, 0x0e02);
13320                 MP_WritePhyUshort(sc, 0x15, 0x0f02);
13321                 MP_WritePhyUshort(sc, 0x15, 0x0f03);
13322                 MP_WritePhyUshort(sc, 0x16, 0x7408);
13323                 MP_WritePhyUshort(sc, 0x15, 0x0e03);
13324                 MP_WritePhyUshort(sc, 0x15, 0x0f03);
13325                 MP_WritePhyUshort(sc, 0x15, 0x0f04);
13326                 MP_WritePhyUshort(sc, 0x16, 0x4008);
13327                 MP_WritePhyUshort(sc, 0x15, 0x0e04);
13328                 MP_WritePhyUshort(sc, 0x15, 0x0f04);
13329                 MP_WritePhyUshort(sc, 0x15, 0x0f05);
13330                 MP_WritePhyUshort(sc, 0x16, 0x9400);
13331                 MP_WritePhyUshort(sc, 0x15, 0x0e05);
13332                 MP_WritePhyUshort(sc, 0x15, 0x0f05);
13333                 MP_WritePhyUshort(sc, 0x15, 0x0f06);
13334                 MP_WritePhyUshort(sc, 0x16, 0x0803);
13335                 MP_WritePhyUshort(sc, 0x15, 0x0e06);
13336                 MP_WritePhyUshort(sc, 0x15, 0x0f06);
13337                 MP_WritePhyUshort(sc, 0x15, 0x0d00);
13338                 MP_WritePhyUshort(sc, 0x15, 0x0100);
13339                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
13340                 MP_WritePhyUshort(sc, 0x10, 0xf074);
13341                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
13342                 MP_WritePhyUshort(sc, 0x17, 0x2149);
13343                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
13344                 for (i=0; i<200; i++) {
13345                         DELAY(100);
13346                         PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
13347                         if (PhyRegValue&0x0080)
13348                                 break;
13349                 }
13350                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
13351                 MP_WritePhyUshort(sc, 0x1e, 0x0023);
13352                 PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
13353                 PhyRegValue &= ~(BIT_0);
13354                 if (sc->RequiredSecLanDonglePatch)
13355                         PhyRegValue &= ~(BIT_2);
13356                 MP_WritePhyUshort(sc, 0x17, PhyRegValue);
13357                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
13358                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
13359                 MP_WritePhyUshort(sc, 0x1e, 0x0023);
13360                 PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
13361                 PhyRegValue |= BIT_14;
13362                 MP_WritePhyUshort(sc, 0x17, PhyRegValue);
13363                 MP_WritePhyUshort(sc, 0x1e, 0x0020);
13364                 PhyRegValue = MP_ReadPhyUshort(sc, 0x1b);
13365                 PhyRegValue |= BIT_7;
13366                 MP_WritePhyUshort(sc, 0x1b, PhyRegValue);
13367                 MP_WritePhyUshort(sc, 0x1e, 0x0041);
13368                 MP_WritePhyUshort(sc, 0x15, 0x0e02);
13369                 MP_WritePhyUshort(sc, 0x1e, 0x0028);
13370                 PhyRegValue = MP_ReadPhyUshort(sc, 0x19);
13371                 PhyRegValue |= BIT_15;
13372                 MP_WritePhyUshort(sc, 0x19, PhyRegValue);
13373                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
13374         } else {
13375                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
13376                 MP_WritePhyUshort(sc, 0x00, 0x1800);
13377                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
13378                 MP_WritePhyUshort(sc, 0x1e, 0x0023);
13379                 MP_WritePhyUshort(sc, 0x17, 0x0117);
13380                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
13381                 MP_WritePhyUshort(sc, 0x1E, 0x002C);
13382                 MP_WritePhyUshort(sc, 0x1B, 0x5000);
13383                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
13384                 MP_WritePhyUshort(sc, 0x16, 0x4104);
13385                 for (i = 0; i < 200; i++) {
13386                         DELAY(100);
13387                         PhyRegValue = MP_ReadPhyUshort(sc, 0x1E);
13388                         PhyRegValue &= 0x03FF;
13389                         if (PhyRegValue==0x000C)
13390                                 break;
13391                 }
13392                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
13393                 for (i = 0; i < 200; i++) {
13394                         DELAY(100);
13395                         PhyRegValue = MP_ReadPhyUshort(sc, 0x07);
13396                         if ((PhyRegValue & BIT_5) == 0)
13397                                 break;
13398                 }
13399                 PhyRegValue = MP_ReadPhyUshort(sc, 0x07);
13400                 if (PhyRegValue & BIT_5) {
13401                         MP_WritePhyUshort(sc, 0x1f, 0x0007);
13402                         MP_WritePhyUshort(sc, 0x1e, 0x00a1);
13403                         MP_WritePhyUshort(sc, 0x17, 0x1000);
13404                         MP_WritePhyUshort(sc, 0x17, 0x0000);
13405                         MP_WritePhyUshort(sc, 0x17, 0x2000);
13406                         MP_WritePhyUshort(sc, 0x1e, 0x002f);
13407                         MP_WritePhyUshort(sc, 0x18, 0x9bfb);
13408                         MP_WritePhyUshort(sc, 0x1f, 0x0005);
13409                         MP_WritePhyUshort(sc, 0x07, 0x0000);
13410                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
13411                 }
13412                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
13413                 MP_WritePhyUshort(sc, 0x05, 0xfff6);
13414                 MP_WritePhyUshort(sc, 0x06, 0x0080);
13415                 PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
13416                 PhyRegValue &= ~(BIT_7);
13417                 MP_WritePhyUshort(sc, 0x00, PhyRegValue);
13418                 MP_WritePhyUshort(sc, 0x1f, 0x0002);
13419                 PhyRegValue = MP_ReadPhyUshort(sc, 0x08);
13420                 PhyRegValue &= ~(BIT_7);
13421                 MP_WritePhyUshort(sc, 0x08, PhyRegValue);
13422                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
13423 
13424                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
13425                 MP_WritePhyUshort(sc, 0x1e, 0x0023);
13426                 MP_WritePhyUshort(sc, 0x16, 0x0306);
13427                 MP_WritePhyUshort(sc, 0x16, 0x0307);
13428                 MP_WritePhyUshort(sc, 0x15, 0x000e);
13429                 MP_WritePhyUshort(sc, 0x19, 0x000a);
13430                 MP_WritePhyUshort(sc, 0x15, 0x0010);
13431                 MP_WritePhyUshort(sc, 0x19, 0x0008);
13432                 MP_WritePhyUshort(sc, 0x15, 0x0018);
13433                 MP_WritePhyUshort(sc, 0x19, 0x4801);
13434                 MP_WritePhyUshort(sc, 0x15, 0x0019);
13435                 MP_WritePhyUshort(sc, 0x19, 0x6801);
13436                 MP_WritePhyUshort(sc, 0x15, 0x001a);
13437                 MP_WritePhyUshort(sc, 0x19, 0x66a1);
13438                 MP_WritePhyUshort(sc, 0x15, 0x001f);
13439                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13440                 MP_WritePhyUshort(sc, 0x15, 0x0020);
13441                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13442                 MP_WritePhyUshort(sc, 0x15, 0x0021);
13443                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13444                 MP_WritePhyUshort(sc, 0x15, 0x0022);
13445                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13446                 MP_WritePhyUshort(sc, 0x15, 0x0023);
13447                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13448                 MP_WritePhyUshort(sc, 0x15, 0x0024);
13449                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13450                 MP_WritePhyUshort(sc, 0x15, 0x0025);
13451                 MP_WritePhyUshort(sc, 0x19, 0x64a1);
13452                 MP_WritePhyUshort(sc, 0x15, 0x0026);
13453                 MP_WritePhyUshort(sc, 0x19, 0x40ea);
13454                 MP_WritePhyUshort(sc, 0x15, 0x0027);
13455                 MP_WritePhyUshort(sc, 0x19, 0x4503);
13456                 MP_WritePhyUshort(sc, 0x15, 0x0028);
13457                 MP_WritePhyUshort(sc, 0x19, 0x9f00);
13458                 MP_WritePhyUshort(sc, 0x15, 0x0029);
13459                 MP_WritePhyUshort(sc, 0x19, 0xa631);
13460                 MP_WritePhyUshort(sc, 0x15, 0x002a);
13461                 MP_WritePhyUshort(sc, 0x19, 0x9717);
13462                 MP_WritePhyUshort(sc, 0x15, 0x002b);
13463                 MP_WritePhyUshort(sc, 0x19, 0x302c);
13464                 MP_WritePhyUshort(sc, 0x15, 0x002c);
13465                 MP_WritePhyUshort(sc, 0x19, 0x4802);
13466                 MP_WritePhyUshort(sc, 0x15, 0x002d);
13467                 MP_WritePhyUshort(sc, 0x19, 0x58da);
13468                 MP_WritePhyUshort(sc, 0x15, 0x002e);
13469                 MP_WritePhyUshort(sc, 0x19, 0x400d);
13470                 MP_WritePhyUshort(sc, 0x15, 0x002f);
13471                 MP_WritePhyUshort(sc, 0x19, 0x4488);
13472                 MP_WritePhyUshort(sc, 0x15, 0x0030);
13473                 MP_WritePhyUshort(sc, 0x19, 0x9e00);
13474                 MP_WritePhyUshort(sc, 0x15, 0x0031);
13475                 MP_WritePhyUshort(sc, 0x19, 0x63c8);
13476                 MP_WritePhyUshort(sc, 0x15, 0x0032);
13477                 MP_WritePhyUshort(sc, 0x19, 0x6481);
13478                 MP_WritePhyUshort(sc, 0x15, 0x0033);
13479                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13480                 MP_WritePhyUshort(sc, 0x15, 0x0034);
13481                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13482                 MP_WritePhyUshort(sc, 0x15, 0x0035);
13483                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13484                 MP_WritePhyUshort(sc, 0x15, 0x0036);
13485                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13486                 MP_WritePhyUshort(sc, 0x15, 0x0037);
13487                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13488                 MP_WritePhyUshort(sc, 0x15, 0x0038);
13489                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13490                 MP_WritePhyUshort(sc, 0x15, 0x0039);
13491                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13492                 MP_WritePhyUshort(sc, 0x15, 0x003a);
13493                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13494                 MP_WritePhyUshort(sc, 0x15, 0x003b);
13495                 MP_WritePhyUshort(sc, 0x19, 0x63e8);
13496                 MP_WritePhyUshort(sc, 0x15, 0x003c);
13497                 MP_WritePhyUshort(sc, 0x19, 0x7d00);
13498                 MP_WritePhyUshort(sc, 0x15, 0x003d);
13499                 MP_WritePhyUshort(sc, 0x19, 0x59d4);
13500                 MP_WritePhyUshort(sc, 0x15, 0x003e);
13501                 MP_WritePhyUshort(sc, 0x19, 0x63f8);
13502                 MP_WritePhyUshort(sc, 0x15, 0x0040);
13503                 MP_WritePhyUshort(sc, 0x19, 0x64a1);
13504                 MP_WritePhyUshort(sc, 0x15, 0x0041);
13505                 MP_WritePhyUshort(sc, 0x19, 0x30de);
13506                 MP_WritePhyUshort(sc, 0x15, 0x0044);
13507                 MP_WritePhyUshort(sc, 0x19, 0x480f);
13508                 MP_WritePhyUshort(sc, 0x15, 0x0045);
13509                 MP_WritePhyUshort(sc, 0x19, 0x6800);
13510                 MP_WritePhyUshort(sc, 0x15, 0x0046);
13511                 MP_WritePhyUshort(sc, 0x19, 0x6680);
13512                 MP_WritePhyUshort(sc, 0x15, 0x0047);
13513                 MP_WritePhyUshort(sc, 0x19, 0x7c10);
13514                 MP_WritePhyUshort(sc, 0x15, 0x0048);
13515                 MP_WritePhyUshort(sc, 0x19, 0x63c8);
13516                 MP_WritePhyUshort(sc, 0x15, 0x0049);
13517                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13518                 MP_WritePhyUshort(sc, 0x15, 0x004a);
13519                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13520                 MP_WritePhyUshort(sc, 0x15, 0x004b);
13521                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13522                 MP_WritePhyUshort(sc, 0x15, 0x004c);
13523                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13524                 MP_WritePhyUshort(sc, 0x15, 0x004d);
13525                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13526                 MP_WritePhyUshort(sc, 0x15, 0x004e);
13527                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13528                 MP_WritePhyUshort(sc, 0x15, 0x004f);
13529                 MP_WritePhyUshort(sc, 0x19, 0x40ea);
13530                 MP_WritePhyUshort(sc, 0x15, 0x0050);
13531                 MP_WritePhyUshort(sc, 0x19, 0x4503);
13532                 MP_WritePhyUshort(sc, 0x15, 0x0051);
13533                 MP_WritePhyUshort(sc, 0x19, 0x58ca);
13534                 MP_WritePhyUshort(sc, 0x15, 0x0052);
13535                 MP_WritePhyUshort(sc, 0x19, 0x63c8);
13536                 MP_WritePhyUshort(sc, 0x15, 0x0053);
13537                 MP_WritePhyUshort(sc, 0x19, 0x63d8);
13538                 MP_WritePhyUshort(sc, 0x15, 0x0054);
13539                 MP_WritePhyUshort(sc, 0x19, 0x66a0);
13540                 MP_WritePhyUshort(sc, 0x15, 0x0055);
13541                 MP_WritePhyUshort(sc, 0x19, 0x9f00);
13542                 MP_WritePhyUshort(sc, 0x15, 0x0056);
13543                 MP_WritePhyUshort(sc, 0x19, 0x3000);
13544                 MP_WritePhyUshort(sc, 0x15, 0x00a1);
13545                 MP_WritePhyUshort(sc, 0x19, 0x3044);
13546                 MP_WritePhyUshort(sc, 0x15, 0x00ab);
13547                 MP_WritePhyUshort(sc, 0x19, 0x5820);
13548                 MP_WritePhyUshort(sc, 0x15, 0x00ac);
13549                 MP_WritePhyUshort(sc, 0x19, 0x5e04);
13550                 MP_WritePhyUshort(sc, 0x15, 0x00ad);
13551                 MP_WritePhyUshort(sc, 0x19, 0xb60c);
13552                 MP_WritePhyUshort(sc, 0x15, 0x00af);
13553                 MP_WritePhyUshort(sc, 0x19, 0x000a);
13554                 MP_WritePhyUshort(sc, 0x15, 0x00b2);
13555                 MP_WritePhyUshort(sc, 0x19, 0x30b9);
13556                 MP_WritePhyUshort(sc, 0x15, 0x00b9);
13557                 MP_WritePhyUshort(sc, 0x19, 0x4408);
13558                 MP_WritePhyUshort(sc, 0x15, 0x00ba);
13559                 MP_WritePhyUshort(sc, 0x19, 0x480b);
13560                 MP_WritePhyUshort(sc, 0x15, 0x00bb);
13561                 MP_WritePhyUshort(sc, 0x19, 0x5e00);
13562                 MP_WritePhyUshort(sc, 0x15, 0x00bc);
13563                 MP_WritePhyUshort(sc, 0x19, 0x405f);
13564                 MP_WritePhyUshort(sc, 0x15, 0x00bd);
13565                 MP_WritePhyUshort(sc, 0x19, 0x4448);
13566                 MP_WritePhyUshort(sc, 0x15, 0x00be);
13567                 MP_WritePhyUshort(sc, 0x19, 0x4020);
13568                 MP_WritePhyUshort(sc, 0x15, 0x00bf);
13569                 MP_WritePhyUshort(sc, 0x19, 0x4468);
13570                 MP_WritePhyUshort(sc, 0x15, 0x00c0);
13571                 MP_WritePhyUshort(sc, 0x19, 0x9c02);
13572                 MP_WritePhyUshort(sc, 0x15, 0x00c1);
13573                 MP_WritePhyUshort(sc, 0x19, 0x58a0);
13574                 MP_WritePhyUshort(sc, 0x15, 0x00c2);
13575                 MP_WritePhyUshort(sc, 0x19, 0xb605);
13576                 MP_WritePhyUshort(sc, 0x15, 0x00c3);
13577                 MP_WritePhyUshort(sc, 0x19, 0xc0d3);
13578                 MP_WritePhyUshort(sc, 0x15, 0x00c4);
13579                 MP_WritePhyUshort(sc, 0x19, 0x00e6);
13580                 MP_WritePhyUshort(sc, 0x15, 0x00c5);
13581                 MP_WritePhyUshort(sc, 0x19, 0xdaec);
13582                 MP_WritePhyUshort(sc, 0x15, 0x00c6);
13583                 MP_WritePhyUshort(sc, 0x19, 0x00fa);
13584                 MP_WritePhyUshort(sc, 0x15, 0x00c7);
13585                 MP_WritePhyUshort(sc, 0x19, 0x9df9);
13586                 MP_WritePhyUshort(sc, 0x15, 0x0112);
13587                 MP_WritePhyUshort(sc, 0x19, 0x6421);
13588                 MP_WritePhyUshort(sc, 0x15, 0x0113);
13589                 MP_WritePhyUshort(sc, 0x19, 0x7c08);
13590                 MP_WritePhyUshort(sc, 0x15, 0x0114);
13591                 MP_WritePhyUshort(sc, 0x19, 0x63f0);
13592                 MP_WritePhyUshort(sc, 0x15, 0x0115);
13593                 MP_WritePhyUshort(sc, 0x19, 0x4003);
13594                 MP_WritePhyUshort(sc, 0x15, 0x0116);
13595                 MP_WritePhyUshort(sc, 0x19, 0x4418);
13596                 MP_WritePhyUshort(sc, 0x15, 0x0117);
13597                 MP_WritePhyUshort(sc, 0x19, 0x9b00);
13598                 MP_WritePhyUshort(sc, 0x15, 0x0118);
13599                 MP_WritePhyUshort(sc, 0x19, 0x6461);
13600                 MP_WritePhyUshort(sc, 0x15, 0x0119);
13601                 MP_WritePhyUshort(sc, 0x19, 0x64e1);
13602                 MP_WritePhyUshort(sc, 0x15, 0x011a);
13603                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13604                 MP_WritePhyUshort(sc, 0x15, 0x0150);
13605                 MP_WritePhyUshort(sc, 0x19, 0x7c80);
13606                 MP_WritePhyUshort(sc, 0x15, 0x0151);
13607                 MP_WritePhyUshort(sc, 0x19, 0x6461);
13608                 MP_WritePhyUshort(sc, 0x15, 0x0152);
13609                 MP_WritePhyUshort(sc, 0x19, 0x4003);
13610                 MP_WritePhyUshort(sc, 0x15, 0x0153);
13611                 MP_WritePhyUshort(sc, 0x19, 0x4540);
13612                 MP_WritePhyUshort(sc, 0x15, 0x0154);
13613                 MP_WritePhyUshort(sc, 0x19, 0x9f00);
13614                 MP_WritePhyUshort(sc, 0x15, 0x0155);
13615                 MP_WritePhyUshort(sc, 0x19, 0x9d00);
13616                 MP_WritePhyUshort(sc, 0x15, 0x0156);
13617                 MP_WritePhyUshort(sc, 0x19, 0x7c40);
13618                 MP_WritePhyUshort(sc, 0x15, 0x0157);
13619                 MP_WritePhyUshort(sc, 0x19, 0x6421);
13620                 MP_WritePhyUshort(sc, 0x15, 0x0158);
13621                 MP_WritePhyUshort(sc, 0x19, 0x7c80);
13622                 MP_WritePhyUshort(sc, 0x15, 0x0159);
13623                 MP_WritePhyUshort(sc, 0x19, 0x64a1);
13624                 MP_WritePhyUshort(sc, 0x15, 0x015a);
13625                 MP_WritePhyUshort(sc, 0x19, 0x30fe);
13626                 MP_WritePhyUshort(sc, 0x15, 0x029c);
13627                 MP_WritePhyUshort(sc, 0x19, 0x0070);
13628                 MP_WritePhyUshort(sc, 0x15, 0x02b2);
13629                 MP_WritePhyUshort(sc, 0x19, 0x005a);
13630                 MP_WritePhyUshort(sc, 0x15, 0x02bd);
13631                 MP_WritePhyUshort(sc, 0x19, 0xa522);
13632                 MP_WritePhyUshort(sc, 0x15, 0x02ce);
13633                 MP_WritePhyUshort(sc, 0x19, 0xb63e);
13634                 MP_WritePhyUshort(sc, 0x15, 0x02d9);
13635                 MP_WritePhyUshort(sc, 0x19, 0x32df);
13636                 MP_WritePhyUshort(sc, 0x15, 0x02df);
13637                 MP_WritePhyUshort(sc, 0x19, 0x4500);
13638                 MP_WritePhyUshort(sc, 0x15, 0x02f4);
13639                 MP_WritePhyUshort(sc, 0x19, 0xb618);
13640                 MP_WritePhyUshort(sc, 0x15, 0x02fb);
13641                 MP_WritePhyUshort(sc, 0x19, 0xb900);
13642                 MP_WritePhyUshort(sc, 0x15, 0x02fc);
13643                 MP_WritePhyUshort(sc, 0x19, 0x49b5);
13644                 MP_WritePhyUshort(sc, 0x15, 0x02fd);
13645                 MP_WritePhyUshort(sc, 0x19, 0x6812);
13646                 MP_WritePhyUshort(sc, 0x15, 0x02fe);
13647                 MP_WritePhyUshort(sc, 0x19, 0x66a0);
13648                 MP_WritePhyUshort(sc, 0x15, 0x02ff);
13649                 MP_WritePhyUshort(sc, 0x19, 0x9900);
13650                 MP_WritePhyUshort(sc, 0x15, 0x0300);
13651                 MP_WritePhyUshort(sc, 0x19, 0x64a0);
13652                 MP_WritePhyUshort(sc, 0x15, 0x0301);
13653                 MP_WritePhyUshort(sc, 0x19, 0x3316);
13654                 MP_WritePhyUshort(sc, 0x15, 0x0308);
13655                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13656                 MP_WritePhyUshort(sc, 0x15, 0x030c);
13657                 MP_WritePhyUshort(sc, 0x19, 0x3000);
13658                 MP_WritePhyUshort(sc, 0x15, 0x0312);
13659                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13660                 MP_WritePhyUshort(sc, 0x15, 0x0313);
13661                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13662                 MP_WritePhyUshort(sc, 0x15, 0x0314);
13663                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13664                 MP_WritePhyUshort(sc, 0x15, 0x0315);
13665                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13666                 MP_WritePhyUshort(sc, 0x15, 0x0316);
13667                 MP_WritePhyUshort(sc, 0x19, 0x49b5);
13668                 MP_WritePhyUshort(sc, 0x15, 0x0317);
13669                 MP_WritePhyUshort(sc, 0x19, 0x7d00);
13670                 MP_WritePhyUshort(sc, 0x15, 0x0318);
13671                 MP_WritePhyUshort(sc, 0x19, 0x4d00);
13672                 MP_WritePhyUshort(sc, 0x15, 0x0319);
13673                 MP_WritePhyUshort(sc, 0x19, 0x6810);
13674                 MP_WritePhyUshort(sc, 0x15, 0x031a);
13675                 MP_WritePhyUshort(sc, 0x19, 0x6c08);
13676                 MP_WritePhyUshort(sc, 0x15, 0x031b);
13677                 MP_WritePhyUshort(sc, 0x19, 0x4925);
13678                 MP_WritePhyUshort(sc, 0x15, 0x031c);
13679                 MP_WritePhyUshort(sc, 0x19, 0x403b);
13680                 MP_WritePhyUshort(sc, 0x15, 0x031d);
13681                 MP_WritePhyUshort(sc, 0x19, 0xa602);
13682                 MP_WritePhyUshort(sc, 0x15, 0x031e);
13683                 MP_WritePhyUshort(sc, 0x19, 0x402f);
13684                 MP_WritePhyUshort(sc, 0x15, 0x031f);
13685                 MP_WritePhyUshort(sc, 0x19, 0x4484);
13686                 MP_WritePhyUshort(sc, 0x15, 0x0320);
13687                 MP_WritePhyUshort(sc, 0x19, 0x40c8);
13688                 MP_WritePhyUshort(sc, 0x15, 0x0321);
13689                 MP_WritePhyUshort(sc, 0x19, 0x44c4);
13690                 MP_WritePhyUshort(sc, 0x15, 0x0322);
13691                 MP_WritePhyUshort(sc, 0x19, 0x404f);
13692                 MP_WritePhyUshort(sc, 0x15, 0x0323);
13693                 MP_WritePhyUshort(sc, 0x19, 0x44c8);
13694                 MP_WritePhyUshort(sc, 0x15, 0x0324);
13695                 MP_WritePhyUshort(sc, 0x19, 0xd64f);
13696                 MP_WritePhyUshort(sc, 0x15, 0x0325);
13697                 MP_WritePhyUshort(sc, 0x19, 0x00e7);
13698                 MP_WritePhyUshort(sc, 0x15, 0x0326);
13699                 MP_WritePhyUshort(sc, 0x19, 0x7c08);
13700                 MP_WritePhyUshort(sc, 0x15, 0x0327);
13701                 MP_WritePhyUshort(sc, 0x19, 0x8203);
13702                 MP_WritePhyUshort(sc, 0x15, 0x0328);
13703                 MP_WritePhyUshort(sc, 0x19, 0x4d48);
13704                 MP_WritePhyUshort(sc, 0x15, 0x0329);
13705                 MP_WritePhyUshort(sc, 0x19, 0x332b);
13706                 MP_WritePhyUshort(sc, 0x15, 0x032a);
13707                 MP_WritePhyUshort(sc, 0x19, 0x4d40);
13708                 MP_WritePhyUshort(sc, 0x15, 0x032c);
13709                 MP_WritePhyUshort(sc, 0x19, 0x00f8);
13710                 MP_WritePhyUshort(sc, 0x15, 0x032d);
13711                 MP_WritePhyUshort(sc, 0x19, 0x82b2);
13712                 MP_WritePhyUshort(sc, 0x15, 0x032f);
13713                 MP_WritePhyUshort(sc, 0x19, 0x00b0);
13714                 MP_WritePhyUshort(sc, 0x15, 0x0332);
13715                 MP_WritePhyUshort(sc, 0x19, 0x91f2);
13716                 MP_WritePhyUshort(sc, 0x15, 0x033f);
13717                 MP_WritePhyUshort(sc, 0x19, 0xb6cd);
13718                 MP_WritePhyUshort(sc, 0x15, 0x0340);
13719                 MP_WritePhyUshort(sc, 0x19, 0x9e01);
13720                 MP_WritePhyUshort(sc, 0x15, 0x0341);
13721                 MP_WritePhyUshort(sc, 0x19, 0xd11d);
13722                 MP_WritePhyUshort(sc, 0x15, 0x0342);
13723                 MP_WritePhyUshort(sc, 0x19, 0x009d);
13724                 MP_WritePhyUshort(sc, 0x15, 0x0343);
13725                 MP_WritePhyUshort(sc, 0x19, 0xbb1c);
13726                 MP_WritePhyUshort(sc, 0x15, 0x0344);
13727                 MP_WritePhyUshort(sc, 0x19, 0x8102);
13728                 MP_WritePhyUshort(sc, 0x15, 0x0345);
13729                 MP_WritePhyUshort(sc, 0x19, 0x3348);
13730                 MP_WritePhyUshort(sc, 0x15, 0x0346);
13731                 MP_WritePhyUshort(sc, 0x19, 0xa231);
13732                 MP_WritePhyUshort(sc, 0x15, 0x0347);
13733                 MP_WritePhyUshort(sc, 0x19, 0x335b);
13734                 MP_WritePhyUshort(sc, 0x15, 0x0348);
13735                 MP_WritePhyUshort(sc, 0x19, 0x91f7);
13736                 MP_WritePhyUshort(sc, 0x15, 0x0349);
13737                 MP_WritePhyUshort(sc, 0x19, 0xc218);
13738                 MP_WritePhyUshort(sc, 0x15, 0x034a);
13739                 MP_WritePhyUshort(sc, 0x19, 0x00f5);
13740                 MP_WritePhyUshort(sc, 0x15, 0x034b);
13741                 MP_WritePhyUshort(sc, 0x19, 0x335b);
13742                 MP_WritePhyUshort(sc, 0x15, 0x034c);
13743                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13744                 MP_WritePhyUshort(sc, 0x15, 0x034d);
13745                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13746                 MP_WritePhyUshort(sc, 0x15, 0x034e);
13747                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13748                 MP_WritePhyUshort(sc, 0x15, 0x034f);
13749                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13750                 MP_WritePhyUshort(sc, 0x15, 0x0350);
13751                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13752                 MP_WritePhyUshort(sc, 0x15, 0x035b);
13753                 MP_WritePhyUshort(sc, 0x19, 0xa23c);
13754                 MP_WritePhyUshort(sc, 0x15, 0x035c);
13755                 MP_WritePhyUshort(sc, 0x19, 0x7c08);
13756                 MP_WritePhyUshort(sc, 0x15, 0x035d);
13757                 MP_WritePhyUshort(sc, 0x19, 0x4c00);
13758                 MP_WritePhyUshort(sc, 0x15, 0x035e);
13759                 MP_WritePhyUshort(sc, 0x19, 0x3397);
13760                 MP_WritePhyUshort(sc, 0x15, 0x0363);
13761                 MP_WritePhyUshort(sc, 0x19, 0xb6a9);
13762                 MP_WritePhyUshort(sc, 0x15, 0x0366);
13763                 MP_WritePhyUshort(sc, 0x19, 0x00f5);
13764                 MP_WritePhyUshort(sc, 0x15, 0x0382);
13765                 MP_WritePhyUshort(sc, 0x19, 0x7c40);
13766                 MP_WritePhyUshort(sc, 0x15, 0x0388);
13767                 MP_WritePhyUshort(sc, 0x19, 0x0084);
13768                 MP_WritePhyUshort(sc, 0x15, 0x0389);
13769                 MP_WritePhyUshort(sc, 0x19, 0xdd17);
13770                 MP_WritePhyUshort(sc, 0x15, 0x038a);
13771                 MP_WritePhyUshort(sc, 0x19, 0x000b);
13772                 MP_WritePhyUshort(sc, 0x15, 0x038b);
13773                 MP_WritePhyUshort(sc, 0x19, 0xa10a);
13774                 MP_WritePhyUshort(sc, 0x15, 0x038c);
13775                 MP_WritePhyUshort(sc, 0x19, 0x337e);
13776                 MP_WritePhyUshort(sc, 0x15, 0x038d);
13777                 MP_WritePhyUshort(sc, 0x19, 0x6c0b);
13778                 MP_WritePhyUshort(sc, 0x15, 0x038e);
13779                 MP_WritePhyUshort(sc, 0x19, 0xa107);
13780                 MP_WritePhyUshort(sc, 0x15, 0x038f);
13781                 MP_WritePhyUshort(sc, 0x19, 0x6c08);
13782                 MP_WritePhyUshort(sc, 0x15, 0x0390);
13783                 MP_WritePhyUshort(sc, 0x19, 0xc017);
13784                 MP_WritePhyUshort(sc, 0x15, 0x0391);
13785                 MP_WritePhyUshort(sc, 0x19, 0x0004);
13786                 MP_WritePhyUshort(sc, 0x15, 0x0392);
13787                 MP_WritePhyUshort(sc, 0x19, 0xd64f);
13788                 MP_WritePhyUshort(sc, 0x15, 0x0393);
13789                 MP_WritePhyUshort(sc, 0x19, 0x00f4);
13790                 MP_WritePhyUshort(sc, 0x15, 0x0397);
13791                 MP_WritePhyUshort(sc, 0x19, 0x4098);
13792                 MP_WritePhyUshort(sc, 0x15, 0x0398);
13793                 MP_WritePhyUshort(sc, 0x19, 0x4408);
13794                 MP_WritePhyUshort(sc, 0x15, 0x0399);
13795                 MP_WritePhyUshort(sc, 0x19, 0x55bf);
13796                 MP_WritePhyUshort(sc, 0x15, 0x039a);
13797                 MP_WritePhyUshort(sc, 0x19, 0x4bb9);
13798                 MP_WritePhyUshort(sc, 0x15, 0x039b);
13799                 MP_WritePhyUshort(sc, 0x19, 0x6810);
13800                 MP_WritePhyUshort(sc, 0x15, 0x039c);
13801                 MP_WritePhyUshort(sc, 0x19, 0x4b29);
13802                 MP_WritePhyUshort(sc, 0x15, 0x039d);
13803                 MP_WritePhyUshort(sc, 0x19, 0x4041);
13804                 MP_WritePhyUshort(sc, 0x15, 0x039e);
13805                 MP_WritePhyUshort(sc, 0x19, 0x442a);
13806                 MP_WritePhyUshort(sc, 0x15, 0x039f);
13807                 MP_WritePhyUshort(sc, 0x19, 0x4029);
13808                 MP_WritePhyUshort(sc, 0x15, 0x03aa);
13809                 MP_WritePhyUshort(sc, 0x19, 0x33b8);
13810                 MP_WritePhyUshort(sc, 0x15, 0x03b6);
13811                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13812                 MP_WritePhyUshort(sc, 0x15, 0x03b7);
13813                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13814                 MP_WritePhyUshort(sc, 0x15, 0x03b8);
13815                 MP_WritePhyUshort(sc, 0x19, 0x543f);
13816                 MP_WritePhyUshort(sc, 0x15, 0x03b9);
13817                 MP_WritePhyUshort(sc, 0x19, 0x499a);
13818                 MP_WritePhyUshort(sc, 0x15, 0x03ba);
13819                 MP_WritePhyUshort(sc, 0x19, 0x7c40);
13820                 MP_WritePhyUshort(sc, 0x15, 0x03bb);
13821                 MP_WritePhyUshort(sc, 0x19, 0x4c40);
13822                 MP_WritePhyUshort(sc, 0x15, 0x03bc);
13823                 MP_WritePhyUshort(sc, 0x19, 0x490a);
13824                 MP_WritePhyUshort(sc, 0x15, 0x03bd);
13825                 MP_WritePhyUshort(sc, 0x19, 0x405e);
13826                 MP_WritePhyUshort(sc, 0x15, 0x03c2);
13827                 MP_WritePhyUshort(sc, 0x19, 0x9a03);
13828                 MP_WritePhyUshort(sc, 0x15, 0x03c4);
13829                 MP_WritePhyUshort(sc, 0x19, 0x0015);
13830                 MP_WritePhyUshort(sc, 0x15, 0x03c5);
13831                 MP_WritePhyUshort(sc, 0x19, 0x9e03);
13832                 MP_WritePhyUshort(sc, 0x15, 0x03c8);
13833                 MP_WritePhyUshort(sc, 0x19, 0x9cf7);
13834                 MP_WritePhyUshort(sc, 0x15, 0x03c9);
13835                 MP_WritePhyUshort(sc, 0x19, 0x7c12);
13836                 MP_WritePhyUshort(sc, 0x15, 0x03ca);
13837                 MP_WritePhyUshort(sc, 0x19, 0x4c52);
13838                 MP_WritePhyUshort(sc, 0x15, 0x03cb);
13839                 MP_WritePhyUshort(sc, 0x19, 0x4458);
13840                 MP_WritePhyUshort(sc, 0x15, 0x03cd);
13841                 MP_WritePhyUshort(sc, 0x19, 0x4c40);
13842                 MP_WritePhyUshort(sc, 0x15, 0x03ce);
13843                 MP_WritePhyUshort(sc, 0x19, 0x33bf);
13844                 MP_WritePhyUshort(sc, 0x15, 0x03cf);
13845                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13846                 MP_WritePhyUshort(sc, 0x15, 0x03d0);
13847                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13848                 MP_WritePhyUshort(sc, 0x15, 0x03d1);
13849                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13850                 MP_WritePhyUshort(sc, 0x15, 0x03d5);
13851                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13852                 MP_WritePhyUshort(sc, 0x15, 0x03d6);
13853                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13854                 MP_WritePhyUshort(sc, 0x15, 0x03d7);
13855                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13856                 MP_WritePhyUshort(sc, 0x15, 0x03d8);
13857                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13858                 MP_WritePhyUshort(sc, 0x15, 0x03d9);
13859                 MP_WritePhyUshort(sc, 0x19, 0x49bb);
13860                 MP_WritePhyUshort(sc, 0x15, 0x03da);
13861                 MP_WritePhyUshort(sc, 0x19, 0x4478);
13862                 MP_WritePhyUshort(sc, 0x15, 0x03db);
13863                 MP_WritePhyUshort(sc, 0x19, 0x492b);
13864                 MP_WritePhyUshort(sc, 0x15, 0x03dc);
13865                 MP_WritePhyUshort(sc, 0x19, 0x7c01);
13866                 MP_WritePhyUshort(sc, 0x15, 0x03dd);
13867                 MP_WritePhyUshort(sc, 0x19, 0x4c00);
13868                 MP_WritePhyUshort(sc, 0x15, 0x03de);
13869                 MP_WritePhyUshort(sc, 0x19, 0xbd1a);
13870                 MP_WritePhyUshort(sc, 0x15, 0x03df);
13871                 MP_WritePhyUshort(sc, 0x19, 0xc428);
13872                 MP_WritePhyUshort(sc, 0x15, 0x03e0);
13873                 MP_WritePhyUshort(sc, 0x19, 0x0008);
13874                 MP_WritePhyUshort(sc, 0x15, 0x03e1);
13875                 MP_WritePhyUshort(sc, 0x19, 0x9cfd);
13876                 MP_WritePhyUshort(sc, 0x15, 0x03e2);
13877                 MP_WritePhyUshort(sc, 0x19, 0x7c12);
13878                 MP_WritePhyUshort(sc, 0x15, 0x03e3);
13879                 MP_WritePhyUshort(sc, 0x19, 0x4c52);
13880                 MP_WritePhyUshort(sc, 0x15, 0x03e4);
13881                 MP_WritePhyUshort(sc, 0x19, 0x4458);
13882                 MP_WritePhyUshort(sc, 0x15, 0x03e5);
13883                 MP_WritePhyUshort(sc, 0x19, 0x7c12);
13884                 MP_WritePhyUshort(sc, 0x15, 0x03e6);
13885                 MP_WritePhyUshort(sc, 0x19, 0x4c40);
13886                 MP_WritePhyUshort(sc, 0x15, 0x03e7);
13887                 MP_WritePhyUshort(sc, 0x19, 0x33de);
13888                 MP_WritePhyUshort(sc, 0x15, 0x03e8);
13889                 MP_WritePhyUshort(sc, 0x19, 0xc218);
13890                 MP_WritePhyUshort(sc, 0x15, 0x03e9);
13891                 MP_WritePhyUshort(sc, 0x19, 0x0002);
13892                 MP_WritePhyUshort(sc, 0x15, 0x03ea);
13893                 MP_WritePhyUshort(sc, 0x19, 0x32df);
13894                 MP_WritePhyUshort(sc, 0x15, 0x03eb);
13895                 MP_WritePhyUshort(sc, 0x19, 0x3316);
13896                 MP_WritePhyUshort(sc, 0x15, 0x03ec);
13897                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13898                 MP_WritePhyUshort(sc, 0x15, 0x03ed);
13899                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13900                 MP_WritePhyUshort(sc, 0x15, 0x03ee);
13901                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13902                 MP_WritePhyUshort(sc, 0x15, 0x03ef);
13903                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13904                 MP_WritePhyUshort(sc, 0x15, 0x03f7);
13905                 MP_WritePhyUshort(sc, 0x19, 0x330c);
13906                 MP_WritePhyUshort(sc, 0x16, 0x0306);
13907                 MP_WritePhyUshort(sc, 0x16, 0x0300);
13908 
13909                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
13910                 MP_WritePhyUshort(sc, 0x05, 0xfff6);
13911                 MP_WritePhyUshort(sc, 0x06, 0x0080);
13912                 MP_WritePhyUshort(sc, 0x05, 0x8000);
13913                 MP_WritePhyUshort(sc, 0x06, 0x0280);
13914                 MP_WritePhyUshort(sc, 0x06, 0x48f7);
13915                 MP_WritePhyUshort(sc, 0x06, 0x00e0);
13916                 MP_WritePhyUshort(sc, 0x06, 0xfff7);
13917                 MP_WritePhyUshort(sc, 0x06, 0xa080);
13918                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
13919                 MP_WritePhyUshort(sc, 0x06, 0xf602);
13920                 MP_WritePhyUshort(sc, 0x06, 0x0200);
13921                 MP_WritePhyUshort(sc, 0x06, 0x0280);
13922                 MP_WritePhyUshort(sc, 0x06, 0x9002);
13923                 MP_WritePhyUshort(sc, 0x06, 0x0224);
13924                 MP_WritePhyUshort(sc, 0x06, 0x0202);
13925                 MP_WritePhyUshort(sc, 0x06, 0x3402);
13926                 MP_WritePhyUshort(sc, 0x06, 0x027f);
13927                 MP_WritePhyUshort(sc, 0x06, 0x0280);
13928                 MP_WritePhyUshort(sc, 0x06, 0xa602);
13929                 MP_WritePhyUshort(sc, 0x06, 0x80bf);
13930                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
13931                 MP_WritePhyUshort(sc, 0x06, 0x88e1);
13932                 MP_WritePhyUshort(sc, 0x06, 0x8b89);
13933                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
13934                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
13935                 MP_WritePhyUshort(sc, 0x06, 0x8a1e);
13936                 MP_WritePhyUshort(sc, 0x06, 0x01e1);
13937                 MP_WritePhyUshort(sc, 0x06, 0x8b8b);
13938                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
13939                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
13940                 MP_WritePhyUshort(sc, 0x06, 0x8c1e);
13941                 MP_WritePhyUshort(sc, 0x06, 0x01e1);
13942                 MP_WritePhyUshort(sc, 0x06, 0x8b8d);
13943                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
13944                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
13945                 MP_WritePhyUshort(sc, 0x06, 0x8e1e);
13946                 MP_WritePhyUshort(sc, 0x06, 0x01a0);
13947                 MP_WritePhyUshort(sc, 0x06, 0x00c7);
13948                 MP_WritePhyUshort(sc, 0x06, 0xaebb);
13949                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
13950                 MP_WritePhyUshort(sc, 0x06, 0xe600);
13951                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
13952                 MP_WritePhyUshort(sc, 0x06, 0xee03);
13953                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
13954                 MP_WritePhyUshort(sc, 0x06, 0xefb8);
13955                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
13956                 MP_WritePhyUshort(sc, 0x06, 0xe902);
13957                 MP_WritePhyUshort(sc, 0x06, 0xee8b);
13958                 MP_WritePhyUshort(sc, 0x06, 0x8285);
13959                 MP_WritePhyUshort(sc, 0x06, 0xee8b);
13960                 MP_WritePhyUshort(sc, 0x06, 0x8520);
13961                 MP_WritePhyUshort(sc, 0x06, 0xee8b);
13962                 MP_WritePhyUshort(sc, 0x06, 0x8701);
13963                 MP_WritePhyUshort(sc, 0x06, 0xd481);
13964                 MP_WritePhyUshort(sc, 0x06, 0x35e4);
13965                 MP_WritePhyUshort(sc, 0x06, 0x8b94);
13966                 MP_WritePhyUshort(sc, 0x06, 0xe58b);
13967                 MP_WritePhyUshort(sc, 0x06, 0x95bf);
13968                 MP_WritePhyUshort(sc, 0x06, 0x8b88);
13969                 MP_WritePhyUshort(sc, 0x06, 0xec00);
13970                 MP_WritePhyUshort(sc, 0x06, 0x19a9);
13971                 MP_WritePhyUshort(sc, 0x06, 0x8b90);
13972                 MP_WritePhyUshort(sc, 0x06, 0xf9ee);
13973                 MP_WritePhyUshort(sc, 0x06, 0xfff6);
13974                 MP_WritePhyUshort(sc, 0x06, 0x00ee);
13975                 MP_WritePhyUshort(sc, 0x06, 0xfff7);
13976                 MP_WritePhyUshort(sc, 0x06, 0xffe0);
13977                 MP_WritePhyUshort(sc, 0x06, 0xe140);
13978                 MP_WritePhyUshort(sc, 0x06, 0xe1e1);
13979                 MP_WritePhyUshort(sc, 0x06, 0x41f7);
13980                 MP_WritePhyUshort(sc, 0x06, 0x2ff6);
13981                 MP_WritePhyUshort(sc, 0x06, 0x28e4);
13982                 MP_WritePhyUshort(sc, 0x06, 0xe140);
13983                 MP_WritePhyUshort(sc, 0x06, 0xe5e1);
13984                 MP_WritePhyUshort(sc, 0x06, 0x4104);
13985                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
13986                 MP_WritePhyUshort(sc, 0x06, 0x8b89);
13987                 MP_WritePhyUshort(sc, 0x06, 0xad20);
13988                 MP_WritePhyUshort(sc, 0x06, 0x0dee);
13989                 MP_WritePhyUshort(sc, 0x06, 0x8b89);
13990                 MP_WritePhyUshort(sc, 0x06, 0x0002);
13991                 MP_WritePhyUshort(sc, 0x06, 0x82f4);
13992                 MP_WritePhyUshort(sc, 0x06, 0x021f);
13993                 MP_WritePhyUshort(sc, 0x06, 0x4102);
13994                 MP_WritePhyUshort(sc, 0x06, 0x2812);
13995                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
13996                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
13997                 MP_WritePhyUshort(sc, 0x06, 0x8b8d);
13998                 MP_WritePhyUshort(sc, 0x06, 0xad20);
13999                 MP_WritePhyUshort(sc, 0x06, 0x10ee);
14000                 MP_WritePhyUshort(sc, 0x06, 0x8b8d);
14001                 MP_WritePhyUshort(sc, 0x06, 0x0002);
14002                 MP_WritePhyUshort(sc, 0x06, 0x139d);
14003                 MP_WritePhyUshort(sc, 0x06, 0x0281);
14004                 MP_WritePhyUshort(sc, 0x06, 0xd602);
14005                 MP_WritePhyUshort(sc, 0x06, 0x1f99);
14006                 MP_WritePhyUshort(sc, 0x06, 0x0227);
14007                 MP_WritePhyUshort(sc, 0x06, 0xeafc);
14008                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
14009                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14010                 MP_WritePhyUshort(sc, 0x06, 0x8ead);
14011                 MP_WritePhyUshort(sc, 0x06, 0x2014);
14012                 MP_WritePhyUshort(sc, 0x06, 0xf620);
14013                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
14014                 MP_WritePhyUshort(sc, 0x06, 0x8e02);
14015                 MP_WritePhyUshort(sc, 0x06, 0x8104);
14016                 MP_WritePhyUshort(sc, 0x06, 0x021b);
14017                 MP_WritePhyUshort(sc, 0x06, 0xf402);
14018                 MP_WritePhyUshort(sc, 0x06, 0x2c9c);
14019                 MP_WritePhyUshort(sc, 0x06, 0x0281);
14020                 MP_WritePhyUshort(sc, 0x06, 0x7902);
14021                 MP_WritePhyUshort(sc, 0x06, 0x8443);
14022                 MP_WritePhyUshort(sc, 0x06, 0xad22);
14023                 MP_WritePhyUshort(sc, 0x06, 0x11f6);
14024                 MP_WritePhyUshort(sc, 0x06, 0x22e4);
14025                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
14026                 MP_WritePhyUshort(sc, 0x06, 0x022c);
14027                 MP_WritePhyUshort(sc, 0x06, 0x4602);
14028                 MP_WritePhyUshort(sc, 0x06, 0x2ac5);
14029                 MP_WritePhyUshort(sc, 0x06, 0x0229);
14030                 MP_WritePhyUshort(sc, 0x06, 0x2002);
14031                 MP_WritePhyUshort(sc, 0x06, 0x2b91);
14032                 MP_WritePhyUshort(sc, 0x06, 0xad25);
14033                 MP_WritePhyUshort(sc, 0x06, 0x11f6);
14034                 MP_WritePhyUshort(sc, 0x06, 0x25e4);
14035                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
14036                 MP_WritePhyUshort(sc, 0x06, 0x0284);
14037                 MP_WritePhyUshort(sc, 0x06, 0xe202);
14038                 MP_WritePhyUshort(sc, 0x06, 0x043a);
14039                 MP_WritePhyUshort(sc, 0x06, 0x021a);
14040                 MP_WritePhyUshort(sc, 0x06, 0x5902);
14041                 MP_WritePhyUshort(sc, 0x06, 0x2bfc);
14042                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
14043                 MP_WritePhyUshort(sc, 0x06, 0xf8fa);
14044                 MP_WritePhyUshort(sc, 0x06, 0xef69);
14045                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
14046                 MP_WritePhyUshort(sc, 0x06, 0x00e1);
14047                 MP_WritePhyUshort(sc, 0x06, 0xe001);
14048                 MP_WritePhyUshort(sc, 0x06, 0xad27);
14049                 MP_WritePhyUshort(sc, 0x06, 0x1fd1);
14050                 MP_WritePhyUshort(sc, 0x06, 0x01bf);
14051                 MP_WritePhyUshort(sc, 0x06, 0x8638);
14052                 MP_WritePhyUshort(sc, 0x06, 0x022f);
14053                 MP_WritePhyUshort(sc, 0x06, 0x50e0);
14054                 MP_WritePhyUshort(sc, 0x06, 0xe020);
14055                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
14056                 MP_WritePhyUshort(sc, 0x06, 0x21ad);
14057                 MP_WritePhyUshort(sc, 0x06, 0x200e);
14058                 MP_WritePhyUshort(sc, 0x06, 0xd100);
14059                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
14060                 MP_WritePhyUshort(sc, 0x06, 0x3802);
14061                 MP_WritePhyUshort(sc, 0x06, 0x2f50);
14062                 MP_WritePhyUshort(sc, 0x06, 0xbf3d);
14063                 MP_WritePhyUshort(sc, 0x06, 0x3902);
14064                 MP_WritePhyUshort(sc, 0x06, 0x2eb0);
14065                 MP_WritePhyUshort(sc, 0x06, 0xef96);
14066                 MP_WritePhyUshort(sc, 0x06, 0xfefc);
14067                 MP_WritePhyUshort(sc, 0x06, 0x0402);
14068                 MP_WritePhyUshort(sc, 0x06, 0x8591);
14069                 MP_WritePhyUshort(sc, 0x06, 0x0281);
14070                 MP_WritePhyUshort(sc, 0x06, 0x3c05);
14071                 MP_WritePhyUshort(sc, 0x06, 0xf8fa);
14072                 MP_WritePhyUshort(sc, 0x06, 0xef69);
14073                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
14074                 MP_WritePhyUshort(sc, 0x06, 0xfee1);
14075                 MP_WritePhyUshort(sc, 0x06, 0xe2ff);
14076                 MP_WritePhyUshort(sc, 0x06, 0xad2d);
14077                 MP_WritePhyUshort(sc, 0x06, 0x1ae0);
14078                 MP_WritePhyUshort(sc, 0x06, 0xe14e);
14079                 MP_WritePhyUshort(sc, 0x06, 0xe1e1);
14080                 MP_WritePhyUshort(sc, 0x06, 0x4fac);
14081                 MP_WritePhyUshort(sc, 0x06, 0x2d22);
14082                 MP_WritePhyUshort(sc, 0x06, 0xf603);
14083                 MP_WritePhyUshort(sc, 0x06, 0x0203);
14084                 MP_WritePhyUshort(sc, 0x06, 0x36f7);
14085                 MP_WritePhyUshort(sc, 0x06, 0x03f7);
14086                 MP_WritePhyUshort(sc, 0x06, 0x06bf);
14087                 MP_WritePhyUshort(sc, 0x06, 0x8622);
14088                 MP_WritePhyUshort(sc, 0x06, 0x022e);
14089                 MP_WritePhyUshort(sc, 0x06, 0xb0ae);
14090                 MP_WritePhyUshort(sc, 0x06, 0x11e0);
14091                 MP_WritePhyUshort(sc, 0x06, 0xe14e);
14092                 MP_WritePhyUshort(sc, 0x06, 0xe1e1);
14093                 MP_WritePhyUshort(sc, 0x06, 0x4fad);
14094                 MP_WritePhyUshort(sc, 0x06, 0x2d08);
14095                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
14096                 MP_WritePhyUshort(sc, 0x06, 0x2d02);
14097                 MP_WritePhyUshort(sc, 0x06, 0x2eb0);
14098                 MP_WritePhyUshort(sc, 0x06, 0xf606);
14099                 MP_WritePhyUshort(sc, 0x06, 0xef96);
14100                 MP_WritePhyUshort(sc, 0x06, 0xfefc);
14101                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
14102                 MP_WritePhyUshort(sc, 0x06, 0xf9fa);
14103                 MP_WritePhyUshort(sc, 0x06, 0xef69);
14104                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14105                 MP_WritePhyUshort(sc, 0x06, 0x87ad);
14106                 MP_WritePhyUshort(sc, 0x06, 0x204c);
14107                 MP_WritePhyUshort(sc, 0x06, 0xd200);
14108                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
14109                 MP_WritePhyUshort(sc, 0x06, 0x0058);
14110                 MP_WritePhyUshort(sc, 0x06, 0x010c);
14111                 MP_WritePhyUshort(sc, 0x06, 0x021e);
14112                 MP_WritePhyUshort(sc, 0x06, 0x20e0);
14113                 MP_WritePhyUshort(sc, 0x06, 0xe000);
14114                 MP_WritePhyUshort(sc, 0x06, 0x5810);
14115                 MP_WritePhyUshort(sc, 0x06, 0x1e20);
14116                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
14117                 MP_WritePhyUshort(sc, 0x06, 0x3658);
14118                 MP_WritePhyUshort(sc, 0x06, 0x031e);
14119                 MP_WritePhyUshort(sc, 0x06, 0x20e0);
14120                 MP_WritePhyUshort(sc, 0x06, 0xe022);
14121                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
14122                 MP_WritePhyUshort(sc, 0x06, 0x2358);
14123                 MP_WritePhyUshort(sc, 0x06, 0xe01e);
14124                 MP_WritePhyUshort(sc, 0x06, 0x20e0);
14125                 MP_WritePhyUshort(sc, 0x06, 0x8ae6);
14126                 MP_WritePhyUshort(sc, 0x06, 0x1f02);
14127                 MP_WritePhyUshort(sc, 0x06, 0x9e22);
14128                 MP_WritePhyUshort(sc, 0x06, 0xe68a);
14129                 MP_WritePhyUshort(sc, 0x06, 0xe6ad);
14130                 MP_WritePhyUshort(sc, 0x06, 0x3214);
14131                 MP_WritePhyUshort(sc, 0x06, 0xad34);
14132                 MP_WritePhyUshort(sc, 0x06, 0x11ef);
14133                 MP_WritePhyUshort(sc, 0x06, 0x0258);
14134                 MP_WritePhyUshort(sc, 0x06, 0x039e);
14135                 MP_WritePhyUshort(sc, 0x06, 0x07ad);
14136                 MP_WritePhyUshort(sc, 0x06, 0x3508);
14137                 MP_WritePhyUshort(sc, 0x06, 0x5ac0);
14138                 MP_WritePhyUshort(sc, 0x06, 0x9f04);
14139                 MP_WritePhyUshort(sc, 0x06, 0xd101);
14140                 MP_WritePhyUshort(sc, 0x06, 0xae02);
14141                 MP_WritePhyUshort(sc, 0x06, 0xd100);
14142                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
14143                 MP_WritePhyUshort(sc, 0x06, 0x3e02);
14144                 MP_WritePhyUshort(sc, 0x06, 0x2f50);
14145                 MP_WritePhyUshort(sc, 0x06, 0xef96);
14146                 MP_WritePhyUshort(sc, 0x06, 0xfefd);
14147                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
14148                 MP_WritePhyUshort(sc, 0x06, 0xf8f9);
14149                 MP_WritePhyUshort(sc, 0x06, 0xfae0);
14150                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
14151                 MP_WritePhyUshort(sc, 0x06, 0xac26);
14152                 MP_WritePhyUshort(sc, 0x06, 0x0ee0);
14153                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
14154                 MP_WritePhyUshort(sc, 0x06, 0xac21);
14155                 MP_WritePhyUshort(sc, 0x06, 0x08e0);
14156                 MP_WritePhyUshort(sc, 0x06, 0x8b87);
14157                 MP_WritePhyUshort(sc, 0x06, 0xac24);
14158                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
14159                 MP_WritePhyUshort(sc, 0x06, 0x6bee);
14160                 MP_WritePhyUshort(sc, 0x06, 0xe0ea);
14161                 MP_WritePhyUshort(sc, 0x06, 0x00ee);
14162                 MP_WritePhyUshort(sc, 0x06, 0xe0eb);
14163                 MP_WritePhyUshort(sc, 0x06, 0x00e2);
14164                 MP_WritePhyUshort(sc, 0x06, 0xe07c);
14165                 MP_WritePhyUshort(sc, 0x06, 0xe3e0);
14166                 MP_WritePhyUshort(sc, 0x06, 0x7da5);
14167                 MP_WritePhyUshort(sc, 0x06, 0x1111);
14168                 MP_WritePhyUshort(sc, 0x06, 0x15d2);
14169                 MP_WritePhyUshort(sc, 0x06, 0x60d6);
14170                 MP_WritePhyUshort(sc, 0x06, 0x6666);
14171                 MP_WritePhyUshort(sc, 0x06, 0x0207);
14172                 MP_WritePhyUshort(sc, 0x06, 0xf9d2);
14173                 MP_WritePhyUshort(sc, 0x06, 0xa0d6);
14174                 MP_WritePhyUshort(sc, 0x06, 0xaaaa);
14175                 MP_WritePhyUshort(sc, 0x06, 0x0207);
14176                 MP_WritePhyUshort(sc, 0x06, 0xf902);
14177                 MP_WritePhyUshort(sc, 0x06, 0x825c);
14178                 MP_WritePhyUshort(sc, 0x06, 0xae44);
14179                 MP_WritePhyUshort(sc, 0x06, 0xa566);
14180                 MP_WritePhyUshort(sc, 0x06, 0x6602);
14181                 MP_WritePhyUshort(sc, 0x06, 0xae38);
14182                 MP_WritePhyUshort(sc, 0x06, 0xa5aa);
14183                 MP_WritePhyUshort(sc, 0x06, 0xaa02);
14184                 MP_WritePhyUshort(sc, 0x06, 0xae32);
14185                 MP_WritePhyUshort(sc, 0x06, 0xeee0);
14186                 MP_WritePhyUshort(sc, 0x06, 0xea04);
14187                 MP_WritePhyUshort(sc, 0x06, 0xeee0);
14188                 MP_WritePhyUshort(sc, 0x06, 0xeb06);
14189                 MP_WritePhyUshort(sc, 0x06, 0xe2e0);
14190                 MP_WritePhyUshort(sc, 0x06, 0x7ce3);
14191                 MP_WritePhyUshort(sc, 0x06, 0xe07d);
14192                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
14193                 MP_WritePhyUshort(sc, 0x06, 0x38e1);
14194                 MP_WritePhyUshort(sc, 0x06, 0xe039);
14195                 MP_WritePhyUshort(sc, 0x06, 0xad2e);
14196                 MP_WritePhyUshort(sc, 0x06, 0x21ad);
14197                 MP_WritePhyUshort(sc, 0x06, 0x3f13);
14198                 MP_WritePhyUshort(sc, 0x06, 0xe0e4);
14199                 MP_WritePhyUshort(sc, 0x06, 0x14e1);
14200                 MP_WritePhyUshort(sc, 0x06, 0xe415);
14201                 MP_WritePhyUshort(sc, 0x06, 0x6880);
14202                 MP_WritePhyUshort(sc, 0x06, 0xe4e4);
14203                 MP_WritePhyUshort(sc, 0x06, 0x14e5);
14204                 MP_WritePhyUshort(sc, 0x06, 0xe415);
14205                 MP_WritePhyUshort(sc, 0x06, 0x0282);
14206                 MP_WritePhyUshort(sc, 0x06, 0x5cae);
14207                 MP_WritePhyUshort(sc, 0x06, 0x0bac);
14208                 MP_WritePhyUshort(sc, 0x06, 0x3e02);
14209                 MP_WritePhyUshort(sc, 0x06, 0xae06);
14210                 MP_WritePhyUshort(sc, 0x06, 0x0282);
14211                 MP_WritePhyUshort(sc, 0x06, 0x8602);
14212                 MP_WritePhyUshort(sc, 0x06, 0x82b0);
14213                 MP_WritePhyUshort(sc, 0x06, 0xfefd);
14214                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
14215                 MP_WritePhyUshort(sc, 0x06, 0xf8e1);
14216                 MP_WritePhyUshort(sc, 0x06, 0x8b2e);
14217                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14218                 MP_WritePhyUshort(sc, 0x06, 0x81ad);
14219                 MP_WritePhyUshort(sc, 0x06, 0x2605);
14220                 MP_WritePhyUshort(sc, 0x06, 0x0221);
14221                 MP_WritePhyUshort(sc, 0x06, 0xf3f7);
14222                 MP_WritePhyUshort(sc, 0x06, 0x28e0);
14223                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
14224                 MP_WritePhyUshort(sc, 0x06, 0xad21);
14225                 MP_WritePhyUshort(sc, 0x06, 0x0502);
14226                 MP_WritePhyUshort(sc, 0x06, 0x22f8);
14227                 MP_WritePhyUshort(sc, 0x06, 0xf729);
14228                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14229                 MP_WritePhyUshort(sc, 0x06, 0x87ad);
14230                 MP_WritePhyUshort(sc, 0x06, 0x2405);
14231                 MP_WritePhyUshort(sc, 0x06, 0x0282);
14232                 MP_WritePhyUshort(sc, 0x06, 0xebf7);
14233                 MP_WritePhyUshort(sc, 0x06, 0x2ae5);
14234                 MP_WritePhyUshort(sc, 0x06, 0x8b2e);
14235                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
14236                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
14237                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
14238                 MP_WritePhyUshort(sc, 0x06, 0xad26);
14239                 MP_WritePhyUshort(sc, 0x06, 0x0302);
14240                 MP_WritePhyUshort(sc, 0x06, 0x2134);
14241                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14242                 MP_WritePhyUshort(sc, 0x06, 0x81ad);
14243                 MP_WritePhyUshort(sc, 0x06, 0x2109);
14244                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14245                 MP_WritePhyUshort(sc, 0x06, 0x2eac);
14246                 MP_WritePhyUshort(sc, 0x06, 0x2003);
14247                 MP_WritePhyUshort(sc, 0x06, 0x0283);
14248                 MP_WritePhyUshort(sc, 0x06, 0x52e0);
14249                 MP_WritePhyUshort(sc, 0x06, 0x8b87);
14250                 MP_WritePhyUshort(sc, 0x06, 0xad24);
14251                 MP_WritePhyUshort(sc, 0x06, 0x09e0);
14252                 MP_WritePhyUshort(sc, 0x06, 0x8b2e);
14253                 MP_WritePhyUshort(sc, 0x06, 0xac21);
14254                 MP_WritePhyUshort(sc, 0x06, 0x0302);
14255                 MP_WritePhyUshort(sc, 0x06, 0x8337);
14256                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
14257                 MP_WritePhyUshort(sc, 0x06, 0xf8e1);
14258                 MP_WritePhyUshort(sc, 0x06, 0x8b2e);
14259                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14260                 MP_WritePhyUshort(sc, 0x06, 0x81ad);
14261                 MP_WritePhyUshort(sc, 0x06, 0x2608);
14262                 MP_WritePhyUshort(sc, 0x06, 0xe085);
14263                 MP_WritePhyUshort(sc, 0x06, 0xd2ad);
14264                 MP_WritePhyUshort(sc, 0x06, 0x2502);
14265                 MP_WritePhyUshort(sc, 0x06, 0xf628);
14266                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14267                 MP_WritePhyUshort(sc, 0x06, 0x81ad);
14268                 MP_WritePhyUshort(sc, 0x06, 0x210a);
14269                 MP_WritePhyUshort(sc, 0x06, 0xe086);
14270                 MP_WritePhyUshort(sc, 0x06, 0x0af6);
14271                 MP_WritePhyUshort(sc, 0x06, 0x27a0);
14272                 MP_WritePhyUshort(sc, 0x06, 0x0502);
14273                 MP_WritePhyUshort(sc, 0x06, 0xf629);
14274                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14275                 MP_WritePhyUshort(sc, 0x06, 0x87ad);
14276                 MP_WritePhyUshort(sc, 0x06, 0x2408);
14277                 MP_WritePhyUshort(sc, 0x06, 0xe08a);
14278                 MP_WritePhyUshort(sc, 0x06, 0xedad);
14279                 MP_WritePhyUshort(sc, 0x06, 0x2002);
14280                 MP_WritePhyUshort(sc, 0x06, 0xf62a);
14281                 MP_WritePhyUshort(sc, 0x06, 0xe58b);
14282                 MP_WritePhyUshort(sc, 0x06, 0x2ea1);
14283                 MP_WritePhyUshort(sc, 0x06, 0x0003);
14284                 MP_WritePhyUshort(sc, 0x06, 0x0221);
14285                 MP_WritePhyUshort(sc, 0x06, 0x11fc);
14286                 MP_WritePhyUshort(sc, 0x06, 0x04ee);
14287                 MP_WritePhyUshort(sc, 0x06, 0x8aed);
14288                 MP_WritePhyUshort(sc, 0x06, 0x00ee);
14289                 MP_WritePhyUshort(sc, 0x06, 0x8aec);
14290                 MP_WritePhyUshort(sc, 0x06, 0x0004);
14291                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
14292                 MP_WritePhyUshort(sc, 0x06, 0x8b87);
14293                 MP_WritePhyUshort(sc, 0x06, 0xad24);
14294                 MP_WritePhyUshort(sc, 0x06, 0x3ae0);
14295                 MP_WritePhyUshort(sc, 0x06, 0xe0ea);
14296                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
14297                 MP_WritePhyUshort(sc, 0x06, 0xeb58);
14298                 MP_WritePhyUshort(sc, 0x06, 0xf8d1);
14299                 MP_WritePhyUshort(sc, 0x06, 0x01e4);
14300                 MP_WritePhyUshort(sc, 0x06, 0xe0ea);
14301                 MP_WritePhyUshort(sc, 0x06, 0xe5e0);
14302                 MP_WritePhyUshort(sc, 0x06, 0xebe0);
14303                 MP_WritePhyUshort(sc, 0x06, 0xe07c);
14304                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
14305                 MP_WritePhyUshort(sc, 0x06, 0x7d5c);
14306                 MP_WritePhyUshort(sc, 0x06, 0x00ff);
14307                 MP_WritePhyUshort(sc, 0x06, 0x3c00);
14308                 MP_WritePhyUshort(sc, 0x06, 0x1eab);
14309                 MP_WritePhyUshort(sc, 0x06, 0x1ce0);
14310                 MP_WritePhyUshort(sc, 0x06, 0xe04c);
14311                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
14312                 MP_WritePhyUshort(sc, 0x06, 0x4d58);
14313                 MP_WritePhyUshort(sc, 0x06, 0xc1e4);
14314                 MP_WritePhyUshort(sc, 0x06, 0xe04c);
14315                 MP_WritePhyUshort(sc, 0x06, 0xe5e0);
14316                 MP_WritePhyUshort(sc, 0x06, 0x4de0);
14317                 MP_WritePhyUshort(sc, 0x06, 0xe0ee);
14318                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
14319                 MP_WritePhyUshort(sc, 0x06, 0xef69);
14320                 MP_WritePhyUshort(sc, 0x06, 0x3ce4);
14321                 MP_WritePhyUshort(sc, 0x06, 0xe0ee);
14322                 MP_WritePhyUshort(sc, 0x06, 0xe5e0);
14323                 MP_WritePhyUshort(sc, 0x06, 0xeffc);
14324                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
14325                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14326                 MP_WritePhyUshort(sc, 0x06, 0x87ad);
14327                 MP_WritePhyUshort(sc, 0x06, 0x2412);
14328                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
14329                 MP_WritePhyUshort(sc, 0x06, 0xeee1);
14330                 MP_WritePhyUshort(sc, 0x06, 0xe0ef);
14331                 MP_WritePhyUshort(sc, 0x06, 0x59c3);
14332                 MP_WritePhyUshort(sc, 0x06, 0xe4e0);
14333                 MP_WritePhyUshort(sc, 0x06, 0xeee5);
14334                 MP_WritePhyUshort(sc, 0x06, 0xe0ef);
14335                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
14336                 MP_WritePhyUshort(sc, 0x06, 0xed01);
14337                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
14338                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
14339                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
14340                 MP_WritePhyUshort(sc, 0x06, 0xac25);
14341                 MP_WritePhyUshort(sc, 0x06, 0x0502);
14342                 MP_WritePhyUshort(sc, 0x06, 0x8363);
14343                 MP_WritePhyUshort(sc, 0x06, 0xae03);
14344                 MP_WritePhyUshort(sc, 0x06, 0x0225);
14345                 MP_WritePhyUshort(sc, 0x06, 0x16fc);
14346                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
14347                 MP_WritePhyUshort(sc, 0x06, 0xf9fa);
14348                 MP_WritePhyUshort(sc, 0x06, 0xef69);
14349                 MP_WritePhyUshort(sc, 0x06, 0xfae0);
14350                 MP_WritePhyUshort(sc, 0x06, 0x860a);
14351                 MP_WritePhyUshort(sc, 0x06, 0xa000);
14352                 MP_WritePhyUshort(sc, 0x06, 0x19e0);
14353                 MP_WritePhyUshort(sc, 0x06, 0x860b);
14354                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
14355                 MP_WritePhyUshort(sc, 0x06, 0x331b);
14356                 MP_WritePhyUshort(sc, 0x06, 0x109e);
14357                 MP_WritePhyUshort(sc, 0x06, 0x04aa);
14358                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
14359                 MP_WritePhyUshort(sc, 0x06, 0x06ee);
14360                 MP_WritePhyUshort(sc, 0x06, 0x860a);
14361                 MP_WritePhyUshort(sc, 0x06, 0x01ae);
14362                 MP_WritePhyUshort(sc, 0x06, 0xe602);
14363                 MP_WritePhyUshort(sc, 0x06, 0x241e);
14364                 MP_WritePhyUshort(sc, 0x06, 0xae14);
14365                 MP_WritePhyUshort(sc, 0x06, 0xa001);
14366                 MP_WritePhyUshort(sc, 0x06, 0x1402);
14367                 MP_WritePhyUshort(sc, 0x06, 0x2426);
14368                 MP_WritePhyUshort(sc, 0x06, 0xbf26);
14369                 MP_WritePhyUshort(sc, 0x06, 0x6d02);
14370                 MP_WritePhyUshort(sc, 0x06, 0x2eb0);
14371                 MP_WritePhyUshort(sc, 0x06, 0xee86);
14372                 MP_WritePhyUshort(sc, 0x06, 0x0b00);
14373                 MP_WritePhyUshort(sc, 0x06, 0xee86);
14374                 MP_WritePhyUshort(sc, 0x06, 0x0a02);
14375                 MP_WritePhyUshort(sc, 0x06, 0xaf84);
14376                 MP_WritePhyUshort(sc, 0x06, 0x3ca0);
14377                 MP_WritePhyUshort(sc, 0x06, 0x0252);
14378                 MP_WritePhyUshort(sc, 0x06, 0xee86);
14379                 MP_WritePhyUshort(sc, 0x06, 0x0400);
14380                 MP_WritePhyUshort(sc, 0x06, 0xee86);
14381                 MP_WritePhyUshort(sc, 0x06, 0x0500);
14382                 MP_WritePhyUshort(sc, 0x06, 0xe086);
14383                 MP_WritePhyUshort(sc, 0x06, 0x0be1);
14384                 MP_WritePhyUshort(sc, 0x06, 0x8b32);
14385                 MP_WritePhyUshort(sc, 0x06, 0x1b10);
14386                 MP_WritePhyUshort(sc, 0x06, 0x9e04);
14387                 MP_WritePhyUshort(sc, 0x06, 0xaa02);
14388                 MP_WritePhyUshort(sc, 0x06, 0xaecb);
14389                 MP_WritePhyUshort(sc, 0x06, 0xee86);
14390                 MP_WritePhyUshort(sc, 0x06, 0x0b00);
14391                 MP_WritePhyUshort(sc, 0x06, 0x0224);
14392                 MP_WritePhyUshort(sc, 0x06, 0x3ae2);
14393                 MP_WritePhyUshort(sc, 0x06, 0x8604);
14394                 MP_WritePhyUshort(sc, 0x06, 0xe386);
14395                 MP_WritePhyUshort(sc, 0x06, 0x05ef);
14396                 MP_WritePhyUshort(sc, 0x06, 0x65e2);
14397                 MP_WritePhyUshort(sc, 0x06, 0x8606);
14398                 MP_WritePhyUshort(sc, 0x06, 0xe386);
14399                 MP_WritePhyUshort(sc, 0x06, 0x071b);
14400                 MP_WritePhyUshort(sc, 0x06, 0x56aa);
14401                 MP_WritePhyUshort(sc, 0x06, 0x0eef);
14402                 MP_WritePhyUshort(sc, 0x06, 0x56e6);
14403                 MP_WritePhyUshort(sc, 0x06, 0x8606);
14404                 MP_WritePhyUshort(sc, 0x06, 0xe786);
14405                 MP_WritePhyUshort(sc, 0x06, 0x07e2);
14406                 MP_WritePhyUshort(sc, 0x06, 0x8609);
14407                 MP_WritePhyUshort(sc, 0x06, 0xe686);
14408                 MP_WritePhyUshort(sc, 0x06, 0x08e0);
14409                 MP_WritePhyUshort(sc, 0x06, 0x8609);
14410                 MP_WritePhyUshort(sc, 0x06, 0xa000);
14411                 MP_WritePhyUshort(sc, 0x06, 0x07ee);
14412                 MP_WritePhyUshort(sc, 0x06, 0x860a);
14413                 MP_WritePhyUshort(sc, 0x06, 0x03af);
14414                 MP_WritePhyUshort(sc, 0x06, 0x8369);
14415                 MP_WritePhyUshort(sc, 0x06, 0x0224);
14416                 MP_WritePhyUshort(sc, 0x06, 0x8e02);
14417                 MP_WritePhyUshort(sc, 0x06, 0x2426);
14418                 MP_WritePhyUshort(sc, 0x06, 0xae48);
14419                 MP_WritePhyUshort(sc, 0x06, 0xa003);
14420                 MP_WritePhyUshort(sc, 0x06, 0x21e0);
14421                 MP_WritePhyUshort(sc, 0x06, 0x8608);
14422                 MP_WritePhyUshort(sc, 0x06, 0xe186);
14423                 MP_WritePhyUshort(sc, 0x06, 0x091b);
14424                 MP_WritePhyUshort(sc, 0x06, 0x019e);
14425                 MP_WritePhyUshort(sc, 0x06, 0x0caa);
14426                 MP_WritePhyUshort(sc, 0x06, 0x0502);
14427                 MP_WritePhyUshort(sc, 0x06, 0x249d);
14428                 MP_WritePhyUshort(sc, 0x06, 0xaee7);
14429                 MP_WritePhyUshort(sc, 0x06, 0x0224);
14430                 MP_WritePhyUshort(sc, 0x06, 0x8eae);
14431                 MP_WritePhyUshort(sc, 0x06, 0xe2ee);
14432                 MP_WritePhyUshort(sc, 0x06, 0x860a);
14433                 MP_WritePhyUshort(sc, 0x06, 0x04ee);
14434                 MP_WritePhyUshort(sc, 0x06, 0x860b);
14435                 MP_WritePhyUshort(sc, 0x06, 0x00af);
14436                 MP_WritePhyUshort(sc, 0x06, 0x8369);
14437                 MP_WritePhyUshort(sc, 0x06, 0xa004);
14438                 MP_WritePhyUshort(sc, 0x06, 0x15e0);
14439                 MP_WritePhyUshort(sc, 0x06, 0x860b);
14440                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
14441                 MP_WritePhyUshort(sc, 0x06, 0x341b);
14442                 MP_WritePhyUshort(sc, 0x06, 0x109e);
14443                 MP_WritePhyUshort(sc, 0x06, 0x05aa);
14444                 MP_WritePhyUshort(sc, 0x06, 0x03af);
14445                 MP_WritePhyUshort(sc, 0x06, 0x8383);
14446                 MP_WritePhyUshort(sc, 0x06, 0xee86);
14447                 MP_WritePhyUshort(sc, 0x06, 0x0a05);
14448                 MP_WritePhyUshort(sc, 0x06, 0xae0c);
14449                 MP_WritePhyUshort(sc, 0x06, 0xa005);
14450                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
14451                 MP_WritePhyUshort(sc, 0x06, 0x0702);
14452                 MP_WritePhyUshort(sc, 0x06, 0x2309);
14453                 MP_WritePhyUshort(sc, 0x06, 0xee86);
14454                 MP_WritePhyUshort(sc, 0x06, 0x0a00);
14455                 MP_WritePhyUshort(sc, 0x06, 0xfeef);
14456                 MP_WritePhyUshort(sc, 0x06, 0x96fe);
14457                 MP_WritePhyUshort(sc, 0x06, 0xfdfc);
14458                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
14459                 MP_WritePhyUshort(sc, 0x06, 0xf9fa);
14460                 MP_WritePhyUshort(sc, 0x06, 0xef69);
14461                 MP_WritePhyUshort(sc, 0x06, 0xfbe0);
14462                 MP_WritePhyUshort(sc, 0x06, 0x8b85);
14463                 MP_WritePhyUshort(sc, 0x06, 0xad25);
14464                 MP_WritePhyUshort(sc, 0x06, 0x22e0);
14465                 MP_WritePhyUshort(sc, 0x06, 0xe022);
14466                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
14467                 MP_WritePhyUshort(sc, 0x06, 0x23e2);
14468                 MP_WritePhyUshort(sc, 0x06, 0xe036);
14469                 MP_WritePhyUshort(sc, 0x06, 0xe3e0);
14470                 MP_WritePhyUshort(sc, 0x06, 0x375a);
14471                 MP_WritePhyUshort(sc, 0x06, 0xc40d);
14472                 MP_WritePhyUshort(sc, 0x06, 0x0158);
14473                 MP_WritePhyUshort(sc, 0x06, 0x021e);
14474                 MP_WritePhyUshort(sc, 0x06, 0x20e3);
14475                 MP_WritePhyUshort(sc, 0x06, 0x8ae7);
14476                 MP_WritePhyUshort(sc, 0x06, 0xac31);
14477                 MP_WritePhyUshort(sc, 0x06, 0x60ac);
14478                 MP_WritePhyUshort(sc, 0x06, 0x3a08);
14479                 MP_WritePhyUshort(sc, 0x06, 0xac3e);
14480                 MP_WritePhyUshort(sc, 0x06, 0x26ae);
14481                 MP_WritePhyUshort(sc, 0x06, 0x67af);
14482                 MP_WritePhyUshort(sc, 0x06, 0x84db);
14483                 MP_WritePhyUshort(sc, 0x06, 0xad37);
14484                 MP_WritePhyUshort(sc, 0x06, 0x61e0);
14485                 MP_WritePhyUshort(sc, 0x06, 0x8ae8);
14486                 MP_WritePhyUshort(sc, 0x06, 0x10e4);
14487                 MP_WritePhyUshort(sc, 0x06, 0x8ae8);
14488                 MP_WritePhyUshort(sc, 0x06, 0xe18a);
14489                 MP_WritePhyUshort(sc, 0x06, 0xe91b);
14490                 MP_WritePhyUshort(sc, 0x06, 0x109e);
14491                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
14492                 MP_WritePhyUshort(sc, 0x06, 0x51d1);
14493                 MP_WritePhyUshort(sc, 0x06, 0x00bf);
14494                 MP_WritePhyUshort(sc, 0x06, 0x863b);
14495                 MP_WritePhyUshort(sc, 0x06, 0x022f);
14496                 MP_WritePhyUshort(sc, 0x06, 0x50ee);
14497                 MP_WritePhyUshort(sc, 0x06, 0x8ae8);
14498                 MP_WritePhyUshort(sc, 0x06, 0x00ae);
14499                 MP_WritePhyUshort(sc, 0x06, 0x43ad);
14500                 MP_WritePhyUshort(sc, 0x06, 0x3627);
14501                 MP_WritePhyUshort(sc, 0x06, 0xe08a);
14502                 MP_WritePhyUshort(sc, 0x06, 0xeee1);
14503                 MP_WritePhyUshort(sc, 0x06, 0x8aef);
14504                 MP_WritePhyUshort(sc, 0x06, 0xef74);
14505                 MP_WritePhyUshort(sc, 0x06, 0xe08a);
14506                 MP_WritePhyUshort(sc, 0x06, 0xeae1);
14507                 MP_WritePhyUshort(sc, 0x06, 0x8aeb);
14508                 MP_WritePhyUshort(sc, 0x06, 0x1b74);
14509                 MP_WritePhyUshort(sc, 0x06, 0x9e2e);
14510                 MP_WritePhyUshort(sc, 0x06, 0x14e4);
14511                 MP_WritePhyUshort(sc, 0x06, 0x8aea);
14512                 MP_WritePhyUshort(sc, 0x06, 0xe58a);
14513                 MP_WritePhyUshort(sc, 0x06, 0xebef);
14514                 MP_WritePhyUshort(sc, 0x06, 0x74e0);
14515                 MP_WritePhyUshort(sc, 0x06, 0x8aee);
14516                 MP_WritePhyUshort(sc, 0x06, 0xe18a);
14517                 MP_WritePhyUshort(sc, 0x06, 0xef1b);
14518                 MP_WritePhyUshort(sc, 0x06, 0x479e);
14519                 MP_WritePhyUshort(sc, 0x06, 0x0fae);
14520                 MP_WritePhyUshort(sc, 0x06, 0x19ee);
14521                 MP_WritePhyUshort(sc, 0x06, 0x8aea);
14522                 MP_WritePhyUshort(sc, 0x06, 0x00ee);
14523                 MP_WritePhyUshort(sc, 0x06, 0x8aeb);
14524                 MP_WritePhyUshort(sc, 0x06, 0x00ae);
14525                 MP_WritePhyUshort(sc, 0x06, 0x0fac);
14526                 MP_WritePhyUshort(sc, 0x06, 0x390c);
14527                 MP_WritePhyUshort(sc, 0x06, 0xd101);
14528                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
14529                 MP_WritePhyUshort(sc, 0x06, 0x3b02);
14530                 MP_WritePhyUshort(sc, 0x06, 0x2f50);
14531                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
14532                 MP_WritePhyUshort(sc, 0x06, 0xe800);
14533                 MP_WritePhyUshort(sc, 0x06, 0xe68a);
14534                 MP_WritePhyUshort(sc, 0x06, 0xe7ff);
14535                 MP_WritePhyUshort(sc, 0x06, 0xef96);
14536                 MP_WritePhyUshort(sc, 0x06, 0xfefd);
14537                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
14538                 MP_WritePhyUshort(sc, 0x06, 0xf8f9);
14539                 MP_WritePhyUshort(sc, 0x06, 0xfaef);
14540                 MP_WritePhyUshort(sc, 0x06, 0x69e0);
14541                 MP_WritePhyUshort(sc, 0x06, 0xe022);
14542                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
14543                 MP_WritePhyUshort(sc, 0x06, 0x2358);
14544                 MP_WritePhyUshort(sc, 0x06, 0xc4e1);
14545                 MP_WritePhyUshort(sc, 0x06, 0x8b6e);
14546                 MP_WritePhyUshort(sc, 0x06, 0x1f10);
14547                 MP_WritePhyUshort(sc, 0x06, 0x9e24);
14548                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
14549                 MP_WritePhyUshort(sc, 0x06, 0x6ead);
14550                 MP_WritePhyUshort(sc, 0x06, 0x2218);
14551                 MP_WritePhyUshort(sc, 0x06, 0xac27);
14552                 MP_WritePhyUshort(sc, 0x06, 0x0dac);
14553                 MP_WritePhyUshort(sc, 0x06, 0x2605);
14554                 MP_WritePhyUshort(sc, 0x06, 0x0203);
14555                 MP_WritePhyUshort(sc, 0x06, 0x8fae);
14556                 MP_WritePhyUshort(sc, 0x06, 0x1302);
14557                 MP_WritePhyUshort(sc, 0x06, 0x03c8);
14558                 MP_WritePhyUshort(sc, 0x06, 0xae0e);
14559                 MP_WritePhyUshort(sc, 0x06, 0x0203);
14560                 MP_WritePhyUshort(sc, 0x06, 0xe102);
14561                 MP_WritePhyUshort(sc, 0x06, 0x8520);
14562                 MP_WritePhyUshort(sc, 0x06, 0xae06);
14563                 MP_WritePhyUshort(sc, 0x06, 0x0203);
14564                 MP_WritePhyUshort(sc, 0x06, 0x8f02);
14565                 MP_WritePhyUshort(sc, 0x06, 0x8566);
14566                 MP_WritePhyUshort(sc, 0x06, 0xef96);
14567                 MP_WritePhyUshort(sc, 0x06, 0xfefd);
14568                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
14569                 MP_WritePhyUshort(sc, 0x06, 0xf8fa);
14570                 MP_WritePhyUshort(sc, 0x06, 0xef69);
14571                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14572                 MP_WritePhyUshort(sc, 0x06, 0x82ad);
14573                 MP_WritePhyUshort(sc, 0x06, 0x2737);
14574                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
14575                 MP_WritePhyUshort(sc, 0x06, 0x4402);
14576                 MP_WritePhyUshort(sc, 0x06, 0x2f23);
14577                 MP_WritePhyUshort(sc, 0x06, 0xac28);
14578                 MP_WritePhyUshort(sc, 0x06, 0x2ed1);
14579                 MP_WritePhyUshort(sc, 0x06, 0x01bf);
14580                 MP_WritePhyUshort(sc, 0x06, 0x8647);
14581                 MP_WritePhyUshort(sc, 0x06, 0x022f);
14582                 MP_WritePhyUshort(sc, 0x06, 0x50bf);
14583                 MP_WritePhyUshort(sc, 0x06, 0x8641);
14584                 MP_WritePhyUshort(sc, 0x06, 0x022f);
14585                 MP_WritePhyUshort(sc, 0x06, 0x23e5);
14586                 MP_WritePhyUshort(sc, 0x06, 0x8af0);
14587                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
14588                 MP_WritePhyUshort(sc, 0x06, 0x22e1);
14589                 MP_WritePhyUshort(sc, 0x06, 0xe023);
14590                 MP_WritePhyUshort(sc, 0x06, 0xac2e);
14591                 MP_WritePhyUshort(sc, 0x06, 0x04d1);
14592                 MP_WritePhyUshort(sc, 0x06, 0x01ae);
14593                 MP_WritePhyUshort(sc, 0x06, 0x02d1);
14594                 MP_WritePhyUshort(sc, 0x06, 0x00bf);
14595                 MP_WritePhyUshort(sc, 0x06, 0x8641);
14596                 MP_WritePhyUshort(sc, 0x06, 0x022f);
14597                 MP_WritePhyUshort(sc, 0x06, 0x50d1);
14598                 MP_WritePhyUshort(sc, 0x06, 0x01bf);
14599                 MP_WritePhyUshort(sc, 0x06, 0x8644);
14600                 MP_WritePhyUshort(sc, 0x06, 0x022f);
14601                 MP_WritePhyUshort(sc, 0x06, 0x50ef);
14602                 MP_WritePhyUshort(sc, 0x06, 0x96fe);
14603                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
14604                 MP_WritePhyUshort(sc, 0x06, 0xf8fa);
14605                 MP_WritePhyUshort(sc, 0x06, 0xef69);
14606                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
14607                 MP_WritePhyUshort(sc, 0x06, 0x4702);
14608                 MP_WritePhyUshort(sc, 0x06, 0x2f23);
14609                 MP_WritePhyUshort(sc, 0x06, 0xad28);
14610                 MP_WritePhyUshort(sc, 0x06, 0x19d1);
14611                 MP_WritePhyUshort(sc, 0x06, 0x00bf);
14612                 MP_WritePhyUshort(sc, 0x06, 0x8644);
14613                 MP_WritePhyUshort(sc, 0x06, 0x022f);
14614                 MP_WritePhyUshort(sc, 0x06, 0x50e1);
14615                 MP_WritePhyUshort(sc, 0x06, 0x8af0);
14616                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
14617                 MP_WritePhyUshort(sc, 0x06, 0x4102);
14618                 MP_WritePhyUshort(sc, 0x06, 0x2f50);
14619                 MP_WritePhyUshort(sc, 0x06, 0xd100);
14620                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
14621                 MP_WritePhyUshort(sc, 0x06, 0x4702);
14622                 MP_WritePhyUshort(sc, 0x06, 0x2f50);
14623                 MP_WritePhyUshort(sc, 0x06, 0xef96);
14624                 MP_WritePhyUshort(sc, 0x06, 0xfefc);
14625                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
14626                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
14627                 MP_WritePhyUshort(sc, 0x06, 0xfee1);
14628                 MP_WritePhyUshort(sc, 0x06, 0xe2ff);
14629                 MP_WritePhyUshort(sc, 0x06, 0xad2e);
14630                 MP_WritePhyUshort(sc, 0x06, 0x63e0);
14631                 MP_WritePhyUshort(sc, 0x06, 0xe038);
14632                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
14633                 MP_WritePhyUshort(sc, 0x06, 0x39ad);
14634                 MP_WritePhyUshort(sc, 0x06, 0x2f10);
14635                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
14636                 MP_WritePhyUshort(sc, 0x06, 0x34e1);
14637                 MP_WritePhyUshort(sc, 0x06, 0xe035);
14638                 MP_WritePhyUshort(sc, 0x06, 0xf726);
14639                 MP_WritePhyUshort(sc, 0x06, 0xe4e0);
14640                 MP_WritePhyUshort(sc, 0x06, 0x34e5);
14641                 MP_WritePhyUshort(sc, 0x06, 0xe035);
14642                 MP_WritePhyUshort(sc, 0x06, 0xae0e);
14643                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
14644                 MP_WritePhyUshort(sc, 0x06, 0xd6e1);
14645                 MP_WritePhyUshort(sc, 0x06, 0xe2d7);
14646                 MP_WritePhyUshort(sc, 0x06, 0xf728);
14647                 MP_WritePhyUshort(sc, 0x06, 0xe4e2);
14648                 MP_WritePhyUshort(sc, 0x06, 0xd6e5);
14649                 MP_WritePhyUshort(sc, 0x06, 0xe2d7);
14650                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
14651                 MP_WritePhyUshort(sc, 0x06, 0x34e1);
14652                 MP_WritePhyUshort(sc, 0x06, 0xe235);
14653                 MP_WritePhyUshort(sc, 0x06, 0xf72b);
14654                 MP_WritePhyUshort(sc, 0x06, 0xe4e2);
14655                 MP_WritePhyUshort(sc, 0x06, 0x34e5);
14656                 MP_WritePhyUshort(sc, 0x06, 0xe235);
14657                 MP_WritePhyUshort(sc, 0x06, 0xd07d);
14658                 MP_WritePhyUshort(sc, 0x06, 0xb0fe);
14659                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
14660                 MP_WritePhyUshort(sc, 0x06, 0x34e1);
14661                 MP_WritePhyUshort(sc, 0x06, 0xe235);
14662                 MP_WritePhyUshort(sc, 0x06, 0xf62b);
14663                 MP_WritePhyUshort(sc, 0x06, 0xe4e2);
14664                 MP_WritePhyUshort(sc, 0x06, 0x34e5);
14665                 MP_WritePhyUshort(sc, 0x06, 0xe235);
14666                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
14667                 MP_WritePhyUshort(sc, 0x06, 0x34e1);
14668                 MP_WritePhyUshort(sc, 0x06, 0xe035);
14669                 MP_WritePhyUshort(sc, 0x06, 0xf626);
14670                 MP_WritePhyUshort(sc, 0x06, 0xe4e0);
14671                 MP_WritePhyUshort(sc, 0x06, 0x34e5);
14672                 MP_WritePhyUshort(sc, 0x06, 0xe035);
14673                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
14674                 MP_WritePhyUshort(sc, 0x06, 0xd6e1);
14675                 MP_WritePhyUshort(sc, 0x06, 0xe2d7);
14676                 MP_WritePhyUshort(sc, 0x06, 0xf628);
14677                 MP_WritePhyUshort(sc, 0x06, 0xe4e2);
14678                 MP_WritePhyUshort(sc, 0x06, 0xd6e5);
14679                 MP_WritePhyUshort(sc, 0x06, 0xe2d7);
14680                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
14681                 MP_WritePhyUshort(sc, 0x06, 0xae20);
14682                 MP_WritePhyUshort(sc, 0x06, 0x0000);
14683                 MP_WritePhyUshort(sc, 0x06, 0x0000);
14684                 MP_WritePhyUshort(sc, 0x06, 0x0000);
14685                 MP_WritePhyUshort(sc, 0x06, 0x0000);
14686                 MP_WritePhyUshort(sc, 0x06, 0x0000);
14687                 MP_WritePhyUshort(sc, 0x06, 0x0000);
14688                 MP_WritePhyUshort(sc, 0x06, 0x0000);
14689                 MP_WritePhyUshort(sc, 0x06, 0x0000);
14690                 MP_WritePhyUshort(sc, 0x06, 0x0000);
14691                 MP_WritePhyUshort(sc, 0x06, 0x0000);
14692                 MP_WritePhyUshort(sc, 0x06, 0x0000);
14693                 MP_WritePhyUshort(sc, 0x06, 0x0000);
14694                 MP_WritePhyUshort(sc, 0x06, 0x0000);
14695                 MP_WritePhyUshort(sc, 0x06, 0x0000);
14696                 MP_WritePhyUshort(sc, 0x06, 0x0000);
14697                 MP_WritePhyUshort(sc, 0x06, 0x0000);
14698                 MP_WritePhyUshort(sc, 0x06, 0xa725);
14699                 MP_WritePhyUshort(sc, 0x06, 0xe50a);
14700                 MP_WritePhyUshort(sc, 0x06, 0x1de5);
14701                 MP_WritePhyUshort(sc, 0x06, 0x0a2c);
14702                 MP_WritePhyUshort(sc, 0x06, 0xe50a);
14703                 MP_WritePhyUshort(sc, 0x06, 0x6de5);
14704                 MP_WritePhyUshort(sc, 0x06, 0x0a1d);
14705                 MP_WritePhyUshort(sc, 0x06, 0xe50a);
14706                 MP_WritePhyUshort(sc, 0x06, 0x1ce5);
14707                 MP_WritePhyUshort(sc, 0x06, 0x0a2d);
14708                 MP_WritePhyUshort(sc, 0x06, 0xa755);
14709                 MP_WritePhyUshort(sc, 0x06, 0x00e2);
14710                 MP_WritePhyUshort(sc, 0x06, 0x3488);
14711                 MP_WritePhyUshort(sc, 0x06, 0xe200);
14712                 MP_WritePhyUshort(sc, 0x06, 0xcce2);
14713                 MP_WritePhyUshort(sc, 0x06, 0x0055);
14714                 MP_WritePhyUshort(sc, 0x06, 0xe020);
14715                 MP_WritePhyUshort(sc, 0x06, 0x55e2);
14716                 MP_WritePhyUshort(sc, 0x06, 0xd600);
14717                 MP_WritePhyUshort(sc, 0x06, 0xe24a);
14718                 PhyRegValue = MP_ReadPhyUshort(sc, 0x01);
14719                 PhyRegValue |= BIT_0;
14720                 MP_WritePhyUshort(sc, 0x01, PhyRegValue);
14721                 PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
14722                 PhyRegValue |= BIT_0;
14723                 MP_WritePhyUshort(sc, 0x00, PhyRegValue);
14724                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
14725 
14726                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
14727                 for (i = 0; i < 200; i++) {
14728                         DELAY(100);
14729                         PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
14730                         if (PhyRegValue & BIT_7)
14731                                 break;
14732                 }
14733                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
14734                 MP_WritePhyUshort(sc, 0x1e, 0x0023);
14735                 PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
14736                 PhyRegValue &= ~(BIT_0);
14737                 if (sc->RequiredSecLanDonglePatch)
14738                         PhyRegValue &= ~(BIT_2);
14739                 MP_WritePhyUshort(sc, 0x17, PhyRegValue);
14740                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
14741         }
14742 }
14743 
14744 static void re_set_phy_mcu_8168evl_1(struct re_softc *sc)
14745 {
14746         u_int16_t PhyRegValue;
14747         int i;
14748 
14749         MP_WritePhyUshort(sc, 0x1f, 0x0000);
14750         MP_WritePhyUshort(sc, 0x00, 0x1800);
14751         PhyRegValue= MP_ReadPhyUshort(sc, 0x15);
14752         PhyRegValue &= ~BIT_12;
14753         MP_WritePhyUshort(sc, 0x15, PhyRegValue);
14754         DELAY(200);
14755         DELAY(200);
14756         MP_WritePhyUshort(sc, 0x1f, 0x0004);
14757         MP_WritePhyUshort(sc, 0x1f, 0x0007);
14758         MP_WritePhyUshort(sc, 0x1e, 0x0023);
14759         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
14760         if ((PhyRegValue & BIT_11) == 0x0000) {
14761                 PhyRegValue |= BIT_0;
14762                 MP_WritePhyUshort(sc, 0x17, PhyRegValue);
14763                 for (i = 0; i < 200; i++) {
14764                         DELAY(100);
14765                         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
14766                         if (PhyRegValue & BIT_11)
14767                                 break;
14768                 }
14769         }
14770         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
14771         PhyRegValue |= BIT_11;
14772         MP_WritePhyUshort(sc, 0x17,PhyRegValue);
14773         MP_WritePhyUshort(sc, 0x1f, 0x0004);
14774         MP_WritePhyUshort(sc, 0x1f, 0x0007);
14775         MP_WritePhyUshort(sc, 0x1E, 0x002C);
14776         MP_WritePhyUshort(sc, 0x1B, 0x5000);
14777         MP_WritePhyUshort(sc, 0x1E, 0x002d);
14778         MP_WritePhyUshort(sc, 0x19, 0x0004);
14779         MP_WritePhyUshort(sc, 0x1f, 0x0002);
14780         MP_WritePhyUshort(sc, 0x1f, 0x0000);
14781         for (i = 0; i < 200; i++) {
14782                 DELAY(100);
14783                 PhyRegValue= MP_ReadPhyUshort(sc, 0x1E);
14784                 if ((PhyRegValue& 0x03FF) == 0x0014)
14785                         break;
14786         }
14787         MP_WritePhyUshort(sc, 0x1f, 0x0005);
14788         for (i = 0; i < 200; i++) {
14789                 DELAY(100);
14790                 PhyRegValue= MP_ReadPhyUshort(sc, 0x07);
14791                 if ((PhyRegValue& BIT_5) == 0)
14792                         break;
14793         }
14794         PhyRegValue = MP_ReadPhyUshort(sc, 0x07);
14795         if (PhyRegValue & BIT_5) {
14796                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
14797                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
14798                 MP_WritePhyUshort(sc, 0x1e, 0x00a1);
14799                 MP_WritePhyUshort(sc, 0x17, 0x1000);
14800                 MP_WritePhyUshort(sc, 0x17, 0x0000);
14801                 MP_WritePhyUshort(sc, 0x17, 0x2000);
14802                 MP_WritePhyUshort(sc, 0x1e, 0x002f);
14803                 MP_WritePhyUshort(sc, 0x18, 0x9bfb);
14804                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
14805                 MP_WritePhyUshort(sc, 0x07, 0x0000);
14806                 MP_WritePhyUshort(sc, 0x1f, 0x0002);
14807                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
14808         }
14809         MP_WritePhyUshort(sc, 0x1f, 0x0005);
14810         MP_WritePhyUshort(sc, 0x05, 0xfff6);
14811         MP_WritePhyUshort(sc, 0x06, 0x0080);
14812         PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
14813         PhyRegValue &= ~BIT_7;
14814         MP_WritePhyUshort(sc, 0x00, PhyRegValue);
14815         MP_WritePhyUshort(sc, 0x1f, 0x0004);
14816         MP_WritePhyUshort(sc, 0x1f, 0x0007);
14817         MP_WritePhyUshort(sc, 0x1e, 0x0023);
14818         MP_WritePhyUshort(sc, 0x16, 0x0306);
14819         MP_WritePhyUshort(sc, 0x16, 0x0307);
14820         MP_WritePhyUshort(sc, 0x15, 0x0000);
14821         MP_WritePhyUshort(sc, 0x19, 0x407d);
14822         MP_WritePhyUshort(sc, 0x15, 0x0001);
14823         MP_WritePhyUshort(sc, 0x19, 0x440f);
14824         MP_WritePhyUshort(sc, 0x15, 0x0002);
14825         MP_WritePhyUshort(sc, 0x19, 0x7c03);
14826         MP_WritePhyUshort(sc, 0x15, 0x0003);
14827         MP_WritePhyUshort(sc, 0x19, 0x6c03);
14828         MP_WritePhyUshort(sc, 0x15, 0x0004);
14829         MP_WritePhyUshort(sc, 0x19, 0xc4d5);
14830         MP_WritePhyUshort(sc, 0x15, 0x0005);
14831         MP_WritePhyUshort(sc, 0x19, 0x00ff);
14832         MP_WritePhyUshort(sc, 0x15, 0x0006);
14833         MP_WritePhyUshort(sc, 0x19, 0x74f0);
14834         MP_WritePhyUshort(sc, 0x15, 0x0007);
14835         MP_WritePhyUshort(sc, 0x19, 0x4880);
14836         MP_WritePhyUshort(sc, 0x15, 0x0008);
14837         MP_WritePhyUshort(sc, 0x19, 0x4c00);
14838         MP_WritePhyUshort(sc, 0x15, 0x0009);
14839         MP_WritePhyUshort(sc, 0x19, 0x4800);
14840         MP_WritePhyUshort(sc, 0x15, 0x000a);
14841         MP_WritePhyUshort(sc, 0x19, 0x5000);
14842         MP_WritePhyUshort(sc, 0x15, 0x000b);
14843         MP_WritePhyUshort(sc, 0x19, 0x4400);
14844         MP_WritePhyUshort(sc, 0x15, 0x000c);
14845         MP_WritePhyUshort(sc, 0x19, 0x7801);
14846         MP_WritePhyUshort(sc, 0x15, 0x000d);
14847         MP_WritePhyUshort(sc, 0x19, 0x4000);
14848         MP_WritePhyUshort(sc, 0x15, 0x000e);
14849         MP_WritePhyUshort(sc, 0x19, 0x7800);
14850         MP_WritePhyUshort(sc, 0x15, 0x000f);
14851         MP_WritePhyUshort(sc, 0x19, 0x7010);
14852         MP_WritePhyUshort(sc, 0x15, 0x0010);
14853         MP_WritePhyUshort(sc, 0x19, 0x6804);
14854         MP_WritePhyUshort(sc, 0x15, 0x0011);
14855         MP_WritePhyUshort(sc, 0x19, 0x64a0);
14856         MP_WritePhyUshort(sc, 0x15, 0x0012);
14857         MP_WritePhyUshort(sc, 0x19, 0x63da);
14858         MP_WritePhyUshort(sc, 0x15, 0x0013);
14859         MP_WritePhyUshort(sc, 0x19, 0x63d8);
14860         MP_WritePhyUshort(sc, 0x15, 0x0014);
14861         MP_WritePhyUshort(sc, 0x19, 0x6f05);
14862         MP_WritePhyUshort(sc, 0x15, 0x0015);
14863         MP_WritePhyUshort(sc, 0x19, 0x5420);
14864         MP_WritePhyUshort(sc, 0x15, 0x0016);
14865         MP_WritePhyUshort(sc, 0x19, 0x58ce);
14866         MP_WritePhyUshort(sc, 0x15, 0x0017);
14867         MP_WritePhyUshort(sc, 0x19, 0x5cf3);
14868         MP_WritePhyUshort(sc, 0x15, 0x0018);
14869         MP_WritePhyUshort(sc, 0x19, 0xb600);
14870         MP_WritePhyUshort(sc, 0x15, 0x0019);
14871         MP_WritePhyUshort(sc, 0x19, 0xc659);
14872         MP_WritePhyUshort(sc, 0x15, 0x001a);
14873         MP_WritePhyUshort(sc, 0x19, 0x0018);
14874         MP_WritePhyUshort(sc, 0x15, 0x001b);
14875         MP_WritePhyUshort(sc, 0x19, 0xc403);
14876         MP_WritePhyUshort(sc, 0x15, 0x001c);
14877         MP_WritePhyUshort(sc, 0x19, 0x0016);
14878         MP_WritePhyUshort(sc, 0x15, 0x001d);
14879         MP_WritePhyUshort(sc, 0x19, 0xaa05);
14880         MP_WritePhyUshort(sc, 0x15, 0x001e);
14881         MP_WritePhyUshort(sc, 0x19, 0xc503);
14882         MP_WritePhyUshort(sc, 0x15, 0x001f);
14883         MP_WritePhyUshort(sc, 0x19, 0x0003);
14884         MP_WritePhyUshort(sc, 0x15, 0x0020);
14885         MP_WritePhyUshort(sc, 0x19, 0x89f8);
14886         MP_WritePhyUshort(sc, 0x15, 0x0021);
14887         MP_WritePhyUshort(sc, 0x19, 0x32ae);
14888         MP_WritePhyUshort(sc, 0x15, 0x0022);
14889         MP_WritePhyUshort(sc, 0x19, 0x7c03);
14890         MP_WritePhyUshort(sc, 0x15, 0x0023);
14891         MP_WritePhyUshort(sc, 0x19, 0x6c03);
14892         MP_WritePhyUshort(sc, 0x15, 0x0024);
14893         MP_WritePhyUshort(sc, 0x19, 0x7c03);
14894         MP_WritePhyUshort(sc, 0x15, 0x0025);
14895         MP_WritePhyUshort(sc, 0x19, 0x6801);
14896         MP_WritePhyUshort(sc, 0x15, 0x0026);
14897         MP_WritePhyUshort(sc, 0x19, 0x66a0);
14898         MP_WritePhyUshort(sc, 0x15, 0x0027);
14899         MP_WritePhyUshort(sc, 0x19, 0xa300);
14900         MP_WritePhyUshort(sc, 0x15, 0x0028);
14901         MP_WritePhyUshort(sc, 0x19, 0x64a0);
14902         MP_WritePhyUshort(sc, 0x15, 0x0029);
14903         MP_WritePhyUshort(sc, 0x19, 0x76f0);
14904         MP_WritePhyUshort(sc, 0x15, 0x002a);
14905         MP_WritePhyUshort(sc, 0x19, 0x7670);
14906         MP_WritePhyUshort(sc, 0x15, 0x002b);
14907         MP_WritePhyUshort(sc, 0x19, 0x7630);
14908         MP_WritePhyUshort(sc, 0x15, 0x002c);
14909         MP_WritePhyUshort(sc, 0x19, 0x31a6);
14910         MP_WritePhyUshort(sc, 0x15, 0x002d);
14911         MP_WritePhyUshort(sc, 0x19, 0x0000);
14912         MP_WritePhyUshort(sc, 0x15, 0x002e);
14913         MP_WritePhyUshort(sc, 0x19, 0x0000);
14914         MP_WritePhyUshort(sc, 0x15, 0x002f);
14915         MP_WritePhyUshort(sc, 0x19, 0x0000);
14916         MP_WritePhyUshort(sc, 0x15, 0x0030);
14917         MP_WritePhyUshort(sc, 0x19, 0x0000);
14918         MP_WritePhyUshort(sc, 0x15, 0x0031);
14919         MP_WritePhyUshort(sc, 0x19, 0x0000);
14920         MP_WritePhyUshort(sc, 0x15, 0x0032);
14921         MP_WritePhyUshort(sc, 0x19, 0x4801);
14922         MP_WritePhyUshort(sc, 0x15, 0x0033);
14923         MP_WritePhyUshort(sc, 0x19, 0x6803);
14924         MP_WritePhyUshort(sc, 0x15, 0x0034);
14925         MP_WritePhyUshort(sc, 0x19, 0x66a1);
14926         MP_WritePhyUshort(sc, 0x15, 0x0035);
14927         MP_WritePhyUshort(sc, 0x19, 0x7c03);
14928         MP_WritePhyUshort(sc, 0x15, 0x0036);
14929         MP_WritePhyUshort(sc, 0x19, 0x6c03);
14930         MP_WritePhyUshort(sc, 0x15, 0x0037);
14931         MP_WritePhyUshort(sc, 0x19, 0xa300);
14932         MP_WritePhyUshort(sc, 0x15, 0x0038);
14933         MP_WritePhyUshort(sc, 0x19, 0x64a1);
14934         MP_WritePhyUshort(sc, 0x15, 0x0039);
14935         MP_WritePhyUshort(sc, 0x19, 0x7c08);
14936         MP_WritePhyUshort(sc, 0x15, 0x003a);
14937         MP_WritePhyUshort(sc, 0x19, 0x74f8);
14938         MP_WritePhyUshort(sc, 0x15, 0x003b);
14939         MP_WritePhyUshort(sc, 0x19, 0x63d0);
14940         MP_WritePhyUshort(sc, 0x15, 0x003c);
14941         MP_WritePhyUshort(sc, 0x19, 0x7ff0);
14942         MP_WritePhyUshort(sc, 0x15, 0x003d);
14943         MP_WritePhyUshort(sc, 0x19, 0x77f0);
14944         MP_WritePhyUshort(sc, 0x15, 0x003e);
14945         MP_WritePhyUshort(sc, 0x19, 0x7ff0);
14946         MP_WritePhyUshort(sc, 0x15, 0x003f);
14947         MP_WritePhyUshort(sc, 0x19, 0x7750);
14948         MP_WritePhyUshort(sc, 0x15, 0x0040);
14949         MP_WritePhyUshort(sc, 0x19, 0x63d8);
14950         MP_WritePhyUshort(sc, 0x15, 0x0041);
14951         MP_WritePhyUshort(sc, 0x19, 0x7cf0);
14952         MP_WritePhyUshort(sc, 0x15, 0x0042);
14953         MP_WritePhyUshort(sc, 0x19, 0x7708);
14954         MP_WritePhyUshort(sc, 0x15, 0x0043);
14955         MP_WritePhyUshort(sc, 0x19, 0xa654);
14956         MP_WritePhyUshort(sc, 0x15, 0x0044);
14957         MP_WritePhyUshort(sc, 0x19, 0x304a);
14958         MP_WritePhyUshort(sc, 0x15, 0x0045);
14959         MP_WritePhyUshort(sc, 0x19, 0x0000);
14960         MP_WritePhyUshort(sc, 0x15, 0x0046);
14961         MP_WritePhyUshort(sc, 0x19, 0x0000);
14962         MP_WritePhyUshort(sc, 0x15, 0x0047);
14963         MP_WritePhyUshort(sc, 0x19, 0x0000);
14964         MP_WritePhyUshort(sc, 0x15, 0x0048);
14965         MP_WritePhyUshort(sc, 0x19, 0x0000);
14966         MP_WritePhyUshort(sc, 0x15, 0x0049);
14967         MP_WritePhyUshort(sc, 0x19, 0x0000);
14968         MP_WritePhyUshort(sc, 0x15, 0x004a);
14969         MP_WritePhyUshort(sc, 0x19, 0x4802);
14970         MP_WritePhyUshort(sc, 0x15, 0x004b);
14971         MP_WritePhyUshort(sc, 0x19, 0x4003);
14972         MP_WritePhyUshort(sc, 0x15, 0x004c);
14973         MP_WritePhyUshort(sc, 0x19, 0x4440);
14974         MP_WritePhyUshort(sc, 0x15, 0x004d);
14975         MP_WritePhyUshort(sc, 0x19, 0x63c8);
14976         MP_WritePhyUshort(sc, 0x15, 0x004e);
14977         MP_WritePhyUshort(sc, 0x19, 0x6481);
14978         MP_WritePhyUshort(sc, 0x15, 0x004f);
14979         MP_WritePhyUshort(sc, 0x19, 0x9d00);
14980         MP_WritePhyUshort(sc, 0x15, 0x0050);
14981         MP_WritePhyUshort(sc, 0x19, 0x63e8);
14982         MP_WritePhyUshort(sc, 0x15, 0x0051);
14983         MP_WritePhyUshort(sc, 0x19, 0x7d00);
14984         MP_WritePhyUshort(sc, 0x15, 0x0052);
14985         MP_WritePhyUshort(sc, 0x19, 0x5900);
14986         MP_WritePhyUshort(sc, 0x15, 0x0053);
14987         MP_WritePhyUshort(sc, 0x19, 0x63f8);
14988         MP_WritePhyUshort(sc, 0x15, 0x0054);
14989         MP_WritePhyUshort(sc, 0x19, 0x64a1);
14990         MP_WritePhyUshort(sc, 0x15, 0x0055);
14991         MP_WritePhyUshort(sc, 0x19, 0x3116);
14992         MP_WritePhyUshort(sc, 0x15, 0x0056);
14993         MP_WritePhyUshort(sc, 0x19, 0x0000);
14994         MP_WritePhyUshort(sc, 0x15, 0x0057);
14995         MP_WritePhyUshort(sc, 0x19, 0x0000);
14996         MP_WritePhyUshort(sc, 0x15, 0x0058);
14997         MP_WritePhyUshort(sc, 0x19, 0x0000);
14998         MP_WritePhyUshort(sc, 0x15, 0x0059);
14999         MP_WritePhyUshort(sc, 0x19, 0x0000);
15000         MP_WritePhyUshort(sc, 0x15, 0x005a);
15001         MP_WritePhyUshort(sc, 0x19, 0x7c03);
15002         MP_WritePhyUshort(sc, 0x15, 0x005b);
15003         MP_WritePhyUshort(sc, 0x19, 0x6c03);
15004         MP_WritePhyUshort(sc, 0x15, 0x005c);
15005         MP_WritePhyUshort(sc, 0x19, 0x7c08);
15006         MP_WritePhyUshort(sc, 0x15, 0x005d);
15007         MP_WritePhyUshort(sc, 0x19, 0x6000);
15008         MP_WritePhyUshort(sc, 0x15, 0x005e);
15009         MP_WritePhyUshort(sc, 0x19, 0x59ce);
15010         MP_WritePhyUshort(sc, 0x15, 0x005f);
15011         MP_WritePhyUshort(sc, 0x19, 0x4400);
15012         MP_WritePhyUshort(sc, 0x15, 0x0060);
15013         MP_WritePhyUshort(sc, 0x19, 0x7d00);
15014         MP_WritePhyUshort(sc, 0x15, 0x0061);
15015         MP_WritePhyUshort(sc, 0x19, 0x72b0);
15016         MP_WritePhyUshort(sc, 0x15, 0x0062);
15017         MP_WritePhyUshort(sc, 0x19, 0x400e);
15018         MP_WritePhyUshort(sc, 0x15, 0x0063);
15019         MP_WritePhyUshort(sc, 0x19, 0x4440);
15020         MP_WritePhyUshort(sc, 0x15, 0x0064);
15021         MP_WritePhyUshort(sc, 0x19, 0x9d00);
15022         MP_WritePhyUshort(sc, 0x15, 0x0065);
15023         MP_WritePhyUshort(sc, 0x19, 0x7f00);
15024         MP_WritePhyUshort(sc, 0x15, 0x0066);
15025         MP_WritePhyUshort(sc, 0x19, 0x70b0);
15026         MP_WritePhyUshort(sc, 0x15, 0x0067);
15027         MP_WritePhyUshort(sc, 0x19, 0x7c08);
15028         MP_WritePhyUshort(sc, 0x15, 0x0068);
15029         MP_WritePhyUshort(sc, 0x19, 0x6008);
15030         MP_WritePhyUshort(sc, 0x15, 0x0069);
15031         MP_WritePhyUshort(sc, 0x19, 0x7cf0);
15032         MP_WritePhyUshort(sc, 0x15, 0x006a);
15033         MP_WritePhyUshort(sc, 0x19, 0x7750);
15034         MP_WritePhyUshort(sc, 0x15, 0x006b);
15035         MP_WritePhyUshort(sc, 0x19, 0x4007);
15036         MP_WritePhyUshort(sc, 0x15, 0x006c);
15037         MP_WritePhyUshort(sc, 0x19, 0x4500);
15038         MP_WritePhyUshort(sc, 0x15, 0x006d);
15039         MP_WritePhyUshort(sc, 0x19, 0x4023);
15040         MP_WritePhyUshort(sc, 0x15, 0x006e);
15041         MP_WritePhyUshort(sc, 0x19, 0x4580);
15042         MP_WritePhyUshort(sc, 0x15, 0x006f);
15043         MP_WritePhyUshort(sc, 0x19, 0x9f00);
15044         MP_WritePhyUshort(sc, 0x15, 0x0070);
15045         MP_WritePhyUshort(sc, 0x19, 0xcd78);
15046         MP_WritePhyUshort(sc, 0x15, 0x0071);
15047         MP_WritePhyUshort(sc, 0x19, 0x0003);
15048         MP_WritePhyUshort(sc, 0x15, 0x0072);
15049         MP_WritePhyUshort(sc, 0x19, 0xbe02);
15050         MP_WritePhyUshort(sc, 0x15, 0x0073);
15051         MP_WritePhyUshort(sc, 0x19, 0x3070);
15052         MP_WritePhyUshort(sc, 0x15, 0x0074);
15053         MP_WritePhyUshort(sc, 0x19, 0x7cf0);
15054         MP_WritePhyUshort(sc, 0x15, 0x0075);
15055         MP_WritePhyUshort(sc, 0x19, 0x77f0);
15056         MP_WritePhyUshort(sc, 0x15, 0x0076);
15057         MP_WritePhyUshort(sc, 0x19, 0x4400);
15058         MP_WritePhyUshort(sc, 0x15, 0x0077);
15059         MP_WritePhyUshort(sc, 0x19, 0x4007);
15060         MP_WritePhyUshort(sc, 0x15, 0x0078);
15061         MP_WritePhyUshort(sc, 0x19, 0x4500);
15062         MP_WritePhyUshort(sc, 0x15, 0x0079);
15063         MP_WritePhyUshort(sc, 0x19, 0x4023);
15064         MP_WritePhyUshort(sc, 0x15, 0x007a);
15065         MP_WritePhyUshort(sc, 0x19, 0x4580);
15066         MP_WritePhyUshort(sc, 0x15, 0x007b);
15067         MP_WritePhyUshort(sc, 0x19, 0x9f00);
15068         MP_WritePhyUshort(sc, 0x15, 0x007c);
15069         MP_WritePhyUshort(sc, 0x19, 0xce80);
15070         MP_WritePhyUshort(sc, 0x15, 0x007d);
15071         MP_WritePhyUshort(sc, 0x19, 0x0004);
15072         MP_WritePhyUshort(sc, 0x15, 0x007e);
15073         MP_WritePhyUshort(sc, 0x19, 0xce80);
15074         MP_WritePhyUshort(sc, 0x15, 0x007f);
15075         MP_WritePhyUshort(sc, 0x19, 0x0002);
15076         MP_WritePhyUshort(sc, 0x15, 0x0080);
15077         MP_WritePhyUshort(sc, 0x19, 0x307c);
15078         MP_WritePhyUshort(sc, 0x15, 0x0081);
15079         MP_WritePhyUshort(sc, 0x19, 0x4400);
15080         MP_WritePhyUshort(sc, 0x15, 0x0082);
15081         MP_WritePhyUshort(sc, 0x19, 0x480f);
15082         MP_WritePhyUshort(sc, 0x15, 0x0083);
15083         MP_WritePhyUshort(sc, 0x19, 0x6802);
15084         MP_WritePhyUshort(sc, 0x15, 0x0084);
15085         MP_WritePhyUshort(sc, 0x19, 0x6680);
15086         MP_WritePhyUshort(sc, 0x15, 0x0085);
15087         MP_WritePhyUshort(sc, 0x19, 0x7c10);
15088         MP_WritePhyUshort(sc, 0x15, 0x0086);
15089         MP_WritePhyUshort(sc, 0x19, 0x6010);
15090         MP_WritePhyUshort(sc, 0x15, 0x0087);
15091         MP_WritePhyUshort(sc, 0x19, 0x400a);
15092         MP_WritePhyUshort(sc, 0x15, 0x0088);
15093         MP_WritePhyUshort(sc, 0x19, 0x4580);
15094         MP_WritePhyUshort(sc, 0x15, 0x0089);
15095         MP_WritePhyUshort(sc, 0x19, 0x9e00);
15096         MP_WritePhyUshort(sc, 0x15, 0x008a);
15097         MP_WritePhyUshort(sc, 0x19, 0x7d00);
15098         MP_WritePhyUshort(sc, 0x15, 0x008b);
15099         MP_WritePhyUshort(sc, 0x19, 0x5800);
15100         MP_WritePhyUshort(sc, 0x15, 0x008c);
15101         MP_WritePhyUshort(sc, 0x19, 0x63c8);
15102         MP_WritePhyUshort(sc, 0x15, 0x008d);
15103         MP_WritePhyUshort(sc, 0x19, 0x63d8);
15104         MP_WritePhyUshort(sc, 0x15, 0x008e);
15105         MP_WritePhyUshort(sc, 0x19, 0x66a0);
15106         MP_WritePhyUshort(sc, 0x15, 0x008f);
15107         MP_WritePhyUshort(sc, 0x19, 0x8300);
15108         MP_WritePhyUshort(sc, 0x15, 0x0090);
15109         MP_WritePhyUshort(sc, 0x19, 0x7ff0);
15110         MP_WritePhyUshort(sc, 0x15, 0x0091);
15111         MP_WritePhyUshort(sc, 0x19, 0x74f0);
15112         MP_WritePhyUshort(sc, 0x15, 0x0092);
15113         MP_WritePhyUshort(sc, 0x19, 0x3006);
15114         MP_WritePhyUshort(sc, 0x15, 0x0093);
15115         MP_WritePhyUshort(sc, 0x19, 0x0000);
15116         MP_WritePhyUshort(sc, 0x15, 0x0094);
15117         MP_WritePhyUshort(sc, 0x19, 0x0000);
15118         MP_WritePhyUshort(sc, 0x15, 0x0095);
15119         MP_WritePhyUshort(sc, 0x19, 0x0000);
15120         MP_WritePhyUshort(sc, 0x15, 0x0096);
15121         MP_WritePhyUshort(sc, 0x19, 0x0000);
15122         MP_WritePhyUshort(sc, 0x15, 0x0097);
15123         MP_WritePhyUshort(sc, 0x19, 0x4803);
15124         MP_WritePhyUshort(sc, 0x15, 0x0098);
15125         MP_WritePhyUshort(sc, 0x19, 0x7c03);
15126         MP_WritePhyUshort(sc, 0x15, 0x0099);
15127         MP_WritePhyUshort(sc, 0x19, 0x6c03);
15128         MP_WritePhyUshort(sc, 0x15, 0x009a);
15129         MP_WritePhyUshort(sc, 0x19, 0xa203);
15130         MP_WritePhyUshort(sc, 0x15, 0x009b);
15131         MP_WritePhyUshort(sc, 0x19, 0x64b1);
15132         MP_WritePhyUshort(sc, 0x15, 0x009c);
15133         MP_WritePhyUshort(sc, 0x19, 0x309e);
15134         MP_WritePhyUshort(sc, 0x15, 0x009d);
15135         MP_WritePhyUshort(sc, 0x19, 0x64b3);
15136         MP_WritePhyUshort(sc, 0x15, 0x009e);
15137         MP_WritePhyUshort(sc, 0x19, 0x4030);
15138         MP_WritePhyUshort(sc, 0x15, 0x009f);
15139         MP_WritePhyUshort(sc, 0x19, 0x440e);
15140         MP_WritePhyUshort(sc, 0x15, 0x00a0);
15141         MP_WritePhyUshort(sc, 0x19, 0x4020);
15142         MP_WritePhyUshort(sc, 0x15, 0x00a1);
15143         MP_WritePhyUshort(sc, 0x19, 0x4419);
15144         MP_WritePhyUshort(sc, 0x15, 0x00a2);
15145         MP_WritePhyUshort(sc, 0x19, 0x7801);
15146         MP_WritePhyUshort(sc, 0x15, 0x00a3);
15147         MP_WritePhyUshort(sc, 0x19, 0xc520);
15148         MP_WritePhyUshort(sc, 0x15, 0x00a4);
15149         MP_WritePhyUshort(sc, 0x19, 0x000b);
15150         MP_WritePhyUshort(sc, 0x15, 0x00a5);
15151         MP_WritePhyUshort(sc, 0x19, 0x4020);
15152         MP_WritePhyUshort(sc, 0x15, 0x00a6);
15153         MP_WritePhyUshort(sc, 0x19, 0x7800);
15154         MP_WritePhyUshort(sc, 0x15, 0x00a7);
15155         MP_WritePhyUshort(sc, 0x19, 0x58a4);
15156         MP_WritePhyUshort(sc, 0x15, 0x00a8);
15157         MP_WritePhyUshort(sc, 0x19, 0x63da);
15158         MP_WritePhyUshort(sc, 0x15, 0x00a9);
15159         MP_WritePhyUshort(sc, 0x19, 0x5cb0);
15160         MP_WritePhyUshort(sc, 0x15, 0x00aa);
15161         MP_WritePhyUshort(sc, 0x19, 0x7d00);
15162         MP_WritePhyUshort(sc, 0x15, 0x00ab);
15163         MP_WritePhyUshort(sc, 0x19, 0x72b0);
15164         MP_WritePhyUshort(sc, 0x15, 0x00ac);
15165         MP_WritePhyUshort(sc, 0x19, 0x7f00);
15166         MP_WritePhyUshort(sc, 0x15, 0x00ad);
15167         MP_WritePhyUshort(sc, 0x19, 0x70b0);
15168         MP_WritePhyUshort(sc, 0x15, 0x00ae);
15169         MP_WritePhyUshort(sc, 0x19, 0x30b8);
15170         MP_WritePhyUshort(sc, 0x15, 0x00AF);
15171         MP_WritePhyUshort(sc, 0x19, 0x4060);
15172         MP_WritePhyUshort(sc, 0x15, 0x00B0);
15173         MP_WritePhyUshort(sc, 0x19, 0x7800);
15174         MP_WritePhyUshort(sc, 0x15, 0x00B1);
15175         MP_WritePhyUshort(sc, 0x19, 0x7e00);
15176         MP_WritePhyUshort(sc, 0x15, 0x00B2);
15177         MP_WritePhyUshort(sc, 0x19, 0x72B0);
15178         MP_WritePhyUshort(sc, 0x15, 0x00B3);
15179         MP_WritePhyUshort(sc, 0x19, 0x7F00);
15180         MP_WritePhyUshort(sc, 0x15, 0x00B4);
15181         MP_WritePhyUshort(sc, 0x19, 0x73B0);
15182         MP_WritePhyUshort(sc, 0x15, 0x00b5);
15183         MP_WritePhyUshort(sc, 0x19, 0x58a0);
15184         MP_WritePhyUshort(sc, 0x15, 0x00b6);
15185         MP_WritePhyUshort(sc, 0x19, 0x63d2);
15186         MP_WritePhyUshort(sc, 0x15, 0x00b7);
15187         MP_WritePhyUshort(sc, 0x19, 0x5c00);
15188         MP_WritePhyUshort(sc, 0x15, 0x00b8);
15189         MP_WritePhyUshort(sc, 0x19, 0x5780);
15190         MP_WritePhyUshort(sc, 0x15, 0x00b9);
15191         MP_WritePhyUshort(sc, 0x19, 0xb60d);
15192         MP_WritePhyUshort(sc, 0x15, 0x00ba);
15193         MP_WritePhyUshort(sc, 0x19, 0x9bff);
15194         MP_WritePhyUshort(sc, 0x15, 0x00bb);
15195         MP_WritePhyUshort(sc, 0x19, 0x7c03);
15196         MP_WritePhyUshort(sc, 0x15, 0x00bc);
15197         MP_WritePhyUshort(sc, 0x19, 0x6001);
15198         MP_WritePhyUshort(sc, 0x15, 0x00bd);
15199         MP_WritePhyUshort(sc, 0x19, 0xc020);
15200         MP_WritePhyUshort(sc, 0x15, 0x00be);
15201         MP_WritePhyUshort(sc, 0x19, 0x002b);
15202         MP_WritePhyUshort(sc, 0x15, 0x00bf);
15203         MP_WritePhyUshort(sc, 0x19, 0xc137);
15204         MP_WritePhyUshort(sc, 0x15, 0x00c0);
15205         MP_WritePhyUshort(sc, 0x19, 0x0006);
15206         MP_WritePhyUshort(sc, 0x15, 0x00c1);
15207         MP_WritePhyUshort(sc, 0x19, 0x9af8);
15208         MP_WritePhyUshort(sc, 0x15, 0x00c2);
15209         MP_WritePhyUshort(sc, 0x19, 0x30c6);
15210         MP_WritePhyUshort(sc, 0x15, 0x00c3);
15211         MP_WritePhyUshort(sc, 0x19, 0x0000);
15212         MP_WritePhyUshort(sc, 0x15, 0x00c4);
15213         MP_WritePhyUshort(sc, 0x19, 0x0000);
15214         MP_WritePhyUshort(sc, 0x15, 0x00c5);
15215         MP_WritePhyUshort(sc, 0x19, 0x0000);
15216         MP_WritePhyUshort(sc, 0x15, 0x00c6);
15217         MP_WritePhyUshort(sc, 0x19, 0x7d00);
15218         MP_WritePhyUshort(sc, 0x15, 0x00c7);
15219         MP_WritePhyUshort(sc, 0x19, 0x70b0);
15220         MP_WritePhyUshort(sc, 0x15, 0x00c8);
15221         MP_WritePhyUshort(sc, 0x19, 0x4400);
15222         MP_WritePhyUshort(sc, 0x15, 0x00c9);
15223         MP_WritePhyUshort(sc, 0x19, 0x4804);
15224         MP_WritePhyUshort(sc, 0x15, 0x00ca);
15225         MP_WritePhyUshort(sc, 0x19, 0x7c80);
15226         MP_WritePhyUshort(sc, 0x15, 0x00cb);
15227         MP_WritePhyUshort(sc, 0x19, 0x5c80);
15228         MP_WritePhyUshort(sc, 0x15, 0x00cc);
15229         MP_WritePhyUshort(sc, 0x19, 0x4010);
15230         MP_WritePhyUshort(sc, 0x15, 0x00cd);
15231         MP_WritePhyUshort(sc, 0x19, 0x4415);
15232         MP_WritePhyUshort(sc, 0x15, 0x00ce);
15233         MP_WritePhyUshort(sc, 0x19, 0x9b00);
15234         MP_WritePhyUshort(sc, 0x15, 0x00cf);
15235         MP_WritePhyUshort(sc, 0x19, 0x7f00);
15236         MP_WritePhyUshort(sc, 0x15, 0x00d0);
15237         MP_WritePhyUshort(sc, 0x19, 0x70b0);
15238         MP_WritePhyUshort(sc, 0x15, 0x00d1);
15239         MP_WritePhyUshort(sc, 0x19, 0x3177);
15240         MP_WritePhyUshort(sc, 0x15, 0x00d2);
15241         MP_WritePhyUshort(sc, 0x19, 0x0000);
15242         MP_WritePhyUshort(sc, 0x15, 0x00d3);
15243         MP_WritePhyUshort(sc, 0x19, 0x0000);
15244         MP_WritePhyUshort(sc, 0x15, 0x00d4);
15245         MP_WritePhyUshort(sc, 0x19, 0x0000);
15246         MP_WritePhyUshort(sc, 0x15, 0x00d5);
15247         MP_WritePhyUshort(sc, 0x19, 0x4808);
15248         MP_WritePhyUshort(sc, 0x15, 0x00d6);
15249         MP_WritePhyUshort(sc, 0x19, 0x4007);
15250         MP_WritePhyUshort(sc, 0x15, 0x00d7);
15251         MP_WritePhyUshort(sc, 0x19, 0x4420);
15252         MP_WritePhyUshort(sc, 0x15, 0x00d8);
15253         MP_WritePhyUshort(sc, 0x19, 0x63d8);
15254         MP_WritePhyUshort(sc, 0x15, 0x00d9);
15255         MP_WritePhyUshort(sc, 0x19, 0xb608);
15256         MP_WritePhyUshort(sc, 0x15, 0x00da);
15257         MP_WritePhyUshort(sc, 0x19, 0xbcbd);
15258         MP_WritePhyUshort(sc, 0x15, 0x00db);
15259         MP_WritePhyUshort(sc, 0x19, 0xc60b);
15260         MP_WritePhyUshort(sc, 0x15, 0x00dc);
15261         MP_WritePhyUshort(sc, 0x19, 0x00fd);
15262         MP_WritePhyUshort(sc, 0x15, 0x00dd);
15263         MP_WritePhyUshort(sc, 0x19, 0x30e1);
15264         MP_WritePhyUshort(sc, 0x15, 0x00de);
15265         MP_WritePhyUshort(sc, 0x19, 0x0000);
15266         MP_WritePhyUshort(sc, 0x15, 0x00df);
15267         MP_WritePhyUshort(sc, 0x19, 0x0000);
15268         MP_WritePhyUshort(sc, 0x15, 0x00e0);
15269         MP_WritePhyUshort(sc, 0x19, 0x0000);
15270         MP_WritePhyUshort(sc, 0x15, 0x00e1);
15271         MP_WritePhyUshort(sc, 0x19, 0x4809);
15272         MP_WritePhyUshort(sc, 0x15, 0x00e2);
15273         MP_WritePhyUshort(sc, 0x19, 0x7e40);
15274         MP_WritePhyUshort(sc, 0x15, 0x00e3);
15275         MP_WritePhyUshort(sc, 0x19, 0x5a40);
15276         MP_WritePhyUshort(sc, 0x15, 0x00e4);
15277         MP_WritePhyUshort(sc, 0x19, 0x305a);
15278         MP_WritePhyUshort(sc, 0x15, 0x00e5);
15279         MP_WritePhyUshort(sc, 0x19, 0x0000);
15280         MP_WritePhyUshort(sc, 0x15, 0x00e6);
15281         MP_WritePhyUshort(sc, 0x19, 0x0000);
15282         MP_WritePhyUshort(sc, 0x15, 0x00e7);
15283         MP_WritePhyUshort(sc, 0x19, 0x0000);
15284         MP_WritePhyUshort(sc, 0x15, 0x00e8);
15285         MP_WritePhyUshort(sc, 0x19, 0x0000);
15286         MP_WritePhyUshort(sc, 0x15, 0x00e9);
15287         MP_WritePhyUshort(sc, 0x19, 0x480a);
15288         MP_WritePhyUshort(sc, 0x15, 0x00ea);
15289         MP_WritePhyUshort(sc, 0x19, 0x5820);
15290         MP_WritePhyUshort(sc, 0x15, 0x00eb);
15291         MP_WritePhyUshort(sc, 0x19, 0x6c03);
15292         MP_WritePhyUshort(sc, 0x15, 0x00ec);
15293         MP_WritePhyUshort(sc, 0x19, 0xb60a);
15294         MP_WritePhyUshort(sc, 0x15, 0x00ed);
15295         MP_WritePhyUshort(sc, 0x19, 0xda07);
15296         MP_WritePhyUshort(sc, 0x15, 0x00ee);
15297         MP_WritePhyUshort(sc, 0x19, 0x0008);
15298         MP_WritePhyUshort(sc, 0x15, 0x00ef);
15299         MP_WritePhyUshort(sc, 0x19, 0xc60b);
15300         MP_WritePhyUshort(sc, 0x15, 0x00f0);
15301         MP_WritePhyUshort(sc, 0x19, 0x00fc);
15302         MP_WritePhyUshort(sc, 0x15, 0x00f1);
15303         MP_WritePhyUshort(sc, 0x19, 0x30f6);
15304         MP_WritePhyUshort(sc, 0x15, 0x00f2);
15305         MP_WritePhyUshort(sc, 0x19, 0x0000);
15306         MP_WritePhyUshort(sc, 0x15, 0x00f3);
15307         MP_WritePhyUshort(sc, 0x19, 0x0000);
15308         MP_WritePhyUshort(sc, 0x15, 0x00f4);
15309         MP_WritePhyUshort(sc, 0x19, 0x0000);
15310         MP_WritePhyUshort(sc, 0x15, 0x00f5);
15311         MP_WritePhyUshort(sc, 0x19, 0x0000);
15312         MP_WritePhyUshort(sc, 0x15, 0x00f6);
15313         MP_WritePhyUshort(sc, 0x19, 0x4408);
15314         MP_WritePhyUshort(sc, 0x15, 0x00f7);
15315         MP_WritePhyUshort(sc, 0x19, 0x480b);
15316         MP_WritePhyUshort(sc, 0x15, 0x00f8);
15317         MP_WritePhyUshort(sc, 0x19, 0x6f03);
15318         MP_WritePhyUshort(sc, 0x15, 0x00f9);
15319         MP_WritePhyUshort(sc, 0x19, 0x405f);
15320         MP_WritePhyUshort(sc, 0x15, 0x00fa);
15321         MP_WritePhyUshort(sc, 0x19, 0x4448);
15322         MP_WritePhyUshort(sc, 0x15, 0x00fb);
15323         MP_WritePhyUshort(sc, 0x19, 0x4020);
15324         MP_WritePhyUshort(sc, 0x15, 0x00fc);
15325         MP_WritePhyUshort(sc, 0x19, 0x4468);
15326         MP_WritePhyUshort(sc, 0x15, 0x00fd);
15327         MP_WritePhyUshort(sc, 0x19, 0x9c03);
15328         MP_WritePhyUshort(sc, 0x15, 0x00fe);
15329         MP_WritePhyUshort(sc, 0x19, 0x6f07);
15330         MP_WritePhyUshort(sc, 0x15, 0x00ff);
15331         MP_WritePhyUshort(sc, 0x19, 0x58a0);
15332         MP_WritePhyUshort(sc, 0x15, 0x0100);
15333         MP_WritePhyUshort(sc, 0x19, 0xd6d1);
15334         MP_WritePhyUshort(sc, 0x15, 0x0101);
15335         MP_WritePhyUshort(sc, 0x19, 0x0004);
15336         MP_WritePhyUshort(sc, 0x15, 0x0102);
15337         MP_WritePhyUshort(sc, 0x19, 0xc137);
15338         MP_WritePhyUshort(sc, 0x15, 0x0103);
15339         MP_WritePhyUshort(sc, 0x19, 0x0002);
15340         MP_WritePhyUshort(sc, 0x15, 0x0104);
15341         MP_WritePhyUshort(sc, 0x19, 0xa0e5);
15342         MP_WritePhyUshort(sc, 0x15, 0x0105);
15343         MP_WritePhyUshort(sc, 0x19, 0x9df8);
15344         MP_WritePhyUshort(sc, 0x15, 0x0106);
15345         MP_WritePhyUshort(sc, 0x19, 0x30c6);
15346         MP_WritePhyUshort(sc, 0x15, 0x0107);
15347         MP_WritePhyUshort(sc, 0x19, 0x0000);
15348         MP_WritePhyUshort(sc, 0x15, 0x0108);
15349         MP_WritePhyUshort(sc, 0x19, 0x0000);
15350         MP_WritePhyUshort(sc, 0x15, 0x0109);
15351         MP_WritePhyUshort(sc, 0x19, 0x0000);
15352         MP_WritePhyUshort(sc, 0x15, 0x010a);
15353         MP_WritePhyUshort(sc, 0x19, 0x0000);
15354         MP_WritePhyUshort(sc, 0x15, 0x010b);
15355         MP_WritePhyUshort(sc, 0x19, 0x4808);
15356         MP_WritePhyUshort(sc, 0x15, 0x010c);
15357         MP_WritePhyUshort(sc, 0x19, 0xc32d);
15358         MP_WritePhyUshort(sc, 0x15, 0x010d);
15359         MP_WritePhyUshort(sc, 0x19, 0x0003);
15360         MP_WritePhyUshort(sc, 0x15, 0x010e);
15361         MP_WritePhyUshort(sc, 0x19, 0xc8b3);
15362         MP_WritePhyUshort(sc, 0x15, 0x010f);
15363         MP_WritePhyUshort(sc, 0x19, 0x00fc);
15364         MP_WritePhyUshort(sc, 0x15, 0x0110);
15365         MP_WritePhyUshort(sc, 0x19, 0x4400);
15366         MP_WritePhyUshort(sc, 0x15, 0x0111);
15367         MP_WritePhyUshort(sc, 0x19, 0x3116);
15368         MP_WritePhyUshort(sc, 0x15, 0x0112);
15369         MP_WritePhyUshort(sc, 0x19, 0x0000);
15370         MP_WritePhyUshort(sc, 0x15, 0x0113);
15371         MP_WritePhyUshort(sc, 0x19, 0x0000);
15372         MP_WritePhyUshort(sc, 0x15, 0x0114);
15373         MP_WritePhyUshort(sc, 0x19, 0x0000);
15374         MP_WritePhyUshort(sc, 0x15, 0x0115);
15375         MP_WritePhyUshort(sc, 0x19, 0x0000);
15376         MP_WritePhyUshort(sc, 0x15, 0x0116);
15377         MP_WritePhyUshort(sc, 0x19, 0x4803);
15378         MP_WritePhyUshort(sc, 0x15, 0x0117);
15379         MP_WritePhyUshort(sc, 0x19, 0x7c03);
15380         MP_WritePhyUshort(sc, 0x15, 0x0118);
15381         MP_WritePhyUshort(sc, 0x19, 0x6c02);
15382         MP_WritePhyUshort(sc, 0x15, 0x0119);
15383         MP_WritePhyUshort(sc, 0x19, 0x7c04);
15384         MP_WritePhyUshort(sc, 0x15, 0x011a);
15385         MP_WritePhyUshort(sc, 0x19, 0x6000);
15386         MP_WritePhyUshort(sc, 0x15, 0x011b);
15387         MP_WritePhyUshort(sc, 0x19, 0x5cf7);
15388         MP_WritePhyUshort(sc, 0x15, 0x011c);
15389         MP_WritePhyUshort(sc, 0x19, 0x7c2a);
15390         MP_WritePhyUshort(sc, 0x15, 0x011d);
15391         MP_WritePhyUshort(sc, 0x19, 0x5800);
15392         MP_WritePhyUshort(sc, 0x15, 0x011e);
15393         MP_WritePhyUshort(sc, 0x19, 0x5400);
15394         MP_WritePhyUshort(sc, 0x15, 0x011f);
15395         MP_WritePhyUshort(sc, 0x19, 0x7c08);
15396         MP_WritePhyUshort(sc, 0x15, 0x0120);
15397         MP_WritePhyUshort(sc, 0x19, 0x74f0);
15398         MP_WritePhyUshort(sc, 0x15, 0x0121);
15399         MP_WritePhyUshort(sc, 0x19, 0x4019);
15400         MP_WritePhyUshort(sc, 0x15, 0x0122);
15401         MP_WritePhyUshort(sc, 0x19, 0x440d);
15402         MP_WritePhyUshort(sc, 0x15, 0x0123);
15403         MP_WritePhyUshort(sc, 0x19, 0xb6c1);
15404         MP_WritePhyUshort(sc, 0x15, 0x0124);
15405         MP_WritePhyUshort(sc, 0x19, 0xc05b);
15406         MP_WritePhyUshort(sc, 0x15, 0x0125);
15407         MP_WritePhyUshort(sc, 0x19, 0x00bf);
15408         MP_WritePhyUshort(sc, 0x15, 0x0126);
15409         MP_WritePhyUshort(sc, 0x19, 0xc025);
15410         MP_WritePhyUshort(sc, 0x15, 0x0127);
15411         MP_WritePhyUshort(sc, 0x19, 0x00bd);
15412         MP_WritePhyUshort(sc, 0x15, 0x0128);
15413         MP_WritePhyUshort(sc, 0x19, 0xc603);
15414         MP_WritePhyUshort(sc, 0x15, 0x0129);
15415         MP_WritePhyUshort(sc, 0x19, 0x00bb);
15416         MP_WritePhyUshort(sc, 0x15, 0x012a);
15417         MP_WritePhyUshort(sc, 0x19, 0x8805);
15418         MP_WritePhyUshort(sc, 0x15, 0x012b);
15419         MP_WritePhyUshort(sc, 0x19, 0x7801);
15420         MP_WritePhyUshort(sc, 0x15, 0x012c);
15421         MP_WritePhyUshort(sc, 0x19, 0x4001);
15422         MP_WritePhyUshort(sc, 0x15, 0x012d);
15423         MP_WritePhyUshort(sc, 0x19, 0x7800);
15424         MP_WritePhyUshort(sc, 0x15, 0x012e);
15425         MP_WritePhyUshort(sc, 0x19, 0xa3dd);
15426         MP_WritePhyUshort(sc, 0x15, 0x012f);
15427         MP_WritePhyUshort(sc, 0x19, 0x7c03);
15428         MP_WritePhyUshort(sc, 0x15, 0x0130);
15429         MP_WritePhyUshort(sc, 0x19, 0x6c03);
15430         MP_WritePhyUshort(sc, 0x15, 0x0131);
15431         MP_WritePhyUshort(sc, 0x19, 0x8407);
15432         MP_WritePhyUshort(sc, 0x15, 0x0132);
15433         MP_WritePhyUshort(sc, 0x19, 0x7c03);
15434         MP_WritePhyUshort(sc, 0x15, 0x0133);
15435         MP_WritePhyUshort(sc, 0x19, 0x6c02);
15436         MP_WritePhyUshort(sc, 0x15, 0x0134);
15437         MP_WritePhyUshort(sc, 0x19, 0xd9b8);
15438         MP_WritePhyUshort(sc, 0x15, 0x0135);
15439         MP_WritePhyUshort(sc, 0x19, 0x0003);
15440         MP_WritePhyUshort(sc, 0x15, 0x0136);
15441         MP_WritePhyUshort(sc, 0x19, 0xc240);
15442         MP_WritePhyUshort(sc, 0x15, 0x0137);
15443         MP_WritePhyUshort(sc, 0x19, 0x0015);
15444         MP_WritePhyUshort(sc, 0x15, 0x0138);
15445         MP_WritePhyUshort(sc, 0x19, 0x7c03);
15446         MP_WritePhyUshort(sc, 0x15, 0x0139);
15447         MP_WritePhyUshort(sc, 0x19, 0x6c02);
15448         MP_WritePhyUshort(sc, 0x15, 0x013a);
15449         MP_WritePhyUshort(sc, 0x19, 0x9ae9);
15450         MP_WritePhyUshort(sc, 0x15, 0x013b);
15451         MP_WritePhyUshort(sc, 0x19, 0x3140);
15452         MP_WritePhyUshort(sc, 0x15, 0x013c);
15453         MP_WritePhyUshort(sc, 0x19, 0x0000);
15454         MP_WritePhyUshort(sc, 0x15, 0x013d);
15455         MP_WritePhyUshort(sc, 0x19, 0x0000);
15456         MP_WritePhyUshort(sc, 0x15, 0x013e);
15457         MP_WritePhyUshort(sc, 0x19, 0x0000);
15458         MP_WritePhyUshort(sc, 0x15, 0x013f);
15459         MP_WritePhyUshort(sc, 0x19, 0x0000);
15460         MP_WritePhyUshort(sc, 0x15, 0x0140);
15461         MP_WritePhyUshort(sc, 0x19, 0x4807);
15462         MP_WritePhyUshort(sc, 0x15, 0x0141);
15463         MP_WritePhyUshort(sc, 0x19, 0x4004);
15464         MP_WritePhyUshort(sc, 0x15, 0x0142);
15465         MP_WritePhyUshort(sc, 0x19, 0x4410);
15466         MP_WritePhyUshort(sc, 0x15, 0x0143);
15467         MP_WritePhyUshort(sc, 0x19, 0x7c0c);
15468         MP_WritePhyUshort(sc, 0x15, 0x0144);
15469         MP_WritePhyUshort(sc, 0x19, 0x600c);
15470         MP_WritePhyUshort(sc, 0x15, 0x0145);
15471         MP_WritePhyUshort(sc, 0x19, 0x9b00);
15472         MP_WritePhyUshort(sc, 0x15, 0x0146);
15473         MP_WritePhyUshort(sc, 0x19, 0xa68f);
15474         MP_WritePhyUshort(sc, 0x15, 0x0147);
15475         MP_WritePhyUshort(sc, 0x19, 0x3116);
15476         MP_WritePhyUshort(sc, 0x15, 0x0148);
15477         MP_WritePhyUshort(sc, 0x19, 0x0000);
15478         MP_WritePhyUshort(sc, 0x15, 0x0149);
15479         MP_WritePhyUshort(sc, 0x19, 0x0000);
15480         MP_WritePhyUshort(sc, 0x15, 0x014a);
15481         MP_WritePhyUshort(sc, 0x19, 0x0000);
15482         MP_WritePhyUshort(sc, 0x15, 0x014b);
15483         MP_WritePhyUshort(sc, 0x19, 0x0000);
15484         MP_WritePhyUshort(sc, 0x15, 0x014c);
15485         MP_WritePhyUshort(sc, 0x19, 0x4804);
15486         MP_WritePhyUshort(sc, 0x15, 0x014d);
15487         MP_WritePhyUshort(sc, 0x19, 0x54c0);
15488         MP_WritePhyUshort(sc, 0x15, 0x014e);
15489         MP_WritePhyUshort(sc, 0x19, 0xb703);
15490         MP_WritePhyUshort(sc, 0x15, 0x014f);
15491         MP_WritePhyUshort(sc, 0x19, 0x5cff);
15492         MP_WritePhyUshort(sc, 0x15, 0x0150);
15493         MP_WritePhyUshort(sc, 0x19, 0x315f);
15494         MP_WritePhyUshort(sc, 0x15, 0x0151);
15495         MP_WritePhyUshort(sc, 0x19, 0x7c08);
15496         MP_WritePhyUshort(sc, 0x15, 0x0152);
15497         MP_WritePhyUshort(sc, 0x19, 0x74f8);
15498         MP_WritePhyUshort(sc, 0x15, 0x0153);
15499         MP_WritePhyUshort(sc, 0x19, 0x6421);
15500         MP_WritePhyUshort(sc, 0x15, 0x0154);
15501         MP_WritePhyUshort(sc, 0x19, 0x7c08);
15502         MP_WritePhyUshort(sc, 0x15, 0x0155);
15503         MP_WritePhyUshort(sc, 0x19, 0x6000);
15504         MP_WritePhyUshort(sc, 0x15, 0x0156);
15505         MP_WritePhyUshort(sc, 0x19, 0x4003);
15506         MP_WritePhyUshort(sc, 0x15, 0x0157);
15507         MP_WritePhyUshort(sc, 0x19, 0x4418);
15508         MP_WritePhyUshort(sc, 0x15, 0x0158);
15509         MP_WritePhyUshort(sc, 0x19, 0x9b00);
15510         MP_WritePhyUshort(sc, 0x15, 0x0159);
15511         MP_WritePhyUshort(sc, 0x19, 0x6461);
15512         MP_WritePhyUshort(sc, 0x15, 0x015a);
15513         MP_WritePhyUshort(sc, 0x19, 0x64e1);
15514         MP_WritePhyUshort(sc, 0x15, 0x015b);
15515         MP_WritePhyUshort(sc, 0x19, 0x7c20);
15516         MP_WritePhyUshort(sc, 0x15, 0x015c);
15517         MP_WritePhyUshort(sc, 0x19, 0x5820);
15518         MP_WritePhyUshort(sc, 0x15, 0x015d);
15519         MP_WritePhyUshort(sc, 0x19, 0x5ccf);
15520         MP_WritePhyUshort(sc, 0x15, 0x015e);
15521         MP_WritePhyUshort(sc, 0x19, 0x7050);
15522         MP_WritePhyUshort(sc, 0x15, 0x015f);
15523         MP_WritePhyUshort(sc, 0x19, 0xd9b8);
15524         MP_WritePhyUshort(sc, 0x15, 0x0160);
15525         MP_WritePhyUshort(sc, 0x19, 0x0008);
15526         MP_WritePhyUshort(sc, 0x15, 0x0161);
15527         MP_WritePhyUshort(sc, 0x19, 0xdab1);
15528         MP_WritePhyUshort(sc, 0x15, 0x0162);
15529         MP_WritePhyUshort(sc, 0x19, 0x0015);
15530         MP_WritePhyUshort(sc, 0x15, 0x0163);
15531         MP_WritePhyUshort(sc, 0x19, 0xc244);
15532         MP_WritePhyUshort(sc, 0x15, 0x0164);
15533         MP_WritePhyUshort(sc, 0x19, 0x0013);
15534         MP_WritePhyUshort(sc, 0x15, 0x0165);
15535         MP_WritePhyUshort(sc, 0x19, 0xc021);
15536         MP_WritePhyUshort(sc, 0x15, 0x0166);
15537         MP_WritePhyUshort(sc, 0x19, 0x00f9);
15538         MP_WritePhyUshort(sc, 0x15, 0x0167);
15539         MP_WritePhyUshort(sc, 0x19, 0x3177);
15540         MP_WritePhyUshort(sc, 0x15, 0x0168);
15541         MP_WritePhyUshort(sc, 0x19, 0x5cf7);
15542         MP_WritePhyUshort(sc, 0x15, 0x0169);
15543         MP_WritePhyUshort(sc, 0x19, 0x4010);
15544         MP_WritePhyUshort(sc, 0x15, 0x016a);
15545         MP_WritePhyUshort(sc, 0x19, 0x4428);
15546         MP_WritePhyUshort(sc, 0x15, 0x016b);
15547         MP_WritePhyUshort(sc, 0x19, 0x9c00);
15548         MP_WritePhyUshort(sc, 0x15, 0x016c);
15549         MP_WritePhyUshort(sc, 0x19, 0x7c08);
15550         MP_WritePhyUshort(sc, 0x15, 0x016d);
15551         MP_WritePhyUshort(sc, 0x19, 0x6008);
15552         MP_WritePhyUshort(sc, 0x15, 0x016e);
15553         MP_WritePhyUshort(sc, 0x19, 0x7c08);
15554         MP_WritePhyUshort(sc, 0x15, 0x016f);
15555         MP_WritePhyUshort(sc, 0x19, 0x74f0);
15556         MP_WritePhyUshort(sc, 0x15, 0x0170);
15557         MP_WritePhyUshort(sc, 0x19, 0x6461);
15558         MP_WritePhyUshort(sc, 0x15, 0x0171);
15559         MP_WritePhyUshort(sc, 0x19, 0x6421);
15560         MP_WritePhyUshort(sc, 0x15, 0x0172);
15561         MP_WritePhyUshort(sc, 0x19, 0x64a1);
15562         MP_WritePhyUshort(sc, 0x15, 0x0173);
15563         MP_WritePhyUshort(sc, 0x19, 0x3116);
15564         MP_WritePhyUshort(sc, 0x15, 0x0174);
15565         MP_WritePhyUshort(sc, 0x19, 0x0000);
15566         MP_WritePhyUshort(sc, 0x15, 0x0175);
15567         MP_WritePhyUshort(sc, 0x19, 0x0000);
15568         MP_WritePhyUshort(sc, 0x15, 0x0176);
15569         MP_WritePhyUshort(sc, 0x19, 0x0000);
15570         MP_WritePhyUshort(sc, 0x15, 0x0177);
15571         MP_WritePhyUshort(sc, 0x19, 0x4805);
15572         MP_WritePhyUshort(sc, 0x15, 0x0178);
15573         MP_WritePhyUshort(sc, 0x19, 0xa103);
15574         MP_WritePhyUshort(sc, 0x15, 0x0179);
15575         MP_WritePhyUshort(sc, 0x19, 0x7c02);
15576         MP_WritePhyUshort(sc, 0x15, 0x017a);
15577         MP_WritePhyUshort(sc, 0x19, 0x6002);
15578         MP_WritePhyUshort(sc, 0x15, 0x017b);
15579         MP_WritePhyUshort(sc, 0x19, 0x7e00);
15580         MP_WritePhyUshort(sc, 0x15, 0x017c);
15581         MP_WritePhyUshort(sc, 0x19, 0x5400);
15582         MP_WritePhyUshort(sc, 0x15, 0x017d);
15583         MP_WritePhyUshort(sc, 0x19, 0x7c6b);
15584         MP_WritePhyUshort(sc, 0x15, 0x017e);
15585         MP_WritePhyUshort(sc, 0x19, 0x5c63);
15586         MP_WritePhyUshort(sc, 0x15, 0x017f);
15587         MP_WritePhyUshort(sc, 0x19, 0x407d);
15588         MP_WritePhyUshort(sc, 0x15, 0x0180);
15589         MP_WritePhyUshort(sc, 0x19, 0xa602);
15590         MP_WritePhyUshort(sc, 0x15, 0x0181);
15591         MP_WritePhyUshort(sc, 0x19, 0x4001);
15592         MP_WritePhyUshort(sc, 0x15, 0x0182);
15593         MP_WritePhyUshort(sc, 0x19, 0x4420);
15594         MP_WritePhyUshort(sc, 0x15, 0x0183);
15595         MP_WritePhyUshort(sc, 0x19, 0x4020);
15596         MP_WritePhyUshort(sc, 0x15, 0x0184);
15597         MP_WritePhyUshort(sc, 0x19, 0x44a1);
15598         MP_WritePhyUshort(sc, 0x15, 0x0185);
15599         MP_WritePhyUshort(sc, 0x19, 0xd6e0);
15600         MP_WritePhyUshort(sc, 0x15, 0x0186);
15601         MP_WritePhyUshort(sc, 0x19, 0x0009);
15602         MP_WritePhyUshort(sc, 0x15, 0x0187);
15603         MP_WritePhyUshort(sc, 0x19, 0x9efe);
15604         MP_WritePhyUshort(sc, 0x15, 0x0188);
15605         MP_WritePhyUshort(sc, 0x19, 0x7c02);
15606         MP_WritePhyUshort(sc, 0x15, 0x0189);
15607         MP_WritePhyUshort(sc, 0x19, 0x6000);
15608         MP_WritePhyUshort(sc, 0x15, 0x018a);
15609         MP_WritePhyUshort(sc, 0x19, 0x9c00);
15610         MP_WritePhyUshort(sc, 0x15, 0x018b);
15611         MP_WritePhyUshort(sc, 0x19, 0x318f);
15612         MP_WritePhyUshort(sc, 0x15, 0x018c);
15613         MP_WritePhyUshort(sc, 0x19, 0x0000);
15614         MP_WritePhyUshort(sc, 0x15, 0x018d);
15615         MP_WritePhyUshort(sc, 0x19, 0x0000);
15616         MP_WritePhyUshort(sc, 0x15, 0x018e);
15617         MP_WritePhyUshort(sc, 0x19, 0x0000);
15618         MP_WritePhyUshort(sc, 0x15, 0x018f);
15619         MP_WritePhyUshort(sc, 0x19, 0x4806);
15620         MP_WritePhyUshort(sc, 0x15, 0x0190);
15621         MP_WritePhyUshort(sc, 0x19, 0x7c10);
15622         MP_WritePhyUshort(sc, 0x15, 0x0191);
15623         MP_WritePhyUshort(sc, 0x19, 0x5c10);
15624         MP_WritePhyUshort(sc, 0x15, 0x0192);
15625         MP_WritePhyUshort(sc, 0x19, 0x40fa);
15626         MP_WritePhyUshort(sc, 0x15, 0x0193);
15627         MP_WritePhyUshort(sc, 0x19, 0xa602);
15628         MP_WritePhyUshort(sc, 0x15, 0x0194);
15629         MP_WritePhyUshort(sc, 0x19, 0x4010);
15630         MP_WritePhyUshort(sc, 0x15, 0x0195);
15631         MP_WritePhyUshort(sc, 0x19, 0x4440);
15632         MP_WritePhyUshort(sc, 0x15, 0x0196);
15633         MP_WritePhyUshort(sc, 0x19, 0x9d00);
15634         MP_WritePhyUshort(sc, 0x15, 0x0197);
15635         MP_WritePhyUshort(sc, 0x19, 0x7c80);
15636         MP_WritePhyUshort(sc, 0x15, 0x0198);
15637         MP_WritePhyUshort(sc, 0x19, 0x6400);
15638         MP_WritePhyUshort(sc, 0x15, 0x0199);
15639         MP_WritePhyUshort(sc, 0x19, 0x4003);
15640         MP_WritePhyUshort(sc, 0x15, 0x019a);
15641         MP_WritePhyUshort(sc, 0x19, 0x4540);
15642         MP_WritePhyUshort(sc, 0x15, 0x019b);
15643         MP_WritePhyUshort(sc, 0x19, 0x7c08);
15644         MP_WritePhyUshort(sc, 0x15, 0x019c);
15645         MP_WritePhyUshort(sc, 0x19, 0x6008);
15646         MP_WritePhyUshort(sc, 0x15, 0x019d);
15647         MP_WritePhyUshort(sc, 0x19, 0x9f00);
15648         MP_WritePhyUshort(sc, 0x15, 0x019e);
15649         MP_WritePhyUshort(sc, 0x19, 0x7c40);
15650         MP_WritePhyUshort(sc, 0x15, 0x019f);
15651         MP_WritePhyUshort(sc, 0x19, 0x6400);
15652         MP_WritePhyUshort(sc, 0x15, 0x01a0);
15653         MP_WritePhyUshort(sc, 0x19, 0x7c80);
15654         MP_WritePhyUshort(sc, 0x15, 0x01a1);
15655         MP_WritePhyUshort(sc, 0x19, 0x6480);
15656         MP_WritePhyUshort(sc, 0x15, 0x01a2);
15657         MP_WritePhyUshort(sc, 0x19, 0x3140);
15658         MP_WritePhyUshort(sc, 0x15, 0x01a3);
15659         MP_WritePhyUshort(sc, 0x19, 0x0000);
15660         MP_WritePhyUshort(sc, 0x15, 0x01a4);
15661         MP_WritePhyUshort(sc, 0x19, 0x0000);
15662         MP_WritePhyUshort(sc, 0x15, 0x01a5);
15663         MP_WritePhyUshort(sc, 0x19, 0x0000);
15664         MP_WritePhyUshort(sc, 0x15, 0x01a6);
15665         MP_WritePhyUshort(sc, 0x19, 0x4400);
15666         MP_WritePhyUshort(sc, 0x15, 0x01a7);
15667         MP_WritePhyUshort(sc, 0x19, 0x7c0b);
15668         MP_WritePhyUshort(sc, 0x15, 0x01a8);
15669         MP_WritePhyUshort(sc, 0x19, 0x6c01);
15670         MP_WritePhyUshort(sc, 0x15, 0x01a9);
15671         MP_WritePhyUshort(sc, 0x19, 0x64a8);
15672         MP_WritePhyUshort(sc, 0x15, 0x01aa);
15673         MP_WritePhyUshort(sc, 0x19, 0x6800);
15674         MP_WritePhyUshort(sc, 0x15, 0x01ab);
15675         MP_WritePhyUshort(sc, 0x19, 0x5cf0);
15676         MP_WritePhyUshort(sc, 0x15, 0x01ac);
15677         MP_WritePhyUshort(sc, 0x19, 0x588f);
15678         MP_WritePhyUshort(sc, 0x15, 0x01ad);
15679         MP_WritePhyUshort(sc, 0x19, 0xb628);
15680         MP_WritePhyUshort(sc, 0x15, 0x01ae);
15681         MP_WritePhyUshort(sc, 0x19, 0xc053);
15682         MP_WritePhyUshort(sc, 0x15, 0x01af);
15683         MP_WritePhyUshort(sc, 0x19, 0x0026);
15684         MP_WritePhyUshort(sc, 0x15, 0x01b0);
15685         MP_WritePhyUshort(sc, 0x19, 0xc02d);
15686         MP_WritePhyUshort(sc, 0x15, 0x01b1);
15687         MP_WritePhyUshort(sc, 0x19, 0x0024);
15688         MP_WritePhyUshort(sc, 0x15, 0x01b2);
15689         MP_WritePhyUshort(sc, 0x19, 0xc603);
15690         MP_WritePhyUshort(sc, 0x15, 0x01b3);
15691         MP_WritePhyUshort(sc, 0x19, 0x0022);
15692         MP_WritePhyUshort(sc, 0x15, 0x01b4);
15693         MP_WritePhyUshort(sc, 0x19, 0x8cf9);
15694         MP_WritePhyUshort(sc, 0x15, 0x01b5);
15695         MP_WritePhyUshort(sc, 0x19, 0x31ba);
15696         MP_WritePhyUshort(sc, 0x15, 0x01b6);
15697         MP_WritePhyUshort(sc, 0x19, 0x0000);
15698         MP_WritePhyUshort(sc, 0x15, 0x01b7);
15699         MP_WritePhyUshort(sc, 0x19, 0x0000);
15700         MP_WritePhyUshort(sc, 0x15, 0x01b8);
15701         MP_WritePhyUshort(sc, 0x19, 0x0000);
15702         MP_WritePhyUshort(sc, 0x15, 0x01b9);
15703         MP_WritePhyUshort(sc, 0x19, 0x0000);
15704         MP_WritePhyUshort(sc, 0x15, 0x01ba);
15705         MP_WritePhyUshort(sc, 0x19, 0x4400);
15706         MP_WritePhyUshort(sc, 0x15, 0x01bb);
15707         MP_WritePhyUshort(sc, 0x19, 0x5420);
15708         MP_WritePhyUshort(sc, 0x15, 0x01bc);
15709         MP_WritePhyUshort(sc, 0x19, 0x4811);
15710         MP_WritePhyUshort(sc, 0x15, 0x01bd);
15711         MP_WritePhyUshort(sc, 0x19, 0x5000);
15712         MP_WritePhyUshort(sc, 0x15, 0x01be);
15713         MP_WritePhyUshort(sc, 0x19, 0x4801);
15714         MP_WritePhyUshort(sc, 0x15, 0x01bf);
15715         MP_WritePhyUshort(sc, 0x19, 0x6800);
15716         MP_WritePhyUshort(sc, 0x15, 0x01c0);
15717         MP_WritePhyUshort(sc, 0x19, 0x31f5);
15718         MP_WritePhyUshort(sc, 0x15, 0x01c1);
15719         MP_WritePhyUshort(sc, 0x19, 0xb614);
15720         MP_WritePhyUshort(sc, 0x15, 0x01c2);
15721         MP_WritePhyUshort(sc, 0x19, 0x8ce4);
15722         MP_WritePhyUshort(sc, 0x15, 0x01c3);
15723         MP_WritePhyUshort(sc, 0x19, 0xb30c);
15724         MP_WritePhyUshort(sc, 0x15, 0x01c4);
15725         MP_WritePhyUshort(sc, 0x19, 0x7c03);
15726         MP_WritePhyUshort(sc, 0x15, 0x01c5);
15727         MP_WritePhyUshort(sc, 0x19, 0x6c02);
15728         MP_WritePhyUshort(sc, 0x15, 0x01c6);
15729         MP_WritePhyUshort(sc, 0x19, 0x8206);
15730         MP_WritePhyUshort(sc, 0x15, 0x01c7);
15731         MP_WritePhyUshort(sc, 0x19, 0x7c03);
15732         MP_WritePhyUshort(sc, 0x15, 0x01c8);
15733         MP_WritePhyUshort(sc, 0x19, 0x6c00);
15734         MP_WritePhyUshort(sc, 0x15, 0x01c9);
15735         MP_WritePhyUshort(sc, 0x19, 0x7c04);
15736         MP_WritePhyUshort(sc, 0x15, 0x01ca);
15737         MP_WritePhyUshort(sc, 0x19, 0x7404);
15738         MP_WritePhyUshort(sc, 0x15, 0x01cb);
15739         MP_WritePhyUshort(sc, 0x19, 0x31c0);
15740         MP_WritePhyUshort(sc, 0x15, 0x01cc);
15741         MP_WritePhyUshort(sc, 0x19, 0x7c04);
15742         MP_WritePhyUshort(sc, 0x15, 0x01cd);
15743         MP_WritePhyUshort(sc, 0x19, 0x7400);
15744         MP_WritePhyUshort(sc, 0x15, 0x01ce);
15745         MP_WritePhyUshort(sc, 0x19, 0x31c0);
15746         MP_WritePhyUshort(sc, 0x15, 0x01cf);
15747         MP_WritePhyUshort(sc, 0x19, 0x8df1);
15748         MP_WritePhyUshort(sc, 0x15, 0x01d0);
15749         MP_WritePhyUshort(sc, 0x19, 0x3248);
15750         MP_WritePhyUshort(sc, 0x15, 0x01d1);
15751         MP_WritePhyUshort(sc, 0x19, 0x0000);
15752         MP_WritePhyUshort(sc, 0x15, 0x01d2);
15753         MP_WritePhyUshort(sc, 0x19, 0x0000);
15754         MP_WritePhyUshort(sc, 0x15, 0x01d3);
15755         MP_WritePhyUshort(sc, 0x19, 0x0000);
15756         MP_WritePhyUshort(sc, 0x15, 0x01d4);
15757         MP_WritePhyUshort(sc, 0x19, 0x0000);
15758         MP_WritePhyUshort(sc, 0x15, 0x01d5);
15759         MP_WritePhyUshort(sc, 0x19, 0x4400);
15760         MP_WritePhyUshort(sc, 0x15, 0x01d6);
15761         MP_WritePhyUshort(sc, 0x19, 0x7c03);
15762         MP_WritePhyUshort(sc, 0x15, 0x01d7);
15763         MP_WritePhyUshort(sc, 0x19, 0x6c03);
15764         MP_WritePhyUshort(sc, 0x15, 0x01d8);
15765         MP_WritePhyUshort(sc, 0x19, 0x7670);
15766         MP_WritePhyUshort(sc, 0x15, 0x01d9);
15767         MP_WritePhyUshort(sc, 0x19, 0x4023);
15768         MP_WritePhyUshort(sc, 0x15, 0x01da);
15769         MP_WritePhyUshort(sc, 0x19, 0x4500);
15770         MP_WritePhyUshort(sc, 0x15, 0x01db);
15771         MP_WritePhyUshort(sc, 0x19, 0x4069);
15772         MP_WritePhyUshort(sc, 0x15, 0x01dc);
15773         MP_WritePhyUshort(sc, 0x19, 0x4580);
15774         MP_WritePhyUshort(sc, 0x15, 0x01dd);
15775         MP_WritePhyUshort(sc, 0x19, 0x9f00);
15776         MP_WritePhyUshort(sc, 0x15, 0x01de);
15777         MP_WritePhyUshort(sc, 0x19, 0xcff5);
15778         MP_WritePhyUshort(sc, 0x15, 0x01df);
15779         MP_WritePhyUshort(sc, 0x19, 0x00ff);
15780         MP_WritePhyUshort(sc, 0x15, 0x01e0);
15781         MP_WritePhyUshort(sc, 0x19, 0x76f0);
15782         MP_WritePhyUshort(sc, 0x15, 0x01e1);
15783         MP_WritePhyUshort(sc, 0x19, 0x4400);
15784         MP_WritePhyUshort(sc, 0x15, 0x01e2);
15785         MP_WritePhyUshort(sc, 0x19, 0x4023);
15786         MP_WritePhyUshort(sc, 0x15, 0x01e3);
15787         MP_WritePhyUshort(sc, 0x19, 0x4500);
15788         MP_WritePhyUshort(sc, 0x15, 0x01e4);
15789         MP_WritePhyUshort(sc, 0x19, 0x4069);
15790         MP_WritePhyUshort(sc, 0x15, 0x01e5);
15791         MP_WritePhyUshort(sc, 0x19, 0x4580);
15792         MP_WritePhyUshort(sc, 0x15, 0x01e6);
15793         MP_WritePhyUshort(sc, 0x19, 0x9f00);
15794         MP_WritePhyUshort(sc, 0x15, 0x01e7);
15795         MP_WritePhyUshort(sc, 0x19, 0xd0f5);
15796         MP_WritePhyUshort(sc, 0x15, 0x01e8);
15797         MP_WritePhyUshort(sc, 0x19, 0x00ff);
15798         MP_WritePhyUshort(sc, 0x15, 0x01e9);
15799         MP_WritePhyUshort(sc, 0x19, 0x4400);
15800         MP_WritePhyUshort(sc, 0x15, 0x01ea);
15801         MP_WritePhyUshort(sc, 0x19, 0x7c03);
15802         MP_WritePhyUshort(sc, 0x15, 0x01eb);
15803         MP_WritePhyUshort(sc, 0x19, 0x6800);
15804         MP_WritePhyUshort(sc, 0x15, 0x01ec);
15805         MP_WritePhyUshort(sc, 0x19, 0x66a0);
15806         MP_WritePhyUshort(sc, 0x15, 0x01ed);
15807         MP_WritePhyUshort(sc, 0x19, 0x8300);
15808         MP_WritePhyUshort(sc, 0x15, 0x01ee);
15809         MP_WritePhyUshort(sc, 0x19, 0x74f0);
15810         MP_WritePhyUshort(sc, 0x15, 0x01ef);
15811         MP_WritePhyUshort(sc, 0x19, 0x3006);
15812         MP_WritePhyUshort(sc, 0x15, 0x01f0);
15813         MP_WritePhyUshort(sc, 0x19, 0x0000);
15814         MP_WritePhyUshort(sc, 0x15, 0x01f1);
15815         MP_WritePhyUshort(sc, 0x19, 0x0000);
15816         MP_WritePhyUshort(sc, 0x15, 0x01f2);
15817         MP_WritePhyUshort(sc, 0x19, 0x0000);
15818         MP_WritePhyUshort(sc, 0x15, 0x01f3);
15819         MP_WritePhyUshort(sc, 0x19, 0x0000);
15820         MP_WritePhyUshort(sc, 0x15, 0x01f4);
15821         MP_WritePhyUshort(sc, 0x19, 0x0000);
15822         MP_WritePhyUshort(sc, 0x15, 0x01f5);
15823         MP_WritePhyUshort(sc, 0x19, 0x7c03);
15824         MP_WritePhyUshort(sc, 0x15, 0x01f6);
15825         MP_WritePhyUshort(sc, 0x19, 0x6c02);
15826         MP_WritePhyUshort(sc, 0x15, 0x01f7);
15827         MP_WritePhyUshort(sc, 0x19, 0x409d);
15828         MP_WritePhyUshort(sc, 0x15, 0x01f8);
15829         MP_WritePhyUshort(sc, 0x19, 0x7c87);
15830         MP_WritePhyUshort(sc, 0x15, 0x01f9);
15831         MP_WritePhyUshort(sc, 0x19, 0xae14);
15832         MP_WritePhyUshort(sc, 0x15, 0x01fa);
15833         MP_WritePhyUshort(sc, 0x19, 0x4400);
15834         MP_WritePhyUshort(sc, 0x15, 0x01fb);
15835         MP_WritePhyUshort(sc, 0x19, 0x7c40);
15836         MP_WritePhyUshort(sc, 0x15, 0x01fc);
15837         MP_WritePhyUshort(sc, 0x19, 0x6800);
15838         MP_WritePhyUshort(sc, 0x15, 0x01fd);
15839         MP_WritePhyUshort(sc, 0x19, 0x7801);
15840         MP_WritePhyUshort(sc, 0x15, 0x01fe);
15841         MP_WritePhyUshort(sc, 0x19, 0x980e);
15842         MP_WritePhyUshort(sc, 0x15, 0x01ff);
15843         MP_WritePhyUshort(sc, 0x19, 0x930c);
15844         MP_WritePhyUshort(sc, 0x15, 0x0200);
15845         MP_WritePhyUshort(sc, 0x19, 0x9206);
15846         MP_WritePhyUshort(sc, 0x15, 0x0201);
15847         MP_WritePhyUshort(sc, 0x19, 0x4002);
15848         MP_WritePhyUshort(sc, 0x15, 0x0202);
15849         MP_WritePhyUshort(sc, 0x19, 0x7800);
15850         MP_WritePhyUshort(sc, 0x15, 0x0203);
15851         MP_WritePhyUshort(sc, 0x19, 0x588f);
15852         MP_WritePhyUshort(sc, 0x15, 0x0204);
15853         MP_WritePhyUshort(sc, 0x19, 0x5520);
15854         MP_WritePhyUshort(sc, 0x15, 0x0205);
15855         MP_WritePhyUshort(sc, 0x19, 0x320c);
15856         MP_WritePhyUshort(sc, 0x15, 0x0206);
15857         MP_WritePhyUshort(sc, 0x19, 0x4000);
15858         MP_WritePhyUshort(sc, 0x15, 0x0207);
15859         MP_WritePhyUshort(sc, 0x19, 0x7800);
15860         MP_WritePhyUshort(sc, 0x15, 0x0208);
15861         MP_WritePhyUshort(sc, 0x19, 0x588d);
15862         MP_WritePhyUshort(sc, 0x15, 0x0209);
15863         MP_WritePhyUshort(sc, 0x19, 0x5500);
15864         MP_WritePhyUshort(sc, 0x15, 0x020a);
15865         MP_WritePhyUshort(sc, 0x19, 0x320c);
15866         MP_WritePhyUshort(sc, 0x15, 0x020b);
15867         MP_WritePhyUshort(sc, 0x19, 0x4002);
15868         MP_WritePhyUshort(sc, 0x15, 0x020c);
15869         MP_WritePhyUshort(sc, 0x19, 0x3220);
15870         MP_WritePhyUshort(sc, 0x15, 0x020d);
15871         MP_WritePhyUshort(sc, 0x19, 0x4480);
15872         MP_WritePhyUshort(sc, 0x15, 0x020e);
15873         MP_WritePhyUshort(sc, 0x19, 0x9e03);
15874         MP_WritePhyUshort(sc, 0x15, 0x020f);
15875         MP_WritePhyUshort(sc, 0x19, 0x7c40);
15876         MP_WritePhyUshort(sc, 0x15, 0x0210);
15877         MP_WritePhyUshort(sc, 0x19, 0x6840);
15878         MP_WritePhyUshort(sc, 0x15, 0x0211);
15879         MP_WritePhyUshort(sc, 0x19, 0x7801);
15880         MP_WritePhyUshort(sc, 0x15, 0x0212);
15881         MP_WritePhyUshort(sc, 0x19, 0x980e);
15882         MP_WritePhyUshort(sc, 0x15, 0x0213);
15883         MP_WritePhyUshort(sc, 0x19, 0x930c);
15884         MP_WritePhyUshort(sc, 0x15, 0x0214);
15885         MP_WritePhyUshort(sc, 0x19, 0x9206);
15886         MP_WritePhyUshort(sc, 0x15, 0x0215);
15887         MP_WritePhyUshort(sc, 0x19, 0x4000);
15888         MP_WritePhyUshort(sc, 0x15, 0x0216);
15889         MP_WritePhyUshort(sc, 0x19, 0x7800);
15890         MP_WritePhyUshort(sc, 0x15, 0x0217);
15891         MP_WritePhyUshort(sc, 0x19, 0x588f);
15892         MP_WritePhyUshort(sc, 0x15, 0x0218);
15893         MP_WritePhyUshort(sc, 0x19, 0x5520);
15894         MP_WritePhyUshort(sc, 0x15, 0x0219);
15895         MP_WritePhyUshort(sc, 0x19, 0x3220);
15896         MP_WritePhyUshort(sc, 0x15, 0x021a);
15897         MP_WritePhyUshort(sc, 0x19, 0x4002);
15898         MP_WritePhyUshort(sc, 0x15, 0x021b);
15899         MP_WritePhyUshort(sc, 0x19, 0x7800);
15900         MP_WritePhyUshort(sc, 0x15, 0x021c);
15901         MP_WritePhyUshort(sc, 0x19, 0x588d);
15902         MP_WritePhyUshort(sc, 0x15, 0x021d);
15903         MP_WritePhyUshort(sc, 0x19, 0x5540);
15904         MP_WritePhyUshort(sc, 0x15, 0x021e);
15905         MP_WritePhyUshort(sc, 0x19, 0x3220);
15906         MP_WritePhyUshort(sc, 0x15, 0x021f);
15907         MP_WritePhyUshort(sc, 0x19, 0x4000);
15908         MP_WritePhyUshort(sc, 0x15, 0x0220);
15909         MP_WritePhyUshort(sc, 0x19, 0x7800);
15910         MP_WritePhyUshort(sc, 0x15, 0x0221);
15911         MP_WritePhyUshort(sc, 0x19, 0x7c03);
15912         MP_WritePhyUshort(sc, 0x15, 0x0222);
15913         MP_WritePhyUshort(sc, 0x19, 0x6c00);
15914         MP_WritePhyUshort(sc, 0x15, 0x0223);
15915         MP_WritePhyUshort(sc, 0x19, 0x3231);
15916         MP_WritePhyUshort(sc, 0x15, 0x0224);
15917         MP_WritePhyUshort(sc, 0x19, 0xab06);
15918         MP_WritePhyUshort(sc, 0x15, 0x0225);
15919         MP_WritePhyUshort(sc, 0x19, 0xbf08);
15920         MP_WritePhyUshort(sc, 0x15, 0x0226);
15921         MP_WritePhyUshort(sc, 0x19, 0x4076);
15922         MP_WritePhyUshort(sc, 0x15, 0x0227);
15923         MP_WritePhyUshort(sc, 0x19, 0x7d07);
15924         MP_WritePhyUshort(sc, 0x15, 0x0228);
15925         MP_WritePhyUshort(sc, 0x19, 0x4502);
15926         MP_WritePhyUshort(sc, 0x15, 0x0229);
15927         MP_WritePhyUshort(sc, 0x19, 0x3231);
15928         MP_WritePhyUshort(sc, 0x15, 0x022a);
15929         MP_WritePhyUshort(sc, 0x19, 0x7d80);
15930         MP_WritePhyUshort(sc, 0x15, 0x022b);
15931         MP_WritePhyUshort(sc, 0x19, 0x5180);
15932         MP_WritePhyUshort(sc, 0x15, 0x022c);
15933         MP_WritePhyUshort(sc, 0x19, 0x322f);
15934         MP_WritePhyUshort(sc, 0x15, 0x022d);
15935         MP_WritePhyUshort(sc, 0x19, 0x7d80);
15936         MP_WritePhyUshort(sc, 0x15, 0x022e);
15937         MP_WritePhyUshort(sc, 0x19, 0x5000);
15938         MP_WritePhyUshort(sc, 0x15, 0x022f);
15939         MP_WritePhyUshort(sc, 0x19, 0x7d07);
15940         MP_WritePhyUshort(sc, 0x15, 0x0230);
15941         MP_WritePhyUshort(sc, 0x19, 0x4402);
15942         MP_WritePhyUshort(sc, 0x15, 0x0231);
15943         MP_WritePhyUshort(sc, 0x19, 0x7c03);
15944         MP_WritePhyUshort(sc, 0x15, 0x0232);
15945         MP_WritePhyUshort(sc, 0x19, 0x6c02);
15946         MP_WritePhyUshort(sc, 0x15, 0x0233);
15947         MP_WritePhyUshort(sc, 0x19, 0x7c03);
15948         MP_WritePhyUshort(sc, 0x15, 0x0234);
15949         MP_WritePhyUshort(sc, 0x19, 0xb309);
15950         MP_WritePhyUshort(sc, 0x15, 0x0235);
15951         MP_WritePhyUshort(sc, 0x19, 0xb204);
15952         MP_WritePhyUshort(sc, 0x15, 0x0236);
15953         MP_WritePhyUshort(sc, 0x19, 0xb105);
15954         MP_WritePhyUshort(sc, 0x15, 0x0237);
15955         MP_WritePhyUshort(sc, 0x19, 0x6c00);
15956         MP_WritePhyUshort(sc, 0x15, 0x0238);
15957         MP_WritePhyUshort(sc, 0x19, 0x31c1);
15958         MP_WritePhyUshort(sc, 0x15, 0x0239);
15959         MP_WritePhyUshort(sc, 0x19, 0x6c00);
15960         MP_WritePhyUshort(sc, 0x15, 0x023a);
15961         MP_WritePhyUshort(sc, 0x19, 0x3261);
15962         MP_WritePhyUshort(sc, 0x15, 0x023b);
15963         MP_WritePhyUshort(sc, 0x19, 0x6c00);
15964         MP_WritePhyUshort(sc, 0x15, 0x023c);
15965         MP_WritePhyUshort(sc, 0x19, 0x3250);
15966         MP_WritePhyUshort(sc, 0x15, 0x023d);
15967         MP_WritePhyUshort(sc, 0x19, 0xb203);
15968         MP_WritePhyUshort(sc, 0x15, 0x023e);
15969         MP_WritePhyUshort(sc, 0x19, 0x6c00);
15970         MP_WritePhyUshort(sc, 0x15, 0x023f);
15971         MP_WritePhyUshort(sc, 0x19, 0x327a);
15972         MP_WritePhyUshort(sc, 0x15, 0x0240);
15973         MP_WritePhyUshort(sc, 0x19, 0x6c00);
15974         MP_WritePhyUshort(sc, 0x15, 0x0241);
15975         MP_WritePhyUshort(sc, 0x19, 0x3293);
15976         MP_WritePhyUshort(sc, 0x15, 0x0242);
15977         MP_WritePhyUshort(sc, 0x19, 0x0000);
15978         MP_WritePhyUshort(sc, 0x15, 0x0243);
15979         MP_WritePhyUshort(sc, 0x19, 0x0000);
15980         MP_WritePhyUshort(sc, 0x15, 0x0244);
15981         MP_WritePhyUshort(sc, 0x19, 0x0000);
15982         MP_WritePhyUshort(sc, 0x15, 0x0245);
15983         MP_WritePhyUshort(sc, 0x19, 0x0000);
15984         MP_WritePhyUshort(sc, 0x15, 0x0246);
15985         MP_WritePhyUshort(sc, 0x19, 0x0000);
15986         MP_WritePhyUshort(sc, 0x15, 0x0247);
15987         MP_WritePhyUshort(sc, 0x19, 0x32a3);
15988         MP_WritePhyUshort(sc, 0x15, 0x0248);
15989         MP_WritePhyUshort(sc, 0x19, 0x5520);
15990         MP_WritePhyUshort(sc, 0x15, 0x0249);
15991         MP_WritePhyUshort(sc, 0x19, 0x403d);
15992         MP_WritePhyUshort(sc, 0x15, 0x024a);
15993         MP_WritePhyUshort(sc, 0x19, 0x440c);
15994         MP_WritePhyUshort(sc, 0x15, 0x024b);
15995         MP_WritePhyUshort(sc, 0x19, 0x4812);
15996         MP_WritePhyUshort(sc, 0x15, 0x024c);
15997         MP_WritePhyUshort(sc, 0x19, 0x5001);
15998         MP_WritePhyUshort(sc, 0x15, 0x024d);
15999         MP_WritePhyUshort(sc, 0x19, 0x4802);
16000         MP_WritePhyUshort(sc, 0x15, 0x024e);
16001         MP_WritePhyUshort(sc, 0x19, 0x6880);
16002         MP_WritePhyUshort(sc, 0x15, 0x024f);
16003         MP_WritePhyUshort(sc, 0x19, 0x31f5);
16004         MP_WritePhyUshort(sc, 0x15, 0x0250);
16005         MP_WritePhyUshort(sc, 0x19, 0xb685);
16006         MP_WritePhyUshort(sc, 0x15, 0x0251);
16007         MP_WritePhyUshort(sc, 0x19, 0x801c);
16008         MP_WritePhyUshort(sc, 0x15, 0x0252);
16009         MP_WritePhyUshort(sc, 0x19, 0xbaf5);
16010         MP_WritePhyUshort(sc, 0x15, 0x0253);
16011         MP_WritePhyUshort(sc, 0x19, 0xc07c);
16012         MP_WritePhyUshort(sc, 0x15, 0x0254);
16013         MP_WritePhyUshort(sc, 0x19, 0x00fb);
16014         MP_WritePhyUshort(sc, 0x15, 0x0255);
16015         MP_WritePhyUshort(sc, 0x19, 0x325a);
16016         MP_WritePhyUshort(sc, 0x15, 0x0256);
16017         MP_WritePhyUshort(sc, 0x19, 0x0000);
16018         MP_WritePhyUshort(sc, 0x15, 0x0257);
16019         MP_WritePhyUshort(sc, 0x19, 0x0000);
16020         MP_WritePhyUshort(sc, 0x15, 0x0258);
16021         MP_WritePhyUshort(sc, 0x19, 0x0000);
16022         MP_WritePhyUshort(sc, 0x15, 0x0259);
16023         MP_WritePhyUshort(sc, 0x19, 0x0000);
16024         MP_WritePhyUshort(sc, 0x15, 0x025a);
16025         MP_WritePhyUshort(sc, 0x19, 0x481a);
16026         MP_WritePhyUshort(sc, 0x15, 0x025b);
16027         MP_WritePhyUshort(sc, 0x19, 0x5001);
16028         MP_WritePhyUshort(sc, 0x15, 0x025c);
16029         MP_WritePhyUshort(sc, 0x19, 0x401b);
16030         MP_WritePhyUshort(sc, 0x15, 0x025d);
16031         MP_WritePhyUshort(sc, 0x19, 0x480a);
16032         MP_WritePhyUshort(sc, 0x15, 0x025e);
16033         MP_WritePhyUshort(sc, 0x19, 0x4418);
16034         MP_WritePhyUshort(sc, 0x15, 0x025f);
16035         MP_WritePhyUshort(sc, 0x19, 0x6900);
16036         MP_WritePhyUshort(sc, 0x15, 0x0260);
16037         MP_WritePhyUshort(sc, 0x19, 0x31f5);
16038         MP_WritePhyUshort(sc, 0x15, 0x0261);
16039         MP_WritePhyUshort(sc, 0x19, 0xb64b);
16040         MP_WritePhyUshort(sc, 0x15, 0x0262);
16041         MP_WritePhyUshort(sc, 0x19, 0xdb00);
16042         MP_WritePhyUshort(sc, 0x15, 0x0263);
16043         MP_WritePhyUshort(sc, 0x19, 0x0048);
16044         MP_WritePhyUshort(sc, 0x15, 0x0264);
16045         MP_WritePhyUshort(sc, 0x19, 0xdb7d);
16046         MP_WritePhyUshort(sc, 0x15, 0x0265);
16047         MP_WritePhyUshort(sc, 0x19, 0x0002);
16048         MP_WritePhyUshort(sc, 0x15, 0x0266);
16049         MP_WritePhyUshort(sc, 0x19, 0xa0fa);
16050         MP_WritePhyUshort(sc, 0x15, 0x0267);
16051         MP_WritePhyUshort(sc, 0x19, 0x4408);
16052         MP_WritePhyUshort(sc, 0x15, 0x0268);
16053         MP_WritePhyUshort(sc, 0x19, 0x3248);
16054         MP_WritePhyUshort(sc, 0x15, 0x0269);
16055         MP_WritePhyUshort(sc, 0x19, 0x0000);
16056         MP_WritePhyUshort(sc, 0x15, 0x026a);
16057         MP_WritePhyUshort(sc, 0x19, 0x0000);
16058         MP_WritePhyUshort(sc, 0x15, 0x026b);
16059         MP_WritePhyUshort(sc, 0x19, 0x0000);
16060         MP_WritePhyUshort(sc, 0x15, 0x026c);
16061         MP_WritePhyUshort(sc, 0x19, 0x0000);
16062         MP_WritePhyUshort(sc, 0x15, 0x026d);
16063         MP_WritePhyUshort(sc, 0x19, 0xb806);
16064         MP_WritePhyUshort(sc, 0x15, 0x026e);
16065         MP_WritePhyUshort(sc, 0x19, 0x588d);
16066         MP_WritePhyUshort(sc, 0x15, 0x026f);
16067         MP_WritePhyUshort(sc, 0x19, 0x5500);
16068         MP_WritePhyUshort(sc, 0x15, 0x0270);
16069         MP_WritePhyUshort(sc, 0x19, 0x7801);
16070         MP_WritePhyUshort(sc, 0x15, 0x0271);
16071         MP_WritePhyUshort(sc, 0x19, 0x4002);
16072         MP_WritePhyUshort(sc, 0x15, 0x0272);
16073         MP_WritePhyUshort(sc, 0x19, 0x7800);
16074         MP_WritePhyUshort(sc, 0x15, 0x0273);
16075         MP_WritePhyUshort(sc, 0x19, 0x4814);
16076         MP_WritePhyUshort(sc, 0x15, 0x0274);
16077         MP_WritePhyUshort(sc, 0x19, 0x500b);
16078         MP_WritePhyUshort(sc, 0x15, 0x0275);
16079         MP_WritePhyUshort(sc, 0x19, 0x4804);
16080         MP_WritePhyUshort(sc, 0x15, 0x0276);
16081         MP_WritePhyUshort(sc, 0x19, 0x40c4);
16082         MP_WritePhyUshort(sc, 0x15, 0x0277);
16083         MP_WritePhyUshort(sc, 0x19, 0x4425);
16084         MP_WritePhyUshort(sc, 0x15, 0x0278);
16085         MP_WritePhyUshort(sc, 0x19, 0x6a00);
16086         MP_WritePhyUshort(sc, 0x15, 0x0279);
16087         MP_WritePhyUshort(sc, 0x19, 0x31f5);
16088         MP_WritePhyUshort(sc, 0x15, 0x027a);
16089         MP_WritePhyUshort(sc, 0x19, 0xb632);
16090         MP_WritePhyUshort(sc, 0x15, 0x027b);
16091         MP_WritePhyUshort(sc, 0x19, 0xdc03);
16092         MP_WritePhyUshort(sc, 0x15, 0x027c);
16093         MP_WritePhyUshort(sc, 0x19, 0x0027);
16094         MP_WritePhyUshort(sc, 0x15, 0x027d);
16095         MP_WritePhyUshort(sc, 0x19, 0x80fc);
16096         MP_WritePhyUshort(sc, 0x15, 0x027e);
16097         MP_WritePhyUshort(sc, 0x19, 0x3283);
16098         MP_WritePhyUshort(sc, 0x15, 0x027f);
16099         MP_WritePhyUshort(sc, 0x19, 0x0000);
16100         MP_WritePhyUshort(sc, 0x15, 0x0280);
16101         MP_WritePhyUshort(sc, 0x19, 0x0000);
16102         MP_WritePhyUshort(sc, 0x15, 0x0281);
16103         MP_WritePhyUshort(sc, 0x19, 0x0000);
16104         MP_WritePhyUshort(sc, 0x15, 0x0282);
16105         MP_WritePhyUshort(sc, 0x19, 0x0000);
16106         MP_WritePhyUshort(sc, 0x15, 0x0283);
16107         MP_WritePhyUshort(sc, 0x19, 0xb806);
16108         MP_WritePhyUshort(sc, 0x15, 0x0284);
16109         MP_WritePhyUshort(sc, 0x19, 0x588f);
16110         MP_WritePhyUshort(sc, 0x15, 0x0285);
16111         MP_WritePhyUshort(sc, 0x19, 0x5520);
16112         MP_WritePhyUshort(sc, 0x15, 0x0286);
16113         MP_WritePhyUshort(sc, 0x19, 0x7801);
16114         MP_WritePhyUshort(sc, 0x15, 0x0287);
16115         MP_WritePhyUshort(sc, 0x19, 0x4000);
16116         MP_WritePhyUshort(sc, 0x15, 0x0288);
16117         MP_WritePhyUshort(sc, 0x19, 0x7800);
16118         MP_WritePhyUshort(sc, 0x15, 0x0289);
16119         MP_WritePhyUshort(sc, 0x19, 0x4818);
16120         MP_WritePhyUshort(sc, 0x15, 0x028a);
16121         MP_WritePhyUshort(sc, 0x19, 0x5051);
16122         MP_WritePhyUshort(sc, 0x15, 0x028b);
16123         MP_WritePhyUshort(sc, 0x19, 0x4808);
16124         MP_WritePhyUshort(sc, 0x15, 0x028c);
16125         MP_WritePhyUshort(sc, 0x19, 0x4050);
16126         MP_WritePhyUshort(sc, 0x15, 0x028d);
16127         MP_WritePhyUshort(sc, 0x19, 0x4462);
16128         MP_WritePhyUshort(sc, 0x15, 0x028e);
16129         MP_WritePhyUshort(sc, 0x19, 0x40c4);
16130         MP_WritePhyUshort(sc, 0x15, 0x028f);
16131         MP_WritePhyUshort(sc, 0x19, 0x4473);
16132         MP_WritePhyUshort(sc, 0x15, 0x0290);
16133         MP_WritePhyUshort(sc, 0x19, 0x5041);
16134         MP_WritePhyUshort(sc, 0x15, 0x0291);
16135         MP_WritePhyUshort(sc, 0x19, 0x6b00);
16136         MP_WritePhyUshort(sc, 0x15, 0x0292);
16137         MP_WritePhyUshort(sc, 0x19, 0x31f5);
16138         MP_WritePhyUshort(sc, 0x15, 0x0293);
16139         MP_WritePhyUshort(sc, 0x19, 0xb619);
16140         MP_WritePhyUshort(sc, 0x15, 0x0294);
16141         MP_WritePhyUshort(sc, 0x19, 0x80d9);
16142         MP_WritePhyUshort(sc, 0x15, 0x0295);
16143         MP_WritePhyUshort(sc, 0x19, 0xbd06);
16144         MP_WritePhyUshort(sc, 0x15, 0x0296);
16145         MP_WritePhyUshort(sc, 0x19, 0xbb0d);
16146         MP_WritePhyUshort(sc, 0x15, 0x0297);
16147         MP_WritePhyUshort(sc, 0x19, 0xaf14);
16148         MP_WritePhyUshort(sc, 0x15, 0x0298);
16149         MP_WritePhyUshort(sc, 0x19, 0x8efa);
16150         MP_WritePhyUshort(sc, 0x15, 0x0299);
16151         MP_WritePhyUshort(sc, 0x19, 0x5049);
16152         MP_WritePhyUshort(sc, 0x15, 0x029a);
16153         MP_WritePhyUshort(sc, 0x19, 0x3248);
16154         MP_WritePhyUshort(sc, 0x15, 0x029b);
16155         MP_WritePhyUshort(sc, 0x19, 0x4c10);
16156         MP_WritePhyUshort(sc, 0x15, 0x029c);
16157         MP_WritePhyUshort(sc, 0x19, 0x44b0);
16158         MP_WritePhyUshort(sc, 0x15, 0x029d);
16159         MP_WritePhyUshort(sc, 0x19, 0x4c00);
16160         MP_WritePhyUshort(sc, 0x15, 0x029e);
16161         MP_WritePhyUshort(sc, 0x19, 0x3292);
16162         MP_WritePhyUshort(sc, 0x15, 0x029f);
16163         MP_WritePhyUshort(sc, 0x19, 0x0000);
16164         MP_WritePhyUshort(sc, 0x15, 0x02a0);
16165         MP_WritePhyUshort(sc, 0x19, 0x0000);
16166         MP_WritePhyUshort(sc, 0x15, 0x02a1);
16167         MP_WritePhyUshort(sc, 0x19, 0x0000);
16168         MP_WritePhyUshort(sc, 0x15, 0x02a2);
16169         MP_WritePhyUshort(sc, 0x19, 0x0000);
16170         MP_WritePhyUshort(sc, 0x15, 0x02a3);
16171         MP_WritePhyUshort(sc, 0x19, 0x481f);
16172         MP_WritePhyUshort(sc, 0x15, 0x02a4);
16173         MP_WritePhyUshort(sc, 0x19, 0x5005);
16174         MP_WritePhyUshort(sc, 0x15, 0x02a5);
16175         MP_WritePhyUshort(sc, 0x19, 0x480f);
16176         MP_WritePhyUshort(sc, 0x15, 0x02a6);
16177         MP_WritePhyUshort(sc, 0x19, 0xac00);
16178         MP_WritePhyUshort(sc, 0x15, 0x02a7);
16179         MP_WritePhyUshort(sc, 0x19, 0x31a6);
16180         MP_WritePhyUshort(sc, 0x15, 0x02a8);
16181         MP_WritePhyUshort(sc, 0x19, 0x0000);
16182         MP_WritePhyUshort(sc, 0x15, 0x02a9);
16183         MP_WritePhyUshort(sc, 0x19, 0x0000);
16184         MP_WritePhyUshort(sc, 0x15, 0x02aa);
16185         MP_WritePhyUshort(sc, 0x19, 0x0000);
16186         MP_WritePhyUshort(sc, 0x15, 0x02ab);
16187         MP_WritePhyUshort(sc, 0x19, 0x31ba);
16188         MP_WritePhyUshort(sc, 0x15, 0x02ac);
16189         MP_WritePhyUshort(sc, 0x19, 0x31d5);
16190         MP_WritePhyUshort(sc, 0x15, 0x02ad);
16191         MP_WritePhyUshort(sc, 0x19, 0x0000);
16192         MP_WritePhyUshort(sc, 0x15, 0x02ae);
16193         MP_WritePhyUshort(sc, 0x19, 0x5cf0);
16194         MP_WritePhyUshort(sc, 0x15, 0x02af);
16195         MP_WritePhyUshort(sc, 0x19, 0x588c);
16196         MP_WritePhyUshort(sc, 0x15, 0x02b0);
16197         MP_WritePhyUshort(sc, 0x19, 0x542f);
16198         MP_WritePhyUshort(sc, 0x15, 0x02b1);
16199         MP_WritePhyUshort(sc, 0x19, 0x7ffb);
16200         MP_WritePhyUshort(sc, 0x15, 0x02b2);
16201         MP_WritePhyUshort(sc, 0x19, 0x6ff8);
16202         MP_WritePhyUshort(sc, 0x15, 0x02b3);
16203         MP_WritePhyUshort(sc, 0x19, 0x64a4);
16204         MP_WritePhyUshort(sc, 0x15, 0x02b4);
16205         MP_WritePhyUshort(sc, 0x19, 0x64a0);
16206         MP_WritePhyUshort(sc, 0x15, 0x02b5);
16207         MP_WritePhyUshort(sc, 0x19, 0x6800);
16208         MP_WritePhyUshort(sc, 0x15, 0x02b6);
16209         MP_WritePhyUshort(sc, 0x19, 0x4400);
16210         MP_WritePhyUshort(sc, 0x15, 0x02b7);
16211         MP_WritePhyUshort(sc, 0x19, 0x4020);
16212         MP_WritePhyUshort(sc, 0x15, 0x02b8);
16213         MP_WritePhyUshort(sc, 0x19, 0x4480);
16214         MP_WritePhyUshort(sc, 0x15, 0x02b9);
16215         MP_WritePhyUshort(sc, 0x19, 0x9e00);
16216         MP_WritePhyUshort(sc, 0x15, 0x02ba);
16217         MP_WritePhyUshort(sc, 0x19, 0x4891);
16218         MP_WritePhyUshort(sc, 0x15, 0x02bb);
16219         MP_WritePhyUshort(sc, 0x19, 0x4cc0);
16220         MP_WritePhyUshort(sc, 0x15, 0x02bc);
16221         MP_WritePhyUshort(sc, 0x19, 0x4801);
16222         MP_WritePhyUshort(sc, 0x15, 0x02bd);
16223         MP_WritePhyUshort(sc, 0x19, 0xa609);
16224         MP_WritePhyUshort(sc, 0x15, 0x02be);
16225         MP_WritePhyUshort(sc, 0x19, 0xd64f);
16226         MP_WritePhyUshort(sc, 0x15, 0x02bf);
16227         MP_WritePhyUshort(sc, 0x19, 0x004e);
16228         MP_WritePhyUshort(sc, 0x15, 0x02c0);
16229         MP_WritePhyUshort(sc, 0x19, 0x87fe);
16230         MP_WritePhyUshort(sc, 0x15, 0x02c1);
16231         MP_WritePhyUshort(sc, 0x19, 0x32c6);
16232         MP_WritePhyUshort(sc, 0x15, 0x02c2);
16233         MP_WritePhyUshort(sc, 0x19, 0x0000);
16234         MP_WritePhyUshort(sc, 0x15, 0x02c3);
16235         MP_WritePhyUshort(sc, 0x19, 0x0000);
16236         MP_WritePhyUshort(sc, 0x15, 0x02c4);
16237         MP_WritePhyUshort(sc, 0x19, 0x0000);
16238         MP_WritePhyUshort(sc, 0x15, 0x02c5);
16239         MP_WritePhyUshort(sc, 0x19, 0x0000);
16240         MP_WritePhyUshort(sc, 0x15, 0x02c6);
16241         MP_WritePhyUshort(sc, 0x19, 0x48b2);
16242         MP_WritePhyUshort(sc, 0x15, 0x02c7);
16243         MP_WritePhyUshort(sc, 0x19, 0x4020);
16244         MP_WritePhyUshort(sc, 0x15, 0x02c8);
16245         MP_WritePhyUshort(sc, 0x19, 0x4822);
16246         MP_WritePhyUshort(sc, 0x15, 0x02c9);
16247         MP_WritePhyUshort(sc, 0x19, 0x4488);
16248         MP_WritePhyUshort(sc, 0x15, 0x02ca);
16249         MP_WritePhyUshort(sc, 0x19, 0xd64f);
16250         MP_WritePhyUshort(sc, 0x15, 0x02cb);
16251         MP_WritePhyUshort(sc, 0x19, 0x0042);
16252         MP_WritePhyUshort(sc, 0x15, 0x02cc);
16253         MP_WritePhyUshort(sc, 0x19, 0x8203);
16254         MP_WritePhyUshort(sc, 0x15, 0x02cd);
16255         MP_WritePhyUshort(sc, 0x19, 0x4cc8);
16256         MP_WritePhyUshort(sc, 0x15, 0x02ce);
16257         MP_WritePhyUshort(sc, 0x19, 0x32d0);
16258         MP_WritePhyUshort(sc, 0x15, 0x02cf);
16259         MP_WritePhyUshort(sc, 0x19, 0x4cc0);
16260         MP_WritePhyUshort(sc, 0x15, 0x02d0);
16261         MP_WritePhyUshort(sc, 0x19, 0xc4d4);
16262         MP_WritePhyUshort(sc, 0x15, 0x02d1);
16263         MP_WritePhyUshort(sc, 0x19, 0x00f9);
16264         MP_WritePhyUshort(sc, 0x15, 0x02d2);
16265         MP_WritePhyUshort(sc, 0x19, 0xa51a);
16266         MP_WritePhyUshort(sc, 0x15, 0x02d3);
16267         MP_WritePhyUshort(sc, 0x19, 0x32d9);
16268         MP_WritePhyUshort(sc, 0x15, 0x02d4);
16269         MP_WritePhyUshort(sc, 0x19, 0x0000);
16270         MP_WritePhyUshort(sc, 0x15, 0x02d5);
16271         MP_WritePhyUshort(sc, 0x19, 0x0000);
16272         MP_WritePhyUshort(sc, 0x15, 0x02d6);
16273         MP_WritePhyUshort(sc, 0x19, 0x0000);
16274         MP_WritePhyUshort(sc, 0x15, 0x02d7);
16275         MP_WritePhyUshort(sc, 0x19, 0x0000);
16276         MP_WritePhyUshort(sc, 0x15, 0x02d8);
16277         MP_WritePhyUshort(sc, 0x19, 0x0000);
16278         MP_WritePhyUshort(sc, 0x15, 0x02d9);
16279         MP_WritePhyUshort(sc, 0x19, 0x48b3);
16280         MP_WritePhyUshort(sc, 0x15, 0x02da);
16281         MP_WritePhyUshort(sc, 0x19, 0x4020);
16282         MP_WritePhyUshort(sc, 0x15, 0x02db);
16283         MP_WritePhyUshort(sc, 0x19, 0x4823);
16284         MP_WritePhyUshort(sc, 0x15, 0x02dc);
16285         MP_WritePhyUshort(sc, 0x19, 0x4410);
16286         MP_WritePhyUshort(sc, 0x15, 0x02dd);
16287         MP_WritePhyUshort(sc, 0x19, 0xb630);
16288         MP_WritePhyUshort(sc, 0x15, 0x02de);
16289         MP_WritePhyUshort(sc, 0x19, 0x7dc8);
16290         MP_WritePhyUshort(sc, 0x15, 0x02df);
16291         MP_WritePhyUshort(sc, 0x19, 0x8203);
16292         MP_WritePhyUshort(sc, 0x15, 0x02e0);
16293         MP_WritePhyUshort(sc, 0x19, 0x4c48);
16294         MP_WritePhyUshort(sc, 0x15, 0x02e1);
16295         MP_WritePhyUshort(sc, 0x19, 0x32e3);
16296         MP_WritePhyUshort(sc, 0x15, 0x02e2);
16297         MP_WritePhyUshort(sc, 0x19, 0x4c40);
16298         MP_WritePhyUshort(sc, 0x15, 0x02e3);
16299         MP_WritePhyUshort(sc, 0x19, 0x9bfa);
16300         MP_WritePhyUshort(sc, 0x15, 0x02e4);
16301         MP_WritePhyUshort(sc, 0x19, 0x84ca);
16302         MP_WritePhyUshort(sc, 0x15, 0x02e5);
16303         MP_WritePhyUshort(sc, 0x19, 0x85f8);
16304         MP_WritePhyUshort(sc, 0x15, 0x02e6);
16305         MP_WritePhyUshort(sc, 0x19, 0x32ec);
16306         MP_WritePhyUshort(sc, 0x15, 0x02e7);
16307         MP_WritePhyUshort(sc, 0x19, 0x0000);
16308         MP_WritePhyUshort(sc, 0x15, 0x02e8);
16309         MP_WritePhyUshort(sc, 0x19, 0x0000);
16310         MP_WritePhyUshort(sc, 0x15, 0x02e9);
16311         MP_WritePhyUshort(sc, 0x19, 0x0000);
16312         MP_WritePhyUshort(sc, 0x15, 0x02ea);
16313         MP_WritePhyUshort(sc, 0x19, 0x0000);
16314         MP_WritePhyUshort(sc, 0x15, 0x02eb);
16315         MP_WritePhyUshort(sc, 0x19, 0x0000);
16316         MP_WritePhyUshort(sc, 0x15, 0x02ec);
16317         MP_WritePhyUshort(sc, 0x19, 0x48d4);
16318         MP_WritePhyUshort(sc, 0x15, 0x02ed);
16319         MP_WritePhyUshort(sc, 0x19, 0x4020);
16320         MP_WritePhyUshort(sc, 0x15, 0x02ee);
16321         MP_WritePhyUshort(sc, 0x19, 0x4844);
16322         MP_WritePhyUshort(sc, 0x15, 0x02ef);
16323         MP_WritePhyUshort(sc, 0x19, 0x4420);
16324         MP_WritePhyUshort(sc, 0x15, 0x02f0);
16325         MP_WritePhyUshort(sc, 0x19, 0x6800);
16326         MP_WritePhyUshort(sc, 0x15, 0x02f1);
16327         MP_WritePhyUshort(sc, 0x19, 0x7dc0);
16328         MP_WritePhyUshort(sc, 0x15, 0x02f2);
16329         MP_WritePhyUshort(sc, 0x19, 0x4c40);
16330         MP_WritePhyUshort(sc, 0x15, 0x02f3);
16331         MP_WritePhyUshort(sc, 0x19, 0x7c0b);
16332         MP_WritePhyUshort(sc, 0x15, 0x02f4);
16333         MP_WritePhyUshort(sc, 0x19, 0x6c08);
16334         MP_WritePhyUshort(sc, 0x15, 0x02f5);
16335         MP_WritePhyUshort(sc, 0x19, 0x3311);
16336         MP_WritePhyUshort(sc, 0x15, 0x02f6);
16337         MP_WritePhyUshort(sc, 0x19, 0x9cfd);
16338         MP_WritePhyUshort(sc, 0x15, 0x02f7);
16339         MP_WritePhyUshort(sc, 0x19, 0xb616);
16340         MP_WritePhyUshort(sc, 0x15, 0x02f8);
16341         MP_WritePhyUshort(sc, 0x19, 0xc42b);
16342         MP_WritePhyUshort(sc, 0x15, 0x02f9);
16343         MP_WritePhyUshort(sc, 0x19, 0x00e0);
16344         MP_WritePhyUshort(sc, 0x15, 0x02fa);
16345         MP_WritePhyUshort(sc, 0x19, 0xc455);
16346         MP_WritePhyUshort(sc, 0x15, 0x02fb);
16347         MP_WritePhyUshort(sc, 0x19, 0x00b3);
16348         MP_WritePhyUshort(sc, 0x15, 0x02fc);
16349         MP_WritePhyUshort(sc, 0x19, 0xb20a);
16350         MP_WritePhyUshort(sc, 0x15, 0x02fd);
16351         MP_WritePhyUshort(sc, 0x19, 0x7c03);
16352         MP_WritePhyUshort(sc, 0x15, 0x02fe);
16353         MP_WritePhyUshort(sc, 0x19, 0x6c02);
16354         MP_WritePhyUshort(sc, 0x15, 0x02ff);
16355         MP_WritePhyUshort(sc, 0x19, 0x8204);
16356         MP_WritePhyUshort(sc, 0x15, 0x0300);
16357         MP_WritePhyUshort(sc, 0x19, 0x7c04);
16358         MP_WritePhyUshort(sc, 0x15, 0x0301);
16359         MP_WritePhyUshort(sc, 0x19, 0x7404);
16360         MP_WritePhyUshort(sc, 0x15, 0x0302);
16361         MP_WritePhyUshort(sc, 0x19, 0x32f3);
16362         MP_WritePhyUshort(sc, 0x15, 0x0303);
16363         MP_WritePhyUshort(sc, 0x19, 0x7c04);
16364         MP_WritePhyUshort(sc, 0x15, 0x0304);
16365         MP_WritePhyUshort(sc, 0x19, 0x7400);
16366         MP_WritePhyUshort(sc, 0x15, 0x0305);
16367         MP_WritePhyUshort(sc, 0x19, 0x32f3);
16368         MP_WritePhyUshort(sc, 0x15, 0x0306);
16369         MP_WritePhyUshort(sc, 0x19, 0xefed);
16370         MP_WritePhyUshort(sc, 0x15, 0x0307);
16371         MP_WritePhyUshort(sc, 0x19, 0x3342);
16372         MP_WritePhyUshort(sc, 0x15, 0x0308);
16373         MP_WritePhyUshort(sc, 0x19, 0x0000);
16374         MP_WritePhyUshort(sc, 0x15, 0x0309);
16375         MP_WritePhyUshort(sc, 0x19, 0x0000);
16376         MP_WritePhyUshort(sc, 0x15, 0x030a);
16377         MP_WritePhyUshort(sc, 0x19, 0x0000);
16378         MP_WritePhyUshort(sc, 0x15, 0x030b);
16379         MP_WritePhyUshort(sc, 0x19, 0x0000);
16380         MP_WritePhyUshort(sc, 0x15, 0x030c);
16381         MP_WritePhyUshort(sc, 0x19, 0x0000);
16382         MP_WritePhyUshort(sc, 0x15, 0x030d);
16383         MP_WritePhyUshort(sc, 0x19, 0x3006);
16384         MP_WritePhyUshort(sc, 0x15, 0x030e);
16385         MP_WritePhyUshort(sc, 0x19, 0x0000);
16386         MP_WritePhyUshort(sc, 0x15, 0x030f);
16387         MP_WritePhyUshort(sc, 0x19, 0x0000);
16388         MP_WritePhyUshort(sc, 0x15, 0x0310);
16389         MP_WritePhyUshort(sc, 0x19, 0x0000);
16390         MP_WritePhyUshort(sc, 0x15, 0x0311);
16391         MP_WritePhyUshort(sc, 0x19, 0x7c08);
16392         MP_WritePhyUshort(sc, 0x15, 0x0312);
16393         MP_WritePhyUshort(sc, 0x19, 0xa207);
16394         MP_WritePhyUshort(sc, 0x15, 0x0313);
16395         MP_WritePhyUshort(sc, 0x19, 0x4c00);
16396         MP_WritePhyUshort(sc, 0x15, 0x0314);
16397         MP_WritePhyUshort(sc, 0x19, 0x3322);
16398         MP_WritePhyUshort(sc, 0x15, 0x0315);
16399         MP_WritePhyUshort(sc, 0x19, 0x4041);
16400         MP_WritePhyUshort(sc, 0x15, 0x0316);
16401         MP_WritePhyUshort(sc, 0x19, 0x7d07);
16402         MP_WritePhyUshort(sc, 0x15, 0x0317);
16403         MP_WritePhyUshort(sc, 0x19, 0x4502);
16404         MP_WritePhyUshort(sc, 0x15, 0x0318);
16405         MP_WritePhyUshort(sc, 0x19, 0x3322);
16406         MP_WritePhyUshort(sc, 0x15, 0x0319);
16407         MP_WritePhyUshort(sc, 0x19, 0x4c08);
16408         MP_WritePhyUshort(sc, 0x15, 0x031a);
16409         MP_WritePhyUshort(sc, 0x19, 0x3322);
16410         MP_WritePhyUshort(sc, 0x15, 0x031b);
16411         MP_WritePhyUshort(sc, 0x19, 0x7d80);
16412         MP_WritePhyUshort(sc, 0x15, 0x031c);
16413         MP_WritePhyUshort(sc, 0x19, 0x5180);
16414         MP_WritePhyUshort(sc, 0x15, 0x031d);
16415         MP_WritePhyUshort(sc, 0x19, 0x3320);
16416         MP_WritePhyUshort(sc, 0x15, 0x031e);
16417         MP_WritePhyUshort(sc, 0x19, 0x7d80);
16418         MP_WritePhyUshort(sc, 0x15, 0x031f);
16419         MP_WritePhyUshort(sc, 0x19, 0x5000);
16420         MP_WritePhyUshort(sc, 0x15, 0x0320);
16421         MP_WritePhyUshort(sc, 0x19, 0x7d07);
16422         MP_WritePhyUshort(sc, 0x15, 0x0321);
16423         MP_WritePhyUshort(sc, 0x19, 0x4402);
16424         MP_WritePhyUshort(sc, 0x15, 0x0322);
16425         MP_WritePhyUshort(sc, 0x19, 0x7c03);
16426         MP_WritePhyUshort(sc, 0x15, 0x0323);
16427         MP_WritePhyUshort(sc, 0x19, 0x6c02);
16428         MP_WritePhyUshort(sc, 0x15, 0x0324);
16429         MP_WritePhyUshort(sc, 0x19, 0x7c03);
16430         MP_WritePhyUshort(sc, 0x15, 0x0325);
16431         MP_WritePhyUshort(sc, 0x19, 0xb30c);
16432         MP_WritePhyUshort(sc, 0x15, 0x0326);
16433         MP_WritePhyUshort(sc, 0x19, 0xb206);
16434         MP_WritePhyUshort(sc, 0x15, 0x0327);
16435         MP_WritePhyUshort(sc, 0x19, 0xb103);
16436         MP_WritePhyUshort(sc, 0x15, 0x0328);
16437         MP_WritePhyUshort(sc, 0x19, 0x6c00);
16438         MP_WritePhyUshort(sc, 0x15, 0x0329);
16439         MP_WritePhyUshort(sc, 0x19, 0x32f6);
16440         MP_WritePhyUshort(sc, 0x15, 0x032a);
16441         MP_WritePhyUshort(sc, 0x19, 0x6c00);
16442         MP_WritePhyUshort(sc, 0x15, 0x032b);
16443         MP_WritePhyUshort(sc, 0x19, 0x3352);
16444         MP_WritePhyUshort(sc, 0x15, 0x032c);
16445         MP_WritePhyUshort(sc, 0x19, 0xb103);
16446         MP_WritePhyUshort(sc, 0x15, 0x032d);
16447         MP_WritePhyUshort(sc, 0x19, 0x6c00);
16448         MP_WritePhyUshort(sc, 0x15, 0x032e);
16449         MP_WritePhyUshort(sc, 0x19, 0x336a);
16450         MP_WritePhyUshort(sc, 0x15, 0x032f);
16451         MP_WritePhyUshort(sc, 0x19, 0x6c00);
16452         MP_WritePhyUshort(sc, 0x15, 0x0330);
16453         MP_WritePhyUshort(sc, 0x19, 0x3382);
16454         MP_WritePhyUshort(sc, 0x15, 0x0331);
16455         MP_WritePhyUshort(sc, 0x19, 0xb206);
16456         MP_WritePhyUshort(sc, 0x15, 0x0332);
16457         MP_WritePhyUshort(sc, 0x19, 0xb103);
16458         MP_WritePhyUshort(sc, 0x15, 0x0333);
16459         MP_WritePhyUshort(sc, 0x19, 0x6c00);
16460         MP_WritePhyUshort(sc, 0x15, 0x0334);
16461         MP_WritePhyUshort(sc, 0x19, 0x3395);
16462         MP_WritePhyUshort(sc, 0x15, 0x0335);
16463         MP_WritePhyUshort(sc, 0x19, 0x6c00);
16464         MP_WritePhyUshort(sc, 0x15, 0x0336);
16465         MP_WritePhyUshort(sc, 0x19, 0x33c6);
16466         MP_WritePhyUshort(sc, 0x15, 0x0337);
16467         MP_WritePhyUshort(sc, 0x19, 0xb103);
16468         MP_WritePhyUshort(sc, 0x15, 0x0338);
16469         MP_WritePhyUshort(sc, 0x19, 0x6c00);
16470         MP_WritePhyUshort(sc, 0x15, 0x0339);
16471         MP_WritePhyUshort(sc, 0x19, 0x33d7);
16472         MP_WritePhyUshort(sc, 0x15, 0x033a);
16473         MP_WritePhyUshort(sc, 0x19, 0x6c00);
16474         MP_WritePhyUshort(sc, 0x15, 0x033b);
16475         MP_WritePhyUshort(sc, 0x19, 0x33f2);
16476         MP_WritePhyUshort(sc, 0x15, 0x033c);
16477         MP_WritePhyUshort(sc, 0x19, 0x0000);
16478         MP_WritePhyUshort(sc, 0x15, 0x033d);
16479         MP_WritePhyUshort(sc, 0x19, 0x0000);
16480         MP_WritePhyUshort(sc, 0x15, 0x033e);
16481         MP_WritePhyUshort(sc, 0x19, 0x0000);
16482         MP_WritePhyUshort(sc, 0x15, 0x033f);
16483         MP_WritePhyUshort(sc, 0x19, 0x0000);
16484         MP_WritePhyUshort(sc, 0x15, 0x0340);
16485         MP_WritePhyUshort(sc, 0x19, 0x0000);
16486         MP_WritePhyUshort(sc, 0x15, 0x0341);
16487         MP_WritePhyUshort(sc, 0x19, 0x0000);
16488         MP_WritePhyUshort(sc, 0x15, 0x0342);
16489         MP_WritePhyUshort(sc, 0x19, 0x49b5);
16490         MP_WritePhyUshort(sc, 0x15, 0x0343);
16491         MP_WritePhyUshort(sc, 0x19, 0x7d00);
16492         MP_WritePhyUshort(sc, 0x15, 0x0344);
16493         MP_WritePhyUshort(sc, 0x19, 0x4d00);
16494         MP_WritePhyUshort(sc, 0x15, 0x0345);
16495         MP_WritePhyUshort(sc, 0x19, 0x6880);
16496         MP_WritePhyUshort(sc, 0x15, 0x0346);
16497         MP_WritePhyUshort(sc, 0x19, 0x7c08);
16498         MP_WritePhyUshort(sc, 0x15, 0x0347);
16499         MP_WritePhyUshort(sc, 0x19, 0x6c08);
16500         MP_WritePhyUshort(sc, 0x15, 0x0348);
16501         MP_WritePhyUshort(sc, 0x19, 0x4925);
16502         MP_WritePhyUshort(sc, 0x15, 0x0349);
16503         MP_WritePhyUshort(sc, 0x19, 0x403b);
16504         MP_WritePhyUshort(sc, 0x15, 0x034a);
16505         MP_WritePhyUshort(sc, 0x19, 0xa602);
16506         MP_WritePhyUshort(sc, 0x15, 0x034b);
16507         MP_WritePhyUshort(sc, 0x19, 0x402f);
16508         MP_WritePhyUshort(sc, 0x15, 0x034c);
16509         MP_WritePhyUshort(sc, 0x19, 0x4484);
16510         MP_WritePhyUshort(sc, 0x15, 0x034d);
16511         MP_WritePhyUshort(sc, 0x19, 0x40c8);
16512         MP_WritePhyUshort(sc, 0x15, 0x034e);
16513         MP_WritePhyUshort(sc, 0x19, 0x44c4);
16514         MP_WritePhyUshort(sc, 0x15, 0x034f);
16515         MP_WritePhyUshort(sc, 0x19, 0xd64f);
16516         MP_WritePhyUshort(sc, 0x15, 0x0350);
16517         MP_WritePhyUshort(sc, 0x19, 0x00bd);
16518         MP_WritePhyUshort(sc, 0x15, 0x0351);
16519         MP_WritePhyUshort(sc, 0x19, 0x3311);
16520         MP_WritePhyUshort(sc, 0x15, 0x0352);
16521         MP_WritePhyUshort(sc, 0x19, 0xc8ed);
16522         MP_WritePhyUshort(sc, 0x15, 0x0353);
16523         MP_WritePhyUshort(sc, 0x19, 0x00fc);
16524         MP_WritePhyUshort(sc, 0x15, 0x0354);
16525         MP_WritePhyUshort(sc, 0x19, 0x8221);
16526         MP_WritePhyUshort(sc, 0x15, 0x0355);
16527         MP_WritePhyUshort(sc, 0x19, 0xd11d);
16528         MP_WritePhyUshort(sc, 0x15, 0x0356);
16529         MP_WritePhyUshort(sc, 0x19, 0x001f);
16530         MP_WritePhyUshort(sc, 0x15, 0x0357);
16531         MP_WritePhyUshort(sc, 0x19, 0xde18);
16532         MP_WritePhyUshort(sc, 0x15, 0x0358);
16533         MP_WritePhyUshort(sc, 0x19, 0x0008);
16534         MP_WritePhyUshort(sc, 0x15, 0x0359);
16535         MP_WritePhyUshort(sc, 0x19, 0x91f6);
16536         MP_WritePhyUshort(sc, 0x15, 0x035a);
16537         MP_WritePhyUshort(sc, 0x19, 0x3360);
16538         MP_WritePhyUshort(sc, 0x15, 0x035b);
16539         MP_WritePhyUshort(sc, 0x19, 0x0000);
16540         MP_WritePhyUshort(sc, 0x15, 0x035c);
16541         MP_WritePhyUshort(sc, 0x19, 0x0000);
16542         MP_WritePhyUshort(sc, 0x15, 0x035d);
16543         MP_WritePhyUshort(sc, 0x19, 0x0000);
16544         MP_WritePhyUshort(sc, 0x15, 0x035e);
16545         MP_WritePhyUshort(sc, 0x19, 0x0000);
16546         MP_WritePhyUshort(sc, 0x15, 0x035f);
16547         MP_WritePhyUshort(sc, 0x19, 0x0000);
16548         MP_WritePhyUshort(sc, 0x15, 0x0360);
16549         MP_WritePhyUshort(sc, 0x19, 0x4bb6);
16550         MP_WritePhyUshort(sc, 0x15, 0x0361);
16551         MP_WritePhyUshort(sc, 0x19, 0x4064);
16552         MP_WritePhyUshort(sc, 0x15, 0x0362);
16553         MP_WritePhyUshort(sc, 0x19, 0x4b26);
16554         MP_WritePhyUshort(sc, 0x15, 0x0363);
16555         MP_WritePhyUshort(sc, 0x19, 0x4410);
16556         MP_WritePhyUshort(sc, 0x15, 0x0364);
16557         MP_WritePhyUshort(sc, 0x19, 0x4006);
16558         MP_WritePhyUshort(sc, 0x15, 0x0365);
16559         MP_WritePhyUshort(sc, 0x19, 0x4490);
16560         MP_WritePhyUshort(sc, 0x15, 0x0366);
16561         MP_WritePhyUshort(sc, 0x19, 0x6900);
16562         MP_WritePhyUshort(sc, 0x15, 0x0367);
16563         MP_WritePhyUshort(sc, 0x19, 0xb6a6);
16564         MP_WritePhyUshort(sc, 0x15, 0x0368);
16565         MP_WritePhyUshort(sc, 0x19, 0x9e02);
16566         MP_WritePhyUshort(sc, 0x15, 0x0369);
16567         MP_WritePhyUshort(sc, 0x19, 0x3311);
16568         MP_WritePhyUshort(sc, 0x15, 0x036a);
16569         MP_WritePhyUshort(sc, 0x19, 0xd11d);
16570         MP_WritePhyUshort(sc, 0x15, 0x036b);
16571         MP_WritePhyUshort(sc, 0x19, 0x000a);
16572         MP_WritePhyUshort(sc, 0x15, 0x036c);
16573         MP_WritePhyUshort(sc, 0x19, 0xbb0f);
16574         MP_WritePhyUshort(sc, 0x15, 0x036d);
16575         MP_WritePhyUshort(sc, 0x19, 0x8102);
16576         MP_WritePhyUshort(sc, 0x15, 0x036e);
16577         MP_WritePhyUshort(sc, 0x19, 0x3371);
16578         MP_WritePhyUshort(sc, 0x15, 0x036f);
16579         MP_WritePhyUshort(sc, 0x19, 0xa21e);
16580         MP_WritePhyUshort(sc, 0x15, 0x0370);
16581         MP_WritePhyUshort(sc, 0x19, 0x33b6);
16582         MP_WritePhyUshort(sc, 0x15, 0x0371);
16583         MP_WritePhyUshort(sc, 0x19, 0x91f6);
16584         MP_WritePhyUshort(sc, 0x15, 0x0372);
16585         MP_WritePhyUshort(sc, 0x19, 0xc218);
16586         MP_WritePhyUshort(sc, 0x15, 0x0373);
16587         MP_WritePhyUshort(sc, 0x19, 0x00f4);
16588         MP_WritePhyUshort(sc, 0x15, 0x0374);
16589         MP_WritePhyUshort(sc, 0x19, 0x33b6);
16590         MP_WritePhyUshort(sc, 0x15, 0x0375);
16591         MP_WritePhyUshort(sc, 0x19, 0x32ec);
16592         MP_WritePhyUshort(sc, 0x15, 0x0376);
16593         MP_WritePhyUshort(sc, 0x19, 0x0000);
16594         MP_WritePhyUshort(sc, 0x15, 0x0377);
16595         MP_WritePhyUshort(sc, 0x19, 0x0000);
16596         MP_WritePhyUshort(sc, 0x15, 0x0378);
16597         MP_WritePhyUshort(sc, 0x19, 0x0000);
16598         MP_WritePhyUshort(sc, 0x15, 0x0379);
16599         MP_WritePhyUshort(sc, 0x19, 0x0000);
16600         MP_WritePhyUshort(sc, 0x15, 0x037a);
16601         MP_WritePhyUshort(sc, 0x19, 0x0000);
16602         MP_WritePhyUshort(sc, 0x15, 0x037b);
16603         MP_WritePhyUshort(sc, 0x19, 0x4b97);
16604         MP_WritePhyUshort(sc, 0x15, 0x037c);
16605         MP_WritePhyUshort(sc, 0x19, 0x402b);
16606         MP_WritePhyUshort(sc, 0x15, 0x037d);
16607         MP_WritePhyUshort(sc, 0x19, 0x4b07);
16608         MP_WritePhyUshort(sc, 0x15, 0x037e);
16609         MP_WritePhyUshort(sc, 0x19, 0x4422);
16610         MP_WritePhyUshort(sc, 0x15, 0x037f);
16611         MP_WritePhyUshort(sc, 0x19, 0x6980);
16612         MP_WritePhyUshort(sc, 0x15, 0x0380);
16613         MP_WritePhyUshort(sc, 0x19, 0xb608);
16614         MP_WritePhyUshort(sc, 0x15, 0x0381);
16615         MP_WritePhyUshort(sc, 0x19, 0x3311);
16616         MP_WritePhyUshort(sc, 0x15, 0x0382);
16617         MP_WritePhyUshort(sc, 0x19, 0xbc05);
16618         MP_WritePhyUshort(sc, 0x15, 0x0383);
16619         MP_WritePhyUshort(sc, 0x19, 0xc21c);
16620         MP_WritePhyUshort(sc, 0x15, 0x0384);
16621         MP_WritePhyUshort(sc, 0x19, 0x0032);
16622         MP_WritePhyUshort(sc, 0x15, 0x0385);
16623         MP_WritePhyUshort(sc, 0x19, 0xa1fb);
16624         MP_WritePhyUshort(sc, 0x15, 0x0386);
16625         MP_WritePhyUshort(sc, 0x19, 0x338d);
16626         MP_WritePhyUshort(sc, 0x15, 0x0387);
16627         MP_WritePhyUshort(sc, 0x19, 0x32ae);
16628         MP_WritePhyUshort(sc, 0x15, 0x0388);
16629         MP_WritePhyUshort(sc, 0x19, 0x330d);
16630         MP_WritePhyUshort(sc, 0x15, 0x0389);
16631         MP_WritePhyUshort(sc, 0x19, 0x0000);
16632         MP_WritePhyUshort(sc, 0x15, 0x038a);
16633         MP_WritePhyUshort(sc, 0x19, 0x0000);
16634         MP_WritePhyUshort(sc, 0x15, 0x038b);
16635         MP_WritePhyUshort(sc, 0x19, 0x0000);
16636         MP_WritePhyUshort(sc, 0x15, 0x038c);
16637         MP_WritePhyUshort(sc, 0x19, 0x0000);
16638         MP_WritePhyUshort(sc, 0x15, 0x038d);
16639         MP_WritePhyUshort(sc, 0x19, 0x4b97);
16640         MP_WritePhyUshort(sc, 0x15, 0x038e);
16641         MP_WritePhyUshort(sc, 0x19, 0x6a08);
16642         MP_WritePhyUshort(sc, 0x15, 0x038f);
16643         MP_WritePhyUshort(sc, 0x19, 0x4b07);
16644         MP_WritePhyUshort(sc, 0x15, 0x0390);
16645         MP_WritePhyUshort(sc, 0x19, 0x40ac);
16646         MP_WritePhyUshort(sc, 0x15, 0x0391);
16647         MP_WritePhyUshort(sc, 0x19, 0x4445);
16648         MP_WritePhyUshort(sc, 0x15, 0x0392);
16649         MP_WritePhyUshort(sc, 0x19, 0x404e);
16650         MP_WritePhyUshort(sc, 0x15, 0x0393);
16651         MP_WritePhyUshort(sc, 0x19, 0x4461);
16652         MP_WritePhyUshort(sc, 0x15, 0x0394);
16653         MP_WritePhyUshort(sc, 0x19, 0x3311);
16654         MP_WritePhyUshort(sc, 0x15, 0x0395);
16655         MP_WritePhyUshort(sc, 0x19, 0x9c0a);
16656         MP_WritePhyUshort(sc, 0x15, 0x0396);
16657         MP_WritePhyUshort(sc, 0x19, 0x63da);
16658         MP_WritePhyUshort(sc, 0x15, 0x0397);
16659         MP_WritePhyUshort(sc, 0x19, 0x6f0c);
16660         MP_WritePhyUshort(sc, 0x15, 0x0398);
16661         MP_WritePhyUshort(sc, 0x19, 0x5440);
16662         MP_WritePhyUshort(sc, 0x15, 0x0399);
16663         MP_WritePhyUshort(sc, 0x19, 0x4b98);
16664         MP_WritePhyUshort(sc, 0x15, 0x039a);
16665         MP_WritePhyUshort(sc, 0x19, 0x7c40);
16666         MP_WritePhyUshort(sc, 0x15, 0x039b);
16667         MP_WritePhyUshort(sc, 0x19, 0x4c00);
16668         MP_WritePhyUshort(sc, 0x15, 0x039c);
16669         MP_WritePhyUshort(sc, 0x19, 0x4b08);
16670         MP_WritePhyUshort(sc, 0x15, 0x039d);
16671         MP_WritePhyUshort(sc, 0x19, 0x63d8);
16672         MP_WritePhyUshort(sc, 0x15, 0x039e);
16673         MP_WritePhyUshort(sc, 0x19, 0x33a5);
16674         MP_WritePhyUshort(sc, 0x15, 0x039f);
16675         MP_WritePhyUshort(sc, 0x19, 0xd64f);
16676         MP_WritePhyUshort(sc, 0x15, 0x03a0);
16677         MP_WritePhyUshort(sc, 0x19, 0x00e8);
16678         MP_WritePhyUshort(sc, 0x15, 0x03a1);
16679         MP_WritePhyUshort(sc, 0x19, 0x820e);
16680         MP_WritePhyUshort(sc, 0x15, 0x03a2);
16681         MP_WritePhyUshort(sc, 0x19, 0xa10d);
16682         MP_WritePhyUshort(sc, 0x15, 0x03a3);
16683         MP_WritePhyUshort(sc, 0x19, 0x9df1);
16684         MP_WritePhyUshort(sc, 0x15, 0x03a4);
16685         MP_WritePhyUshort(sc, 0x19, 0x33af);
16686         MP_WritePhyUshort(sc, 0x15, 0x03a5);
16687         MP_WritePhyUshort(sc, 0x19, 0xd64f);
16688         MP_WritePhyUshort(sc, 0x15, 0x03a6);
16689         MP_WritePhyUshort(sc, 0x19, 0x00f9);
16690         MP_WritePhyUshort(sc, 0x15, 0x03a7);
16691         MP_WritePhyUshort(sc, 0x19, 0xc017);
16692         MP_WritePhyUshort(sc, 0x15, 0x03a8);
16693         MP_WritePhyUshort(sc, 0x19, 0x0007);
16694         MP_WritePhyUshort(sc, 0x15, 0x03a9);
16695         MP_WritePhyUshort(sc, 0x19, 0x7c03);
16696         MP_WritePhyUshort(sc, 0x15, 0x03aa);
16697         MP_WritePhyUshort(sc, 0x19, 0x6c03);
16698         MP_WritePhyUshort(sc, 0x15, 0x03ab);
16699         MP_WritePhyUshort(sc, 0x19, 0xa104);
16700         MP_WritePhyUshort(sc, 0x15, 0x03ac);
16701         MP_WritePhyUshort(sc, 0x19, 0x7c03);
16702         MP_WritePhyUshort(sc, 0x15, 0x03ad);
16703         MP_WritePhyUshort(sc, 0x19, 0x6c00);
16704         MP_WritePhyUshort(sc, 0x15, 0x03ae);
16705         MP_WritePhyUshort(sc, 0x19, 0x9df7);
16706         MP_WritePhyUshort(sc, 0x15, 0x03af);
16707         MP_WritePhyUshort(sc, 0x19, 0x7c03);
16708         MP_WritePhyUshort(sc, 0x15, 0x03b0);
16709         MP_WritePhyUshort(sc, 0x19, 0x6c08);
16710         MP_WritePhyUshort(sc, 0x15, 0x03b1);
16711         MP_WritePhyUshort(sc, 0x19, 0x33b6);
16712         MP_WritePhyUshort(sc, 0x15, 0x03b2);
16713         MP_WritePhyUshort(sc, 0x19, 0x0000);
16714         MP_WritePhyUshort(sc, 0x15, 0x03b3);
16715         MP_WritePhyUshort(sc, 0x19, 0x0000);
16716         MP_WritePhyUshort(sc, 0x15, 0x03b4);
16717         MP_WritePhyUshort(sc, 0x19, 0x0000);
16718         MP_WritePhyUshort(sc, 0x15, 0x03b5);
16719         MP_WritePhyUshort(sc, 0x19, 0x0000);
16720         MP_WritePhyUshort(sc, 0x15, 0x03b6);
16721         MP_WritePhyUshort(sc, 0x19, 0x55af);
16722         MP_WritePhyUshort(sc, 0x15, 0x03b7);
16723         MP_WritePhyUshort(sc, 0x19, 0x7ff0);
16724         MP_WritePhyUshort(sc, 0x15, 0x03b8);
16725         MP_WritePhyUshort(sc, 0x19, 0x6ff0);
16726         MP_WritePhyUshort(sc, 0x15, 0x03b9);
16727         MP_WritePhyUshort(sc, 0x19, 0x4bb9);
16728         MP_WritePhyUshort(sc, 0x15, 0x03ba);
16729         MP_WritePhyUshort(sc, 0x19, 0x6a80);
16730         MP_WritePhyUshort(sc, 0x15, 0x03bb);
16731         MP_WritePhyUshort(sc, 0x19, 0x4b29);
16732         MP_WritePhyUshort(sc, 0x15, 0x03bc);
16733         MP_WritePhyUshort(sc, 0x19, 0x4041);
16734         MP_WritePhyUshort(sc, 0x15, 0x03bd);
16735         MP_WritePhyUshort(sc, 0x19, 0x440a);
16736         MP_WritePhyUshort(sc, 0x15, 0x03be);
16737         MP_WritePhyUshort(sc, 0x19, 0x4029);
16738         MP_WritePhyUshort(sc, 0x15, 0x03bf);
16739         MP_WritePhyUshort(sc, 0x19, 0x4418);
16740         MP_WritePhyUshort(sc, 0x15, 0x03c0);
16741         MP_WritePhyUshort(sc, 0x19, 0x4090);
16742         MP_WritePhyUshort(sc, 0x15, 0x03c1);
16743         MP_WritePhyUshort(sc, 0x19, 0x4438);
16744         MP_WritePhyUshort(sc, 0x15, 0x03c2);
16745         MP_WritePhyUshort(sc, 0x19, 0x40c4);
16746         MP_WritePhyUshort(sc, 0x15, 0x03c3);
16747         MP_WritePhyUshort(sc, 0x19, 0x447b);
16748         MP_WritePhyUshort(sc, 0x15, 0x03c4);
16749         MP_WritePhyUshort(sc, 0x19, 0xb6c4);
16750         MP_WritePhyUshort(sc, 0x15, 0x03c5);
16751         MP_WritePhyUshort(sc, 0x19, 0x3311);
16752         MP_WritePhyUshort(sc, 0x15, 0x03c6);
16753         MP_WritePhyUshort(sc, 0x19, 0x9bfe);
16754         MP_WritePhyUshort(sc, 0x15, 0x03c7);
16755         MP_WritePhyUshort(sc, 0x19, 0x33cc);
16756         MP_WritePhyUshort(sc, 0x15, 0x03c8);
16757         MP_WritePhyUshort(sc, 0x19, 0x0000);
16758         MP_WritePhyUshort(sc, 0x15, 0x03c9);
16759         MP_WritePhyUshort(sc, 0x19, 0x0000);
16760         MP_WritePhyUshort(sc, 0x15, 0x03ca);
16761         MP_WritePhyUshort(sc, 0x19, 0x0000);
16762         MP_WritePhyUshort(sc, 0x15, 0x03cb);
16763         MP_WritePhyUshort(sc, 0x19, 0x0000);
16764         MP_WritePhyUshort(sc, 0x15, 0x03cc);
16765         MP_WritePhyUshort(sc, 0x19, 0x542f);
16766         MP_WritePhyUshort(sc, 0x15, 0x03cd);
16767         MP_WritePhyUshort(sc, 0x19, 0x499a);
16768         MP_WritePhyUshort(sc, 0x15, 0x03ce);
16769         MP_WritePhyUshort(sc, 0x19, 0x7c40);
16770         MP_WritePhyUshort(sc, 0x15, 0x03cf);
16771         MP_WritePhyUshort(sc, 0x19, 0x4c40);
16772         MP_WritePhyUshort(sc, 0x15, 0x03d0);
16773         MP_WritePhyUshort(sc, 0x19, 0x490a);
16774         MP_WritePhyUshort(sc, 0x15, 0x03d1);
16775         MP_WritePhyUshort(sc, 0x19, 0x405e);
16776         MP_WritePhyUshort(sc, 0x15, 0x03d2);
16777         MP_WritePhyUshort(sc, 0x19, 0x44f8);
16778         MP_WritePhyUshort(sc, 0x15, 0x03d3);
16779         MP_WritePhyUshort(sc, 0x19, 0x6b00);
16780         MP_WritePhyUshort(sc, 0x15, 0x03d4);
16781         MP_WritePhyUshort(sc, 0x19, 0xd64f);
16782         MP_WritePhyUshort(sc, 0x15, 0x03d5);
16783         MP_WritePhyUshort(sc, 0x19, 0x0028);
16784         MP_WritePhyUshort(sc, 0x15, 0x03d6);
16785         MP_WritePhyUshort(sc, 0x19, 0x3311);
16786         MP_WritePhyUshort(sc, 0x15, 0x03d7);
16787         MP_WritePhyUshort(sc, 0x19, 0xbd27);
16788         MP_WritePhyUshort(sc, 0x15, 0x03d8);
16789         MP_WritePhyUshort(sc, 0x19, 0x9cfc);
16790         MP_WritePhyUshort(sc, 0x15, 0x03d9);
16791         MP_WritePhyUshort(sc, 0x19, 0xc639);
16792         MP_WritePhyUshort(sc, 0x15, 0x03da);
16793         MP_WritePhyUshort(sc, 0x19, 0x000f);
16794         MP_WritePhyUshort(sc, 0x15, 0x03db);
16795         MP_WritePhyUshort(sc, 0x19, 0x9e03);
16796         MP_WritePhyUshort(sc, 0x15, 0x03dc);
16797         MP_WritePhyUshort(sc, 0x19, 0x7c01);
16798         MP_WritePhyUshort(sc, 0x15, 0x03dd);
16799         MP_WritePhyUshort(sc, 0x19, 0x4c01);
16800         MP_WritePhyUshort(sc, 0x15, 0x03de);
16801         MP_WritePhyUshort(sc, 0x19, 0x9af6);
16802         MP_WritePhyUshort(sc, 0x15, 0x03df);
16803         MP_WritePhyUshort(sc, 0x19, 0x7c12);
16804         MP_WritePhyUshort(sc, 0x15, 0x03e0);
16805         MP_WritePhyUshort(sc, 0x19, 0x4c52);
16806         MP_WritePhyUshort(sc, 0x15, 0x03e1);
16807         MP_WritePhyUshort(sc, 0x19, 0x4470);
16808         MP_WritePhyUshort(sc, 0x15, 0x03e2);
16809         MP_WritePhyUshort(sc, 0x19, 0x7c12);
16810         MP_WritePhyUshort(sc, 0x15, 0x03e3);
16811         MP_WritePhyUshort(sc, 0x19, 0x4c40);
16812         MP_WritePhyUshort(sc, 0x15, 0x03e4);
16813         MP_WritePhyUshort(sc, 0x19, 0x33d4);
16814         MP_WritePhyUshort(sc, 0x15, 0x03e5);
16815         MP_WritePhyUshort(sc, 0x19, 0x0000);
16816         MP_WritePhyUshort(sc, 0x15, 0x03e6);
16817         MP_WritePhyUshort(sc, 0x19, 0x0000);
16818         MP_WritePhyUshort(sc, 0x15, 0x03e7);
16819         MP_WritePhyUshort(sc, 0x19, 0x0000);
16820         MP_WritePhyUshort(sc, 0x15, 0x03e8);
16821         MP_WritePhyUshort(sc, 0x19, 0x0000);
16822         MP_WritePhyUshort(sc, 0x15, 0x03e9);
16823         MP_WritePhyUshort(sc, 0x19, 0x49bb);
16824         MP_WritePhyUshort(sc, 0x15, 0x03ea);
16825         MP_WritePhyUshort(sc, 0x19, 0x4478);
16826         MP_WritePhyUshort(sc, 0x15, 0x03eb);
16827         MP_WritePhyUshort(sc, 0x19, 0x492b);
16828         MP_WritePhyUshort(sc, 0x15, 0x03ec);
16829         MP_WritePhyUshort(sc, 0x19, 0x6b80);
16830         MP_WritePhyUshort(sc, 0x15, 0x03ed);
16831         MP_WritePhyUshort(sc, 0x19, 0x7c01);
16832         MP_WritePhyUshort(sc, 0x15, 0x03ee);
16833         MP_WritePhyUshort(sc, 0x19, 0x4c00);
16834         MP_WritePhyUshort(sc, 0x15, 0x03ef);
16835         MP_WritePhyUshort(sc, 0x19, 0xd64f);
16836         MP_WritePhyUshort(sc, 0x15, 0x03f0);
16837         MP_WritePhyUshort(sc, 0x19, 0x000d);
16838         MP_WritePhyUshort(sc, 0x15, 0x03f1);
16839         MP_WritePhyUshort(sc, 0x19, 0x3311);
16840         MP_WritePhyUshort(sc, 0x15, 0x03f2);
16841         MP_WritePhyUshort(sc, 0x19, 0xbd0c);
16842         MP_WritePhyUshort(sc, 0x15, 0x03f3);
16843         MP_WritePhyUshort(sc, 0x19, 0xc428);
16844         MP_WritePhyUshort(sc, 0x15, 0x03f4);
16845         MP_WritePhyUshort(sc, 0x19, 0x0008);
16846         MP_WritePhyUshort(sc, 0x15, 0x03f5);
16847         MP_WritePhyUshort(sc, 0x19, 0x9afa);
16848         MP_WritePhyUshort(sc, 0x15, 0x03f6);
16849         MP_WritePhyUshort(sc, 0x19, 0x7c12);
16850         MP_WritePhyUshort(sc, 0x15, 0x03f7);
16851         MP_WritePhyUshort(sc, 0x19, 0x4c52);
16852         MP_WritePhyUshort(sc, 0x15, 0x03f8);
16853         MP_WritePhyUshort(sc, 0x19, 0x4470);
16854         MP_WritePhyUshort(sc, 0x15, 0x03f9);
16855         MP_WritePhyUshort(sc, 0x19, 0x7c12);
16856         MP_WritePhyUshort(sc, 0x15, 0x03fa);
16857         MP_WritePhyUshort(sc, 0x19, 0x4c40);
16858         MP_WritePhyUshort(sc, 0x15, 0x03fb);
16859         MP_WritePhyUshort(sc, 0x19, 0x33ef);
16860         MP_WritePhyUshort(sc, 0x15, 0x03fc);
16861         MP_WritePhyUshort(sc, 0x19, 0x3342);
16862         MP_WritePhyUshort(sc, 0x15, 0x03fd);
16863         MP_WritePhyUshort(sc, 0x19, 0x330d);
16864         MP_WritePhyUshort(sc, 0x15, 0x03fe);
16865         MP_WritePhyUshort(sc, 0x19, 0x32ae);
16866         MP_WritePhyUshort(sc, 0x15, 0x0000);
16867         MP_WritePhyUshort(sc, 0x16, 0x0306);
16868         MP_WritePhyUshort(sc, 0x16, 0x0300);
16869         MP_WritePhyUshort(sc, 0x1f, 0x0002);
16870         MP_WritePhyUshort(sc, 0x1f, 0x0000);
16871         MP_WritePhyUshort(sc, 0x1f, 0x0005);
16872         MP_WritePhyUshort(sc, 0x05, 0xfff6);
16873         MP_WritePhyUshort(sc, 0x06, 0x0080);
16874         MP_WritePhyUshort(sc, 0x05, 0x8000);
16875         MP_WritePhyUshort(sc, 0x06, 0x0280);
16876         MP_WritePhyUshort(sc, 0x06, 0x48f7);
16877         MP_WritePhyUshort(sc, 0x06, 0x00e0);
16878         MP_WritePhyUshort(sc, 0x06, 0xfff7);
16879         MP_WritePhyUshort(sc, 0x06, 0xa080);
16880         MP_WritePhyUshort(sc, 0x06, 0x02ae);
16881         MP_WritePhyUshort(sc, 0x06, 0xf602);
16882         MP_WritePhyUshort(sc, 0x06, 0x0112);
16883         MP_WritePhyUshort(sc, 0x06, 0x0201);
16884         MP_WritePhyUshort(sc, 0x06, 0x1f02);
16885         MP_WritePhyUshort(sc, 0x06, 0x012c);
16886         MP_WritePhyUshort(sc, 0x06, 0x0201);
16887         MP_WritePhyUshort(sc, 0x06, 0x3c02);
16888         MP_WritePhyUshort(sc, 0x06, 0x0156);
16889         MP_WritePhyUshort(sc, 0x06, 0x0201);
16890         MP_WritePhyUshort(sc, 0x06, 0x6d02);
16891         MP_WritePhyUshort(sc, 0x06, 0x809d);
16892         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16893         MP_WritePhyUshort(sc, 0x06, 0x88e1);
16894         MP_WritePhyUshort(sc, 0x06, 0x8b89);
16895         MP_WritePhyUshort(sc, 0x06, 0x1e01);
16896         MP_WritePhyUshort(sc, 0x06, 0xe18b);
16897         MP_WritePhyUshort(sc, 0x06, 0x8a1e);
16898         MP_WritePhyUshort(sc, 0x06, 0x01e1);
16899         MP_WritePhyUshort(sc, 0x06, 0x8b8b);
16900         MP_WritePhyUshort(sc, 0x06, 0x1e01);
16901         MP_WritePhyUshort(sc, 0x06, 0xe18b);
16902         MP_WritePhyUshort(sc, 0x06, 0x8c1e);
16903         MP_WritePhyUshort(sc, 0x06, 0x01e1);
16904         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
16905         MP_WritePhyUshort(sc, 0x06, 0x1e01);
16906         MP_WritePhyUshort(sc, 0x06, 0xe18b);
16907         MP_WritePhyUshort(sc, 0x06, 0x8e1e);
16908         MP_WritePhyUshort(sc, 0x06, 0x01a0);
16909         MP_WritePhyUshort(sc, 0x06, 0x00c7);
16910         MP_WritePhyUshort(sc, 0x06, 0xaebb);
16911         MP_WritePhyUshort(sc, 0x06, 0xd100);
16912         MP_WritePhyUshort(sc, 0x06, 0xbf82);
16913         MP_WritePhyUshort(sc, 0x06, 0xc702);
16914         MP_WritePhyUshort(sc, 0x06, 0x320a);
16915         MP_WritePhyUshort(sc, 0x06, 0xd105);
16916         MP_WritePhyUshort(sc, 0x06, 0xbf82);
16917         MP_WritePhyUshort(sc, 0x06, 0xcd02);
16918         MP_WritePhyUshort(sc, 0x06, 0x320a);
16919         MP_WritePhyUshort(sc, 0x06, 0xd100);
16920         MP_WritePhyUshort(sc, 0x06, 0xbf82);
16921         MP_WritePhyUshort(sc, 0x06, 0xca02);
16922         MP_WritePhyUshort(sc, 0x06, 0x320a);
16923         MP_WritePhyUshort(sc, 0x06, 0xd105);
16924         MP_WritePhyUshort(sc, 0x06, 0xbf82);
16925         MP_WritePhyUshort(sc, 0x06, 0xd002);
16926         MP_WritePhyUshort(sc, 0x06, 0x320a);
16927         MP_WritePhyUshort(sc, 0x06, 0xd481);
16928         MP_WritePhyUshort(sc, 0x06, 0xc9e4);
16929         MP_WritePhyUshort(sc, 0x06, 0x8b90);
16930         MP_WritePhyUshort(sc, 0x06, 0xe58b);
16931         MP_WritePhyUshort(sc, 0x06, 0x91d4);
16932         MP_WritePhyUshort(sc, 0x06, 0x81b8);
16933         MP_WritePhyUshort(sc, 0x06, 0xe48b);
16934         MP_WritePhyUshort(sc, 0x06, 0x92e5);
16935         MP_WritePhyUshort(sc, 0x06, 0x8b93);
16936         MP_WritePhyUshort(sc, 0x06, 0xbf8b);
16937         MP_WritePhyUshort(sc, 0x06, 0x88ec);
16938         MP_WritePhyUshort(sc, 0x06, 0x0019);
16939         MP_WritePhyUshort(sc, 0x06, 0xa98b);
16940         MP_WritePhyUshort(sc, 0x06, 0x90f9);
16941         MP_WritePhyUshort(sc, 0x06, 0xeeff);
16942         MP_WritePhyUshort(sc, 0x06, 0xf600);
16943         MP_WritePhyUshort(sc, 0x06, 0xeeff);
16944         MP_WritePhyUshort(sc, 0x06, 0xf7fc);
16945         MP_WritePhyUshort(sc, 0x06, 0xd100);
16946         MP_WritePhyUshort(sc, 0x06, 0xbf82);
16947         MP_WritePhyUshort(sc, 0x06, 0xc102);
16948         MP_WritePhyUshort(sc, 0x06, 0x320a);
16949         MP_WritePhyUshort(sc, 0x06, 0xd101);
16950         MP_WritePhyUshort(sc, 0x06, 0xbf82);
16951         MP_WritePhyUshort(sc, 0x06, 0xc402);
16952         MP_WritePhyUshort(sc, 0x06, 0x320a);
16953         MP_WritePhyUshort(sc, 0x06, 0x04f8);
16954         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16955         MP_WritePhyUshort(sc, 0x06, 0x8ead);
16956         MP_WritePhyUshort(sc, 0x06, 0x201a);
16957         MP_WritePhyUshort(sc, 0x06, 0xf620);
16958         MP_WritePhyUshort(sc, 0x06, 0xe48b);
16959         MP_WritePhyUshort(sc, 0x06, 0x8e02);
16960         MP_WritePhyUshort(sc, 0x06, 0x824b);
16961         MP_WritePhyUshort(sc, 0x06, 0x0281);
16962         MP_WritePhyUshort(sc, 0x06, 0x1902);
16963         MP_WritePhyUshort(sc, 0x06, 0x2c9d);
16964         MP_WritePhyUshort(sc, 0x06, 0x0203);
16965         MP_WritePhyUshort(sc, 0x06, 0x9602);
16966         MP_WritePhyUshort(sc, 0x06, 0x0473);
16967         MP_WritePhyUshort(sc, 0x06, 0x022e);
16968         MP_WritePhyUshort(sc, 0x06, 0x3902);
16969         MP_WritePhyUshort(sc, 0x06, 0x044d);
16970         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16971         MP_WritePhyUshort(sc, 0x06, 0x8ead);
16972         MP_WritePhyUshort(sc, 0x06, 0x210b);
16973         MP_WritePhyUshort(sc, 0x06, 0xf621);
16974         MP_WritePhyUshort(sc, 0x06, 0xe48b);
16975         MP_WritePhyUshort(sc, 0x06, 0x8e02);
16976         MP_WritePhyUshort(sc, 0x06, 0x0416);
16977         MP_WritePhyUshort(sc, 0x06, 0x021b);
16978         MP_WritePhyUshort(sc, 0x06, 0xa4e0);
16979         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16980         MP_WritePhyUshort(sc, 0x06, 0xad22);
16981         MP_WritePhyUshort(sc, 0x06, 0x05f6);
16982         MP_WritePhyUshort(sc, 0x06, 0x22e4);
16983         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16984         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16985         MP_WritePhyUshort(sc, 0x06, 0x8ead);
16986         MP_WritePhyUshort(sc, 0x06, 0x2305);
16987         MP_WritePhyUshort(sc, 0x06, 0xf623);
16988         MP_WritePhyUshort(sc, 0x06, 0xe48b);
16989         MP_WritePhyUshort(sc, 0x06, 0x8ee0);
16990         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16991         MP_WritePhyUshort(sc, 0x06, 0xad24);
16992         MP_WritePhyUshort(sc, 0x06, 0x05f6);
16993         MP_WritePhyUshort(sc, 0x06, 0x24e4);
16994         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16995         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16996         MP_WritePhyUshort(sc, 0x06, 0x8ead);
16997         MP_WritePhyUshort(sc, 0x06, 0x2505);
16998         MP_WritePhyUshort(sc, 0x06, 0xf625);
16999         MP_WritePhyUshort(sc, 0x06, 0xe48b);
17000         MP_WritePhyUshort(sc, 0x06, 0x8ee0);
17001         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
17002         MP_WritePhyUshort(sc, 0x06, 0xad26);
17003         MP_WritePhyUshort(sc, 0x06, 0x08f6);
17004         MP_WritePhyUshort(sc, 0x06, 0x26e4);
17005         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
17006         MP_WritePhyUshort(sc, 0x06, 0x0281);
17007         MP_WritePhyUshort(sc, 0x06, 0xdae0);
17008         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
17009         MP_WritePhyUshort(sc, 0x06, 0xad27);
17010         MP_WritePhyUshort(sc, 0x06, 0x05f6);
17011         MP_WritePhyUshort(sc, 0x06, 0x27e4);
17012         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
17013         MP_WritePhyUshort(sc, 0x06, 0x0203);
17014         MP_WritePhyUshort(sc, 0x06, 0x5cfc);
17015         MP_WritePhyUshort(sc, 0x06, 0x04f8);
17016         MP_WritePhyUshort(sc, 0x06, 0xfaef);
17017         MP_WritePhyUshort(sc, 0x06, 0x69e0);
17018         MP_WritePhyUshort(sc, 0x06, 0x8b85);
17019         MP_WritePhyUshort(sc, 0x06, 0xad21);
17020         MP_WritePhyUshort(sc, 0x06, 0x57e0);
17021         MP_WritePhyUshort(sc, 0x06, 0xe022);
17022         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
17023         MP_WritePhyUshort(sc, 0x06, 0x2358);
17024         MP_WritePhyUshort(sc, 0x06, 0xc059);
17025         MP_WritePhyUshort(sc, 0x06, 0x021e);
17026         MP_WritePhyUshort(sc, 0x06, 0x01e1);
17027         MP_WritePhyUshort(sc, 0x06, 0x8b3c);
17028         MP_WritePhyUshort(sc, 0x06, 0x1f10);
17029         MP_WritePhyUshort(sc, 0x06, 0x9e44);
17030         MP_WritePhyUshort(sc, 0x06, 0xe48b);
17031         MP_WritePhyUshort(sc, 0x06, 0x3cad);
17032         MP_WritePhyUshort(sc, 0x06, 0x211d);
17033         MP_WritePhyUshort(sc, 0x06, 0xe18b);
17034         MP_WritePhyUshort(sc, 0x06, 0x84f7);
17035         MP_WritePhyUshort(sc, 0x06, 0x29e5);
17036         MP_WritePhyUshort(sc, 0x06, 0x8b84);
17037         MP_WritePhyUshort(sc, 0x06, 0xac27);
17038         MP_WritePhyUshort(sc, 0x06, 0x0dac);
17039         MP_WritePhyUshort(sc, 0x06, 0x2605);
17040         MP_WritePhyUshort(sc, 0x06, 0x0281);
17041         MP_WritePhyUshort(sc, 0x06, 0x7fae);
17042         MP_WritePhyUshort(sc, 0x06, 0x2b02);
17043         MP_WritePhyUshort(sc, 0x06, 0x2c23);
17044         MP_WritePhyUshort(sc, 0x06, 0xae26);
17045         MP_WritePhyUshort(sc, 0x06, 0x022c);
17046         MP_WritePhyUshort(sc, 0x06, 0x41ae);
17047         MP_WritePhyUshort(sc, 0x06, 0x21e0);
17048         MP_WritePhyUshort(sc, 0x06, 0x8b87);
17049         MP_WritePhyUshort(sc, 0x06, 0xad22);
17050         MP_WritePhyUshort(sc, 0x06, 0x18e0);
17051         MP_WritePhyUshort(sc, 0x06, 0xfff7);
17052         MP_WritePhyUshort(sc, 0x06, 0x58fc);
17053         MP_WritePhyUshort(sc, 0x06, 0xe4ff);
17054         MP_WritePhyUshort(sc, 0x06, 0xf7d1);
17055         MP_WritePhyUshort(sc, 0x06, 0x00bf);
17056         MP_WritePhyUshort(sc, 0x06, 0x2eee);
17057         MP_WritePhyUshort(sc, 0x06, 0x0232);
17058         MP_WritePhyUshort(sc, 0x06, 0x0ad1);
17059         MP_WritePhyUshort(sc, 0x06, 0x00bf);
17060         MP_WritePhyUshort(sc, 0x06, 0x82e8);
17061         MP_WritePhyUshort(sc, 0x06, 0x0232);
17062         MP_WritePhyUshort(sc, 0x06, 0x0a02);
17063         MP_WritePhyUshort(sc, 0x06, 0x2bdf);
17064         MP_WritePhyUshort(sc, 0x06, 0xef96);
17065         MP_WritePhyUshort(sc, 0x06, 0xfefc);
17066         MP_WritePhyUshort(sc, 0x06, 0x04d0);
17067         MP_WritePhyUshort(sc, 0x06, 0x0202);
17068         MP_WritePhyUshort(sc, 0x06, 0x1e97);
17069         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17070         MP_WritePhyUshort(sc, 0x06, 0x87ad);
17071         MP_WritePhyUshort(sc, 0x06, 0x2228);
17072         MP_WritePhyUshort(sc, 0x06, 0xd100);
17073         MP_WritePhyUshort(sc, 0x06, 0xbf82);
17074         MP_WritePhyUshort(sc, 0x06, 0xd302);
17075         MP_WritePhyUshort(sc, 0x06, 0x320a);
17076         MP_WritePhyUshort(sc, 0x06, 0xd10c);
17077         MP_WritePhyUshort(sc, 0x06, 0xbf82);
17078         MP_WritePhyUshort(sc, 0x06, 0xd602);
17079         MP_WritePhyUshort(sc, 0x06, 0x320a);
17080         MP_WritePhyUshort(sc, 0x06, 0xd104);
17081         MP_WritePhyUshort(sc, 0x06, 0xbf82);
17082         MP_WritePhyUshort(sc, 0x06, 0xd902);
17083         MP_WritePhyUshort(sc, 0x06, 0x320a);
17084         MP_WritePhyUshort(sc, 0x06, 0xd101);
17085         MP_WritePhyUshort(sc, 0x06, 0xbf82);
17086         MP_WritePhyUshort(sc, 0x06, 0xe802);
17087         MP_WritePhyUshort(sc, 0x06, 0x320a);
17088         MP_WritePhyUshort(sc, 0x06, 0xe0ff);
17089         MP_WritePhyUshort(sc, 0x06, 0xf768);
17090         MP_WritePhyUshort(sc, 0x06, 0x03e4);
17091         MP_WritePhyUshort(sc, 0x06, 0xfff7);
17092         MP_WritePhyUshort(sc, 0x06, 0xd004);
17093         MP_WritePhyUshort(sc, 0x06, 0x0228);
17094         MP_WritePhyUshort(sc, 0x06, 0x7a04);
17095         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
17096         MP_WritePhyUshort(sc, 0x06, 0xe234);
17097         MP_WritePhyUshort(sc, 0x06, 0xe1e2);
17098         MP_WritePhyUshort(sc, 0x06, 0x35f6);
17099         MP_WritePhyUshort(sc, 0x06, 0x2be4);
17100         MP_WritePhyUshort(sc, 0x06, 0xe234);
17101         MP_WritePhyUshort(sc, 0x06, 0xe5e2);
17102         MP_WritePhyUshort(sc, 0x06, 0x35fc);
17103         MP_WritePhyUshort(sc, 0x06, 0x05f8);
17104         MP_WritePhyUshort(sc, 0x06, 0xe0e2);
17105         MP_WritePhyUshort(sc, 0x06, 0x34e1);
17106         MP_WritePhyUshort(sc, 0x06, 0xe235);
17107         MP_WritePhyUshort(sc, 0x06, 0xf72b);
17108         MP_WritePhyUshort(sc, 0x06, 0xe4e2);
17109         MP_WritePhyUshort(sc, 0x06, 0x34e5);
17110         MP_WritePhyUshort(sc, 0x06, 0xe235);
17111         MP_WritePhyUshort(sc, 0x06, 0xfc05);
17112         MP_WritePhyUshort(sc, 0x06, 0xf8f9);
17113         MP_WritePhyUshort(sc, 0x06, 0xfaef);
17114         MP_WritePhyUshort(sc, 0x06, 0x69ac);
17115         MP_WritePhyUshort(sc, 0x06, 0x1b4c);
17116         MP_WritePhyUshort(sc, 0x06, 0xbf2e);
17117         MP_WritePhyUshort(sc, 0x06, 0x3002);
17118         MP_WritePhyUshort(sc, 0x06, 0x31dd);
17119         MP_WritePhyUshort(sc, 0x06, 0xef01);
17120         MP_WritePhyUshort(sc, 0x06, 0xe28a);
17121         MP_WritePhyUshort(sc, 0x06, 0x76e4);
17122         MP_WritePhyUshort(sc, 0x06, 0x8a76);
17123         MP_WritePhyUshort(sc, 0x06, 0x1f12);
17124         MP_WritePhyUshort(sc, 0x06, 0x9e3a);
17125         MP_WritePhyUshort(sc, 0x06, 0xef12);
17126         MP_WritePhyUshort(sc, 0x06, 0x5907);
17127         MP_WritePhyUshort(sc, 0x06, 0x9f12);
17128         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
17129         MP_WritePhyUshort(sc, 0x06, 0x8b40);
17130         MP_WritePhyUshort(sc, 0x06, 0xf721);
17131         MP_WritePhyUshort(sc, 0x06, 0xe48b);
17132         MP_WritePhyUshort(sc, 0x06, 0x40d0);
17133         MP_WritePhyUshort(sc, 0x06, 0x0302);
17134         MP_WritePhyUshort(sc, 0x06, 0x287a);
17135         MP_WritePhyUshort(sc, 0x06, 0x0282);
17136         MP_WritePhyUshort(sc, 0x06, 0x34fc);
17137         MP_WritePhyUshort(sc, 0x06, 0xa000);
17138         MP_WritePhyUshort(sc, 0x06, 0x1002);
17139         MP_WritePhyUshort(sc, 0x06, 0x2dc3);
17140         MP_WritePhyUshort(sc, 0x06, 0x022e);
17141         MP_WritePhyUshort(sc, 0x06, 0x21e0);
17142         MP_WritePhyUshort(sc, 0x06, 0x8b40);
17143         MP_WritePhyUshort(sc, 0x06, 0xf621);
17144         MP_WritePhyUshort(sc, 0x06, 0xe48b);
17145         MP_WritePhyUshort(sc, 0x06, 0x40ae);
17146         MP_WritePhyUshort(sc, 0x06, 0x0fbf);
17147         MP_WritePhyUshort(sc, 0x06, 0x3fa5);
17148         MP_WritePhyUshort(sc, 0x06, 0x0231);
17149         MP_WritePhyUshort(sc, 0x06, 0x6cbf);
17150         MP_WritePhyUshort(sc, 0x06, 0x3fa2);
17151         MP_WritePhyUshort(sc, 0x06, 0x0231);
17152         MP_WritePhyUshort(sc, 0x06, 0x6c02);
17153         MP_WritePhyUshort(sc, 0x06, 0x2dc3);
17154         MP_WritePhyUshort(sc, 0x06, 0xef96);
17155         MP_WritePhyUshort(sc, 0x06, 0xfefd);
17156         MP_WritePhyUshort(sc, 0x06, 0xfc04);
17157         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
17158         MP_WritePhyUshort(sc, 0x06, 0xe2f4);
17159         MP_WritePhyUshort(sc, 0x06, 0xe1e2);
17160         MP_WritePhyUshort(sc, 0x06, 0xf5e4);
17161         MP_WritePhyUshort(sc, 0x06, 0x8a78);
17162         MP_WritePhyUshort(sc, 0x06, 0xe58a);
17163         MP_WritePhyUshort(sc, 0x06, 0x79ee);
17164         MP_WritePhyUshort(sc, 0x06, 0xe2f4);
17165         MP_WritePhyUshort(sc, 0x06, 0xd8ee);
17166         MP_WritePhyUshort(sc, 0x06, 0xe2f5);
17167         MP_WritePhyUshort(sc, 0x06, 0x20fc);
17168         MP_WritePhyUshort(sc, 0x06, 0x04f8);
17169         MP_WritePhyUshort(sc, 0x06, 0xf9fa);
17170         MP_WritePhyUshort(sc, 0x06, 0xef69);
17171         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17172         MP_WritePhyUshort(sc, 0x06, 0x87ad);
17173         MP_WritePhyUshort(sc, 0x06, 0x2065);
17174         MP_WritePhyUshort(sc, 0x06, 0xd200);
17175         MP_WritePhyUshort(sc, 0x06, 0xbf2e);
17176         MP_WritePhyUshort(sc, 0x06, 0xe802);
17177         MP_WritePhyUshort(sc, 0x06, 0x31dd);
17178         MP_WritePhyUshort(sc, 0x06, 0x1e21);
17179         MP_WritePhyUshort(sc, 0x06, 0xbf82);
17180         MP_WritePhyUshort(sc, 0x06, 0xdf02);
17181         MP_WritePhyUshort(sc, 0x06, 0x31dd);
17182         MP_WritePhyUshort(sc, 0x06, 0x0c11);
17183         MP_WritePhyUshort(sc, 0x06, 0x1e21);
17184         MP_WritePhyUshort(sc, 0x06, 0xbf82);
17185         MP_WritePhyUshort(sc, 0x06, 0xe202);
17186         MP_WritePhyUshort(sc, 0x06, 0x31dd);
17187         MP_WritePhyUshort(sc, 0x06, 0x0c12);
17188         MP_WritePhyUshort(sc, 0x06, 0x1e21);
17189         MP_WritePhyUshort(sc, 0x06, 0xbf82);
17190         MP_WritePhyUshort(sc, 0x06, 0xe502);
17191         MP_WritePhyUshort(sc, 0x06, 0x31dd);
17192         MP_WritePhyUshort(sc, 0x06, 0x0c13);
17193         MP_WritePhyUshort(sc, 0x06, 0x1e21);
17194         MP_WritePhyUshort(sc, 0x06, 0xbf1f);
17195         MP_WritePhyUshort(sc, 0x06, 0x5302);
17196         MP_WritePhyUshort(sc, 0x06, 0x31dd);
17197         MP_WritePhyUshort(sc, 0x06, 0x0c14);
17198         MP_WritePhyUshort(sc, 0x06, 0x1e21);
17199         MP_WritePhyUshort(sc, 0x06, 0xbf82);
17200         MP_WritePhyUshort(sc, 0x06, 0xeb02);
17201         MP_WritePhyUshort(sc, 0x06, 0x31dd);
17202         MP_WritePhyUshort(sc, 0x06, 0x0c16);
17203         MP_WritePhyUshort(sc, 0x06, 0x1e21);
17204         MP_WritePhyUshort(sc, 0x06, 0xe083);
17205         MP_WritePhyUshort(sc, 0x06, 0xe01f);
17206         MP_WritePhyUshort(sc, 0x06, 0x029e);
17207         MP_WritePhyUshort(sc, 0x06, 0x22e6);
17208         MP_WritePhyUshort(sc, 0x06, 0x83e0);
17209         MP_WritePhyUshort(sc, 0x06, 0xad31);
17210         MP_WritePhyUshort(sc, 0x06, 0x14ad);
17211         MP_WritePhyUshort(sc, 0x06, 0x3011);
17212         MP_WritePhyUshort(sc, 0x06, 0xef02);
17213         MP_WritePhyUshort(sc, 0x06, 0x580c);
17214         MP_WritePhyUshort(sc, 0x06, 0x9e07);
17215         MP_WritePhyUshort(sc, 0x06, 0xad36);
17216         MP_WritePhyUshort(sc, 0x06, 0x085a);
17217         MP_WritePhyUshort(sc, 0x06, 0x309f);
17218         MP_WritePhyUshort(sc, 0x06, 0x04d1);
17219         MP_WritePhyUshort(sc, 0x06, 0x01ae);
17220         MP_WritePhyUshort(sc, 0x06, 0x02d1);
17221         MP_WritePhyUshort(sc, 0x06, 0x00bf);
17222         MP_WritePhyUshort(sc, 0x06, 0x82dc);
17223         MP_WritePhyUshort(sc, 0x06, 0x0232);
17224         MP_WritePhyUshort(sc, 0x06, 0x0aef);
17225         MP_WritePhyUshort(sc, 0x06, 0x96fe);
17226         MP_WritePhyUshort(sc, 0x06, 0xfdfc);
17227         MP_WritePhyUshort(sc, 0x06, 0x0400);
17228         MP_WritePhyUshort(sc, 0x06, 0xe140);
17229         MP_WritePhyUshort(sc, 0x06, 0x77e1);
17230         MP_WritePhyUshort(sc, 0x06, 0x4010);
17231         MP_WritePhyUshort(sc, 0x06, 0xe150);
17232         MP_WritePhyUshort(sc, 0x06, 0x32e1);
17233         MP_WritePhyUshort(sc, 0x06, 0x5030);
17234         MP_WritePhyUshort(sc, 0x06, 0xe144);
17235         MP_WritePhyUshort(sc, 0x06, 0x74e1);
17236         MP_WritePhyUshort(sc, 0x06, 0x44bb);
17237         MP_WritePhyUshort(sc, 0x06, 0xe2d2);
17238         MP_WritePhyUshort(sc, 0x06, 0x40e0);
17239         MP_WritePhyUshort(sc, 0x06, 0x2cfc);
17240         MP_WritePhyUshort(sc, 0x06, 0xe2cc);
17241         MP_WritePhyUshort(sc, 0x06, 0xcce2);
17242         MP_WritePhyUshort(sc, 0x06, 0x00cc);
17243         MP_WritePhyUshort(sc, 0x06, 0xe000);
17244         MP_WritePhyUshort(sc, 0x06, 0x99e0);
17245         MP_WritePhyUshort(sc, 0x06, 0x3688);
17246         MP_WritePhyUshort(sc, 0x06, 0xe036);
17247         MP_WritePhyUshort(sc, 0x06, 0x99e1);
17248         MP_WritePhyUshort(sc, 0x06, 0x40dd);
17249         MP_WritePhyUshort(sc, 0x06, 0xe022);
17250         MP_WritePhyUshort(sc, 0x05, 0xe142);
17251         PhyRegValue = MP_ReadPhyUshort(sc, 0x06);
17252         PhyRegValue |= BIT_0;
17253         MP_WritePhyUshort(sc, 0x06, PhyRegValue);
17254         MP_WritePhyUshort(sc, 0x05, 0xe140);
17255         PhyRegValue = MP_ReadPhyUshort(sc, 0x06);
17256         PhyRegValue |= BIT_0;
17257         MP_WritePhyUshort(sc, 0x06, PhyRegValue);
17258         MP_WritePhyUshort(sc, 0x1f, 0x0000);
17259         MP_WritePhyUshort(sc, 0x1f, 0x0005);
17260         for (i = 0; i < 200; i++) {
17261                 DELAY(100);
17262                 PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
17263                 if (PhyRegValue & BIT_7)
17264                         break;
17265         }
17266 
17267         MP_WritePhyUshort(sc, 0x1F, 0x0001);
17268         MP_WritePhyUshort(sc, 0x0B, 0x6C14);
17269         MP_WritePhyUshort(sc, 0x14, 0x7F3D);
17270         MP_WritePhyUshort(sc, 0x1C, 0xFAFE);
17271         MP_WritePhyUshort(sc, 0x08, 0x07C5);
17272         MP_WritePhyUshort(sc, 0x10, 0xF090);
17273         MP_WritePhyUshort(sc, 0x1F, 0x0003);
17274         MP_WritePhyUshort(sc, 0x14, 0x641A);
17275         MP_WritePhyUshort(sc, 0x1A, 0x0606);
17276         MP_WritePhyUshort(sc, 0x12, 0xF480);
17277         MP_WritePhyUshort(sc, 0x13, 0x0747);
17278         MP_WritePhyUshort(sc, 0x1F, 0x0000);
17279 
17280         MP_WritePhyUshort(sc, 0x1F, 0x0003);
17281         MP_WritePhyUshort(sc, 0x0D, 0x0207);
17282         MP_WritePhyUshort(sc, 0x02, 0x5FD0);
17283         MP_WritePhyUshort(sc, 0x1F, 0x0000);
17284 
17285         MP_WritePhyUshort(sc, 0x1F, 0x0003);
17286         MP_WritePhyUshort(sc, 0x09, 0xA20F);
17287         MP_WritePhyUshort(sc, 0x1F, 0x0000);
17288 
17289         MP_WritePhyUshort(sc, 0x1f, 0x0003);
17290         PhyRegValue = MP_ReadPhyUshort(sc, 0x19);
17291         PhyRegValue &= ~BIT_0;
17292         MP_WritePhyUshort(sc, 0x19, PhyRegValue);
17293         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
17294         PhyRegValue &= ~BIT_10;
17295         MP_WritePhyUshort(sc, 0x10, PhyRegValue);
17296         MP_WritePhyUshort(sc, 0x1f, 0x0000);
17297 
17298         MP_WritePhyUshort(sc, 0x1f, 0x0004);
17299         MP_WritePhyUshort(sc, 0x1f, 0x0007);
17300         MP_WritePhyUshort(sc, 0x1e, 0x0023);
17301         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
17302         PhyRegValue &= ~BIT_0;
17303         PhyRegValue |= BIT_2;
17304         MP_WritePhyUshort(sc, 0x17, PhyRegValue);
17305         MP_WritePhyUshort(sc, 0x1f, 0x0002);
17306         MP_WritePhyUshort(sc, 0x1f, 0x0000);
17307 }
17308 
17309 static void re_set_phy_mcu_8168evl_2(struct re_softc *sc)
17310 {
17311         u_int16_t PhyRegValue;
17312         int i;
17313 
17314         MP_WritePhyUshort(sc, 0x1f, 0x0000);
17315         MP_WritePhyUshort(sc, 0x00, 0x1800);
17316         PhyRegValue = MP_ReadPhyUshort(sc, 0x15);
17317         PhyRegValue &= ~(BIT_12);
17318         MP_WritePhyUshort(sc, 0x15, PhyRegValue);
17319         MP_WritePhyUshort(sc, 0x00, 0x4800);
17320         MP_WritePhyUshort(sc, 0x1f, 0x0007);
17321         MP_WritePhyUshort(sc, 0x1e, 0x002f);
17322         for (i = 0; i < 1000; i++) {
17323                 if (MP_ReadPhyUshort(sc, 0x1c) & BIT_7)
17324                         break;
17325                 DELAY(100);
17326         }
17327         MP_WritePhyUshort(sc, 0x1f, 0x0000);
17328         MP_WritePhyUshort(sc, 0x00, 0x1800);
17329         MP_WritePhyUshort(sc, 0x1f, 0x0007);
17330         MP_WritePhyUshort(sc, 0x1e, 0x0023);
17331         for (i = 0; i < 200; i++) {
17332                 if ((MP_ReadPhyUshort(sc, 0x17) & BIT_0) == 0)
17333                         break;
17334                 DELAY(100);
17335         }
17336         MP_WritePhyUshort(sc, 0x1f, 0x0005);
17337         MP_WritePhyUshort(sc, 0x05, 0xfff6);
17338         MP_WritePhyUshort(sc, 0x06, 0x0080);
17339         MP_WritePhyUshort(sc, 0x1f, 0x0007);
17340         MP_WritePhyUshort(sc, 0x1e, 0x0023);
17341         MP_WritePhyUshort(sc, 0x16, 0x0306);
17342         MP_WritePhyUshort(sc, 0x16, 0x0307);
17343         MP_WritePhyUshort(sc, 0x15, 0x00AF);
17344         MP_WritePhyUshort(sc, 0x19, 0x4060);
17345         MP_WritePhyUshort(sc, 0x15, 0x00B0);
17346         MP_WritePhyUshort(sc, 0x19, 0x7800);
17347         MP_WritePhyUshort(sc, 0x15, 0x00B1);
17348         MP_WritePhyUshort(sc, 0x19, 0x7e00);
17349         MP_WritePhyUshort(sc, 0x15, 0x00B2);
17350         MP_WritePhyUshort(sc, 0x19, 0x72B0);
17351         MP_WritePhyUshort(sc, 0x15, 0x00B3);
17352         MP_WritePhyUshort(sc, 0x19, 0x7F00);
17353         MP_WritePhyUshort(sc, 0x15, 0x00B4);
17354         MP_WritePhyUshort(sc, 0x19, 0x73B0);
17355         MP_WritePhyUshort(sc, 0x15, 0x0101);
17356         MP_WritePhyUshort(sc, 0x19, 0x0005);
17357         MP_WritePhyUshort(sc, 0x15, 0x0103);
17358         MP_WritePhyUshort(sc, 0x19, 0x0003);
17359         MP_WritePhyUshort(sc, 0x15, 0x0105);
17360         MP_WritePhyUshort(sc, 0x19, 0x30FD);
17361         MP_WritePhyUshort(sc, 0x15, 0x0106);
17362         MP_WritePhyUshort(sc, 0x19, 0x9DF7);
17363         MP_WritePhyUshort(sc, 0x15, 0x0107);
17364         MP_WritePhyUshort(sc, 0x19, 0x30C6);
17365         MP_WritePhyUshort(sc, 0x15, 0x0098);
17366         MP_WritePhyUshort(sc, 0x19, 0x7c0b);
17367         MP_WritePhyUshort(sc, 0x15, 0x0099);
17368         MP_WritePhyUshort(sc, 0x19, 0x6c0b);
17369         MP_WritePhyUshort(sc, 0x15, 0x00eb);
17370         MP_WritePhyUshort(sc, 0x19, 0x6c0b);
17371         MP_WritePhyUshort(sc, 0x15, 0x00f8);
17372         MP_WritePhyUshort(sc, 0x19, 0x6f0b);
17373         MP_WritePhyUshort(sc, 0x15, 0x00fe);
17374         MP_WritePhyUshort(sc, 0x19, 0x6f0f);
17375         MP_WritePhyUshort(sc, 0x15, 0x00db);
17376         MP_WritePhyUshort(sc, 0x19, 0x6f09);
17377         MP_WritePhyUshort(sc, 0x15, 0x00dc);
17378         MP_WritePhyUshort(sc, 0x19, 0xaefd);
17379         MP_WritePhyUshort(sc, 0x15, 0x00dd);
17380         MP_WritePhyUshort(sc, 0x19, 0x6f0b);
17381         MP_WritePhyUshort(sc, 0x15, 0x00de);
17382         MP_WritePhyUshort(sc, 0x19, 0xc60b);
17383         MP_WritePhyUshort(sc, 0x15, 0x00df);
17384         MP_WritePhyUshort(sc, 0x19, 0x00fa);
17385         MP_WritePhyUshort(sc, 0x15, 0x00e0);
17386         MP_WritePhyUshort(sc, 0x19, 0x30e1);
17387         MP_WritePhyUshort(sc, 0x15, 0x020c);
17388         MP_WritePhyUshort(sc, 0x19, 0x3224);
17389         MP_WritePhyUshort(sc, 0x15, 0x020e);
17390         MP_WritePhyUshort(sc, 0x19, 0x9813);
17391         MP_WritePhyUshort(sc, 0x15, 0x020f);
17392         MP_WritePhyUshort(sc, 0x19, 0x7801);
17393         MP_WritePhyUshort(sc, 0x15, 0x0210);
17394         MP_WritePhyUshort(sc, 0x19, 0x930f);
17395         MP_WritePhyUshort(sc, 0x15, 0x0211);
17396         MP_WritePhyUshort(sc, 0x19, 0x9206);
17397         MP_WritePhyUshort(sc, 0x15, 0x0212);
17398         MP_WritePhyUshort(sc, 0x19, 0x4002);
17399         MP_WritePhyUshort(sc, 0x15, 0x0213);
17400         MP_WritePhyUshort(sc, 0x19, 0x7800);
17401         MP_WritePhyUshort(sc, 0x15, 0x0214);
17402         MP_WritePhyUshort(sc, 0x19, 0x588f);
17403         MP_WritePhyUshort(sc, 0x15, 0x0215);
17404         MP_WritePhyUshort(sc, 0x19, 0x5520);
17405         MP_WritePhyUshort(sc, 0x15, 0x0216);
17406         MP_WritePhyUshort(sc, 0x19, 0x3224);
17407         MP_WritePhyUshort(sc, 0x15, 0x0217);
17408         MP_WritePhyUshort(sc, 0x19, 0x4002);
17409         MP_WritePhyUshort(sc, 0x15, 0x0218);
17410         MP_WritePhyUshort(sc, 0x19, 0x7800);
17411         MP_WritePhyUshort(sc, 0x15, 0x0219);
17412         MP_WritePhyUshort(sc, 0x19, 0x588d);
17413         MP_WritePhyUshort(sc, 0x15, 0x021a);
17414         MP_WritePhyUshort(sc, 0x19, 0x5540);
17415         MP_WritePhyUshort(sc, 0x15, 0x021b);
17416         MP_WritePhyUshort(sc, 0x19, 0x9e03);
17417         MP_WritePhyUshort(sc, 0x15, 0x021c);
17418         MP_WritePhyUshort(sc, 0x19, 0x7c40);
17419         MP_WritePhyUshort(sc, 0x15, 0x021d);
17420         MP_WritePhyUshort(sc, 0x19, 0x6840);
17421         MP_WritePhyUshort(sc, 0x15, 0x021e);
17422         MP_WritePhyUshort(sc, 0x19, 0x3224);
17423         MP_WritePhyUshort(sc, 0x15, 0x021f);
17424         MP_WritePhyUshort(sc, 0x19, 0x4002);
17425         MP_WritePhyUshort(sc, 0x15, 0x0220);
17426         MP_WritePhyUshort(sc, 0x19, 0x3224);
17427         MP_WritePhyUshort(sc, 0x15, 0x0221);
17428         MP_WritePhyUshort(sc, 0x19, 0x9e03);
17429         MP_WritePhyUshort(sc, 0x15, 0x0222);
17430         MP_WritePhyUshort(sc, 0x19, 0x7c40);
17431         MP_WritePhyUshort(sc, 0x15, 0x0223);
17432         MP_WritePhyUshort(sc, 0x19, 0x6840);
17433         MP_WritePhyUshort(sc, 0x15, 0x0224);
17434         MP_WritePhyUshort(sc, 0x19, 0x7800);
17435         MP_WritePhyUshort(sc, 0x15, 0x0225);
17436         MP_WritePhyUshort(sc, 0x19, 0x3231);
17437         MP_WritePhyUshort(sc, 0x15, 0x0000);
17438         MP_WritePhyUshort(sc, 0x16, 0x0306);
17439         MP_WritePhyUshort(sc, 0x16, 0x0300);
17440         MP_WritePhyUshort(sc, 0x1f, 0x0002);
17441         MP_WritePhyUshort(sc, 0x1f, 0x0000);
17442         MP_WritePhyUshort(sc, 0x1f, 0x0000);
17443         MP_WritePhyUshort(sc, 0x17, 0x2160);
17444         MP_WritePhyUshort(sc, 0x1f, 0x0007);
17445         MP_WritePhyUshort(sc, 0x1e, 0x0040);
17446         MP_WritePhyUshort(sc, 0x18, 0x0004);
17447         MP_WritePhyUshort(sc, 0x18, 0x09d4);
17448         MP_WritePhyUshort(sc, 0x19, 0x4000);
17449         MP_WritePhyUshort(sc, 0x18, 0x09e4);
17450         MP_WritePhyUshort(sc, 0x19, 0x0800);
17451         MP_WritePhyUshort(sc, 0x18, 0x09f4);
17452         MP_WritePhyUshort(sc, 0x19, 0xff00);
17453         MP_WritePhyUshort(sc, 0x18, 0x0a04);
17454         MP_WritePhyUshort(sc, 0x19, 0x4000);
17455         MP_WritePhyUshort(sc, 0x18, 0x0a14);
17456         MP_WritePhyUshort(sc, 0x19, 0x0c00);
17457         MP_WritePhyUshort(sc, 0x18, 0x0a24);
17458         MP_WritePhyUshort(sc, 0x19, 0xff00);
17459         MP_WritePhyUshort(sc, 0x18, 0x0a74);
17460         MP_WritePhyUshort(sc, 0x19, 0xf600);
17461         MP_WritePhyUshort(sc, 0x18, 0x1a24);
17462         MP_WritePhyUshort(sc, 0x19, 0x7d00);
17463         MP_WritePhyUshort(sc, 0x18, 0x1a64);
17464         MP_WritePhyUshort(sc, 0x19, 0x0500);
17465         MP_WritePhyUshort(sc, 0x18, 0x1a74);
17466         MP_WritePhyUshort(sc, 0x19, 0x9500);
17467         MP_WritePhyUshort(sc, 0x18, 0x1a84);
17468         MP_WritePhyUshort(sc, 0x19, 0x8000);
17469         MP_WritePhyUshort(sc, 0x18, 0x1a94);
17470         MP_WritePhyUshort(sc, 0x19, 0x7d00);
17471         MP_WritePhyUshort(sc, 0x18, 0x1aa4);
17472         MP_WritePhyUshort(sc, 0x19, 0x9600);
17473         MP_WritePhyUshort(sc, 0x18, 0x1ac4);
17474         MP_WritePhyUshort(sc, 0x19, 0x4000);
17475         MP_WritePhyUshort(sc, 0x18, 0x1ad4);
17476         MP_WritePhyUshort(sc, 0x19, 0x0800);
17477         MP_WritePhyUshort(sc, 0x18, 0x1af4);
17478         MP_WritePhyUshort(sc, 0x19, 0xc400);
17479         MP_WritePhyUshort(sc, 0x18, 0x1b04);
17480         MP_WritePhyUshort(sc, 0x19, 0x4000);
17481         MP_WritePhyUshort(sc, 0x18, 0x1b14);
17482         MP_WritePhyUshort(sc, 0x19, 0x0800);
17483         MP_WritePhyUshort(sc, 0x18, 0x1b24);
17484         MP_WritePhyUshort(sc, 0x19, 0xfd00);
17485         MP_WritePhyUshort(sc, 0x18, 0x1b34);
17486         MP_WritePhyUshort(sc, 0x19, 0x4000);
17487         MP_WritePhyUshort(sc, 0x18, 0x1b44);
17488         MP_WritePhyUshort(sc, 0x19, 0x0400);
17489         MP_WritePhyUshort(sc, 0x18, 0x1b94);
17490         MP_WritePhyUshort(sc, 0x19, 0xf100);
17491         MP_WritePhyUshort(sc, 0x1f, 0x0000);
17492         MP_WritePhyUshort(sc, 0x17, 0x2100);
17493         MP_WritePhyUshort(sc, 0x1f, 0x0007);
17494         MP_WritePhyUshort(sc, 0x1e, 0x0040);
17495         MP_WritePhyUshort(sc, 0x18, 0x0000);
17496         MP_WritePhyUshort(sc, 0x1f, 0x0000);
17497         MP_WritePhyUshort(sc, 0x1f, 0x0005);
17498         MP_WritePhyUshort(sc, 0x05, 0xfff6);
17499         MP_WritePhyUshort(sc, 0x06, 0x0080);
17500         MP_WritePhyUshort(sc, 0x05, 0x8000);
17501         MP_WritePhyUshort(sc, 0x06, 0x0280);
17502         MP_WritePhyUshort(sc, 0x06, 0x48f7);
17503         MP_WritePhyUshort(sc, 0x06, 0x00e0);
17504         MP_WritePhyUshort(sc, 0x06, 0xfff7);
17505         MP_WritePhyUshort(sc, 0x06, 0xa080);
17506         MP_WritePhyUshort(sc, 0x06, 0x02ae);
17507         MP_WritePhyUshort(sc, 0x06, 0xf602);
17508         MP_WritePhyUshort(sc, 0x06, 0x0115);
17509         MP_WritePhyUshort(sc, 0x06, 0x0201);
17510         MP_WritePhyUshort(sc, 0x06, 0x2202);
17511         MP_WritePhyUshort(sc, 0x06, 0x80a0);
17512         MP_WritePhyUshort(sc, 0x06, 0x0201);
17513         MP_WritePhyUshort(sc, 0x06, 0x3f02);
17514         MP_WritePhyUshort(sc, 0x06, 0x0159);
17515         MP_WritePhyUshort(sc, 0x06, 0x0280);
17516         MP_WritePhyUshort(sc, 0x06, 0xbd02);
17517         MP_WritePhyUshort(sc, 0x06, 0x80da);
17518         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17519         MP_WritePhyUshort(sc, 0x06, 0x88e1);
17520         MP_WritePhyUshort(sc, 0x06, 0x8b89);
17521         MP_WritePhyUshort(sc, 0x06, 0x1e01);
17522         MP_WritePhyUshort(sc, 0x06, 0xe18b);
17523         MP_WritePhyUshort(sc, 0x06, 0x8a1e);
17524         MP_WritePhyUshort(sc, 0x06, 0x01e1);
17525         MP_WritePhyUshort(sc, 0x06, 0x8b8b);
17526         MP_WritePhyUshort(sc, 0x06, 0x1e01);
17527         MP_WritePhyUshort(sc, 0x06, 0xe18b);
17528         MP_WritePhyUshort(sc, 0x06, 0x8c1e);
17529         MP_WritePhyUshort(sc, 0x06, 0x01e1);
17530         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
17531         MP_WritePhyUshort(sc, 0x06, 0x1e01);
17532         MP_WritePhyUshort(sc, 0x06, 0xe18b);
17533         MP_WritePhyUshort(sc, 0x06, 0x8e1e);
17534         MP_WritePhyUshort(sc, 0x06, 0x01a0);
17535         MP_WritePhyUshort(sc, 0x06, 0x00c7);
17536         MP_WritePhyUshort(sc, 0x06, 0xaebb);
17537         MP_WritePhyUshort(sc, 0x06, 0xd481);
17538         MP_WritePhyUshort(sc, 0x06, 0xd2e4);
17539         MP_WritePhyUshort(sc, 0x06, 0x8b92);
17540         MP_WritePhyUshort(sc, 0x06, 0xe58b);
17541         MP_WritePhyUshort(sc, 0x06, 0x93d1);
17542         MP_WritePhyUshort(sc, 0x06, 0x03bf);
17543         MP_WritePhyUshort(sc, 0x06, 0x859e);
17544         MP_WritePhyUshort(sc, 0x06, 0x0237);
17545         MP_WritePhyUshort(sc, 0x06, 0x23d1);
17546         MP_WritePhyUshort(sc, 0x06, 0x02bf);
17547         MP_WritePhyUshort(sc, 0x06, 0x85a1);
17548         MP_WritePhyUshort(sc, 0x06, 0x0237);
17549         MP_WritePhyUshort(sc, 0x06, 0x23ee);
17550         MP_WritePhyUshort(sc, 0x06, 0x8608);
17551         MP_WritePhyUshort(sc, 0x06, 0x03ee);
17552         MP_WritePhyUshort(sc, 0x06, 0x860a);
17553         MP_WritePhyUshort(sc, 0x06, 0x60ee);
17554         MP_WritePhyUshort(sc, 0x06, 0x8610);
17555         MP_WritePhyUshort(sc, 0x06, 0x00ee);
17556         MP_WritePhyUshort(sc, 0x06, 0x8611);
17557         MP_WritePhyUshort(sc, 0x06, 0x00ee);
17558         MP_WritePhyUshort(sc, 0x06, 0x8abe);
17559         MP_WritePhyUshort(sc, 0x06, 0x07ee);
17560         MP_WritePhyUshort(sc, 0x06, 0x8abf);
17561         MP_WritePhyUshort(sc, 0x06, 0x73ee);
17562         MP_WritePhyUshort(sc, 0x06, 0x8a95);
17563         MP_WritePhyUshort(sc, 0x06, 0x02bf);
17564         MP_WritePhyUshort(sc, 0x06, 0x8b88);
17565         MP_WritePhyUshort(sc, 0x06, 0xec00);
17566         MP_WritePhyUshort(sc, 0x06, 0x19a9);
17567         MP_WritePhyUshort(sc, 0x06, 0x8b90);
17568         MP_WritePhyUshort(sc, 0x06, 0xf9ee);
17569         MP_WritePhyUshort(sc, 0x06, 0xfff6);
17570         MP_WritePhyUshort(sc, 0x06, 0x00ee);
17571         MP_WritePhyUshort(sc, 0x06, 0xfff7);
17572         MP_WritePhyUshort(sc, 0x06, 0xfed1);
17573         MP_WritePhyUshort(sc, 0x06, 0x00bf);
17574         MP_WritePhyUshort(sc, 0x06, 0x8595);
17575         MP_WritePhyUshort(sc, 0x06, 0x0237);
17576         MP_WritePhyUshort(sc, 0x06, 0x23d1);
17577         MP_WritePhyUshort(sc, 0x06, 0x01bf);
17578         MP_WritePhyUshort(sc, 0x06, 0x8598);
17579         MP_WritePhyUshort(sc, 0x06, 0x0237);
17580         MP_WritePhyUshort(sc, 0x06, 0x2304);
17581         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
17582         MP_WritePhyUshort(sc, 0x06, 0x8b8a);
17583         MP_WritePhyUshort(sc, 0x06, 0xad20);
17584         MP_WritePhyUshort(sc, 0x06, 0x14ee);
17585         MP_WritePhyUshort(sc, 0x06, 0x8b8a);
17586         MP_WritePhyUshort(sc, 0x06, 0x0002);
17587         MP_WritePhyUshort(sc, 0x06, 0x1f9a);
17588         MP_WritePhyUshort(sc, 0x06, 0xe0e4);
17589         MP_WritePhyUshort(sc, 0x06, 0x26e1);
17590         MP_WritePhyUshort(sc, 0x06, 0xe427);
17591         MP_WritePhyUshort(sc, 0x06, 0xeee4);
17592         MP_WritePhyUshort(sc, 0x06, 0x2623);
17593         MP_WritePhyUshort(sc, 0x06, 0xe5e4);
17594         MP_WritePhyUshort(sc, 0x06, 0x27fc);
17595         MP_WritePhyUshort(sc, 0x06, 0x04f8);
17596         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17597         MP_WritePhyUshort(sc, 0x06, 0x8dad);
17598         MP_WritePhyUshort(sc, 0x06, 0x2014);
17599         MP_WritePhyUshort(sc, 0x06, 0xee8b);
17600         MP_WritePhyUshort(sc, 0x06, 0x8d00);
17601         MP_WritePhyUshort(sc, 0x06, 0xe08a);
17602         MP_WritePhyUshort(sc, 0x06, 0x5a78);
17603         MP_WritePhyUshort(sc, 0x06, 0x039e);
17604         MP_WritePhyUshort(sc, 0x06, 0x0902);
17605         MP_WritePhyUshort(sc, 0x06, 0x05db);
17606         MP_WritePhyUshort(sc, 0x06, 0x0282);
17607         MP_WritePhyUshort(sc, 0x06, 0x7b02);
17608         MP_WritePhyUshort(sc, 0x06, 0x3231);
17609         MP_WritePhyUshort(sc, 0x06, 0xfc04);
17610         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
17611         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
17612         MP_WritePhyUshort(sc, 0x06, 0xad20);
17613         MP_WritePhyUshort(sc, 0x06, 0x1df6);
17614         MP_WritePhyUshort(sc, 0x06, 0x20e4);
17615         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
17616         MP_WritePhyUshort(sc, 0x06, 0x0281);
17617         MP_WritePhyUshort(sc, 0x06, 0x5c02);
17618         MP_WritePhyUshort(sc, 0x06, 0x2bcb);
17619         MP_WritePhyUshort(sc, 0x06, 0x022d);
17620         MP_WritePhyUshort(sc, 0x06, 0x2902);
17621         MP_WritePhyUshort(sc, 0x06, 0x03b4);
17622         MP_WritePhyUshort(sc, 0x06, 0x0285);
17623         MP_WritePhyUshort(sc, 0x06, 0x6402);
17624         MP_WritePhyUshort(sc, 0x06, 0x2eca);
17625         MP_WritePhyUshort(sc, 0x06, 0x0284);
17626         MP_WritePhyUshort(sc, 0x06, 0xcd02);
17627         MP_WritePhyUshort(sc, 0x06, 0x046f);
17628         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17629         MP_WritePhyUshort(sc, 0x06, 0x8ead);
17630         MP_WritePhyUshort(sc, 0x06, 0x210b);
17631         MP_WritePhyUshort(sc, 0x06, 0xf621);
17632         MP_WritePhyUshort(sc, 0x06, 0xe48b);
17633         MP_WritePhyUshort(sc, 0x06, 0x8e02);
17634         MP_WritePhyUshort(sc, 0x06, 0x8520);
17635         MP_WritePhyUshort(sc, 0x06, 0x021b);
17636         MP_WritePhyUshort(sc, 0x06, 0xe8e0);
17637         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
17638         MP_WritePhyUshort(sc, 0x06, 0xad22);
17639         MP_WritePhyUshort(sc, 0x06, 0x05f6);
17640         MP_WritePhyUshort(sc, 0x06, 0x22e4);
17641         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
17642         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17643         MP_WritePhyUshort(sc, 0x06, 0x8ead);
17644         MP_WritePhyUshort(sc, 0x06, 0x2308);
17645         MP_WritePhyUshort(sc, 0x06, 0xf623);
17646         MP_WritePhyUshort(sc, 0x06, 0xe48b);
17647         MP_WritePhyUshort(sc, 0x06, 0x8e02);
17648         MP_WritePhyUshort(sc, 0x06, 0x311c);
17649         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17650         MP_WritePhyUshort(sc, 0x06, 0x8ead);
17651         MP_WritePhyUshort(sc, 0x06, 0x2405);
17652         MP_WritePhyUshort(sc, 0x06, 0xf624);
17653         MP_WritePhyUshort(sc, 0x06, 0xe48b);
17654         MP_WritePhyUshort(sc, 0x06, 0x8ee0);
17655         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
17656         MP_WritePhyUshort(sc, 0x06, 0xad25);
17657         MP_WritePhyUshort(sc, 0x06, 0x05f6);
17658         MP_WritePhyUshort(sc, 0x06, 0x25e4);
17659         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
17660         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17661         MP_WritePhyUshort(sc, 0x06, 0x8ead);
17662         MP_WritePhyUshort(sc, 0x06, 0x2608);
17663         MP_WritePhyUshort(sc, 0x06, 0xf626);
17664         MP_WritePhyUshort(sc, 0x06, 0xe48b);
17665         MP_WritePhyUshort(sc, 0x06, 0x8e02);
17666         MP_WritePhyUshort(sc, 0x06, 0x2df5);
17667         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17668         MP_WritePhyUshort(sc, 0x06, 0x8ead);
17669         MP_WritePhyUshort(sc, 0x06, 0x2705);
17670         MP_WritePhyUshort(sc, 0x06, 0xf627);
17671         MP_WritePhyUshort(sc, 0x06, 0xe48b);
17672         MP_WritePhyUshort(sc, 0x06, 0x8e02);
17673         MP_WritePhyUshort(sc, 0x06, 0x037a);
17674         MP_WritePhyUshort(sc, 0x06, 0xfc04);
17675         MP_WritePhyUshort(sc, 0x06, 0xf8f9);
17676         MP_WritePhyUshort(sc, 0x06, 0xfaef);
17677         MP_WritePhyUshort(sc, 0x06, 0x69e0);
17678         MP_WritePhyUshort(sc, 0x06, 0x8b87);
17679         MP_WritePhyUshort(sc, 0x06, 0xad20);
17680         MP_WritePhyUshort(sc, 0x06, 0x65d2);
17681         MP_WritePhyUshort(sc, 0x06, 0x00bf);
17682         MP_WritePhyUshort(sc, 0x06, 0x2fe9);
17683         MP_WritePhyUshort(sc, 0x06, 0x0236);
17684         MP_WritePhyUshort(sc, 0x06, 0xf61e);
17685         MP_WritePhyUshort(sc, 0x06, 0x21bf);
17686         MP_WritePhyUshort(sc, 0x06, 0x2ff5);
17687         MP_WritePhyUshort(sc, 0x06, 0x0236);
17688         MP_WritePhyUshort(sc, 0x06, 0xf60c);
17689         MP_WritePhyUshort(sc, 0x06, 0x111e);
17690         MP_WritePhyUshort(sc, 0x06, 0x21bf);
17691         MP_WritePhyUshort(sc, 0x06, 0x2ff8);
17692         MP_WritePhyUshort(sc, 0x06, 0x0236);
17693         MP_WritePhyUshort(sc, 0x06, 0xf60c);
17694         MP_WritePhyUshort(sc, 0x06, 0x121e);
17695         MP_WritePhyUshort(sc, 0x06, 0x21bf);
17696         MP_WritePhyUshort(sc, 0x06, 0x2ffb);
17697         MP_WritePhyUshort(sc, 0x06, 0x0236);
17698         MP_WritePhyUshort(sc, 0x06, 0xf60c);
17699         MP_WritePhyUshort(sc, 0x06, 0x131e);
17700         MP_WritePhyUshort(sc, 0x06, 0x21bf);
17701         MP_WritePhyUshort(sc, 0x06, 0x1f97);
17702         MP_WritePhyUshort(sc, 0x06, 0x0236);
17703         MP_WritePhyUshort(sc, 0x06, 0xf60c);
17704         MP_WritePhyUshort(sc, 0x06, 0x141e);
17705         MP_WritePhyUshort(sc, 0x06, 0x21bf);
17706         MP_WritePhyUshort(sc, 0x06, 0x859b);
17707         MP_WritePhyUshort(sc, 0x06, 0x0236);
17708         MP_WritePhyUshort(sc, 0x06, 0xf60c);
17709         MP_WritePhyUshort(sc, 0x06, 0x161e);
17710         MP_WritePhyUshort(sc, 0x06, 0x21e0);
17711         MP_WritePhyUshort(sc, 0x06, 0x8a8c);
17712         MP_WritePhyUshort(sc, 0x06, 0x1f02);
17713         MP_WritePhyUshort(sc, 0x06, 0x9e22);
17714         MP_WritePhyUshort(sc, 0x06, 0xe68a);
17715         MP_WritePhyUshort(sc, 0x06, 0x8cad);
17716         MP_WritePhyUshort(sc, 0x06, 0x3114);
17717         MP_WritePhyUshort(sc, 0x06, 0xad30);
17718         MP_WritePhyUshort(sc, 0x06, 0x11ef);
17719         MP_WritePhyUshort(sc, 0x06, 0x0258);
17720         MP_WritePhyUshort(sc, 0x06, 0x0c9e);
17721         MP_WritePhyUshort(sc, 0x06, 0x07ad);
17722         MP_WritePhyUshort(sc, 0x06, 0x3608);
17723         MP_WritePhyUshort(sc, 0x06, 0x5a30);
17724         MP_WritePhyUshort(sc, 0x06, 0x9f04);
17725         MP_WritePhyUshort(sc, 0x06, 0xd101);
17726         MP_WritePhyUshort(sc, 0x06, 0xae02);
17727         MP_WritePhyUshort(sc, 0x06, 0xd100);
17728         MP_WritePhyUshort(sc, 0x06, 0xbf2f);
17729         MP_WritePhyUshort(sc, 0x06, 0xf202);
17730         MP_WritePhyUshort(sc, 0x06, 0x3723);
17731         MP_WritePhyUshort(sc, 0x06, 0xef96);
17732         MP_WritePhyUshort(sc, 0x06, 0xfefd);
17733         MP_WritePhyUshort(sc, 0x06, 0xfc04);
17734         MP_WritePhyUshort(sc, 0x06, 0xf8f9);
17735         MP_WritePhyUshort(sc, 0x06, 0xface);
17736         MP_WritePhyUshort(sc, 0x06, 0xfaef);
17737         MP_WritePhyUshort(sc, 0x06, 0x69fa);
17738         MP_WritePhyUshort(sc, 0x06, 0xd401);
17739         MP_WritePhyUshort(sc, 0x06, 0x55b4);
17740         MP_WritePhyUshort(sc, 0x06, 0xfebf);
17741         MP_WritePhyUshort(sc, 0x06, 0x85a7);
17742         MP_WritePhyUshort(sc, 0x06, 0x0236);
17743         MP_WritePhyUshort(sc, 0x06, 0xf6ac);
17744         MP_WritePhyUshort(sc, 0x06, 0x280b);
17745         MP_WritePhyUshort(sc, 0x06, 0xbf85);
17746         MP_WritePhyUshort(sc, 0x06, 0xa402);
17747         MP_WritePhyUshort(sc, 0x06, 0x36f6);
17748         MP_WritePhyUshort(sc, 0x06, 0xac28);
17749         MP_WritePhyUshort(sc, 0x06, 0x49ae);
17750         MP_WritePhyUshort(sc, 0x06, 0x64bf);
17751         MP_WritePhyUshort(sc, 0x06, 0x85a4);
17752         MP_WritePhyUshort(sc, 0x06, 0x0236);
17753         MP_WritePhyUshort(sc, 0x06, 0xf6ac);
17754         MP_WritePhyUshort(sc, 0x06, 0x285b);
17755         MP_WritePhyUshort(sc, 0x06, 0xd000);
17756         MP_WritePhyUshort(sc, 0x06, 0x0282);
17757         MP_WritePhyUshort(sc, 0x06, 0x60ac);
17758         MP_WritePhyUshort(sc, 0x06, 0x2105);
17759         MP_WritePhyUshort(sc, 0x06, 0xac22);
17760         MP_WritePhyUshort(sc, 0x06, 0x02ae);
17761         MP_WritePhyUshort(sc, 0x06, 0x4ebf);
17762         MP_WritePhyUshort(sc, 0x06, 0xe0c4);
17763         MP_WritePhyUshort(sc, 0x06, 0xbe86);
17764         MP_WritePhyUshort(sc, 0x06, 0x14d2);
17765         MP_WritePhyUshort(sc, 0x06, 0x04d8);
17766         MP_WritePhyUshort(sc, 0x06, 0x19d9);
17767         MP_WritePhyUshort(sc, 0x06, 0x1907);
17768         MP_WritePhyUshort(sc, 0x06, 0xdc19);
17769         MP_WritePhyUshort(sc, 0x06, 0xdd19);
17770         MP_WritePhyUshort(sc, 0x06, 0x0789);
17771         MP_WritePhyUshort(sc, 0x06, 0x89ef);
17772         MP_WritePhyUshort(sc, 0x06, 0x645e);
17773         MP_WritePhyUshort(sc, 0x06, 0x07ff);
17774         MP_WritePhyUshort(sc, 0x06, 0x0d65);
17775         MP_WritePhyUshort(sc, 0x06, 0x5cf8);
17776         MP_WritePhyUshort(sc, 0x06, 0x001e);
17777         MP_WritePhyUshort(sc, 0x06, 0x46dc);
17778         MP_WritePhyUshort(sc, 0x06, 0x19dd);
17779         MP_WritePhyUshort(sc, 0x06, 0x19b2);
17780         MP_WritePhyUshort(sc, 0x06, 0xe2d4);
17781         MP_WritePhyUshort(sc, 0x06, 0x0001);
17782         MP_WritePhyUshort(sc, 0x06, 0xbf85);
17783         MP_WritePhyUshort(sc, 0x06, 0xa402);
17784         MP_WritePhyUshort(sc, 0x06, 0x3723);
17785         MP_WritePhyUshort(sc, 0x06, 0xae1d);
17786         MP_WritePhyUshort(sc, 0x06, 0xbee0);
17787         MP_WritePhyUshort(sc, 0x06, 0xc4bf);
17788         MP_WritePhyUshort(sc, 0x06, 0x8614);
17789         MP_WritePhyUshort(sc, 0x06, 0xd204);
17790         MP_WritePhyUshort(sc, 0x06, 0xd819);
17791         MP_WritePhyUshort(sc, 0x06, 0xd919);
17792         MP_WritePhyUshort(sc, 0x06, 0x07dc);
17793         MP_WritePhyUshort(sc, 0x06, 0x19dd);
17794         MP_WritePhyUshort(sc, 0x06, 0x1907);
17795         MP_WritePhyUshort(sc, 0x06, 0xb2f4);
17796         MP_WritePhyUshort(sc, 0x06, 0xd400);
17797         MP_WritePhyUshort(sc, 0x06, 0x00bf);
17798         MP_WritePhyUshort(sc, 0x06, 0x85a4);
17799         MP_WritePhyUshort(sc, 0x06, 0x0237);
17800         MP_WritePhyUshort(sc, 0x06, 0x23fe);
17801         MP_WritePhyUshort(sc, 0x06, 0xef96);
17802         MP_WritePhyUshort(sc, 0x06, 0xfec6);
17803         MP_WritePhyUshort(sc, 0x06, 0xfefd);
17804         MP_WritePhyUshort(sc, 0x06, 0xfc05);
17805         MP_WritePhyUshort(sc, 0x06, 0xf9e2);
17806         MP_WritePhyUshort(sc, 0x06, 0xe0ea);
17807         MP_WritePhyUshort(sc, 0x06, 0xe3e0);
17808         MP_WritePhyUshort(sc, 0x06, 0xeb5a);
17809         MP_WritePhyUshort(sc, 0x06, 0x070c);
17810         MP_WritePhyUshort(sc, 0x06, 0x031e);
17811         MP_WritePhyUshort(sc, 0x06, 0x20e6);
17812         MP_WritePhyUshort(sc, 0x06, 0xe0ea);
17813         MP_WritePhyUshort(sc, 0x06, 0xe7e0);
17814         MP_WritePhyUshort(sc, 0x06, 0xebe0);
17815         MP_WritePhyUshort(sc, 0x06, 0xe0fc);
17816         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
17817         MP_WritePhyUshort(sc, 0x06, 0xfdfd);
17818         MP_WritePhyUshort(sc, 0x06, 0x04f8);
17819         MP_WritePhyUshort(sc, 0x06, 0xf9e0);
17820         MP_WritePhyUshort(sc, 0x06, 0x8b81);
17821         MP_WritePhyUshort(sc, 0x06, 0xac26);
17822         MP_WritePhyUshort(sc, 0x06, 0x1ae0);
17823         MP_WritePhyUshort(sc, 0x06, 0x8b81);
17824         MP_WritePhyUshort(sc, 0x06, 0xac21);
17825         MP_WritePhyUshort(sc, 0x06, 0x14e0);
17826         MP_WritePhyUshort(sc, 0x06, 0x8b85);
17827         MP_WritePhyUshort(sc, 0x06, 0xac20);
17828         MP_WritePhyUshort(sc, 0x06, 0x0ee0);
17829         MP_WritePhyUshort(sc, 0x06, 0x8b85);
17830         MP_WritePhyUshort(sc, 0x06, 0xac23);
17831         MP_WritePhyUshort(sc, 0x06, 0x08e0);
17832         MP_WritePhyUshort(sc, 0x06, 0x8b87);
17833         MP_WritePhyUshort(sc, 0x06, 0xac24);
17834         MP_WritePhyUshort(sc, 0x06, 0x02ae);
17835         MP_WritePhyUshort(sc, 0x06, 0x3802);
17836         MP_WritePhyUshort(sc, 0x06, 0x1ab5);
17837         MP_WritePhyUshort(sc, 0x06, 0xeee4);
17838         MP_WritePhyUshort(sc, 0x06, 0x1c04);
17839         MP_WritePhyUshort(sc, 0x06, 0xeee4);
17840         MP_WritePhyUshort(sc, 0x06, 0x1d04);
17841         MP_WritePhyUshort(sc, 0x06, 0xe2e0);
17842         MP_WritePhyUshort(sc, 0x06, 0x7ce3);
17843         MP_WritePhyUshort(sc, 0x06, 0xe07d);
17844         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
17845         MP_WritePhyUshort(sc, 0x06, 0x38e1);
17846         MP_WritePhyUshort(sc, 0x06, 0xe039);
17847         MP_WritePhyUshort(sc, 0x06, 0xad2e);
17848         MP_WritePhyUshort(sc, 0x06, 0x1bad);
17849         MP_WritePhyUshort(sc, 0x06, 0x390d);
17850         MP_WritePhyUshort(sc, 0x06, 0xd101);
17851         MP_WritePhyUshort(sc, 0x06, 0xbf21);
17852         MP_WritePhyUshort(sc, 0x06, 0xd502);
17853         MP_WritePhyUshort(sc, 0x06, 0x3723);
17854         MP_WritePhyUshort(sc, 0x06, 0x0282);
17855         MP_WritePhyUshort(sc, 0x06, 0xd8ae);
17856         MP_WritePhyUshort(sc, 0x06, 0x0bac);
17857         MP_WritePhyUshort(sc, 0x06, 0x3802);
17858         MP_WritePhyUshort(sc, 0x06, 0xae06);
17859         MP_WritePhyUshort(sc, 0x06, 0x0283);
17860         MP_WritePhyUshort(sc, 0x06, 0x1802);
17861         MP_WritePhyUshort(sc, 0x06, 0x8360);
17862         MP_WritePhyUshort(sc, 0x06, 0x021a);
17863         MP_WritePhyUshort(sc, 0x06, 0xc6fd);
17864         MP_WritePhyUshort(sc, 0x06, 0xfc04);
17865         MP_WritePhyUshort(sc, 0x06, 0xf8e1);
17866         MP_WritePhyUshort(sc, 0x06, 0x8af4);
17867         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17868         MP_WritePhyUshort(sc, 0x06, 0x81ad);
17869         MP_WritePhyUshort(sc, 0x06, 0x2605);
17870         MP_WritePhyUshort(sc, 0x06, 0x0222);
17871         MP_WritePhyUshort(sc, 0x06, 0xa4f7);
17872         MP_WritePhyUshort(sc, 0x06, 0x28e0);
17873         MP_WritePhyUshort(sc, 0x06, 0x8b81);
17874         MP_WritePhyUshort(sc, 0x06, 0xad21);
17875         MP_WritePhyUshort(sc, 0x06, 0x0502);
17876         MP_WritePhyUshort(sc, 0x06, 0x23a9);
17877         MP_WritePhyUshort(sc, 0x06, 0xf729);
17878         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17879         MP_WritePhyUshort(sc, 0x06, 0x85ad);
17880         MP_WritePhyUshort(sc, 0x06, 0x2005);
17881         MP_WritePhyUshort(sc, 0x06, 0x0214);
17882         MP_WritePhyUshort(sc, 0x06, 0xabf7);
17883         MP_WritePhyUshort(sc, 0x06, 0x2ae0);
17884         MP_WritePhyUshort(sc, 0x06, 0x8b85);
17885         MP_WritePhyUshort(sc, 0x06, 0xad23);
17886         MP_WritePhyUshort(sc, 0x06, 0x0502);
17887         MP_WritePhyUshort(sc, 0x06, 0x12e7);
17888         MP_WritePhyUshort(sc, 0x06, 0xf72b);
17889         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17890         MP_WritePhyUshort(sc, 0x06, 0x87ad);
17891         MP_WritePhyUshort(sc, 0x06, 0x2405);
17892         MP_WritePhyUshort(sc, 0x06, 0x0283);
17893         MP_WritePhyUshort(sc, 0x06, 0xbcf7);
17894         MP_WritePhyUshort(sc, 0x06, 0x2ce5);
17895         MP_WritePhyUshort(sc, 0x06, 0x8af4);
17896         MP_WritePhyUshort(sc, 0x06, 0xfc04);
17897         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
17898         MP_WritePhyUshort(sc, 0x06, 0x8b81);
17899         MP_WritePhyUshort(sc, 0x06, 0xad26);
17900         MP_WritePhyUshort(sc, 0x06, 0x0302);
17901         MP_WritePhyUshort(sc, 0x06, 0x21e5);
17902         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17903         MP_WritePhyUshort(sc, 0x06, 0x81ad);
17904         MP_WritePhyUshort(sc, 0x06, 0x2109);
17905         MP_WritePhyUshort(sc, 0x06, 0xe08a);
17906         MP_WritePhyUshort(sc, 0x06, 0xf4ac);
17907         MP_WritePhyUshort(sc, 0x06, 0x2003);
17908         MP_WritePhyUshort(sc, 0x06, 0x0223);
17909         MP_WritePhyUshort(sc, 0x06, 0x98e0);
17910         MP_WritePhyUshort(sc, 0x06, 0x8b85);
17911         MP_WritePhyUshort(sc, 0x06, 0xad20);
17912         MP_WritePhyUshort(sc, 0x06, 0x09e0);
17913         MP_WritePhyUshort(sc, 0x06, 0x8af4);
17914         MP_WritePhyUshort(sc, 0x06, 0xac21);
17915         MP_WritePhyUshort(sc, 0x06, 0x0302);
17916         MP_WritePhyUshort(sc, 0x06, 0x13fb);
17917         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17918         MP_WritePhyUshort(sc, 0x06, 0x85ad);
17919         MP_WritePhyUshort(sc, 0x06, 0x2309);
17920         MP_WritePhyUshort(sc, 0x06, 0xe08a);
17921         MP_WritePhyUshort(sc, 0x06, 0xf4ac);
17922         MP_WritePhyUshort(sc, 0x06, 0x2203);
17923         MP_WritePhyUshort(sc, 0x06, 0x0212);
17924         MP_WritePhyUshort(sc, 0x06, 0xfae0);
17925         MP_WritePhyUshort(sc, 0x06, 0x8b87);
17926         MP_WritePhyUshort(sc, 0x06, 0xad24);
17927         MP_WritePhyUshort(sc, 0x06, 0x09e0);
17928         MP_WritePhyUshort(sc, 0x06, 0x8af4);
17929         MP_WritePhyUshort(sc, 0x06, 0xac23);
17930         MP_WritePhyUshort(sc, 0x06, 0x0302);
17931         MP_WritePhyUshort(sc, 0x06, 0x83c1);
17932         MP_WritePhyUshort(sc, 0x06, 0xfc04);
17933         MP_WritePhyUshort(sc, 0x06, 0xf8e1);
17934         MP_WritePhyUshort(sc, 0x06, 0x8af4);
17935         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17936         MP_WritePhyUshort(sc, 0x06, 0x81ad);
17937         MP_WritePhyUshort(sc, 0x06, 0x2608);
17938         MP_WritePhyUshort(sc, 0x06, 0xe083);
17939         MP_WritePhyUshort(sc, 0x06, 0xd2ad);
17940         MP_WritePhyUshort(sc, 0x06, 0x2502);
17941         MP_WritePhyUshort(sc, 0x06, 0xf628);
17942         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17943         MP_WritePhyUshort(sc, 0x06, 0x81ad);
17944         MP_WritePhyUshort(sc, 0x06, 0x210a);
17945         MP_WritePhyUshort(sc, 0x06, 0xe084);
17946         MP_WritePhyUshort(sc, 0x06, 0x0af6);
17947         MP_WritePhyUshort(sc, 0x06, 0x27a0);
17948         MP_WritePhyUshort(sc, 0x06, 0x0502);
17949         MP_WritePhyUshort(sc, 0x06, 0xf629);
17950         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17951         MP_WritePhyUshort(sc, 0x06, 0x85ad);
17952         MP_WritePhyUshort(sc, 0x06, 0x2008);
17953         MP_WritePhyUshort(sc, 0x06, 0xe08a);
17954         MP_WritePhyUshort(sc, 0x06, 0xe8ad);
17955         MP_WritePhyUshort(sc, 0x06, 0x2102);
17956         MP_WritePhyUshort(sc, 0x06, 0xf62a);
17957         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17958         MP_WritePhyUshort(sc, 0x06, 0x85ad);
17959         MP_WritePhyUshort(sc, 0x06, 0x2308);
17960         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17961         MP_WritePhyUshort(sc, 0x06, 0x20a0);
17962         MP_WritePhyUshort(sc, 0x06, 0x0302);
17963         MP_WritePhyUshort(sc, 0x06, 0xf62b);
17964         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17965         MP_WritePhyUshort(sc, 0x06, 0x87ad);
17966         MP_WritePhyUshort(sc, 0x06, 0x2408);
17967         MP_WritePhyUshort(sc, 0x06, 0xe086);
17968         MP_WritePhyUshort(sc, 0x06, 0x02a0);
17969         MP_WritePhyUshort(sc, 0x06, 0x0302);
17970         MP_WritePhyUshort(sc, 0x06, 0xf62c);
17971         MP_WritePhyUshort(sc, 0x06, 0xe58a);
17972         MP_WritePhyUshort(sc, 0x06, 0xf4a1);
17973         MP_WritePhyUshort(sc, 0x06, 0x0008);
17974         MP_WritePhyUshort(sc, 0x06, 0xd100);
17975         MP_WritePhyUshort(sc, 0x06, 0xbf21);
17976         MP_WritePhyUshort(sc, 0x06, 0xd502);
17977         MP_WritePhyUshort(sc, 0x06, 0x3723);
17978         MP_WritePhyUshort(sc, 0x06, 0xfc04);
17979         MP_WritePhyUshort(sc, 0x06, 0xee86);
17980         MP_WritePhyUshort(sc, 0x06, 0x0200);
17981         MP_WritePhyUshort(sc, 0x06, 0x04f8);
17982         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17983         MP_WritePhyUshort(sc, 0x06, 0x87ad);
17984         MP_WritePhyUshort(sc, 0x06, 0x241e);
17985         MP_WritePhyUshort(sc, 0x06, 0xe086);
17986         MP_WritePhyUshort(sc, 0x06, 0x02a0);
17987         MP_WritePhyUshort(sc, 0x06, 0x0005);
17988         MP_WritePhyUshort(sc, 0x06, 0x0283);
17989         MP_WritePhyUshort(sc, 0x06, 0xe8ae);
17990         MP_WritePhyUshort(sc, 0x06, 0xf5a0);
17991         MP_WritePhyUshort(sc, 0x06, 0x0105);
17992         MP_WritePhyUshort(sc, 0x06, 0x0283);
17993         MP_WritePhyUshort(sc, 0x06, 0xf8ae);
17994         MP_WritePhyUshort(sc, 0x06, 0x0ba0);
17995         MP_WritePhyUshort(sc, 0x06, 0x0205);
17996         MP_WritePhyUshort(sc, 0x06, 0x0284);
17997         MP_WritePhyUshort(sc, 0x06, 0x14ae);
17998         MP_WritePhyUshort(sc, 0x06, 0x03a0);
17999         MP_WritePhyUshort(sc, 0x06, 0x0300);
18000         MP_WritePhyUshort(sc, 0x06, 0xfc04);
18001         MP_WritePhyUshort(sc, 0x06, 0xf8fa);
18002         MP_WritePhyUshort(sc, 0x06, 0xef69);
18003         MP_WritePhyUshort(sc, 0x06, 0x0284);
18004         MP_WritePhyUshort(sc, 0x06, 0x2bee);
18005         MP_WritePhyUshort(sc, 0x06, 0x8602);
18006         MP_WritePhyUshort(sc, 0x06, 0x01ef);
18007         MP_WritePhyUshort(sc, 0x06, 0x96fe);
18008         MP_WritePhyUshort(sc, 0x06, 0xfc04);
18009         MP_WritePhyUshort(sc, 0x06, 0xf8ee);
18010         MP_WritePhyUshort(sc, 0x06, 0x8609);
18011         MP_WritePhyUshort(sc, 0x06, 0x0002);
18012         MP_WritePhyUshort(sc, 0x06, 0x8461);
18013         MP_WritePhyUshort(sc, 0x06, 0xfc04);
18014         MP_WritePhyUshort(sc, 0x06, 0xae10);
18015         MP_WritePhyUshort(sc, 0x06, 0x0000);
18016         MP_WritePhyUshort(sc, 0x06, 0x0000);
18017         MP_WritePhyUshort(sc, 0x06, 0x0000);
18018         MP_WritePhyUshort(sc, 0x06, 0x0000);
18019         MP_WritePhyUshort(sc, 0x06, 0x0000);
18020         MP_WritePhyUshort(sc, 0x06, 0x0000);
18021         MP_WritePhyUshort(sc, 0x06, 0x0000);
18022         MP_WritePhyUshort(sc, 0x06, 0x0000);
18023         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
18024         MP_WritePhyUshort(sc, 0x06, 0x8608);
18025         MP_WritePhyUshort(sc, 0x06, 0xe186);
18026         MP_WritePhyUshort(sc, 0x06, 0x091f);
18027         MP_WritePhyUshort(sc, 0x06, 0x019e);
18028         MP_WritePhyUshort(sc, 0x06, 0x0611);
18029         MP_WritePhyUshort(sc, 0x06, 0xe586);
18030         MP_WritePhyUshort(sc, 0x06, 0x09ae);
18031         MP_WritePhyUshort(sc, 0x06, 0x04ee);
18032         MP_WritePhyUshort(sc, 0x06, 0x8602);
18033         MP_WritePhyUshort(sc, 0x06, 0x01fc);
18034         MP_WritePhyUshort(sc, 0x06, 0x04f8);
18035         MP_WritePhyUshort(sc, 0x06, 0xf9fa);
18036         MP_WritePhyUshort(sc, 0x06, 0xef69);
18037         MP_WritePhyUshort(sc, 0x06, 0xfbbf);
18038         MP_WritePhyUshort(sc, 0x06, 0x8604);
18039         MP_WritePhyUshort(sc, 0x06, 0xef79);
18040         MP_WritePhyUshort(sc, 0x06, 0xd200);
18041         MP_WritePhyUshort(sc, 0x06, 0xd400);
18042         MP_WritePhyUshort(sc, 0x06, 0x221e);
18043         MP_WritePhyUshort(sc, 0x06, 0x02bf);
18044         MP_WritePhyUshort(sc, 0x06, 0x2fec);
18045         MP_WritePhyUshort(sc, 0x06, 0x0237);
18046         MP_WritePhyUshort(sc, 0x06, 0x23bf);
18047         MP_WritePhyUshort(sc, 0x06, 0x13f2);
18048         MP_WritePhyUshort(sc, 0x06, 0x0236);
18049         MP_WritePhyUshort(sc, 0x06, 0xf60d);
18050         MP_WritePhyUshort(sc, 0x06, 0x4559);
18051         MP_WritePhyUshort(sc, 0x06, 0x1fef);
18052         MP_WritePhyUshort(sc, 0x06, 0x97dd);
18053         MP_WritePhyUshort(sc, 0x06, 0xd308);
18054         MP_WritePhyUshort(sc, 0x06, 0x1a93);
18055         MP_WritePhyUshort(sc, 0x06, 0xdd12);
18056         MP_WritePhyUshort(sc, 0x06, 0x17a2);
18057         MP_WritePhyUshort(sc, 0x06, 0x04de);
18058         MP_WritePhyUshort(sc, 0x06, 0xffef);
18059         MP_WritePhyUshort(sc, 0x06, 0x96fe);
18060         MP_WritePhyUshort(sc, 0x06, 0xfdfc);
18061         MP_WritePhyUshort(sc, 0x06, 0x04f8);
18062         MP_WritePhyUshort(sc, 0x06, 0xf9fa);
18063         MP_WritePhyUshort(sc, 0x06, 0xef69);
18064         MP_WritePhyUshort(sc, 0x06, 0xfbee);
18065         MP_WritePhyUshort(sc, 0x06, 0x8602);
18066         MP_WritePhyUshort(sc, 0x06, 0x03d5);
18067         MP_WritePhyUshort(sc, 0x06, 0x0080);
18068         MP_WritePhyUshort(sc, 0x06, 0xbf86);
18069         MP_WritePhyUshort(sc, 0x06, 0x04ef);
18070         MP_WritePhyUshort(sc, 0x06, 0x79ef);
18071         MP_WritePhyUshort(sc, 0x06, 0x45bf);
18072         MP_WritePhyUshort(sc, 0x06, 0x2fec);
18073         MP_WritePhyUshort(sc, 0x06, 0x0237);
18074         MP_WritePhyUshort(sc, 0x06, 0x23bf);
18075         MP_WritePhyUshort(sc, 0x06, 0x13f2);
18076         MP_WritePhyUshort(sc, 0x06, 0x0236);
18077         MP_WritePhyUshort(sc, 0x06, 0xf6ad);
18078         MP_WritePhyUshort(sc, 0x06, 0x2702);
18079         MP_WritePhyUshort(sc, 0x06, 0x78ff);
18080         MP_WritePhyUshort(sc, 0x06, 0xe186);
18081         MP_WritePhyUshort(sc, 0x06, 0x0a1b);
18082         MP_WritePhyUshort(sc, 0x06, 0x01aa);
18083         MP_WritePhyUshort(sc, 0x06, 0x2eef);
18084         MP_WritePhyUshort(sc, 0x06, 0x97d9);
18085         MP_WritePhyUshort(sc, 0x06, 0x7900);
18086         MP_WritePhyUshort(sc, 0x06, 0x9e2b);
18087         MP_WritePhyUshort(sc, 0x06, 0x81dd);
18088         MP_WritePhyUshort(sc, 0x06, 0xbf85);
18089         MP_WritePhyUshort(sc, 0x06, 0xad02);
18090         MP_WritePhyUshort(sc, 0x06, 0x3723);
18091         MP_WritePhyUshort(sc, 0x06, 0xd101);
18092         MP_WritePhyUshort(sc, 0x06, 0xef02);
18093         MP_WritePhyUshort(sc, 0x06, 0x100c);
18094         MP_WritePhyUshort(sc, 0x06, 0x11b0);
18095         MP_WritePhyUshort(sc, 0x06, 0xfc0d);
18096         MP_WritePhyUshort(sc, 0x06, 0x11bf);
18097         MP_WritePhyUshort(sc, 0x06, 0x85aa);
18098         MP_WritePhyUshort(sc, 0x06, 0x0237);
18099         MP_WritePhyUshort(sc, 0x06, 0x23d1);
18100         MP_WritePhyUshort(sc, 0x06, 0x00bf);
18101         MP_WritePhyUshort(sc, 0x06, 0x85aa);
18102         MP_WritePhyUshort(sc, 0x06, 0x0237);
18103         MP_WritePhyUshort(sc, 0x06, 0x23ee);
18104         MP_WritePhyUshort(sc, 0x06, 0x8602);
18105         MP_WritePhyUshort(sc, 0x06, 0x02ae);
18106         MP_WritePhyUshort(sc, 0x06, 0x0413);
18107         MP_WritePhyUshort(sc, 0x06, 0xa38b);
18108         MP_WritePhyUshort(sc, 0x06, 0xb4d3);
18109         MP_WritePhyUshort(sc, 0x06, 0x8012);
18110         MP_WritePhyUshort(sc, 0x06, 0x17a2);
18111         MP_WritePhyUshort(sc, 0x06, 0x04ad);
18112         MP_WritePhyUshort(sc, 0x06, 0xffef);
18113         MP_WritePhyUshort(sc, 0x06, 0x96fe);
18114         MP_WritePhyUshort(sc, 0x06, 0xfdfc);
18115         MP_WritePhyUshort(sc, 0x06, 0x04f8);
18116         MP_WritePhyUshort(sc, 0x06, 0xf9e0);
18117         MP_WritePhyUshort(sc, 0x06, 0x8b85);
18118         MP_WritePhyUshort(sc, 0x06, 0xad25);
18119         MP_WritePhyUshort(sc, 0x06, 0x48e0);
18120         MP_WritePhyUshort(sc, 0x06, 0x8a96);
18121         MP_WritePhyUshort(sc, 0x06, 0xe18a);
18122         MP_WritePhyUshort(sc, 0x06, 0x977c);
18123         MP_WritePhyUshort(sc, 0x06, 0x0000);
18124         MP_WritePhyUshort(sc, 0x06, 0x9e35);
18125         MP_WritePhyUshort(sc, 0x06, 0xee8a);
18126         MP_WritePhyUshort(sc, 0x06, 0x9600);
18127         MP_WritePhyUshort(sc, 0x06, 0xee8a);
18128         MP_WritePhyUshort(sc, 0x06, 0x9700);
18129         MP_WritePhyUshort(sc, 0x06, 0xe08a);
18130         MP_WritePhyUshort(sc, 0x06, 0xbee1);
18131         MP_WritePhyUshort(sc, 0x06, 0x8abf);
18132         MP_WritePhyUshort(sc, 0x06, 0xe286);
18133         MP_WritePhyUshort(sc, 0x06, 0x10e3);
18134         MP_WritePhyUshort(sc, 0x06, 0x8611);
18135         MP_WritePhyUshort(sc, 0x06, 0x0236);
18136         MP_WritePhyUshort(sc, 0x06, 0x1aad);
18137         MP_WritePhyUshort(sc, 0x06, 0x2012);
18138         MP_WritePhyUshort(sc, 0x06, 0xee8a);
18139         MP_WritePhyUshort(sc, 0x06, 0x9603);
18140         MP_WritePhyUshort(sc, 0x06, 0xee8a);
18141         MP_WritePhyUshort(sc, 0x06, 0x97b7);
18142         MP_WritePhyUshort(sc, 0x06, 0xee86);
18143         MP_WritePhyUshort(sc, 0x06, 0x1000);
18144         MP_WritePhyUshort(sc, 0x06, 0xee86);
18145         MP_WritePhyUshort(sc, 0x06, 0x1100);
18146         MP_WritePhyUshort(sc, 0x06, 0xae11);
18147         MP_WritePhyUshort(sc, 0x06, 0x15e6);
18148         MP_WritePhyUshort(sc, 0x06, 0x8610);
18149         MP_WritePhyUshort(sc, 0x06, 0xe786);
18150         MP_WritePhyUshort(sc, 0x06, 0x11ae);
18151         MP_WritePhyUshort(sc, 0x06, 0x08ee);
18152         MP_WritePhyUshort(sc, 0x06, 0x8610);
18153         MP_WritePhyUshort(sc, 0x06, 0x00ee);
18154         MP_WritePhyUshort(sc, 0x06, 0x8611);
18155         MP_WritePhyUshort(sc, 0x06, 0x00fd);
18156         MP_WritePhyUshort(sc, 0x06, 0xfc04);
18157         MP_WritePhyUshort(sc, 0x06, 0xf8fa);
18158         MP_WritePhyUshort(sc, 0x06, 0xef69);
18159         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
18160         MP_WritePhyUshort(sc, 0x06, 0x00e1);
18161         MP_WritePhyUshort(sc, 0x06, 0xe001);
18162         MP_WritePhyUshort(sc, 0x06, 0xad27);
18163         MP_WritePhyUshort(sc, 0x06, 0x32e0);
18164         MP_WritePhyUshort(sc, 0x06, 0x8b40);
18165         MP_WritePhyUshort(sc, 0x06, 0xf720);
18166         MP_WritePhyUshort(sc, 0x06, 0xe48b);
18167         MP_WritePhyUshort(sc, 0x06, 0x40bf);
18168         MP_WritePhyUshort(sc, 0x06, 0x31f5);
18169         MP_WritePhyUshort(sc, 0x06, 0x0236);
18170         MP_WritePhyUshort(sc, 0x06, 0xf6ad);
18171         MP_WritePhyUshort(sc, 0x06, 0x2821);
18172         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
18173         MP_WritePhyUshort(sc, 0x06, 0x20e1);
18174         MP_WritePhyUshort(sc, 0x06, 0xe021);
18175         MP_WritePhyUshort(sc, 0x06, 0xad20);
18176         MP_WritePhyUshort(sc, 0x06, 0x18e0);
18177         MP_WritePhyUshort(sc, 0x06, 0x8b40);
18178         MP_WritePhyUshort(sc, 0x06, 0xf620);
18179         MP_WritePhyUshort(sc, 0x06, 0xe48b);
18180         MP_WritePhyUshort(sc, 0x06, 0x40ee);
18181         MP_WritePhyUshort(sc, 0x06, 0x8b3b);
18182         MP_WritePhyUshort(sc, 0x06, 0xffe0);
18183         MP_WritePhyUshort(sc, 0x06, 0x8a8a);
18184         MP_WritePhyUshort(sc, 0x06, 0xe18a);
18185         MP_WritePhyUshort(sc, 0x06, 0x8be4);
18186         MP_WritePhyUshort(sc, 0x06, 0xe000);
18187         MP_WritePhyUshort(sc, 0x06, 0xe5e0);
18188         MP_WritePhyUshort(sc, 0x06, 0x01ef);
18189         MP_WritePhyUshort(sc, 0x06, 0x96fe);
18190         MP_WritePhyUshort(sc, 0x06, 0xfc04);
18191         MP_WritePhyUshort(sc, 0x06, 0xf8fa);
18192         MP_WritePhyUshort(sc, 0x06, 0xef69);
18193         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18194         MP_WritePhyUshort(sc, 0x06, 0x80ad);
18195         MP_WritePhyUshort(sc, 0x06, 0x2722);
18196         MP_WritePhyUshort(sc, 0x06, 0xbf44);
18197         MP_WritePhyUshort(sc, 0x06, 0xfc02);
18198         MP_WritePhyUshort(sc, 0x06, 0x36f6);
18199         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18200         MP_WritePhyUshort(sc, 0x06, 0x441f);
18201         MP_WritePhyUshort(sc, 0x06, 0x019e);
18202         MP_WritePhyUshort(sc, 0x06, 0x15e5);
18203         MP_WritePhyUshort(sc, 0x06, 0x8b44);
18204         MP_WritePhyUshort(sc, 0x06, 0xad29);
18205         MP_WritePhyUshort(sc, 0x06, 0x07ac);
18206         MP_WritePhyUshort(sc, 0x06, 0x2804);
18207         MP_WritePhyUshort(sc, 0x06, 0xd101);
18208         MP_WritePhyUshort(sc, 0x06, 0xae02);
18209         MP_WritePhyUshort(sc, 0x06, 0xd100);
18210         MP_WritePhyUshort(sc, 0x06, 0xbf85);
18211         MP_WritePhyUshort(sc, 0x06, 0xb002);
18212         MP_WritePhyUshort(sc, 0x06, 0x3723);
18213         MP_WritePhyUshort(sc, 0x06, 0xef96);
18214         MP_WritePhyUshort(sc, 0x06, 0xfefc);
18215         MP_WritePhyUshort(sc, 0x06, 0x0400);
18216         MP_WritePhyUshort(sc, 0x06, 0xe140);
18217         MP_WritePhyUshort(sc, 0x06, 0x77e1);
18218         MP_WritePhyUshort(sc, 0x06, 0x40dd);
18219         MP_WritePhyUshort(sc, 0x06, 0xe022);
18220         MP_WritePhyUshort(sc, 0x06, 0x32e1);
18221         MP_WritePhyUshort(sc, 0x06, 0x5074);
18222         MP_WritePhyUshort(sc, 0x06, 0xe144);
18223         MP_WritePhyUshort(sc, 0x06, 0xffe0);
18224         MP_WritePhyUshort(sc, 0x06, 0xdaff);
18225         MP_WritePhyUshort(sc, 0x06, 0xe0c0);
18226         MP_WritePhyUshort(sc, 0x06, 0x52e0);
18227         MP_WritePhyUshort(sc, 0x06, 0xeed9);
18228         MP_WritePhyUshort(sc, 0x06, 0xe04c);
18229         MP_WritePhyUshort(sc, 0x06, 0xbbe0);
18230         MP_WritePhyUshort(sc, 0x06, 0x2a00);
18231         MP_WritePhyUshort(sc, 0x05, 0xe142);
18232         PhyRegValue = MP_ReadPhyUshort(sc, 0x06);
18233         PhyRegValue |= BIT_0;
18234         MP_WritePhyUshort(sc, 0x06, PhyRegValue);
18235         MP_WritePhyUshort(sc, 0x05, 0xe140);
18236         PhyRegValue = MP_ReadPhyUshort(sc, 0x06);
18237         PhyRegValue |= BIT_0;
18238         MP_WritePhyUshort(sc, 0x06, PhyRegValue);
18239         MP_WritePhyUshort(sc, 0x1f, 0x0000);
18240         MP_WritePhyUshort(sc, 0x1f, 0x0005);
18241         for (i = 0; i < 200; i++) {
18242                 DELAY(100);
18243                 PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
18244                 if (PhyRegValue & BIT_7)
18245                         break;
18246         }
18247 
18248         MP_WritePhyUshort(sc, 0x1F, 0x0003);
18249         MP_WritePhyUshort(sc, 0x09, 0xA20F);
18250         MP_WritePhyUshort(sc, 0x1F, 0x0000);
18251 
18252         MP_WritePhyUshort(sc, 0x1f, 0x0003);
18253         PhyRegValue = MP_ReadPhyUshort(sc, 0x19);
18254         PhyRegValue &= ~BIT_0;
18255         MP_WritePhyUshort(sc, 0x19, PhyRegValue);
18256         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
18257         PhyRegValue &= ~BIT_10;
18258         MP_WritePhyUshort(sc, 0x10, PhyRegValue);
18259         MP_WritePhyUshort(sc, 0x1f, 0x0000);
18260 
18261         MP_WritePhyUshort(sc, 0x1f, 0x0007);
18262         MP_WritePhyUshort(sc, 0x1e, 0x0042);
18263         MP_WritePhyUshort(sc, 0x18, 0x2300);
18264         MP_WritePhyUshort(sc, 0x1f, 0x0000);
18265         MP_WritePhyUshort(sc, 0x1f, 0x0007);
18266         MP_WritePhyUshort(sc, 0x1e, 0x0023);
18267         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
18268         if (sc->RequiredSecLanDonglePatch)
18269                 PhyRegValue &= ~(BIT_2);
18270         MP_WritePhyUshort(sc, 0x17, PhyRegValue);
18271         MP_WritePhyUshort(sc, 0x1f, 0x0000);
18272         MP_WritePhyUshort(sc, 0x00, 0x9200);
18273 }
18274 
18275 static void re_set_phy_mcu_8168f_1(struct re_softc *sc)
18276 {
18277         u_int16_t PhyRegValue;
18278         int i;
18279 
18280         MP_WritePhyUshort(sc, 0x1f, 0x0000);
18281         MP_WritePhyUshort(sc, 0x00, 0x1800);
18282         PhyRegValue = MP_ReadPhyUshort(sc, 0x15);
18283         PhyRegValue &= ~(BIT_12);
18284         MP_WritePhyUshort(sc, 0x15, PhyRegValue);
18285         MP_WritePhyUshort(sc, 0x00, 0x4800);
18286         MP_WritePhyUshort(sc, 0x1f, 0x0007);
18287         MP_WritePhyUshort(sc, 0x1e, 0x002f);
18288         for (i = 0; i < 1000; i++) {
18289                 DELAY(100);
18290                 PhyRegValue = MP_ReadPhyUshort(sc, 0x1c);
18291                 if (PhyRegValue & BIT_7)
18292                         break;
18293         }
18294         MP_WritePhyUshort(sc, 0x1f, 0x0000);
18295         MP_WritePhyUshort(sc, 0x00, 0x1800);
18296         MP_WritePhyUshort(sc, 0x1f, 0x0007);
18297         MP_WritePhyUshort(sc, 0x1e, 0x0023);
18298         for (i = 0; i < 200; i++) {
18299                 DELAY(100);
18300                 PhyRegValue = MP_ReadPhyUshort(sc, 0x18);
18301                 if (!(PhyRegValue & BIT_0))
18302                         break;
18303         }
18304         MP_WritePhyUshort(sc, 0x1f, 0x0005);
18305         MP_WritePhyUshort(sc, 0x05, 0xfff6);
18306         MP_WritePhyUshort(sc, 0x06, 0x0080);
18307         MP_WritePhyUshort(sc, 0x1f, 0x0007);
18308         MP_WritePhyUshort(sc, 0x1e, 0x0023);
18309         MP_WritePhyUshort(sc, 0x16, 0x0306);
18310         MP_WritePhyUshort(sc, 0x16, 0x0307);
18311         MP_WritePhyUshort(sc, 0x15, 0x0194);
18312         MP_WritePhyUshort(sc, 0x19, 0x407D);
18313         MP_WritePhyUshort(sc, 0x15, 0x0098);
18314         MP_WritePhyUshort(sc, 0x19, 0x7c0b);
18315         MP_WritePhyUshort(sc, 0x15, 0x0099);
18316         MP_WritePhyUshort(sc, 0x19, 0x6c0b);
18317         MP_WritePhyUshort(sc, 0x15, 0x00eb);
18318         MP_WritePhyUshort(sc, 0x19, 0x6c0b);
18319         MP_WritePhyUshort(sc, 0x15, 0x00f8);
18320         MP_WritePhyUshort(sc, 0x19, 0x6f0b);
18321         MP_WritePhyUshort(sc, 0x15, 0x00fe);
18322         MP_WritePhyUshort(sc, 0x19, 0x6f0f);
18323         MP_WritePhyUshort(sc, 0x15, 0x00db);
18324         MP_WritePhyUshort(sc, 0x19, 0x6f09);
18325         MP_WritePhyUshort(sc, 0x15, 0x00dc);
18326         MP_WritePhyUshort(sc, 0x19, 0xaefd);
18327         MP_WritePhyUshort(sc, 0x15, 0x00dd);
18328         MP_WritePhyUshort(sc, 0x19, 0x6f0b);
18329         MP_WritePhyUshort(sc, 0x15, 0x00de);
18330         MP_WritePhyUshort(sc, 0x19, 0xc60b);
18331         MP_WritePhyUshort(sc, 0x15, 0x00df);
18332         MP_WritePhyUshort(sc, 0x19, 0x00fa);
18333         MP_WritePhyUshort(sc, 0x15, 0x00e0);
18334         MP_WritePhyUshort(sc, 0x19, 0x30e1);
18335         MP_WritePhyUshort(sc, 0x15, 0x020c);
18336         MP_WritePhyUshort(sc, 0x19, 0x3224);
18337         MP_WritePhyUshort(sc, 0x15, 0x020e);
18338         MP_WritePhyUshort(sc, 0x19, 0x9813);
18339         MP_WritePhyUshort(sc, 0x15, 0x020f);
18340         MP_WritePhyUshort(sc, 0x19, 0x7801);
18341         MP_WritePhyUshort(sc, 0x15, 0x0210);
18342         MP_WritePhyUshort(sc, 0x19, 0x930f);
18343         MP_WritePhyUshort(sc, 0x15, 0x0211);
18344         MP_WritePhyUshort(sc, 0x19, 0x9206);
18345         MP_WritePhyUshort(sc, 0x15, 0x0212);
18346         MP_WritePhyUshort(sc, 0x19, 0x4002);
18347         MP_WritePhyUshort(sc, 0x15, 0x0213);
18348         MP_WritePhyUshort(sc, 0x19, 0x7800);
18349         MP_WritePhyUshort(sc, 0x15, 0x0214);
18350         MP_WritePhyUshort(sc, 0x19, 0x588f);
18351         MP_WritePhyUshort(sc, 0x15, 0x0215);
18352         MP_WritePhyUshort(sc, 0x19, 0x5520);
18353         MP_WritePhyUshort(sc, 0x15, 0x0216);
18354         MP_WritePhyUshort(sc, 0x19, 0x3224);
18355         MP_WritePhyUshort(sc, 0x15, 0x0217);
18356         MP_WritePhyUshort(sc, 0x19, 0x4002);
18357         MP_WritePhyUshort(sc, 0x15, 0x0218);
18358         MP_WritePhyUshort(sc, 0x19, 0x7800);
18359         MP_WritePhyUshort(sc, 0x15, 0x0219);
18360         MP_WritePhyUshort(sc, 0x19, 0x588d);
18361         MP_WritePhyUshort(sc, 0x15, 0x021a);
18362         MP_WritePhyUshort(sc, 0x19, 0x5540);
18363         MP_WritePhyUshort(sc, 0x15, 0x021b);
18364         MP_WritePhyUshort(sc, 0x19, 0x9e03);
18365         MP_WritePhyUshort(sc, 0x15, 0x021c);
18366         MP_WritePhyUshort(sc, 0x19, 0x7c40);
18367         MP_WritePhyUshort(sc, 0x15, 0x021d);
18368         MP_WritePhyUshort(sc, 0x19, 0x6840);
18369         MP_WritePhyUshort(sc, 0x15, 0x021e);
18370         MP_WritePhyUshort(sc, 0x19, 0x3224);
18371         MP_WritePhyUshort(sc, 0x15, 0x021f);
18372         MP_WritePhyUshort(sc, 0x19, 0x4002);
18373         MP_WritePhyUshort(sc, 0x15, 0x0220);
18374         MP_WritePhyUshort(sc, 0x19, 0x3224);
18375         MP_WritePhyUshort(sc, 0x15, 0x0221);
18376         MP_WritePhyUshort(sc, 0x19, 0x9e03);
18377         MP_WritePhyUshort(sc, 0x15, 0x0222);
18378         MP_WritePhyUshort(sc, 0x19, 0x7c40);
18379         MP_WritePhyUshort(sc, 0x15, 0x0223);
18380         MP_WritePhyUshort(sc, 0x19, 0x6840);
18381         MP_WritePhyUshort(sc, 0x15, 0x0224);
18382         MP_WritePhyUshort(sc, 0x19, 0x7800);
18383         MP_WritePhyUshort(sc, 0x15, 0x0225);
18384         MP_WritePhyUshort(sc, 0x19, 0x3231);
18385         MP_WritePhyUshort(sc, 0x15, 0x0000);
18386         MP_WritePhyUshort(sc, 0x16, 0x0306);
18387         MP_WritePhyUshort(sc, 0x16, 0x0300);
18388         MP_WritePhyUshort(sc, 0x1f, 0x0000);
18389         MP_WritePhyUshort(sc, 0x1f, 0x0005);
18390         MP_WritePhyUshort(sc, 0x05, 0xfff6);
18391         MP_WritePhyUshort(sc, 0x06, 0x0080);
18392         MP_WritePhyUshort(sc, 0x05, 0x8000);
18393         MP_WritePhyUshort(sc, 0x06, 0x0280);
18394         MP_WritePhyUshort(sc, 0x06, 0x48f7);
18395         MP_WritePhyUshort(sc, 0x06, 0x00e0);
18396         MP_WritePhyUshort(sc, 0x06, 0xfff7);
18397         MP_WritePhyUshort(sc, 0x06, 0xa080);
18398         MP_WritePhyUshort(sc, 0x06, 0x02ae);
18399         MP_WritePhyUshort(sc, 0x06, 0xf602);
18400         MP_WritePhyUshort(sc, 0x06, 0x0118);
18401         MP_WritePhyUshort(sc, 0x06, 0x0201);
18402         MP_WritePhyUshort(sc, 0x06, 0x2502);
18403         MP_WritePhyUshort(sc, 0x06, 0x8090);
18404         MP_WritePhyUshort(sc, 0x06, 0x0201);
18405         MP_WritePhyUshort(sc, 0x06, 0x4202);
18406         MP_WritePhyUshort(sc, 0x06, 0x015c);
18407         MP_WritePhyUshort(sc, 0x06, 0x0280);
18408         MP_WritePhyUshort(sc, 0x06, 0xad02);
18409         MP_WritePhyUshort(sc, 0x06, 0x80ca);
18410         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18411         MP_WritePhyUshort(sc, 0x06, 0x88e1);
18412         MP_WritePhyUshort(sc, 0x06, 0x8b89);
18413         MP_WritePhyUshort(sc, 0x06, 0x1e01);
18414         MP_WritePhyUshort(sc, 0x06, 0xe18b);
18415         MP_WritePhyUshort(sc, 0x06, 0x8a1e);
18416         MP_WritePhyUshort(sc, 0x06, 0x01e1);
18417         MP_WritePhyUshort(sc, 0x06, 0x8b8b);
18418         MP_WritePhyUshort(sc, 0x06, 0x1e01);
18419         MP_WritePhyUshort(sc, 0x06, 0xe18b);
18420         MP_WritePhyUshort(sc, 0x06, 0x8c1e);
18421         MP_WritePhyUshort(sc, 0x06, 0x01e1);
18422         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
18423         MP_WritePhyUshort(sc, 0x06, 0x1e01);
18424         MP_WritePhyUshort(sc, 0x06, 0xe18b);
18425         MP_WritePhyUshort(sc, 0x06, 0x8e1e);
18426         MP_WritePhyUshort(sc, 0x06, 0x01a0);
18427         MP_WritePhyUshort(sc, 0x06, 0x00c7);
18428         MP_WritePhyUshort(sc, 0x06, 0xaebb);
18429         MP_WritePhyUshort(sc, 0x06, 0xd484);
18430         MP_WritePhyUshort(sc, 0x06, 0x3ce4);
18431         MP_WritePhyUshort(sc, 0x06, 0x8b92);
18432         MP_WritePhyUshort(sc, 0x06, 0xe58b);
18433         MP_WritePhyUshort(sc, 0x06, 0x93ee);
18434         MP_WritePhyUshort(sc, 0x06, 0x8ac8);
18435         MP_WritePhyUshort(sc, 0x06, 0x03ee);
18436         MP_WritePhyUshort(sc, 0x06, 0x8aca);
18437         MP_WritePhyUshort(sc, 0x06, 0x60ee);
18438         MP_WritePhyUshort(sc, 0x06, 0x8ac0);
18439         MP_WritePhyUshort(sc, 0x06, 0x00ee);
18440         MP_WritePhyUshort(sc, 0x06, 0x8ac1);
18441         MP_WritePhyUshort(sc, 0x06, 0x00ee);
18442         MP_WritePhyUshort(sc, 0x06, 0x8abe);
18443         MP_WritePhyUshort(sc, 0x06, 0x07ee);
18444         MP_WritePhyUshort(sc, 0x06, 0x8abf);
18445         MP_WritePhyUshort(sc, 0x06, 0x73ee);
18446         MP_WritePhyUshort(sc, 0x06, 0x8a95);
18447         MP_WritePhyUshort(sc, 0x06, 0x02bf);
18448         MP_WritePhyUshort(sc, 0x06, 0x8b88);
18449         MP_WritePhyUshort(sc, 0x06, 0xec00);
18450         MP_WritePhyUshort(sc, 0x06, 0x19a9);
18451         MP_WritePhyUshort(sc, 0x06, 0x8b90);
18452         MP_WritePhyUshort(sc, 0x06, 0xf9ee);
18453         MP_WritePhyUshort(sc, 0x06, 0xfff6);
18454         MP_WritePhyUshort(sc, 0x06, 0x00ee);
18455         MP_WritePhyUshort(sc, 0x06, 0xfff7);
18456         MP_WritePhyUshort(sc, 0x06, 0xfed1);
18457         MP_WritePhyUshort(sc, 0x06, 0x00bf);
18458         MP_WritePhyUshort(sc, 0x06, 0x85a4);
18459         MP_WritePhyUshort(sc, 0x06, 0x0238);
18460         MP_WritePhyUshort(sc, 0x06, 0x7dd1);
18461         MP_WritePhyUshort(sc, 0x06, 0x01bf);
18462         MP_WritePhyUshort(sc, 0x06, 0x85a7);
18463         MP_WritePhyUshort(sc, 0x06, 0x0238);
18464         MP_WritePhyUshort(sc, 0x06, 0x7d04);
18465         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
18466         MP_WritePhyUshort(sc, 0x06, 0x8b8a);
18467         MP_WritePhyUshort(sc, 0x06, 0xad20);
18468         MP_WritePhyUshort(sc, 0x06, 0x14ee);
18469         MP_WritePhyUshort(sc, 0x06, 0x8b8a);
18470         MP_WritePhyUshort(sc, 0x06, 0x0002);
18471         MP_WritePhyUshort(sc, 0x06, 0x204b);
18472         MP_WritePhyUshort(sc, 0x06, 0xe0e4);
18473         MP_WritePhyUshort(sc, 0x06, 0x26e1);
18474         MP_WritePhyUshort(sc, 0x06, 0xe427);
18475         MP_WritePhyUshort(sc, 0x06, 0xeee4);
18476         MP_WritePhyUshort(sc, 0x06, 0x2623);
18477         MP_WritePhyUshort(sc, 0x06, 0xe5e4);
18478         MP_WritePhyUshort(sc, 0x06, 0x27fc);
18479         MP_WritePhyUshort(sc, 0x06, 0x04f8);
18480         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18481         MP_WritePhyUshort(sc, 0x06, 0x8dad);
18482         MP_WritePhyUshort(sc, 0x06, 0x2014);
18483         MP_WritePhyUshort(sc, 0x06, 0xee8b);
18484         MP_WritePhyUshort(sc, 0x06, 0x8d00);
18485         MP_WritePhyUshort(sc, 0x06, 0xe08a);
18486         MP_WritePhyUshort(sc, 0x06, 0x5a78);
18487         MP_WritePhyUshort(sc, 0x06, 0x039e);
18488         MP_WritePhyUshort(sc, 0x06, 0x0902);
18489         MP_WritePhyUshort(sc, 0x06, 0x05e8);
18490         MP_WritePhyUshort(sc, 0x06, 0x0281);
18491         MP_WritePhyUshort(sc, 0x06, 0x4f02);
18492         MP_WritePhyUshort(sc, 0x06, 0x326c);
18493         MP_WritePhyUshort(sc, 0x06, 0xfc04);
18494         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
18495         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
18496         MP_WritePhyUshort(sc, 0x06, 0xad20);
18497         MP_WritePhyUshort(sc, 0x06, 0x1df6);
18498         MP_WritePhyUshort(sc, 0x06, 0x20e4);
18499         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
18500         MP_WritePhyUshort(sc, 0x06, 0x022f);
18501         MP_WritePhyUshort(sc, 0x06, 0x0902);
18502         MP_WritePhyUshort(sc, 0x06, 0x2ab0);
18503         MP_WritePhyUshort(sc, 0x06, 0x0285);
18504         MP_WritePhyUshort(sc, 0x06, 0x1602);
18505         MP_WritePhyUshort(sc, 0x06, 0x03ba);
18506         MP_WritePhyUshort(sc, 0x06, 0x0284);
18507         MP_WritePhyUshort(sc, 0x06, 0xe502);
18508         MP_WritePhyUshort(sc, 0x06, 0x2df1);
18509         MP_WritePhyUshort(sc, 0x06, 0x0283);
18510         MP_WritePhyUshort(sc, 0x06, 0x8302);
18511         MP_WritePhyUshort(sc, 0x06, 0x0475);
18512         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18513         MP_WritePhyUshort(sc, 0x06, 0x8ead);
18514         MP_WritePhyUshort(sc, 0x06, 0x210b);
18515         MP_WritePhyUshort(sc, 0x06, 0xf621);
18516         MP_WritePhyUshort(sc, 0x06, 0xe48b);
18517         MP_WritePhyUshort(sc, 0x06, 0x8e02);
18518         MP_WritePhyUshort(sc, 0x06, 0x83f8);
18519         MP_WritePhyUshort(sc, 0x06, 0x021c);
18520         MP_WritePhyUshort(sc, 0x06, 0x99e0);
18521         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
18522         MP_WritePhyUshort(sc, 0x06, 0xad22);
18523         MP_WritePhyUshort(sc, 0x06, 0x08f6);
18524         MP_WritePhyUshort(sc, 0x06, 0x22e4);
18525         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
18526         MP_WritePhyUshort(sc, 0x06, 0x0235);
18527         MP_WritePhyUshort(sc, 0x06, 0x63e0);
18528         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
18529         MP_WritePhyUshort(sc, 0x06, 0xad23);
18530         MP_WritePhyUshort(sc, 0x06, 0x08f6);
18531         MP_WritePhyUshort(sc, 0x06, 0x23e4);
18532         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
18533         MP_WritePhyUshort(sc, 0x06, 0x0231);
18534         MP_WritePhyUshort(sc, 0x06, 0x57e0);
18535         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
18536         MP_WritePhyUshort(sc, 0x06, 0xad24);
18537         MP_WritePhyUshort(sc, 0x06, 0x05f6);
18538         MP_WritePhyUshort(sc, 0x06, 0x24e4);
18539         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
18540         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18541         MP_WritePhyUshort(sc, 0x06, 0x8ead);
18542         MP_WritePhyUshort(sc, 0x06, 0x2505);
18543         MP_WritePhyUshort(sc, 0x06, 0xf625);
18544         MP_WritePhyUshort(sc, 0x06, 0xe48b);
18545         MP_WritePhyUshort(sc, 0x06, 0x8ee0);
18546         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
18547         MP_WritePhyUshort(sc, 0x06, 0xad26);
18548         MP_WritePhyUshort(sc, 0x06, 0x08f6);
18549         MP_WritePhyUshort(sc, 0x06, 0x26e4);
18550         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
18551         MP_WritePhyUshort(sc, 0x06, 0x022d);
18552         MP_WritePhyUshort(sc, 0x06, 0x1ce0);
18553         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
18554         MP_WritePhyUshort(sc, 0x06, 0xad27);
18555         MP_WritePhyUshort(sc, 0x06, 0x05f6);
18556         MP_WritePhyUshort(sc, 0x06, 0x27e4);
18557         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
18558         MP_WritePhyUshort(sc, 0x06, 0x0203);
18559         MP_WritePhyUshort(sc, 0x06, 0x80fc);
18560         MP_WritePhyUshort(sc, 0x06, 0x04f8);
18561         MP_WritePhyUshort(sc, 0x06, 0xf9e0);
18562         MP_WritePhyUshort(sc, 0x06, 0x8b81);
18563         MP_WritePhyUshort(sc, 0x06, 0xac26);
18564         MP_WritePhyUshort(sc, 0x06, 0x1ae0);
18565         MP_WritePhyUshort(sc, 0x06, 0x8b81);
18566         MP_WritePhyUshort(sc, 0x06, 0xac21);
18567         MP_WritePhyUshort(sc, 0x06, 0x14e0);
18568         MP_WritePhyUshort(sc, 0x06, 0x8b85);
18569         MP_WritePhyUshort(sc, 0x06, 0xac20);
18570         MP_WritePhyUshort(sc, 0x06, 0x0ee0);
18571         MP_WritePhyUshort(sc, 0x06, 0x8b85);
18572         MP_WritePhyUshort(sc, 0x06, 0xac23);
18573         MP_WritePhyUshort(sc, 0x06, 0x08e0);
18574         MP_WritePhyUshort(sc, 0x06, 0x8b87);
18575         MP_WritePhyUshort(sc, 0x06, 0xac24);
18576         MP_WritePhyUshort(sc, 0x06, 0x02ae);
18577         MP_WritePhyUshort(sc, 0x06, 0x3802);
18578         MP_WritePhyUshort(sc, 0x06, 0x1ac2);
18579         MP_WritePhyUshort(sc, 0x06, 0xeee4);
18580         MP_WritePhyUshort(sc, 0x06, 0x1c04);
18581         MP_WritePhyUshort(sc, 0x06, 0xeee4);
18582         MP_WritePhyUshort(sc, 0x06, 0x1d04);
18583         MP_WritePhyUshort(sc, 0x06, 0xe2e0);
18584         MP_WritePhyUshort(sc, 0x06, 0x7ce3);
18585         MP_WritePhyUshort(sc, 0x06, 0xe07d);
18586         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
18587         MP_WritePhyUshort(sc, 0x06, 0x38e1);
18588         MP_WritePhyUshort(sc, 0x06, 0xe039);
18589         MP_WritePhyUshort(sc, 0x06, 0xad2e);
18590         MP_WritePhyUshort(sc, 0x06, 0x1bad);
18591         MP_WritePhyUshort(sc, 0x06, 0x390d);
18592         MP_WritePhyUshort(sc, 0x06, 0xd101);
18593         MP_WritePhyUshort(sc, 0x06, 0xbf22);
18594         MP_WritePhyUshort(sc, 0x06, 0x7a02);
18595         MP_WritePhyUshort(sc, 0x06, 0x387d);
18596         MP_WritePhyUshort(sc, 0x06, 0x0281);
18597         MP_WritePhyUshort(sc, 0x06, 0xacae);
18598         MP_WritePhyUshort(sc, 0x06, 0x0bac);
18599         MP_WritePhyUshort(sc, 0x06, 0x3802);
18600         MP_WritePhyUshort(sc, 0x06, 0xae06);
18601         MP_WritePhyUshort(sc, 0x06, 0x0281);
18602         MP_WritePhyUshort(sc, 0x06, 0xe902);
18603         MP_WritePhyUshort(sc, 0x06, 0x822e);
18604         MP_WritePhyUshort(sc, 0x06, 0x021a);
18605         MP_WritePhyUshort(sc, 0x06, 0xd3fd);
18606         MP_WritePhyUshort(sc, 0x06, 0xfc04);
18607         MP_WritePhyUshort(sc, 0x06, 0xf8e1);
18608         MP_WritePhyUshort(sc, 0x06, 0x8af4);
18609         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18610         MP_WritePhyUshort(sc, 0x06, 0x81ad);
18611         MP_WritePhyUshort(sc, 0x06, 0x2602);
18612         MP_WritePhyUshort(sc, 0x06, 0xf728);
18613         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18614         MP_WritePhyUshort(sc, 0x06, 0x81ad);
18615         MP_WritePhyUshort(sc, 0x06, 0x2105);
18616         MP_WritePhyUshort(sc, 0x06, 0x0222);
18617         MP_WritePhyUshort(sc, 0x06, 0x8ef7);
18618         MP_WritePhyUshort(sc, 0x06, 0x29e0);
18619         MP_WritePhyUshort(sc, 0x06, 0x8b85);
18620         MP_WritePhyUshort(sc, 0x06, 0xad20);
18621         MP_WritePhyUshort(sc, 0x06, 0x0502);
18622         MP_WritePhyUshort(sc, 0x06, 0x14b8);
18623         MP_WritePhyUshort(sc, 0x06, 0xf72a);
18624         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18625         MP_WritePhyUshort(sc, 0x06, 0x85ad);
18626         MP_WritePhyUshort(sc, 0x06, 0x2305);
18627         MP_WritePhyUshort(sc, 0x06, 0x0212);
18628         MP_WritePhyUshort(sc, 0x06, 0xf4f7);
18629         MP_WritePhyUshort(sc, 0x06, 0x2be0);
18630         MP_WritePhyUshort(sc, 0x06, 0x8b87);
18631         MP_WritePhyUshort(sc, 0x06, 0xad24);
18632         MP_WritePhyUshort(sc, 0x06, 0x0502);
18633         MP_WritePhyUshort(sc, 0x06, 0x8284);
18634         MP_WritePhyUshort(sc, 0x06, 0xf72c);
18635         MP_WritePhyUshort(sc, 0x06, 0xe58a);
18636         MP_WritePhyUshort(sc, 0x06, 0xf4fc);
18637         MP_WritePhyUshort(sc, 0x06, 0x04f8);
18638         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18639         MP_WritePhyUshort(sc, 0x06, 0x81ad);
18640         MP_WritePhyUshort(sc, 0x06, 0x2600);
18641         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18642         MP_WritePhyUshort(sc, 0x06, 0x81ad);
18643         MP_WritePhyUshort(sc, 0x06, 0x2109);
18644         MP_WritePhyUshort(sc, 0x06, 0xe08a);
18645         MP_WritePhyUshort(sc, 0x06, 0xf4ac);
18646         MP_WritePhyUshort(sc, 0x06, 0x2003);
18647         MP_WritePhyUshort(sc, 0x06, 0x0222);
18648         MP_WritePhyUshort(sc, 0x06, 0x7de0);
18649         MP_WritePhyUshort(sc, 0x06, 0x8b85);
18650         MP_WritePhyUshort(sc, 0x06, 0xad20);
18651         MP_WritePhyUshort(sc, 0x06, 0x09e0);
18652         MP_WritePhyUshort(sc, 0x06, 0x8af4);
18653         MP_WritePhyUshort(sc, 0x06, 0xac21);
18654         MP_WritePhyUshort(sc, 0x06, 0x0302);
18655         MP_WritePhyUshort(sc, 0x06, 0x1408);
18656         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18657         MP_WritePhyUshort(sc, 0x06, 0x85ad);
18658         MP_WritePhyUshort(sc, 0x06, 0x2309);
18659         MP_WritePhyUshort(sc, 0x06, 0xe08a);
18660         MP_WritePhyUshort(sc, 0x06, 0xf4ac);
18661         MP_WritePhyUshort(sc, 0x06, 0x2203);
18662         MP_WritePhyUshort(sc, 0x06, 0x0213);
18663         MP_WritePhyUshort(sc, 0x06, 0x07e0);
18664         MP_WritePhyUshort(sc, 0x06, 0x8b87);
18665         MP_WritePhyUshort(sc, 0x06, 0xad24);
18666         MP_WritePhyUshort(sc, 0x06, 0x09e0);
18667         MP_WritePhyUshort(sc, 0x06, 0x8af4);
18668         MP_WritePhyUshort(sc, 0x06, 0xac23);
18669         MP_WritePhyUshort(sc, 0x06, 0x0302);
18670         MP_WritePhyUshort(sc, 0x06, 0x8289);
18671         MP_WritePhyUshort(sc, 0x06, 0xfc04);
18672         MP_WritePhyUshort(sc, 0x06, 0xf8e1);
18673         MP_WritePhyUshort(sc, 0x06, 0x8af4);
18674         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18675         MP_WritePhyUshort(sc, 0x06, 0x81ad);
18676         MP_WritePhyUshort(sc, 0x06, 0x2602);
18677         MP_WritePhyUshort(sc, 0x06, 0xf628);
18678         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18679         MP_WritePhyUshort(sc, 0x06, 0x81ad);
18680         MP_WritePhyUshort(sc, 0x06, 0x210a);
18681         MP_WritePhyUshort(sc, 0x06, 0xe083);
18682         MP_WritePhyUshort(sc, 0x06, 0xecf6);
18683         MP_WritePhyUshort(sc, 0x06, 0x27a0);
18684         MP_WritePhyUshort(sc, 0x06, 0x0502);
18685         MP_WritePhyUshort(sc, 0x06, 0xf629);
18686         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18687         MP_WritePhyUshort(sc, 0x06, 0x85ad);
18688         MP_WritePhyUshort(sc, 0x06, 0x2008);
18689         MP_WritePhyUshort(sc, 0x06, 0xe08a);
18690         MP_WritePhyUshort(sc, 0x06, 0xe8ad);
18691         MP_WritePhyUshort(sc, 0x06, 0x2102);
18692         MP_WritePhyUshort(sc, 0x06, 0xf62a);
18693         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18694         MP_WritePhyUshort(sc, 0x06, 0x85ad);
18695         MP_WritePhyUshort(sc, 0x06, 0x2308);
18696         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18697         MP_WritePhyUshort(sc, 0x06, 0x20a0);
18698         MP_WritePhyUshort(sc, 0x06, 0x0302);
18699         MP_WritePhyUshort(sc, 0x06, 0xf62b);
18700         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18701         MP_WritePhyUshort(sc, 0x06, 0x87ad);
18702         MP_WritePhyUshort(sc, 0x06, 0x2408);
18703         MP_WritePhyUshort(sc, 0x06, 0xe08a);
18704         MP_WritePhyUshort(sc, 0x06, 0xc2a0);
18705         MP_WritePhyUshort(sc, 0x06, 0x0302);
18706         MP_WritePhyUshort(sc, 0x06, 0xf62c);
18707         MP_WritePhyUshort(sc, 0x06, 0xe58a);
18708         MP_WritePhyUshort(sc, 0x06, 0xf4a1);
18709         MP_WritePhyUshort(sc, 0x06, 0x0008);
18710         MP_WritePhyUshort(sc, 0x06, 0xd100);
18711         MP_WritePhyUshort(sc, 0x06, 0xbf22);
18712         MP_WritePhyUshort(sc, 0x06, 0x7a02);
18713         MP_WritePhyUshort(sc, 0x06, 0x387d);
18714         MP_WritePhyUshort(sc, 0x06, 0xfc04);
18715         MP_WritePhyUshort(sc, 0x06, 0xee8a);
18716         MP_WritePhyUshort(sc, 0x06, 0xc200);
18717         MP_WritePhyUshort(sc, 0x06, 0x04f8);
18718         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18719         MP_WritePhyUshort(sc, 0x06, 0x87ad);
18720         MP_WritePhyUshort(sc, 0x06, 0x241e);
18721         MP_WritePhyUshort(sc, 0x06, 0xe08a);
18722         MP_WritePhyUshort(sc, 0x06, 0xc2a0);
18723         MP_WritePhyUshort(sc, 0x06, 0x0005);
18724         MP_WritePhyUshort(sc, 0x06, 0x0282);
18725         MP_WritePhyUshort(sc, 0x06, 0xb0ae);
18726         MP_WritePhyUshort(sc, 0x06, 0xf5a0);
18727         MP_WritePhyUshort(sc, 0x06, 0x0105);
18728         MP_WritePhyUshort(sc, 0x06, 0x0282);
18729         MP_WritePhyUshort(sc, 0x06, 0xc0ae);
18730         MP_WritePhyUshort(sc, 0x06, 0x0ba0);
18731         MP_WritePhyUshort(sc, 0x06, 0x0205);
18732         MP_WritePhyUshort(sc, 0x06, 0x0282);
18733         MP_WritePhyUshort(sc, 0x06, 0xcaae);
18734         MP_WritePhyUshort(sc, 0x06, 0x03a0);
18735         MP_WritePhyUshort(sc, 0x06, 0x0300);
18736         MP_WritePhyUshort(sc, 0x06, 0xfc04);
18737         MP_WritePhyUshort(sc, 0x06, 0xf8fa);
18738         MP_WritePhyUshort(sc, 0x06, 0xef69);
18739         MP_WritePhyUshort(sc, 0x06, 0x0282);
18740         MP_WritePhyUshort(sc, 0x06, 0xe1ee);
18741         MP_WritePhyUshort(sc, 0x06, 0x8ac2);
18742         MP_WritePhyUshort(sc, 0x06, 0x01ef);
18743         MP_WritePhyUshort(sc, 0x06, 0x96fe);
18744         MP_WritePhyUshort(sc, 0x06, 0xfc04);
18745         MP_WritePhyUshort(sc, 0x06, 0xf8ee);
18746         MP_WritePhyUshort(sc, 0x06, 0x8ac9);
18747         MP_WritePhyUshort(sc, 0x06, 0x0002);
18748         MP_WritePhyUshort(sc, 0x06, 0x8317);
18749         MP_WritePhyUshort(sc, 0x06, 0xfc04);
18750         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
18751         MP_WritePhyUshort(sc, 0x06, 0x8ac8);
18752         MP_WritePhyUshort(sc, 0x06, 0xe18a);
18753         MP_WritePhyUshort(sc, 0x06, 0xc91f);
18754         MP_WritePhyUshort(sc, 0x06, 0x019e);
18755         MP_WritePhyUshort(sc, 0x06, 0x0611);
18756         MP_WritePhyUshort(sc, 0x06, 0xe58a);
18757         MP_WritePhyUshort(sc, 0x06, 0xc9ae);
18758         MP_WritePhyUshort(sc, 0x06, 0x04ee);
18759         MP_WritePhyUshort(sc, 0x06, 0x8ac2);
18760         MP_WritePhyUshort(sc, 0x06, 0x01fc);
18761         MP_WritePhyUshort(sc, 0x06, 0x04f8);
18762         MP_WritePhyUshort(sc, 0x06, 0xf9fa);
18763         MP_WritePhyUshort(sc, 0x06, 0xef69);
18764         MP_WritePhyUshort(sc, 0x06, 0xfbbf);
18765         MP_WritePhyUshort(sc, 0x06, 0x8ac4);
18766         MP_WritePhyUshort(sc, 0x06, 0xef79);
18767         MP_WritePhyUshort(sc, 0x06, 0xd200);
18768         MP_WritePhyUshort(sc, 0x06, 0xd400);
18769         MP_WritePhyUshort(sc, 0x06, 0x221e);
18770         MP_WritePhyUshort(sc, 0x06, 0x02bf);
18771         MP_WritePhyUshort(sc, 0x06, 0x3024);
18772         MP_WritePhyUshort(sc, 0x06, 0x0238);
18773         MP_WritePhyUshort(sc, 0x06, 0x7dbf);
18774         MP_WritePhyUshort(sc, 0x06, 0x13ff);
18775         MP_WritePhyUshort(sc, 0x06, 0x0238);
18776         MP_WritePhyUshort(sc, 0x06, 0x500d);
18777         MP_WritePhyUshort(sc, 0x06, 0x4559);
18778         MP_WritePhyUshort(sc, 0x06, 0x1fef);
18779         MP_WritePhyUshort(sc, 0x06, 0x97dd);
18780         MP_WritePhyUshort(sc, 0x06, 0xd308);
18781         MP_WritePhyUshort(sc, 0x06, 0x1a93);
18782         MP_WritePhyUshort(sc, 0x06, 0xdd12);
18783         MP_WritePhyUshort(sc, 0x06, 0x17a2);
18784         MP_WritePhyUshort(sc, 0x06, 0x04de);
18785         MP_WritePhyUshort(sc, 0x06, 0xffef);
18786         MP_WritePhyUshort(sc, 0x06, 0x96fe);
18787         MP_WritePhyUshort(sc, 0x06, 0xfdfc);
18788         MP_WritePhyUshort(sc, 0x06, 0x04f8);
18789         MP_WritePhyUshort(sc, 0x06, 0xf9fa);
18790         MP_WritePhyUshort(sc, 0x06, 0xef69);
18791         MP_WritePhyUshort(sc, 0x06, 0xfbee);
18792         MP_WritePhyUshort(sc, 0x06, 0x8ac2);
18793         MP_WritePhyUshort(sc, 0x06, 0x03d5);
18794         MP_WritePhyUshort(sc, 0x06, 0x0080);
18795         MP_WritePhyUshort(sc, 0x06, 0xbf8a);
18796         MP_WritePhyUshort(sc, 0x06, 0xc4ef);
18797         MP_WritePhyUshort(sc, 0x06, 0x79ef);
18798         MP_WritePhyUshort(sc, 0x06, 0x45bf);
18799         MP_WritePhyUshort(sc, 0x06, 0x3024);
18800         MP_WritePhyUshort(sc, 0x06, 0x0238);
18801         MP_WritePhyUshort(sc, 0x06, 0x7dbf);
18802         MP_WritePhyUshort(sc, 0x06, 0x13ff);
18803         MP_WritePhyUshort(sc, 0x06, 0x0238);
18804         MP_WritePhyUshort(sc, 0x06, 0x50ad);
18805         MP_WritePhyUshort(sc, 0x06, 0x2702);
18806         MP_WritePhyUshort(sc, 0x06, 0x78ff);
18807         MP_WritePhyUshort(sc, 0x06, 0xe18a);
18808         MP_WritePhyUshort(sc, 0x06, 0xca1b);
18809         MP_WritePhyUshort(sc, 0x06, 0x01aa);
18810         MP_WritePhyUshort(sc, 0x06, 0x2eef);
18811         MP_WritePhyUshort(sc, 0x06, 0x97d9);
18812         MP_WritePhyUshort(sc, 0x06, 0x7900);
18813         MP_WritePhyUshort(sc, 0x06, 0x9e2b);
18814         MP_WritePhyUshort(sc, 0x06, 0x81dd);
18815         MP_WritePhyUshort(sc, 0x06, 0xbf85);
18816         MP_WritePhyUshort(sc, 0x06, 0xad02);
18817         MP_WritePhyUshort(sc, 0x06, 0x387d);
18818         MP_WritePhyUshort(sc, 0x06, 0xd101);
18819         MP_WritePhyUshort(sc, 0x06, 0xef02);
18820         MP_WritePhyUshort(sc, 0x06, 0x100c);
18821         MP_WritePhyUshort(sc, 0x06, 0x11b0);
18822         MP_WritePhyUshort(sc, 0x06, 0xfc0d);
18823         MP_WritePhyUshort(sc, 0x06, 0x11bf);
18824         MP_WritePhyUshort(sc, 0x06, 0x85aa);
18825         MP_WritePhyUshort(sc, 0x06, 0x0238);
18826         MP_WritePhyUshort(sc, 0x06, 0x7dd1);
18827         MP_WritePhyUshort(sc, 0x06, 0x00bf);
18828         MP_WritePhyUshort(sc, 0x06, 0x85aa);
18829         MP_WritePhyUshort(sc, 0x06, 0x0238);
18830         MP_WritePhyUshort(sc, 0x06, 0x7dee);
18831         MP_WritePhyUshort(sc, 0x06, 0x8ac2);
18832         MP_WritePhyUshort(sc, 0x06, 0x02ae);
18833         MP_WritePhyUshort(sc, 0x06, 0x0413);
18834         MP_WritePhyUshort(sc, 0x06, 0xa38b);
18835         MP_WritePhyUshort(sc, 0x06, 0xb4d3);
18836         MP_WritePhyUshort(sc, 0x06, 0x8012);
18837         MP_WritePhyUshort(sc, 0x06, 0x17a2);
18838         MP_WritePhyUshort(sc, 0x06, 0x04ad);
18839         MP_WritePhyUshort(sc, 0x06, 0xffef);
18840         MP_WritePhyUshort(sc, 0x06, 0x96fe);
18841         MP_WritePhyUshort(sc, 0x06, 0xfdfc);
18842         MP_WritePhyUshort(sc, 0x06, 0x04f8);
18843         MP_WritePhyUshort(sc, 0x06, 0xf9e0);
18844         MP_WritePhyUshort(sc, 0x06, 0x8b85);
18845         MP_WritePhyUshort(sc, 0x06, 0xad25);
18846         MP_WritePhyUshort(sc, 0x06, 0x48e0);
18847         MP_WritePhyUshort(sc, 0x06, 0x8a96);
18848         MP_WritePhyUshort(sc, 0x06, 0xe18a);
18849         MP_WritePhyUshort(sc, 0x06, 0x977c);
18850         MP_WritePhyUshort(sc, 0x06, 0x0000);
18851         MP_WritePhyUshort(sc, 0x06, 0x9e35);
18852         MP_WritePhyUshort(sc, 0x06, 0xee8a);
18853         MP_WritePhyUshort(sc, 0x06, 0x9600);
18854         MP_WritePhyUshort(sc, 0x06, 0xee8a);
18855         MP_WritePhyUshort(sc, 0x06, 0x9700);
18856         MP_WritePhyUshort(sc, 0x06, 0xe08a);
18857         MP_WritePhyUshort(sc, 0x06, 0xbee1);
18858         MP_WritePhyUshort(sc, 0x06, 0x8abf);
18859         MP_WritePhyUshort(sc, 0x06, 0xe28a);
18860         MP_WritePhyUshort(sc, 0x06, 0xc0e3);
18861         MP_WritePhyUshort(sc, 0x06, 0x8ac1);
18862         MP_WritePhyUshort(sc, 0x06, 0x0237);
18863         MP_WritePhyUshort(sc, 0x06, 0x74ad);
18864         MP_WritePhyUshort(sc, 0x06, 0x2012);
18865         MP_WritePhyUshort(sc, 0x06, 0xee8a);
18866         MP_WritePhyUshort(sc, 0x06, 0x9603);
18867         MP_WritePhyUshort(sc, 0x06, 0xee8a);
18868         MP_WritePhyUshort(sc, 0x06, 0x97b7);
18869         MP_WritePhyUshort(sc, 0x06, 0xee8a);
18870         MP_WritePhyUshort(sc, 0x06, 0xc000);
18871         MP_WritePhyUshort(sc, 0x06, 0xee8a);
18872         MP_WritePhyUshort(sc, 0x06, 0xc100);
18873         MP_WritePhyUshort(sc, 0x06, 0xae11);
18874         MP_WritePhyUshort(sc, 0x06, 0x15e6);
18875         MP_WritePhyUshort(sc, 0x06, 0x8ac0);
18876         MP_WritePhyUshort(sc, 0x06, 0xe78a);
18877         MP_WritePhyUshort(sc, 0x06, 0xc1ae);
18878         MP_WritePhyUshort(sc, 0x06, 0x08ee);
18879         MP_WritePhyUshort(sc, 0x06, 0x8ac0);
18880         MP_WritePhyUshort(sc, 0x06, 0x00ee);
18881         MP_WritePhyUshort(sc, 0x06, 0x8ac1);
18882         MP_WritePhyUshort(sc, 0x06, 0x00fd);
18883         MP_WritePhyUshort(sc, 0x06, 0xfc04);
18884         MP_WritePhyUshort(sc, 0x06, 0xae20);
18885         MP_WritePhyUshort(sc, 0x06, 0x0000);
18886         MP_WritePhyUshort(sc, 0x06, 0x0000);
18887         MP_WritePhyUshort(sc, 0x06, 0x0000);
18888         MP_WritePhyUshort(sc, 0x06, 0x0000);
18889         MP_WritePhyUshort(sc, 0x06, 0x0000);
18890         MP_WritePhyUshort(sc, 0x06, 0x0000);
18891         MP_WritePhyUshort(sc, 0x06, 0x0000);
18892         MP_WritePhyUshort(sc, 0x06, 0x0000);
18893         MP_WritePhyUshort(sc, 0x06, 0x0000);
18894         MP_WritePhyUshort(sc, 0x06, 0x0000);
18895         MP_WritePhyUshort(sc, 0x06, 0x0000);
18896         MP_WritePhyUshort(sc, 0x06, 0x0000);
18897         MP_WritePhyUshort(sc, 0x06, 0x0000);
18898         MP_WritePhyUshort(sc, 0x06, 0x0000);
18899         MP_WritePhyUshort(sc, 0x06, 0x0000);
18900         MP_WritePhyUshort(sc, 0x06, 0x0000);
18901         MP_WritePhyUshort(sc, 0x06, 0xf8fa);
18902         MP_WritePhyUshort(sc, 0x06, 0xef69);
18903         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
18904         MP_WritePhyUshort(sc, 0x06, 0x00e1);
18905         MP_WritePhyUshort(sc, 0x06, 0xe001);
18906         MP_WritePhyUshort(sc, 0x06, 0xad27);
18907         MP_WritePhyUshort(sc, 0x06, 0x32e0);
18908         MP_WritePhyUshort(sc, 0x06, 0x8b40);
18909         MP_WritePhyUshort(sc, 0x06, 0xf720);
18910         MP_WritePhyUshort(sc, 0x06, 0xe48b);
18911         MP_WritePhyUshort(sc, 0x06, 0x40bf);
18912         MP_WritePhyUshort(sc, 0x06, 0x3230);
18913         MP_WritePhyUshort(sc, 0x06, 0x0238);
18914         MP_WritePhyUshort(sc, 0x06, 0x50ad);
18915         MP_WritePhyUshort(sc, 0x06, 0x2821);
18916         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
18917         MP_WritePhyUshort(sc, 0x06, 0x20e1);
18918         MP_WritePhyUshort(sc, 0x06, 0xe021);
18919         MP_WritePhyUshort(sc, 0x06, 0xad20);
18920         MP_WritePhyUshort(sc, 0x06, 0x18e0);
18921         MP_WritePhyUshort(sc, 0x06, 0x8b40);
18922         MP_WritePhyUshort(sc, 0x06, 0xf620);
18923         MP_WritePhyUshort(sc, 0x06, 0xe48b);
18924         MP_WritePhyUshort(sc, 0x06, 0x40ee);
18925         MP_WritePhyUshort(sc, 0x06, 0x8b3b);
18926         MP_WritePhyUshort(sc, 0x06, 0xffe0);
18927         MP_WritePhyUshort(sc, 0x06, 0x8a8a);
18928         MP_WritePhyUshort(sc, 0x06, 0xe18a);
18929         MP_WritePhyUshort(sc, 0x06, 0x8be4);
18930         MP_WritePhyUshort(sc, 0x06, 0xe000);
18931         MP_WritePhyUshort(sc, 0x06, 0xe5e0);
18932         MP_WritePhyUshort(sc, 0x06, 0x01ef);
18933         MP_WritePhyUshort(sc, 0x06, 0x96fe);
18934         MP_WritePhyUshort(sc, 0x06, 0xfc04);
18935         MP_WritePhyUshort(sc, 0x06, 0xf8f9);
18936         MP_WritePhyUshort(sc, 0x06, 0xface);
18937         MP_WritePhyUshort(sc, 0x06, 0xfaef);
18938         MP_WritePhyUshort(sc, 0x06, 0x69fa);
18939         MP_WritePhyUshort(sc, 0x06, 0xd401);
18940         MP_WritePhyUshort(sc, 0x06, 0x55b4);
18941         MP_WritePhyUshort(sc, 0x06, 0xfebf);
18942         MP_WritePhyUshort(sc, 0x06, 0x1c1e);
18943         MP_WritePhyUshort(sc, 0x06, 0x0238);
18944         MP_WritePhyUshort(sc, 0x06, 0x50ac);
18945         MP_WritePhyUshort(sc, 0x06, 0x280b);
18946         MP_WritePhyUshort(sc, 0x06, 0xbf1c);
18947         MP_WritePhyUshort(sc, 0x06, 0x1b02);
18948         MP_WritePhyUshort(sc, 0x06, 0x3850);
18949         MP_WritePhyUshort(sc, 0x06, 0xac28);
18950         MP_WritePhyUshort(sc, 0x06, 0x49ae);
18951         MP_WritePhyUshort(sc, 0x06, 0x64bf);
18952         MP_WritePhyUshort(sc, 0x06, 0x1c1b);
18953         MP_WritePhyUshort(sc, 0x06, 0x0238);
18954         MP_WritePhyUshort(sc, 0x06, 0x50ac);
18955         MP_WritePhyUshort(sc, 0x06, 0x285b);
18956         MP_WritePhyUshort(sc, 0x06, 0xd000);
18957         MP_WritePhyUshort(sc, 0x06, 0x0284);
18958         MP_WritePhyUshort(sc, 0x06, 0xcaac);
18959         MP_WritePhyUshort(sc, 0x06, 0x2105);
18960         MP_WritePhyUshort(sc, 0x06, 0xac22);
18961         MP_WritePhyUshort(sc, 0x06, 0x02ae);
18962         MP_WritePhyUshort(sc, 0x06, 0x4ebf);
18963         MP_WritePhyUshort(sc, 0x06, 0xe0c4);
18964         MP_WritePhyUshort(sc, 0x06, 0xbe85);
18965         MP_WritePhyUshort(sc, 0x06, 0xf6d2);
18966         MP_WritePhyUshort(sc, 0x06, 0x04d8);
18967         MP_WritePhyUshort(sc, 0x06, 0x19d9);
18968         MP_WritePhyUshort(sc, 0x06, 0x1907);
18969         MP_WritePhyUshort(sc, 0x06, 0xdc19);
18970         MP_WritePhyUshort(sc, 0x06, 0xdd19);
18971         MP_WritePhyUshort(sc, 0x06, 0x0789);
18972         MP_WritePhyUshort(sc, 0x06, 0x89ef);
18973         MP_WritePhyUshort(sc, 0x06, 0x645e);
18974         MP_WritePhyUshort(sc, 0x06, 0x07ff);
18975         MP_WritePhyUshort(sc, 0x06, 0x0d65);
18976         MP_WritePhyUshort(sc, 0x06, 0x5cf8);
18977         MP_WritePhyUshort(sc, 0x06, 0x001e);
18978         MP_WritePhyUshort(sc, 0x06, 0x46dc);
18979         MP_WritePhyUshort(sc, 0x06, 0x19dd);
18980         MP_WritePhyUshort(sc, 0x06, 0x19b2);
18981         MP_WritePhyUshort(sc, 0x06, 0xe2d4);
18982         MP_WritePhyUshort(sc, 0x06, 0x0001);
18983         MP_WritePhyUshort(sc, 0x06, 0xbf1c);
18984         MP_WritePhyUshort(sc, 0x06, 0x1b02);
18985         MP_WritePhyUshort(sc, 0x06, 0x387d);
18986         MP_WritePhyUshort(sc, 0x06, 0xae1d);
18987         MP_WritePhyUshort(sc, 0x06, 0xbee0);
18988         MP_WritePhyUshort(sc, 0x06, 0xc4bf);
18989         MP_WritePhyUshort(sc, 0x06, 0x85f6);
18990         MP_WritePhyUshort(sc, 0x06, 0xd204);
18991         MP_WritePhyUshort(sc, 0x06, 0xd819);
18992         MP_WritePhyUshort(sc, 0x06, 0xd919);
18993         MP_WritePhyUshort(sc, 0x06, 0x07dc);
18994         MP_WritePhyUshort(sc, 0x06, 0x19dd);
18995         MP_WritePhyUshort(sc, 0x06, 0x1907);
18996         MP_WritePhyUshort(sc, 0x06, 0xb2f4);
18997         MP_WritePhyUshort(sc, 0x06, 0xd400);
18998         MP_WritePhyUshort(sc, 0x06, 0x00bf);
18999         MP_WritePhyUshort(sc, 0x06, 0x1c1b);
19000         MP_WritePhyUshort(sc, 0x06, 0x0238);
19001         MP_WritePhyUshort(sc, 0x06, 0x7dfe);
19002         MP_WritePhyUshort(sc, 0x06, 0xef96);
19003         MP_WritePhyUshort(sc, 0x06, 0xfec6);
19004         MP_WritePhyUshort(sc, 0x06, 0xfefd);
19005         MP_WritePhyUshort(sc, 0x06, 0xfc05);
19006         MP_WritePhyUshort(sc, 0x06, 0xf9e2);
19007         MP_WritePhyUshort(sc, 0x06, 0xe0ea);
19008         MP_WritePhyUshort(sc, 0x06, 0xe3e0);
19009         MP_WritePhyUshort(sc, 0x06, 0xeb5a);
19010         MP_WritePhyUshort(sc, 0x06, 0x070c);
19011         MP_WritePhyUshort(sc, 0x06, 0x031e);
19012         MP_WritePhyUshort(sc, 0x06, 0x20e6);
19013         MP_WritePhyUshort(sc, 0x06, 0xe0ea);
19014         MP_WritePhyUshort(sc, 0x06, 0xe7e0);
19015         MP_WritePhyUshort(sc, 0x06, 0xebe0);
19016         MP_WritePhyUshort(sc, 0x06, 0xe0fc);
19017         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
19018         MP_WritePhyUshort(sc, 0x06, 0xfdfd);
19019         MP_WritePhyUshort(sc, 0x06, 0x04f8);
19020         MP_WritePhyUshort(sc, 0x06, 0xfaef);
19021         MP_WritePhyUshort(sc, 0x06, 0x69e0);
19022         MP_WritePhyUshort(sc, 0x06, 0x8b80);
19023         MP_WritePhyUshort(sc, 0x06, 0xad27);
19024         MP_WritePhyUshort(sc, 0x06, 0x22bf);
19025         MP_WritePhyUshort(sc, 0x06, 0x4616);
19026         MP_WritePhyUshort(sc, 0x06, 0x0238);
19027         MP_WritePhyUshort(sc, 0x06, 0x50e0);
19028         MP_WritePhyUshort(sc, 0x06, 0x8b44);
19029         MP_WritePhyUshort(sc, 0x06, 0x1f01);
19030         MP_WritePhyUshort(sc, 0x06, 0x9e15);
19031         MP_WritePhyUshort(sc, 0x06, 0xe58b);
19032         MP_WritePhyUshort(sc, 0x06, 0x44ad);
19033         MP_WritePhyUshort(sc, 0x06, 0x2907);
19034         MP_WritePhyUshort(sc, 0x06, 0xac28);
19035         MP_WritePhyUshort(sc, 0x06, 0x04d1);
19036         MP_WritePhyUshort(sc, 0x06, 0x01ae);
19037         MP_WritePhyUshort(sc, 0x06, 0x02d1);
19038         MP_WritePhyUshort(sc, 0x06, 0x00bf);
19039         MP_WritePhyUshort(sc, 0x06, 0x85b0);
19040         MP_WritePhyUshort(sc, 0x06, 0x0238);
19041         MP_WritePhyUshort(sc, 0x06, 0x7def);
19042         MP_WritePhyUshort(sc, 0x06, 0x96fe);
19043         MP_WritePhyUshort(sc, 0x06, 0xfc04);
19044         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
19045         MP_WritePhyUshort(sc, 0x06, 0x8b85);
19046         MP_WritePhyUshort(sc, 0x06, 0xad26);
19047         MP_WritePhyUshort(sc, 0x06, 0x30e0);
19048         MP_WritePhyUshort(sc, 0x06, 0xe036);
19049         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
19050         MP_WritePhyUshort(sc, 0x06, 0x37e1);
19051         MP_WritePhyUshort(sc, 0x06, 0x8b3f);
19052         MP_WritePhyUshort(sc, 0x06, 0x1f10);
19053         MP_WritePhyUshort(sc, 0x06, 0x9e23);
19054         MP_WritePhyUshort(sc, 0x06, 0xe48b);
19055         MP_WritePhyUshort(sc, 0x06, 0x3fac);
19056         MP_WritePhyUshort(sc, 0x06, 0x200b);
19057         MP_WritePhyUshort(sc, 0x06, 0xac21);
19058         MP_WritePhyUshort(sc, 0x06, 0x0dac);
19059         MP_WritePhyUshort(sc, 0x06, 0x250f);
19060         MP_WritePhyUshort(sc, 0x06, 0xac27);
19061         MP_WritePhyUshort(sc, 0x06, 0x11ae);
19062         MP_WritePhyUshort(sc, 0x06, 0x1202);
19063         MP_WritePhyUshort(sc, 0x06, 0x2c47);
19064         MP_WritePhyUshort(sc, 0x06, 0xae0d);
19065         MP_WritePhyUshort(sc, 0x06, 0x0285);
19066         MP_WritePhyUshort(sc, 0x06, 0x4fae);
19067         MP_WritePhyUshort(sc, 0x06, 0x0802);
19068         MP_WritePhyUshort(sc, 0x06, 0x2c69);
19069         MP_WritePhyUshort(sc, 0x06, 0xae03);
19070         MP_WritePhyUshort(sc, 0x06, 0x022c);
19071         MP_WritePhyUshort(sc, 0x06, 0x7cfc);
19072         MP_WritePhyUshort(sc, 0x06, 0x04f8);
19073         MP_WritePhyUshort(sc, 0x06, 0xfaef);
19074         MP_WritePhyUshort(sc, 0x06, 0x6902);
19075         MP_WritePhyUshort(sc, 0x06, 0x856c);
19076         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
19077         MP_WritePhyUshort(sc, 0x06, 0x14e1);
19078         MP_WritePhyUshort(sc, 0x06, 0xe015);
19079         MP_WritePhyUshort(sc, 0x06, 0xad26);
19080         MP_WritePhyUshort(sc, 0x06, 0x08d1);
19081         MP_WritePhyUshort(sc, 0x06, 0x1ebf);
19082         MP_WritePhyUshort(sc, 0x06, 0x2cd9);
19083         MP_WritePhyUshort(sc, 0x06, 0x0238);
19084         MP_WritePhyUshort(sc, 0x06, 0x7def);
19085         MP_WritePhyUshort(sc, 0x06, 0x96fe);
19086         MP_WritePhyUshort(sc, 0x06, 0xfc04);
19087         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
19088         MP_WritePhyUshort(sc, 0x06, 0x8b85);
19089         MP_WritePhyUshort(sc, 0x06, 0xad27);
19090         MP_WritePhyUshort(sc, 0x06, 0x2fd0);
19091         MP_WritePhyUshort(sc, 0x06, 0x0b02);
19092         MP_WritePhyUshort(sc, 0x06, 0x3682);
19093         MP_WritePhyUshort(sc, 0x06, 0x5882);
19094         MP_WritePhyUshort(sc, 0x06, 0x7882);
19095         MP_WritePhyUshort(sc, 0x06, 0x9f24);
19096         MP_WritePhyUshort(sc, 0x06, 0xe08b);
19097         MP_WritePhyUshort(sc, 0x06, 0x32e1);
19098         MP_WritePhyUshort(sc, 0x06, 0x8b33);
19099         MP_WritePhyUshort(sc, 0x06, 0x1f10);
19100         MP_WritePhyUshort(sc, 0x06, 0x9e1a);
19101         MP_WritePhyUshort(sc, 0x06, 0x10e4);
19102         MP_WritePhyUshort(sc, 0x06, 0x8b32);
19103         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
19104         MP_WritePhyUshort(sc, 0x06, 0x28e1);
19105         MP_WritePhyUshort(sc, 0x06, 0xe029);
19106         MP_WritePhyUshort(sc, 0x06, 0xf72c);
19107         MP_WritePhyUshort(sc, 0x06, 0xe4e0);
19108         MP_WritePhyUshort(sc, 0x06, 0x28e5);
19109         MP_WritePhyUshort(sc, 0x06, 0xe029);
19110         MP_WritePhyUshort(sc, 0x06, 0xf62c);
19111         MP_WritePhyUshort(sc, 0x06, 0xe4e0);
19112         MP_WritePhyUshort(sc, 0x06, 0x28e5);
19113         MP_WritePhyUshort(sc, 0x06, 0xe029);
19114         MP_WritePhyUshort(sc, 0x06, 0xfc04);
19115         MP_WritePhyUshort(sc, 0x06, 0x00e1);
19116         MP_WritePhyUshort(sc, 0x06, 0x4077);
19117         MP_WritePhyUshort(sc, 0x06, 0xe140);
19118         MP_WritePhyUshort(sc, 0x06, 0x52e0);
19119         MP_WritePhyUshort(sc, 0x06, 0xeed9);
19120         MP_WritePhyUshort(sc, 0x06, 0xe04c);
19121         MP_WritePhyUshort(sc, 0x06, 0xbbe0);
19122         MP_WritePhyUshort(sc, 0x06, 0x2a00);
19123         MP_WritePhyUshort(sc, 0x05, 0xe142);
19124         PhyRegValue = MP_ReadPhyUshort(sc, 0x06);
19125         PhyRegValue |= BIT_0;
19126         MP_WritePhyUshort(sc, 0x06, PhyRegValue);
19127         MP_WritePhyUshort(sc, 0x05, 0xe140);
19128         PhyRegValue = MP_ReadPhyUshort(sc, 0x06);
19129         PhyRegValue |= BIT_0;
19130         MP_WritePhyUshort(sc, 0x06, PhyRegValue);
19131         MP_WritePhyUshort(sc, 0x1f, 0x0000);
19132         MP_WritePhyUshort(sc, 0x1f, 0x0005);
19133         for (i = 0; i < 200; i++) {
19134                 DELAY(100);
19135                 PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
19136                 if (PhyRegValue & BIT_7)
19137                         break;
19138         }
19139 
19140         MP_WritePhyUshort(sc, 0x1f, 0x0007);
19141         MP_WritePhyUshort(sc, 0x1e, 0x0023);
19142         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
19143         PhyRegValue |= BIT_1;
19144         if (sc->RequiredSecLanDonglePatch)
19145                 PhyRegValue &= ~(BIT_2);
19146         MP_WritePhyUshort(sc, 0x17, PhyRegValue);
19147         MP_WritePhyUshort(sc, 0x1f, 0x0000);
19148 
19149         MP_WritePhyUshort(sc, 0x1f, 0x0003);
19150         MP_WritePhyUshort(sc, 0x09, 0xA20F);
19151         MP_WritePhyUshort(sc, 0x1f, 0x0000);
19152 
19153         MP_WritePhyUshort(sc, 0x1f, 0x0003);
19154         MP_WritePhyUshort(sc, 0x01, 0x328A);
19155         MP_WritePhyUshort(sc, 0x1f, 0x0000);
19156 
19157         MP_WritePhyUshort(sc, 0x1f, 0x0003);
19158         PhyRegValue = MP_ReadPhyUshort(sc, 0x19);
19159         PhyRegValue &= ~BIT_0;
19160         MP_WritePhyUshort(sc, 0x19, PhyRegValue);
19161         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
19162         PhyRegValue &= ~BIT_10;
19163         MP_WritePhyUshort(sc, 0x10, PhyRegValue);
19164         MP_WritePhyUshort(sc, 0x1f, 0x0000);
19165 
19166 
19167         MP_WritePhyUshort(sc, 0x1f, 0x0000);
19168         MP_WritePhyUshort(sc, 0x00, 0x9200);
19169 }
19170 
19171 static void re_set_phy_mcu_8168f_2(struct re_softc *sc)
19172 {
19173         u_int16_t PhyRegValue;
19174         int i;
19175 
19176         MP_WritePhyUshort(sc, 0x1f, 0x0000);
19177         MP_WritePhyUshort(sc, 0x00, 0x1800);
19178         PhyRegValue = MP_ReadPhyUshort(sc, 0x15);
19179         PhyRegValue &= ~(BIT_12);
19180         MP_WritePhyUshort(sc, 0x15, PhyRegValue);
19181         MP_WritePhyUshort(sc, 0x00, 0x4800);
19182         MP_WritePhyUshort(sc, 0x1f, 0x0007);
19183         MP_WritePhyUshort(sc, 0x1e, 0x002f);
19184         for (i = 0; i < 1000; i++) {
19185                 DELAY(100);
19186                 PhyRegValue = MP_ReadPhyUshort(sc, 0x1c);
19187                 if (PhyRegValue & BIT_7)
19188                         break;
19189         }
19190         MP_WritePhyUshort(sc, 0x1f, 0x0000);
19191         MP_WritePhyUshort(sc, 0x00, 0x1800);
19192         MP_WritePhyUshort(sc, 0x1f, 0x0007);
19193         MP_WritePhyUshort(sc, 0x1e, 0x0023);
19194         for (i = 0; i < 200; i++) {
19195                 DELAY(100);
19196                 PhyRegValue = MP_ReadPhyUshort(sc, 0x18);
19197                 if (!(PhyRegValue & BIT_0))
19198                         break;
19199         }
19200         MP_WritePhyUshort(sc, 0x1f, 0x0005);
19201         MP_WritePhyUshort(sc, 0x05, 0xfff6);
19202         MP_WritePhyUshort(sc, 0x06, 0x0080);
19203         MP_WritePhyUshort(sc, 0x1f, 0x0007);
19204         MP_WritePhyUshort(sc, 0x1e, 0x0023);
19205         MP_WritePhyUshort(sc, 0x16, 0x0306);
19206         MP_WritePhyUshort(sc, 0x16, 0x0307);
19207         MP_WritePhyUshort(sc, 0x15, 0x0098);
19208         MP_WritePhyUshort(sc, 0x19, 0x7c0b);
19209         MP_WritePhyUshort(sc, 0x15, 0x0099);
19210         MP_WritePhyUshort(sc, 0x19, 0x6c0b);
19211         MP_WritePhyUshort(sc, 0x15, 0x00eb);
19212         MP_WritePhyUshort(sc, 0x19, 0x6c0b);
19213         MP_WritePhyUshort(sc, 0x15, 0x00f8);
19214         MP_WritePhyUshort(sc, 0x19, 0x6f0b);
19215         MP_WritePhyUshort(sc, 0x15, 0x00fe);
19216         MP_WritePhyUshort(sc, 0x19, 0x6f0f);
19217         MP_WritePhyUshort(sc, 0x15, 0x00db);
19218         MP_WritePhyUshort(sc, 0x19, 0x6f09);
19219         MP_WritePhyUshort(sc, 0x15, 0x00dc);
19220         MP_WritePhyUshort(sc, 0x19, 0xaefd);
19221         MP_WritePhyUshort(sc, 0x15, 0x00dd);
19222         MP_WritePhyUshort(sc, 0x19, 0x6f0b);
19223         MP_WritePhyUshort(sc, 0x15, 0x00de);
19224         MP_WritePhyUshort(sc, 0x19, 0xc60b);
19225         MP_WritePhyUshort(sc, 0x15, 0x00df);
19226         MP_WritePhyUshort(sc, 0x19, 0x00fa);
19227         MP_WritePhyUshort(sc, 0x15, 0x00e0);
19228         MP_WritePhyUshort(sc, 0x19, 0x30e1);
19229         MP_WritePhyUshort(sc, 0x15, 0x020c);
19230         MP_WritePhyUshort(sc, 0x19, 0x3224);
19231         MP_WritePhyUshort(sc, 0x15, 0x020e);
19232         MP_WritePhyUshort(sc, 0x19, 0x9813);
19233         MP_WritePhyUshort(sc, 0x15, 0x020f);
19234         MP_WritePhyUshort(sc, 0x19, 0x7801);
19235         MP_WritePhyUshort(sc, 0x15, 0x0210);
19236         MP_WritePhyUshort(sc, 0x19, 0x930f);
19237         MP_WritePhyUshort(sc, 0x15, 0x0211);
19238         MP_WritePhyUshort(sc, 0x19, 0x9206);
19239         MP_WritePhyUshort(sc, 0x15, 0x0212);
19240         MP_WritePhyUshort(sc, 0x19, 0x4002);
19241         MP_WritePhyUshort(sc, 0x15, 0x0213);
19242         MP_WritePhyUshort(sc, 0x19, 0x7800);
19243         MP_WritePhyUshort(sc, 0x15, 0x0214);
19244         MP_WritePhyUshort(sc, 0x19, 0x588f);
19245         MP_WritePhyUshort(sc, 0x15, 0x0215);
19246         MP_WritePhyUshort(sc, 0x19, 0x5520);
19247         MP_WritePhyUshort(sc, 0x15, 0x0216);
19248         MP_WritePhyUshort(sc, 0x19, 0x3224);
19249         MP_WritePhyUshort(sc, 0x15, 0x0217);
19250         MP_WritePhyUshort(sc, 0x19, 0x4002);
19251         MP_WritePhyUshort(sc, 0x15, 0x0218);
19252         MP_WritePhyUshort(sc, 0x19, 0x7800);
19253         MP_WritePhyUshort(sc, 0x15, 0x0219);
19254         MP_WritePhyUshort(sc, 0x19, 0x588d);
19255         MP_WritePhyUshort(sc, 0x15, 0x021a);
19256         MP_WritePhyUshort(sc, 0x19, 0x5540);
19257         MP_WritePhyUshort(sc, 0x15, 0x021b);
19258         MP_WritePhyUshort(sc, 0x19, 0x9e03);
19259         MP_WritePhyUshort(sc, 0x15, 0x021c);
19260         MP_WritePhyUshort(sc, 0x19, 0x7c40);
19261         MP_WritePhyUshort(sc, 0x15, 0x021d);
19262         MP_WritePhyUshort(sc, 0x19, 0x6840);
19263         MP_WritePhyUshort(sc, 0x15, 0x021e);
19264         MP_WritePhyUshort(sc, 0x19, 0x3224);
19265         MP_WritePhyUshort(sc, 0x15, 0x021f);
19266         MP_WritePhyUshort(sc, 0x19, 0x4002);
19267         MP_WritePhyUshort(sc, 0x15, 0x0220);
19268         MP_WritePhyUshort(sc, 0x19, 0x3224);
19269         MP_WritePhyUshort(sc, 0x15, 0x0221);
19270         MP_WritePhyUshort(sc, 0x19, 0x9e03);
19271         MP_WritePhyUshort(sc, 0x15, 0x0222);
19272         MP_WritePhyUshort(sc, 0x19, 0x7c40);
19273         MP_WritePhyUshort(sc, 0x15, 0x0223);
19274         MP_WritePhyUshort(sc, 0x19, 0x6840);
19275         MP_WritePhyUshort(sc, 0x15, 0x0224);
19276         MP_WritePhyUshort(sc, 0x19, 0x7800);
19277         MP_WritePhyUshort(sc, 0x15, 0x0225);
19278         MP_WritePhyUshort(sc, 0x19, 0x3231);
19279         MP_WritePhyUshort(sc, 0x15, 0x0000);
19280         MP_WritePhyUshort(sc, 0x16, 0x0306);
19281         MP_WritePhyUshort(sc, 0x16, 0x0300);
19282         MP_WritePhyUshort(sc, 0x1f, 0x0000);
19283         MP_WritePhyUshort(sc, 0x1f, 0x0005);
19284         MP_WritePhyUshort(sc, 0x05, 0xfff6);
19285         MP_WritePhyUshort(sc, 0x06, 0x0080);
19286         MP_WritePhyUshort(sc, 0x05, 0x8000);
19287         MP_WritePhyUshort(sc, 0x06, 0x0280);
19288         MP_WritePhyUshort(sc, 0x06, 0x48f7);
19289         MP_WritePhyUshort(sc, 0x06, 0x00e0);
19290         MP_WritePhyUshort(sc, 0x06, 0xfff7);
19291         MP_WritePhyUshort(sc, 0x06, 0xa080);
19292         MP_WritePhyUshort(sc, 0x06, 0x02ae);
19293         MP_WritePhyUshort(sc, 0x06, 0xf602);
19294         MP_WritePhyUshort(sc, 0x06, 0x011b);
19295         MP_WritePhyUshort(sc, 0x06, 0x0201);
19296         MP_WritePhyUshort(sc, 0x06, 0x2802);
19297         MP_WritePhyUshort(sc, 0x06, 0x0135);
19298         MP_WritePhyUshort(sc, 0x06, 0x0201);
19299         MP_WritePhyUshort(sc, 0x06, 0x4502);
19300         MP_WritePhyUshort(sc, 0x06, 0x015f);
19301         MP_WritePhyUshort(sc, 0x06, 0x0280);
19302         MP_WritePhyUshort(sc, 0x06, 0x6b02);
19303         MP_WritePhyUshort(sc, 0x06, 0x80e5);
19304         MP_WritePhyUshort(sc, 0x06, 0xe08b);
19305         MP_WritePhyUshort(sc, 0x06, 0x88e1);
19306         MP_WritePhyUshort(sc, 0x06, 0x8b89);
19307         MP_WritePhyUshort(sc, 0x06, 0x1e01);
19308         MP_WritePhyUshort(sc, 0x06, 0xe18b);
19309         MP_WritePhyUshort(sc, 0x06, 0x8a1e);
19310         MP_WritePhyUshort(sc, 0x06, 0x01e1);
19311         MP_WritePhyUshort(sc, 0x06, 0x8b8b);
19312         MP_WritePhyUshort(sc, 0x06, 0x1e01);
19313         MP_WritePhyUshort(sc, 0x06, 0xe18b);
19314         MP_WritePhyUshort(sc, 0x06, 0x8c1e);
19315         MP_WritePhyUshort(sc, 0x06, 0x01e1);
19316         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
19317         MP_WritePhyUshort(sc, 0x06, 0x1e01);
19318         MP_WritePhyUshort(sc, 0x06, 0xe18b);
19319         MP_WritePhyUshort(sc, 0x06, 0x8e1e);
19320         MP_WritePhyUshort(sc, 0x06, 0x01a0);
19321         MP_WritePhyUshort(sc, 0x06, 0x00c7);
19322         MP_WritePhyUshort(sc, 0x06, 0xaebb);
19323         MP_WritePhyUshort(sc, 0x06, 0xbf8b);
19324         MP_WritePhyUshort(sc, 0x06, 0x88ec);
19325         MP_WritePhyUshort(sc, 0x06, 0x0019);
19326         MP_WritePhyUshort(sc, 0x06, 0xa98b);
19327         MP_WritePhyUshort(sc, 0x06, 0x90f9);
19328         MP_WritePhyUshort(sc, 0x06, 0xeeff);
19329         MP_WritePhyUshort(sc, 0x06, 0xf600);
19330         MP_WritePhyUshort(sc, 0x06, 0xeeff);
19331         MP_WritePhyUshort(sc, 0x06, 0xf7fe);
19332         MP_WritePhyUshort(sc, 0x06, 0xd100);
19333         MP_WritePhyUshort(sc, 0x06, 0xbf81);
19334         MP_WritePhyUshort(sc, 0x06, 0x9802);
19335         MP_WritePhyUshort(sc, 0x06, 0x39f3);
19336         MP_WritePhyUshort(sc, 0x06, 0xd101);
19337         MP_WritePhyUshort(sc, 0x06, 0xbf81);
19338         MP_WritePhyUshort(sc, 0x06, 0x9b02);
19339         MP_WritePhyUshort(sc, 0x06, 0x39f3);
19340         MP_WritePhyUshort(sc, 0x06, 0x04f8);
19341         MP_WritePhyUshort(sc, 0x06, 0xe08b);
19342         MP_WritePhyUshort(sc, 0x06, 0x8dad);
19343         MP_WritePhyUshort(sc, 0x06, 0x2014);
19344         MP_WritePhyUshort(sc, 0x06, 0xee8b);
19345         MP_WritePhyUshort(sc, 0x06, 0x8d00);
19346         MP_WritePhyUshort(sc, 0x06, 0xe08a);
19347         MP_WritePhyUshort(sc, 0x06, 0x5a78);
19348         MP_WritePhyUshort(sc, 0x06, 0x039e);
19349         MP_WritePhyUshort(sc, 0x06, 0x0902);
19350         MP_WritePhyUshort(sc, 0x06, 0x05fc);
19351         MP_WritePhyUshort(sc, 0x06, 0x0280);
19352         MP_WritePhyUshort(sc, 0x06, 0x8802);
19353         MP_WritePhyUshort(sc, 0x06, 0x32dd);
19354         MP_WritePhyUshort(sc, 0x06, 0xfc04);
19355         MP_WritePhyUshort(sc, 0x06, 0xf8f9);
19356         MP_WritePhyUshort(sc, 0x06, 0xe08b);
19357         MP_WritePhyUshort(sc, 0x06, 0x81ac);
19358         MP_WritePhyUshort(sc, 0x06, 0x261a);
19359         MP_WritePhyUshort(sc, 0x06, 0xe08b);
19360         MP_WritePhyUshort(sc, 0x06, 0x81ac);
19361         MP_WritePhyUshort(sc, 0x06, 0x2114);
19362         MP_WritePhyUshort(sc, 0x06, 0xe08b);
19363         MP_WritePhyUshort(sc, 0x06, 0x85ac);
19364         MP_WritePhyUshort(sc, 0x06, 0x200e);
19365         MP_WritePhyUshort(sc, 0x06, 0xe08b);
19366         MP_WritePhyUshort(sc, 0x06, 0x85ac);
19367         MP_WritePhyUshort(sc, 0x06, 0x2308);
19368         MP_WritePhyUshort(sc, 0x06, 0xe08b);
19369         MP_WritePhyUshort(sc, 0x06, 0x87ac);
19370         MP_WritePhyUshort(sc, 0x06, 0x2402);
19371         MP_WritePhyUshort(sc, 0x06, 0xae38);
19372         MP_WritePhyUshort(sc, 0x06, 0x021a);
19373         MP_WritePhyUshort(sc, 0x06, 0xd6ee);
19374         MP_WritePhyUshort(sc, 0x06, 0xe41c);
19375         MP_WritePhyUshort(sc, 0x06, 0x04ee);
19376         MP_WritePhyUshort(sc, 0x06, 0xe41d);
19377         MP_WritePhyUshort(sc, 0x06, 0x04e2);
19378         MP_WritePhyUshort(sc, 0x06, 0xe07c);
19379         MP_WritePhyUshort(sc, 0x06, 0xe3e0);
19380         MP_WritePhyUshort(sc, 0x06, 0x7de0);
19381         MP_WritePhyUshort(sc, 0x06, 0xe038);
19382         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
19383         MP_WritePhyUshort(sc, 0x06, 0x39ad);
19384         MP_WritePhyUshort(sc, 0x06, 0x2e1b);
19385         MP_WritePhyUshort(sc, 0x06, 0xad39);
19386         MP_WritePhyUshort(sc, 0x06, 0x0dd1);
19387         MP_WritePhyUshort(sc, 0x06, 0x01bf);
19388         MP_WritePhyUshort(sc, 0x06, 0x22c8);
19389         MP_WritePhyUshort(sc, 0x06, 0x0239);
19390         MP_WritePhyUshort(sc, 0x06, 0xf302);
19391         MP_WritePhyUshort(sc, 0x06, 0x21f0);
19392         MP_WritePhyUshort(sc, 0x06, 0xae0b);
19393         MP_WritePhyUshort(sc, 0x06, 0xac38);
19394         MP_WritePhyUshort(sc, 0x06, 0x02ae);
19395         MP_WritePhyUshort(sc, 0x06, 0x0602);
19396         MP_WritePhyUshort(sc, 0x06, 0x222d);
19397         MP_WritePhyUshort(sc, 0x06, 0x0222);
19398         MP_WritePhyUshort(sc, 0x06, 0x7202);
19399         MP_WritePhyUshort(sc, 0x06, 0x1ae7);
19400         MP_WritePhyUshort(sc, 0x06, 0xfdfc);
19401         MP_WritePhyUshort(sc, 0x06, 0x04f8);
19402         MP_WritePhyUshort(sc, 0x06, 0xe08b);
19403         MP_WritePhyUshort(sc, 0x06, 0x8ead);
19404         MP_WritePhyUshort(sc, 0x06, 0x201a);
19405         MP_WritePhyUshort(sc, 0x06, 0xf620);
19406         MP_WritePhyUshort(sc, 0x06, 0xe48b);
19407         MP_WritePhyUshort(sc, 0x06, 0x8e02);
19408         MP_WritePhyUshort(sc, 0x06, 0x2afe);
19409         MP_WritePhyUshort(sc, 0x06, 0x022c);
19410         MP_WritePhyUshort(sc, 0x06, 0x5c02);
19411         MP_WritePhyUshort(sc, 0x06, 0x03c5);
19412         MP_WritePhyUshort(sc, 0x06, 0x0281);
19413         MP_WritePhyUshort(sc, 0x06, 0x6702);
19414         MP_WritePhyUshort(sc, 0x06, 0x2e4f);
19415         MP_WritePhyUshort(sc, 0x06, 0x0204);
19416         MP_WritePhyUshort(sc, 0x06, 0x8902);
19417         MP_WritePhyUshort(sc, 0x06, 0x2f7a);
19418         MP_WritePhyUshort(sc, 0x06, 0xe08b);
19419         MP_WritePhyUshort(sc, 0x06, 0x8ead);
19420         MP_WritePhyUshort(sc, 0x06, 0x210b);
19421         MP_WritePhyUshort(sc, 0x06, 0xf621);
19422         MP_WritePhyUshort(sc, 0x06, 0xe48b);
19423         MP_WritePhyUshort(sc, 0x06, 0x8e02);
19424         MP_WritePhyUshort(sc, 0x06, 0x0445);
19425         MP_WritePhyUshort(sc, 0x06, 0x021c);
19426         MP_WritePhyUshort(sc, 0x06, 0xb8e0);
19427         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
19428         MP_WritePhyUshort(sc, 0x06, 0xad22);
19429         MP_WritePhyUshort(sc, 0x06, 0x08f6);
19430         MP_WritePhyUshort(sc, 0x06, 0x22e4);
19431         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
19432         MP_WritePhyUshort(sc, 0x06, 0x0235);
19433         MP_WritePhyUshort(sc, 0x06, 0xd4e0);
19434         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
19435         MP_WritePhyUshort(sc, 0x06, 0xad23);
19436         MP_WritePhyUshort(sc, 0x06, 0x08f6);
19437         MP_WritePhyUshort(sc, 0x06, 0x23e4);
19438         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
19439         MP_WritePhyUshort(sc, 0x06, 0x0231);
19440         MP_WritePhyUshort(sc, 0x06, 0xc8e0);
19441         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
19442         MP_WritePhyUshort(sc, 0x06, 0xad24);
19443         MP_WritePhyUshort(sc, 0x06, 0x05f6);
19444         MP_WritePhyUshort(sc, 0x06, 0x24e4);
19445         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
19446         MP_WritePhyUshort(sc, 0x06, 0xe08b);
19447         MP_WritePhyUshort(sc, 0x06, 0x8ead);
19448         MP_WritePhyUshort(sc, 0x06, 0x2505);
19449         MP_WritePhyUshort(sc, 0x06, 0xf625);
19450         MP_WritePhyUshort(sc, 0x06, 0xe48b);
19451         MP_WritePhyUshort(sc, 0x06, 0x8ee0);
19452         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
19453         MP_WritePhyUshort(sc, 0x06, 0xad26);
19454         MP_WritePhyUshort(sc, 0x06, 0x08f6);
19455         MP_WritePhyUshort(sc, 0x06, 0x26e4);
19456         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
19457         MP_WritePhyUshort(sc, 0x06, 0x022d);
19458         MP_WritePhyUshort(sc, 0x06, 0x6ae0);
19459         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
19460         MP_WritePhyUshort(sc, 0x06, 0xad27);
19461         MP_WritePhyUshort(sc, 0x06, 0x05f6);
19462         MP_WritePhyUshort(sc, 0x06, 0x27e4);
19463         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
19464         MP_WritePhyUshort(sc, 0x06, 0x0203);
19465         MP_WritePhyUshort(sc, 0x06, 0x8bfc);
19466         MP_WritePhyUshort(sc, 0x06, 0x04f8);
19467         MP_WritePhyUshort(sc, 0x06, 0xfaef);
19468         MP_WritePhyUshort(sc, 0x06, 0x69e0);
19469         MP_WritePhyUshort(sc, 0x06, 0x8b80);
19470         MP_WritePhyUshort(sc, 0x06, 0xad27);
19471         MP_WritePhyUshort(sc, 0x06, 0x22bf);
19472         MP_WritePhyUshort(sc, 0x06, 0x479a);
19473         MP_WritePhyUshort(sc, 0x06, 0x0239);
19474         MP_WritePhyUshort(sc, 0x06, 0xc6e0);
19475         MP_WritePhyUshort(sc, 0x06, 0x8b44);
19476         MP_WritePhyUshort(sc, 0x06, 0x1f01);
19477         MP_WritePhyUshort(sc, 0x06, 0x9e15);
19478         MP_WritePhyUshort(sc, 0x06, 0xe58b);
19479         MP_WritePhyUshort(sc, 0x06, 0x44ad);
19480         MP_WritePhyUshort(sc, 0x06, 0x2907);
19481         MP_WritePhyUshort(sc, 0x06, 0xac28);
19482         MP_WritePhyUshort(sc, 0x06, 0x04d1);
19483         MP_WritePhyUshort(sc, 0x06, 0x01ae);
19484         MP_WritePhyUshort(sc, 0x06, 0x02d1);
19485         MP_WritePhyUshort(sc, 0x06, 0x00bf);
19486         MP_WritePhyUshort(sc, 0x06, 0x819e);
19487         MP_WritePhyUshort(sc, 0x06, 0x0239);
19488         MP_WritePhyUshort(sc, 0x06, 0xf3ef);
19489         MP_WritePhyUshort(sc, 0x06, 0x96fe);
19490         MP_WritePhyUshort(sc, 0x06, 0xfc04);
19491         MP_WritePhyUshort(sc, 0x06, 0x00e1);
19492         MP_WritePhyUshort(sc, 0x06, 0x4077);
19493         MP_WritePhyUshort(sc, 0x06, 0xe140);
19494         MP_WritePhyUshort(sc, 0x06, 0xbbe0);
19495         MP_WritePhyUshort(sc, 0x06, 0x2a00);
19496         MP_WritePhyUshort(sc, 0x05, 0xe142);
19497         PhyRegValue = MP_ReadPhyUshort(sc, 0x06);
19498         PhyRegValue |= BIT_0;
19499         MP_WritePhyUshort(sc, 0x06, PhyRegValue);
19500         MP_WritePhyUshort(sc, 0x05, 0xe140);
19501         PhyRegValue = MP_ReadPhyUshort(sc, 0x06);
19502         PhyRegValue |= BIT_0;
19503         MP_WritePhyUshort(sc, 0x06, PhyRegValue);
19504         MP_WritePhyUshort(sc, 0x1f, 0x0000);
19505         MP_WritePhyUshort(sc, 0x1f, 0x0005);
19506         for (i = 0; i < 200; i++) {
19507                 DELAY(100);
19508                 PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
19509                 if (PhyRegValue & BIT_7)
19510                         break;
19511         }
19512 
19513         MP_WritePhyUshort(sc, 0x1f, 0x0007);
19514         MP_WritePhyUshort(sc, 0x1e, 0x0023);
19515         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
19516         PhyRegValue |= BIT_1;
19517         if (sc->RequiredSecLanDonglePatch)
19518                 PhyRegValue &= ~(BIT_2);
19519         MP_WritePhyUshort(sc, 0x17, PhyRegValue);
19520         MP_WritePhyUshort(sc, 0x1f, 0x0000);
19521 
19522         MP_WritePhyUshort(sc, 0x1f, 0x0003);
19523         PhyRegValue = MP_ReadPhyUshort(sc, 0x19);
19524         PhyRegValue &= ~BIT_0;
19525         MP_WritePhyUshort(sc, 0x19, PhyRegValue);
19526         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
19527         PhyRegValue &= ~BIT_10;
19528         MP_WritePhyUshort(sc, 0x10, PhyRegValue);
19529 
19530         MP_WritePhyUshort(sc, 0x1f, 0x0000);
19531         MP_WritePhyUshort(sc, 0x00, 0x9200);
19532 }
19533 
19534 static void re_set_phy_mcu_8411_1(struct re_softc *sc)
19535 {
19536         u_int16_t PhyRegValue;
19537         int i;
19538 
19539         MP_WritePhyUshort(sc, 0x1f, 0x0000);
19540         MP_WritePhyUshort(sc, 0x00, 0x1800);
19541         PhyRegValue = MP_ReadPhyUshort(sc, 0x15);
19542         PhyRegValue &= ~(BIT_12);
19543         MP_WritePhyUshort(sc, 0x15, PhyRegValue);
19544         MP_WritePhyUshort(sc, 0x00, 0x4800);
19545         MP_WritePhyUshort(sc, 0x1f, 0x0007);
19546         MP_WritePhyUshort(sc, 0x1e, 0x002f);
19547         for (i = 0; i < 1000; i++) {
19548                 DELAY(100);
19549                 PhyRegValue = MP_ReadPhyUshort(sc, 0x1c);
19550                 if (PhyRegValue & BIT_7)
19551                         break;
19552         }
19553         MP_WritePhyUshort(sc, 0x1f, 0x0000);
19554         MP_WritePhyUshort(sc, 0x00, 0x1800);
19555         MP_WritePhyUshort(sc, 0x1f, 0x0007);
19556         MP_WritePhyUshort(sc, 0x1e, 0x0023);
19557         for (i = 0; i < 200; i++) {
19558                 DELAY(100);
19559                 PhyRegValue = MP_ReadPhyUshort(sc, 0x18);
19560                 if (!(PhyRegValue & BIT_0))
19561                         break;
19562         }
19563         MP_WritePhyUshort(sc, 0x1f, 0x0005);
19564         MP_WritePhyUshort(sc, 0x05, 0xfff6);
19565         MP_WritePhyUshort(sc, 0x06, 0x0080);
19566         MP_WritePhyUshort(sc, 0x1f, 0x0007);
19567         MP_WritePhyUshort(sc, 0x1e, 0x0023);
19568         MP_WritePhyUshort(sc, 0x16, 0x0306);
19569         MP_WritePhyUshort(sc, 0x16, 0x0307);
19570         MP_WritePhyUshort(sc, 0x15, 0x0098);
19571         MP_WritePhyUshort(sc, 0x19, 0x7c0b);
19572         MP_WritePhyUshort(sc, 0x15, 0x0099);
19573         MP_WritePhyUshort(sc, 0x19, 0x6c0b);
19574         MP_WritePhyUshort(sc, 0x15, 0x00eb);
19575         MP_WritePhyUshort(sc, 0x19, 0x6c0b);
19576         MP_WritePhyUshort(sc, 0x15, 0x00f8);
19577         MP_WritePhyUshort(sc, 0x19, 0x6f0b);
19578         MP_WritePhyUshort(sc, 0x15, 0x00fe);
19579         MP_WritePhyUshort(sc, 0x19, 0x6f0f);
19580         MP_WritePhyUshort(sc, 0x15, 0x00db);
19581         MP_WritePhyUshort(sc, 0x19, 0x6f09);
19582         MP_WritePhyUshort(sc, 0x15, 0x00dc);
19583         MP_WritePhyUshort(sc, 0x19, 0xaefd);
19584         MP_WritePhyUshort(sc, 0x15, 0x00dd);
19585         MP_WritePhyUshort(sc, 0x19, 0x6f0b);
19586         MP_WritePhyUshort(sc, 0x15, 0x00de);
19587         MP_WritePhyUshort(sc, 0x19, 0xc60b);
19588         MP_WritePhyUshort(sc, 0x15, 0x00df);
19589         MP_WritePhyUshort(sc, 0x19, 0x00fa);
19590         MP_WritePhyUshort(sc, 0x15, 0x00e0);
19591         MP_WritePhyUshort(sc, 0x19, 0x30e1);
19592         MP_WritePhyUshort(sc, 0x15, 0x020c);
19593         MP_WritePhyUshort(sc, 0x19, 0x3224);
19594         MP_WritePhyUshort(sc, 0x15, 0x020e);
19595         MP_WritePhyUshort(sc, 0x19, 0x9813);
19596         MP_WritePhyUshort(sc, 0x15, 0x020f);
19597         MP_WritePhyUshort(sc, 0x19, 0x7801);
19598         MP_WritePhyUshort(sc, 0x15, 0x0210);
19599         MP_WritePhyUshort(sc, 0x19, 0x930f);
19600         MP_WritePhyUshort(sc, 0x15, 0x0211);
19601         MP_WritePhyUshort(sc, 0x19, 0x9206);
19602         MP_WritePhyUshort(sc, 0x15, 0x0212);
19603         MP_WritePhyUshort(sc, 0x19, 0x4002);
19604         MP_WritePhyUshort(sc, 0x15, 0x0213);
19605         MP_WritePhyUshort(sc, 0x19, 0x7800);
19606         MP_WritePhyUshort(sc, 0x15, 0x0214);
19607         MP_WritePhyUshort(sc, 0x19, 0x588f);
19608         MP_WritePhyUshort(sc, 0x15, 0x0215);
19609         MP_WritePhyUshort(sc, 0x19, 0x5520);
19610         MP_WritePhyUshort(sc, 0x15, 0x0216);
19611         MP_WritePhyUshort(sc, 0x19, 0x3224);
19612         MP_WritePhyUshort(sc, 0x15, 0x0217);
19613         MP_WritePhyUshort(sc, 0x19, 0x4002);
19614         MP_WritePhyUshort(sc, 0x15, 0x0218);
19615         MP_WritePhyUshort(sc, 0x19, 0x7800);
19616         MP_WritePhyUshort(sc, 0x15, 0x0219);
19617         MP_WritePhyUshort(sc, 0x19, 0x588d);
19618         MP_WritePhyUshort(sc, 0x15, 0x021a);
19619         MP_WritePhyUshort(sc, 0x19, 0x5540);
19620         MP_WritePhyUshort(sc, 0x15, 0x021b);
19621         MP_WritePhyUshort(sc, 0x19, 0x9e03);
19622         MP_WritePhyUshort(sc, 0x15, 0x021c);
19623         MP_WritePhyUshort(sc, 0x19, 0x7c40);
19624         MP_WritePhyUshort(sc, 0x15, 0x021d);
19625         MP_WritePhyUshort(sc, 0x19, 0x6840);
19626         MP_WritePhyUshort(sc, 0x15, 0x021e);
19627         MP_WritePhyUshort(sc, 0x19, 0x3224);
19628         MP_WritePhyUshort(sc, 0x15, 0x021f);
19629         MP_WritePhyUshort(sc, 0x19, 0x4002);
19630         MP_WritePhyUshort(sc, 0x15, 0x0220);
19631         MP_WritePhyUshort(sc, 0x19, 0x3224);
19632         MP_WritePhyUshort(sc, 0x15, 0x0221);
19633         MP_WritePhyUshort(sc, 0x19, 0x9e03);
19634         MP_WritePhyUshort(sc, 0x15, 0x0222);
19635         MP_WritePhyUshort(sc, 0x19, 0x7c40);
19636         MP_WritePhyUshort(sc, 0x15, 0x0223);
19637         MP_WritePhyUshort(sc, 0x19, 0x6840);
19638         MP_WritePhyUshort(sc, 0x15, 0x0224);
19639         MP_WritePhyUshort(sc, 0x19, 0x7800);
19640         MP_WritePhyUshort(sc, 0x15, 0x0225);
19641         MP_WritePhyUshort(sc, 0x19, 0x3231);
19642         MP_WritePhyUshort(sc, 0x15, 0x0000);
19643         MP_WritePhyUshort(sc, 0x16, 0x0306);
19644         MP_WritePhyUshort(sc, 0x16, 0x0300);
19645         MP_WritePhyUshort(sc, 0x1f, 0x0000);
19646         MP_WritePhyUshort(sc, 0x1f, 0x0005);
19647         MP_WritePhyUshort(sc, 0x05, 0xfff6);
19648         MP_WritePhyUshort(sc, 0x06, 0x0080);
19649         MP_WritePhyUshort(sc, 0x05, 0x8000);
19650         MP_WritePhyUshort(sc, 0x06, 0x0280);
19651         MP_WritePhyUshort(sc, 0x06, 0x48f7);
19652         MP_WritePhyUshort(sc, 0x06, 0x00e0);
19653         MP_WritePhyUshort(sc, 0x06, 0xfff7);
19654         MP_WritePhyUshort(sc, 0x06, 0xa080);
19655         MP_WritePhyUshort(sc, 0x06, 0x02ae);
19656         MP_WritePhyUshort(sc, 0x06, 0xf602);
19657         MP_WritePhyUshort(sc, 0x06, 0x011e);
19658         MP_WritePhyUshort(sc, 0x06, 0x0201);
19659         MP_WritePhyUshort(sc, 0x06, 0x2b02);
19660         MP_WritePhyUshort(sc, 0x06, 0x8077);
19661         MP_WritePhyUshort(sc, 0x06, 0x0201);
19662         MP_WritePhyUshort(sc, 0x06, 0x4802);
19663         MP_WritePhyUshort(sc, 0x06, 0x0162);
19664         MP_WritePhyUshort(sc, 0x06, 0x0280);
19665         MP_WritePhyUshort(sc, 0x06, 0x9402);
19666         MP_WritePhyUshort(sc, 0x06, 0x810e);
19667         MP_WritePhyUshort(sc, 0x06, 0xe08b);
19668         MP_WritePhyUshort(sc, 0x06, 0x88e1);
19669         MP_WritePhyUshort(sc, 0x06, 0x8b89);
19670         MP_WritePhyUshort(sc, 0x06, 0x1e01);
19671         MP_WritePhyUshort(sc, 0x06, 0xe18b);
19672         MP_WritePhyUshort(sc, 0x06, 0x8a1e);
19673         MP_WritePhyUshort(sc, 0x06, 0x01e1);
19674         MP_WritePhyUshort(sc, 0x06, 0x8b8b);
19675         MP_WritePhyUshort(sc, 0x06, 0x1e01);
19676         MP_WritePhyUshort(sc, 0x06, 0xe18b);
19677         MP_WritePhyUshort(sc, 0x06, 0x8c1e);
19678         MP_WritePhyUshort(sc, 0x06, 0x01e1);
19679         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
19680         MP_WritePhyUshort(sc, 0x06, 0x1e01);
19681         MP_WritePhyUshort(sc, 0x06, 0xe18b);
19682         MP_WritePhyUshort(sc, 0x06, 0x8e1e);
19683         MP_WritePhyUshort(sc, 0x06, 0x01a0);
19684         MP_WritePhyUshort(sc, 0x06, 0x00c7);
19685         MP_WritePhyUshort(sc, 0x06, 0xaebb);
19686         MP_WritePhyUshort(sc, 0x06, 0xd481);
19687         MP_WritePhyUshort(sc, 0x06, 0xd4e4);
19688         MP_WritePhyUshort(sc, 0x06, 0x8b92);
19689         MP_WritePhyUshort(sc, 0x06, 0xe58b);
19690         MP_WritePhyUshort(sc, 0x06, 0x9302);
19691         MP_WritePhyUshort(sc, 0x06, 0x2e5a);
19692         MP_WritePhyUshort(sc, 0x06, 0xbf8b);
19693         MP_WritePhyUshort(sc, 0x06, 0x88ec);
19694         MP_WritePhyUshort(sc, 0x06, 0x0019);
19695         MP_WritePhyUshort(sc, 0x06, 0xa98b);
19696         MP_WritePhyUshort(sc, 0x06, 0x90f9);
19697         MP_WritePhyUshort(sc, 0x06, 0xeeff);
19698         MP_WritePhyUshort(sc, 0x06, 0xf600);
19699         MP_WritePhyUshort(sc, 0x06, 0xeeff);
19700         MP_WritePhyUshort(sc, 0x06, 0xf7fc);
19701         MP_WritePhyUshort(sc, 0x06, 0xd100);
19702         MP_WritePhyUshort(sc, 0x06, 0xbf83);
19703         MP_WritePhyUshort(sc, 0x06, 0x3c02);
19704         MP_WritePhyUshort(sc, 0x06, 0x3a21);
19705         MP_WritePhyUshort(sc, 0x06, 0xd101);
19706         MP_WritePhyUshort(sc, 0x06, 0xbf83);
19707         MP_WritePhyUshort(sc, 0x06, 0x3f02);
19708         MP_WritePhyUshort(sc, 0x06, 0x3a21);
19709         MP_WritePhyUshort(sc, 0x06, 0x04f8);
19710         MP_WritePhyUshort(sc, 0x06, 0xe08b);
19711         MP_WritePhyUshort(sc, 0x06, 0x8aad);
19712         MP_WritePhyUshort(sc, 0x06, 0x2014);
19713         MP_WritePhyUshort(sc, 0x06, 0xee8b);
19714         MP_WritePhyUshort(sc, 0x06, 0x8a00);
19715         MP_WritePhyUshort(sc, 0x06, 0x0220);
19716         MP_WritePhyUshort(sc, 0x06, 0x8be0);
19717         MP_WritePhyUshort(sc, 0x06, 0xe426);
19718         MP_WritePhyUshort(sc, 0x06, 0xe1e4);
19719         MP_WritePhyUshort(sc, 0x06, 0x27ee);
19720         MP_WritePhyUshort(sc, 0x06, 0xe426);
19721         MP_WritePhyUshort(sc, 0x06, 0x23e5);
19722         MP_WritePhyUshort(sc, 0x06, 0xe427);
19723         MP_WritePhyUshort(sc, 0x06, 0xfc04);
19724         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
19725         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
19726         MP_WritePhyUshort(sc, 0x06, 0xad20);
19727         MP_WritePhyUshort(sc, 0x06, 0x14ee);
19728         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
19729         MP_WritePhyUshort(sc, 0x06, 0x00e0);
19730         MP_WritePhyUshort(sc, 0x06, 0x8a5a);
19731         MP_WritePhyUshort(sc, 0x06, 0x7803);
19732         MP_WritePhyUshort(sc, 0x06, 0x9e09);
19733         MP_WritePhyUshort(sc, 0x06, 0x0206);
19734         MP_WritePhyUshort(sc, 0x06, 0x2802);
19735         MP_WritePhyUshort(sc, 0x06, 0x80b1);
19736         MP_WritePhyUshort(sc, 0x06, 0x0232);
19737         MP_WritePhyUshort(sc, 0x06, 0xfdfc);
19738         MP_WritePhyUshort(sc, 0x06, 0x04f8);
19739         MP_WritePhyUshort(sc, 0x06, 0xf9e0);
19740         MP_WritePhyUshort(sc, 0x06, 0x8b81);
19741         MP_WritePhyUshort(sc, 0x06, 0xac26);
19742         MP_WritePhyUshort(sc, 0x06, 0x1ae0);
19743         MP_WritePhyUshort(sc, 0x06, 0x8b81);
19744         MP_WritePhyUshort(sc, 0x06, 0xac21);
19745         MP_WritePhyUshort(sc, 0x06, 0x14e0);
19746         MP_WritePhyUshort(sc, 0x06, 0x8b85);
19747         MP_WritePhyUshort(sc, 0x06, 0xac20);
19748         MP_WritePhyUshort(sc, 0x06, 0x0ee0);
19749         MP_WritePhyUshort(sc, 0x06, 0x8b85);
19750         MP_WritePhyUshort(sc, 0x06, 0xac23);
19751         MP_WritePhyUshort(sc, 0x06, 0x08e0);
19752         MP_WritePhyUshort(sc, 0x06, 0x8b87);
19753         MP_WritePhyUshort(sc, 0x06, 0xac24);
19754         MP_WritePhyUshort(sc, 0x06, 0x02ae);
19755         MP_WritePhyUshort(sc, 0x06, 0x3802);
19756         MP_WritePhyUshort(sc, 0x06, 0x1b02);
19757         MP_WritePhyUshort(sc, 0x06, 0xeee4);
19758         MP_WritePhyUshort(sc, 0x06, 0x1c04);
19759         MP_WritePhyUshort(sc, 0x06, 0xeee4);
19760         MP_WritePhyUshort(sc, 0x06, 0x1d04);
19761         MP_WritePhyUshort(sc, 0x06, 0xe2e0);
19762         MP_WritePhyUshort(sc, 0x06, 0x7ce3);
19763         MP_WritePhyUshort(sc, 0x06, 0xe07d);
19764         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
19765         MP_WritePhyUshort(sc, 0x06, 0x38e1);
19766         MP_WritePhyUshort(sc, 0x06, 0xe039);
19767         MP_WritePhyUshort(sc, 0x06, 0xad2e);
19768         MP_WritePhyUshort(sc, 0x06, 0x1bad);
19769         MP_WritePhyUshort(sc, 0x06, 0x390d);
19770         MP_WritePhyUshort(sc, 0x06, 0xd101);
19771         MP_WritePhyUshort(sc, 0x06, 0xbf22);
19772         MP_WritePhyUshort(sc, 0x06, 0xe802);
19773         MP_WritePhyUshort(sc, 0x06, 0x3a21);
19774         MP_WritePhyUshort(sc, 0x06, 0x0222);
19775         MP_WritePhyUshort(sc, 0x06, 0x10ae);
19776         MP_WritePhyUshort(sc, 0x06, 0x0bac);
19777         MP_WritePhyUshort(sc, 0x06, 0x3802);
19778         MP_WritePhyUshort(sc, 0x06, 0xae06);
19779         MP_WritePhyUshort(sc, 0x06, 0x0222);
19780         MP_WritePhyUshort(sc, 0x06, 0x4d02);
19781         MP_WritePhyUshort(sc, 0x06, 0x2292);
19782         MP_WritePhyUshort(sc, 0x06, 0x021b);
19783         MP_WritePhyUshort(sc, 0x06, 0x13fd);
19784         MP_WritePhyUshort(sc, 0x06, 0xfc04);
19785         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
19786         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
19787         MP_WritePhyUshort(sc, 0x06, 0xad20);
19788         MP_WritePhyUshort(sc, 0x06, 0x1af6);
19789         MP_WritePhyUshort(sc, 0x06, 0x20e4);
19790         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
19791         MP_WritePhyUshort(sc, 0x06, 0x022b);
19792         MP_WritePhyUshort(sc, 0x06, 0x1e02);
19793         MP_WritePhyUshort(sc, 0x06, 0x82ae);
19794         MP_WritePhyUshort(sc, 0x06, 0x0203);
19795         MP_WritePhyUshort(sc, 0x06, 0xc002);
19796         MP_WritePhyUshort(sc, 0x06, 0x827d);
19797         MP_WritePhyUshort(sc, 0x06, 0x022e);
19798         MP_WritePhyUshort(sc, 0x06, 0x6f02);
19799         MP_WritePhyUshort(sc, 0x06, 0x047b);
19800         MP_WritePhyUshort(sc, 0x06, 0x022f);
19801         MP_WritePhyUshort(sc, 0x06, 0x9ae0);
19802         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
19803         MP_WritePhyUshort(sc, 0x06, 0xad21);
19804         MP_WritePhyUshort(sc, 0x06, 0x0bf6);
19805         MP_WritePhyUshort(sc, 0x06, 0x21e4);
19806         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
19807         MP_WritePhyUshort(sc, 0x06, 0x0281);
19808         MP_WritePhyUshort(sc, 0x06, 0x9002);
19809         MP_WritePhyUshort(sc, 0x06, 0x1cd9);
19810         MP_WritePhyUshort(sc, 0x06, 0xe08b);
19811         MP_WritePhyUshort(sc, 0x06, 0x8ead);
19812         MP_WritePhyUshort(sc, 0x06, 0x2208);
19813         MP_WritePhyUshort(sc, 0x06, 0xf622);
19814         MP_WritePhyUshort(sc, 0x06, 0xe48b);
19815         MP_WritePhyUshort(sc, 0x06, 0x8e02);
19816         MP_WritePhyUshort(sc, 0x06, 0x35f4);
19817         MP_WritePhyUshort(sc, 0x06, 0xe08b);
19818         MP_WritePhyUshort(sc, 0x06, 0x8ead);
19819         MP_WritePhyUshort(sc, 0x06, 0x2308);
19820         MP_WritePhyUshort(sc, 0x06, 0xf623);
19821         MP_WritePhyUshort(sc, 0x06, 0xe48b);
19822         MP_WritePhyUshort(sc, 0x06, 0x8e02);
19823         MP_WritePhyUshort(sc, 0x06, 0x31e8);
19824         MP_WritePhyUshort(sc, 0x06, 0xe08b);
19825         MP_WritePhyUshort(sc, 0x06, 0x8ead);
19826         MP_WritePhyUshort(sc, 0x06, 0x2405);
19827         MP_WritePhyUshort(sc, 0x06, 0xf624);
19828         MP_WritePhyUshort(sc, 0x06, 0xe48b);
19829         MP_WritePhyUshort(sc, 0x06, 0x8ee0);
19830         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
19831         MP_WritePhyUshort(sc, 0x06, 0xad25);
19832         MP_WritePhyUshort(sc, 0x06, 0x05f6);
19833         MP_WritePhyUshort(sc, 0x06, 0x25e4);
19834         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
19835         MP_WritePhyUshort(sc, 0x06, 0xe08b);
19836         MP_WritePhyUshort(sc, 0x06, 0x8ead);
19837         MP_WritePhyUshort(sc, 0x06, 0x2608);
19838         MP_WritePhyUshort(sc, 0x06, 0xf626);
19839         MP_WritePhyUshort(sc, 0x06, 0xe48b);
19840         MP_WritePhyUshort(sc, 0x06, 0x8e02);
19841         MP_WritePhyUshort(sc, 0x06, 0x2d8a);
19842         MP_WritePhyUshort(sc, 0x06, 0xe08b);
19843         MP_WritePhyUshort(sc, 0x06, 0x8ead);
19844         MP_WritePhyUshort(sc, 0x06, 0x2705);
19845         MP_WritePhyUshort(sc, 0x06, 0xf627);
19846         MP_WritePhyUshort(sc, 0x06, 0xe48b);
19847         MP_WritePhyUshort(sc, 0x06, 0x8e02);
19848         MP_WritePhyUshort(sc, 0x06, 0x0386);
19849         MP_WritePhyUshort(sc, 0x06, 0xfc04);
19850         MP_WritePhyUshort(sc, 0x06, 0xf8fa);
19851         MP_WritePhyUshort(sc, 0x06, 0xef69);
19852         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
19853         MP_WritePhyUshort(sc, 0x06, 0x00e1);
19854         MP_WritePhyUshort(sc, 0x06, 0xe001);
19855         MP_WritePhyUshort(sc, 0x06, 0xad27);
19856         MP_WritePhyUshort(sc, 0x06, 0x32e0);
19857         MP_WritePhyUshort(sc, 0x06, 0x8b40);
19858         MP_WritePhyUshort(sc, 0x06, 0xf720);
19859         MP_WritePhyUshort(sc, 0x06, 0xe48b);
19860         MP_WritePhyUshort(sc, 0x06, 0x40bf);
19861         MP_WritePhyUshort(sc, 0x06, 0x32c1);
19862         MP_WritePhyUshort(sc, 0x06, 0x0239);
19863         MP_WritePhyUshort(sc, 0x06, 0xf4ad);
19864         MP_WritePhyUshort(sc, 0x06, 0x2821);
19865         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
19866         MP_WritePhyUshort(sc, 0x06, 0x20e1);
19867         MP_WritePhyUshort(sc, 0x06, 0xe021);
19868         MP_WritePhyUshort(sc, 0x06, 0xad20);
19869         MP_WritePhyUshort(sc, 0x06, 0x18e0);
19870         MP_WritePhyUshort(sc, 0x06, 0x8b40);
19871         MP_WritePhyUshort(sc, 0x06, 0xf620);
19872         MP_WritePhyUshort(sc, 0x06, 0xe48b);
19873         MP_WritePhyUshort(sc, 0x06, 0x40ee);
19874         MP_WritePhyUshort(sc, 0x06, 0x8b3b);
19875         MP_WritePhyUshort(sc, 0x06, 0xffe0);
19876         MP_WritePhyUshort(sc, 0x06, 0x8a8a);
19877         MP_WritePhyUshort(sc, 0x06, 0xe18a);
19878         MP_WritePhyUshort(sc, 0x06, 0x8be4);
19879         MP_WritePhyUshort(sc, 0x06, 0xe000);
19880         MP_WritePhyUshort(sc, 0x06, 0xe5e0);
19881         MP_WritePhyUshort(sc, 0x06, 0x01ef);
19882         MP_WritePhyUshort(sc, 0x06, 0x96fe);
19883         MP_WritePhyUshort(sc, 0x06, 0xfc04);
19884         MP_WritePhyUshort(sc, 0x06, 0xf8f9);
19885         MP_WritePhyUshort(sc, 0x06, 0xface);
19886         MP_WritePhyUshort(sc, 0x06, 0xfaef);
19887         MP_WritePhyUshort(sc, 0x06, 0x69fa);
19888         MP_WritePhyUshort(sc, 0x06, 0xd401);
19889         MP_WritePhyUshort(sc, 0x06, 0x55b4);
19890         MP_WritePhyUshort(sc, 0x06, 0xfebf);
19891         MP_WritePhyUshort(sc, 0x06, 0x1c5e);
19892         MP_WritePhyUshort(sc, 0x06, 0x0239);
19893         MP_WritePhyUshort(sc, 0x06, 0xf4ac);
19894         MP_WritePhyUshort(sc, 0x06, 0x280b);
19895         MP_WritePhyUshort(sc, 0x06, 0xbf1c);
19896         MP_WritePhyUshort(sc, 0x06, 0x5b02);
19897         MP_WritePhyUshort(sc, 0x06, 0x39f4);
19898         MP_WritePhyUshort(sc, 0x06, 0xac28);
19899         MP_WritePhyUshort(sc, 0x06, 0x49ae);
19900         MP_WritePhyUshort(sc, 0x06, 0x64bf);
19901         MP_WritePhyUshort(sc, 0x06, 0x1c5b);
19902         MP_WritePhyUshort(sc, 0x06, 0x0239);
19903         MP_WritePhyUshort(sc, 0x06, 0xf4ac);
19904         MP_WritePhyUshort(sc, 0x06, 0x285b);
19905         MP_WritePhyUshort(sc, 0x06, 0xd000);
19906         MP_WritePhyUshort(sc, 0x06, 0x0282);
19907         MP_WritePhyUshort(sc, 0x06, 0x62ac);
19908         MP_WritePhyUshort(sc, 0x06, 0x2105);
19909         MP_WritePhyUshort(sc, 0x06, 0xac22);
19910         MP_WritePhyUshort(sc, 0x06, 0x02ae);
19911         MP_WritePhyUshort(sc, 0x06, 0x4ebf);
19912         MP_WritePhyUshort(sc, 0x06, 0xe0c4);
19913         MP_WritePhyUshort(sc, 0x06, 0xbe85);
19914         MP_WritePhyUshort(sc, 0x06, 0xecd2);
19915         MP_WritePhyUshort(sc, 0x06, 0x04d8);
19916         MP_WritePhyUshort(sc, 0x06, 0x19d9);
19917         MP_WritePhyUshort(sc, 0x06, 0x1907);
19918         MP_WritePhyUshort(sc, 0x06, 0xdc19);
19919         MP_WritePhyUshort(sc, 0x06, 0xdd19);
19920         MP_WritePhyUshort(sc, 0x06, 0x0789);
19921         MP_WritePhyUshort(sc, 0x06, 0x89ef);
19922         MP_WritePhyUshort(sc, 0x06, 0x645e);
19923         MP_WritePhyUshort(sc, 0x06, 0x07ff);
19924         MP_WritePhyUshort(sc, 0x06, 0x0d65);
19925         MP_WritePhyUshort(sc, 0x06, 0x5cf8);
19926         MP_WritePhyUshort(sc, 0x06, 0x001e);
19927         MP_WritePhyUshort(sc, 0x06, 0x46dc);
19928         MP_WritePhyUshort(sc, 0x06, 0x19dd);
19929         MP_WritePhyUshort(sc, 0x06, 0x19b2);
19930         MP_WritePhyUshort(sc, 0x06, 0xe2d4);
19931         MP_WritePhyUshort(sc, 0x06, 0x0001);
19932         MP_WritePhyUshort(sc, 0x06, 0xbf1c);
19933         MP_WritePhyUshort(sc, 0x06, 0x5b02);
19934         MP_WritePhyUshort(sc, 0x06, 0x3a21);
19935         MP_WritePhyUshort(sc, 0x06, 0xae1d);
19936         MP_WritePhyUshort(sc, 0x06, 0xbee0);
19937         MP_WritePhyUshort(sc, 0x06, 0xc4bf);
19938         MP_WritePhyUshort(sc, 0x06, 0x85ec);
19939         MP_WritePhyUshort(sc, 0x06, 0xd204);
19940         MP_WritePhyUshort(sc, 0x06, 0xd819);
19941         MP_WritePhyUshort(sc, 0x06, 0xd919);
19942         MP_WritePhyUshort(sc, 0x06, 0x07dc);
19943         MP_WritePhyUshort(sc, 0x06, 0x19dd);
19944         MP_WritePhyUshort(sc, 0x06, 0x1907);
19945         MP_WritePhyUshort(sc, 0x06, 0xb2f4);
19946         MP_WritePhyUshort(sc, 0x06, 0xd400);
19947         MP_WritePhyUshort(sc, 0x06, 0x00bf);
19948         MP_WritePhyUshort(sc, 0x06, 0x1c5b);
19949         MP_WritePhyUshort(sc, 0x06, 0x023a);
19950         MP_WritePhyUshort(sc, 0x06, 0x21fe);
19951         MP_WritePhyUshort(sc, 0x06, 0xef96);
19952         MP_WritePhyUshort(sc, 0x06, 0xfec6);
19953         MP_WritePhyUshort(sc, 0x06, 0xfefd);
19954         MP_WritePhyUshort(sc, 0x06, 0xfc05);
19955         MP_WritePhyUshort(sc, 0x06, 0xf9e2);
19956         MP_WritePhyUshort(sc, 0x06, 0xe0ea);
19957         MP_WritePhyUshort(sc, 0x06, 0xe3e0);
19958         MP_WritePhyUshort(sc, 0x06, 0xeb5a);
19959         MP_WritePhyUshort(sc, 0x06, 0x070c);
19960         MP_WritePhyUshort(sc, 0x06, 0x031e);
19961         MP_WritePhyUshort(sc, 0x06, 0x20e6);
19962         MP_WritePhyUshort(sc, 0x06, 0xe0ea);
19963         MP_WritePhyUshort(sc, 0x06, 0xe7e0);
19964         MP_WritePhyUshort(sc, 0x06, 0xebe0);
19965         MP_WritePhyUshort(sc, 0x06, 0xe0fc);
19966         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
19967         MP_WritePhyUshort(sc, 0x06, 0xfdfd);
19968         MP_WritePhyUshort(sc, 0x06, 0x04f8);
19969         MP_WritePhyUshort(sc, 0x06, 0xfaef);
19970         MP_WritePhyUshort(sc, 0x06, 0x69e0);
19971         MP_WritePhyUshort(sc, 0x06, 0x8b80);
19972         MP_WritePhyUshort(sc, 0x06, 0xad27);
19973         MP_WritePhyUshort(sc, 0x06, 0x22bf);
19974         MP_WritePhyUshort(sc, 0x06, 0x47ba);
19975         MP_WritePhyUshort(sc, 0x06, 0x0239);
19976         MP_WritePhyUshort(sc, 0x06, 0xf4e0);
19977         MP_WritePhyUshort(sc, 0x06, 0x8b44);
19978         MP_WritePhyUshort(sc, 0x06, 0x1f01);
19979         MP_WritePhyUshort(sc, 0x06, 0x9e15);
19980         MP_WritePhyUshort(sc, 0x06, 0xe58b);
19981         MP_WritePhyUshort(sc, 0x06, 0x44ad);
19982         MP_WritePhyUshort(sc, 0x06, 0x2907);
19983         MP_WritePhyUshort(sc, 0x06, 0xac28);
19984         MP_WritePhyUshort(sc, 0x06, 0x04d1);
19985         MP_WritePhyUshort(sc, 0x06, 0x01ae);
19986         MP_WritePhyUshort(sc, 0x06, 0x02d1);
19987         MP_WritePhyUshort(sc, 0x06, 0x00bf);
19988         MP_WritePhyUshort(sc, 0x06, 0x8342);
19989         MP_WritePhyUshort(sc, 0x06, 0x023a);
19990         MP_WritePhyUshort(sc, 0x06, 0x21ef);
19991         MP_WritePhyUshort(sc, 0x06, 0x96fe);
19992         MP_WritePhyUshort(sc, 0x06, 0xfc04);
19993         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
19994         MP_WritePhyUshort(sc, 0x06, 0x8b85);
19995         MP_WritePhyUshort(sc, 0x06, 0xad26);
19996         MP_WritePhyUshort(sc, 0x06, 0x30e0);
19997         MP_WritePhyUshort(sc, 0x06, 0xe036);
19998         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
19999         MP_WritePhyUshort(sc, 0x06, 0x37e1);
20000         MP_WritePhyUshort(sc, 0x06, 0x8b3f);
20001         MP_WritePhyUshort(sc, 0x06, 0x1f10);
20002         MP_WritePhyUshort(sc, 0x06, 0x9e23);
20003         MP_WritePhyUshort(sc, 0x06, 0xe48b);
20004         MP_WritePhyUshort(sc, 0x06, 0x3fac);
20005         MP_WritePhyUshort(sc, 0x06, 0x200b);
20006         MP_WritePhyUshort(sc, 0x06, 0xac21);
20007         MP_WritePhyUshort(sc, 0x06, 0x0dac);
20008         MP_WritePhyUshort(sc, 0x06, 0x250f);
20009         MP_WritePhyUshort(sc, 0x06, 0xac27);
20010         MP_WritePhyUshort(sc, 0x06, 0x11ae);
20011         MP_WritePhyUshort(sc, 0x06, 0x1202);
20012         MP_WritePhyUshort(sc, 0x06, 0x2cb5);
20013         MP_WritePhyUshort(sc, 0x06, 0xae0d);
20014         MP_WritePhyUshort(sc, 0x06, 0x0282);
20015         MP_WritePhyUshort(sc, 0x06, 0xe7ae);
20016         MP_WritePhyUshort(sc, 0x06, 0x0802);
20017         MP_WritePhyUshort(sc, 0x06, 0x2cd7);
20018         MP_WritePhyUshort(sc, 0x06, 0xae03);
20019         MP_WritePhyUshort(sc, 0x06, 0x022c);
20020         MP_WritePhyUshort(sc, 0x06, 0xeafc);
20021         MP_WritePhyUshort(sc, 0x06, 0x04f8);
20022         MP_WritePhyUshort(sc, 0x06, 0xfaef);
20023         MP_WritePhyUshort(sc, 0x06, 0x6902);
20024         MP_WritePhyUshort(sc, 0x06, 0x8304);
20025         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
20026         MP_WritePhyUshort(sc, 0x06, 0x14e1);
20027         MP_WritePhyUshort(sc, 0x06, 0xe015);
20028         MP_WritePhyUshort(sc, 0x06, 0xad26);
20029         MP_WritePhyUshort(sc, 0x06, 0x08d1);
20030         MP_WritePhyUshort(sc, 0x06, 0x1ebf);
20031         MP_WritePhyUshort(sc, 0x06, 0x2d47);
20032         MP_WritePhyUshort(sc, 0x06, 0x023a);
20033         MP_WritePhyUshort(sc, 0x06, 0x21ef);
20034         MP_WritePhyUshort(sc, 0x06, 0x96fe);
20035         MP_WritePhyUshort(sc, 0x06, 0xfc04);
20036         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
20037         MP_WritePhyUshort(sc, 0x06, 0x8b85);
20038         MP_WritePhyUshort(sc, 0x06, 0xad27);
20039         MP_WritePhyUshort(sc, 0x06, 0x2fd0);
20040         MP_WritePhyUshort(sc, 0x06, 0x0b02);
20041         MP_WritePhyUshort(sc, 0x06, 0x3826);
20042         MP_WritePhyUshort(sc, 0x06, 0x5882);
20043         MP_WritePhyUshort(sc, 0x06, 0x7882);
20044         MP_WritePhyUshort(sc, 0x06, 0x9f24);
20045         MP_WritePhyUshort(sc, 0x06, 0xe08b);
20046         MP_WritePhyUshort(sc, 0x06, 0x32e1);
20047         MP_WritePhyUshort(sc, 0x06, 0x8b33);
20048         MP_WritePhyUshort(sc, 0x06, 0x1f10);
20049         MP_WritePhyUshort(sc, 0x06, 0x9e1a);
20050         MP_WritePhyUshort(sc, 0x06, 0x10e4);
20051         MP_WritePhyUshort(sc, 0x06, 0x8b32);
20052         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
20053         MP_WritePhyUshort(sc, 0x06, 0x28e1);
20054         MP_WritePhyUshort(sc, 0x06, 0xe029);
20055         MP_WritePhyUshort(sc, 0x06, 0xf72c);
20056         MP_WritePhyUshort(sc, 0x06, 0xe4e0);
20057         MP_WritePhyUshort(sc, 0x06, 0x28e5);
20058         MP_WritePhyUshort(sc, 0x06, 0xe029);
20059         MP_WritePhyUshort(sc, 0x06, 0xf62c);
20060         MP_WritePhyUshort(sc, 0x06, 0xe4e0);
20061         MP_WritePhyUshort(sc, 0x06, 0x28e5);
20062         MP_WritePhyUshort(sc, 0x06, 0xe029);
20063         MP_WritePhyUshort(sc, 0x06, 0xfc04);
20064         MP_WritePhyUshort(sc, 0x06, 0x00e1);
20065         MP_WritePhyUshort(sc, 0x06, 0x4077);
20066         MP_WritePhyUshort(sc, 0x06, 0xe140);
20067         MP_WritePhyUshort(sc, 0x06, 0xbbe0);
20068         MP_WritePhyUshort(sc, 0x06, 0x2a00);
20069         MP_WritePhyUshort(sc, 0x05, 0xe142);
20070         PhyRegValue = MP_ReadPhyUshort(sc, 0x06);
20071         PhyRegValue |= BIT_0;
20072         MP_WritePhyUshort(sc, 0x06,PhyRegValue);
20073         MP_WritePhyUshort(sc, 0x05, 0xe140);
20074         PhyRegValue = MP_ReadPhyUshort(sc, 0x06);
20075         PhyRegValue |= BIT_0;
20076         MP_WritePhyUshort(sc, 0x06, PhyRegValue);
20077         MP_WritePhyUshort(sc, 0x1f, 0x0000);
20078         MP_WritePhyUshort(sc, 0x1f, 0x0005);
20079         for (i = 0; i < 200; i++) {
20080                 DELAY(100);
20081                 PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
20082                 if (PhyRegValue & BIT_7)
20083                         break;
20084         }
20085         MP_WritePhyUshort(sc, 0x1f, 0x0007);
20086         MP_WritePhyUshort(sc, 0x1e, 0x0023);
20087         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
20088         PhyRegValue |= BIT_1;
20089         if (sc->RequiredSecLanDonglePatch)
20090                 PhyRegValue &= ~(BIT_2);
20091         MP_WritePhyUshort(sc, 0x17, PhyRegValue);
20092         MP_WritePhyUshort(sc, 0x1f, 0x0000);
20093         MP_WritePhyUshort(sc, 0x1f, 0x0003);
20094         MP_WritePhyUshort(sc, 0x09, 0xA20F);
20095         MP_WritePhyUshort(sc, 0x1f, 0x0000);
20096         MP_WritePhyUshort(sc, 0x1f, 0x0003);
20097         MP_WritePhyUshort(sc, 0x01, 0x328A);
20098         MP_WritePhyUshort(sc, 0x1f, 0x0000);
20099         MP_WritePhyUshort(sc, 0x1f, 0x0003);
20100         PhyRegValue = MP_ReadPhyUshort(sc, 0x19);
20101         PhyRegValue &= ~BIT_0;
20102         MP_WritePhyUshort(sc, 0x19, PhyRegValue);
20103         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
20104         PhyRegValue &= ~BIT_10;
20105         MP_WritePhyUshort(sc, 0x10, PhyRegValue);
20106         MP_WritePhyUshort(sc, 0x1f, 0x0000);
20107         MP_WritePhyUshort(sc, 0x00, 0x9200);
20108 }
20109 
20110 static void re_set_phy_mcu_8168g_1(struct re_softc *sc)
20111 {
20112         u_int16_t PhyRegValue;
20113 
20114         re_set_phy_mcu_patch_request(sc);
20115 
20116         MP_WritePhyUshort(sc, 0x1f, 0x0A43);
20117         MP_WritePhyUshort(sc, 0x13, 0x8146);
20118         MP_WritePhyUshort(sc, 0x14, 0x2300);
20119         MP_WritePhyUshort(sc, 0x13, 0xB820);
20120         MP_WritePhyUshort(sc, 0x14, 0x0210);
20121 
20122         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
20123         MP_WritePhyUshort(sc, 0x13, 0xB820);
20124         MP_WritePhyUshort(sc, 0x14, 0x0290);
20125         MP_WritePhyUshort(sc, 0x13, 0xA012);
20126         MP_WritePhyUshort(sc, 0x14, 0x0000);
20127         MP_WritePhyUshort(sc, 0x13, 0xA014);
20128         MP_WritePhyUshort(sc, 0x14, 0x2c04);
20129         MP_WritePhyUshort(sc, 0x14, 0x2c0c);
20130         MP_WritePhyUshort(sc, 0x14, 0x2c6c);
20131         MP_WritePhyUshort(sc, 0x14, 0x2d0d);
20132         MP_WritePhyUshort(sc, 0x14, 0x31ce);
20133         MP_WritePhyUshort(sc, 0x14, 0x506d);
20134         MP_WritePhyUshort(sc, 0x14, 0xd708);
20135         MP_WritePhyUshort(sc, 0x14, 0x3108);
20136         MP_WritePhyUshort(sc, 0x14, 0x106d);
20137         MP_WritePhyUshort(sc, 0x14, 0x1560);
20138         MP_WritePhyUshort(sc, 0x14, 0x15a9);
20139         MP_WritePhyUshort(sc, 0x14, 0x206e);
20140         MP_WritePhyUshort(sc, 0x14, 0x175b);
20141         MP_WritePhyUshort(sc, 0x14, 0x6062);
20142         MP_WritePhyUshort(sc, 0x14, 0xd700);
20143         MP_WritePhyUshort(sc, 0x14, 0x5fae);
20144         MP_WritePhyUshort(sc, 0x14, 0xd708);
20145         MP_WritePhyUshort(sc, 0x14, 0x3107);
20146         MP_WritePhyUshort(sc, 0x14, 0x4c1e);
20147         MP_WritePhyUshort(sc, 0x14, 0x4169);
20148         MP_WritePhyUshort(sc, 0x14, 0x316a);
20149         MP_WritePhyUshort(sc, 0x14, 0x0c19);
20150         MP_WritePhyUshort(sc, 0x14, 0x31aa);
20151         MP_WritePhyUshort(sc, 0x14, 0x0c19);
20152         MP_WritePhyUshort(sc, 0x14, 0x2c1b);
20153         MP_WritePhyUshort(sc, 0x14, 0x5e62);
20154         MP_WritePhyUshort(sc, 0x14, 0x26b5);
20155         MP_WritePhyUshort(sc, 0x14, 0x31ab);
20156         MP_WritePhyUshort(sc, 0x14, 0x5c1e);
20157         MP_WritePhyUshort(sc, 0x14, 0x2c0c);
20158         MP_WritePhyUshort(sc, 0x14, 0xc040);
20159         MP_WritePhyUshort(sc, 0x14, 0x8808);
20160         MP_WritePhyUshort(sc, 0x14, 0xc520);
20161         MP_WritePhyUshort(sc, 0x14, 0xc421);
20162         MP_WritePhyUshort(sc, 0x14, 0xd05a);
20163         MP_WritePhyUshort(sc, 0x14, 0xd19a);
20164         MP_WritePhyUshort(sc, 0x14, 0xd709);
20165         MP_WritePhyUshort(sc, 0x14, 0x608f);
20166         MP_WritePhyUshort(sc, 0x14, 0xd06b);
20167         MP_WritePhyUshort(sc, 0x14, 0xd18a);
20168         MP_WritePhyUshort(sc, 0x14, 0x2c2c);
20169         MP_WritePhyUshort(sc, 0x14, 0xd0be);
20170         MP_WritePhyUshort(sc, 0x14, 0xd188);
20171         MP_WritePhyUshort(sc, 0x14, 0x2c2c);
20172         MP_WritePhyUshort(sc, 0x14, 0xd708);
20173         MP_WritePhyUshort(sc, 0x14, 0x4072);
20174         MP_WritePhyUshort(sc, 0x14, 0xc104);
20175         MP_WritePhyUshort(sc, 0x14, 0x2c3e);
20176         MP_WritePhyUshort(sc, 0x14, 0x4076);
20177         MP_WritePhyUshort(sc, 0x14, 0xc110);
20178         MP_WritePhyUshort(sc, 0x14, 0x2c3e);
20179         MP_WritePhyUshort(sc, 0x14, 0x4071);
20180         MP_WritePhyUshort(sc, 0x14, 0xc102);
20181         MP_WritePhyUshort(sc, 0x14, 0x2c3e);
20182         MP_WritePhyUshort(sc, 0x14, 0x4070);
20183         MP_WritePhyUshort(sc, 0x14, 0xc101);
20184         MP_WritePhyUshort(sc, 0x14, 0x2c3e);
20185         MP_WritePhyUshort(sc, 0x14, 0x175b);
20186         MP_WritePhyUshort(sc, 0x14, 0xd709);
20187         MP_WritePhyUshort(sc, 0x14, 0x3390);
20188         MP_WritePhyUshort(sc, 0x14, 0x5c39);
20189         MP_WritePhyUshort(sc, 0x14, 0x2c4e);
20190         MP_WritePhyUshort(sc, 0x14, 0x175b);
20191         MP_WritePhyUshort(sc, 0x14, 0xd708);
20192         MP_WritePhyUshort(sc, 0x14, 0x6193);
20193         MP_WritePhyUshort(sc, 0x14, 0xd709);
20194         MP_WritePhyUshort(sc, 0x14, 0x5f9d);
20195         MP_WritePhyUshort(sc, 0x14, 0x408b);
20196         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20197         MP_WritePhyUshort(sc, 0x14, 0x6042);
20198         MP_WritePhyUshort(sc, 0x14, 0xb401);
20199         MP_WritePhyUshort(sc, 0x14, 0x175b);
20200         MP_WritePhyUshort(sc, 0x14, 0xd708);
20201         MP_WritePhyUshort(sc, 0x14, 0x6073);
20202         MP_WritePhyUshort(sc, 0x14, 0x5fbc);
20203         MP_WritePhyUshort(sc, 0x14, 0x2c4d);
20204         MP_WritePhyUshort(sc, 0x14, 0x26ed);
20205         MP_WritePhyUshort(sc, 0x14, 0xb280);
20206         MP_WritePhyUshort(sc, 0x14, 0xa841);
20207         MP_WritePhyUshort(sc, 0x14, 0x9420);
20208         MP_WritePhyUshort(sc, 0x14, 0x8710);
20209         MP_WritePhyUshort(sc, 0x14, 0xd709);
20210         MP_WritePhyUshort(sc, 0x14, 0x42ec);
20211         MP_WritePhyUshort(sc, 0x14, 0x606d);
20212         MP_WritePhyUshort(sc, 0x14, 0xd207);
20213         MP_WritePhyUshort(sc, 0x14, 0x2c57);
20214         MP_WritePhyUshort(sc, 0x14, 0xd203);
20215         MP_WritePhyUshort(sc, 0x14, 0x33ff);
20216         MP_WritePhyUshort(sc, 0x14, 0x563b);
20217         MP_WritePhyUshort(sc, 0x14, 0x3275);
20218         MP_WritePhyUshort(sc, 0x14, 0x7c5e);
20219         MP_WritePhyUshort(sc, 0x14, 0xb240);
20220         MP_WritePhyUshort(sc, 0x14, 0xb402);
20221         MP_WritePhyUshort(sc, 0x14, 0x263b);
20222         MP_WritePhyUshort(sc, 0x14, 0x6096);
20223         MP_WritePhyUshort(sc, 0x14, 0xb240);
20224         MP_WritePhyUshort(sc, 0x14, 0xb406);
20225         MP_WritePhyUshort(sc, 0x14, 0x263b);
20226         MP_WritePhyUshort(sc, 0x14, 0x31d7);
20227         MP_WritePhyUshort(sc, 0x14, 0x7c67);
20228         MP_WritePhyUshort(sc, 0x14, 0xb240);
20229         MP_WritePhyUshort(sc, 0x14, 0xb40e);
20230         MP_WritePhyUshort(sc, 0x14, 0x263b);
20231         MP_WritePhyUshort(sc, 0x14, 0xb410);
20232         MP_WritePhyUshort(sc, 0x14, 0x8802);
20233         MP_WritePhyUshort(sc, 0x14, 0xb240);
20234         MP_WritePhyUshort(sc, 0x14, 0x940e);
20235         MP_WritePhyUshort(sc, 0x14, 0x263b);
20236         MP_WritePhyUshort(sc, 0x14, 0xba04);
20237         MP_WritePhyUshort(sc, 0x14, 0x1cd6);
20238         MP_WritePhyUshort(sc, 0x14, 0xa902);
20239         MP_WritePhyUshort(sc, 0x14, 0xd711);
20240         MP_WritePhyUshort(sc, 0x14, 0x4045);
20241         MP_WritePhyUshort(sc, 0x14, 0xa980);
20242         MP_WritePhyUshort(sc, 0x14, 0x3003);
20243         MP_WritePhyUshort(sc, 0x14, 0x59b1);
20244         MP_WritePhyUshort(sc, 0x14, 0xa540);
20245         MP_WritePhyUshort(sc, 0x14, 0xa601);
20246         MP_WritePhyUshort(sc, 0x14, 0xd710);
20247         MP_WritePhyUshort(sc, 0x14, 0x4043);
20248         MP_WritePhyUshort(sc, 0x14, 0xa910);
20249         MP_WritePhyUshort(sc, 0x14, 0xd711);
20250         MP_WritePhyUshort(sc, 0x14, 0x60a0);
20251         MP_WritePhyUshort(sc, 0x14, 0xca33);
20252         MP_WritePhyUshort(sc, 0x14, 0xcb33);
20253         MP_WritePhyUshort(sc, 0x14, 0xa941);
20254         MP_WritePhyUshort(sc, 0x14, 0x2c82);
20255         MP_WritePhyUshort(sc, 0x14, 0xcaff);
20256         MP_WritePhyUshort(sc, 0x14, 0xcbff);
20257         MP_WritePhyUshort(sc, 0x14, 0xa921);
20258         MP_WritePhyUshort(sc, 0x14, 0xce02);
20259         MP_WritePhyUshort(sc, 0x14, 0xe070);
20260         MP_WritePhyUshort(sc, 0x14, 0x0f10);
20261         MP_WritePhyUshort(sc, 0x14, 0xaf01);
20262         MP_WritePhyUshort(sc, 0x14, 0x8f01);
20263         MP_WritePhyUshort(sc, 0x14, 0x1766);
20264         MP_WritePhyUshort(sc, 0x14, 0x8e02);
20265         MP_WritePhyUshort(sc, 0x14, 0x1787);
20266         MP_WritePhyUshort(sc, 0x14, 0xd710);
20267         MP_WritePhyUshort(sc, 0x14, 0x609c);
20268         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20269         MP_WritePhyUshort(sc, 0x14, 0x7fa4);
20270         MP_WritePhyUshort(sc, 0x14, 0x2cd4);
20271         MP_WritePhyUshort(sc, 0x14, 0x1ce9);
20272         MP_WritePhyUshort(sc, 0x14, 0xce04);
20273         MP_WritePhyUshort(sc, 0x14, 0xe070);
20274         MP_WritePhyUshort(sc, 0x14, 0x0f20);
20275         MP_WritePhyUshort(sc, 0x14, 0xaf01);
20276         MP_WritePhyUshort(sc, 0x14, 0x8f01);
20277         MP_WritePhyUshort(sc, 0x14, 0x1766);
20278         MP_WritePhyUshort(sc, 0x14, 0x8e04);
20279         MP_WritePhyUshort(sc, 0x14, 0x6044);
20280         MP_WritePhyUshort(sc, 0x14, 0x2cd4);
20281         MP_WritePhyUshort(sc, 0x14, 0xa520);
20282         MP_WritePhyUshort(sc, 0x14, 0xd710);
20283         MP_WritePhyUshort(sc, 0x14, 0x4043);
20284         MP_WritePhyUshort(sc, 0x14, 0x2cc1);
20285         MP_WritePhyUshort(sc, 0x14, 0xe00f);
20286         MP_WritePhyUshort(sc, 0x14, 0x0501);
20287         MP_WritePhyUshort(sc, 0x14, 0x1cef);
20288         MP_WritePhyUshort(sc, 0x14, 0xb801);
20289         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20290         MP_WritePhyUshort(sc, 0x14, 0x4060);
20291         MP_WritePhyUshort(sc, 0x14, 0x7fc4);
20292         MP_WritePhyUshort(sc, 0x14, 0x2cd4);
20293         MP_WritePhyUshort(sc, 0x14, 0x1cf5);
20294         MP_WritePhyUshort(sc, 0x14, 0xe00f);
20295         MP_WritePhyUshort(sc, 0x14, 0x0502);
20296         MP_WritePhyUshort(sc, 0x14, 0x1cef);
20297         MP_WritePhyUshort(sc, 0x14, 0xb802);
20298         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20299         MP_WritePhyUshort(sc, 0x14, 0x4061);
20300         MP_WritePhyUshort(sc, 0x14, 0x7fc4);
20301         MP_WritePhyUshort(sc, 0x14, 0x2cd4);
20302         MP_WritePhyUshort(sc, 0x14, 0x1cf5);
20303         MP_WritePhyUshort(sc, 0x14, 0xe00f);
20304         MP_WritePhyUshort(sc, 0x14, 0x0504);
20305         MP_WritePhyUshort(sc, 0x14, 0xd710);
20306         MP_WritePhyUshort(sc, 0x14, 0x6099);
20307         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20308         MP_WritePhyUshort(sc, 0x14, 0x7fa4);
20309         MP_WritePhyUshort(sc, 0x14, 0x2cd4);
20310         MP_WritePhyUshort(sc, 0x14, 0xc17f);
20311         MP_WritePhyUshort(sc, 0x14, 0xc200);
20312         MP_WritePhyUshort(sc, 0x14, 0xc43f);
20313         MP_WritePhyUshort(sc, 0x14, 0xcc03);
20314         MP_WritePhyUshort(sc, 0x14, 0xa701);
20315         MP_WritePhyUshort(sc, 0x14, 0xa510);
20316         MP_WritePhyUshort(sc, 0x14, 0xd710);
20317         MP_WritePhyUshort(sc, 0x14, 0x4018);
20318         MP_WritePhyUshort(sc, 0x14, 0x9910);
20319         MP_WritePhyUshort(sc, 0x14, 0x8510);
20320         MP_WritePhyUshort(sc, 0x14, 0x2860);
20321         MP_WritePhyUshort(sc, 0x14, 0xe00f);
20322         MP_WritePhyUshort(sc, 0x14, 0x0504);
20323         MP_WritePhyUshort(sc, 0x14, 0xd710);
20324         MP_WritePhyUshort(sc, 0x14, 0x6099);
20325         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20326         MP_WritePhyUshort(sc, 0x14, 0x7fa4);
20327         MP_WritePhyUshort(sc, 0x14, 0x2cd4);
20328         MP_WritePhyUshort(sc, 0x14, 0xa608);
20329         MP_WritePhyUshort(sc, 0x14, 0xc17d);
20330         MP_WritePhyUshort(sc, 0x14, 0xc200);
20331         MP_WritePhyUshort(sc, 0x14, 0xc43f);
20332         MP_WritePhyUshort(sc, 0x14, 0xcc03);
20333         MP_WritePhyUshort(sc, 0x14, 0xa701);
20334         MP_WritePhyUshort(sc, 0x14, 0xa510);
20335         MP_WritePhyUshort(sc, 0x14, 0xd710);
20336         MP_WritePhyUshort(sc, 0x14, 0x4018);
20337         MP_WritePhyUshort(sc, 0x14, 0x9910);
20338         MP_WritePhyUshort(sc, 0x14, 0x8510);
20339         MP_WritePhyUshort(sc, 0x14, 0x2926);
20340         MP_WritePhyUshort(sc, 0x14, 0x1792);
20341         MP_WritePhyUshort(sc, 0x14, 0x27db);
20342         MP_WritePhyUshort(sc, 0x14, 0xc000);
20343         MP_WritePhyUshort(sc, 0x14, 0xc100);
20344         MP_WritePhyUshort(sc, 0x14, 0xc200);
20345         MP_WritePhyUshort(sc, 0x14, 0xc300);
20346         MP_WritePhyUshort(sc, 0x14, 0xc400);
20347         MP_WritePhyUshort(sc, 0x14, 0xc500);
20348         MP_WritePhyUshort(sc, 0x14, 0xc600);
20349         MP_WritePhyUshort(sc, 0x14, 0xc7c1);
20350         MP_WritePhyUshort(sc, 0x14, 0xc800);
20351         MP_WritePhyUshort(sc, 0x14, 0xcc00);
20352         MP_WritePhyUshort(sc, 0x14, 0x0800);
20353         MP_WritePhyUshort(sc, 0x14, 0xca0f);
20354         MP_WritePhyUshort(sc, 0x14, 0xcbff);
20355         MP_WritePhyUshort(sc, 0x14, 0xa901);
20356         MP_WritePhyUshort(sc, 0x14, 0x8902);
20357         MP_WritePhyUshort(sc, 0x14, 0xc900);
20358         MP_WritePhyUshort(sc, 0x14, 0xca00);
20359         MP_WritePhyUshort(sc, 0x14, 0xcb00);
20360         MP_WritePhyUshort(sc, 0x14, 0x0800);
20361         MP_WritePhyUshort(sc, 0x14, 0xb804);
20362         MP_WritePhyUshort(sc, 0x14, 0x0800);
20363         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20364         MP_WritePhyUshort(sc, 0x14, 0x6044);
20365         MP_WritePhyUshort(sc, 0x14, 0x9804);
20366         MP_WritePhyUshort(sc, 0x14, 0x0800);
20367         MP_WritePhyUshort(sc, 0x14, 0xd710);
20368         MP_WritePhyUshort(sc, 0x14, 0x6099);
20369         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20370         MP_WritePhyUshort(sc, 0x14, 0x7fa4);
20371         MP_WritePhyUshort(sc, 0x14, 0x2cd4);
20372         MP_WritePhyUshort(sc, 0x14, 0x0800);
20373         MP_WritePhyUshort(sc, 0x14, 0xa510);
20374         MP_WritePhyUshort(sc, 0x14, 0xd710);
20375         MP_WritePhyUshort(sc, 0x14, 0x6098);
20376         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20377         MP_WritePhyUshort(sc, 0x14, 0x7fa4);
20378         MP_WritePhyUshort(sc, 0x14, 0x2cd4);
20379         MP_WritePhyUshort(sc, 0x14, 0x8510);
20380         MP_WritePhyUshort(sc, 0x14, 0x0800);
20381         MP_WritePhyUshort(sc, 0x14, 0xd711);
20382         MP_WritePhyUshort(sc, 0x14, 0x3003);
20383         MP_WritePhyUshort(sc, 0x14, 0x1d01);
20384         MP_WritePhyUshort(sc, 0x14, 0x2d0b);
20385         MP_WritePhyUshort(sc, 0x14, 0xd710);
20386         MP_WritePhyUshort(sc, 0x14, 0x60be);
20387         MP_WritePhyUshort(sc, 0x14, 0xe060);
20388         MP_WritePhyUshort(sc, 0x14, 0x0920);
20389         MP_WritePhyUshort(sc, 0x14, 0x1cd6);
20390         MP_WritePhyUshort(sc, 0x14, 0x2c89);
20391         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20392         MP_WritePhyUshort(sc, 0x14, 0x3063);
20393         MP_WritePhyUshort(sc, 0x14, 0x1948);
20394         MP_WritePhyUshort(sc, 0x14, 0x288a);
20395         MP_WritePhyUshort(sc, 0x14, 0x1cd6);
20396         MP_WritePhyUshort(sc, 0x14, 0x29bd);
20397         MP_WritePhyUshort(sc, 0x14, 0xa802);
20398         MP_WritePhyUshort(sc, 0x14, 0xa303);
20399         MP_WritePhyUshort(sc, 0x14, 0x843f);
20400         MP_WritePhyUshort(sc, 0x14, 0x81ff);
20401         MP_WritePhyUshort(sc, 0x14, 0x8208);
20402         MP_WritePhyUshort(sc, 0x14, 0xa201);
20403         MP_WritePhyUshort(sc, 0x14, 0xc001);
20404         MP_WritePhyUshort(sc, 0x14, 0xd710);
20405         MP_WritePhyUshort(sc, 0x14, 0x30a0);
20406         MP_WritePhyUshort(sc, 0x14, 0x0d1c);
20407         MP_WritePhyUshort(sc, 0x14, 0x30a0);
20408         MP_WritePhyUshort(sc, 0x14, 0x3d13);
20409         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20410         MP_WritePhyUshort(sc, 0x14, 0x7f4c);
20411         MP_WritePhyUshort(sc, 0x14, 0x2ab6);
20412         MP_WritePhyUshort(sc, 0x14, 0xe003);
20413         MP_WritePhyUshort(sc, 0x14, 0x0202);
20414         MP_WritePhyUshort(sc, 0x14, 0xd710);
20415         MP_WritePhyUshort(sc, 0x14, 0x6090);
20416         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20417         MP_WritePhyUshort(sc, 0x14, 0x7fac);
20418         MP_WritePhyUshort(sc, 0x14, 0x2ab6);
20419         MP_WritePhyUshort(sc, 0x14, 0xa20c);
20420         MP_WritePhyUshort(sc, 0x14, 0xd710);
20421         MP_WritePhyUshort(sc, 0x14, 0x6091);
20422         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20423         MP_WritePhyUshort(sc, 0x14, 0x7fac);
20424         MP_WritePhyUshort(sc, 0x14, 0x2ab6);
20425         MP_WritePhyUshort(sc, 0x14, 0x820e);
20426         MP_WritePhyUshort(sc, 0x14, 0xa3e0);
20427         MP_WritePhyUshort(sc, 0x14, 0xa520);
20428         MP_WritePhyUshort(sc, 0x14, 0xd710);
20429         MP_WritePhyUshort(sc, 0x14, 0x609d);
20430         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20431         MP_WritePhyUshort(sc, 0x14, 0x7fac);
20432         MP_WritePhyUshort(sc, 0x14, 0x2ab6);
20433         MP_WritePhyUshort(sc, 0x14, 0x8520);
20434         MP_WritePhyUshort(sc, 0x14, 0x6703);
20435         MP_WritePhyUshort(sc, 0x14, 0x2d34);
20436         MP_WritePhyUshort(sc, 0x14, 0xa13e);
20437         MP_WritePhyUshort(sc, 0x14, 0xc001);
20438         MP_WritePhyUshort(sc, 0x14, 0xd710);
20439         MP_WritePhyUshort(sc, 0x14, 0x4000);
20440         MP_WritePhyUshort(sc, 0x14, 0x6046);
20441         MP_WritePhyUshort(sc, 0x14, 0x2d0d);
20442         MP_WritePhyUshort(sc, 0x14, 0xa43f);
20443         MP_WritePhyUshort(sc, 0x14, 0xa101);
20444         MP_WritePhyUshort(sc, 0x14, 0xc020);
20445         MP_WritePhyUshort(sc, 0x14, 0xd710);
20446         MP_WritePhyUshort(sc, 0x14, 0x3121);
20447         MP_WritePhyUshort(sc, 0x14, 0x0d45);
20448         MP_WritePhyUshort(sc, 0x14, 0x30c0);
20449         MP_WritePhyUshort(sc, 0x14, 0x3d0d);
20450         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20451         MP_WritePhyUshort(sc, 0x14, 0x7f4c);
20452         MP_WritePhyUshort(sc, 0x14, 0x2ab6);
20453         MP_WritePhyUshort(sc, 0x14, 0xa540);
20454         MP_WritePhyUshort(sc, 0x14, 0xc001);
20455         MP_WritePhyUshort(sc, 0x14, 0xd710);
20456         MP_WritePhyUshort(sc, 0x14, 0x4001);
20457         MP_WritePhyUshort(sc, 0x14, 0xe00f);
20458         MP_WritePhyUshort(sc, 0x14, 0x0501);
20459         MP_WritePhyUshort(sc, 0x14, 0x1dac);
20460         MP_WritePhyUshort(sc, 0x14, 0xc1c4);
20461         MP_WritePhyUshort(sc, 0x14, 0xa268);
20462         MP_WritePhyUshort(sc, 0x14, 0xa303);
20463         MP_WritePhyUshort(sc, 0x14, 0x8420);
20464         MP_WritePhyUshort(sc, 0x14, 0xe00f);
20465         MP_WritePhyUshort(sc, 0x14, 0x0502);
20466         MP_WritePhyUshort(sc, 0x14, 0x1dac);
20467         MP_WritePhyUshort(sc, 0x14, 0xc002);
20468         MP_WritePhyUshort(sc, 0x14, 0xd710);
20469         MP_WritePhyUshort(sc, 0x14, 0x4000);
20470         MP_WritePhyUshort(sc, 0x14, 0x8208);
20471         MP_WritePhyUshort(sc, 0x14, 0x8410);
20472         MP_WritePhyUshort(sc, 0x14, 0xa121);
20473         MP_WritePhyUshort(sc, 0x14, 0xc002);
20474         MP_WritePhyUshort(sc, 0x14, 0xd710);
20475         MP_WritePhyUshort(sc, 0x14, 0x4000);
20476         MP_WritePhyUshort(sc, 0x14, 0x8120);
20477         MP_WritePhyUshort(sc, 0x14, 0x8180);
20478         MP_WritePhyUshort(sc, 0x14, 0x1d97);
20479         MP_WritePhyUshort(sc, 0x14, 0xa180);
20480         MP_WritePhyUshort(sc, 0x14, 0xa13a);
20481         MP_WritePhyUshort(sc, 0x14, 0x8240);
20482         MP_WritePhyUshort(sc, 0x14, 0xa430);
20483         MP_WritePhyUshort(sc, 0x14, 0xc010);
20484         MP_WritePhyUshort(sc, 0x14, 0xd710);
20485         MP_WritePhyUshort(sc, 0x14, 0x30e1);
20486         MP_WritePhyUshort(sc, 0x14, 0x0abc);
20487         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20488         MP_WritePhyUshort(sc, 0x14, 0x7f8c);
20489         MP_WritePhyUshort(sc, 0x14, 0x2ab6);
20490         MP_WritePhyUshort(sc, 0x14, 0xa480);
20491         MP_WritePhyUshort(sc, 0x14, 0xa230);
20492         MP_WritePhyUshort(sc, 0x14, 0xa303);
20493         MP_WritePhyUshort(sc, 0x14, 0xc001);
20494         MP_WritePhyUshort(sc, 0x14, 0xd70c);
20495         MP_WritePhyUshort(sc, 0x14, 0x4124);
20496         MP_WritePhyUshort(sc, 0x14, 0xd710);
20497         MP_WritePhyUshort(sc, 0x14, 0x6120);
20498         MP_WritePhyUshort(sc, 0x14, 0xd711);
20499         MP_WritePhyUshort(sc, 0x14, 0x3128);
20500         MP_WritePhyUshort(sc, 0x14, 0x3d76);
20501         MP_WritePhyUshort(sc, 0x14, 0x2d70);
20502         MP_WritePhyUshort(sc, 0x14, 0xa801);
20503         MP_WritePhyUshort(sc, 0x14, 0x2d6c);
20504         MP_WritePhyUshort(sc, 0x14, 0xd710);
20505         MP_WritePhyUshort(sc, 0x14, 0x4000);
20506         MP_WritePhyUshort(sc, 0x14, 0xe018);
20507         MP_WritePhyUshort(sc, 0x14, 0x0208);
20508         MP_WritePhyUshort(sc, 0x14, 0xa1f8);
20509         MP_WritePhyUshort(sc, 0x14, 0x8480);
20510         MP_WritePhyUshort(sc, 0x14, 0xc004);
20511         MP_WritePhyUshort(sc, 0x14, 0xd710);
20512         MP_WritePhyUshort(sc, 0x14, 0x4000);
20513         MP_WritePhyUshort(sc, 0x14, 0x6046);
20514         MP_WritePhyUshort(sc, 0x14, 0x2d0d);
20515         MP_WritePhyUshort(sc, 0x14, 0xa43f);
20516         MP_WritePhyUshort(sc, 0x14, 0xa105);
20517         MP_WritePhyUshort(sc, 0x14, 0x8228);
20518         MP_WritePhyUshort(sc, 0x14, 0xc004);
20519         MP_WritePhyUshort(sc, 0x14, 0xd710);
20520         MP_WritePhyUshort(sc, 0x14, 0x4000);
20521         MP_WritePhyUshort(sc, 0x14, 0x81bc);
20522         MP_WritePhyUshort(sc, 0x14, 0xa220);
20523         MP_WritePhyUshort(sc, 0x14, 0x1d97);
20524         MP_WritePhyUshort(sc, 0x14, 0x8220);
20525         MP_WritePhyUshort(sc, 0x14, 0xa1bc);
20526         MP_WritePhyUshort(sc, 0x14, 0xc040);
20527         MP_WritePhyUshort(sc, 0x14, 0xd710);
20528         MP_WritePhyUshort(sc, 0x14, 0x30e1);
20529         MP_WritePhyUshort(sc, 0x14, 0x0abc);
20530         MP_WritePhyUshort(sc, 0x14, 0x30e1);
20531         MP_WritePhyUshort(sc, 0x14, 0x3d0d);
20532         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20533         MP_WritePhyUshort(sc, 0x14, 0x7f4c);
20534         MP_WritePhyUshort(sc, 0x14, 0x2ab6);
20535         MP_WritePhyUshort(sc, 0x14, 0xa802);
20536         MP_WritePhyUshort(sc, 0x14, 0xd70c);
20537         MP_WritePhyUshort(sc, 0x14, 0x4244);
20538         MP_WritePhyUshort(sc, 0x14, 0xa301);
20539         MP_WritePhyUshort(sc, 0x14, 0xc004);
20540         MP_WritePhyUshort(sc, 0x14, 0xd711);
20541         MP_WritePhyUshort(sc, 0x14, 0x3128);
20542         MP_WritePhyUshort(sc, 0x14, 0x3da5);
20543         MP_WritePhyUshort(sc, 0x14, 0xd710);
20544         MP_WritePhyUshort(sc, 0x14, 0x5f80);
20545         MP_WritePhyUshort(sc, 0x14, 0xd711);
20546         MP_WritePhyUshort(sc, 0x14, 0x3109);
20547         MP_WritePhyUshort(sc, 0x14, 0x3da7);
20548         MP_WritePhyUshort(sc, 0x14, 0x2dab);
20549         MP_WritePhyUshort(sc, 0x14, 0xa801);
20550         MP_WritePhyUshort(sc, 0x14, 0x2d9a);
20551         MP_WritePhyUshort(sc, 0x14, 0xa802);
20552         MP_WritePhyUshort(sc, 0x14, 0xc004);
20553         MP_WritePhyUshort(sc, 0x14, 0xd710);
20554         MP_WritePhyUshort(sc, 0x14, 0x4000);
20555         MP_WritePhyUshort(sc, 0x14, 0x0800);
20556         MP_WritePhyUshort(sc, 0x14, 0xa510);
20557         MP_WritePhyUshort(sc, 0x14, 0xd710);
20558         MP_WritePhyUshort(sc, 0x14, 0x609a);
20559         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20560         MP_WritePhyUshort(sc, 0x14, 0x7fac);
20561         MP_WritePhyUshort(sc, 0x14, 0x2ab6);
20562         MP_WritePhyUshort(sc, 0x14, 0x8510);
20563         MP_WritePhyUshort(sc, 0x14, 0x0800);
20564         MP_WritePhyUshort(sc, 0x13, 0xA01A);
20565         MP_WritePhyUshort(sc, 0x14, 0x0000);
20566         MP_WritePhyUshort(sc, 0x13, 0xA006);
20567         MP_WritePhyUshort(sc, 0x14, 0x0ad6);
20568         MP_WritePhyUshort(sc, 0x13, 0xA004);
20569         MP_WritePhyUshort(sc, 0x14, 0x07f5);
20570         MP_WritePhyUshort(sc, 0x13, 0xA002);
20571         MP_WritePhyUshort(sc, 0x14, 0x06a9);
20572         MP_WritePhyUshort(sc, 0x13, 0xA000);
20573         MP_WritePhyUshort(sc, 0x14, 0xf069);
20574         MP_WritePhyUshort(sc, 0x13, 0xB820);
20575         MP_WritePhyUshort(sc, 0x14, 0x0210);
20576 
20577         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
20578         MP_WritePhyUshort(sc, 0x13, 0x83a0);
20579         MP_WritePhyUshort(sc, 0x14, 0xaf83);
20580         MP_WritePhyUshort(sc, 0x14, 0xacaf);
20581         MP_WritePhyUshort(sc, 0x14, 0x83b8);
20582         MP_WritePhyUshort(sc, 0x14, 0xaf83);
20583         MP_WritePhyUshort(sc, 0x14, 0xcdaf);
20584         MP_WritePhyUshort(sc, 0x14, 0x83d3);
20585         MP_WritePhyUshort(sc, 0x14, 0x0204);
20586         MP_WritePhyUshort(sc, 0x14, 0x9a02);
20587         MP_WritePhyUshort(sc, 0x14, 0x09a9);
20588         MP_WritePhyUshort(sc, 0x14, 0x0284);
20589         MP_WritePhyUshort(sc, 0x14, 0x61af);
20590         MP_WritePhyUshort(sc, 0x14, 0x02fc);
20591         MP_WritePhyUshort(sc, 0x14, 0xad20);
20592         MP_WritePhyUshort(sc, 0x14, 0x0302);
20593         MP_WritePhyUshort(sc, 0x14, 0x867c);
20594         MP_WritePhyUshort(sc, 0x14, 0xad21);
20595         MP_WritePhyUshort(sc, 0x14, 0x0302);
20596         MP_WritePhyUshort(sc, 0x14, 0x85c9);
20597         MP_WritePhyUshort(sc, 0x14, 0xad22);
20598         MP_WritePhyUshort(sc, 0x14, 0x0302);
20599         MP_WritePhyUshort(sc, 0x14, 0x1bc0);
20600         MP_WritePhyUshort(sc, 0x14, 0xaf17);
20601         MP_WritePhyUshort(sc, 0x14, 0xe302);
20602         MP_WritePhyUshort(sc, 0x14, 0x8703);
20603         MP_WritePhyUshort(sc, 0x14, 0xaf18);
20604         MP_WritePhyUshort(sc, 0x14, 0x6201);
20605         MP_WritePhyUshort(sc, 0x14, 0x06e0);
20606         MP_WritePhyUshort(sc, 0x14, 0x8148);
20607         MP_WritePhyUshort(sc, 0x14, 0xaf3c);
20608         MP_WritePhyUshort(sc, 0x14, 0x69f8);
20609         MP_WritePhyUshort(sc, 0x14, 0xf9fa);
20610         MP_WritePhyUshort(sc, 0x14, 0xef69);
20611         MP_WritePhyUshort(sc, 0x14, 0xee80);
20612         MP_WritePhyUshort(sc, 0x14, 0x10f7);
20613         MP_WritePhyUshort(sc, 0x14, 0xee80);
20614         MP_WritePhyUshort(sc, 0x14, 0x131f);
20615         MP_WritePhyUshort(sc, 0x14, 0xd104);
20616         MP_WritePhyUshort(sc, 0x14, 0xbf87);
20617         MP_WritePhyUshort(sc, 0x14, 0xf302);
20618         MP_WritePhyUshort(sc, 0x14, 0x4259);
20619         MP_WritePhyUshort(sc, 0x14, 0x0287);
20620         MP_WritePhyUshort(sc, 0x14, 0x88bf);
20621         MP_WritePhyUshort(sc, 0x14, 0x87cf);
20622         MP_WritePhyUshort(sc, 0x14, 0xd7b8);
20623         MP_WritePhyUshort(sc, 0x14, 0x22d0);
20624         MP_WritePhyUshort(sc, 0x14, 0x0c02);
20625         MP_WritePhyUshort(sc, 0x14, 0x4252);
20626         MP_WritePhyUshort(sc, 0x14, 0xee80);
20627         MP_WritePhyUshort(sc, 0x14, 0xcda0);
20628         MP_WritePhyUshort(sc, 0x14, 0xee80);
20629         MP_WritePhyUshort(sc, 0x14, 0xce8b);
20630         MP_WritePhyUshort(sc, 0x14, 0xee80);
20631         MP_WritePhyUshort(sc, 0x14, 0xd1f5);
20632         MP_WritePhyUshort(sc, 0x14, 0xee80);
20633         MP_WritePhyUshort(sc, 0x14, 0xd2a9);
20634         MP_WritePhyUshort(sc, 0x14, 0xee80);
20635         MP_WritePhyUshort(sc, 0x14, 0xd30a);
20636         MP_WritePhyUshort(sc, 0x14, 0xee80);
20637         MP_WritePhyUshort(sc, 0x14, 0xf010);
20638         MP_WritePhyUshort(sc, 0x14, 0xee80);
20639         MP_WritePhyUshort(sc, 0x14, 0xf38f);
20640         MP_WritePhyUshort(sc, 0x14, 0xee81);
20641         MP_WritePhyUshort(sc, 0x14, 0x011e);
20642         MP_WritePhyUshort(sc, 0x14, 0xee81);
20643         MP_WritePhyUshort(sc, 0x14, 0x0b4a);
20644         MP_WritePhyUshort(sc, 0x14, 0xee81);
20645         MP_WritePhyUshort(sc, 0x14, 0x0c7c);
20646         MP_WritePhyUshort(sc, 0x14, 0xee81);
20647         MP_WritePhyUshort(sc, 0x14, 0x127f);
20648         MP_WritePhyUshort(sc, 0x14, 0xd100);
20649         MP_WritePhyUshort(sc, 0x14, 0x0210);
20650         MP_WritePhyUshort(sc, 0x14, 0xb5ee);
20651         MP_WritePhyUshort(sc, 0x14, 0x8088);
20652         MP_WritePhyUshort(sc, 0x14, 0xa4ee);
20653         MP_WritePhyUshort(sc, 0x14, 0x8089);
20654         MP_WritePhyUshort(sc, 0x14, 0x44ee);
20655         MP_WritePhyUshort(sc, 0x14, 0x809a);
20656         MP_WritePhyUshort(sc, 0x14, 0xa4ee);
20657         MP_WritePhyUshort(sc, 0x14, 0x809b);
20658         MP_WritePhyUshort(sc, 0x14, 0x44ee);
20659         MP_WritePhyUshort(sc, 0x14, 0x809c);
20660         MP_WritePhyUshort(sc, 0x14, 0xa7ee);
20661         MP_WritePhyUshort(sc, 0x14, 0x80a5);
20662         MP_WritePhyUshort(sc, 0x14, 0xa7d2);
20663         MP_WritePhyUshort(sc, 0x14, 0x0002);
20664         MP_WritePhyUshort(sc, 0x14, 0x0e66);
20665         MP_WritePhyUshort(sc, 0x14, 0x0285);
20666         MP_WritePhyUshort(sc, 0x14, 0xc0ee);
20667         MP_WritePhyUshort(sc, 0x14, 0x87fc);
20668         MP_WritePhyUshort(sc, 0x14, 0x00e0);
20669         MP_WritePhyUshort(sc, 0x14, 0x8245);
20670         MP_WritePhyUshort(sc, 0x14, 0xf622);
20671         MP_WritePhyUshort(sc, 0x14, 0xe482);
20672         MP_WritePhyUshort(sc, 0x14, 0x45ef);
20673         MP_WritePhyUshort(sc, 0x14, 0x96fe);
20674         MP_WritePhyUshort(sc, 0x14, 0xfdfc);
20675         MP_WritePhyUshort(sc, 0x14, 0x0402);
20676         MP_WritePhyUshort(sc, 0x14, 0x847a);
20677         MP_WritePhyUshort(sc, 0x14, 0x0284);
20678         MP_WritePhyUshort(sc, 0x14, 0xb302);
20679         MP_WritePhyUshort(sc, 0x14, 0x0cab);
20680         MP_WritePhyUshort(sc, 0x14, 0x020c);
20681         MP_WritePhyUshort(sc, 0x14, 0xc402);
20682         MP_WritePhyUshort(sc, 0x14, 0x0cef);
20683         MP_WritePhyUshort(sc, 0x14, 0x020d);
20684         MP_WritePhyUshort(sc, 0x14, 0x0802);
20685         MP_WritePhyUshort(sc, 0x14, 0x0d33);
20686         MP_WritePhyUshort(sc, 0x14, 0x020c);
20687         MP_WritePhyUshort(sc, 0x14, 0x3d04);
20688         MP_WritePhyUshort(sc, 0x14, 0xf8fa);
20689         MP_WritePhyUshort(sc, 0x14, 0xef69);
20690         MP_WritePhyUshort(sc, 0x14, 0xe182);
20691         MP_WritePhyUshort(sc, 0x14, 0x2fac);
20692         MP_WritePhyUshort(sc, 0x14, 0x291a);
20693         MP_WritePhyUshort(sc, 0x14, 0xe082);
20694         MP_WritePhyUshort(sc, 0x14, 0x24ac);
20695         MP_WritePhyUshort(sc, 0x14, 0x2102);
20696         MP_WritePhyUshort(sc, 0x14, 0xae22);
20697         MP_WritePhyUshort(sc, 0x14, 0x0210);
20698         MP_WritePhyUshort(sc, 0x14, 0x57f6);
20699         MP_WritePhyUshort(sc, 0x14, 0x21e4);
20700         MP_WritePhyUshort(sc, 0x14, 0x8224);
20701         MP_WritePhyUshort(sc, 0x14, 0xd101);
20702         MP_WritePhyUshort(sc, 0x14, 0xbf44);
20703         MP_WritePhyUshort(sc, 0x14, 0xd202);
20704         MP_WritePhyUshort(sc, 0x14, 0x4259);
20705         MP_WritePhyUshort(sc, 0x14, 0xae10);
20706         MP_WritePhyUshort(sc, 0x14, 0x0212);
20707         MP_WritePhyUshort(sc, 0x14, 0x4cf6);
20708         MP_WritePhyUshort(sc, 0x14, 0x29e5);
20709         MP_WritePhyUshort(sc, 0x14, 0x822f);
20710         MP_WritePhyUshort(sc, 0x14, 0xe082);
20711         MP_WritePhyUshort(sc, 0x14, 0x24f6);
20712         MP_WritePhyUshort(sc, 0x14, 0x21e4);
20713         MP_WritePhyUshort(sc, 0x14, 0x8224);
20714         MP_WritePhyUshort(sc, 0x14, 0xef96);
20715         MP_WritePhyUshort(sc, 0x14, 0xfefc);
20716         MP_WritePhyUshort(sc, 0x14, 0x04f8);
20717         MP_WritePhyUshort(sc, 0x14, 0xe182);
20718         MP_WritePhyUshort(sc, 0x14, 0x2fac);
20719         MP_WritePhyUshort(sc, 0x14, 0x2a18);
20720         MP_WritePhyUshort(sc, 0x14, 0xe082);
20721         MP_WritePhyUshort(sc, 0x14, 0x24ac);
20722         MP_WritePhyUshort(sc, 0x14, 0x2202);
20723         MP_WritePhyUshort(sc, 0x14, 0xae26);
20724         MP_WritePhyUshort(sc, 0x14, 0x0284);
20725         MP_WritePhyUshort(sc, 0x14, 0xf802);
20726         MP_WritePhyUshort(sc, 0x14, 0x8565);
20727         MP_WritePhyUshort(sc, 0x14, 0xd101);
20728         MP_WritePhyUshort(sc, 0x14, 0xbf44);
20729         MP_WritePhyUshort(sc, 0x14, 0xd502);
20730         MP_WritePhyUshort(sc, 0x14, 0x4259);
20731         MP_WritePhyUshort(sc, 0x14, 0xae0e);
20732         MP_WritePhyUshort(sc, 0x14, 0x0284);
20733         MP_WritePhyUshort(sc, 0x14, 0xea02);
20734         MP_WritePhyUshort(sc, 0x14, 0x85a9);
20735         MP_WritePhyUshort(sc, 0x14, 0xe182);
20736         MP_WritePhyUshort(sc, 0x14, 0x2ff6);
20737         MP_WritePhyUshort(sc, 0x14, 0x2ae5);
20738         MP_WritePhyUshort(sc, 0x14, 0x822f);
20739         MP_WritePhyUshort(sc, 0x14, 0xe082);
20740         MP_WritePhyUshort(sc, 0x14, 0x24f6);
20741         MP_WritePhyUshort(sc, 0x14, 0x22e4);
20742         MP_WritePhyUshort(sc, 0x14, 0x8224);
20743         MP_WritePhyUshort(sc, 0x14, 0xfc04);
20744         MP_WritePhyUshort(sc, 0x14, 0xf9e2);
20745         MP_WritePhyUshort(sc, 0x14, 0x8011);
20746         MP_WritePhyUshort(sc, 0x14, 0xad31);
20747         MP_WritePhyUshort(sc, 0x14, 0x05d2);
20748         MP_WritePhyUshort(sc, 0x14, 0x0002);
20749         MP_WritePhyUshort(sc, 0x14, 0x0e66);
20750         MP_WritePhyUshort(sc, 0x14, 0xfd04);
20751         MP_WritePhyUshort(sc, 0x14, 0xf8f9);
20752         MP_WritePhyUshort(sc, 0x14, 0xfaef);
20753         MP_WritePhyUshort(sc, 0x14, 0x69e0);
20754         MP_WritePhyUshort(sc, 0x14, 0x8011);
20755         MP_WritePhyUshort(sc, 0x14, 0xad21);
20756         MP_WritePhyUshort(sc, 0x14, 0x5cbf);
20757         MP_WritePhyUshort(sc, 0x14, 0x43be);
20758         MP_WritePhyUshort(sc, 0x14, 0x0242);
20759         MP_WritePhyUshort(sc, 0x14, 0x97ac);
20760         MP_WritePhyUshort(sc, 0x14, 0x281b);
20761         MP_WritePhyUshort(sc, 0x14, 0xbf43);
20762         MP_WritePhyUshort(sc, 0x14, 0xc102);
20763         MP_WritePhyUshort(sc, 0x14, 0x4297);
20764         MP_WritePhyUshort(sc, 0x14, 0xac28);
20765         MP_WritePhyUshort(sc, 0x14, 0x12bf);
20766         MP_WritePhyUshort(sc, 0x14, 0x43c7);
20767         MP_WritePhyUshort(sc, 0x14, 0x0242);
20768         MP_WritePhyUshort(sc, 0x14, 0x97ac);
20769         MP_WritePhyUshort(sc, 0x14, 0x2804);
20770         MP_WritePhyUshort(sc, 0x14, 0xd300);
20771         MP_WritePhyUshort(sc, 0x14, 0xae07);
20772         MP_WritePhyUshort(sc, 0x14, 0xd306);
20773         MP_WritePhyUshort(sc, 0x14, 0xaf85);
20774         MP_WritePhyUshort(sc, 0x14, 0x56d3);
20775         MP_WritePhyUshort(sc, 0x14, 0x03e0);
20776         MP_WritePhyUshort(sc, 0x14, 0x8011);
20777         MP_WritePhyUshort(sc, 0x14, 0xad26);
20778         MP_WritePhyUshort(sc, 0x14, 0x25bf);
20779         MP_WritePhyUshort(sc, 0x14, 0x4559);
20780         MP_WritePhyUshort(sc, 0x14, 0x0242);
20781         MP_WritePhyUshort(sc, 0x14, 0x97e2);
20782         MP_WritePhyUshort(sc, 0x14, 0x8073);
20783         MP_WritePhyUshort(sc, 0x14, 0x0d21);
20784         MP_WritePhyUshort(sc, 0x14, 0xf637);
20785         MP_WritePhyUshort(sc, 0x14, 0x0d11);
20786         MP_WritePhyUshort(sc, 0x14, 0xf62f);
20787         MP_WritePhyUshort(sc, 0x14, 0x1b21);
20788         MP_WritePhyUshort(sc, 0x14, 0xaa02);
20789         MP_WritePhyUshort(sc, 0x14, 0xae10);
20790         MP_WritePhyUshort(sc, 0x14, 0xe280);
20791         MP_WritePhyUshort(sc, 0x14, 0x740d);
20792         MP_WritePhyUshort(sc, 0x14, 0x21f6);
20793         MP_WritePhyUshort(sc, 0x14, 0x371b);
20794         MP_WritePhyUshort(sc, 0x14, 0x21aa);
20795         MP_WritePhyUshort(sc, 0x14, 0x0313);
20796         MP_WritePhyUshort(sc, 0x14, 0xae02);
20797         MP_WritePhyUshort(sc, 0x14, 0x2b02);
20798         MP_WritePhyUshort(sc, 0x14, 0x020e);
20799         MP_WritePhyUshort(sc, 0x14, 0x5102);
20800         MP_WritePhyUshort(sc, 0x14, 0x0e66);
20801         MP_WritePhyUshort(sc, 0x14, 0x020f);
20802         MP_WritePhyUshort(sc, 0x14, 0xa3ef);
20803         MP_WritePhyUshort(sc, 0x14, 0x96fe);
20804         MP_WritePhyUshort(sc, 0x14, 0xfdfc);
20805         MP_WritePhyUshort(sc, 0x14, 0x04f8);
20806         MP_WritePhyUshort(sc, 0x14, 0xf9fa);
20807         MP_WritePhyUshort(sc, 0x14, 0xef69);
20808         MP_WritePhyUshort(sc, 0x14, 0xe080);
20809         MP_WritePhyUshort(sc, 0x14, 0x12ad);
20810         MP_WritePhyUshort(sc, 0x14, 0x2733);
20811         MP_WritePhyUshort(sc, 0x14, 0xbf43);
20812         MP_WritePhyUshort(sc, 0x14, 0xbe02);
20813         MP_WritePhyUshort(sc, 0x14, 0x4297);
20814         MP_WritePhyUshort(sc, 0x14, 0xac28);
20815         MP_WritePhyUshort(sc, 0x14, 0x09bf);
20816         MP_WritePhyUshort(sc, 0x14, 0x43c1);
20817         MP_WritePhyUshort(sc, 0x14, 0x0242);
20818         MP_WritePhyUshort(sc, 0x14, 0x97ad);
20819         MP_WritePhyUshort(sc, 0x14, 0x2821);
20820         MP_WritePhyUshort(sc, 0x14, 0xbf45);
20821         MP_WritePhyUshort(sc, 0x14, 0x5902);
20822         MP_WritePhyUshort(sc, 0x14, 0x4297);
20823         MP_WritePhyUshort(sc, 0x14, 0xe387);
20824         MP_WritePhyUshort(sc, 0x14, 0xffd2);
20825         MP_WritePhyUshort(sc, 0x14, 0x001b);
20826         MP_WritePhyUshort(sc, 0x14, 0x45ac);
20827         MP_WritePhyUshort(sc, 0x14, 0x2711);
20828         MP_WritePhyUshort(sc, 0x14, 0xe187);
20829         MP_WritePhyUshort(sc, 0x14, 0xfebf);
20830         MP_WritePhyUshort(sc, 0x14, 0x87e4);
20831         MP_WritePhyUshort(sc, 0x14, 0x0242);
20832         MP_WritePhyUshort(sc, 0x14, 0x590d);
20833         MP_WritePhyUshort(sc, 0x14, 0x11bf);
20834         MP_WritePhyUshort(sc, 0x14, 0x87e7);
20835         MP_WritePhyUshort(sc, 0x14, 0x0242);
20836         MP_WritePhyUshort(sc, 0x14, 0x59ef);
20837         MP_WritePhyUshort(sc, 0x14, 0x96fe);
20838         MP_WritePhyUshort(sc, 0x14, 0xfdfc);
20839         MP_WritePhyUshort(sc, 0x14, 0x04f8);
20840         MP_WritePhyUshort(sc, 0x14, 0xfaef);
20841         MP_WritePhyUshort(sc, 0x14, 0x69d1);
20842         MP_WritePhyUshort(sc, 0x14, 0x00bf);
20843         MP_WritePhyUshort(sc, 0x14, 0x87e4);
20844         MP_WritePhyUshort(sc, 0x14, 0x0242);
20845         MP_WritePhyUshort(sc, 0x14, 0x59bf);
20846         MP_WritePhyUshort(sc, 0x14, 0x87e7);
20847         MP_WritePhyUshort(sc, 0x14, 0x0242);
20848         MP_WritePhyUshort(sc, 0x14, 0x59ef);
20849         MP_WritePhyUshort(sc, 0x14, 0x96fe);
20850         MP_WritePhyUshort(sc, 0x14, 0xfc04);
20851         MP_WritePhyUshort(sc, 0x14, 0xee87);
20852         MP_WritePhyUshort(sc, 0x14, 0xff46);
20853         MP_WritePhyUshort(sc, 0x14, 0xee87);
20854         MP_WritePhyUshort(sc, 0x14, 0xfe01);
20855         MP_WritePhyUshort(sc, 0x14, 0x04f8);
20856         MP_WritePhyUshort(sc, 0x14, 0xfaef);
20857         MP_WritePhyUshort(sc, 0x14, 0x69e0);
20858         MP_WritePhyUshort(sc, 0x14, 0x8241);
20859         MP_WritePhyUshort(sc, 0x14, 0xa000);
20860         MP_WritePhyUshort(sc, 0x14, 0x0502);
20861         MP_WritePhyUshort(sc, 0x14, 0x85eb);
20862         MP_WritePhyUshort(sc, 0x14, 0xae0e);
20863         MP_WritePhyUshort(sc, 0x14, 0xa001);
20864         MP_WritePhyUshort(sc, 0x14, 0x0502);
20865         MP_WritePhyUshort(sc, 0x14, 0x1a5a);
20866         MP_WritePhyUshort(sc, 0x14, 0xae06);
20867         MP_WritePhyUshort(sc, 0x14, 0xa002);
20868         MP_WritePhyUshort(sc, 0x14, 0x0302);
20869         MP_WritePhyUshort(sc, 0x14, 0x1ae6);
20870         MP_WritePhyUshort(sc, 0x14, 0xef96);
20871         MP_WritePhyUshort(sc, 0x14, 0xfefc);
20872         MP_WritePhyUshort(sc, 0x14, 0x04f8);
20873         MP_WritePhyUshort(sc, 0x14, 0xf9fa);
20874         MP_WritePhyUshort(sc, 0x14, 0xef69);
20875         MP_WritePhyUshort(sc, 0x14, 0xe082);
20876         MP_WritePhyUshort(sc, 0x14, 0x29f6);
20877         MP_WritePhyUshort(sc, 0x14, 0x21e4);
20878         MP_WritePhyUshort(sc, 0x14, 0x8229);
20879         MP_WritePhyUshort(sc, 0x14, 0xe080);
20880         MP_WritePhyUshort(sc, 0x14, 0x10ac);
20881         MP_WritePhyUshort(sc, 0x14, 0x2202);
20882         MP_WritePhyUshort(sc, 0x14, 0xae76);
20883         MP_WritePhyUshort(sc, 0x14, 0xe082);
20884         MP_WritePhyUshort(sc, 0x14, 0x27f7);
20885         MP_WritePhyUshort(sc, 0x14, 0x21e4);
20886         MP_WritePhyUshort(sc, 0x14, 0x8227);
20887         MP_WritePhyUshort(sc, 0x14, 0xbf43);
20888         MP_WritePhyUshort(sc, 0x14, 0x1302);
20889         MP_WritePhyUshort(sc, 0x14, 0x4297);
20890         MP_WritePhyUshort(sc, 0x14, 0xef21);
20891         MP_WritePhyUshort(sc, 0x14, 0xbf43);
20892         MP_WritePhyUshort(sc, 0x14, 0x1602);
20893         MP_WritePhyUshort(sc, 0x14, 0x4297);
20894         MP_WritePhyUshort(sc, 0x14, 0x0c11);
20895         MP_WritePhyUshort(sc, 0x14, 0x1e21);
20896         MP_WritePhyUshort(sc, 0x14, 0xbf43);
20897         MP_WritePhyUshort(sc, 0x14, 0x1902);
20898         MP_WritePhyUshort(sc, 0x14, 0x4297);
20899         MP_WritePhyUshort(sc, 0x14, 0x0c12);
20900         MP_WritePhyUshort(sc, 0x14, 0x1e21);
20901         MP_WritePhyUshort(sc, 0x14, 0xe682);
20902         MP_WritePhyUshort(sc, 0x14, 0x43a2);
20903         MP_WritePhyUshort(sc, 0x14, 0x000a);
20904         MP_WritePhyUshort(sc, 0x14, 0xe182);
20905         MP_WritePhyUshort(sc, 0x14, 0x27f6);
20906         MP_WritePhyUshort(sc, 0x14, 0x29e5);
20907         MP_WritePhyUshort(sc, 0x14, 0x8227);
20908         MP_WritePhyUshort(sc, 0x14, 0xae42);
20909         MP_WritePhyUshort(sc, 0x14, 0xe082);
20910         MP_WritePhyUshort(sc, 0x14, 0x44f7);
20911         MP_WritePhyUshort(sc, 0x14, 0x21e4);
20912         MP_WritePhyUshort(sc, 0x14, 0x8244);
20913         MP_WritePhyUshort(sc, 0x14, 0x0246);
20914         MP_WritePhyUshort(sc, 0x14, 0xaebf);
20915         MP_WritePhyUshort(sc, 0x14, 0x4325);
20916         MP_WritePhyUshort(sc, 0x14, 0x0242);
20917         MP_WritePhyUshort(sc, 0x14, 0x97ef);
20918         MP_WritePhyUshort(sc, 0x14, 0x21bf);
20919         MP_WritePhyUshort(sc, 0x14, 0x431c);
20920         MP_WritePhyUshort(sc, 0x14, 0x0242);
20921         MP_WritePhyUshort(sc, 0x14, 0x970c);
20922         MP_WritePhyUshort(sc, 0x14, 0x121e);
20923         MP_WritePhyUshort(sc, 0x14, 0x21bf);
20924         MP_WritePhyUshort(sc, 0x14, 0x431f);
20925         MP_WritePhyUshort(sc, 0x14, 0x0242);
20926         MP_WritePhyUshort(sc, 0x14, 0x970c);
20927         MP_WritePhyUshort(sc, 0x14, 0x131e);
20928         MP_WritePhyUshort(sc, 0x14, 0x21bf);
20929         MP_WritePhyUshort(sc, 0x14, 0x4328);
20930         MP_WritePhyUshort(sc, 0x14, 0x0242);
20931         MP_WritePhyUshort(sc, 0x14, 0x970c);
20932         MP_WritePhyUshort(sc, 0x14, 0x141e);
20933         MP_WritePhyUshort(sc, 0x14, 0x21bf);
20934         MP_WritePhyUshort(sc, 0x14, 0x44b1);
20935         MP_WritePhyUshort(sc, 0x14, 0x0242);
20936         MP_WritePhyUshort(sc, 0x14, 0x970c);
20937         MP_WritePhyUshort(sc, 0x14, 0x161e);
20938         MP_WritePhyUshort(sc, 0x14, 0x21e6);
20939         MP_WritePhyUshort(sc, 0x14, 0x8242);
20940         MP_WritePhyUshort(sc, 0x14, 0xee82);
20941         MP_WritePhyUshort(sc, 0x14, 0x4101);
20942         MP_WritePhyUshort(sc, 0x14, 0xef96);
20943         MP_WritePhyUshort(sc, 0x14, 0xfefd);
20944         MP_WritePhyUshort(sc, 0x14, 0xfc04);
20945         MP_WritePhyUshort(sc, 0x14, 0xf8fa);
20946         MP_WritePhyUshort(sc, 0x14, 0xef69);
20947         MP_WritePhyUshort(sc, 0x14, 0xe082);
20948         MP_WritePhyUshort(sc, 0x14, 0x46a0);
20949         MP_WritePhyUshort(sc, 0x14, 0x0005);
20950         MP_WritePhyUshort(sc, 0x14, 0x0286);
20951         MP_WritePhyUshort(sc, 0x14, 0x96ae);
20952         MP_WritePhyUshort(sc, 0x14, 0x06a0);
20953         MP_WritePhyUshort(sc, 0x14, 0x0103);
20954         MP_WritePhyUshort(sc, 0x14, 0x0219);
20955         MP_WritePhyUshort(sc, 0x14, 0x19ef);
20956         MP_WritePhyUshort(sc, 0x14, 0x96fe);
20957         MP_WritePhyUshort(sc, 0x14, 0xfc04);
20958         MP_WritePhyUshort(sc, 0x14, 0xf8fa);
20959         MP_WritePhyUshort(sc, 0x14, 0xef69);
20960         MP_WritePhyUshort(sc, 0x14, 0xe082);
20961         MP_WritePhyUshort(sc, 0x14, 0x29f6);
20962         MP_WritePhyUshort(sc, 0x14, 0x20e4);
20963         MP_WritePhyUshort(sc, 0x14, 0x8229);
20964         MP_WritePhyUshort(sc, 0x14, 0xe080);
20965         MP_WritePhyUshort(sc, 0x14, 0x10ac);
20966         MP_WritePhyUshort(sc, 0x14, 0x2102);
20967         MP_WritePhyUshort(sc, 0x14, 0xae54);
20968         MP_WritePhyUshort(sc, 0x14, 0xe082);
20969         MP_WritePhyUshort(sc, 0x14, 0x27f7);
20970         MP_WritePhyUshort(sc, 0x14, 0x20e4);
20971         MP_WritePhyUshort(sc, 0x14, 0x8227);
20972         MP_WritePhyUshort(sc, 0x14, 0xbf42);
20973         MP_WritePhyUshort(sc, 0x14, 0xe602);
20974         MP_WritePhyUshort(sc, 0x14, 0x4297);
20975         MP_WritePhyUshort(sc, 0x14, 0xac28);
20976         MP_WritePhyUshort(sc, 0x14, 0x22bf);
20977         MP_WritePhyUshort(sc, 0x14, 0x430d);
20978         MP_WritePhyUshort(sc, 0x14, 0x0242);
20979         MP_WritePhyUshort(sc, 0x14, 0x97e5);
20980         MP_WritePhyUshort(sc, 0x14, 0x8247);
20981         MP_WritePhyUshort(sc, 0x14, 0xac28);
20982         MP_WritePhyUshort(sc, 0x14, 0x20d1);
20983         MP_WritePhyUshort(sc, 0x14, 0x03bf);
20984         MP_WritePhyUshort(sc, 0x14, 0x4307);
20985         MP_WritePhyUshort(sc, 0x14, 0x0242);
20986         MP_WritePhyUshort(sc, 0x14, 0x59ee);
20987         MP_WritePhyUshort(sc, 0x14, 0x8246);
20988         MP_WritePhyUshort(sc, 0x14, 0x00e1);
20989         MP_WritePhyUshort(sc, 0x14, 0x8227);
20990         MP_WritePhyUshort(sc, 0x14, 0xf628);
20991         MP_WritePhyUshort(sc, 0x14, 0xe582);
20992         MP_WritePhyUshort(sc, 0x14, 0x27ae);
20993         MP_WritePhyUshort(sc, 0x14, 0x21d1);
20994         MP_WritePhyUshort(sc, 0x14, 0x04bf);
20995         MP_WritePhyUshort(sc, 0x14, 0x4307);
20996         MP_WritePhyUshort(sc, 0x14, 0x0242);
20997         MP_WritePhyUshort(sc, 0x14, 0x59ae);
20998         MP_WritePhyUshort(sc, 0x14, 0x08d1);
20999         MP_WritePhyUshort(sc, 0x14, 0x05bf);
21000         MP_WritePhyUshort(sc, 0x14, 0x4307);
21001         MP_WritePhyUshort(sc, 0x14, 0x0242);
21002         MP_WritePhyUshort(sc, 0x14, 0x59e0);
21003         MP_WritePhyUshort(sc, 0x14, 0x8244);
21004         MP_WritePhyUshort(sc, 0x14, 0xf720);
21005         MP_WritePhyUshort(sc, 0x14, 0xe482);
21006         MP_WritePhyUshort(sc, 0x14, 0x4402);
21007         MP_WritePhyUshort(sc, 0x14, 0x46ae);
21008         MP_WritePhyUshort(sc, 0x14, 0xee82);
21009         MP_WritePhyUshort(sc, 0x14, 0x4601);
21010         MP_WritePhyUshort(sc, 0x14, 0xef96);
21011         MP_WritePhyUshort(sc, 0x14, 0xfefc);
21012         MP_WritePhyUshort(sc, 0x14, 0x04f8);
21013         MP_WritePhyUshort(sc, 0x14, 0xfaef);
21014         MP_WritePhyUshort(sc, 0x14, 0x69e0);
21015         MP_WritePhyUshort(sc, 0x14, 0x8013);
21016         MP_WritePhyUshort(sc, 0x14, 0xad24);
21017         MP_WritePhyUshort(sc, 0x14, 0x1cbf);
21018         MP_WritePhyUshort(sc, 0x14, 0x87f0);
21019         MP_WritePhyUshort(sc, 0x14, 0x0242);
21020         MP_WritePhyUshort(sc, 0x14, 0x97ad);
21021         MP_WritePhyUshort(sc, 0x14, 0x2813);
21022         MP_WritePhyUshort(sc, 0x14, 0xe087);
21023         MP_WritePhyUshort(sc, 0x14, 0xfca0);
21024         MP_WritePhyUshort(sc, 0x14, 0x0005);
21025         MP_WritePhyUshort(sc, 0x14, 0x0287);
21026         MP_WritePhyUshort(sc, 0x14, 0x36ae);
21027         MP_WritePhyUshort(sc, 0x14, 0x10a0);
21028         MP_WritePhyUshort(sc, 0x14, 0x0105);
21029         MP_WritePhyUshort(sc, 0x14, 0x0287);
21030         MP_WritePhyUshort(sc, 0x14, 0x48ae);
21031         MP_WritePhyUshort(sc, 0x14, 0x08e0);
21032         MP_WritePhyUshort(sc, 0x14, 0x8230);
21033         MP_WritePhyUshort(sc, 0x14, 0xf626);
21034         MP_WritePhyUshort(sc, 0x14, 0xe482);
21035         MP_WritePhyUshort(sc, 0x14, 0x30ef);
21036         MP_WritePhyUshort(sc, 0x14, 0x96fe);
21037         MP_WritePhyUshort(sc, 0x14, 0xfc04);
21038         MP_WritePhyUshort(sc, 0x14, 0xf8e0);
21039         MP_WritePhyUshort(sc, 0x14, 0x8245);
21040         MP_WritePhyUshort(sc, 0x14, 0xf722);
21041         MP_WritePhyUshort(sc, 0x14, 0xe482);
21042         MP_WritePhyUshort(sc, 0x14, 0x4502);
21043         MP_WritePhyUshort(sc, 0x14, 0x46ae);
21044         MP_WritePhyUshort(sc, 0x14, 0xee87);
21045         MP_WritePhyUshort(sc, 0x14, 0xfc01);
21046         MP_WritePhyUshort(sc, 0x14, 0xfc04);
21047         MP_WritePhyUshort(sc, 0x14, 0xf8fa);
21048         MP_WritePhyUshort(sc, 0x14, 0xef69);
21049         MP_WritePhyUshort(sc, 0x14, 0xfb02);
21050         MP_WritePhyUshort(sc, 0x14, 0x46d3);
21051         MP_WritePhyUshort(sc, 0x14, 0xad50);
21052         MP_WritePhyUshort(sc, 0x14, 0x2fbf);
21053         MP_WritePhyUshort(sc, 0x14, 0x87ed);
21054         MP_WritePhyUshort(sc, 0x14, 0xd101);
21055         MP_WritePhyUshort(sc, 0x14, 0x0242);
21056         MP_WritePhyUshort(sc, 0x14, 0x59bf);
21057         MP_WritePhyUshort(sc, 0x14, 0x87ed);
21058         MP_WritePhyUshort(sc, 0x14, 0xd100);
21059         MP_WritePhyUshort(sc, 0x14, 0x0242);
21060         MP_WritePhyUshort(sc, 0x14, 0x59e0);
21061         MP_WritePhyUshort(sc, 0x14, 0x8245);
21062         MP_WritePhyUshort(sc, 0x14, 0xf622);
21063         MP_WritePhyUshort(sc, 0x14, 0xe482);
21064         MP_WritePhyUshort(sc, 0x14, 0x4502);
21065         MP_WritePhyUshort(sc, 0x14, 0x46ae);
21066         MP_WritePhyUshort(sc, 0x14, 0xd100);
21067         MP_WritePhyUshort(sc, 0x14, 0xbf87);
21068         MP_WritePhyUshort(sc, 0x14, 0xf002);
21069         MP_WritePhyUshort(sc, 0x14, 0x4259);
21070         MP_WritePhyUshort(sc, 0x14, 0xee87);
21071         MP_WritePhyUshort(sc, 0x14, 0xfc00);
21072         MP_WritePhyUshort(sc, 0x14, 0xe082);
21073         MP_WritePhyUshort(sc, 0x14, 0x30f6);
21074         MP_WritePhyUshort(sc, 0x14, 0x26e4);
21075         MP_WritePhyUshort(sc, 0x14, 0x8230);
21076         MP_WritePhyUshort(sc, 0x14, 0xffef);
21077         MP_WritePhyUshort(sc, 0x14, 0x96fe);
21078         MP_WritePhyUshort(sc, 0x14, 0xfc04);
21079         MP_WritePhyUshort(sc, 0x14, 0xf8f9);
21080         MP_WritePhyUshort(sc, 0x14, 0xface);
21081         MP_WritePhyUshort(sc, 0x14, 0xfaef);
21082         MP_WritePhyUshort(sc, 0x14, 0x69fb);
21083         MP_WritePhyUshort(sc, 0x14, 0xbf87);
21084         MP_WritePhyUshort(sc, 0x14, 0xb3d7);
21085         MP_WritePhyUshort(sc, 0x14, 0x001c);
21086         MP_WritePhyUshort(sc, 0x14, 0xd819);
21087         MP_WritePhyUshort(sc, 0x14, 0xd919);
21088         MP_WritePhyUshort(sc, 0x14, 0xda19);
21089         MP_WritePhyUshort(sc, 0x14, 0xdb19);
21090         MP_WritePhyUshort(sc, 0x14, 0x07ef);
21091         MP_WritePhyUshort(sc, 0x14, 0x9502);
21092         MP_WritePhyUshort(sc, 0x14, 0x4259);
21093         MP_WritePhyUshort(sc, 0x14, 0x073f);
21094         MP_WritePhyUshort(sc, 0x14, 0x0004);
21095         MP_WritePhyUshort(sc, 0x14, 0x9fec);
21096         MP_WritePhyUshort(sc, 0x14, 0xffef);
21097         MP_WritePhyUshort(sc, 0x14, 0x96fe);
21098         MP_WritePhyUshort(sc, 0x14, 0xc6fe);
21099         MP_WritePhyUshort(sc, 0x14, 0xfdfc);
21100         MP_WritePhyUshort(sc, 0x14, 0x0400);
21101         MP_WritePhyUshort(sc, 0x14, 0x0145);
21102         MP_WritePhyUshort(sc, 0x14, 0x7d00);
21103         MP_WritePhyUshort(sc, 0x14, 0x0345);
21104         MP_WritePhyUshort(sc, 0x14, 0x5c00);
21105         MP_WritePhyUshort(sc, 0x14, 0x0143);
21106         MP_WritePhyUshort(sc, 0x14, 0x4f00);
21107         MP_WritePhyUshort(sc, 0x14, 0x0387);
21108         MP_WritePhyUshort(sc, 0x14, 0xdb00);
21109         MP_WritePhyUshort(sc, 0x14, 0x0987);
21110         MP_WritePhyUshort(sc, 0x14, 0xde00);
21111         MP_WritePhyUshort(sc, 0x14, 0x0987);
21112         MP_WritePhyUshort(sc, 0x14, 0xe100);
21113         MP_WritePhyUshort(sc, 0x14, 0x0087);
21114         MP_WritePhyUshort(sc, 0x14, 0xeaa4);
21115         MP_WritePhyUshort(sc, 0x14, 0x00b8);
21116         MP_WritePhyUshort(sc, 0x14, 0x20c4);
21117         MP_WritePhyUshort(sc, 0x14, 0x1600);
21118         MP_WritePhyUshort(sc, 0x14, 0x000f);
21119         MP_WritePhyUshort(sc, 0x14, 0xf800);
21120         MP_WritePhyUshort(sc, 0x14, 0x7098);
21121         MP_WritePhyUshort(sc, 0x14, 0xa58a);
21122         MP_WritePhyUshort(sc, 0x14, 0xb6a8);
21123         MP_WritePhyUshort(sc, 0x14, 0x3e50);
21124         MP_WritePhyUshort(sc, 0x14, 0xa83e);
21125         MP_WritePhyUshort(sc, 0x14, 0x33bc);
21126         MP_WritePhyUshort(sc, 0x14, 0xc622);
21127         MP_WritePhyUshort(sc, 0x14, 0xbcc6);
21128         MP_WritePhyUshort(sc, 0x14, 0xaaa4);
21129         MP_WritePhyUshort(sc, 0x14, 0x42ff);
21130         MP_WritePhyUshort(sc, 0x14, 0xc408);
21131         MP_WritePhyUshort(sc, 0x14, 0x00c4);
21132         MP_WritePhyUshort(sc, 0x14, 0x16a8);
21133         MP_WritePhyUshort(sc, 0x14, 0xbcc0);
21134         MP_WritePhyUshort(sc, 0x13, 0xb818);
21135         MP_WritePhyUshort(sc, 0x14, 0x02f3);
21136         MP_WritePhyUshort(sc, 0x13, 0xb81a);
21137         MP_WritePhyUshort(sc, 0x14, 0x17d1);
21138         MP_WritePhyUshort(sc, 0x13, 0xb81c);
21139         MP_WritePhyUshort(sc, 0x14, 0x185a);
21140         MP_WritePhyUshort(sc, 0x13, 0xb81e);
21141         MP_WritePhyUshort(sc, 0x14, 0x3c66);
21142         MP_WritePhyUshort(sc, 0x13, 0xb820);
21143         MP_WritePhyUshort(sc, 0x14, 0x021f);
21144         MP_WritePhyUshort(sc, 0x13, 0xc416);
21145         MP_WritePhyUshort(sc, 0x14, 0x0500);
21146         MP_WritePhyUshort(sc, 0x13, 0xb82e);
21147         MP_WritePhyUshort(sc, 0x14, 0xfffc);
21148 
21149         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21150         MP_WritePhyUshort(sc, 0x13, 0x0000);
21151         MP_WritePhyUshort(sc, 0x14, 0x0000);
21152         MP_WritePhyUshort(sc, 0x1f, 0x0B82);
21153         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
21154         PhyRegValue &= ~(BIT_9);
21155         MP_WritePhyUshort(sc, 0x10, PhyRegValue);
21156         MP_WritePhyUshort(sc, 0x1f, 0x0A43);
21157         MP_WritePhyUshort(sc, 0x13, 0x8146);
21158         MP_WritePhyUshort(sc, 0x14, 0x0000);
21159 
21160         re_clear_phy_mcu_patch_request(sc);
21161         if (sc->RequiredSecLanDonglePatch) {
21162                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21163                 PhyRegValue = MP_ReadPhyUshort(sc, 0x11);
21164                 PhyRegValue &= ~(BIT_6);
21165                 MP_WritePhyUshort(sc, 0x11, PhyRegValue);
21166         }
21167 }
21168 
21169 static void re_set_phy_mcu_8168gu_2(struct re_softc *sc)
21170 {
21171         u_int16_t PhyRegValue;
21172 
21173         re_set_phy_mcu_patch_request(sc);
21174 
21175         MP_WritePhyUshort(sc, 0x1f, 0x0A43);
21176         MP_WritePhyUshort(sc, 0x13, 0x8146);
21177         MP_WritePhyUshort(sc, 0x14, 0x0300);
21178         MP_WritePhyUshort(sc, 0x13, 0xB82E);
21179         MP_WritePhyUshort(sc, 0x14, 0x0001);
21180 
21181         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21182         MP_WritePhyUshort(sc, 0x13, 0xb820);
21183         MP_WritePhyUshort(sc, 0x14, 0x0290);
21184         MP_WritePhyUshort(sc, 0x13, 0xa012);
21185         MP_WritePhyUshort(sc, 0x14, 0x0000);
21186         MP_WritePhyUshort(sc, 0x13, 0xa014);
21187         MP_WritePhyUshort(sc, 0x14, 0x2c04);
21188         MP_WritePhyUshort(sc, 0x14, 0x2c07);
21189         MP_WritePhyUshort(sc, 0x14, 0x2c07);
21190         MP_WritePhyUshort(sc, 0x14, 0x2c07);
21191         MP_WritePhyUshort(sc, 0x14, 0xa304);
21192         MP_WritePhyUshort(sc, 0x14, 0xa301);
21193         MP_WritePhyUshort(sc, 0x14, 0x207e);
21194         MP_WritePhyUshort(sc, 0x13, 0xa01a);
21195         MP_WritePhyUshort(sc, 0x14, 0x0000);
21196         MP_WritePhyUshort(sc, 0x13, 0xa006);
21197         MP_WritePhyUshort(sc, 0x14, 0x0fff);
21198         MP_WritePhyUshort(sc, 0x13, 0xa004);
21199         MP_WritePhyUshort(sc, 0x14, 0x0fff);
21200         MP_WritePhyUshort(sc, 0x13, 0xa002);
21201         MP_WritePhyUshort(sc, 0x14, 0x0fff);
21202         MP_WritePhyUshort(sc, 0x13, 0xa000);
21203         MP_WritePhyUshort(sc, 0x14, 0x107c);
21204         MP_WritePhyUshort(sc, 0x13, 0xb820);
21205         MP_WritePhyUshort(sc, 0x14, 0x0210);
21206 
21207         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21208         MP_WritePhyUshort(sc, 0x13, 0x0000);
21209         MP_WritePhyUshort(sc, 0x14, 0x0000);
21210         MP_WritePhyUshort(sc, 0x1f, 0x0B82);
21211         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
21212         PhyRegValue &= ~(BIT_0);
21213         MP_WritePhyUshort(sc, 0x17, PhyRegValue);
21214         MP_WritePhyUshort(sc, 0x1f, 0x0A43);
21215         MP_WritePhyUshort(sc, 0x13, 0x8146);
21216         MP_WritePhyUshort(sc, 0x14, 0x0000);
21217 
21218         re_clear_phy_mcu_patch_request(sc);
21219         if (sc->RequiredSecLanDonglePatch) {
21220                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21221                 PhyRegValue = MP_ReadPhyUshort(sc, 0x11);
21222                 PhyRegValue &= ~(BIT_6);
21223                 MP_WritePhyUshort(sc, 0x11, PhyRegValue);
21224         }
21225 }
21226 
21227 static void re_set_phy_mcu_8411b_1(struct re_softc *sc)
21228 {
21229         u_int16_t PhyRegValue;
21230 
21231         re_set_phy_mcu_patch_request(sc);
21232 
21233         MP_WritePhyUshort(sc, 0x1f, 0x0A43);
21234         MP_WritePhyUshort(sc, 0x13, 0x8146);
21235         MP_WritePhyUshort(sc, 0x14, 0x0100);
21236         MP_WritePhyUshort(sc, 0x13, 0xB82E);
21237         MP_WritePhyUshort(sc, 0x14, 0x0001);
21238 
21239         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21240         MP_WritePhyUshort(sc, 0x13, 0xb820);
21241         MP_WritePhyUshort(sc, 0x14, 0x0290);
21242         MP_WritePhyUshort(sc, 0x13, 0xa012);
21243         MP_WritePhyUshort(sc, 0x14, 0x0000);
21244         MP_WritePhyUshort(sc, 0x13, 0xa014);
21245         MP_WritePhyUshort(sc, 0x14, 0x2c04);
21246         MP_WritePhyUshort(sc, 0x14, 0x2c07);
21247         MP_WritePhyUshort(sc, 0x14, 0x2c07);
21248         MP_WritePhyUshort(sc, 0x14, 0x2c07);
21249         MP_WritePhyUshort(sc, 0x14, 0xa304);
21250         MP_WritePhyUshort(sc, 0x14, 0xa301);
21251         MP_WritePhyUshort(sc, 0x14, 0x207e);
21252         MP_WritePhyUshort(sc, 0x13, 0xa01a);
21253         MP_WritePhyUshort(sc, 0x14, 0x0000);
21254         MP_WritePhyUshort(sc, 0x13, 0xa006);
21255         MP_WritePhyUshort(sc, 0x14, 0x0fff);
21256         MP_WritePhyUshort(sc, 0x13, 0xa004);
21257         MP_WritePhyUshort(sc, 0x14, 0x0fff);
21258         MP_WritePhyUshort(sc, 0x13, 0xa002);
21259         MP_WritePhyUshort(sc, 0x14, 0x0fff);
21260         MP_WritePhyUshort(sc, 0x13, 0xa000);
21261         MP_WritePhyUshort(sc, 0x14, 0x107c);
21262         MP_WritePhyUshort(sc, 0x13, 0xb820);
21263         MP_WritePhyUshort(sc, 0x14, 0x0210);
21264 
21265         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21266         MP_WritePhyUshort(sc, 0x13, 0x0000);
21267         MP_WritePhyUshort(sc, 0x14, 0x0000);
21268         MP_WritePhyUshort(sc, 0x1f, 0x0B82);
21269         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
21270         PhyRegValue &= ~(BIT_0);
21271         MP_WritePhyUshort(sc, 0x17, PhyRegValue);
21272         MP_WritePhyUshort(sc, 0x1f, 0x0A43);
21273         MP_WritePhyUshort(sc, 0x13, 0x8146);
21274         MP_WritePhyUshort(sc, 0x14, 0x0000);
21275 
21276         re_clear_phy_mcu_patch_request(sc);
21277         if (sc->RequiredSecLanDonglePatch) {
21278                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21279                 PhyRegValue = MP_ReadPhyUshort(sc, 0x11);
21280                 PhyRegValue &= ~(BIT_6);
21281                 MP_WritePhyUshort(sc, 0x11, PhyRegValue);
21282         }
21283 }
21284 
21285 static void re_set_phy_mcu_8168h_1(struct re_softc *sc)
21286 {
21287         u_int16_t PhyRegValue;
21288 
21289         re_set_phy_mcu_patch_request(sc);
21290 
21291         MP_WritePhyUshort(sc, 0x1f, 0x0A43);
21292         MP_WritePhyUshort(sc, 0x13, 0x8028);
21293         MP_WritePhyUshort(sc, 0x14, 0x6200);
21294         MP_WritePhyUshort(sc, 0x13, 0xB82E);
21295         MP_WritePhyUshort(sc, 0x14, 0x0001);
21296 
21297         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21298         MP_WritePhyUshort(sc, 0x13, 0xB820);
21299         MP_WritePhyUshort(sc, 0x14, 0x0290);
21300         MP_WritePhyUshort(sc, 0x13, 0xA012);
21301         MP_WritePhyUshort(sc, 0x14, 0x0000);
21302         MP_WritePhyUshort(sc, 0x13, 0xA014);
21303         MP_WritePhyUshort(sc, 0x14, 0x2c04);
21304         MP_WritePhyUshort(sc, 0x14, 0x2c10);
21305         MP_WritePhyUshort(sc, 0x14, 0x2c10);
21306         MP_WritePhyUshort(sc, 0x14, 0x2c10);
21307         MP_WritePhyUshort(sc, 0x14, 0xa210);
21308         MP_WritePhyUshort(sc, 0x14, 0xa101);
21309         MP_WritePhyUshort(sc, 0x14, 0xce10);
21310         MP_WritePhyUshort(sc, 0x14, 0xe070);
21311         MP_WritePhyUshort(sc, 0x14, 0x0f40);
21312         MP_WritePhyUshort(sc, 0x14, 0xaf01);
21313         MP_WritePhyUshort(sc, 0x14, 0x8f01);
21314         MP_WritePhyUshort(sc, 0x14, 0x183e);
21315         MP_WritePhyUshort(sc, 0x14, 0x8e10);
21316         MP_WritePhyUshort(sc, 0x14, 0x8101);
21317         MP_WritePhyUshort(sc, 0x14, 0x8210);
21318         MP_WritePhyUshort(sc, 0x14, 0x28da);
21319         MP_WritePhyUshort(sc, 0x13, 0xA01A);
21320         MP_WritePhyUshort(sc, 0x14, 0x0000);
21321         MP_WritePhyUshort(sc, 0x13, 0xA006);
21322         MP_WritePhyUshort(sc, 0x14, 0x0017);
21323         MP_WritePhyUshort(sc, 0x13, 0xA004);
21324         MP_WritePhyUshort(sc, 0x14, 0x0015);
21325         MP_WritePhyUshort(sc, 0x13, 0xA002);
21326         MP_WritePhyUshort(sc, 0x14, 0x0013);
21327         MP_WritePhyUshort(sc, 0x13, 0xA000);
21328         MP_WritePhyUshort(sc, 0x14, 0x18d1);
21329         MP_WritePhyUshort(sc, 0x13, 0xB820);
21330         MP_WritePhyUshort(sc, 0x14, 0x0210);
21331 
21332         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21333         MP_WritePhyUshort(sc, 0x13, 0x0000);
21334         MP_WritePhyUshort(sc, 0x14, 0x0000);
21335         MP_WritePhyUshort(sc, 0x1f, 0x0B82);
21336         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
21337         PhyRegValue &= ~(BIT_0);
21338         MP_WritePhyUshort(sc, 0x17, PhyRegValue);
21339         MP_WritePhyUshort(sc, 0x1f, 0x0A43);
21340         MP_WritePhyUshort(sc, 0x13, 0x8028);
21341         MP_WritePhyUshort(sc, 0x14, 0x0000);
21342 
21343         re_clear_phy_mcu_patch_request(sc);
21344         if (sc->RequiredSecLanDonglePatch) {
21345                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21346                 PhyRegValue = MP_ReadPhyUshort(sc, 0x11);
21347                 PhyRegValue &= ~(BIT_6);
21348                 MP_WritePhyUshort(sc, 0x11, PhyRegValue);
21349         }
21350 }
21351 
21352 static void re_set_phy_mcu_8168h_2(struct re_softc *sc)
21353 {
21354         u_int16_t PhyRegValue;
21355 
21356         re_set_phy_mcu_patch_request(sc);
21357 
21358         MP_WritePhyUshort(sc, 0x1f, 0x0A43);
21359         MP_WritePhyUshort(sc, 0x13, 0x8028);
21360         MP_WritePhyUshort(sc, 0x14, 0x6201);
21361         MP_WritePhyUshort(sc, 0x13, 0xB82E);
21362         MP_WritePhyUshort(sc, 0x14, 0x0001);
21363 
21364         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21365         MP_WritePhyUshort(sc, 0x13, 0xB820);
21366         MP_WritePhyUshort(sc, 0x14, 0x0290);
21367         MP_WritePhyUshort(sc, 0x13, 0xA012);
21368         MP_WritePhyUshort(sc, 0x14, 0x0000);
21369         MP_WritePhyUshort(sc, 0x13, 0xA014);
21370         MP_WritePhyUshort(sc, 0x14, 0x2c04);
21371         MP_WritePhyUshort(sc, 0x14, 0x2c09);
21372         MP_WritePhyUshort(sc, 0x14, 0x2c09);
21373         MP_WritePhyUshort(sc, 0x14, 0x2c09);
21374         MP_WritePhyUshort(sc, 0x14, 0xad01);
21375         MP_WritePhyUshort(sc, 0x14, 0xad01);
21376         MP_WritePhyUshort(sc, 0x14, 0xad01);
21377         MP_WritePhyUshort(sc, 0x14, 0xad01);
21378         MP_WritePhyUshort(sc, 0x14, 0x236c);
21379         MP_WritePhyUshort(sc, 0x13, 0xA01A);
21380         MP_WritePhyUshort(sc, 0x14, 0x0000);
21381         MP_WritePhyUshort(sc, 0x13, 0xA006);
21382         MP_WritePhyUshort(sc, 0x14, 0x0fff);
21383         MP_WritePhyUshort(sc, 0x13, 0xA004);
21384         MP_WritePhyUshort(sc, 0x14, 0x0fff);
21385         MP_WritePhyUshort(sc, 0x13, 0xA002);
21386         MP_WritePhyUshort(sc, 0x14, 0x0fff);
21387         MP_WritePhyUshort(sc, 0x13, 0xA000);
21388         MP_WritePhyUshort(sc, 0x14, 0x136b);
21389         MP_WritePhyUshort(sc, 0x13, 0xB820);
21390         MP_WritePhyUshort(sc, 0x14, 0x0210);
21391 
21392         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21393         MP_WritePhyUshort(sc, 0x13, 0x8323);
21394         MP_WritePhyUshort(sc, 0x14, 0xaf83);
21395         MP_WritePhyUshort(sc, 0x14, 0x2faf);
21396         MP_WritePhyUshort(sc, 0x14, 0x853d);
21397         MP_WritePhyUshort(sc, 0x14, 0xaf85);
21398         MP_WritePhyUshort(sc, 0x14, 0x3daf);
21399         MP_WritePhyUshort(sc, 0x14, 0x853d);
21400         MP_WritePhyUshort(sc, 0x14, 0xe082);
21401         MP_WritePhyUshort(sc, 0x14, 0x45ad);
21402         MP_WritePhyUshort(sc, 0x14, 0x2052);
21403         MP_WritePhyUshort(sc, 0x14, 0xe082);
21404         MP_WritePhyUshort(sc, 0x14, 0x7ae3);
21405         MP_WritePhyUshort(sc, 0x14, 0x85fe);
21406         MP_WritePhyUshort(sc, 0x14, 0x1a03);
21407         MP_WritePhyUshort(sc, 0x14, 0x10e4);
21408         MP_WritePhyUshort(sc, 0x14, 0x85f6);
21409         MP_WritePhyUshort(sc, 0x14, 0xe082);
21410         MP_WritePhyUshort(sc, 0x14, 0x7a1b);
21411         MP_WritePhyUshort(sc, 0x14, 0x03e4);
21412         MP_WritePhyUshort(sc, 0x14, 0x85fa);
21413         MP_WritePhyUshort(sc, 0x14, 0xe082);
21414         MP_WritePhyUshort(sc, 0x14, 0x7be3);
21415         MP_WritePhyUshort(sc, 0x14, 0x85fe);
21416         MP_WritePhyUshort(sc, 0x14, 0x1a03);
21417         MP_WritePhyUshort(sc, 0x14, 0x10e4);
21418         MP_WritePhyUshort(sc, 0x14, 0x85f7);
21419         MP_WritePhyUshort(sc, 0x14, 0xe082);
21420         MP_WritePhyUshort(sc, 0x14, 0x7b1b);
21421         MP_WritePhyUshort(sc, 0x14, 0x03e4);
21422         MP_WritePhyUshort(sc, 0x14, 0x85fb);
21423         MP_WritePhyUshort(sc, 0x14, 0xe082);
21424         MP_WritePhyUshort(sc, 0x14, 0x7ce3);
21425         MP_WritePhyUshort(sc, 0x14, 0x85fe);
21426         MP_WritePhyUshort(sc, 0x14, 0x1a03);
21427         MP_WritePhyUshort(sc, 0x14, 0x10e4);
21428         MP_WritePhyUshort(sc, 0x14, 0x85f8);
21429         MP_WritePhyUshort(sc, 0x14, 0xe082);
21430         MP_WritePhyUshort(sc, 0x14, 0x7c1b);
21431         MP_WritePhyUshort(sc, 0x14, 0x03e4);
21432         MP_WritePhyUshort(sc, 0x14, 0x85fc);
21433         MP_WritePhyUshort(sc, 0x14, 0xe082);
21434         MP_WritePhyUshort(sc, 0x14, 0x7de3);
21435         MP_WritePhyUshort(sc, 0x14, 0x85fe);
21436         MP_WritePhyUshort(sc, 0x14, 0x1a03);
21437         MP_WritePhyUshort(sc, 0x14, 0x10e4);
21438         MP_WritePhyUshort(sc, 0x14, 0x85f9);
21439         MP_WritePhyUshort(sc, 0x14, 0xe082);
21440         MP_WritePhyUshort(sc, 0x14, 0x7d1b);
21441         MP_WritePhyUshort(sc, 0x14, 0x03e4);
21442         MP_WritePhyUshort(sc, 0x14, 0x85fd);
21443         MP_WritePhyUshort(sc, 0x14, 0xae50);
21444         MP_WritePhyUshort(sc, 0x14, 0xe082);
21445         MP_WritePhyUshort(sc, 0x14, 0x7ee3);
21446         MP_WritePhyUshort(sc, 0x14, 0x85ff);
21447         MP_WritePhyUshort(sc, 0x14, 0x1a03);
21448         MP_WritePhyUshort(sc, 0x14, 0x10e4);
21449         MP_WritePhyUshort(sc, 0x14, 0x85f6);
21450         MP_WritePhyUshort(sc, 0x14, 0xe082);
21451         MP_WritePhyUshort(sc, 0x14, 0x7e1b);
21452         MP_WritePhyUshort(sc, 0x14, 0x03e4);
21453         MP_WritePhyUshort(sc, 0x14, 0x85fa);
21454         MP_WritePhyUshort(sc, 0x14, 0xe082);
21455         MP_WritePhyUshort(sc, 0x14, 0x7fe3);
21456         MP_WritePhyUshort(sc, 0x14, 0x85ff);
21457         MP_WritePhyUshort(sc, 0x14, 0x1a03);
21458         MP_WritePhyUshort(sc, 0x14, 0x10e4);
21459         MP_WritePhyUshort(sc, 0x14, 0x85f7);
21460         MP_WritePhyUshort(sc, 0x14, 0xe082);
21461         MP_WritePhyUshort(sc, 0x14, 0x7f1b);
21462         MP_WritePhyUshort(sc, 0x14, 0x03e4);
21463         MP_WritePhyUshort(sc, 0x14, 0x85fb);
21464         MP_WritePhyUshort(sc, 0x14, 0xe082);
21465         MP_WritePhyUshort(sc, 0x14, 0x80e3);
21466         MP_WritePhyUshort(sc, 0x14, 0x85ff);
21467         MP_WritePhyUshort(sc, 0x14, 0x1a03);
21468         MP_WritePhyUshort(sc, 0x14, 0x10e4);
21469         MP_WritePhyUshort(sc, 0x14, 0x85f8);
21470         MP_WritePhyUshort(sc, 0x14, 0xe082);
21471         MP_WritePhyUshort(sc, 0x14, 0x801b);
21472         MP_WritePhyUshort(sc, 0x14, 0x03e4);
21473         MP_WritePhyUshort(sc, 0x14, 0x85fc);
21474         MP_WritePhyUshort(sc, 0x14, 0xe082);
21475         MP_WritePhyUshort(sc, 0x14, 0x81e3);
21476         MP_WritePhyUshort(sc, 0x14, 0x85ff);
21477         MP_WritePhyUshort(sc, 0x14, 0x1a03);
21478         MP_WritePhyUshort(sc, 0x14, 0x10e4);
21479         MP_WritePhyUshort(sc, 0x14, 0x85f9);
21480         MP_WritePhyUshort(sc, 0x14, 0xe082);
21481         MP_WritePhyUshort(sc, 0x14, 0x811b);
21482         MP_WritePhyUshort(sc, 0x14, 0x03e4);
21483         MP_WritePhyUshort(sc, 0x14, 0x85fd);
21484         MP_WritePhyUshort(sc, 0x14, 0xe085);
21485         MP_WritePhyUshort(sc, 0x14, 0xf6ad);
21486         MP_WritePhyUshort(sc, 0x14, 0x2404);
21487         MP_WritePhyUshort(sc, 0x14, 0xee85);
21488         MP_WritePhyUshort(sc, 0x14, 0xf610);
21489         MP_WritePhyUshort(sc, 0x14, 0xe085);
21490         MP_WritePhyUshort(sc, 0x14, 0xf7ad);
21491         MP_WritePhyUshort(sc, 0x14, 0x2404);
21492         MP_WritePhyUshort(sc, 0x14, 0xee85);
21493         MP_WritePhyUshort(sc, 0x14, 0xf710);
21494         MP_WritePhyUshort(sc, 0x14, 0xe085);
21495         MP_WritePhyUshort(sc, 0x14, 0xf8ad);
21496         MP_WritePhyUshort(sc, 0x14, 0x2404);
21497         MP_WritePhyUshort(sc, 0x14, 0xee85);
21498         MP_WritePhyUshort(sc, 0x14, 0xf810);
21499         MP_WritePhyUshort(sc, 0x14, 0xe085);
21500         MP_WritePhyUshort(sc, 0x14, 0xf9ad);
21501         MP_WritePhyUshort(sc, 0x14, 0x2404);
21502         MP_WritePhyUshort(sc, 0x14, 0xee85);
21503         MP_WritePhyUshort(sc, 0x14, 0xf910);
21504         MP_WritePhyUshort(sc, 0x14, 0xe085);
21505         MP_WritePhyUshort(sc, 0x14, 0xfaad);
21506         MP_WritePhyUshort(sc, 0x14, 0x2704);
21507         MP_WritePhyUshort(sc, 0x14, 0xee85);
21508         MP_WritePhyUshort(sc, 0x14, 0xfa00);
21509         MP_WritePhyUshort(sc, 0x14, 0xe085);
21510         MP_WritePhyUshort(sc, 0x14, 0xfbad);
21511         MP_WritePhyUshort(sc, 0x14, 0x2704);
21512         MP_WritePhyUshort(sc, 0x14, 0xee85);
21513         MP_WritePhyUshort(sc, 0x14, 0xfb00);
21514         MP_WritePhyUshort(sc, 0x14, 0xe085);
21515         MP_WritePhyUshort(sc, 0x14, 0xfcad);
21516         MP_WritePhyUshort(sc, 0x14, 0x2704);
21517         MP_WritePhyUshort(sc, 0x14, 0xee85);
21518         MP_WritePhyUshort(sc, 0x14, 0xfc00);
21519         MP_WritePhyUshort(sc, 0x14, 0xe085);
21520         MP_WritePhyUshort(sc, 0x14, 0xfdad);
21521         MP_WritePhyUshort(sc, 0x14, 0x2704);
21522         MP_WritePhyUshort(sc, 0x14, 0xee85);
21523         MP_WritePhyUshort(sc, 0x14, 0xfd00);
21524         MP_WritePhyUshort(sc, 0x14, 0xe082);
21525         MP_WritePhyUshort(sc, 0x14, 0x44ad);
21526         MP_WritePhyUshort(sc, 0x14, 0x203f);
21527         MP_WritePhyUshort(sc, 0x14, 0xe085);
21528         MP_WritePhyUshort(sc, 0x14, 0xf6e4);
21529         MP_WritePhyUshort(sc, 0x14, 0x8288);
21530         MP_WritePhyUshort(sc, 0x14, 0xe085);
21531         MP_WritePhyUshort(sc, 0x14, 0xfae4);
21532         MP_WritePhyUshort(sc, 0x14, 0x8289);
21533         MP_WritePhyUshort(sc, 0x14, 0xe082);
21534         MP_WritePhyUshort(sc, 0x14, 0x440d);
21535         MP_WritePhyUshort(sc, 0x14, 0x0458);
21536         MP_WritePhyUshort(sc, 0x14, 0x01bf);
21537         MP_WritePhyUshort(sc, 0x14, 0x8264);
21538         MP_WritePhyUshort(sc, 0x14, 0x0215);
21539         MP_WritePhyUshort(sc, 0x14, 0x38bf);
21540         MP_WritePhyUshort(sc, 0x14, 0x824e);
21541         MP_WritePhyUshort(sc, 0x14, 0x0213);
21542         MP_WritePhyUshort(sc, 0x14, 0x06a0);
21543         MP_WritePhyUshort(sc, 0x14, 0x010f);
21544         MP_WritePhyUshort(sc, 0x14, 0xe082);
21545         MP_WritePhyUshort(sc, 0x14, 0x44f6);
21546         MP_WritePhyUshort(sc, 0x14, 0x20e4);
21547         MP_WritePhyUshort(sc, 0x14, 0x8244);
21548         MP_WritePhyUshort(sc, 0x14, 0x580f);
21549         MP_WritePhyUshort(sc, 0x14, 0xe582);
21550         MP_WritePhyUshort(sc, 0x14, 0x5aae);
21551         MP_WritePhyUshort(sc, 0x14, 0x0ebf);
21552         MP_WritePhyUshort(sc, 0x14, 0x825e);
21553         MP_WritePhyUshort(sc, 0x14, 0xe382);
21554         MP_WritePhyUshort(sc, 0x14, 0x44f7);
21555         MP_WritePhyUshort(sc, 0x14, 0x3ce7);
21556         MP_WritePhyUshort(sc, 0x14, 0x8244);
21557         MP_WritePhyUshort(sc, 0x14, 0x0212);
21558         MP_WritePhyUshort(sc, 0x14, 0xf0ad);
21559         MP_WritePhyUshort(sc, 0x14, 0x213f);
21560         MP_WritePhyUshort(sc, 0x14, 0xe085);
21561         MP_WritePhyUshort(sc, 0x14, 0xf7e4);
21562         MP_WritePhyUshort(sc, 0x14, 0x8288);
21563         MP_WritePhyUshort(sc, 0x14, 0xe085);
21564         MP_WritePhyUshort(sc, 0x14, 0xfbe4);
21565         MP_WritePhyUshort(sc, 0x14, 0x8289);
21566         MP_WritePhyUshort(sc, 0x14, 0xe082);
21567         MP_WritePhyUshort(sc, 0x14, 0x440d);
21568         MP_WritePhyUshort(sc, 0x14, 0x0558);
21569         MP_WritePhyUshort(sc, 0x14, 0x01bf);
21570         MP_WritePhyUshort(sc, 0x14, 0x826b);
21571         MP_WritePhyUshort(sc, 0x14, 0x0215);
21572         MP_WritePhyUshort(sc, 0x14, 0x38bf);
21573         MP_WritePhyUshort(sc, 0x14, 0x824f);
21574         MP_WritePhyUshort(sc, 0x14, 0x0213);
21575         MP_WritePhyUshort(sc, 0x14, 0x06a0);
21576         MP_WritePhyUshort(sc, 0x14, 0x010f);
21577         MP_WritePhyUshort(sc, 0x14, 0xe082);
21578         MP_WritePhyUshort(sc, 0x14, 0x44f6);
21579         MP_WritePhyUshort(sc, 0x14, 0x21e4);
21580         MP_WritePhyUshort(sc, 0x14, 0x8244);
21581         MP_WritePhyUshort(sc, 0x14, 0x580f);
21582         MP_WritePhyUshort(sc, 0x14, 0xe582);
21583         MP_WritePhyUshort(sc, 0x14, 0x5bae);
21584         MP_WritePhyUshort(sc, 0x14, 0x0ebf);
21585         MP_WritePhyUshort(sc, 0x14, 0x8265);
21586         MP_WritePhyUshort(sc, 0x14, 0xe382);
21587         MP_WritePhyUshort(sc, 0x14, 0x44f7);
21588         MP_WritePhyUshort(sc, 0x14, 0x3de7);
21589         MP_WritePhyUshort(sc, 0x14, 0x8244);
21590         MP_WritePhyUshort(sc, 0x14, 0x0212);
21591         MP_WritePhyUshort(sc, 0x14, 0xf0ad);
21592         MP_WritePhyUshort(sc, 0x14, 0x223f);
21593         MP_WritePhyUshort(sc, 0x14, 0xe085);
21594         MP_WritePhyUshort(sc, 0x14, 0xf8e4);
21595         MP_WritePhyUshort(sc, 0x14, 0x8288);
21596         MP_WritePhyUshort(sc, 0x14, 0xe085);
21597         MP_WritePhyUshort(sc, 0x14, 0xfce4);
21598         MP_WritePhyUshort(sc, 0x14, 0x8289);
21599         MP_WritePhyUshort(sc, 0x14, 0xe082);
21600         MP_WritePhyUshort(sc, 0x14, 0x440d);
21601         MP_WritePhyUshort(sc, 0x14, 0x0658);
21602         MP_WritePhyUshort(sc, 0x14, 0x01bf);
21603         MP_WritePhyUshort(sc, 0x14, 0x8272);
21604         MP_WritePhyUshort(sc, 0x14, 0x0215);
21605         MP_WritePhyUshort(sc, 0x14, 0x38bf);
21606         MP_WritePhyUshort(sc, 0x14, 0x8250);
21607         MP_WritePhyUshort(sc, 0x14, 0x0213);
21608         MP_WritePhyUshort(sc, 0x14, 0x06a0);
21609         MP_WritePhyUshort(sc, 0x14, 0x010f);
21610         MP_WritePhyUshort(sc, 0x14, 0xe082);
21611         MP_WritePhyUshort(sc, 0x14, 0x44f6);
21612         MP_WritePhyUshort(sc, 0x14, 0x22e4);
21613         MP_WritePhyUshort(sc, 0x14, 0x8244);
21614         MP_WritePhyUshort(sc, 0x14, 0x580f);
21615         MP_WritePhyUshort(sc, 0x14, 0xe582);
21616         MP_WritePhyUshort(sc, 0x14, 0x5cae);
21617         MP_WritePhyUshort(sc, 0x14, 0x0ebf);
21618         MP_WritePhyUshort(sc, 0x14, 0x826c);
21619         MP_WritePhyUshort(sc, 0x14, 0xe382);
21620         MP_WritePhyUshort(sc, 0x14, 0x44f7);
21621         MP_WritePhyUshort(sc, 0x14, 0x3ee7);
21622         MP_WritePhyUshort(sc, 0x14, 0x8244);
21623         MP_WritePhyUshort(sc, 0x14, 0x0212);
21624         MP_WritePhyUshort(sc, 0x14, 0xf0ad);
21625         MP_WritePhyUshort(sc, 0x14, 0x233f);
21626         MP_WritePhyUshort(sc, 0x14, 0xe085);
21627         MP_WritePhyUshort(sc, 0x14, 0xf9e4);
21628         MP_WritePhyUshort(sc, 0x14, 0x8288);
21629         MP_WritePhyUshort(sc, 0x14, 0xe085);
21630         MP_WritePhyUshort(sc, 0x14, 0xfde4);
21631         MP_WritePhyUshort(sc, 0x14, 0x8289);
21632         MP_WritePhyUshort(sc, 0x14, 0xe082);
21633         MP_WritePhyUshort(sc, 0x14, 0x440d);
21634         MP_WritePhyUshort(sc, 0x14, 0x0758);
21635         MP_WritePhyUshort(sc, 0x14, 0x01bf);
21636         MP_WritePhyUshort(sc, 0x14, 0x8279);
21637         MP_WritePhyUshort(sc, 0x14, 0x0215);
21638         MP_WritePhyUshort(sc, 0x14, 0x38bf);
21639         MP_WritePhyUshort(sc, 0x14, 0x8251);
21640         MP_WritePhyUshort(sc, 0x14, 0x0213);
21641         MP_WritePhyUshort(sc, 0x14, 0x06a0);
21642         MP_WritePhyUshort(sc, 0x14, 0x010f);
21643         MP_WritePhyUshort(sc, 0x14, 0xe082);
21644         MP_WritePhyUshort(sc, 0x14, 0x44f6);
21645         MP_WritePhyUshort(sc, 0x14, 0x23e4);
21646         MP_WritePhyUshort(sc, 0x14, 0x8244);
21647         MP_WritePhyUshort(sc, 0x14, 0x580f);
21648         MP_WritePhyUshort(sc, 0x14, 0xe582);
21649         MP_WritePhyUshort(sc, 0x14, 0x5dae);
21650         MP_WritePhyUshort(sc, 0x14, 0x0ebf);
21651         MP_WritePhyUshort(sc, 0x14, 0x8273);
21652         MP_WritePhyUshort(sc, 0x14, 0xe382);
21653         MP_WritePhyUshort(sc, 0x14, 0x44f7);
21654         MP_WritePhyUshort(sc, 0x14, 0x3fe7);
21655         MP_WritePhyUshort(sc, 0x14, 0x8244);
21656         MP_WritePhyUshort(sc, 0x14, 0x0212);
21657         MP_WritePhyUshort(sc, 0x14, 0xf0ee);
21658         MP_WritePhyUshort(sc, 0x14, 0x8288);
21659         MP_WritePhyUshort(sc, 0x14, 0x10ee);
21660         MP_WritePhyUshort(sc, 0x14, 0x8289);
21661         MP_WritePhyUshort(sc, 0x14, 0x00af);
21662         MP_WritePhyUshort(sc, 0x14, 0x14aa);
21663         MP_WritePhyUshort(sc, 0x13, 0xb818);
21664         MP_WritePhyUshort(sc, 0x14, 0x13cf);
21665         MP_WritePhyUshort(sc, 0x13, 0xb81a);
21666         MP_WritePhyUshort(sc, 0x14, 0xfffd);
21667         MP_WritePhyUshort(sc, 0x13, 0xb81c);
21668         MP_WritePhyUshort(sc, 0x14, 0xfffd);
21669         MP_WritePhyUshort(sc, 0x13, 0xb81e);
21670         MP_WritePhyUshort(sc, 0x14, 0xfffd);
21671         MP_WritePhyUshort(sc, 0x13, 0xb832);
21672         MP_WritePhyUshort(sc, 0x14, 0x0001);
21673 
21674         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21675         MP_WritePhyUshort(sc, 0x13, 0x0000);
21676         MP_WritePhyUshort(sc, 0x14, 0x0000);
21677         MP_WritePhyUshort(sc, 0x1f, 0x0B82);
21678         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
21679         PhyRegValue &= ~(BIT_0);
21680         MP_WritePhyUshort(sc, 0x17, PhyRegValue);
21681         MP_WritePhyUshort(sc, 0x1f, 0x0A43);
21682         MP_WritePhyUshort(sc, 0x13, 0x8028);
21683         MP_WritePhyUshort(sc, 0x14, 0x0000);
21684 
21685         re_clear_phy_mcu_patch_request(sc);
21686         if (sc->RequiredSecLanDonglePatch) {
21687                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21688                 PhyRegValue = MP_ReadPhyUshort(sc, 0x11);
21689                 PhyRegValue &= ~(BIT_6);
21690                 MP_WritePhyUshort(sc, 0x11, PhyRegValue);
21691         }
21692 }
21693 
21694 static void re_set_phy_mcu_8168ep_1(struct re_softc *sc)
21695 {
21696         u_int16_t PhyRegValue;
21697 
21698         re_set_phy_mcu_patch_request(sc);
21699 
21700         MP_WritePhyUshort(sc,0x1f, 0x0A43);
21701         MP_WritePhyUshort(sc,0x13, 0x8146);
21702         MP_WritePhyUshort(sc,0x14, 0x2700);
21703         MP_WritePhyUshort(sc,0x13, 0xB82E);
21704         MP_WritePhyUshort(sc,0x14, 0x0001);
21705 
21706 
21707         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21708         MP_WritePhyUshort(sc, 0x13, 0xb820);
21709         MP_WritePhyUshort(sc, 0x14, 0x0090);
21710         MP_WritePhyUshort(sc, 0x13, 0xa012);
21711         MP_WritePhyUshort(sc, 0x14, 0x0000);
21712         MP_WritePhyUshort(sc, 0x13, 0xa014);
21713         MP_WritePhyUshort(sc, 0x14, 0x2c04);
21714         MP_WritePhyUshort(sc, 0x14, 0x2c1b);
21715         MP_WritePhyUshort(sc, 0x14, 0x2c65);
21716         MP_WritePhyUshort(sc, 0x14, 0x2d14);
21717         MP_WritePhyUshort(sc, 0x14, 0xd71e);
21718         MP_WritePhyUshort(sc, 0x14, 0x4092);
21719         MP_WritePhyUshort(sc, 0x14, 0xba04);
21720         MP_WritePhyUshort(sc, 0x14, 0x3084);
21721         MP_WritePhyUshort(sc, 0x14, 0x1d04);
21722         MP_WritePhyUshort(sc, 0x14, 0x1cdd);
21723         MP_WritePhyUshort(sc, 0x14, 0x1ce8);
21724         MP_WritePhyUshort(sc, 0x14, 0xaeff);
21725         MP_WritePhyUshort(sc, 0x14, 0xaf02);
21726         MP_WritePhyUshort(sc, 0x14, 0x8f02);
21727         MP_WritePhyUshort(sc, 0x14, 0x8eff);
21728         MP_WritePhyUshort(sc, 0x14, 0xce01);
21729         MP_WritePhyUshort(sc, 0x14, 0xe070);
21730         MP_WritePhyUshort(sc, 0x14, 0x0f00);
21731         MP_WritePhyUshort(sc, 0x14, 0xaf01);
21732         MP_WritePhyUshort(sc, 0x14, 0x8f01);
21733         MP_WritePhyUshort(sc, 0x14, 0xd712);
21734         MP_WritePhyUshort(sc, 0x14, 0x5fe8);
21735         MP_WritePhyUshort(sc, 0x14, 0xaf02);
21736         MP_WritePhyUshort(sc, 0x14, 0x8f02);
21737         MP_WritePhyUshort(sc, 0x14, 0x8e01);
21738         MP_WritePhyUshort(sc, 0x14, 0x1cf2);
21739         MP_WritePhyUshort(sc, 0x14, 0x2825);
21740         MP_WritePhyUshort(sc, 0x14, 0xd05a);
21741         MP_WritePhyUshort(sc, 0x14, 0xd19a);
21742         MP_WritePhyUshort(sc, 0x14, 0xd709);
21743         MP_WritePhyUshort(sc, 0x14, 0x608f);
21744         MP_WritePhyUshort(sc, 0x14, 0xd06b);
21745         MP_WritePhyUshort(sc, 0x14, 0xd18a);
21746         MP_WritePhyUshort(sc, 0x14, 0x2c25);
21747         MP_WritePhyUshort(sc, 0x14, 0xd0be);
21748         MP_WritePhyUshort(sc, 0x14, 0xd188);
21749         MP_WritePhyUshort(sc, 0x14, 0x2c25);
21750         MP_WritePhyUshort(sc, 0x14, 0xd708);
21751         MP_WritePhyUshort(sc, 0x14, 0x4072);
21752         MP_WritePhyUshort(sc, 0x14, 0xc104);
21753         MP_WritePhyUshort(sc, 0x14, 0x2c37);
21754         MP_WritePhyUshort(sc, 0x14, 0x4076);
21755         MP_WritePhyUshort(sc, 0x14, 0xc110);
21756         MP_WritePhyUshort(sc, 0x14, 0x2c37);
21757         MP_WritePhyUshort(sc, 0x14, 0x4071);
21758         MP_WritePhyUshort(sc, 0x14, 0xc102);
21759         MP_WritePhyUshort(sc, 0x14, 0x2c37);
21760         MP_WritePhyUshort(sc, 0x14, 0x4070);
21761         MP_WritePhyUshort(sc, 0x14, 0xc101);
21762         MP_WritePhyUshort(sc, 0x14, 0x2c37);
21763         MP_WritePhyUshort(sc, 0x14, 0x1786);
21764         MP_WritePhyUshort(sc, 0x14, 0xd709);
21765         MP_WritePhyUshort(sc, 0x14, 0x3390);
21766         MP_WritePhyUshort(sc, 0x14, 0x5c32);
21767         MP_WritePhyUshort(sc, 0x14, 0x2c47);
21768         MP_WritePhyUshort(sc, 0x14, 0x1786);
21769         MP_WritePhyUshort(sc, 0x14, 0xd708);
21770         MP_WritePhyUshort(sc, 0x14, 0x6193);
21771         MP_WritePhyUshort(sc, 0x14, 0xd709);
21772         MP_WritePhyUshort(sc, 0x14, 0x5f9d);
21773         MP_WritePhyUshort(sc, 0x14, 0x408b);
21774         MP_WritePhyUshort(sc, 0x14, 0xd71e);
21775         MP_WritePhyUshort(sc, 0x14, 0x6042);
21776         MP_WritePhyUshort(sc, 0x14, 0xb401);
21777         MP_WritePhyUshort(sc, 0x14, 0x1786);
21778         MP_WritePhyUshort(sc, 0x14, 0xd708);
21779         MP_WritePhyUshort(sc, 0x14, 0x6073);
21780         MP_WritePhyUshort(sc, 0x14, 0x5fbc);
21781         MP_WritePhyUshort(sc, 0x14, 0x2c46);
21782         MP_WritePhyUshort(sc, 0x14, 0x26fe);
21783         MP_WritePhyUshort(sc, 0x14, 0xb280);
21784         MP_WritePhyUshort(sc, 0x14, 0xa841);
21785         MP_WritePhyUshort(sc, 0x14, 0x94e0);
21786         MP_WritePhyUshort(sc, 0x14, 0x8710);
21787         MP_WritePhyUshort(sc, 0x14, 0xd709);
21788         MP_WritePhyUshort(sc, 0x14, 0x42ec);
21789         MP_WritePhyUshort(sc, 0x14, 0x606d);
21790         MP_WritePhyUshort(sc, 0x14, 0xd207);
21791         MP_WritePhyUshort(sc, 0x14, 0x2c50);
21792         MP_WritePhyUshort(sc, 0x14, 0xd203);
21793         MP_WritePhyUshort(sc, 0x14, 0x33ff);
21794         MP_WritePhyUshort(sc, 0x14, 0x5647);
21795         MP_WritePhyUshort(sc, 0x14, 0x3275);
21796         MP_WritePhyUshort(sc, 0x14, 0x7c57);
21797         MP_WritePhyUshort(sc, 0x14, 0xb240);
21798         MP_WritePhyUshort(sc, 0x14, 0xb402);
21799         MP_WritePhyUshort(sc, 0x14, 0x2647);
21800         MP_WritePhyUshort(sc, 0x14, 0x6096);
21801         MP_WritePhyUshort(sc, 0x14, 0xb240);
21802         MP_WritePhyUshort(sc, 0x14, 0xb406);
21803         MP_WritePhyUshort(sc, 0x14, 0x2647);
21804         MP_WritePhyUshort(sc, 0x14, 0x31d7);
21805         MP_WritePhyUshort(sc, 0x14, 0x7c60);
21806         MP_WritePhyUshort(sc, 0x14, 0xb240);
21807         MP_WritePhyUshort(sc, 0x14, 0xb40e);
21808         MP_WritePhyUshort(sc, 0x14, 0x2647);
21809         MP_WritePhyUshort(sc, 0x14, 0xb410);
21810         MP_WritePhyUshort(sc, 0x14, 0x8802);
21811         MP_WritePhyUshort(sc, 0x14, 0xb240);
21812         MP_WritePhyUshort(sc, 0x14, 0x940e);
21813         MP_WritePhyUshort(sc, 0x14, 0x2647);
21814         MP_WritePhyUshort(sc, 0x14, 0xba04);
21815         MP_WritePhyUshort(sc, 0x14, 0x1cdd);
21816         MP_WritePhyUshort(sc, 0x14, 0xa902);
21817         MP_WritePhyUshort(sc, 0x14, 0xd711);
21818         MP_WritePhyUshort(sc, 0x14, 0x4045);
21819         MP_WritePhyUshort(sc, 0x14, 0xa980);
21820         MP_WritePhyUshort(sc, 0x14, 0x3003);
21821         MP_WritePhyUshort(sc, 0x14, 0x5a19);
21822         MP_WritePhyUshort(sc, 0x14, 0xa540);
21823         MP_WritePhyUshort(sc, 0x14, 0xa601);
21824         MP_WritePhyUshort(sc, 0x14, 0xd710);
21825         MP_WritePhyUshort(sc, 0x14, 0x4043);
21826         MP_WritePhyUshort(sc, 0x14, 0xa910);
21827         MP_WritePhyUshort(sc, 0x14, 0xd711);
21828         MP_WritePhyUshort(sc, 0x14, 0x60a0);
21829         MP_WritePhyUshort(sc, 0x14, 0xca33);
21830         MP_WritePhyUshort(sc, 0x14, 0xcb33);
21831         MP_WritePhyUshort(sc, 0x14, 0xa941);
21832         MP_WritePhyUshort(sc, 0x14, 0x2c7b);
21833         MP_WritePhyUshort(sc, 0x14, 0xcaff);
21834         MP_WritePhyUshort(sc, 0x14, 0xcbff);
21835         MP_WritePhyUshort(sc, 0x14, 0xa921);
21836         MP_WritePhyUshort(sc, 0x14, 0xce02);
21837         MP_WritePhyUshort(sc, 0x14, 0xe070);
21838         MP_WritePhyUshort(sc, 0x14, 0x0f10);
21839         MP_WritePhyUshort(sc, 0x14, 0xaf01);
21840         MP_WritePhyUshort(sc, 0x14, 0x8f01);
21841         MP_WritePhyUshort(sc, 0x14, 0x1791);
21842         MP_WritePhyUshort(sc, 0x14, 0x8e02);
21843         MP_WritePhyUshort(sc, 0x14, 0xd710);
21844         MP_WritePhyUshort(sc, 0x14, 0x41a3);
21845         MP_WritePhyUshort(sc, 0x14, 0xa140);
21846         MP_WritePhyUshort(sc, 0x14, 0xa220);
21847         MP_WritePhyUshort(sc, 0x14, 0xce10);
21848         MP_WritePhyUshort(sc, 0x14, 0xe070);
21849         MP_WritePhyUshort(sc, 0x14, 0x0f40);
21850         MP_WritePhyUshort(sc, 0x14, 0xaf01);
21851         MP_WritePhyUshort(sc, 0x14, 0x8f01);
21852         MP_WritePhyUshort(sc, 0x14, 0x1791);
21853         MP_WritePhyUshort(sc, 0x14, 0x8e10);
21854         MP_WritePhyUshort(sc, 0x14, 0x8140);
21855         MP_WritePhyUshort(sc, 0x14, 0x8220);
21856         MP_WritePhyUshort(sc, 0x14, 0xa301);
21857         MP_WritePhyUshort(sc, 0x14, 0x17b2);
21858         MP_WritePhyUshort(sc, 0x14, 0xd710);
21859         MP_WritePhyUshort(sc, 0x14, 0x609c);
21860         MP_WritePhyUshort(sc, 0x14, 0xd71e);
21861         MP_WritePhyUshort(sc, 0x14, 0x7fa4);
21862         MP_WritePhyUshort(sc, 0x14, 0x2cdb);
21863         MP_WritePhyUshort(sc, 0x14, 0x1cf0);
21864         MP_WritePhyUshort(sc, 0x14, 0xce04);
21865         MP_WritePhyUshort(sc, 0x14, 0xe070);
21866         MP_WritePhyUshort(sc, 0x14, 0x0f20);
21867         MP_WritePhyUshort(sc, 0x14, 0xaf01);
21868         MP_WritePhyUshort(sc, 0x14, 0x8f01);
21869         MP_WritePhyUshort(sc, 0x14, 0x1791);
21870         MP_WritePhyUshort(sc, 0x14, 0x8e04);
21871         MP_WritePhyUshort(sc, 0x14, 0x6044);
21872         MP_WritePhyUshort(sc, 0x14, 0x2cdb);
21873         MP_WritePhyUshort(sc, 0x14, 0xa520);
21874         MP_WritePhyUshort(sc, 0x14, 0xd710);
21875         MP_WritePhyUshort(sc, 0x14, 0x4043);
21876         MP_WritePhyUshort(sc, 0x14, 0x2cc8);
21877         MP_WritePhyUshort(sc, 0x14, 0xe00f);
21878         MP_WritePhyUshort(sc, 0x14, 0x0501);
21879         MP_WritePhyUshort(sc, 0x14, 0x1cf6);
21880         MP_WritePhyUshort(sc, 0x14, 0xb801);
21881         MP_WritePhyUshort(sc, 0x14, 0xd71e);
21882         MP_WritePhyUshort(sc, 0x14, 0x4060);
21883         MP_WritePhyUshort(sc, 0x14, 0x7fc4);
21884         MP_WritePhyUshort(sc, 0x14, 0x2cdb);
21885         MP_WritePhyUshort(sc, 0x14, 0x1cfc);
21886         MP_WritePhyUshort(sc, 0x14, 0xe00f);
21887         MP_WritePhyUshort(sc, 0x14, 0x0502);
21888         MP_WritePhyUshort(sc, 0x14, 0x1cf6);
21889         MP_WritePhyUshort(sc, 0x14, 0xb802);
21890         MP_WritePhyUshort(sc, 0x14, 0xd71e);
21891         MP_WritePhyUshort(sc, 0x14, 0x4061);
21892         MP_WritePhyUshort(sc, 0x14, 0x7fc4);
21893         MP_WritePhyUshort(sc, 0x14, 0x2cdb);
21894         MP_WritePhyUshort(sc, 0x14, 0x1cfc);
21895         MP_WritePhyUshort(sc, 0x14, 0xe00f);
21896         MP_WritePhyUshort(sc, 0x14, 0x0504);
21897         MP_WritePhyUshort(sc, 0x14, 0xd710);
21898         MP_WritePhyUshort(sc, 0x14, 0x6099);
21899         MP_WritePhyUshort(sc, 0x14, 0xd71e);
21900         MP_WritePhyUshort(sc, 0x14, 0x7fa4);
21901         MP_WritePhyUshort(sc, 0x14, 0x2cdb);
21902         MP_WritePhyUshort(sc, 0x14, 0xc17f);
21903         MP_WritePhyUshort(sc, 0x14, 0xc200);
21904         MP_WritePhyUshort(sc, 0x14, 0xc43f);
21905         MP_WritePhyUshort(sc, 0x14, 0xcc03);
21906         MP_WritePhyUshort(sc, 0x14, 0xa701);
21907         MP_WritePhyUshort(sc, 0x14, 0xa510);
21908         MP_WritePhyUshort(sc, 0x14, 0xd710);
21909         MP_WritePhyUshort(sc, 0x14, 0x4018);
21910         MP_WritePhyUshort(sc, 0x14, 0x9910);
21911         MP_WritePhyUshort(sc, 0x14, 0x8510);
21912         MP_WritePhyUshort(sc, 0x14, 0x28a1);
21913         MP_WritePhyUshort(sc, 0x14, 0xe00f);
21914         MP_WritePhyUshort(sc, 0x14, 0x0504);
21915         MP_WritePhyUshort(sc, 0x14, 0xd710);
21916         MP_WritePhyUshort(sc, 0x14, 0x6099);
21917         MP_WritePhyUshort(sc, 0x14, 0xd71e);
21918         MP_WritePhyUshort(sc, 0x14, 0x7fa4);
21919         MP_WritePhyUshort(sc, 0x14, 0x2cdb);
21920         MP_WritePhyUshort(sc, 0x14, 0xa608);
21921         MP_WritePhyUshort(sc, 0x14, 0xc17d);
21922         MP_WritePhyUshort(sc, 0x14, 0xc200);
21923         MP_WritePhyUshort(sc, 0x14, 0xc43f);
21924         MP_WritePhyUshort(sc, 0x14, 0xcc03);
21925         MP_WritePhyUshort(sc, 0x14, 0xa701);
21926         MP_WritePhyUshort(sc, 0x14, 0xa510);
21927         MP_WritePhyUshort(sc, 0x14, 0xd710);
21928         MP_WritePhyUshort(sc, 0x14, 0x4018);
21929         MP_WritePhyUshort(sc, 0x14, 0x9910);
21930         MP_WritePhyUshort(sc, 0x14, 0x8510);
21931         MP_WritePhyUshort(sc, 0x14, 0x298e);
21932         MP_WritePhyUshort(sc, 0x14, 0x17bd);
21933         MP_WritePhyUshort(sc, 0x14, 0x2815);
21934         MP_WritePhyUshort(sc, 0x14, 0xc000);
21935         MP_WritePhyUshort(sc, 0x14, 0xc100);
21936         MP_WritePhyUshort(sc, 0x14, 0xc200);
21937         MP_WritePhyUshort(sc, 0x14, 0xc300);
21938         MP_WritePhyUshort(sc, 0x14, 0xc400);
21939         MP_WritePhyUshort(sc, 0x14, 0xc500);
21940         MP_WritePhyUshort(sc, 0x14, 0xc600);
21941         MP_WritePhyUshort(sc, 0x14, 0xc7c1);
21942         MP_WritePhyUshort(sc, 0x14, 0xc800);
21943         MP_WritePhyUshort(sc, 0x14, 0xcc00);
21944         MP_WritePhyUshort(sc, 0x14, 0x0800);
21945         MP_WritePhyUshort(sc, 0x14, 0xca0f);
21946         MP_WritePhyUshort(sc, 0x14, 0xcbff);
21947         MP_WritePhyUshort(sc, 0x14, 0xa901);
21948         MP_WritePhyUshort(sc, 0x14, 0x8902);
21949         MP_WritePhyUshort(sc, 0x14, 0xc900);
21950         MP_WritePhyUshort(sc, 0x14, 0xca00);
21951         MP_WritePhyUshort(sc, 0x14, 0xcb00);
21952         MP_WritePhyUshort(sc, 0x14, 0x0800);
21953         MP_WritePhyUshort(sc, 0x14, 0xb804);
21954         MP_WritePhyUshort(sc, 0x14, 0x0800);
21955         MP_WritePhyUshort(sc, 0x14, 0xd71e);
21956         MP_WritePhyUshort(sc, 0x14, 0x6044);
21957         MP_WritePhyUshort(sc, 0x14, 0x9804);
21958         MP_WritePhyUshort(sc, 0x14, 0x0800);
21959         MP_WritePhyUshort(sc, 0x14, 0xd710);
21960         MP_WritePhyUshort(sc, 0x14, 0x6099);
21961         MP_WritePhyUshort(sc, 0x14, 0xd71e);
21962         MP_WritePhyUshort(sc, 0x14, 0x7fa4);
21963         MP_WritePhyUshort(sc, 0x14, 0x2cdb);
21964         MP_WritePhyUshort(sc, 0x14, 0x0800);
21965         MP_WritePhyUshort(sc, 0x14, 0xa510);
21966         MP_WritePhyUshort(sc, 0x14, 0xd710);
21967         MP_WritePhyUshort(sc, 0x14, 0x6098);
21968         MP_WritePhyUshort(sc, 0x14, 0xd71e);
21969         MP_WritePhyUshort(sc, 0x14, 0x7fa4);
21970         MP_WritePhyUshort(sc, 0x14, 0x2cdb);
21971         MP_WritePhyUshort(sc, 0x14, 0x8510);
21972         MP_WritePhyUshort(sc, 0x14, 0x0800);
21973         MP_WritePhyUshort(sc, 0x14, 0xd711);
21974         MP_WritePhyUshort(sc, 0x14, 0x3003);
21975         MP_WritePhyUshort(sc, 0x14, 0x1d08);
21976         MP_WritePhyUshort(sc, 0x14, 0x2d12);
21977         MP_WritePhyUshort(sc, 0x14, 0xd710);
21978         MP_WritePhyUshort(sc, 0x14, 0x60be);
21979         MP_WritePhyUshort(sc, 0x14, 0xe060);
21980         MP_WritePhyUshort(sc, 0x14, 0x0920);
21981         MP_WritePhyUshort(sc, 0x14, 0x1cdd);
21982         MP_WritePhyUshort(sc, 0x14, 0x2c90);
21983         MP_WritePhyUshort(sc, 0x14, 0xd71e);
21984         MP_WritePhyUshort(sc, 0x14, 0x3063);
21985         MP_WritePhyUshort(sc, 0x14, 0x19b0);
21986         MP_WritePhyUshort(sc, 0x14, 0x28d5);
21987         MP_WritePhyUshort(sc, 0x14, 0x1cdd);
21988         MP_WritePhyUshort(sc, 0x14, 0x2a25);
21989         MP_WritePhyUshort(sc, 0x14, 0xa802);
21990         MP_WritePhyUshort(sc, 0x14, 0xa303);
21991         MP_WritePhyUshort(sc, 0x14, 0x843f);
21992         MP_WritePhyUshort(sc, 0x14, 0x81ff);
21993         MP_WritePhyUshort(sc, 0x14, 0x8208);
21994         MP_WritePhyUshort(sc, 0x14, 0xa201);
21995         MP_WritePhyUshort(sc, 0x14, 0xc001);
21996         MP_WritePhyUshort(sc, 0x14, 0xd710);
21997         MP_WritePhyUshort(sc, 0x14, 0x30a0);
21998         MP_WritePhyUshort(sc, 0x14, 0x0d23);
21999         MP_WritePhyUshort(sc, 0x14, 0x30a0);
22000         MP_WritePhyUshort(sc, 0x14, 0x3d1a);
22001         MP_WritePhyUshort(sc, 0x14, 0xd71e);
22002         MP_WritePhyUshort(sc, 0x14, 0x7f4c);
22003         MP_WritePhyUshort(sc, 0x14, 0x2b1e);
22004         MP_WritePhyUshort(sc, 0x14, 0xe003);
22005         MP_WritePhyUshort(sc, 0x14, 0x0202);
22006         MP_WritePhyUshort(sc, 0x14, 0xd710);
22007         MP_WritePhyUshort(sc, 0x14, 0x6090);
22008         MP_WritePhyUshort(sc, 0x14, 0xd71e);
22009         MP_WritePhyUshort(sc, 0x14, 0x7fac);
22010         MP_WritePhyUshort(sc, 0x14, 0x2b1e);
22011         MP_WritePhyUshort(sc, 0x14, 0xa20c);
22012         MP_WritePhyUshort(sc, 0x14, 0xd710);
22013         MP_WritePhyUshort(sc, 0x14, 0x6091);
22014         MP_WritePhyUshort(sc, 0x14, 0xd71e);
22015         MP_WritePhyUshort(sc, 0x14, 0x7fac);
22016         MP_WritePhyUshort(sc, 0x14, 0x2b1e);
22017         MP_WritePhyUshort(sc, 0x14, 0x820e);
22018         MP_WritePhyUshort(sc, 0x14, 0xa3e0);
22019         MP_WritePhyUshort(sc, 0x14, 0xa520);
22020         MP_WritePhyUshort(sc, 0x14, 0xd710);
22021         MP_WritePhyUshort(sc, 0x14, 0x609d);
22022         MP_WritePhyUshort(sc, 0x14, 0xd71e);
22023         MP_WritePhyUshort(sc, 0x14, 0x7fac);
22024         MP_WritePhyUshort(sc, 0x14, 0x2b1e);
22025         MP_WritePhyUshort(sc, 0x14, 0x8520);
22026         MP_WritePhyUshort(sc, 0x14, 0x6703);
22027         MP_WritePhyUshort(sc, 0x14, 0x2d3b);
22028         MP_WritePhyUshort(sc, 0x14, 0xa13e);
22029         MP_WritePhyUshort(sc, 0x14, 0xc001);
22030         MP_WritePhyUshort(sc, 0x14, 0xd710);
22031         MP_WritePhyUshort(sc, 0x14, 0x4000);
22032         MP_WritePhyUshort(sc, 0x14, 0x6046);
22033         MP_WritePhyUshort(sc, 0x14, 0x2d14);
22034         MP_WritePhyUshort(sc, 0x14, 0xa43f);
22035         MP_WritePhyUshort(sc, 0x14, 0xa101);
22036         MP_WritePhyUshort(sc, 0x14, 0xc020);
22037         MP_WritePhyUshort(sc, 0x14, 0xd710);
22038         MP_WritePhyUshort(sc, 0x14, 0x3121);
22039         MP_WritePhyUshort(sc, 0x14, 0x0d4c);
22040         MP_WritePhyUshort(sc, 0x14, 0x30c0);
22041         MP_WritePhyUshort(sc, 0x14, 0x3d14);
22042         MP_WritePhyUshort(sc, 0x14, 0xd71e);
22043         MP_WritePhyUshort(sc, 0x14, 0x7f4c);
22044         MP_WritePhyUshort(sc, 0x14, 0x2b1e);
22045         MP_WritePhyUshort(sc, 0x14, 0xa540);
22046         MP_WritePhyUshort(sc, 0x14, 0xc001);
22047         MP_WritePhyUshort(sc, 0x14, 0xd710);
22048         MP_WritePhyUshort(sc, 0x14, 0x4001);
22049         MP_WritePhyUshort(sc, 0x14, 0xe00f);
22050         MP_WritePhyUshort(sc, 0x14, 0x0501);
22051         MP_WritePhyUshort(sc, 0x14, 0x1db3);
22052         MP_WritePhyUshort(sc, 0x14, 0xc1c4);
22053         MP_WritePhyUshort(sc, 0x14, 0xa268);
22054         MP_WritePhyUshort(sc, 0x14, 0xa303);
22055         MP_WritePhyUshort(sc, 0x14, 0x8420);
22056         MP_WritePhyUshort(sc, 0x14, 0xe00f);
22057         MP_WritePhyUshort(sc, 0x14, 0x0502);
22058         MP_WritePhyUshort(sc, 0x14, 0x1db3);
22059         MP_WritePhyUshort(sc, 0x14, 0xc002);
22060         MP_WritePhyUshort(sc, 0x14, 0xd710);
22061         MP_WritePhyUshort(sc, 0x14, 0x4000);
22062         MP_WritePhyUshort(sc, 0x14, 0x8208);
22063         MP_WritePhyUshort(sc, 0x14, 0x8410);
22064         MP_WritePhyUshort(sc, 0x14, 0xa121);
22065         MP_WritePhyUshort(sc, 0x14, 0xc002);
22066         MP_WritePhyUshort(sc, 0x14, 0xd710);
22067         MP_WritePhyUshort(sc, 0x14, 0x4000);
22068         MP_WritePhyUshort(sc, 0x14, 0x8120);
22069         MP_WritePhyUshort(sc, 0x14, 0x8180);
22070         MP_WritePhyUshort(sc, 0x14, 0x1d9e);
22071         MP_WritePhyUshort(sc, 0x14, 0xa180);
22072         MP_WritePhyUshort(sc, 0x14, 0xa13a);
22073         MP_WritePhyUshort(sc, 0x14, 0x8240);
22074         MP_WritePhyUshort(sc, 0x14, 0xa430);
22075         MP_WritePhyUshort(sc, 0x14, 0xc010);
22076         MP_WritePhyUshort(sc, 0x14, 0xd710);
22077         MP_WritePhyUshort(sc, 0x14, 0x30e1);
22078         MP_WritePhyUshort(sc, 0x14, 0x0b24);
22079         MP_WritePhyUshort(sc, 0x14, 0xd71e);
22080         MP_WritePhyUshort(sc, 0x14, 0x7f8c);
22081         MP_WritePhyUshort(sc, 0x14, 0x2b1e);
22082         MP_WritePhyUshort(sc, 0x14, 0xa480);
22083         MP_WritePhyUshort(sc, 0x14, 0xa230);
22084         MP_WritePhyUshort(sc, 0x14, 0xa303);
22085         MP_WritePhyUshort(sc, 0x14, 0xc001);
22086         MP_WritePhyUshort(sc, 0x14, 0xd70c);
22087         MP_WritePhyUshort(sc, 0x14, 0x4124);
22088         MP_WritePhyUshort(sc, 0x14, 0xd710);
22089         MP_WritePhyUshort(sc, 0x14, 0x6120);
22090         MP_WritePhyUshort(sc, 0x14, 0xd711);
22091         MP_WritePhyUshort(sc, 0x14, 0x3128);
22092         MP_WritePhyUshort(sc, 0x14, 0x3d7d);
22093         MP_WritePhyUshort(sc, 0x14, 0x2d77);
22094         MP_WritePhyUshort(sc, 0x14, 0xa801);
22095         MP_WritePhyUshort(sc, 0x14, 0x2d73);
22096         MP_WritePhyUshort(sc, 0x14, 0xd710);
22097         MP_WritePhyUshort(sc, 0x14, 0x4000);
22098         MP_WritePhyUshort(sc, 0x14, 0xe018);
22099         MP_WritePhyUshort(sc, 0x14, 0x0208);
22100         MP_WritePhyUshort(sc, 0x14, 0xa1f8);
22101         MP_WritePhyUshort(sc, 0x14, 0x8480);
22102         MP_WritePhyUshort(sc, 0x14, 0xc004);
22103         MP_WritePhyUshort(sc, 0x14, 0xd710);
22104         MP_WritePhyUshort(sc, 0x14, 0x4000);
22105         MP_WritePhyUshort(sc, 0x14, 0x6046);
22106         MP_WritePhyUshort(sc, 0x14, 0x2d14);
22107         MP_WritePhyUshort(sc, 0x14, 0xa43f);
22108         MP_WritePhyUshort(sc, 0x14, 0xa105);
22109         MP_WritePhyUshort(sc, 0x14, 0x8228);
22110         MP_WritePhyUshort(sc, 0x14, 0xc004);
22111         MP_WritePhyUshort(sc, 0x14, 0xd710);
22112         MP_WritePhyUshort(sc, 0x14, 0x4000);
22113         MP_WritePhyUshort(sc, 0x14, 0x81bc);
22114         MP_WritePhyUshort(sc, 0x14, 0xa220);
22115         MP_WritePhyUshort(sc, 0x14, 0x1d9e);
22116         MP_WritePhyUshort(sc, 0x14, 0x8220);
22117         MP_WritePhyUshort(sc, 0x14, 0xa1bc);
22118         MP_WritePhyUshort(sc, 0x14, 0xc040);
22119         MP_WritePhyUshort(sc, 0x14, 0xd710);
22120         MP_WritePhyUshort(sc, 0x14, 0x30e1);
22121         MP_WritePhyUshort(sc, 0x14, 0x0b24);
22122         MP_WritePhyUshort(sc, 0x14, 0x30e1);
22123         MP_WritePhyUshort(sc, 0x14, 0x3d14);
22124         MP_WritePhyUshort(sc, 0x14, 0xd71e);
22125         MP_WritePhyUshort(sc, 0x14, 0x7f4c);
22126         MP_WritePhyUshort(sc, 0x14, 0x2b1e);
22127         MP_WritePhyUshort(sc, 0x14, 0xa802);
22128         MP_WritePhyUshort(sc, 0x14, 0xd70c);
22129         MP_WritePhyUshort(sc, 0x14, 0x4244);
22130         MP_WritePhyUshort(sc, 0x14, 0xa301);
22131         MP_WritePhyUshort(sc, 0x14, 0xc004);
22132         MP_WritePhyUshort(sc, 0x14, 0xd711);
22133         MP_WritePhyUshort(sc, 0x14, 0x3128);
22134         MP_WritePhyUshort(sc, 0x14, 0x3dac);
22135         MP_WritePhyUshort(sc, 0x14, 0xd710);
22136         MP_WritePhyUshort(sc, 0x14, 0x5f80);
22137         MP_WritePhyUshort(sc, 0x14, 0xd711);
22138         MP_WritePhyUshort(sc, 0x14, 0x3109);
22139         MP_WritePhyUshort(sc, 0x14, 0x3dae);
22140         MP_WritePhyUshort(sc, 0x14, 0x2db2);
22141         MP_WritePhyUshort(sc, 0x14, 0xa801);
22142         MP_WritePhyUshort(sc, 0x14, 0x2da1);
22143         MP_WritePhyUshort(sc, 0x14, 0xa802);
22144         MP_WritePhyUshort(sc, 0x14, 0xc004);
22145         MP_WritePhyUshort(sc, 0x14, 0xd710);
22146         MP_WritePhyUshort(sc, 0x14, 0x4000);
22147         MP_WritePhyUshort(sc, 0x14, 0x0800);
22148         MP_WritePhyUshort(sc, 0x14, 0xa510);
22149         MP_WritePhyUshort(sc, 0x14, 0xd710);
22150         MP_WritePhyUshort(sc, 0x14, 0x609a);
22151         MP_WritePhyUshort(sc, 0x14, 0xd71e);
22152         MP_WritePhyUshort(sc, 0x14, 0x7fac);
22153         MP_WritePhyUshort(sc, 0x14, 0x2b1e);
22154         MP_WritePhyUshort(sc, 0x14, 0x8510);
22155         MP_WritePhyUshort(sc, 0x14, 0x0800);
22156         MP_WritePhyUshort(sc, 0x13, 0xa01a);
22157         MP_WritePhyUshort(sc, 0x14, 0x0000);
22158         MP_WritePhyUshort(sc, 0x13, 0xa006);
22159         MP_WritePhyUshort(sc, 0x14, 0x0b3e);
22160         MP_WritePhyUshort(sc, 0x13, 0xa004);
22161         MP_WritePhyUshort(sc, 0x14, 0x0828);
22162         MP_WritePhyUshort(sc, 0x13, 0xa002);
22163         MP_WritePhyUshort(sc, 0x14, 0x06dd);
22164         MP_WritePhyUshort(sc, 0x13, 0xa000);
22165         MP_WritePhyUshort(sc, 0x14, 0xf815);
22166         MP_WritePhyUshort(sc, 0x13, 0xb820);
22167         MP_WritePhyUshort(sc, 0x14, 0x0010);
22168 
22169 
22170         MP_WritePhyUshort(sc,0x1F, 0x0A43);
22171         MP_WritePhyUshort(sc, 0x13, 0x83b0);
22172         MP_WritePhyUshort(sc, 0x14, 0xaf83);
22173         MP_WritePhyUshort(sc, 0x14, 0xbcaf);
22174         MP_WritePhyUshort(sc, 0x14, 0x83c8);
22175         MP_WritePhyUshort(sc, 0x14, 0xaf83);
22176         MP_WritePhyUshort(sc, 0x14, 0xddaf);
22177         MP_WritePhyUshort(sc, 0x14, 0x83e0);
22178         MP_WritePhyUshort(sc, 0x14, 0x0204);
22179         MP_WritePhyUshort(sc, 0x14, 0xa102);
22180         MP_WritePhyUshort(sc, 0x14, 0x09b4);
22181         MP_WritePhyUshort(sc, 0x14, 0x0284);
22182         MP_WritePhyUshort(sc, 0x14, 0x62af);
22183         MP_WritePhyUshort(sc, 0x14, 0x02ec);
22184         MP_WritePhyUshort(sc, 0x14, 0xad20);
22185         MP_WritePhyUshort(sc, 0x14, 0x0302);
22186         MP_WritePhyUshort(sc, 0x14, 0x867d);
22187         MP_WritePhyUshort(sc, 0x14, 0xad21);
22188         MP_WritePhyUshort(sc, 0x14, 0x0302);
22189         MP_WritePhyUshort(sc, 0x14, 0x85ca);
22190         MP_WritePhyUshort(sc, 0x14, 0xad22);
22191         MP_WritePhyUshort(sc, 0x14, 0x0302);
22192         MP_WritePhyUshort(sc, 0x14, 0x1bce);
22193         MP_WritePhyUshort(sc, 0x14, 0xaf18);
22194         MP_WritePhyUshort(sc, 0x14, 0x11af);
22195         MP_WritePhyUshort(sc, 0x14, 0x1811);
22196         MP_WritePhyUshort(sc, 0x14, 0x0106);
22197         MP_WritePhyUshort(sc, 0x14, 0xe081);
22198         MP_WritePhyUshort(sc, 0x14, 0x48af);
22199         MP_WritePhyUshort(sc, 0x14, 0x3b1f);
22200         MP_WritePhyUshort(sc, 0x14, 0xf8f9);
22201         MP_WritePhyUshort(sc, 0x14, 0xfaef);
22202         MP_WritePhyUshort(sc, 0x14, 0x69ee);
22203         MP_WritePhyUshort(sc, 0x14, 0x8010);
22204         MP_WritePhyUshort(sc, 0x14, 0xf7d1);
22205         MP_WritePhyUshort(sc, 0x14, 0x04bf);
22206         MP_WritePhyUshort(sc, 0x14, 0x8776);
22207         MP_WritePhyUshort(sc, 0x14, 0x0241);
22208         MP_WritePhyUshort(sc, 0x14, 0x0a02);
22209         MP_WritePhyUshort(sc, 0x14, 0x8704);
22210         MP_WritePhyUshort(sc, 0x14, 0xbf87);
22211         MP_WritePhyUshort(sc, 0x14, 0x4fd7);
22212         MP_WritePhyUshort(sc, 0x14, 0xb822);
22213         MP_WritePhyUshort(sc, 0x14, 0xd00c);
22214         MP_WritePhyUshort(sc, 0x14, 0x0241);
22215         MP_WritePhyUshort(sc, 0x14, 0x03ee);
22216         MP_WritePhyUshort(sc, 0x14, 0x80cd);
22217         MP_WritePhyUshort(sc, 0x14, 0xa0ee);
22218         MP_WritePhyUshort(sc, 0x14, 0x80ce);
22219         MP_WritePhyUshort(sc, 0x14, 0x8bee);
22220         MP_WritePhyUshort(sc, 0x14, 0x80d1);
22221         MP_WritePhyUshort(sc, 0x14, 0xf5ee);
22222         MP_WritePhyUshort(sc, 0x14, 0x80d2);
22223         MP_WritePhyUshort(sc, 0x14, 0xa9ee);
22224         MP_WritePhyUshort(sc, 0x14, 0x80d3);
22225         MP_WritePhyUshort(sc, 0x14, 0x0aee);
22226         MP_WritePhyUshort(sc, 0x14, 0x80f0);
22227         MP_WritePhyUshort(sc, 0x14, 0x10ee);
22228         MP_WritePhyUshort(sc, 0x14, 0x80f3);
22229         MP_WritePhyUshort(sc, 0x14, 0x8fee);
22230         MP_WritePhyUshort(sc, 0x14, 0x8101);
22231         MP_WritePhyUshort(sc, 0x14, 0x1eee);
22232         MP_WritePhyUshort(sc, 0x14, 0x810b);
22233         MP_WritePhyUshort(sc, 0x14, 0x4aee);
22234         MP_WritePhyUshort(sc, 0x14, 0x810c);
22235         MP_WritePhyUshort(sc, 0x14, 0x7cee);
22236         MP_WritePhyUshort(sc, 0x14, 0x8112);
22237         MP_WritePhyUshort(sc, 0x14, 0x7fd1);
22238         MP_WritePhyUshort(sc, 0x14, 0x0002);
22239         MP_WritePhyUshort(sc, 0x14, 0x10e3);
22240         MP_WritePhyUshort(sc, 0x14, 0xee80);
22241         MP_WritePhyUshort(sc, 0x14, 0x8892);
22242         MP_WritePhyUshort(sc, 0x14, 0xee80);
22243         MP_WritePhyUshort(sc, 0x14, 0x8922);
22244         MP_WritePhyUshort(sc, 0x14, 0xee80);
22245         MP_WritePhyUshort(sc, 0x14, 0x9a80);
22246         MP_WritePhyUshort(sc, 0x14, 0xee80);
22247         MP_WritePhyUshort(sc, 0x14, 0x9b22);
22248         MP_WritePhyUshort(sc, 0x14, 0xee80);
22249         MP_WritePhyUshort(sc, 0x14, 0x9ca7);
22250         MP_WritePhyUshort(sc, 0x14, 0xee80);
22251         MP_WritePhyUshort(sc, 0x14, 0xa010);
22252         MP_WritePhyUshort(sc, 0x14, 0xee80);
22253         MP_WritePhyUshort(sc, 0x14, 0xa5a7);
22254         MP_WritePhyUshort(sc, 0x14, 0xd200);
22255         MP_WritePhyUshort(sc, 0x14, 0x020e);
22256         MP_WritePhyUshort(sc, 0x14, 0x4b02);
22257         MP_WritePhyUshort(sc, 0x14, 0x85c1);
22258         MP_WritePhyUshort(sc, 0x14, 0xef96);
22259         MP_WritePhyUshort(sc, 0x14, 0xfefd);
22260         MP_WritePhyUshort(sc, 0x14, 0xfc04);
22261         MP_WritePhyUshort(sc, 0x14, 0x0284);
22262         MP_WritePhyUshort(sc, 0x14, 0x7b02);
22263         MP_WritePhyUshort(sc, 0x14, 0x84b4);
22264         MP_WritePhyUshort(sc, 0x14, 0x020c);
22265         MP_WritePhyUshort(sc, 0x14, 0x9202);
22266         MP_WritePhyUshort(sc, 0x14, 0x0cab);
22267         MP_WritePhyUshort(sc, 0x14, 0x020c);
22268         MP_WritePhyUshort(sc, 0x14, 0xd602);
22269         MP_WritePhyUshort(sc, 0x14, 0x0cef);
22270         MP_WritePhyUshort(sc, 0x14, 0x020d);
22271         MP_WritePhyUshort(sc, 0x14, 0x1a02);
22272         MP_WritePhyUshort(sc, 0x14, 0x0c24);
22273         MP_WritePhyUshort(sc, 0x14, 0x04f8);
22274         MP_WritePhyUshort(sc, 0x14, 0xfaef);
22275         MP_WritePhyUshort(sc, 0x14, 0x69e1);
22276         MP_WritePhyUshort(sc, 0x14, 0x8234);
22277         MP_WritePhyUshort(sc, 0x14, 0xac29);
22278         MP_WritePhyUshort(sc, 0x14, 0x1ae0);
22279         MP_WritePhyUshort(sc, 0x14, 0x8229);
22280         MP_WritePhyUshort(sc, 0x14, 0xac21);
22281         MP_WritePhyUshort(sc, 0x14, 0x02ae);
22282         MP_WritePhyUshort(sc, 0x14, 0x2202);
22283         MP_WritePhyUshort(sc, 0x14, 0x1085);
22284         MP_WritePhyUshort(sc, 0x14, 0xf621);
22285         MP_WritePhyUshort(sc, 0x14, 0xe482);
22286         MP_WritePhyUshort(sc, 0x14, 0x29d1);
22287         MP_WritePhyUshort(sc, 0x14, 0x01bf);
22288         MP_WritePhyUshort(sc, 0x14, 0x4364);
22289         MP_WritePhyUshort(sc, 0x14, 0x0241);
22290         MP_WritePhyUshort(sc, 0x14, 0x0aae);
22291         MP_WritePhyUshort(sc, 0x14, 0x1002);
22292         MP_WritePhyUshort(sc, 0x14, 0x127a);
22293         MP_WritePhyUshort(sc, 0x14, 0xf629);
22294         MP_WritePhyUshort(sc, 0x14, 0xe582);
22295         MP_WritePhyUshort(sc, 0x14, 0x34e0);
22296         MP_WritePhyUshort(sc, 0x14, 0x8229);
22297         MP_WritePhyUshort(sc, 0x14, 0xf621);
22298         MP_WritePhyUshort(sc, 0x14, 0xe482);
22299         MP_WritePhyUshort(sc, 0x14, 0x29ef);
22300         MP_WritePhyUshort(sc, 0x14, 0x96fe);
22301         MP_WritePhyUshort(sc, 0x14, 0xfc04);
22302         MP_WritePhyUshort(sc, 0x14, 0xf8e1);
22303         MP_WritePhyUshort(sc, 0x14, 0x8234);
22304         MP_WritePhyUshort(sc, 0x14, 0xac2a);
22305         MP_WritePhyUshort(sc, 0x14, 0x18e0);
22306         MP_WritePhyUshort(sc, 0x14, 0x8229);
22307         MP_WritePhyUshort(sc, 0x14, 0xac22);
22308         MP_WritePhyUshort(sc, 0x14, 0x02ae);
22309         MP_WritePhyUshort(sc, 0x14, 0x2602);
22310         MP_WritePhyUshort(sc, 0x14, 0x84f9);
22311         MP_WritePhyUshort(sc, 0x14, 0x0285);
22312         MP_WritePhyUshort(sc, 0x14, 0x66d1);
22313         MP_WritePhyUshort(sc, 0x14, 0x01bf);
22314         MP_WritePhyUshort(sc, 0x14, 0x4367);
22315         MP_WritePhyUshort(sc, 0x14, 0x0241);
22316         MP_WritePhyUshort(sc, 0x14, 0x0aae);
22317         MP_WritePhyUshort(sc, 0x14, 0x0e02);
22318         MP_WritePhyUshort(sc, 0x14, 0x84eb);
22319         MP_WritePhyUshort(sc, 0x14, 0x0285);
22320         MP_WritePhyUshort(sc, 0x14, 0xaae1);
22321         MP_WritePhyUshort(sc, 0x14, 0x8234);
22322         MP_WritePhyUshort(sc, 0x14, 0xf62a);
22323         MP_WritePhyUshort(sc, 0x14, 0xe582);
22324         MP_WritePhyUshort(sc, 0x14, 0x34e0);
22325         MP_WritePhyUshort(sc, 0x14, 0x8229);
22326         MP_WritePhyUshort(sc, 0x14, 0xf622);
22327         MP_WritePhyUshort(sc, 0x14, 0xe482);
22328         MP_WritePhyUshort(sc, 0x14, 0x29fc);
22329         MP_WritePhyUshort(sc, 0x14, 0x04f9);
22330         MP_WritePhyUshort(sc, 0x14, 0xe280);
22331         MP_WritePhyUshort(sc, 0x14, 0x11ad);
22332         MP_WritePhyUshort(sc, 0x14, 0x3105);
22333         MP_WritePhyUshort(sc, 0x14, 0xd200);
22334         MP_WritePhyUshort(sc, 0x14, 0x020e);
22335         MP_WritePhyUshort(sc, 0x14, 0x4bfd);
22336         MP_WritePhyUshort(sc, 0x14, 0x04f8);
22337         MP_WritePhyUshort(sc, 0x14, 0xf9fa);
22338         MP_WritePhyUshort(sc, 0x14, 0xef69);
22339         MP_WritePhyUshort(sc, 0x14, 0xe080);
22340         MP_WritePhyUshort(sc, 0x14, 0x11ad);
22341         MP_WritePhyUshort(sc, 0x14, 0x215c);
22342         MP_WritePhyUshort(sc, 0x14, 0xbf42);
22343         MP_WritePhyUshort(sc, 0x14, 0x5002);
22344         MP_WritePhyUshort(sc, 0x14, 0x4148);
22345         MP_WritePhyUshort(sc, 0x14, 0xac28);
22346         MP_WritePhyUshort(sc, 0x14, 0x1bbf);
22347         MP_WritePhyUshort(sc, 0x14, 0x4253);
22348         MP_WritePhyUshort(sc, 0x14, 0x0241);
22349         MP_WritePhyUshort(sc, 0x14, 0x48ac);
22350         MP_WritePhyUshort(sc, 0x14, 0x2812);
22351         MP_WritePhyUshort(sc, 0x14, 0xbf42);
22352         MP_WritePhyUshort(sc, 0x14, 0x5902);
22353         MP_WritePhyUshort(sc, 0x14, 0x4148);
22354         MP_WritePhyUshort(sc, 0x14, 0xac28);
22355         MP_WritePhyUshort(sc, 0x14, 0x04d3);
22356         MP_WritePhyUshort(sc, 0x14, 0x00ae);
22357         MP_WritePhyUshort(sc, 0x14, 0x07d3);
22358         MP_WritePhyUshort(sc, 0x14, 0x06af);
22359         MP_WritePhyUshort(sc, 0x14, 0x8557);
22360         MP_WritePhyUshort(sc, 0x14, 0xd303);
22361         MP_WritePhyUshort(sc, 0x14, 0xe080);
22362         MP_WritePhyUshort(sc, 0x14, 0x11ad);
22363         MP_WritePhyUshort(sc, 0x14, 0x2625);
22364         MP_WritePhyUshort(sc, 0x14, 0xbf43);
22365         MP_WritePhyUshort(sc, 0x14, 0xeb02);
22366         MP_WritePhyUshort(sc, 0x14, 0x4148);
22367         MP_WritePhyUshort(sc, 0x14, 0xe280);
22368         MP_WritePhyUshort(sc, 0x14, 0x730d);
22369         MP_WritePhyUshort(sc, 0x14, 0x21f6);
22370         MP_WritePhyUshort(sc, 0x14, 0x370d);
22371         MP_WritePhyUshort(sc, 0x14, 0x11f6);
22372         MP_WritePhyUshort(sc, 0x14, 0x2f1b);
22373         MP_WritePhyUshort(sc, 0x14, 0x21aa);
22374         MP_WritePhyUshort(sc, 0x14, 0x02ae);
22375         MP_WritePhyUshort(sc, 0x14, 0x10e2);
22376         MP_WritePhyUshort(sc, 0x14, 0x8074);
22377         MP_WritePhyUshort(sc, 0x14, 0x0d21);
22378         MP_WritePhyUshort(sc, 0x14, 0xf637);
22379         MP_WritePhyUshort(sc, 0x14, 0x1b21);
22380         MP_WritePhyUshort(sc, 0x14, 0xaa03);
22381         MP_WritePhyUshort(sc, 0x14, 0x13ae);
22382         MP_WritePhyUshort(sc, 0x14, 0x022b);
22383         MP_WritePhyUshort(sc, 0x14, 0x0202);
22384         MP_WritePhyUshort(sc, 0x14, 0x0e36);
22385         MP_WritePhyUshort(sc, 0x14, 0x020e);
22386         MP_WritePhyUshort(sc, 0x14, 0x4b02);
22387         MP_WritePhyUshort(sc, 0x14, 0x0f91);
22388         MP_WritePhyUshort(sc, 0x14, 0xef96);
22389         MP_WritePhyUshort(sc, 0x14, 0xfefd);
22390         MP_WritePhyUshort(sc, 0x14, 0xfc04);
22391         MP_WritePhyUshort(sc, 0x14, 0xf8f9);
22392         MP_WritePhyUshort(sc, 0x14, 0xfaef);
22393         MP_WritePhyUshort(sc, 0x14, 0x69e0);
22394         MP_WritePhyUshort(sc, 0x14, 0x8012);
22395         MP_WritePhyUshort(sc, 0x14, 0xad27);
22396         MP_WritePhyUshort(sc, 0x14, 0x33bf);
22397         MP_WritePhyUshort(sc, 0x14, 0x4250);
22398         MP_WritePhyUshort(sc, 0x14, 0x0241);
22399         MP_WritePhyUshort(sc, 0x14, 0x48ac);
22400         MP_WritePhyUshort(sc, 0x14, 0x2809);
22401         MP_WritePhyUshort(sc, 0x14, 0xbf42);
22402         MP_WritePhyUshort(sc, 0x14, 0x5302);
22403         MP_WritePhyUshort(sc, 0x14, 0x4148);
22404         MP_WritePhyUshort(sc, 0x14, 0xad28);
22405         MP_WritePhyUshort(sc, 0x14, 0x21bf);
22406         MP_WritePhyUshort(sc, 0x14, 0x43eb);
22407         MP_WritePhyUshort(sc, 0x14, 0x0241);
22408         MP_WritePhyUshort(sc, 0x14, 0x48e3);
22409         MP_WritePhyUshort(sc, 0x14, 0x87ff);
22410         MP_WritePhyUshort(sc, 0x14, 0xd200);
22411         MP_WritePhyUshort(sc, 0x14, 0x1b45);
22412         MP_WritePhyUshort(sc, 0x14, 0xac27);
22413         MP_WritePhyUshort(sc, 0x14, 0x11e1);
22414         MP_WritePhyUshort(sc, 0x14, 0x87fe);
22415         MP_WritePhyUshort(sc, 0x14, 0xbf87);
22416         MP_WritePhyUshort(sc, 0x14, 0x6702);
22417         MP_WritePhyUshort(sc, 0x14, 0x410a);
22418         MP_WritePhyUshort(sc, 0x14, 0x0d11);
22419         MP_WritePhyUshort(sc, 0x14, 0xbf87);
22420         MP_WritePhyUshort(sc, 0x14, 0x6a02);
22421         MP_WritePhyUshort(sc, 0x14, 0x410a);
22422         MP_WritePhyUshort(sc, 0x14, 0xef96);
22423         MP_WritePhyUshort(sc, 0x14, 0xfefd);
22424         MP_WritePhyUshort(sc, 0x14, 0xfc04);
22425         MP_WritePhyUshort(sc, 0x14, 0xf8fa);
22426         MP_WritePhyUshort(sc, 0x14, 0xef69);
22427         MP_WritePhyUshort(sc, 0x14, 0xd100);
22428         MP_WritePhyUshort(sc, 0x14, 0xbf87);
22429         MP_WritePhyUshort(sc, 0x14, 0x6702);
22430         MP_WritePhyUshort(sc, 0x14, 0x410a);
22431         MP_WritePhyUshort(sc, 0x14, 0xbf87);
22432         MP_WritePhyUshort(sc, 0x14, 0x6a02);
22433         MP_WritePhyUshort(sc, 0x14, 0x410a);
22434         MP_WritePhyUshort(sc, 0x14, 0xef96);
22435         MP_WritePhyUshort(sc, 0x14, 0xfefc);
22436         MP_WritePhyUshort(sc, 0x14, 0x04ee);
22437         MP_WritePhyUshort(sc, 0x14, 0x87ff);
22438         MP_WritePhyUshort(sc, 0x14, 0x46ee);
22439         MP_WritePhyUshort(sc, 0x14, 0x87fe);
22440         MP_WritePhyUshort(sc, 0x14, 0x0104);
22441         MP_WritePhyUshort(sc, 0x14, 0xf8fa);
22442         MP_WritePhyUshort(sc, 0x14, 0xef69);
22443         MP_WritePhyUshort(sc, 0x14, 0xe082);
22444         MP_WritePhyUshort(sc, 0x14, 0x46a0);
22445         MP_WritePhyUshort(sc, 0x14, 0x0005);
22446         MP_WritePhyUshort(sc, 0x14, 0x0285);
22447         MP_WritePhyUshort(sc, 0x14, 0xecae);
22448         MP_WritePhyUshort(sc, 0x14, 0x0ea0);
22449         MP_WritePhyUshort(sc, 0x14, 0x0105);
22450         MP_WritePhyUshort(sc, 0x14, 0x021a);
22451         MP_WritePhyUshort(sc, 0x14, 0x68ae);
22452         MP_WritePhyUshort(sc, 0x14, 0x06a0);
22453         MP_WritePhyUshort(sc, 0x14, 0x0203);
22454         MP_WritePhyUshort(sc, 0x14, 0x021a);
22455         MP_WritePhyUshort(sc, 0x14, 0xf4ef);
22456         MP_WritePhyUshort(sc, 0x14, 0x96fe);
22457         MP_WritePhyUshort(sc, 0x14, 0xfc04);
22458         MP_WritePhyUshort(sc, 0x14, 0xf8f9);
22459         MP_WritePhyUshort(sc, 0x14, 0xfaef);
22460         MP_WritePhyUshort(sc, 0x14, 0x69e0);
22461         MP_WritePhyUshort(sc, 0x14, 0x822e);
22462         MP_WritePhyUshort(sc, 0x14, 0xf621);
22463         MP_WritePhyUshort(sc, 0x14, 0xe482);
22464         MP_WritePhyUshort(sc, 0x14, 0x2ee0);
22465         MP_WritePhyUshort(sc, 0x14, 0x8010);
22466         MP_WritePhyUshort(sc, 0x14, 0xac22);
22467         MP_WritePhyUshort(sc, 0x14, 0x02ae);
22468         MP_WritePhyUshort(sc, 0x14, 0x76e0);
22469         MP_WritePhyUshort(sc, 0x14, 0x822c);
22470         MP_WritePhyUshort(sc, 0x14, 0xf721);
22471         MP_WritePhyUshort(sc, 0x14, 0xe482);
22472         MP_WritePhyUshort(sc, 0x14, 0x2cbf);
22473         MP_WritePhyUshort(sc, 0x14, 0x41a5);
22474         MP_WritePhyUshort(sc, 0x14, 0x0241);
22475         MP_WritePhyUshort(sc, 0x14, 0x48ef);
22476         MP_WritePhyUshort(sc, 0x14, 0x21bf);
22477         MP_WritePhyUshort(sc, 0x14, 0x41a8);
22478         MP_WritePhyUshort(sc, 0x14, 0x0241);
22479         MP_WritePhyUshort(sc, 0x14, 0x480c);
22480         MP_WritePhyUshort(sc, 0x14, 0x111e);
22481         MP_WritePhyUshort(sc, 0x14, 0x21bf);
22482         MP_WritePhyUshort(sc, 0x14, 0x41ab);
22483         MP_WritePhyUshort(sc, 0x14, 0x0241);
22484         MP_WritePhyUshort(sc, 0x14, 0x480c);
22485         MP_WritePhyUshort(sc, 0x14, 0x121e);
22486         MP_WritePhyUshort(sc, 0x14, 0x21e6);
22487         MP_WritePhyUshort(sc, 0x14, 0x8248);
22488         MP_WritePhyUshort(sc, 0x14, 0xa200);
22489         MP_WritePhyUshort(sc, 0x14, 0x0ae1);
22490         MP_WritePhyUshort(sc, 0x14, 0x822c);
22491         MP_WritePhyUshort(sc, 0x14, 0xf629);
22492         MP_WritePhyUshort(sc, 0x14, 0xe582);
22493         MP_WritePhyUshort(sc, 0x14, 0x2cae);
22494         MP_WritePhyUshort(sc, 0x14, 0x42e0);
22495         MP_WritePhyUshort(sc, 0x14, 0x8249);
22496         MP_WritePhyUshort(sc, 0x14, 0xf721);
22497         MP_WritePhyUshort(sc, 0x14, 0xe482);
22498         MP_WritePhyUshort(sc, 0x14, 0x4902);
22499         MP_WritePhyUshort(sc, 0x14, 0x4520);
22500         MP_WritePhyUshort(sc, 0x14, 0xbf41);
22501         MP_WritePhyUshort(sc, 0x14, 0xb702);
22502         MP_WritePhyUshort(sc, 0x14, 0x4148);
22503         MP_WritePhyUshort(sc, 0x14, 0xef21);
22504         MP_WritePhyUshort(sc, 0x14, 0xbf41);
22505         MP_WritePhyUshort(sc, 0x14, 0xae02);
22506         MP_WritePhyUshort(sc, 0x14, 0x4148);
22507         MP_WritePhyUshort(sc, 0x14, 0x0c12);
22508         MP_WritePhyUshort(sc, 0x14, 0x1e21);
22509         MP_WritePhyUshort(sc, 0x14, 0xbf41);
22510         MP_WritePhyUshort(sc, 0x14, 0xb102);
22511         MP_WritePhyUshort(sc, 0x14, 0x4148);
22512         MP_WritePhyUshort(sc, 0x14, 0x0c13);
22513         MP_WritePhyUshort(sc, 0x14, 0x1e21);
22514         MP_WritePhyUshort(sc, 0x14, 0xbf41);
22515         MP_WritePhyUshort(sc, 0x14, 0xba02);
22516         MP_WritePhyUshort(sc, 0x14, 0x4148);
22517         MP_WritePhyUshort(sc, 0x14, 0x0c14);
22518         MP_WritePhyUshort(sc, 0x14, 0x1e21);
22519         MP_WritePhyUshort(sc, 0x14, 0xbf43);
22520         MP_WritePhyUshort(sc, 0x14, 0x4602);
22521         MP_WritePhyUshort(sc, 0x14, 0x4148);
22522         MP_WritePhyUshort(sc, 0x14, 0x0c16);
22523         MP_WritePhyUshort(sc, 0x14, 0x1e21);
22524         MP_WritePhyUshort(sc, 0x14, 0xe682);
22525         MP_WritePhyUshort(sc, 0x14, 0x47ee);
22526         MP_WritePhyUshort(sc, 0x14, 0x8246);
22527         MP_WritePhyUshort(sc, 0x14, 0x01ef);
22528         MP_WritePhyUshort(sc, 0x14, 0x96fe);
22529         MP_WritePhyUshort(sc, 0x14, 0xfdfc);
22530         MP_WritePhyUshort(sc, 0x14, 0x04f8);
22531         MP_WritePhyUshort(sc, 0x14, 0xfaef);
22532         MP_WritePhyUshort(sc, 0x14, 0x69e0);
22533         MP_WritePhyUshort(sc, 0x14, 0x824b);
22534         MP_WritePhyUshort(sc, 0x14, 0xa000);
22535         MP_WritePhyUshort(sc, 0x14, 0x0502);
22536         MP_WritePhyUshort(sc, 0x14, 0x8697);
22537         MP_WritePhyUshort(sc, 0x14, 0xae06);
22538         MP_WritePhyUshort(sc, 0x14, 0xa001);
22539         MP_WritePhyUshort(sc, 0x14, 0x0302);
22540         MP_WritePhyUshort(sc, 0x14, 0x1937);
22541         MP_WritePhyUshort(sc, 0x14, 0xef96);
22542         MP_WritePhyUshort(sc, 0x14, 0xfefc);
22543         MP_WritePhyUshort(sc, 0x14, 0x04f8);
22544         MP_WritePhyUshort(sc, 0x14, 0xfaef);
22545         MP_WritePhyUshort(sc, 0x14, 0x69e0);
22546         MP_WritePhyUshort(sc, 0x14, 0x822e);
22547         MP_WritePhyUshort(sc, 0x14, 0xf620);
22548         MP_WritePhyUshort(sc, 0x14, 0xe482);
22549         MP_WritePhyUshort(sc, 0x14, 0x2ee0);
22550         MP_WritePhyUshort(sc, 0x14, 0x8010);
22551         MP_WritePhyUshort(sc, 0x14, 0xac21);
22552         MP_WritePhyUshort(sc, 0x14, 0x02ae);
22553         MP_WritePhyUshort(sc, 0x14, 0x54e0);
22554         MP_WritePhyUshort(sc, 0x14, 0x822c);
22555         MP_WritePhyUshort(sc, 0x14, 0xf720);
22556         MP_WritePhyUshort(sc, 0x14, 0xe482);
22557         MP_WritePhyUshort(sc, 0x14, 0x2cbf);
22558         MP_WritePhyUshort(sc, 0x14, 0x4175);
22559         MP_WritePhyUshort(sc, 0x14, 0x0241);
22560         MP_WritePhyUshort(sc, 0x14, 0x48ac);
22561         MP_WritePhyUshort(sc, 0x14, 0x2822);
22562         MP_WritePhyUshort(sc, 0x14, 0xbf41);
22563         MP_WritePhyUshort(sc, 0x14, 0x9f02);
22564         MP_WritePhyUshort(sc, 0x14, 0x4148);
22565         MP_WritePhyUshort(sc, 0x14, 0xe582);
22566         MP_WritePhyUshort(sc, 0x14, 0x4cac);
22567         MP_WritePhyUshort(sc, 0x14, 0x2820);
22568         MP_WritePhyUshort(sc, 0x14, 0xd103);
22569         MP_WritePhyUshort(sc, 0x14, 0xbf41);
22570         MP_WritePhyUshort(sc, 0x14, 0x9902);
22571         MP_WritePhyUshort(sc, 0x14, 0x410a);
22572         MP_WritePhyUshort(sc, 0x14, 0xee82);
22573         MP_WritePhyUshort(sc, 0x14, 0x4b00);
22574         MP_WritePhyUshort(sc, 0x14, 0xe182);
22575         MP_WritePhyUshort(sc, 0x14, 0x2cf6);
22576         MP_WritePhyUshort(sc, 0x14, 0x28e5);
22577         MP_WritePhyUshort(sc, 0x14, 0x822c);
22578         MP_WritePhyUshort(sc, 0x14, 0xae21);
22579         MP_WritePhyUshort(sc, 0x14, 0xd104);
22580         MP_WritePhyUshort(sc, 0x14, 0xbf41);
22581         MP_WritePhyUshort(sc, 0x14, 0x9902);
22582         MP_WritePhyUshort(sc, 0x14, 0x410a);
22583         MP_WritePhyUshort(sc, 0x14, 0xae08);
22584         MP_WritePhyUshort(sc, 0x14, 0xd105);
22585         MP_WritePhyUshort(sc, 0x14, 0xbf41);
22586         MP_WritePhyUshort(sc, 0x14, 0x9902);
22587         MP_WritePhyUshort(sc, 0x14, 0x410a);
22588         MP_WritePhyUshort(sc, 0x14, 0xe082);
22589         MP_WritePhyUshort(sc, 0x14, 0x49f7);
22590         MP_WritePhyUshort(sc, 0x14, 0x20e4);
22591         MP_WritePhyUshort(sc, 0x14, 0x8249);
22592         MP_WritePhyUshort(sc, 0x14, 0x0245);
22593         MP_WritePhyUshort(sc, 0x14, 0x20ee);
22594         MP_WritePhyUshort(sc, 0x14, 0x824b);
22595         MP_WritePhyUshort(sc, 0x14, 0x01ef);
22596         MP_WritePhyUshort(sc, 0x14, 0x96fe);
22597         MP_WritePhyUshort(sc, 0x14, 0xfc04);
22598         MP_WritePhyUshort(sc, 0x14, 0xf8f9);
22599         MP_WritePhyUshort(sc, 0x14, 0xface);
22600         MP_WritePhyUshort(sc, 0x14, 0xfaef);
22601         MP_WritePhyUshort(sc, 0x14, 0x69fb);
22602         MP_WritePhyUshort(sc, 0x14, 0xbf87);
22603         MP_WritePhyUshort(sc, 0x14, 0x2fd7);
22604         MP_WritePhyUshort(sc, 0x14, 0x0020);
22605         MP_WritePhyUshort(sc, 0x14, 0xd819);
22606         MP_WritePhyUshort(sc, 0x14, 0xd919);
22607         MP_WritePhyUshort(sc, 0x14, 0xda19);
22608         MP_WritePhyUshort(sc, 0x14, 0xdb19);
22609         MP_WritePhyUshort(sc, 0x14, 0x07ef);
22610         MP_WritePhyUshort(sc, 0x14, 0x9502);
22611         MP_WritePhyUshort(sc, 0x14, 0x410a);
22612         MP_WritePhyUshort(sc, 0x14, 0x073f);
22613         MP_WritePhyUshort(sc, 0x14, 0x0004);
22614         MP_WritePhyUshort(sc, 0x14, 0x9fec);
22615         MP_WritePhyUshort(sc, 0x14, 0xffef);
22616         MP_WritePhyUshort(sc, 0x14, 0x96fe);
22617         MP_WritePhyUshort(sc, 0x14, 0xc6fe);
22618         MP_WritePhyUshort(sc, 0x14, 0xfdfc);
22619         MP_WritePhyUshort(sc, 0x14, 0x0400);
22620         MP_WritePhyUshort(sc, 0x14, 0x0144);
22621         MP_WritePhyUshort(sc, 0x14, 0x0000);
22622         MP_WritePhyUshort(sc, 0x14, 0x0343);
22623         MP_WritePhyUshort(sc, 0x14, 0xee00);
22624         MP_WritePhyUshort(sc, 0x14, 0x0087);
22625         MP_WritePhyUshort(sc, 0x14, 0x5b00);
22626         MP_WritePhyUshort(sc, 0x14, 0x0141);
22627         MP_WritePhyUshort(sc, 0x14, 0xe100);
22628         MP_WritePhyUshort(sc, 0x14, 0x0387);
22629         MP_WritePhyUshort(sc, 0x14, 0x5e00);
22630         MP_WritePhyUshort(sc, 0x14, 0x0987);
22631         MP_WritePhyUshort(sc, 0x14, 0x6100);
22632         MP_WritePhyUshort(sc, 0x14, 0x0987);
22633         MP_WritePhyUshort(sc, 0x14, 0x6400);
22634         MP_WritePhyUshort(sc, 0x14, 0x0087);
22635         MP_WritePhyUshort(sc, 0x14, 0x6da4);
22636         MP_WritePhyUshort(sc, 0x14, 0x00b8);
22637         MP_WritePhyUshort(sc, 0x14, 0x20c4);
22638         MP_WritePhyUshort(sc, 0x14, 0x1600);
22639         MP_WritePhyUshort(sc, 0x14, 0x000f);
22640         MP_WritePhyUshort(sc, 0x14, 0xf800);
22641         MP_WritePhyUshort(sc, 0x14, 0x7000);
22642         MP_WritePhyUshort(sc, 0x14, 0xb82e);
22643         MP_WritePhyUshort(sc, 0x14, 0x98a5);
22644         MP_WritePhyUshort(sc, 0x14, 0x8ab6);
22645         MP_WritePhyUshort(sc, 0x14, 0xa83e);
22646         MP_WritePhyUshort(sc, 0x14, 0x50a8);
22647         MP_WritePhyUshort(sc, 0x14, 0x3e33);
22648         MP_WritePhyUshort(sc, 0x14, 0xbcc6);
22649         MP_WritePhyUshort(sc, 0x14, 0x22bc);
22650         MP_WritePhyUshort(sc, 0x14, 0xc6aa);
22651         MP_WritePhyUshort(sc, 0x14, 0xa442);
22652         MP_WritePhyUshort(sc, 0x14, 0xffc4);
22653         MP_WritePhyUshort(sc, 0x14, 0x0800);
22654         MP_WritePhyUshort(sc, 0x14, 0xc416);
22655         MP_WritePhyUshort(sc, 0x14, 0xa8bc);
22656         MP_WritePhyUshort(sc, 0x14, 0xc000);
22657         MP_WritePhyUshort(sc, 0x13, 0xb818);
22658         MP_WritePhyUshort(sc, 0x14, 0x02e3);
22659         MP_WritePhyUshort(sc, 0x13, 0xb81a);
22660         MP_WritePhyUshort(sc, 0x14, 0x17ff);
22661         MP_WritePhyUshort(sc, 0x13, 0xb81e);
22662         MP_WritePhyUshort(sc, 0x14, 0x3b1c);
22663         MP_WritePhyUshort(sc, 0x13, 0xb820);
22664         MP_WritePhyUshort(sc, 0x14, 0x021b);
22665         MP_WritePhyUshort(sc, 0x1f, 0x0000);
22666 
22667 
22668         MP_WritePhyUshort(sc,0x1F, 0x0A43);
22669         MP_WritePhyUshort(sc,0x13, 0x0000);
22670         MP_WritePhyUshort(sc,0x14, 0x0000);
22671         MP_WritePhyUshort(sc,0x1f, 0x0B82);
22672         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
22673         PhyRegValue &= ~(BIT_0);
22674         MP_WritePhyUshort(sc,0x17, PhyRegValue);
22675         MP_WritePhyUshort(sc,0x1f, 0x0A43);
22676         MP_WritePhyUshort(sc,0x13, 0x8146);
22677         MP_WritePhyUshort(sc,0x14, 0x0000);
22678 
22679         re_clear_phy_mcu_patch_request(sc);
22680 }
22681 
22682 static void re_set_phy_mcu_8168ep_2(struct re_softc *sc)
22683 {
22684         u_int16_t PhyRegValue;
22685 
22686         re_set_phy_mcu_patch_request(sc);
22687 
22688         MP_WritePhyUshort(sc,0x1f, 0x0A43);
22689         MP_WritePhyUshort(sc,0x13, 0x8146);
22690         MP_WritePhyUshort(sc,0x14, 0x8700);
22691         MP_WritePhyUshort(sc,0x13, 0xB82E);
22692         MP_WritePhyUshort(sc,0x14, 0x0001);
22693 
22694         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
22695 
22696         MP_WritePhyUshort(sc, 0x13, 0x83DD);
22697         MP_WritePhyUshort(sc, 0x14, 0xAF83);
22698         MP_WritePhyUshort(sc, 0x14, 0xE9AF);
22699         MP_WritePhyUshort(sc, 0x14, 0x83EE);
22700         MP_WritePhyUshort(sc, 0x14, 0xAF83);
22701         MP_WritePhyUshort(sc, 0x14, 0xF1A1);
22702         MP_WritePhyUshort(sc, 0x14, 0x83F4);
22703         MP_WritePhyUshort(sc, 0x14, 0xD149);
22704         MP_WritePhyUshort(sc, 0x14, 0xAF06);
22705         MP_WritePhyUshort(sc, 0x14, 0x47AF);
22706         MP_WritePhyUshort(sc, 0x14, 0x0000);
22707         MP_WritePhyUshort(sc, 0x14, 0xAF00);
22708         MP_WritePhyUshort(sc, 0x14, 0x00AF);
22709         MP_WritePhyUshort(sc, 0x14, 0x0000);
22710 
22711         MP_WritePhyUshort(sc, 0x13, 0xB818);
22712         MP_WritePhyUshort(sc, 0x14, 0x0645);
22713 
22714         MP_WritePhyUshort(sc, 0x13, 0xB81A);
22715         MP_WritePhyUshort(sc, 0x14, 0x0000);
22716 
22717         MP_WritePhyUshort(sc, 0x13, 0xB81C);
22718         MP_WritePhyUshort(sc, 0x14, 0x0000);
22719 
22720         MP_WritePhyUshort(sc, 0x13, 0xB81E);
22721         MP_WritePhyUshort(sc, 0x14, 0x0000);
22722 
22723         MP_WritePhyUshort(sc, 0x13, 0xB832);
22724         MP_WritePhyUshort(sc, 0x14, 0x0001);
22725 
22726         MP_WritePhyUshort(sc,0x1F, 0x0A43);
22727         MP_WritePhyUshort(sc,0x13, 0x0000);
22728         MP_WritePhyUshort(sc,0x14, 0x0000);
22729         MP_WritePhyUshort(sc,0x1f, 0x0B82);
22730         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
22731         PhyRegValue &= ~(BIT_0);
22732         MP_WritePhyUshort(sc,0x17, PhyRegValue);
22733         MP_WritePhyUshort(sc,0x1f, 0x0A43);
22734         MP_WritePhyUshort(sc,0x13, 0x8146);
22735         MP_WritePhyUshort(sc,0x14, 0x0000);
22736 
22737         re_clear_phy_mcu_patch_request(sc);
22738 }
22739 
22740 static void
22741 re_real_set_phy_mcu_8125a_1(struct re_softc *sc)
22742 {
22743         re_acquire_phy_mcu_patch_key_lock(sc);
22744 
22745 
22746         SetEthPhyOcpBit(sc, 0xB820, BIT_7);
22747 
22748 
22749         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA016);
22750         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
22751         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA012);
22752         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
22753         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA014);
22754         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22755         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8010);
22756         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22757         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8013);
22758         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22759         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8021);
22760         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22761         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x802f);
22762         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22763         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x803d);
22764         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22765         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8042);
22766         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22767         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8051);
22768         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22769         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8051);
22770         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa088);
22771         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22772         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0a50);
22773         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8008);
22774         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd014);
22775         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd1a3);
22776         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd700);
22777         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x401a);
22778         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd707);
22779         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x40c2);
22780         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x60a6);
22781         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd700);
22782         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5f8b);
22783         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22784         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0a86);
22785         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22786         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0a6c);
22787         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8080);
22788         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd019);
22789         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd1a2);
22790         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd700);
22791         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x401a);
22792         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd707);
22793         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x40c4);
22794         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x60a6);
22795         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd700);
22796         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5f8b);
22797         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22798         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0a86);
22799         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22800         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0a84);
22801         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd503);
22802         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8970);
22803         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c07);
22804         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0901);
22805         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd500);
22806         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xce01);
22807         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xcf09);
22808         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd705);
22809         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x4000);
22810         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xceff);
22811         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xaf0a);
22812         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd504);
22813         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22814         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1213);
22815         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8401);
22816         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd500);
22817         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8580);
22818         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22819         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1253);
22820         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd064);
22821         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd181);
22822         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd704);
22823         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x4018);
22824         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd504);
22825         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xc50f);
22826         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd706);
22827         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x2c59);
22828         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x804d);
22829         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xc60f);
22830         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf002);
22831         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xc605);
22832         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xae02);
22833         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22834         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x10fd);
22835         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA026);
22836         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xffff);
22837         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA024);
22838         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xffff);
22839         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA022);
22840         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x10f4);
22841         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA020);
22842         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1252);
22843         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA006);
22844         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1206);
22845         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA004);
22846         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0a78);
22847         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA002);
22848         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0a60);
22849         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA000);
22850         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0a4f);
22851         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA008);
22852         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x3f00);
22853 
22854 
22855         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA016);
22856         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0010);
22857         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA012);
22858         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
22859         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA014);
22860         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22861         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8010);
22862         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22863         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8066);
22864         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22865         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x807c);
22866         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22867         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8089);
22868         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22869         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x808e);
22870         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22871         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x80a0);
22872         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22873         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x80b2);
22874         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22875         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x80c2);
22876         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd501);
22877         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xce01);
22878         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd700);
22879         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x62db);
22880         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x655c);
22881         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd73e);
22882         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x60e9);
22883         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x614a);
22884         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x61ab);
22885         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
22886         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0501);
22887         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22888         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0304);
22889         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
22890         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0503);
22891         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22892         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0304);
22893         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
22894         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0505);
22895         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22896         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0304);
22897         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
22898         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0509);
22899         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22900         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0304);
22901         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x653c);
22902         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd73e);
22903         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x60e9);
22904         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x614a);
22905         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x61ab);
22906         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
22907         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0503);
22908         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22909         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0304);
22910         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
22911         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0502);
22912         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22913         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0304);
22914         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
22915         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0506);
22916         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22917         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0304);
22918         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
22919         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x050a);
22920         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22921         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0304);
22922         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd73e);
22923         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x60e9);
22924         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x614a);
22925         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x61ab);
22926         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
22927         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0505);
22928         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22929         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0304);
22930         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
22931         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0506);
22932         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22933         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0304);
22934         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
22935         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0504);
22936         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22937         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0304);
22938         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
22939         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x050c);
22940         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22941         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0304);
22942         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd73e);
22943         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x60e9);
22944         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x614a);
22945         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x61ab);
22946         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
22947         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0509);
22948         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22949         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0304);
22950         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
22951         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x050a);
22952         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22953         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0304);
22954         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
22955         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x050c);
22956         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22957         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0304);
22958         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
22959         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0508);
22960         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22961         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0304);
22962         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd501);
22963         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xce01);
22964         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd73e);
22965         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x60e9);
22966         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x614a);
22967         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x61ab);
22968         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
22969         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0501);
22970         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22971         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0321);
22972         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
22973         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0502);
22974         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22975         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0321);
22976         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
22977         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0504);
22978         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22979         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0321);
22980         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
22981         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0508);
22982         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22983         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0321);
22984         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
22985         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0346);
22986         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd501);
22987         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xce01);
22988         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8208);
22989         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x609d);
22990         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa50f);
22991         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22992         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x001a);
22993         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
22994         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0503);
22995         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22996         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x001a);
22997         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x607d);
22998         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
22999         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x00ab);
23000         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23001         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x00ab);
23002         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd501);
23003         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xce01);
23004         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd700);
23005         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x60fd);
23006         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa50f);
23007         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xce00);
23008         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd500);
23009         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xaa0f);
23010         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23011         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x017b);
23012         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
23013         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0503);
23014         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xce00);
23015         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd500);
23016         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
23017         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0a05);
23018         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23019         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x017b);
23020         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd501);
23021         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xce01);
23022         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd700);
23023         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x60fd);
23024         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa50f);
23025         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xce00);
23026         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd500);
23027         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xaa0f);
23028         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23029         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x01e0);
23030         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
23031         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0503);
23032         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xce00);
23033         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd500);
23034         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
23035         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0a05);
23036         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23037         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x01e0);
23038         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd700);
23039         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x60fd);
23040         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa50f);
23041         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xce00);
23042         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd500);
23043         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xaa0f);
23044         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23045         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0231);
23046         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
23047         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0503);
23048         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xce00);
23049         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd500);
23050         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
23051         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0a05);
23052         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23053         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0231);
23054         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA08E);
23055         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xffff);
23056         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA08C);
23057         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0221);
23058         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA08A);
23059         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x01ce);
23060         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA088);
23061         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0169);
23062         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA086);
23063         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x00a6);
23064         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA084);
23065         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x000d);
23066         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA082);
23067         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0308);
23068         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA080);
23069         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x029f);
23070         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA090);
23071         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x007f);
23072 
23073 
23074         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA016);
23075         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0020);
23076         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA012);
23077         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
23078         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA014);
23079         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23080         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8010);
23081         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23082         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8017);
23083         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23084         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x801b);
23085         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23086         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8029);
23087         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23088         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8054);
23089         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23090         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x805a);
23091         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23092         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8064);
23093         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23094         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x80a7);
23095         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x9430);
23096         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x9480);
23097         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb408);
23098         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd120);
23099         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd057);
23100         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23101         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x064b);
23102         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xcb80);
23103         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x9906);
23104         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23105         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0567);
23106         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xcb94);
23107         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8190);
23108         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x82a0);
23109         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x800a);
23110         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8406);
23111         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8010);
23112         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa740);
23113         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8dff);
23114         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23115         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x07e4);
23116         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa840);
23117         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
23118         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23119         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0773);
23120         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xcb91);
23121         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
23122         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd700);
23123         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x4063);
23124         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd139);
23125         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf002);
23126         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd140);
23127         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd040);
23128         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb404);
23129         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
23130         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0d00);
23131         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23132         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x07dc);
23133         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa610);
23134         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa110);
23135         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa2a0);
23136         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa404);
23137         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd704);
23138         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x4045);
23139         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa180);
23140         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd704);
23141         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x405d);
23142         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa720);
23143         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23144         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0742);
23145         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23146         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x07ec);
23147         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd700);
23148         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5f74);
23149         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23150         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0742);
23151         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd702);
23152         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x7fb6);
23153         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8190);
23154         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x82a0);
23155         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8404);
23156         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8610);
23157         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
23158         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0d01);
23159         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23160         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x07dc);
23161         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23162         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x064b);
23163         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23164         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x07c0);
23165         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd700);
23166         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5fa7);
23167         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23168         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0481);
23169         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
23170         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x94bc);
23171         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x870c);
23172         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa190);
23173         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa00a);
23174         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa280);
23175         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa404);
23176         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8220);
23177         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23178         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x078e);
23179         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xcb92);
23180         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa840);
23181         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd700);
23182         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x4063);
23183         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd140);
23184         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf002);
23185         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd150);
23186         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd040);
23187         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd703);
23188         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x60a0);
23189         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x6121);
23190         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x61a2);
23191         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x6223);
23192         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf02f);
23193         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0cf0);
23194         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0d10);
23195         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8010);
23196         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa740);
23197         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf00f);
23198         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0cf0);
23199         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0d20);
23200         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8010);
23201         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa740);
23202         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf00a);
23203         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0cf0);
23204         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0d30);
23205         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8010);
23206         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa740);
23207         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf005);
23208         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0cf0);
23209         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0d40);
23210         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8010);
23211         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa740);
23212         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23213         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x07e4);
23214         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa610);
23215         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa008);
23216         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd704);
23217         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x4046);
23218         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa002);
23219         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd704);
23220         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x405d);
23221         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa720);
23222         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23223         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0742);
23224         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23225         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x07f7);
23226         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd700);
23227         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5f74);
23228         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23229         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0742);
23230         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd702);
23231         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x7fb5);
23232         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x800a);
23233         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0cf0);
23234         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0d00);
23235         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23236         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x07e4);
23237         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8010);
23238         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa740);
23239         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd701);
23240         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x3ad4);
23241         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0537);
23242         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8610);
23243         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8840);
23244         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23245         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x064b);
23246         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8301);
23247         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x800a);
23248         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8190);
23249         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x82a0);
23250         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8404);
23251         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa70c);
23252         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x9402);
23253         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x890c);
23254         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8840);
23255         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23256         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x064b);
23257         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA10E);
23258         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0642);
23259         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA10C);
23260         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0686);
23261         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA10A);
23262         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0788);
23263         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA108);
23264         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x047b);
23265         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA106);
23266         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x065c);
23267         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA104);
23268         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0769);
23269         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA102);
23270         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0565);
23271         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA100);
23272         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x06f9);
23273         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA110);
23274         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x00ff);
23275 
23276 
23277         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xb87c);
23278         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8530);
23279         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xb87e);
23280         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xaf85);
23281         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x3caf);
23282         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8593);
23283         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xaf85);
23284         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x9caf);
23285         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x85a5);
23286         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf86);
23287         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd702);
23288         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5afb);
23289         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xe083);
23290         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xfb0c);
23291         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x020d);
23292         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x021b);
23293         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x10bf);
23294         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x86d7);
23295         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x025a);
23296         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb7bf);
23297         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x86da);
23298         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x025a);
23299         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xfbe0);
23300         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x83fc);
23301         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c02);
23302         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0d02);
23303         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1b10);
23304         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf86);
23305         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xda02);
23306         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5ab7);
23307         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf86);
23308         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xdd02);
23309         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5afb);
23310         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xe083);
23311         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xfd0c);
23312         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x020d);
23313         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x021b);
23314         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x10bf);
23315         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x86dd);
23316         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x025a);
23317         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb7bf);
23318         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x86e0);
23319         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x025a);
23320         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xfbe0);
23321         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x83fe);
23322         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c02);
23323         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0d02);
23324         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1b10);
23325         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf86);
23326         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xe002);
23327         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5ab7);
23328         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xaf2f);
23329         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbd02);
23330         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x2cac);
23331         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0286);
23332         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x65af);
23333         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x212b);
23334         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x022c);
23335         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x6002);
23336         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x86b6);
23337         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xaf21);
23338         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0cd1);
23339         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x03bf);
23340         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8710);
23341         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x025a);
23342         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb7bf);
23343         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x870d);
23344         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x025a);
23345         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb7bf);
23346         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8719);
23347         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x025a);
23348         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb7bf);
23349         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8716);
23350         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x025a);
23351         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb7bf);
23352         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x871f);
23353         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x025a);
23354         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb7bf);
23355         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x871c);
23356         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x025a);
23357         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb7bf);
23358         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8728);
23359         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x025a);
23360         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb7bf);
23361         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8725);
23362         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x025a);
23363         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb7bf);
23364         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8707);
23365         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x025a);
23366         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xfbad);
23367         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x281c);
23368         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd100);
23369         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf87);
23370         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0a02);
23371         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5ab7);
23372         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf87);
23373         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1302);
23374         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5ab7);
23375         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf87);
23376         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x2202);
23377         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5ab7);
23378         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf87);
23379         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x2b02);
23380         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5ab7);
23381         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xae1a);
23382         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd101);
23383         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf87);
23384         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0a02);
23385         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5ab7);
23386         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf87);
23387         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1302);
23388         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5ab7);
23389         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf87);
23390         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x2202);
23391         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5ab7);
23392         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf87);
23393         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x2b02);
23394         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5ab7);
23395         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd101);
23396         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf87);
23397         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x3402);
23398         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5ab7);
23399         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf87);
23400         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x3102);
23401         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5ab7);
23402         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf87);
23403         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x3d02);
23404         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5ab7);
23405         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf87);
23406         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x3a02);
23407         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5ab7);
23408         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf87);
23409         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x4302);
23410         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5ab7);
23411         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf87);
23412         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x4002);
23413         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5ab7);
23414         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf87);
23415         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x4c02);
23416         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5ab7);
23417         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf87);
23418         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x4902);
23419         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5ab7);
23420         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd100);
23421         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf87);
23422         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x2e02);
23423         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5ab7);
23424         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf87);
23425         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x3702);
23426         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5ab7);
23427         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf87);
23428         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x4602);
23429         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5ab7);
23430         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf87);
23431         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x4f02);
23432         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5ab7);
23433         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xaf35);
23434         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x7ff8);
23435         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xfaef);
23436         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x69bf);
23437         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x86e3);
23438         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x025a);
23439         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xfbbf);
23440         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x86fb);
23441         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x025a);
23442         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb7bf);
23443         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x86e6);
23444         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x025a);
23445         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xfbbf);
23446         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x86fe);
23447         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x025a);
23448         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb7bf);
23449         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x86e9);
23450         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x025a);
23451         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xfbbf);
23452         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8701);
23453         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x025a);
23454         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb7bf);
23455         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x86ec);
23456         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x025a);
23457         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xfbbf);
23458         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8704);
23459         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x025a);
23460         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb7bf);
23461         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x86ef);
23462         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0262);
23463         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x7cbf);
23464         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x86f2);
23465         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0262);
23466         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x7cbf);
23467         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x86f5);
23468         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0262);
23469         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x7cbf);
23470         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x86f8);
23471         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0262);
23472         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x7cef);
23473         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x96fe);
23474         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xfc04);
23475         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf8fa);
23476         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xef69);
23477         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf86);
23478         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xef02);
23479         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x6273);
23480         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf86);
23481         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf202);
23482         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x6273);
23483         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf86);
23484         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf502);
23485         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x6273);
23486         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbf86);
23487         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf802);
23488         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x6273);
23489         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xef96);
23490         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xfefc);
23491         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0420);
23492         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb540);
23493         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x53b5);
23494         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x4086);
23495         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb540);
23496         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb9b5);
23497         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x40c8);
23498         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb03a);
23499         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xc8b0);
23500         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbac8);
23501         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb13a);
23502         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xc8b1);
23503         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xba77);
23504         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbd26);
23505         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xffbd);
23506         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x2677);
23507         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbd28);
23508         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xffbd);
23509         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x2840);
23510         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbd26);
23511         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xc8bd);
23512         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x2640);
23513         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbd28);
23514         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xc8bd);
23515         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x28bb);
23516         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa430);
23517         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x98b0);
23518         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1eba);
23519         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb01e);
23520         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xdcb0);
23521         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1e98);
23522         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb09e);
23523         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbab0);
23524         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x9edc);
23525         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb09e);
23526         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x98b1);
23527         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1eba);
23528         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb11e);
23529         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xdcb1);
23530         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1e98);
23531         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb19e);
23532         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbab1);
23533         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x9edc);
23534         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb19e);
23535         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x11b0);
23536         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1e22);
23537         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb01e);
23538         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x33b0);
23539         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1e11);
23540         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb09e);
23541         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x22b0);
23542         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x9e33);
23543         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb09e);
23544         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x11b1);
23545         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1e22);
23546         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb11e);
23547         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x33b1);
23548         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1e11);
23549         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb19e);
23550         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x22b1);
23551         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x9e33);
23552         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb19e);
23553         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xb85e);
23554         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x2f71);
23555         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xb860);
23556         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x20d9);
23557         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xb862);
23558         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x2109);
23559         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xb864);
23560         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x34e7);
23561         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xb878);
23562         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x000f);
23563 
23564 
23565         ClearEthPhyOcpBit(sc, 0xB820, BIT_7);
23566 
23567 
23568         re_release_phy_mcu_patch_key_lock(sc);
23569 }
23570 
23571 static void
23572 re_set_phy_mcu_8125a_1(struct re_softc *sc)
23573 {
23574         re_set_phy_mcu_patch_request(sc);
23575 
23576         re_real_set_phy_mcu_8125a_1(sc);
23577 
23578         re_clear_phy_mcu_patch_request(sc);
23579 }
23580 
23581 static void
23582 re_real_set_phy_mcu_8125a_2(struct re_softc *sc)
23583 {
23584         re_acquire_phy_mcu_patch_key_lock(sc);
23585 
23586 
23587         SetEthPhyOcpBit(sc, 0xB820, BIT_7);
23588 
23589 
23590         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA016);
23591         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
23592         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA012);
23593         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
23594         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA014);
23595         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23596         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8010);
23597         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23598         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x808b);
23599         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23600         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x808f);
23601         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23602         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8093);
23603         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23604         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8097);
23605         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23606         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x809d);
23607         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23608         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x80a1);
23609         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23610         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x80aa);
23611         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd718);
23612         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x607b);
23613         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x40da);
23614         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf00e);
23615         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x42da);
23616         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf01e);
23617         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd718);
23618         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x615b);
23619         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23620         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1456);
23621         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23622         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x14a4);
23623         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23624         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x14bc);
23625         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd718);
23626         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5f2e);
23627         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf01c);
23628         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23629         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1456);
23630         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23631         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x14a4);
23632         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23633         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x14bc);
23634         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd718);
23635         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5f2e);
23636         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf024);
23637         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23638         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1456);
23639         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23640         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x14a4);
23641         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23642         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x14bc);
23643         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd718);
23644         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5f2e);
23645         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf02c);
23646         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23647         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1456);
23648         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23649         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x14a4);
23650         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23651         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x14bc);
23652         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd718);
23653         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5f2e);
23654         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf034);
23655         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd719);
23656         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x4118);
23657         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd504);
23658         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xac11);
23659         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd501);
23660         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xce01);
23661         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa410);
23662         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xce00);
23663         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd500);
23664         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x4779);
23665         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd504);
23666         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xac0f);
23667         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xae01);
23668         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd500);
23669         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23670         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1444);
23671         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf034);
23672         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd719);
23673         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x4118);
23674         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd504);
23675         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xac22);
23676         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd501);
23677         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xce01);
23678         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa420);
23679         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xce00);
23680         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd500);
23681         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x4559);
23682         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd504);
23683         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xac0f);
23684         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xae01);
23685         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd500);
23686         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23687         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1444);
23688         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf023);
23689         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd719);
23690         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x4118);
23691         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd504);
23692         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xac44);
23693         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd501);
23694         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xce01);
23695         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa440);
23696         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xce00);
23697         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd500);
23698         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x4339);
23699         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd504);
23700         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xac0f);
23701         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xae01);
23702         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd500);
23703         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23704         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1444);
23705         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf012);
23706         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd719);
23707         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x4118);
23708         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd504);
23709         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xac88);
23710         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd501);
23711         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xce01);
23712         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa480);
23713         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xce00);
23714         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd500);
23715         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x4119);
23716         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd504);
23717         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xac0f);
23718         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xae01);
23719         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd500);
23720         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23721         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1444);
23722         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf001);
23723         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23724         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1456);
23725         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd718);
23726         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5fac);
23727         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xc48f);
23728         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23729         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x141b);
23730         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd504);
23731         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8010);
23732         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23733         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x121a);
23734         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd0b4);
23735         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd1bb);
23736         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23737         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0898);
23738         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd0b4);
23739         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd1bb);
23740         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23741         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0a0e);
23742         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd064);
23743         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd18a);
23744         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23745         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0b7e);
23746         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x401c);
23747         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd501);
23748         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa804);
23749         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8804);
23750         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23751         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x053b);
23752         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd500);
23753         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa301);
23754         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23755         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0648);
23756         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xc520);
23757         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa201);
23758         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd701);
23759         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x252d);
23760         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1646);
23761         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd708);
23762         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x4006);
23763         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23764         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1646);
23765         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23766         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0308);
23767         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA026);
23768         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0307);
23769         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA024);
23770         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1645);
23771         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA022);
23772         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0647);
23773         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA020);
23774         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x053a);
23775         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA006);
23776         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0b7c);
23777         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA004);
23778         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0a0c);
23779         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA002);
23780         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0896);
23781         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA000);
23782         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x11a1);
23783         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA008);
23784         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xff00);
23785 
23786 
23787         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA016);
23788         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0010);
23789         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA012);
23790         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
23791         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA014);
23792         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23793         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8010);
23794         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23795         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8015);
23796         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23797         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x801a);
23798         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23799         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x801a);
23800         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23801         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x801a);
23802         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23803         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x801a);
23804         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23805         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x801a);
23806         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23807         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x801a);
23808         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xad02);
23809         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23810         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x02d7);
23811         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23812         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x00ed);
23813         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
23814         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0509);
23815         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xc100);
23816         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23817         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x008f);
23818         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA08E);
23819         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xffff);
23820         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA08C);
23821         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xffff);
23822         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA08A);
23823         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xffff);
23824         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA088);
23825         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xffff);
23826         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA086);
23827         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xffff);
23828         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA084);
23829         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xffff);
23830         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA082);
23831         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x008d);
23832         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA080);
23833         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x00eb);
23834         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA090);
23835         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0103);
23836 
23837 
23838         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA016);
23839         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0020);
23840         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA012);
23841         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
23842         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA014);
23843         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23844         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8010);
23845         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23846         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8014);
23847         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23848         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8018);
23849         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23850         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8024);
23851         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23852         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8051);
23853         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23854         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8055);
23855         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23856         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8072);
23857         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23858         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x80dc);
23859         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
23860         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
23861         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
23862         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xfffd);
23863         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
23864         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
23865         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
23866         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xfffd);
23867         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8301);
23868         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x800a);
23869         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8190);
23870         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x82a0);
23871         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8404);
23872         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa70c);
23873         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x9402);
23874         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x890c);
23875         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8840);
23876         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa380);
23877         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23878         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x066e);
23879         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xcb91);
23880         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd700);
23881         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x4063);
23882         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd139);
23883         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf002);
23884         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd140);
23885         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd040);
23886         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb404);
23887         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
23888         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0d00);
23889         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23890         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x07e0);
23891         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa610);
23892         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa110);
23893         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa2a0);
23894         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa404);
23895         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd704);
23896         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x4085);
23897         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa180);
23898         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa404);
23899         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8280);
23900         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd704);
23901         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x405d);
23902         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa720);
23903         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23904         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0743);
23905         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23906         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x07f0);
23907         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd700);
23908         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5f74);
23909         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23910         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0743);
23911         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd702);
23912         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x7fb6);
23913         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8190);
23914         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x82a0);
23915         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8404);
23916         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8610);
23917         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
23918         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0c0f);
23919         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0d01);
23920         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23921         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x07e0);
23922         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23923         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x066e);
23924         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd158);
23925         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd04d);
23926         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23927         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x03d4);
23928         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x94bc);
23929         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x870c);
23930         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8380);
23931         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd10d);
23932         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd040);
23933         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23934         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x07c4);
23935         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd700);
23936         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5fb4);
23937         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa190);
23938         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa00a);
23939         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa280);
23940         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa404);
23941         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa220);
23942         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd130);
23943         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd040);
23944         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
23945         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x07c4);
23946         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd700);
23947         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5fb4);
23948         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xbb80);
23949         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd1c4);
23950         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd074);
23951         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa301);
23952         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd704);
23953         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x604b);
23954         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa90c);
23955         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
23956         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0556);
23957         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xcb92);
23958         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd700);
23959         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x4063);
23960         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd116);
23961         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf002);
23962         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd119);
23963         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd040);
23964         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd703);
23965         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x60a0);
23966         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x6241);
23967         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x63e2);
23968         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x6583);
23969         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf054);
23970         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd701);
23971         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x611e);
23972         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd701);
23973         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x40da);
23974         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0cf0);
23975         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0d10);
23976         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa010);
23977         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8740);
23978         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf02f);
23979         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0cf0);
23980         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0d50);
23981         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8010);
23982         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa740);
23983         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf02a);
23984         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd701);
23985         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x611e);
23986         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd701);
23987         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x40da);
23988         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0cf0);
23989         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0d20);
23990         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa010);
23991         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8740);
23992         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf021);
23993         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0cf0);
23994         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0d60);
23995         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8010);
23996         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa740);
23997         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf01c);
23998         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd701);
23999         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x611e);
24000         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd701);
24001         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x40da);
24002         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0cf0);
24003         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0d30);
24004         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa010);
24005         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8740);
24006         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf013);
24007         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0cf0);
24008         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0d70);
24009         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8010);
24010         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa740);
24011         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf00e);
24012         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd701);
24013         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x611e);
24014         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd701);
24015         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x40da);
24016         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0cf0);
24017         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0d40);
24018         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa010);
24019         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8740);
24020         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf005);
24021         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0cf0);
24022         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0d80);
24023         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8010);
24024         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa740);
24025         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
24026         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x07e8);
24027         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa610);
24028         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd704);
24029         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x405d);
24030         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa720);
24031         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd700);
24032         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x5ff4);
24033         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa008);
24034         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd704);
24035         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x4046);
24036         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa002);
24037         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
24038         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0743);
24039         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
24040         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x07fb);
24041         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd703);
24042         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x7f6f);
24043         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x7f4e);
24044         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x7f2d);
24045         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x7f0c);
24046         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x800a);
24047         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0cf0);
24048         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0d00);
24049         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
24050         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x07e8);
24051         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8010);
24052         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa740);
24053         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1000);
24054         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0743);
24055         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd702);
24056         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x7fb5);
24057         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd701);
24058         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x3ad4);
24059         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0556);
24060         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8610);
24061         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
24062         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x066e);
24063         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd1f5);
24064         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xd049);
24065         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x1800);
24066         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x01ec);
24067         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA10E);
24068         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x01ea);
24069         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA10C);
24070         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x06a9);
24071         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA10A);
24072         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x078a);
24073         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA108);
24074         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x03d2);
24075         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA106);
24076         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x067f);
24077         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA104);
24078         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0665);
24079         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA102);
24080         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
24081         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA100);
24082         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
24083         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xA110);
24084         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x00fc);
24085 
24086 
24087         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xb87c);
24088         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8530);
24089         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xb87e);
24090         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xaf85);
24091         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x3caf);
24092         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8545);
24093         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xaf85);
24094         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x45af);
24095         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8545);
24096         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xee82);
24097         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf900);
24098         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0103);
24099         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xaf03);
24100         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb7f8);
24101         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xe0a6);
24102         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x00e1);
24103         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa601);
24104         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xef01);
24105         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x58f0);
24106         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa080);
24107         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x37a1);
24108         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8402);
24109         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xae16);
24110         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa185);
24111         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x02ae);
24112         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x11a1);
24113         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8702);
24114         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xae0c);
24115         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xa188);
24116         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x02ae);
24117         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x07a1);
24118         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8902);
24119         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xae02);
24120         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xae1c);
24121         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xe0b4);
24122         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x62e1);
24123         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb463);
24124         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x6901);
24125         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xe4b4);
24126         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x62e5);
24127         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb463);
24128         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xe0b4);
24129         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x62e1);
24130         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb463);
24131         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x6901);
24132         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xe4b4);
24133         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x62e5);
24134         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xb463);
24135         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xfc04);
24136         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xb85e);
24137         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x03b3);
24138         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xb860);
24139         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xffff);
24140         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xb862);
24141         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xffff);
24142         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xb864);
24143         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xffff);
24144         MP_RealWritePhyOcpRegWord(sc, 0xA436, 0xb878);
24145         MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0001);
24146 
24147 
24148         ClearEthPhyOcpBit(sc, 0xB820, BIT_7);
24149 
24150 
24151         re_release_phy_mcu_patch_key_lock(sc);
24152 }
24153 
24154 static void
24155 re_set_phy_mcu_8125a_2(struct re_softc *sc)
24156 {
24157         re_set_phy_mcu_patch_request(sc);
24158 
24159         re_real_set_phy_mcu_8125a_2(sc);
24160 
24161         re_clear_phy_mcu_patch_request(sc);
24162 }
24163 
24164 static const u_int16_t phy_mcu_ram_code_8125b_1[] = {
24165         0xa436, 0x8024, 0xa438, 0x3700, 0xa436, 0xB82E, 0xa438, 0x0001,
24166         0xb820, 0x0090, 0xa436, 0xA016, 0xa438, 0x0000, 0xa436, 0xA012,
24167         0xa438, 0x0000, 0xa436, 0xA014, 0xa438, 0x1800, 0xa438, 0x8010,
24168         0xa438, 0x1800, 0xa438, 0x8025, 0xa438, 0x1800, 0xa438, 0x803a,
24169         0xa438, 0x1800, 0xa438, 0x8044, 0xa438, 0x1800, 0xa438, 0x8083,
24170         0xa438, 0x1800, 0xa438, 0x808d, 0xa438, 0x1800, 0xa438, 0x808d,
24171         0xa438, 0x1800, 0xa438, 0x808d, 0xa438, 0xd712, 0xa438, 0x4077,
24172         0xa438, 0xd71e, 0xa438, 0x4159, 0xa438, 0xd71e, 0xa438, 0x6099,
24173         0xa438, 0x7f44, 0xa438, 0x1800, 0xa438, 0x1a14, 0xa438, 0x9040,
24174         0xa438, 0x9201, 0xa438, 0x1800, 0xa438, 0x1b1a, 0xa438, 0xd71e,
24175         0xa438, 0x2425, 0xa438, 0x1a14, 0xa438, 0xd71f, 0xa438, 0x3ce5,
24176         0xa438, 0x1afb, 0xa438, 0x1800, 0xa438, 0x1b00, 0xa438, 0xd712,
24177         0xa438, 0x4077, 0xa438, 0xd71e, 0xa438, 0x4159, 0xa438, 0xd71e,
24178         0xa438, 0x60b9, 0xa438, 0x2421, 0xa438, 0x1c17, 0xa438, 0x1800,
24179         0xa438, 0x1a14, 0xa438, 0x9040, 0xa438, 0x1800, 0xa438, 0x1c2c,
24180         0xa438, 0xd71e, 0xa438, 0x2425, 0xa438, 0x1a14, 0xa438, 0xd71f,
24181         0xa438, 0x3ce5, 0xa438, 0x1c0f, 0xa438, 0x1800, 0xa438, 0x1c13,
24182         0xa438, 0xd702, 0xa438, 0xd501, 0xa438, 0x6072, 0xa438, 0x8401,
24183         0xa438, 0xf002, 0xa438, 0xa401, 0xa438, 0x1000, 0xa438, 0x146e,
24184         0xa438, 0x1800, 0xa438, 0x0b77, 0xa438, 0xd703, 0xa438, 0x665d,
24185         0xa438, 0x653e, 0xa438, 0x641f, 0xa438, 0xd700, 0xa438, 0x62c4,
24186         0xa438, 0x6185, 0xa438, 0x6066, 0xa438, 0x1800, 0xa438, 0x165a,
24187         0xa438, 0xc101, 0xa438, 0xcb00, 0xa438, 0x1000, 0xa438, 0x1945,
24188         0xa438, 0xd700, 0xa438, 0x7fa6, 0xa438, 0x1800, 0xa438, 0x807d,
24189         0xa438, 0xc102, 0xa438, 0xcb00, 0xa438, 0x1000, 0xa438, 0x1945,
24190         0xa438, 0xd700, 0xa438, 0x2569, 0xa438, 0x8058, 0xa438, 0x1800,
24191         0xa438, 0x807d, 0xa438, 0xc104, 0xa438, 0xcb00, 0xa438, 0x1000,
24192         0xa438, 0x1945, 0xa438, 0xd700, 0xa438, 0x7fa4, 0xa438, 0x1800,
24193         0xa438, 0x807d, 0xa438, 0xc120, 0xa438, 0xcb00, 0xa438, 0x1000,
24194         0xa438, 0x1945, 0xa438, 0xd703, 0xa438, 0x7fbf, 0xa438, 0x1800,
24195         0xa438, 0x807d, 0xa438, 0xc140, 0xa438, 0xcb00, 0xa438, 0x1000,
24196         0xa438, 0x1945, 0xa438, 0xd703, 0xa438, 0x7fbe, 0xa438, 0x1800,
24197         0xa438, 0x807d, 0xa438, 0xc180, 0xa438, 0xcb00, 0xa438, 0x1000,
24198         0xa438, 0x1945, 0xa438, 0xd703, 0xa438, 0x7fbd, 0xa438, 0xc100,
24199         0xa438, 0xcb00, 0xa438, 0xd708, 0xa438, 0x6018, 0xa438, 0x1800,
24200         0xa438, 0x165a, 0xa438, 0x1000, 0xa438, 0x14f6, 0xa438, 0xd014,
24201         0xa438, 0xd1e3, 0xa438, 0x1000, 0xa438, 0x1356, 0xa438, 0xd705,
24202         0xa438, 0x5fbe, 0xa438, 0x1800, 0xa438, 0x1559, 0xa436, 0xA026,
24203         0xa438, 0xffff, 0xa436, 0xA024, 0xa438, 0xffff, 0xa436, 0xA022,
24204         0xa438, 0xffff, 0xa436, 0xA020, 0xa438, 0x1557, 0xa436, 0xA006,
24205         0xa438, 0x1677, 0xa436, 0xA004, 0xa438, 0x0b75, 0xa436, 0xA002,
24206         0xa438, 0x1c17, 0xa436, 0xA000, 0xa438, 0x1b04, 0xa436, 0xA008,
24207         0xa438, 0x1f00, 0xa436, 0xA016, 0xa438, 0x0020, 0xa436, 0xA012,
24208         0xa438, 0x0000, 0xa436, 0xA014, 0xa438, 0x1800, 0xa438, 0x8010,
24209         0xa438, 0x1800, 0xa438, 0x817f, 0xa438, 0x1800, 0xa438, 0x82ab,
24210         0xa438, 0x1800, 0xa438, 0x83f8, 0xa438, 0x1800, 0xa438, 0x8444,
24211         0xa438, 0x1800, 0xa438, 0x8454, 0xa438, 0x1800, 0xa438, 0x8459,
24212         0xa438, 0x1800, 0xa438, 0x8465, 0xa438, 0xcb11, 0xa438, 0xa50c,
24213         0xa438, 0x8310, 0xa438, 0xd701, 0xa438, 0x4076, 0xa438, 0x0c03,
24214         0xa438, 0x0903, 0xa438, 0xd700, 0xa438, 0x6083, 0xa438, 0x0c1f,
24215         0xa438, 0x0d00, 0xa438, 0xf003, 0xa438, 0x0c1f, 0xa438, 0x0d00,
24216         0xa438, 0x1000, 0xa438, 0x0a7d, 0xa438, 0x1000, 0xa438, 0x0a4d,
24217         0xa438, 0xcb12, 0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd71f,
24218         0xa438, 0x5f84, 0xa438, 0xd102, 0xa438, 0xd040, 0xa438, 0x1000,
24219         0xa438, 0x0a5e, 0xa438, 0xd700, 0xa438, 0x5fb4, 0xa438, 0xd701,
24220         0xa438, 0x60f3, 0xa438, 0xd413, 0xa438, 0x1000, 0xa438, 0x0a37,
24221         0xa438, 0xd410, 0xa438, 0x1000, 0xa438, 0x0a37, 0xa438, 0xcb13,
24222         0xa438, 0xa108, 0xa438, 0x1000, 0xa438, 0x0a42, 0xa438, 0x8108,
24223         0xa438, 0xa00a, 0xa438, 0xa910, 0xa438, 0xa780, 0xa438, 0xd14a,
24224         0xa438, 0xd048, 0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd701,
24225         0xa438, 0x6255, 0xa438, 0xd700, 0xa438, 0x5f74, 0xa438, 0x6326,
24226         0xa438, 0xd702, 0xa438, 0x5f07, 0xa438, 0x800a, 0xa438, 0xa004,
24227         0xa438, 0x1000, 0xa438, 0x0a42, 0xa438, 0x8004, 0xa438, 0xa001,
24228         0xa438, 0x1000, 0xa438, 0x0a42, 0xa438, 0x8001, 0xa438, 0x0c03,
24229         0xa438, 0x0902, 0xa438, 0xffe2, 0xa438, 0x1000, 0xa438, 0x0a5e,
24230         0xa438, 0xd71f, 0xa438, 0x5fab, 0xa438, 0xba08, 0xa438, 0x1000,
24231         0xa438, 0x0a5e, 0xa438, 0xd71f, 0xa438, 0x7f8b, 0xa438, 0x9a08,
24232         0xa438, 0x800a, 0xa438, 0xd702, 0xa438, 0x6535, 0xa438, 0xd40d,
24233         0xa438, 0x1000, 0xa438, 0x0a37, 0xa438, 0xcb14, 0xa438, 0xa004,
24234         0xa438, 0x1000, 0xa438, 0x0a42, 0xa438, 0x8004, 0xa438, 0xa001,
24235         0xa438, 0x1000, 0xa438, 0x0a42, 0xa438, 0x8001, 0xa438, 0xa00a,
24236         0xa438, 0xa780, 0xa438, 0xd14a, 0xa438, 0xd048, 0xa438, 0x1000,
24237         0xa438, 0x0a5e, 0xa438, 0xd700, 0xa438, 0x5fb4, 0xa438, 0x6206,
24238         0xa438, 0xd702, 0xa438, 0x5f47, 0xa438, 0x800a, 0xa438, 0xa004,
24239         0xa438, 0x1000, 0xa438, 0x0a42, 0xa438, 0x8004, 0xa438, 0xa001,
24240         0xa438, 0x1000, 0xa438, 0x0a42, 0xa438, 0x8001, 0xa438, 0x0c03,
24241         0xa438, 0x0902, 0xa438, 0x1800, 0xa438, 0x8064, 0xa438, 0x800a,
24242         0xa438, 0xd40e, 0xa438, 0x1000, 0xa438, 0x0a37, 0xa438, 0xb920,
24243         0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd71f, 0xa438, 0x5fac,
24244         0xa438, 0x9920, 0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd71f,
24245         0xa438, 0x7f8c, 0xa438, 0xd701, 0xa438, 0x6073, 0xa438, 0xd701,
24246         0xa438, 0x4216, 0xa438, 0xa004, 0xa438, 0x1000, 0xa438, 0x0a42,
24247         0xa438, 0x8004, 0xa438, 0xa001, 0xa438, 0x1000, 0xa438, 0x0a42,
24248         0xa438, 0x8001, 0xa438, 0xd120, 0xa438, 0xd040, 0xa438, 0x1000,
24249         0xa438, 0x0a5e, 0xa438, 0xd700, 0xa438, 0x5fb4, 0xa438, 0x8504,
24250         0xa438, 0xcb21, 0xa438, 0xa301, 0xa438, 0x1000, 0xa438, 0x0a5e,
24251         0xa438, 0xd700, 0xa438, 0x5f9f, 0xa438, 0x8301, 0xa438, 0xd704,
24252         0xa438, 0x40e0, 0xa438, 0xd196, 0xa438, 0xd04d, 0xa438, 0x1000,
24253         0xa438, 0x0a5e, 0xa438, 0xd700, 0xa438, 0x5fb4, 0xa438, 0xcb22,
24254         0xa438, 0x1000, 0xa438, 0x0a6d, 0xa438, 0x0c03, 0xa438, 0x1502,
24255         0xa438, 0xa640, 0xa438, 0x9503, 0xa438, 0x8910, 0xa438, 0x8720,
24256         0xa438, 0xd700, 0xa438, 0x6083, 0xa438, 0x0c1f, 0xa438, 0x0d01,
24257         0xa438, 0xf003, 0xa438, 0x0c1f, 0xa438, 0x0d01, 0xa438, 0x1000,
24258         0xa438, 0x0a7d, 0xa438, 0x0c1f, 0xa438, 0x0f14, 0xa438, 0xcb23,
24259         0xa438, 0x8fc0, 0xa438, 0x1000, 0xa438, 0x0a25, 0xa438, 0xaf40,
24260         0xa438, 0x1000, 0xa438, 0x0a25, 0xa438, 0x0cc0, 0xa438, 0x0f80,
24261         0xa438, 0x1000, 0xa438, 0x0a25, 0xa438, 0xafc0, 0xa438, 0x1000,
24262         0xa438, 0x0a25, 0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd701,
24263         0xa438, 0x5dee, 0xa438, 0xcb24, 0xa438, 0x8f1f, 0xa438, 0x1000,
24264         0xa438, 0x0a5e, 0xa438, 0xd701, 0xa438, 0x7f6e, 0xa438, 0xa111,
24265         0xa438, 0xa215, 0xa438, 0xa401, 0xa438, 0x8404, 0xa438, 0xa720,
24266         0xa438, 0xcb25, 0xa438, 0x0c03, 0xa438, 0x1502, 0xa438, 0x8640,
24267         0xa438, 0x9503, 0xa438, 0x1000, 0xa438, 0x0b43, 0xa438, 0x1000,
24268         0xa438, 0x0b86, 0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xb920,
24269         0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd71f, 0xa438, 0x5fac,
24270         0xa438, 0x9920, 0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd71f,
24271         0xa438, 0x7f8c, 0xa438, 0xcb26, 0xa438, 0x1000, 0xa438, 0x0a5e,
24272         0xa438, 0xd71f, 0xa438, 0x5f82, 0xa438, 0x8111, 0xa438, 0x8205,
24273         0xa438, 0x8404, 0xa438, 0xcb27, 0xa438, 0xd404, 0xa438, 0x1000,
24274         0xa438, 0x0a37, 0xa438, 0xd700, 0xa438, 0x6083, 0xa438, 0x0c1f,
24275         0xa438, 0x0d02, 0xa438, 0xf003, 0xa438, 0x0c1f, 0xa438, 0x0d02,
24276         0xa438, 0x1000, 0xa438, 0x0a7d, 0xa438, 0xa710, 0xa438, 0xa104,
24277         0xa438, 0x1000, 0xa438, 0x0a42, 0xa438, 0x8104, 0xa438, 0xa001,
24278         0xa438, 0x1000, 0xa438, 0x0a42, 0xa438, 0x8001, 0xa438, 0xa120,
24279         0xa438, 0xaa0f, 0xa438, 0x8110, 0xa438, 0xa284, 0xa438, 0xa404,
24280         0xa438, 0xa00a, 0xa438, 0xd193, 0xa438, 0xd046, 0xa438, 0x1000,
24281         0xa438, 0x0a5e, 0xa438, 0xd700, 0xa438, 0x5fb4, 0xa438, 0xcb28,
24282         0xa438, 0xa110, 0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd700,
24283         0xa438, 0x5fa8, 0xa438, 0x8110, 0xa438, 0x8284, 0xa438, 0xa404,
24284         0xa438, 0x800a, 0xa438, 0x8710, 0xa438, 0xb804, 0xa438, 0x1000,
24285         0xa438, 0x0a5e, 0xa438, 0xd71f, 0xa438, 0x7f82, 0xa438, 0x9804,
24286         0xa438, 0xcb29, 0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd71f,
24287         0xa438, 0x5f85, 0xa438, 0xa710, 0xa438, 0xb820, 0xa438, 0x1000,
24288         0xa438, 0x0a5e, 0xa438, 0xd71f, 0xa438, 0x7f65, 0xa438, 0x9820,
24289         0xa438, 0xcb2a, 0xa438, 0xa190, 0xa438, 0xa284, 0xa438, 0xa404,
24290         0xa438, 0xa00a, 0xa438, 0xd13d, 0xa438, 0xd04a, 0xa438, 0x1000,
24291         0xa438, 0x0a5e, 0xa438, 0xd700, 0xa438, 0x3444, 0xa438, 0x8149,
24292         0xa438, 0xa220, 0xa438, 0xd1a0, 0xa438, 0xd040, 0xa438, 0x1000,
24293         0xa438, 0x0a5e, 0xa438, 0xd700, 0xa438, 0x3444, 0xa438, 0x8151,
24294         0xa438, 0xd702, 0xa438, 0x5f51, 0xa438, 0xcb2f, 0xa438, 0xa302,
24295         0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd708, 0xa438, 0x5f63,
24296         0xa438, 0xd411, 0xa438, 0x1000, 0xa438, 0x0a37, 0xa438, 0x8302,
24297         0xa438, 0xd409, 0xa438, 0x1000, 0xa438, 0x0a37, 0xa438, 0xb920,
24298         0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd71f, 0xa438, 0x5fac,
24299         0xa438, 0x9920, 0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd71f,
24300         0xa438, 0x7f8c, 0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd71f,
24301         0xa438, 0x5fa3, 0xa438, 0x8190, 0xa438, 0x82a4, 0xa438, 0x8404,
24302         0xa438, 0x800a, 0xa438, 0xb808, 0xa438, 0x1000, 0xa438, 0x0a5e,
24303         0xa438, 0xd71f, 0xa438, 0x7fa3, 0xa438, 0x9808, 0xa438, 0x1800,
24304         0xa438, 0x0433, 0xa438, 0xcb15, 0xa438, 0xa508, 0xa438, 0xd700,
24305         0xa438, 0x6083, 0xa438, 0x0c1f, 0xa438, 0x0d01, 0xa438, 0xf003,
24306         0xa438, 0x0c1f, 0xa438, 0x0d01, 0xa438, 0x1000, 0xa438, 0x0a7d,
24307         0xa438, 0x1000, 0xa438, 0x0a4d, 0xa438, 0xa301, 0xa438, 0x1000,
24308         0xa438, 0x0a5e, 0xa438, 0xd700, 0xa438, 0x5f9f, 0xa438, 0x8301,
24309         0xa438, 0xd704, 0xa438, 0x40e0, 0xa438, 0xd115, 0xa438, 0xd04f,
24310         0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd700, 0xa438, 0x5fb4,
24311         0xa438, 0xd413, 0xa438, 0x1000, 0xa438, 0x0a37, 0xa438, 0xcb16,
24312         0xa438, 0x1000, 0xa438, 0x0a6d, 0xa438, 0x0c03, 0xa438, 0x1502,
24313         0xa438, 0xa640, 0xa438, 0x9503, 0xa438, 0x8720, 0xa438, 0xd17a,
24314         0xa438, 0xd04c, 0xa438, 0x0c1f, 0xa438, 0x0f14, 0xa438, 0xcb17,
24315         0xa438, 0x8fc0, 0xa438, 0x1000, 0xa438, 0x0a25, 0xa438, 0xaf40,
24316         0xa438, 0x1000, 0xa438, 0x0a25, 0xa438, 0x0cc0, 0xa438, 0x0f80,
24317         0xa438, 0x1000, 0xa438, 0x0a25, 0xa438, 0xafc0, 0xa438, 0x1000,
24318         0xa438, 0x0a25, 0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd701,
24319         0xa438, 0x61ce, 0xa438, 0xd700, 0xa438, 0x5db4, 0xa438, 0xcb18,
24320         0xa438, 0x0c03, 0xa438, 0x1502, 0xa438, 0x8640, 0xa438, 0x9503,
24321         0xa438, 0xa720, 0xa438, 0x1000, 0xa438, 0x0b43, 0xa438, 0x1000,
24322         0xa438, 0x0a5e, 0xa438, 0xffd6, 0xa438, 0x8f1f, 0xa438, 0x1000,
24323         0xa438, 0x0a5e, 0xa438, 0xd701, 0xa438, 0x7f8e, 0xa438, 0xa131,
24324         0xa438, 0xaa0f, 0xa438, 0xa2d5, 0xa438, 0xa407, 0xa438, 0xa720,
24325         0xa438, 0x8310, 0xa438, 0xa308, 0xa438, 0x8308, 0xa438, 0xcb19,
24326         0xa438, 0x0c03, 0xa438, 0x1502, 0xa438, 0x8640, 0xa438, 0x9503,
24327         0xa438, 0x1000, 0xa438, 0x0b43, 0xa438, 0x1000, 0xa438, 0x0b86,
24328         0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xb920, 0xa438, 0x1000,
24329         0xa438, 0x0a5e, 0xa438, 0xd71f, 0xa438, 0x5fac, 0xa438, 0x9920,
24330         0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd71f, 0xa438, 0x7f8c,
24331         0xa438, 0xcb1a, 0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd71f,
24332         0xa438, 0x5f82, 0xa438, 0x8111, 0xa438, 0x82c5, 0xa438, 0xa404,
24333         0xa438, 0x8402, 0xa438, 0xb804, 0xa438, 0x1000, 0xa438, 0x0a5e,
24334         0xa438, 0xd71f, 0xa438, 0x7f82, 0xa438, 0x9804, 0xa438, 0xcb1b,
24335         0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd71f, 0xa438, 0x5f85,
24336         0xa438, 0xa710, 0xa438, 0xb820, 0xa438, 0x1000, 0xa438, 0x0a5e,
24337         0xa438, 0xd71f, 0xa438, 0x7f65, 0xa438, 0x9820, 0xa438, 0xcb1c,
24338         0xa438, 0xd700, 0xa438, 0x6083, 0xa438, 0x0c1f, 0xa438, 0x0d02,
24339         0xa438, 0xf003, 0xa438, 0x0c1f, 0xa438, 0x0d02, 0xa438, 0x1000,
24340         0xa438, 0x0a7d, 0xa438, 0xa110, 0xa438, 0xa284, 0xa438, 0xa404,
24341         0xa438, 0x8402, 0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd700,
24342         0xa438, 0x5fa8, 0xa438, 0xcb1d, 0xa438, 0xa180, 0xa438, 0xa402,
24343         0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd700, 0xa438, 0x5fa8,
24344         0xa438, 0xa220, 0xa438, 0xd1f5, 0xa438, 0xd049, 0xa438, 0x1000,
24345         0xa438, 0x0a5e, 0xa438, 0xd700, 0xa438, 0x3444, 0xa438, 0x8221,
24346         0xa438, 0xd702, 0xa438, 0x5f51, 0xa438, 0xb920, 0xa438, 0x1000,
24347         0xa438, 0x0a5e, 0xa438, 0xd71f, 0xa438, 0x5fac, 0xa438, 0x9920,
24348         0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd71f, 0xa438, 0x7f8c,
24349         0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd71f, 0xa438, 0x5fa3,
24350         0xa438, 0xa504, 0xa438, 0xd700, 0xa438, 0x6083, 0xa438, 0x0c1f,
24351         0xa438, 0x0d00, 0xa438, 0xf003, 0xa438, 0x0c1f, 0xa438, 0x0d00,
24352         0xa438, 0x1000, 0xa438, 0x0a7d, 0xa438, 0xa00a, 0xa438, 0x8190,
24353         0xa438, 0x82a4, 0xa438, 0x8402, 0xa438, 0xa404, 0xa438, 0xb808,
24354         0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd71f, 0xa438, 0x7fa3,
24355         0xa438, 0x9808, 0xa438, 0xcb2b, 0xa438, 0xcb2c, 0xa438, 0x1000,
24356         0xa438, 0x0a5e, 0xa438, 0xd71f, 0xa438, 0x5f84, 0xa438, 0xd14a,
24357         0xa438, 0xd048, 0xa438, 0xa780, 0xa438, 0xcb2d, 0xa438, 0x1000,
24358         0xa438, 0x0a5e, 0xa438, 0xd700, 0xa438, 0x5f94, 0xa438, 0x6208,
24359         0xa438, 0xd702, 0xa438, 0x5f27, 0xa438, 0x800a, 0xa438, 0xa004,
24360         0xa438, 0x1000, 0xa438, 0x0a42, 0xa438, 0x8004, 0xa438, 0xa001,
24361         0xa438, 0x1000, 0xa438, 0x0a42, 0xa438, 0x8001, 0xa438, 0x0c03,
24362         0xa438, 0x0902, 0xa438, 0xa00a, 0xa438, 0xffe9, 0xa438, 0xcb2e,
24363         0xa438, 0xd700, 0xa438, 0x6083, 0xa438, 0x0c1f, 0xa438, 0x0d02,
24364         0xa438, 0xf003, 0xa438, 0x0c1f, 0xa438, 0x0d02, 0xa438, 0x1000,
24365         0xa438, 0x0a7d, 0xa438, 0xa190, 0xa438, 0xa284, 0xa438, 0xa406,
24366         0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd700, 0xa438, 0x5fa8,
24367         0xa438, 0xa220, 0xa438, 0xd1a0, 0xa438, 0xd040, 0xa438, 0x1000,
24368         0xa438, 0x0a5e, 0xa438, 0xd700, 0xa438, 0x3444, 0xa438, 0x827d,
24369         0xa438, 0xd702, 0xa438, 0x5f51, 0xa438, 0xcb2f, 0xa438, 0xa302,
24370         0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd708, 0xa438, 0x5f63,
24371         0xa438, 0xd411, 0xa438, 0x1000, 0xa438, 0x0a37, 0xa438, 0x8302,
24372         0xa438, 0xd409, 0xa438, 0x1000, 0xa438, 0x0a37, 0xa438, 0xb920,
24373         0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd71f, 0xa438, 0x5fac,
24374         0xa438, 0x9920, 0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd71f,
24375         0xa438, 0x7f8c, 0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd71f,
24376         0xa438, 0x5fa3, 0xa438, 0x8190, 0xa438, 0x82a4, 0xa438, 0x8406,
24377         0xa438, 0x800a, 0xa438, 0xb808, 0xa438, 0x1000, 0xa438, 0x0a5e,
24378         0xa438, 0xd71f, 0xa438, 0x7fa3, 0xa438, 0x9808, 0xa438, 0x1800,
24379         0xa438, 0x0433, 0xa438, 0xcb30, 0xa438, 0x8380, 0xa438, 0xcb31,
24380         0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd71f, 0xa438, 0x5f86,
24381         0xa438, 0x9308, 0xa438, 0xb204, 0xa438, 0xb301, 0xa438, 0x1000,
24382         0xa438, 0x0a5e, 0xa438, 0xd701, 0xa438, 0x5fa2, 0xa438, 0xb302,
24383         0xa438, 0x9204, 0xa438, 0xcb32, 0xa438, 0xd408, 0xa438, 0x1000,
24384         0xa438, 0x0a37, 0xa438, 0xd141, 0xa438, 0xd043, 0xa438, 0x1000,
24385         0xa438, 0x0a5e, 0xa438, 0xd700, 0xa438, 0x5fb4, 0xa438, 0xd704,
24386         0xa438, 0x4ccc, 0xa438, 0xd700, 0xa438, 0x4c81, 0xa438, 0xd702,
24387         0xa438, 0x609e, 0xa438, 0xd1e5, 0xa438, 0xd04d, 0xa438, 0xf003,
24388         0xa438, 0xd1e5, 0xa438, 0xd04d, 0xa438, 0x1000, 0xa438, 0x0a5e,
24389         0xa438, 0xd700, 0xa438, 0x5fb4, 0xa438, 0xd700, 0xa438, 0x6083,
24390         0xa438, 0x0c1f, 0xa438, 0x0d01, 0xa438, 0xf003, 0xa438, 0x0c1f,
24391         0xa438, 0x0d01, 0xa438, 0x1000, 0xa438, 0x0a7d, 0xa438, 0x8710,
24392         0xa438, 0xa108, 0xa438, 0x1000, 0xa438, 0x0a42, 0xa438, 0x8108,
24393         0xa438, 0xa203, 0xa438, 0x8120, 0xa438, 0x8a0f, 0xa438, 0xa111,
24394         0xa438, 0x8204, 0xa438, 0xa140, 0xa438, 0x1000, 0xa438, 0x0a42,
24395         0xa438, 0x8140, 0xa438, 0xd17a, 0xa438, 0xd04b, 0xa438, 0x1000,
24396         0xa438, 0x0a5e, 0xa438, 0xd700, 0xa438, 0x5fb4, 0xa438, 0xa204,
24397         0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd700, 0xa438, 0x5fa7,
24398         0xa438, 0xb920, 0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd71f,
24399         0xa438, 0x5fac, 0xa438, 0x9920, 0xa438, 0x1000, 0xa438, 0x0a5e,
24400         0xa438, 0xd71f, 0xa438, 0x7f8c, 0xa438, 0xd404, 0xa438, 0x1000,
24401         0xa438, 0x0a37, 0xa438, 0xd700, 0xa438, 0x6083, 0xa438, 0x0c1f,
24402         0xa438, 0x0d02, 0xa438, 0xf003, 0xa438, 0x0c1f, 0xa438, 0x0d02,
24403         0xa438, 0x1000, 0xa438, 0x0a7d, 0xa438, 0xa710, 0xa438, 0x8101,
24404         0xa438, 0x8201, 0xa438, 0xa104, 0xa438, 0x1000, 0xa438, 0x0a42,
24405         0xa438, 0x8104, 0xa438, 0xa120, 0xa438, 0xaa0f, 0xa438, 0x8110,
24406         0xa438, 0xa284, 0xa438, 0xa404, 0xa438, 0xa00a, 0xa438, 0xd193,
24407         0xa438, 0xd047, 0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd700,
24408         0xa438, 0x5fb4, 0xa438, 0xa110, 0xa438, 0x1000, 0xa438, 0x0a5e,
24409         0xa438, 0xd700, 0xa438, 0x5fa8, 0xa438, 0xa180, 0xa438, 0xd13d,
24410         0xa438, 0xd04a, 0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd700,
24411         0xa438, 0x5fb4, 0xa438, 0xf024, 0xa438, 0xa710, 0xa438, 0xa00a,
24412         0xa438, 0x8190, 0xa438, 0x8204, 0xa438, 0xa280, 0xa438, 0xa404,
24413         0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd700, 0xa438, 0x5fa7,
24414         0xa438, 0x8710, 0xa438, 0xb920, 0xa438, 0x1000, 0xa438, 0x0a5e,
24415         0xa438, 0xd71f, 0xa438, 0x5fac, 0xa438, 0x9920, 0xa438, 0x1000,
24416         0xa438, 0x0a5e, 0xa438, 0xd71f, 0xa438, 0x7f8c, 0xa438, 0x800a,
24417         0xa438, 0x8190, 0xa438, 0x8284, 0xa438, 0x8406, 0xa438, 0xd700,
24418         0xa438, 0x4121, 0xa438, 0xd701, 0xa438, 0x60f3, 0xa438, 0xd1e5,
24419         0xa438, 0xd04d, 0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd700,
24420         0xa438, 0x5fb4, 0xa438, 0x8710, 0xa438, 0xa00a, 0xa438, 0x8190,
24421         0xa438, 0x8204, 0xa438, 0xa280, 0xa438, 0xa404, 0xa438, 0xb920,
24422         0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd71f, 0xa438, 0x5fac,
24423         0xa438, 0x9920, 0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd71f,
24424         0xa438, 0x7f8c, 0xa438, 0xcb33, 0xa438, 0x1000, 0xa438, 0x0a5e,
24425         0xa438, 0xd71f, 0xa438, 0x5f85, 0xa438, 0xa710, 0xa438, 0xb820,
24426         0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd71f, 0xa438, 0x7f65,
24427         0xa438, 0x9820, 0xa438, 0xcb34, 0xa438, 0xa00a, 0xa438, 0xa190,
24428         0xa438, 0xa284, 0xa438, 0xa404, 0xa438, 0x1000, 0xa438, 0x0a5e,
24429         0xa438, 0xd700, 0xa438, 0x5fa9, 0xa438, 0xd701, 0xa438, 0x6853,
24430         0xa438, 0xd700, 0xa438, 0x6083, 0xa438, 0x0c1f, 0xa438, 0x0d00,
24431         0xa438, 0xf003, 0xa438, 0x0c1f, 0xa438, 0x0d00, 0xa438, 0x1000,
24432         0xa438, 0x0a7d, 0xa438, 0x8190, 0xa438, 0x8284, 0xa438, 0xcb35,
24433         0xa438, 0xd407, 0xa438, 0x1000, 0xa438, 0x0a37, 0xa438, 0x8110,
24434         0xa438, 0x8204, 0xa438, 0xa280, 0xa438, 0xa00a, 0xa438, 0xd704,
24435         0xa438, 0x4215, 0xa438, 0xa304, 0xa438, 0x1000, 0xa438, 0x0a5e,
24436         0xa438, 0xd700, 0xa438, 0x5fb8, 0xa438, 0xd1c3, 0xa438, 0xd043,
24437         0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd700, 0xa438, 0x5fb4,
24438         0xa438, 0x8304, 0xa438, 0xd700, 0xa438, 0x4109, 0xa438, 0xf01e,
24439         0xa438, 0xcb36, 0xa438, 0xd412, 0xa438, 0x1000, 0xa438, 0x0a37,
24440         0xa438, 0xd700, 0xa438, 0x6309, 0xa438, 0xd702, 0xa438, 0x42c7,
24441         0xa438, 0x800a, 0xa438, 0x8180, 0xa438, 0x8280, 0xa438, 0x8404,
24442         0xa438, 0xa004, 0xa438, 0x1000, 0xa438, 0x0a42, 0xa438, 0x8004,
24443         0xa438, 0xa001, 0xa438, 0x1000, 0xa438, 0x0a42, 0xa438, 0x8001,
24444         0xa438, 0x0c03, 0xa438, 0x0902, 0xa438, 0xa00a, 0xa438, 0xd14a,
24445         0xa438, 0xd048, 0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd700,
24446         0xa438, 0x5fb4, 0xa438, 0xd700, 0xa438, 0x6083, 0xa438, 0x0c1f,
24447         0xa438, 0x0d02, 0xa438, 0xf003, 0xa438, 0x0c1f, 0xa438, 0x0d02,
24448         0xa438, 0x1000, 0xa438, 0x0a7d, 0xa438, 0xcc55, 0xa438, 0xcb37,
24449         0xa438, 0xa00a, 0xa438, 0xa190, 0xa438, 0xa2a4, 0xa438, 0xa404,
24450         0xa438, 0xd700, 0xa438, 0x6041, 0xa438, 0xa402, 0xa438, 0xd13d,
24451         0xa438, 0xd04a, 0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd700,
24452         0xa438, 0x5fb4, 0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd700,
24453         0xa438, 0x5fa9, 0xa438, 0xd702, 0xa438, 0x5f71, 0xa438, 0xcb38,
24454         0xa438, 0x8224, 0xa438, 0xa288, 0xa438, 0x8180, 0xa438, 0xa110,
24455         0xa438, 0xa404, 0xa438, 0x800a, 0xa438, 0xd700, 0xa438, 0x6041,
24456         0xa438, 0x8402, 0xa438, 0xd415, 0xa438, 0x1000, 0xa438, 0x0a37,
24457         0xa438, 0xd13d, 0xa438, 0xd04a, 0xa438, 0x1000, 0xa438, 0x0a5e,
24458         0xa438, 0xd700, 0xa438, 0x5fb4, 0xa438, 0xcb39, 0xa438, 0xa00a,
24459         0xa438, 0xa190, 0xa438, 0xa2a0, 0xa438, 0xa404, 0xa438, 0xd700,
24460         0xa438, 0x6041, 0xa438, 0xa402, 0xa438, 0xd17a, 0xa438, 0xd047,
24461         0xa438, 0x1000, 0xa438, 0x0a5e, 0xa438, 0xd700, 0xa438, 0x5fb4,
24462         0xa438, 0x1800, 0xa438, 0x0560, 0xa438, 0xa111, 0xa438, 0x0000,
24463         0xa438, 0x0000, 0xa438, 0x0000, 0xa438, 0x0000, 0xa438, 0xd3f5,
24464         0xa438, 0xd219, 0xa438, 0x1000, 0xa438, 0x0c31, 0xa438, 0xd708,
24465         0xa438, 0x5fa5, 0xa438, 0xa215, 0xa438, 0xd30e, 0xa438, 0xd21a,
24466         0xa438, 0x1000, 0xa438, 0x0c31, 0xa438, 0xd708, 0xa438, 0x63e9,
24467         0xa438, 0xd708, 0xa438, 0x5f65, 0xa438, 0xd708, 0xa438, 0x7f36,
24468         0xa438, 0xa004, 0xa438, 0x1000, 0xa438, 0x0c35, 0xa438, 0x8004,
24469         0xa438, 0xa001, 0xa438, 0x1000, 0xa438, 0x0c35, 0xa438, 0x8001,
24470         0xa438, 0xd708, 0xa438, 0x4098, 0xa438, 0xd102, 0xa438, 0x9401,
24471         0xa438, 0xf003, 0xa438, 0xd103, 0xa438, 0xb401, 0xa438, 0x1000,
24472         0xa438, 0x0c27, 0xa438, 0xa108, 0xa438, 0x1000, 0xa438, 0x0c35,
24473         0xa438, 0x8108, 0xa438, 0x8110, 0xa438, 0x8294, 0xa438, 0xa202,
24474         0xa438, 0x1800, 0xa438, 0x0bdb, 0xa438, 0xd39c, 0xa438, 0xd210,
24475         0xa438, 0x1000, 0xa438, 0x0c31, 0xa438, 0xd708, 0xa438, 0x5fa5,
24476         0xa438, 0xd39c, 0xa438, 0xd210, 0xa438, 0x1000, 0xa438, 0x0c31,
24477         0xa438, 0xd708, 0xa438, 0x5fa5, 0xa438, 0x1000, 0xa438, 0x0c31,
24478         0xa438, 0xd708, 0xa438, 0x29b5, 0xa438, 0x840e, 0xa438, 0xd708,
24479         0xa438, 0x5f4a, 0xa438, 0x0c1f, 0xa438, 0x1014, 0xa438, 0x1000,
24480         0xa438, 0x0c31, 0xa438, 0xd709, 0xa438, 0x7fa4, 0xa438, 0x901f,
24481         0xa438, 0x1800, 0xa438, 0x0c23, 0xa438, 0xcb43, 0xa438, 0xa508,
24482         0xa438, 0xd701, 0xa438, 0x3699, 0xa438, 0x844a, 0xa438, 0xa504,
24483         0xa438, 0xa190, 0xa438, 0xa2a0, 0xa438, 0xa404, 0xa438, 0xa00a,
24484         0xa438, 0xd700, 0xa438, 0x2109, 0xa438, 0x05ea, 0xa438, 0xa402,
24485         0xa438, 0x1800, 0xa438, 0x05ea, 0xa438, 0xcb90, 0xa438, 0x0cf0,
24486         0xa438, 0x0ca0, 0xa438, 0x1800, 0xa438, 0x06db, 0xa438, 0xd1ff,
24487         0xa438, 0xd052, 0xa438, 0xa508, 0xa438, 0x8718, 0xa438, 0xa00a,
24488         0xa438, 0xa190, 0xa438, 0xa2a0, 0xa438, 0xa404, 0xa438, 0x0cf0,
24489         0xa438, 0x0c50, 0xa438, 0x1800, 0xa438, 0x09ef, 0xa438, 0x1000,
24490         0xa438, 0x0a5e, 0xa438, 0xd704, 0xa438, 0x2e70, 0xa438, 0x06da,
24491         0xa438, 0xd700, 0xa438, 0x5f55, 0xa438, 0xa90c, 0xa438, 0x1800,
24492         0xa438, 0x0645, 0xa436, 0xA10E, 0xa438, 0x0644, 0xa436, 0xA10C,
24493         0xa438, 0x09e9, 0xa436, 0xA10A, 0xa438, 0x06da, 0xa436, 0xA108,
24494         0xa438, 0x05e1, 0xa436, 0xA106, 0xa438, 0x0be4, 0xa436, 0xA104,
24495         0xa438, 0x0435, 0xa436, 0xA102, 0xa438, 0x0141, 0xa436, 0xA100,
24496         0xa438, 0x026d, 0xa436, 0xA110, 0xa438, 0x00ff, 0xa436, 0xb87c,
24497         0xa438, 0x85fe, 0xa436, 0xb87e, 0xa438, 0xaf86, 0xa438, 0x16af,
24498         0xa438, 0x8699, 0xa438, 0xaf86, 0xa438, 0xe5af, 0xa438, 0x86f9,
24499         0xa438, 0xaf87, 0xa438, 0x7aaf, 0xa438, 0x883a, 0xa438, 0xaf88,
24500         0xa438, 0x58af, 0xa438, 0x8b6c, 0xa438, 0xd48b, 0xa438, 0x7c02,
24501         0xa438, 0x8644, 0xa438, 0x2c00, 0xa438, 0x503c, 0xa438, 0xffd6,
24502         0xa438, 0xac27, 0xa438, 0x18e1, 0xa438, 0x82fe, 0xa438, 0xad28,
24503         0xa438, 0x0cd4, 0xa438, 0x8b84, 0xa438, 0x0286, 0xa438, 0x442c,
24504         0xa438, 0x003c, 0xa438, 0xac27, 0xa438, 0x06ee, 0xa438, 0x8299,
24505         0xa438, 0x01ae, 0xa438, 0x04ee, 0xa438, 0x8299, 0xa438, 0x00af,
24506         0xa438, 0x23dc, 0xa438, 0xf9fa, 0xa438, 0xcefa, 0xa438, 0xfbef,
24507         0xa438, 0x79fb, 0xa438, 0xc4bf, 0xa438, 0x8b76, 0xa438, 0x026c,
24508         0xa438, 0x6dac, 0xa438, 0x2804, 0xa438, 0xd203, 0xa438, 0xae02,
24509         0xa438, 0xd201, 0xa438, 0xbdd8, 0xa438, 0x19d9, 0xa438, 0xef94,
24510         0xa438, 0x026c, 0xa438, 0x6d78, 0xa438, 0x03ef, 0xa438, 0x648a,
24511         0xa438, 0x0002, 0xa438, 0xbdd8, 0xa438, 0x19d9, 0xa438, 0xef94,
24512         0xa438, 0x026c, 0xa438, 0x6d78, 0xa438, 0x03ef, 0xa438, 0x7402,
24513         0xa438, 0x72cd, 0xa438, 0xac50, 0xa438, 0x02ef, 0xa438, 0x643a,
24514         0xa438, 0x019f, 0xa438, 0xe4ef, 0xa438, 0x4678, 0xa438, 0x03ac,
24515         0xa438, 0x2002, 0xa438, 0xae02, 0xa438, 0xd0ff, 0xa438, 0xffef,
24516         0xa438, 0x97ff, 0xa438, 0xfec6, 0xa438, 0xfefd, 0xa438, 0x041f,
24517         0xa438, 0x771f, 0xa438, 0x221c, 0xa438, 0x450d, 0xa438, 0x481f,
24518         0xa438, 0x00ac, 0xa438, 0x7f04, 0xa438, 0x1a94, 0xa438, 0xae08,
24519         0xa438, 0x1a94, 0xa438, 0xac7f, 0xa438, 0x03d7, 0xa438, 0x0100,
24520         0xa438, 0xef46, 0xa438, 0x0d48, 0xa438, 0x1f00, 0xa438, 0x1c45,
24521         0xa438, 0xef69, 0xa438, 0xef57, 0xa438, 0xef74, 0xa438, 0x0272,
24522         0xa438, 0xe8a7, 0xa438, 0xffff, 0xa438, 0x0d1a, 0xa438, 0x941b,
24523         0xa438, 0x979e, 0xa438, 0x072d, 0xa438, 0x0100, 0xa438, 0x1a64,
24524         0xa438, 0xef76, 0xa438, 0xef97, 0xa438, 0x0d98, 0xa438, 0xd400,
24525         0xa438, 0xff1d, 0xa438, 0x941a, 0xa438, 0x89cf, 0xa438, 0x1a75,
24526         0xa438, 0xaf74, 0xa438, 0xf9bf, 0xa438, 0x8b79, 0xa438, 0x026c,
24527         0xa438, 0x6da1, 0xa438, 0x0005, 0xa438, 0xe180, 0xa438, 0xa0ae,
24528         0xa438, 0x03e1, 0xa438, 0x80a1, 0xa438, 0xaf26, 0xa438, 0x9aac,
24529         0xa438, 0x284d, 0xa438, 0xe08f, 0xa438, 0xffef, 0xa438, 0x10c0,
24530         0xa438, 0xe08f, 0xa438, 0xfe10, 0xa438, 0x1b08, 0xa438, 0xa000,
24531         0xa438, 0x04c8, 0xa438, 0xaf40, 0xa438, 0x67c8, 0xa438, 0xbf8b,
24532         0xa438, 0x8c02, 0xa438, 0x6c4e, 0xa438, 0xc4bf, 0xa438, 0x8b8f,
24533         0xa438, 0x026c, 0xa438, 0x6def, 0xa438, 0x74e0, 0xa438, 0x830c,
24534         0xa438, 0xad20, 0xa438, 0x0302, 0xa438, 0x74ac, 0xa438, 0xccef,
24535         0xa438, 0x971b, 0xa438, 0x76ad, 0xa438, 0x5f02, 0xa438, 0xae13,
24536         0xa438, 0xef69, 0xa438, 0xef30, 0xa438, 0x1b32, 0xa438, 0xc4ef,
24537         0xa438, 0x46e4, 0xa438, 0x8ffb, 0xa438, 0xe58f, 0xa438, 0xfce7,
24538         0xa438, 0x8ffd, 0xa438, 0xcc10, 0xa438, 0x11ae, 0xa438, 0xb8d1,
24539         0xa438, 0x00a1, 0xa438, 0x1f03, 0xa438, 0xaf40, 0xa438, 0x4fbf,
24540         0xa438, 0x8b8c, 0xa438, 0x026c, 0xa438, 0x4ec4, 0xa438, 0xbf8b,
24541         0xa438, 0x8f02, 0xa438, 0x6c6d, 0xa438, 0xef74, 0xa438, 0xe083,
24542         0xa438, 0x0cad, 0xa438, 0x2003, 0xa438, 0x0274, 0xa438, 0xaccc,
24543         0xa438, 0xef97, 0xa438, 0x1b76, 0xa438, 0xad5f, 0xa438, 0x02ae,
24544         0xa438, 0x04ef, 0xa438, 0x69ef, 0xa438, 0x3111, 0xa438, 0xaed1,
24545         0xa438, 0x0287, 0xa438, 0x80af, 0xa438, 0x2293, 0xa438, 0xf8f9,
24546         0xa438, 0xfafb, 0xa438, 0xef59, 0xa438, 0xe080, 0xa438, 0x13ad,
24547         0xa438, 0x252f, 0xa438, 0xbf88, 0xa438, 0x2802, 0xa438, 0x6c6d,
24548         0xa438, 0xef64, 0xa438, 0x1f44, 0xa438, 0xe18f, 0xa438, 0xb91b,
24549         0xa438, 0x64ad, 0xa438, 0x4f1d, 0xa438, 0xd688, 0xa438, 0x2bd7,
24550         0xa438, 0x882e, 0xa438, 0x0274, 0xa438, 0x73ad, 0xa438, 0x5008,
24551         0xa438, 0xbf88, 0xa438, 0x3102, 0xa438, 0x737c, 0xa438, 0xae03,
24552         0xa438, 0x0287, 0xa438, 0xd0bf, 0xa438, 0x882b, 0xa438, 0x0273,
24553         0xa438, 0x73e0, 0xa438, 0x824c, 0xa438, 0xf621, 0xa438, 0xe482,
24554         0xa438, 0x4cbf, 0xa438, 0x8834, 0xa438, 0x0273, 0xa438, 0x7cef,
24555         0xa438, 0x95ff, 0xa438, 0xfefd, 0xa438, 0xfc04, 0xa438, 0xf8f9,
24556         0xa438, 0xfafb, 0xa438, 0xef79, 0xa438, 0xbf88, 0xa438, 0x1f02,
24557         0xa438, 0x737c, 0xa438, 0x1f22, 0xa438, 0xac32, 0xa438, 0x31ef,
24558         0xa438, 0x12bf, 0xa438, 0x8822, 0xa438, 0x026c, 0xa438, 0x4ed6,
24559         0xa438, 0x8fba, 0xa438, 0x1f33, 0xa438, 0xac3c, 0xa438, 0x1eef,
24560         0xa438, 0x13bf, 0xa438, 0x8837, 0xa438, 0x026c, 0xa438, 0x4eef,
24561         0xa438, 0x96d8, 0xa438, 0x19d9, 0xa438, 0xbf88, 0xa438, 0x2502,
24562         0xa438, 0x6c4e, 0xa438, 0xbf88, 0xa438, 0x2502, 0xa438, 0x6c4e,
24563         0xa438, 0x1616, 0xa438, 0x13ae, 0xa438, 0xdf12, 0xa438, 0xaecc,
24564         0xa438, 0xbf88, 0xa438, 0x1f02, 0xa438, 0x7373, 0xa438, 0xef97,
24565         0xa438, 0xfffe, 0xa438, 0xfdfc, 0xa438, 0x0466, 0xa438, 0xac88,
24566         0xa438, 0x54ac, 0xa438, 0x88f0, 0xa438, 0xac8a, 0xa438, 0x92ac,
24567         0xa438, 0xbadd, 0xa438, 0xac6c, 0xa438, 0xeeac, 0xa438, 0x6cff,
24568         0xa438, 0xad02, 0xa438, 0x99ac, 0xa438, 0x0030, 0xa438, 0xac88,
24569         0xa438, 0xd4c3, 0xa438, 0x5000, 0xa438, 0x0000, 0xa438, 0x0000,
24570         0xa438, 0x0000, 0xa438, 0x0000, 0xa438, 0x0000, 0xa438, 0x0000,
24571         0xa438, 0x0000, 0xa438, 0x0000, 0xa438, 0x00b4, 0xa438, 0xecee,
24572         0xa438, 0x8298, 0xa438, 0x00af, 0xa438, 0x1412, 0xa438, 0xf8bf,
24573         0xa438, 0x8b5d, 0xa438, 0x026c, 0xa438, 0x6d58, 0xa438, 0x03e1,
24574         0xa438, 0x8fb8, 0xa438, 0x2901, 0xa438, 0xe58f, 0xa438, 0xb8a0,
24575         0xa438, 0x0049, 0xa438, 0xef47, 0xa438, 0xe483, 0xa438, 0x02e5,
24576         0xa438, 0x8303, 0xa438, 0xbfc2, 0xa438, 0x5f1a, 0xa438, 0x95f7,
24577         0xa438, 0x05ee, 0xa438, 0xffd2, 0xa438, 0x00d8, 0xa438, 0xf605,
24578         0xa438, 0x1f11, 0xa438, 0xef60, 0xa438, 0xbf8b, 0xa438, 0x3002,
24579         0xa438, 0x6c4e, 0xa438, 0xbf8b, 0xa438, 0x3302, 0xa438, 0x6c6d,
24580         0xa438, 0xf728, 0xa438, 0xbf8b, 0xa438, 0x3302, 0xa438, 0x6c4e,
24581         0xa438, 0xf628, 0xa438, 0xbf8b, 0xa438, 0x3302, 0xa438, 0x6c4e,
24582         0xa438, 0x0c64, 0xa438, 0xef46, 0xa438, 0xbf8b, 0xa438, 0x6002,
24583         0xa438, 0x6c4e, 0xa438, 0x0289, 0xa438, 0x9902, 0xa438, 0x3920,
24584         0xa438, 0xaf89, 0xa438, 0x96a0, 0xa438, 0x0149, 0xa438, 0xef47,
24585         0xa438, 0xe483, 0xa438, 0x04e5, 0xa438, 0x8305, 0xa438, 0xbfc2,
24586         0xa438, 0x5f1a, 0xa438, 0x95f7, 0xa438, 0x05ee, 0xa438, 0xffd2,
24587         0xa438, 0x00d8, 0xa438, 0xf605, 0xa438, 0x1f11, 0xa438, 0xef60,
24588         0xa438, 0xbf8b, 0xa438, 0x3002, 0xa438, 0x6c4e, 0xa438, 0xbf8b,
24589         0xa438, 0x3302, 0xa438, 0x6c6d, 0xa438, 0xf729, 0xa438, 0xbf8b,
24590         0xa438, 0x3302, 0xa438, 0x6c4e, 0xa438, 0xf629, 0xa438, 0xbf8b,
24591         0xa438, 0x3302, 0xa438, 0x6c4e, 0xa438, 0x0c64, 0xa438, 0xef46,
24592         0xa438, 0xbf8b, 0xa438, 0x6302, 0xa438, 0x6c4e, 0xa438, 0x0289,
24593         0xa438, 0x9902, 0xa438, 0x3920, 0xa438, 0xaf89, 0xa438, 0x96a0,
24594         0xa438, 0x0249, 0xa438, 0xef47, 0xa438, 0xe483, 0xa438, 0x06e5,
24595         0xa438, 0x8307, 0xa438, 0xbfc2, 0xa438, 0x5f1a, 0xa438, 0x95f7,
24596         0xa438, 0x05ee, 0xa438, 0xffd2, 0xa438, 0x00d8, 0xa438, 0xf605,
24597         0xa438, 0x1f11, 0xa438, 0xef60, 0xa438, 0xbf8b, 0xa438, 0x3002,
24598         0xa438, 0x6c4e, 0xa438, 0xbf8b, 0xa438, 0x3302, 0xa438, 0x6c6d,
24599         0xa438, 0xf72a, 0xa438, 0xbf8b, 0xa438, 0x3302, 0xa438, 0x6c4e,
24600         0xa438, 0xf62a, 0xa438, 0xbf8b, 0xa438, 0x3302, 0xa438, 0x6c4e,
24601         0xa438, 0x0c64, 0xa438, 0xef46, 0xa438, 0xbf8b, 0xa438, 0x6602,
24602         0xa438, 0x6c4e, 0xa438, 0x0289, 0xa438, 0x9902, 0xa438, 0x3920,
24603         0xa438, 0xaf89, 0xa438, 0x96ef, 0xa438, 0x47e4, 0xa438, 0x8308,
24604         0xa438, 0xe583, 0xa438, 0x09bf, 0xa438, 0xc25f, 0xa438, 0x1a95,
24605         0xa438, 0xf705, 0xa438, 0xeeff, 0xa438, 0xd200, 0xa438, 0xd8f6,
24606         0xa438, 0x051f, 0xa438, 0x11ef, 0xa438, 0x60bf, 0xa438, 0x8b30,
24607         0xa438, 0x026c, 0xa438, 0x4ebf, 0xa438, 0x8b33, 0xa438, 0x026c,
24608         0xa438, 0x6df7, 0xa438, 0x2bbf, 0xa438, 0x8b33, 0xa438, 0x026c,
24609         0xa438, 0x4ef6, 0xa438, 0x2bbf, 0xa438, 0x8b33, 0xa438, 0x026c,
24610         0xa438, 0x4e0c, 0xa438, 0x64ef, 0xa438, 0x46bf, 0xa438, 0x8b69,
24611         0xa438, 0x026c, 0xa438, 0x4e02, 0xa438, 0x8999, 0xa438, 0x0239,
24612         0xa438, 0x20af, 0xa438, 0x8996, 0xa438, 0xaf39, 0xa438, 0x1ef8,
24613         0xa438, 0xf9fa, 0xa438, 0xe08f, 0xa438, 0xb838, 0xa438, 0x02ad,
24614         0xa438, 0x2702, 0xa438, 0xae03, 0xa438, 0xaf8b, 0xa438, 0x201f,
24615         0xa438, 0x66ef, 0xa438, 0x65bf, 0xa438, 0xc21f, 0xa438, 0x1a96,
24616         0xa438, 0xf705, 0xa438, 0xeeff, 0xa438, 0xd200, 0xa438, 0xdaf6,
24617         0xa438, 0x05bf, 0xa438, 0xc22f, 0xa438, 0x1a96, 0xa438, 0xf705,
24618         0xa438, 0xeeff, 0xa438, 0xd200, 0xa438, 0xdbf6, 0xa438, 0x05ef,
24619         0xa438, 0x021f, 0xa438, 0x110d, 0xa438, 0x42bf, 0xa438, 0x8b3c,
24620         0xa438, 0x026c, 0xa438, 0x4eef, 0xa438, 0x021b, 0xa438, 0x031f,
24621         0xa438, 0x110d, 0xa438, 0x42bf, 0xa438, 0x8b36, 0xa438, 0x026c,
24622         0xa438, 0x4eef, 0xa438, 0x021a, 0xa438, 0x031f, 0xa438, 0x110d,
24623         0xa438, 0x42bf, 0xa438, 0x8b39, 0xa438, 0x026c, 0xa438, 0x4ebf,
24624         0xa438, 0xc23f, 0xa438, 0x1a96, 0xa438, 0xf705, 0xa438, 0xeeff,
24625         0xa438, 0xd200, 0xa438, 0xdaf6, 0xa438, 0x05bf, 0xa438, 0xc24f,
24626         0xa438, 0x1a96, 0xa438, 0xf705, 0xa438, 0xeeff, 0xa438, 0xd200,
24627         0xa438, 0xdbf6, 0xa438, 0x05ef, 0xa438, 0x021f, 0xa438, 0x110d,
24628         0xa438, 0x42bf, 0xa438, 0x8b45, 0xa438, 0x026c, 0xa438, 0x4eef,
24629         0xa438, 0x021b, 0xa438, 0x031f, 0xa438, 0x110d, 0xa438, 0x42bf,
24630         0xa438, 0x8b3f, 0xa438, 0x026c, 0xa438, 0x4eef, 0xa438, 0x021a,
24631         0xa438, 0x031f, 0xa438, 0x110d, 0xa438, 0x42bf, 0xa438, 0x8b42,
24632         0xa438, 0x026c, 0xa438, 0x4eef, 0xa438, 0x56d0, 0xa438, 0x201f,
24633         0xa438, 0x11bf, 0xa438, 0x8b4e, 0xa438, 0x026c, 0xa438, 0x4ebf,
24634         0xa438, 0x8b48, 0xa438, 0x026c, 0xa438, 0x4ebf, 0xa438, 0x8b4b,
24635         0xa438, 0x026c, 0xa438, 0x4ee1, 0xa438, 0x8578, 0xa438, 0xef03,
24636         0xa438, 0x480a, 0xa438, 0x2805, 0xa438, 0xef20, 0xa438, 0x1b01,
24637         0xa438, 0xad27, 0xa438, 0x3f1f, 0xa438, 0x44e0, 0xa438, 0x8560,
24638         0xa438, 0xe185, 0xa438, 0x61bf, 0xa438, 0x8b51, 0xa438, 0x026c,
24639         0xa438, 0x4ee0, 0xa438, 0x8566, 0xa438, 0xe185, 0xa438, 0x67bf,
24640         0xa438, 0x8b54, 0xa438, 0x026c, 0xa438, 0x4ee0, 0xa438, 0x856c,
24641         0xa438, 0xe185, 0xa438, 0x6dbf, 0xa438, 0x8b57, 0xa438, 0x026c,
24642         0xa438, 0x4ee0, 0xa438, 0x8572, 0xa438, 0xe185, 0xa438, 0x73bf,
24643         0xa438, 0x8b5a, 0xa438, 0x026c, 0xa438, 0x4ee1, 0xa438, 0x8fb8,
24644         0xa438, 0x5900, 0xa438, 0xf728, 0xa438, 0xe58f, 0xa438, 0xb8af,
24645         0xa438, 0x8b2c, 0xa438, 0xe185, 0xa438, 0x791b, 0xa438, 0x21ad,
24646         0xa438, 0x373e, 0xa438, 0x1f44, 0xa438, 0xe085, 0xa438, 0x62e1,
24647         0xa438, 0x8563, 0xa438, 0xbf8b, 0xa438, 0x5102, 0xa438, 0x6c4e,
24648         0xa438, 0xe085, 0xa438, 0x68e1, 0xa438, 0x8569, 0xa438, 0xbf8b,
24649         0xa438, 0x5402, 0xa438, 0x6c4e, 0xa438, 0xe085, 0xa438, 0x6ee1,
24650         0xa438, 0x856f, 0xa438, 0xbf8b, 0xa438, 0x5702, 0xa438, 0x6c4e,
24651         0xa438, 0xe085, 0xa438, 0x74e1, 0xa438, 0x8575, 0xa438, 0xbf8b,
24652         0xa438, 0x5a02, 0xa438, 0x6c4e, 0xa438, 0xe18f, 0xa438, 0xb859,
24653         0xa438, 0x00f7, 0xa438, 0x28e5, 0xa438, 0x8fb8, 0xa438, 0xae4a,
24654         0xa438, 0x1f44, 0xa438, 0xe085, 0xa438, 0x64e1, 0xa438, 0x8565,
24655         0xa438, 0xbf8b, 0xa438, 0x5102, 0xa438, 0x6c4e, 0xa438, 0xe085,
24656         0xa438, 0x6ae1, 0xa438, 0x856b, 0xa438, 0xbf8b, 0xa438, 0x5402,
24657         0xa438, 0x6c4e, 0xa438, 0xe085, 0xa438, 0x70e1, 0xa438, 0x8571,
24658         0xa438, 0xbf8b, 0xa438, 0x5702, 0xa438, 0x6c4e, 0xa438, 0xe085,
24659         0xa438, 0x76e1, 0xa438, 0x8577, 0xa438, 0xbf8b, 0xa438, 0x5a02,
24660         0xa438, 0x6c4e, 0xa438, 0xe18f, 0xa438, 0xb859, 0xa438, 0x00f7,
24661         0xa438, 0x28e5, 0xa438, 0x8fb8, 0xa438, 0xae0c, 0xa438, 0xe18f,
24662         0xa438, 0xb839, 0xa438, 0x04ac, 0xa438, 0x2f04, 0xa438, 0xee8f,
24663         0xa438, 0xb800, 0xa438, 0xfefd, 0xa438, 0xfc04, 0xa438, 0xf0ac,
24664         0xa438, 0x8efc, 0xa438, 0xac8c, 0xa438, 0xf0ac, 0xa438, 0xfaf0,
24665         0xa438, 0xacf8, 0xa438, 0xf0ac, 0xa438, 0xf6f0, 0xa438, 0xad00,
24666         0xa438, 0xf0ac, 0xa438, 0xfef0, 0xa438, 0xacfc, 0xa438, 0xf0ac,
24667         0xa438, 0xf4f0, 0xa438, 0xacf2, 0xa438, 0xf0ac, 0xa438, 0xf0f0,
24668         0xa438, 0xacb0, 0xa438, 0xf0ac, 0xa438, 0xaef0, 0xa438, 0xacac,
24669         0xa438, 0xf0ac, 0xa438, 0xaaf0, 0xa438, 0xacee, 0xa438, 0xf0b0,
24670         0xa438, 0x24f0, 0xa438, 0xb0a4, 0xa438, 0xf0b1, 0xa438, 0x24f0,
24671         0xa438, 0xb1a4, 0xa438, 0xee8f, 0xa438, 0xb800, 0xa438, 0xd400,
24672         0xa438, 0x00af, 0xa438, 0x3976, 0xa438, 0x66ac, 0xa438, 0xeabb,
24673         0xa438, 0xa430, 0xa438, 0x6e50, 0xa438, 0x6e53, 0xa438, 0x6e56,
24674         0xa438, 0x6e59, 0xa438, 0x6e5c, 0xa438, 0x6e5f, 0xa438, 0x6e62,
24675         0xa438, 0x6e65, 0xa438, 0xd9ac, 0xa438, 0x70f0, 0xa438, 0xac6a,
24676         0xa436, 0xb85e, 0xa438, 0x23b7, 0xa436, 0xb860, 0xa438, 0x74db,
24677         0xa436, 0xb862, 0xa438, 0x268c, 0xa436, 0xb864, 0xa438, 0x3FE5,
24678         0xa436, 0xb886, 0xa438, 0x2250, 0xa436, 0xb888, 0xa438, 0x140e,
24679         0xa436, 0xb88a, 0xa438, 0x3696, 0xa436, 0xb88c, 0xa438, 0x3973,
24680         0xa436, 0xb838, 0xa438, 0x00ff, 0xb820, 0x0010, 0xa436, 0x8464,
24681         0xa438, 0xaf84, 0xa438, 0x7caf, 0xa438, 0x8485, 0xa438, 0xaf85,
24682         0xa438, 0x13af, 0xa438, 0x851e, 0xa438, 0xaf85, 0xa438, 0xb9af,
24683         0xa438, 0x8684, 0xa438, 0xaf87, 0xa438, 0x01af, 0xa438, 0x8701,
24684         0xa438, 0xac38, 0xa438, 0x03af, 0xa438, 0x38bb, 0xa438, 0xaf38,
24685         0xa438, 0xc302, 0xa438, 0x4618, 0xa438, 0xbf85, 0xa438, 0x0a02,
24686         0xa438, 0x54b7, 0xa438, 0xbf85, 0xa438, 0x1002, 0xa438, 0x54c0,
24687         0xa438, 0xd400, 0xa438, 0x0fbf, 0xa438, 0x8507, 0xa438, 0x024f,
24688         0xa438, 0x48bf, 0xa438, 0x8504, 0xa438, 0x024f, 0xa438, 0x6759,
24689         0xa438, 0xf0a1, 0xa438, 0x3008, 0xa438, 0xbf85, 0xa438, 0x0d02,
24690         0xa438, 0x54c0, 0xa438, 0xae06, 0xa438, 0xbf85, 0xa438, 0x0d02,
24691         0xa438, 0x54b7, 0xa438, 0xbf85, 0xa438, 0x0402, 0xa438, 0x4f67,
24692         0xa438, 0xa183, 0xa438, 0x02ae, 0xa438, 0x15a1, 0xa438, 0x8502,
24693         0xa438, 0xae10, 0xa438, 0x59f0, 0xa438, 0xa180, 0xa438, 0x16bf,
24694         0xa438, 0x8501, 0xa438, 0x024f, 0xa438, 0x67a1, 0xa438, 0x381b,
24695         0xa438, 0xae0b, 0xa438, 0xe18f, 0xa438, 0xffbf, 0xa438, 0x84fe,
24696         0xa438, 0x024f, 0xa438, 0x48ae, 0xa438, 0x17bf, 0xa438, 0x84fe,
24697         0xa438, 0x0254, 0xa438, 0xb7bf, 0xa438, 0x84fb, 0xa438, 0x0254,
24698         0xa438, 0xb7ae, 0xa438, 0x09a1, 0xa438, 0x5006, 0xa438, 0xbf84,
24699         0xa438, 0xfb02, 0xa438, 0x54c0, 0xa438, 0xaf04, 0xa438, 0x4700,
24700         0xa438, 0xad34, 0xa438, 0xfdad, 0xa438, 0x0670, 0xa438, 0xae14,
24701         0xa438, 0xf0a6, 0xa438, 0x00b8, 0xa438, 0xbd32, 0xa438, 0x30bd,
24702         0xa438, 0x30aa, 0xa438, 0xbd2c, 0xa438, 0xccbd, 0xa438, 0x2ca1,
24703         0xa438, 0x0705, 0xa438, 0xec80, 0xa438, 0xaf40, 0xa438, 0xf7af,
24704         0xa438, 0x40f5, 0xa438, 0xd101, 0xa438, 0xbf85, 0xa438, 0xa402,
24705         0xa438, 0x4f48, 0xa438, 0xbf85, 0xa438, 0xa702, 0xa438, 0x54c0,
24706         0xa438, 0xd10f, 0xa438, 0xbf85, 0xa438, 0xaa02, 0xa438, 0x4f48,
24707         0xa438, 0x024d, 0xa438, 0x6abf, 0xa438, 0x85ad, 0xa438, 0x024f,
24708         0xa438, 0x67bf, 0xa438, 0x8ff7, 0xa438, 0xddbf, 0xa438, 0x85b0,
24709         0xa438, 0x024f, 0xa438, 0x67bf, 0xa438, 0x8ff8, 0xa438, 0xddbf,
24710         0xa438, 0x85b3, 0xa438, 0x024f, 0xa438, 0x67bf, 0xa438, 0x8ff9,
24711         0xa438, 0xddbf, 0xa438, 0x85b6, 0xa438, 0x024f, 0xa438, 0x67bf,
24712         0xa438, 0x8ffa, 0xa438, 0xddd1, 0xa438, 0x00bf, 0xa438, 0x85aa,
24713         0xa438, 0x024f, 0xa438, 0x4802, 0xa438, 0x4d6a, 0xa438, 0xbf85,
24714         0xa438, 0xad02, 0xa438, 0x4f67, 0xa438, 0xbf8f, 0xa438, 0xfbdd,
24715         0xa438, 0xbf85, 0xa438, 0xb002, 0xa438, 0x4f67, 0xa438, 0xbf8f,
24716         0xa438, 0xfcdd, 0xa438, 0xbf85, 0xa438, 0xb302, 0xa438, 0x4f67,
24717         0xa438, 0xbf8f, 0xa438, 0xfddd, 0xa438, 0xbf85, 0xa438, 0xb602,
24718         0xa438, 0x4f67, 0xa438, 0xbf8f, 0xa438, 0xfedd, 0xa438, 0xbf85,
24719         0xa438, 0xa702, 0xa438, 0x54b7, 0xa438, 0xbf85, 0xa438, 0xa102,
24720         0xa438, 0x54b7, 0xa438, 0xaf3c, 0xa438, 0x2066, 0xa438, 0xb800,
24721         0xa438, 0xb8bd, 0xa438, 0x30ee, 0xa438, 0xbd2c, 0xa438, 0xb8bd,
24722         0xa438, 0x7040, 0xa438, 0xbd86, 0xa438, 0xc8bd, 0xa438, 0x8640,
24723         0xa438, 0xbd88, 0xa438, 0xc8bd, 0xa438, 0x8802, 0xa438, 0x1929,
24724         0xa438, 0xa202, 0xa438, 0x02ae, 0xa438, 0x03a2, 0xa438, 0x032e,
24725         0xa438, 0xd10f, 0xa438, 0xbf85, 0xa438, 0xaa02, 0xa438, 0x4f48,
24726         0xa438, 0xe18f, 0xa438, 0xf7bf, 0xa438, 0x85ad, 0xa438, 0x024f,
24727         0xa438, 0x48e1, 0xa438, 0x8ff8, 0xa438, 0xbf85, 0xa438, 0xb002,
24728         0xa438, 0x4f48, 0xa438, 0xe18f, 0xa438, 0xf9bf, 0xa438, 0x85b3,
24729         0xa438, 0x024f, 0xa438, 0x48e1, 0xa438, 0x8ffa, 0xa438, 0xbf85,
24730         0xa438, 0xb602, 0xa438, 0x4f48, 0xa438, 0xae2c, 0xa438, 0xd100,
24731         0xa438, 0xbf85, 0xa438, 0xaa02, 0xa438, 0x4f48, 0xa438, 0xe18f,
24732         0xa438, 0xfbbf, 0xa438, 0x85ad, 0xa438, 0x024f, 0xa438, 0x48e1,
24733         0xa438, 0x8ffc, 0xa438, 0xbf85, 0xa438, 0xb002, 0xa438, 0x4f48,
24734         0xa438, 0xe18f, 0xa438, 0xfdbf, 0xa438, 0x85b3, 0xa438, 0x024f,
24735         0xa438, 0x48e1, 0xa438, 0x8ffe, 0xa438, 0xbf85, 0xa438, 0xb602,
24736         0xa438, 0x4f48, 0xa438, 0xbf86, 0xa438, 0x7e02, 0xa438, 0x4f67,
24737         0xa438, 0xa100, 0xa438, 0x02ae, 0xa438, 0x25a1, 0xa438, 0x041d,
24738         0xa438, 0xe18f, 0xa438, 0xf1bf, 0xa438, 0x8675, 0xa438, 0x024f,
24739         0xa438, 0x48e1, 0xa438, 0x8ff2, 0xa438, 0xbf86, 0xa438, 0x7802,
24740         0xa438, 0x4f48, 0xa438, 0xe18f, 0xa438, 0xf3bf, 0xa438, 0x867b,
24741         0xa438, 0x024f, 0xa438, 0x48ae, 0xa438, 0x29a1, 0xa438, 0x070b,
24742         0xa438, 0xae24, 0xa438, 0xbf86, 0xa438, 0x8102, 0xa438, 0x4f67,
24743         0xa438, 0xad28, 0xa438, 0x1be1, 0xa438, 0x8ff4, 0xa438, 0xbf86,
24744         0xa438, 0x7502, 0xa438, 0x4f48, 0xa438, 0xe18f, 0xa438, 0xf5bf,
24745         0xa438, 0x8678, 0xa438, 0x024f, 0xa438, 0x48e1, 0xa438, 0x8ff6,
24746         0xa438, 0xbf86, 0xa438, 0x7b02, 0xa438, 0x4f48, 0xa438, 0xaf09,
24747         0xa438, 0x8420, 0xa438, 0xbc32, 0xa438, 0x20bc, 0xa438, 0x3e76,
24748         0xa438, 0xbc08, 0xa438, 0xfda6, 0xa438, 0x1a00, 0xa438, 0xb64e,
24749         0xa438, 0xd101, 0xa438, 0xbf85, 0xa438, 0xa402, 0xa438, 0x4f48,
24750         0xa438, 0xbf85, 0xa438, 0xa702, 0xa438, 0x54c0, 0xa438, 0xd10f,
24751         0xa438, 0xbf85, 0xa438, 0xaa02, 0xa438, 0x4f48, 0xa438, 0x024d,
24752         0xa438, 0x6abf, 0xa438, 0x85ad, 0xa438, 0x024f, 0xa438, 0x67bf,
24753         0xa438, 0x8ff7, 0xa438, 0xddbf, 0xa438, 0x85b0, 0xa438, 0x024f,
24754         0xa438, 0x67bf, 0xa438, 0x8ff8, 0xa438, 0xddbf, 0xa438, 0x85b3,
24755         0xa438, 0x024f, 0xa438, 0x67bf, 0xa438, 0x8ff9, 0xa438, 0xddbf,
24756         0xa438, 0x85b6, 0xa438, 0x024f, 0xa438, 0x67bf, 0xa438, 0x8ffa,
24757         0xa438, 0xddd1, 0xa438, 0x00bf, 0xa438, 0x85aa, 0xa438, 0x024f,
24758         0xa438, 0x4802, 0xa438, 0x4d6a, 0xa438, 0xbf85, 0xa438, 0xad02,
24759         0xa438, 0x4f67, 0xa438, 0xbf8f, 0xa438, 0xfbdd, 0xa438, 0xbf85,
24760         0xa438, 0xb002, 0xa438, 0x4f67, 0xa438, 0xbf8f, 0xa438, 0xfcdd,
24761         0xa438, 0xbf85, 0xa438, 0xb302, 0xa438, 0x4f67, 0xa438, 0xbf8f,
24762         0xa438, 0xfddd, 0xa438, 0xbf85, 0xa438, 0xb602, 0xa438, 0x4f67,
24763         0xa438, 0xbf8f, 0xa438, 0xfedd, 0xa438, 0xbf85, 0xa438, 0xa702,
24764         0xa438, 0x54b7, 0xa438, 0xaf00, 0xa438, 0x8800, 0xa436, 0xb818,
24765         0xa438, 0x38b8, 0xa436, 0xb81a, 0xa438, 0x0444, 0xa436, 0xb81c,
24766         0xa438, 0x40ee, 0xa436, 0xb81e, 0xa438, 0x3C1A, 0xa436, 0xb850,
24767         0xa438, 0x0981, 0xa436, 0xb852, 0xa438, 0x0085, 0xa436, 0xb878,
24768         0xa438, 0xffff, 0xa436, 0xb884, 0xa438, 0xffff, 0xa436, 0xb832,
24769         0xa438, 0x003f, 0xa436, 0x0000, 0xa438, 0x0000, 0xa436, 0xB82E,
24770         0xa438, 0x0000, 0xa436, 0x8024, 0xa438, 0x0000, 0xb820, 0x0000,
24771         0xa436, 0x801E, 0xa438, 0x0021, 0xFFFF, 0xFFFF
24772 };
24773 
24774 static const u_int16_t phy_mcu_ram_code_8125b_2[] = {
24775         0xa436, 0x8024, 0xa438, 0x3701, 0xa436, 0xB82E, 0xa438, 0x0001,
24776         0xb820, 0x0090, 0xa436, 0xA016, 0xa438, 0x0000, 0xa436, 0xA012,
24777         0xa438, 0x0000, 0xa436, 0xA014, 0xa438, 0x1800, 0xa438, 0x8010,
24778         0xa438, 0x1800, 0xa438, 0x801a, 0xa438, 0x1800, 0xa438, 0x8024,
24779         0xa438, 0x1800, 0xa438, 0x802f, 0xa438, 0x1800, 0xa438, 0x8051,
24780         0xa438, 0x1800, 0xa438, 0x8057, 0xa438, 0x1800, 0xa438, 0x8063,
24781         0xa438, 0x1800, 0xa438, 0x8068, 0xa438, 0xd093, 0xa438, 0xd1c4,
24782         0xa438, 0x1000, 0xa438, 0x135c, 0xa438, 0xd704, 0xa438, 0x5fbc,
24783         0xa438, 0xd504, 0xa438, 0xc9f1, 0xa438, 0x1800, 0xa438, 0x0fc9,
24784         0xa438, 0xbb50, 0xa438, 0xd505, 0xa438, 0xa202, 0xa438, 0xd504,
24785         0xa438, 0x8c0f, 0xa438, 0xd500, 0xa438, 0x1000, 0xa438, 0x1519,
24786         0xa438, 0x1800, 0xa438, 0x1548, 0xa438, 0x2f70, 0xa438, 0x802a,
24787         0xa438, 0x2f73, 0xa438, 0x156a, 0xa438, 0x1800, 0xa438, 0x155c,
24788         0xa438, 0xd505, 0xa438, 0xa202, 0xa438, 0xd500, 0xa438, 0x1800,
24789         0xa438, 0x1551, 0xa438, 0xc0c1, 0xa438, 0xc0c0, 0xa438, 0xd05a,
24790         0xa438, 0xd1ba, 0xa438, 0xd701, 0xa438, 0x2529, 0xa438, 0x022a,
24791         0xa438, 0xd0a7, 0xa438, 0xd1b9, 0xa438, 0xa208, 0xa438, 0x1000,
24792         0xa438, 0x080e, 0xa438, 0xd701, 0xa438, 0x408b, 0xa438, 0x1000,
24793         0xa438, 0x0a65, 0xa438, 0xf003, 0xa438, 0x1000, 0xa438, 0x0a6b,
24794         0xa438, 0xd701, 0xa438, 0x1000, 0xa438, 0x0920, 0xa438, 0x1000,
24795         0xa438, 0x0915, 0xa438, 0x1000, 0xa438, 0x0909, 0xa438, 0x228f,
24796         0xa438, 0x8038, 0xa438, 0x9801, 0xa438, 0xd71e, 0xa438, 0x5d61,
24797         0xa438, 0xd701, 0xa438, 0x1800, 0xa438, 0x022a, 0xa438, 0x2005,
24798         0xa438, 0x091a, 0xa438, 0x3bd9, 0xa438, 0x0919, 0xa438, 0x1800,
24799         0xa438, 0x0916, 0xa438, 0x1000, 0xa438, 0x14c5, 0xa438, 0xd703,
24800         0xa438, 0x3181, 0xa438, 0x8061, 0xa438, 0x60ad, 0xa438, 0x1000,
24801         0xa438, 0x135c, 0xa438, 0xd703, 0xa438, 0x5fba, 0xa438, 0x1800,
24802         0xa438, 0x0cc7, 0xa438, 0xd096, 0xa438, 0xd1a9, 0xa438, 0xd503,
24803         0xa438, 0x1800, 0xa438, 0x0c94, 0xa436, 0xA026, 0xa438, 0xffff,
24804         0xa436, 0xA024, 0xa438, 0x0c93, 0xa436, 0xA022, 0xa438, 0x0cc5,
24805         0xa436, 0xA020, 0xa438, 0x0915, 0xa436, 0xA006, 0xa438, 0x020a,
24806         0xa436, 0xA004, 0xa438, 0x155b, 0xa436, 0xA002, 0xa438, 0x1542,
24807         0xa436, 0xA000, 0xa438, 0x0fc7, 0xa436, 0xA008, 0xa438, 0x7f00,
24808         0xa436, 0xA016, 0xa438, 0x0010, 0xa436, 0xA012, 0xa438, 0x0000,
24809         0xa436, 0xA014, 0xa438, 0x1800, 0xa438, 0x8010, 0xa438, 0x1800,
24810         0xa438, 0x801d, 0xa438, 0x1800, 0xa438, 0x802c, 0xa438, 0x1800,
24811         0xa438, 0x802c, 0xa438, 0x1800, 0xa438, 0x802c, 0xa438, 0x1800,
24812         0xa438, 0x802c, 0xa438, 0x1800, 0xa438, 0x802c, 0xa438, 0x1800,
24813         0xa438, 0x802c, 0xa438, 0xd700, 0xa438, 0x6090, 0xa438, 0x60d1,
24814         0xa438, 0xc95c, 0xa438, 0xf007, 0xa438, 0x60b1, 0xa438, 0xc95a,
24815         0xa438, 0xf004, 0xa438, 0xc956, 0xa438, 0xf002, 0xa438, 0xc94e,
24816         0xa438, 0x1800, 0xa438, 0x00cd, 0xa438, 0xd700, 0xa438, 0x6090,
24817         0xa438, 0x60d1, 0xa438, 0xc95c, 0xa438, 0xf007, 0xa438, 0x60b1,
24818         0xa438, 0xc95a, 0xa438, 0xf004, 0xa438, 0xc956, 0xa438, 0xf002,
24819         0xa438, 0xc94e, 0xa438, 0x1000, 0xa438, 0x022a, 0xa438, 0x1800,
24820         0xa438, 0x0132, 0xa436, 0xA08E, 0xa438, 0xffff, 0xa436, 0xA08C,
24821         0xa438, 0xffff, 0xa436, 0xA08A, 0xa438, 0xffff, 0xa436, 0xA088,
24822         0xa438, 0xffff, 0xa436, 0xA086, 0xa438, 0xffff, 0xa436, 0xA084,
24823         0xa438, 0xffff, 0xa436, 0xA082, 0xa438, 0x012f, 0xa436, 0xA080,
24824         0xa438, 0x00cc, 0xa436, 0xA090, 0xa438, 0x0103, 0xa436, 0xA016,
24825         0xa438, 0x0020, 0xa436, 0xA012, 0xa438, 0x0000, 0xa436, 0xA014,
24826         0xa438, 0x1800, 0xa438, 0x8010, 0xa438, 0x1800, 0xa438, 0x8020,
24827         0xa438, 0x1800, 0xa438, 0x802a, 0xa438, 0x1800, 0xa438, 0x8035,
24828         0xa438, 0x1800, 0xa438, 0x803c, 0xa438, 0x1800, 0xa438, 0x803c,
24829         0xa438, 0x1800, 0xa438, 0x803c, 0xa438, 0x1800, 0xa438, 0x803c,
24830         0xa438, 0xd107, 0xa438, 0xd042, 0xa438, 0xa404, 0xa438, 0x1000,
24831         0xa438, 0x09df, 0xa438, 0xd700, 0xa438, 0x5fb4, 0xa438, 0x8280,
24832         0xa438, 0xd700, 0xa438, 0x6065, 0xa438, 0xd125, 0xa438, 0xf002,
24833         0xa438, 0xd12b, 0xa438, 0xd040, 0xa438, 0x1800, 0xa438, 0x077f,
24834         0xa438, 0x0cf0, 0xa438, 0x0c50, 0xa438, 0xd104, 0xa438, 0xd040,
24835         0xa438, 0x1000, 0xa438, 0x0aa8, 0xa438, 0xd700, 0xa438, 0x5fb4,
24836         0xa438, 0x1800, 0xa438, 0x0a2e, 0xa438, 0xcb9b, 0xa438, 0xd110,
24837         0xa438, 0xd040, 0xa438, 0x1000, 0xa438, 0x0b7b, 0xa438, 0x1000,
24838         0xa438, 0x09df, 0xa438, 0xd700, 0xa438, 0x5fb4, 0xa438, 0x1800,
24839         0xa438, 0x081b, 0xa438, 0x1000, 0xa438, 0x09df, 0xa438, 0xd704,
24840         0xa438, 0x7fb8, 0xa438, 0xa718, 0xa438, 0x1800, 0xa438, 0x074e,
24841         0xa436, 0xA10E, 0xa438, 0xffff, 0xa436, 0xA10C, 0xa438, 0xffff,
24842         0xa436, 0xA10A, 0xa438, 0xffff, 0xa436, 0xA108, 0xa438, 0xffff,
24843         0xa436, 0xA106, 0xa438, 0x074d, 0xa436, 0xA104, 0xa438, 0x0818,
24844         0xa436, 0xA102, 0xa438, 0x0a2c, 0xa436, 0xA100, 0xa438, 0x077e,
24845         0xa436, 0xA110, 0xa438, 0x000f, 0xa436, 0xb87c, 0xa438, 0x8625,
24846         0xa436, 0xb87e, 0xa438, 0xaf86, 0xa438, 0x3daf, 0xa438, 0x8689,
24847         0xa438, 0xaf88, 0xa438, 0x69af, 0xa438, 0x8887, 0xa438, 0xaf88,
24848         0xa438, 0x9caf, 0xa438, 0x889c, 0xa438, 0xaf88, 0xa438, 0x9caf,
24849         0xa438, 0x889c, 0xa438, 0xbf86, 0xa438, 0x49d7, 0xa438, 0x0040,
24850         0xa438, 0x0277, 0xa438, 0x7daf, 0xa438, 0x2727, 0xa438, 0x0000,
24851         0xa438, 0x7205, 0xa438, 0x0000, 0xa438, 0x7208, 0xa438, 0x0000,
24852         0xa438, 0x71f3, 0xa438, 0x0000, 0xa438, 0x71f6, 0xa438, 0x0000,
24853         0xa438, 0x7229, 0xa438, 0x0000, 0xa438, 0x722c, 0xa438, 0x0000,
24854         0xa438, 0x7217, 0xa438, 0x0000, 0xa438, 0x721a, 0xa438, 0x0000,
24855         0xa438, 0x721d, 0xa438, 0x0000, 0xa438, 0x7211, 0xa438, 0x0000,
24856         0xa438, 0x7220, 0xa438, 0x0000, 0xa438, 0x7214, 0xa438, 0x0000,
24857         0xa438, 0x722f, 0xa438, 0x0000, 0xa438, 0x7223, 0xa438, 0x0000,
24858         0xa438, 0x7232, 0xa438, 0x0000, 0xa438, 0x7226, 0xa438, 0xf8f9,
24859         0xa438, 0xfae0, 0xa438, 0x85b3, 0xa438, 0x3802, 0xa438, 0xad27,
24860         0xa438, 0x02ae, 0xa438, 0x03af, 0xa438, 0x8830, 0xa438, 0x1f66,
24861         0xa438, 0xef65, 0xa438, 0xbfc2, 0xa438, 0x1f1a, 0xa438, 0x96f7,
24862         0xa438, 0x05ee, 0xa438, 0xffd2, 0xa438, 0x00da, 0xa438, 0xf605,
24863         0xa438, 0xbfc2, 0xa438, 0x2f1a, 0xa438, 0x96f7, 0xa438, 0x05ee,
24864         0xa438, 0xffd2, 0xa438, 0x00db, 0xa438, 0xf605, 0xa438, 0xef02,
24865         0xa438, 0x1f11, 0xa438, 0x0d42, 0xa438, 0xbf88, 0xa438, 0x4202,
24866         0xa438, 0x6e7d, 0xa438, 0xef02, 0xa438, 0x1b03, 0xa438, 0x1f11,
24867         0xa438, 0x0d42, 0xa438, 0xbf88, 0xa438, 0x4502, 0xa438, 0x6e7d,
24868         0xa438, 0xef02, 0xa438, 0x1a03, 0xa438, 0x1f11, 0xa438, 0x0d42,
24869         0xa438, 0xbf88, 0xa438, 0x4802, 0xa438, 0x6e7d, 0xa438, 0xbfc2,
24870         0xa438, 0x3f1a, 0xa438, 0x96f7, 0xa438, 0x05ee, 0xa438, 0xffd2,
24871         0xa438, 0x00da, 0xa438, 0xf605, 0xa438, 0xbfc2, 0xa438, 0x4f1a,
24872         0xa438, 0x96f7, 0xa438, 0x05ee, 0xa438, 0xffd2, 0xa438, 0x00db,
24873         0xa438, 0xf605, 0xa438, 0xef02, 0xa438, 0x1f11, 0xa438, 0x0d42,
24874         0xa438, 0xbf88, 0xa438, 0x4b02, 0xa438, 0x6e7d, 0xa438, 0xef02,
24875         0xa438, 0x1b03, 0xa438, 0x1f11, 0xa438, 0x0d42, 0xa438, 0xbf88,
24876         0xa438, 0x4e02, 0xa438, 0x6e7d, 0xa438, 0xef02, 0xa438, 0x1a03,
24877         0xa438, 0x1f11, 0xa438, 0x0d42, 0xa438, 0xbf88, 0xa438, 0x5102,
24878         0xa438, 0x6e7d, 0xa438, 0xef56, 0xa438, 0xd020, 0xa438, 0x1f11,
24879         0xa438, 0xbf88, 0xa438, 0x5402, 0xa438, 0x6e7d, 0xa438, 0xbf88,
24880         0xa438, 0x5702, 0xa438, 0x6e7d, 0xa438, 0xbf88, 0xa438, 0x5a02,
24881         0xa438, 0x6e7d, 0xa438, 0xe185, 0xa438, 0xa0ef, 0xa438, 0x0348,
24882         0xa438, 0x0a28, 0xa438, 0x05ef, 0xa438, 0x201b, 0xa438, 0x01ad,
24883         0xa438, 0x2735, 0xa438, 0x1f44, 0xa438, 0xe085, 0xa438, 0x88e1,
24884         0xa438, 0x8589, 0xa438, 0xbf88, 0xa438, 0x5d02, 0xa438, 0x6e7d,
24885         0xa438, 0xe085, 0xa438, 0x8ee1, 0xa438, 0x858f, 0xa438, 0xbf88,
24886         0xa438, 0x6002, 0xa438, 0x6e7d, 0xa438, 0xe085, 0xa438, 0x94e1,
24887         0xa438, 0x8595, 0xa438, 0xbf88, 0xa438, 0x6302, 0xa438, 0x6e7d,
24888         0xa438, 0xe085, 0xa438, 0x9ae1, 0xa438, 0x859b, 0xa438, 0xbf88,
24889         0xa438, 0x6602, 0xa438, 0x6e7d, 0xa438, 0xaf88, 0xa438, 0x3cbf,
24890         0xa438, 0x883f, 0xa438, 0x026e, 0xa438, 0x9cad, 0xa438, 0x2835,
24891         0xa438, 0x1f44, 0xa438, 0xe08f, 0xa438, 0xf8e1, 0xa438, 0x8ff9,
24892         0xa438, 0xbf88, 0xa438, 0x5d02, 0xa438, 0x6e7d, 0xa438, 0xe08f,
24893         0xa438, 0xfae1, 0xa438, 0x8ffb, 0xa438, 0xbf88, 0xa438, 0x6002,
24894         0xa438, 0x6e7d, 0xa438, 0xe08f, 0xa438, 0xfce1, 0xa438, 0x8ffd,
24895         0xa438, 0xbf88, 0xa438, 0x6302, 0xa438, 0x6e7d, 0xa438, 0xe08f,
24896         0xa438, 0xfee1, 0xa438, 0x8fff, 0xa438, 0xbf88, 0xa438, 0x6602,
24897         0xa438, 0x6e7d, 0xa438, 0xaf88, 0xa438, 0x3ce1, 0xa438, 0x85a1,
24898         0xa438, 0x1b21, 0xa438, 0xad37, 0xa438, 0x341f, 0xa438, 0x44e0,
24899         0xa438, 0x858a, 0xa438, 0xe185, 0xa438, 0x8bbf, 0xa438, 0x885d,
24900         0xa438, 0x026e, 0xa438, 0x7de0, 0xa438, 0x8590, 0xa438, 0xe185,
24901         0xa438, 0x91bf, 0xa438, 0x8860, 0xa438, 0x026e, 0xa438, 0x7de0,
24902         0xa438, 0x8596, 0xa438, 0xe185, 0xa438, 0x97bf, 0xa438, 0x8863,
24903         0xa438, 0x026e, 0xa438, 0x7de0, 0xa438, 0x859c, 0xa438, 0xe185,
24904         0xa438, 0x9dbf, 0xa438, 0x8866, 0xa438, 0x026e, 0xa438, 0x7dae,
24905         0xa438, 0x401f, 0xa438, 0x44e0, 0xa438, 0x858c, 0xa438, 0xe185,
24906         0xa438, 0x8dbf, 0xa438, 0x885d, 0xa438, 0x026e, 0xa438, 0x7de0,
24907         0xa438, 0x8592, 0xa438, 0xe185, 0xa438, 0x93bf, 0xa438, 0x8860,
24908         0xa438, 0x026e, 0xa438, 0x7de0, 0xa438, 0x8598, 0xa438, 0xe185,
24909         0xa438, 0x99bf, 0xa438, 0x8863, 0xa438, 0x026e, 0xa438, 0x7de0,
24910         0xa438, 0x859e, 0xa438, 0xe185, 0xa438, 0x9fbf, 0xa438, 0x8866,
24911         0xa438, 0x026e, 0xa438, 0x7dae, 0xa438, 0x0ce1, 0xa438, 0x85b3,
24912         0xa438, 0x3904, 0xa438, 0xac2f, 0xa438, 0x04ee, 0xa438, 0x85b3,
24913         0xa438, 0x00af, 0xa438, 0x39d9, 0xa438, 0x22ac, 0xa438, 0xeaf0,
24914         0xa438, 0xacf6, 0xa438, 0xf0ac, 0xa438, 0xfaf0, 0xa438, 0xacf8,
24915         0xa438, 0xf0ac, 0xa438, 0xfcf0, 0xa438, 0xad00, 0xa438, 0xf0ac,
24916         0xa438, 0xfef0, 0xa438, 0xacf0, 0xa438, 0xf0ac, 0xa438, 0xf4f0,
24917         0xa438, 0xacf2, 0xa438, 0xf0ac, 0xa438, 0xb0f0, 0xa438, 0xacae,
24918         0xa438, 0xf0ac, 0xa438, 0xacf0, 0xa438, 0xacaa, 0xa438, 0xa100,
24919         0xa438, 0x0ce1, 0xa438, 0x8ff7, 0xa438, 0xbf88, 0xa438, 0x8402,
24920         0xa438, 0x6e7d, 0xa438, 0xaf26, 0xa438, 0xe9e1, 0xa438, 0x8ff6,
24921         0xa438, 0xbf88, 0xa438, 0x8402, 0xa438, 0x6e7d, 0xa438, 0xaf26,
24922         0xa438, 0xf520, 0xa438, 0xac86, 0xa438, 0xbf88, 0xa438, 0x3f02,
24923         0xa438, 0x6e9c, 0xa438, 0xad28, 0xa438, 0x03af, 0xa438, 0x3324,
24924         0xa438, 0xad38, 0xa438, 0x03af, 0xa438, 0x32e6, 0xa438, 0xaf32,
24925         0xa438, 0xfb00, 0xa436, 0xb87c, 0xa438, 0x8ff6, 0xa436, 0xb87e,
24926         0xa438, 0x0705, 0xa436, 0xb87c, 0xa438, 0x8ff8, 0xa436, 0xb87e,
24927         0xa438, 0x19cc, 0xa436, 0xb87c, 0xa438, 0x8ffa, 0xa436, 0xb87e,
24928         0xa438, 0x28e3, 0xa436, 0xb87c, 0xa438, 0x8ffc, 0xa436, 0xb87e,
24929         0xa438, 0x1047, 0xa436, 0xb87c, 0xa438, 0x8ffe, 0xa436, 0xb87e,
24930         0xa438, 0x0a45, 0xa436, 0xb85e, 0xa438, 0x271E, 0xa436, 0xb860,
24931         0xa438, 0x3846, 0xa436, 0xb862, 0xa438, 0x26E6, 0xa436, 0xb864,
24932         0xa438, 0x32E3, 0xa436, 0xb886, 0xa438, 0xffff, 0xa436, 0xb888,
24933         0xa438, 0xffff, 0xa436, 0xb88a, 0xa438, 0xffff, 0xa436, 0xb88c,
24934         0xa438, 0xffff, 0xa436, 0xb838, 0xa438, 0x000f, 0xb820, 0x0010,
24935         0xa436, 0x0000, 0xa438, 0x0000, 0xa436, 0xB82E, 0xa438, 0x0000,
24936         0xa436, 0x8024, 0xa438, 0x0000, 0xb820, 0x0000, 0xa436, 0x801E,
24937         0xa438, 0x0016, 0xFFFF, 0xFFFF
24938 };
24939 
24940 static void
24941 re_real_set_phy_mcu_8125b_1(struct re_softc *sc)
24942 {
24943         re_set_phy_mcu_ram_code(sc,
24944                                 phy_mcu_ram_code_8125b_1,
24945                                 ARRAY_SIZE(phy_mcu_ram_code_8125b_1)
24946                                );
24947 }
24948 
24949 static void
24950 re_set_phy_mcu_8125b_1(struct re_softc *sc)
24951 {
24952         re_set_phy_mcu_patch_request(sc);
24953 
24954         re_real_set_phy_mcu_8125b_1(sc);
24955 
24956         re_clear_phy_mcu_patch_request(sc);
24957 }
24958 
24959 static void
24960 re_real_set_phy_mcu_8125b_2(struct re_softc *sc)
24961 {
24962         re_set_phy_mcu_ram_code(sc,
24963                                 phy_mcu_ram_code_8125b_2,
24964                                 ARRAY_SIZE(phy_mcu_ram_code_8125b_2)
24965                                );
24966 }
24967 
24968 static void
24969 re_set_phy_mcu_8125b_2(struct re_softc *sc)
24970 {
24971         re_set_phy_mcu_patch_request(sc);
24972 
24973         re_real_set_phy_mcu_8125b_2(sc);
24974 
24975         re_clear_phy_mcu_patch_request(sc);
24976 }
24977 
24978 static void re_init_hw_phy_mcu(struct re_softc *sc)
24979 {
24980         if (re_hw_phy_mcu_code_ver_matched(sc)) return;
24981 
24982         switch (sc->re_type) {
24983         case MACFG_36:
24984                 re_set_phy_mcu_8168e_1(sc);
24985                 break;
24986         case MACFG_37:
24987                 re_set_phy_mcu_8168e_2(sc);
24988                 break;
24989         case MACFG_38:
24990                 re_set_phy_mcu_8168evl_1(sc);
24991                 break;
24992         case MACFG_39:
24993                 re_set_phy_mcu_8168evl_2(sc);
24994                 break;
24995         case MACFG_50:
24996                 re_set_phy_mcu_8168f_1(sc);
24997                 break;
24998         case MACFG_51:
24999                 re_set_phy_mcu_8168f_2(sc);
25000                 break;
25001         case MACFG_52:
25002                 re_set_phy_mcu_8411_1(sc);
25003                 break;
25004         case MACFG_56:
25005                 re_set_phy_mcu_8168g_1(sc);
25006                 break;
25007         case MACFG_59:
25008                 re_set_phy_mcu_8168gu_2(sc);
25009                 break;
25010         case MACFG_60:
25011                 re_set_phy_mcu_8411b_1(sc);
25012                 break;
25013         case MACFG_61:
25014                 re_set_phy_mcu_8168ep_1(sc);
25015                 break;
25016         case MACFG_67:
25017                 re_set_phy_mcu_8168ep_2(sc);
25018                 break;
25019         case MACFG_68:
25020                 re_set_phy_mcu_8168h_1(sc);
25021                 break;
25022         case MACFG_69:
25023                 re_set_phy_mcu_8168h_2(sc);
25024                 break;
25025         case MACFG_80:
25026                 re_set_phy_mcu_8125a_1(sc);
25027                 break;
25028         case MACFG_81:
25029                 re_set_phy_mcu_8125a_2(sc);
25030                 break;
25031         case MACFG_82:
25032                 re_set_phy_mcu_8125b_1(sc);
25033                 break;
25034         case MACFG_83:
25035                 re_set_phy_mcu_8125b_2(sc);
25036                 break;
25037         }
25038 
25039         re_write_hw_phy_mcu_code_ver(sc);
25040 
25041         MP_WritePhyUshort(sc, 0x1F, 0x0000);
25042 }
25043 
25044 static void re_set_hw_phy_before_init_phy_mcu(struct re_softc *sc)
25045 {
25046         device_t dev = sc->dev;
25047         u_int16_t PhyRegValue;
25048 
25049         switch (sc->re_type) {
25050         case MACFG_82:
25051         case MACFG_83:
25052                 MP_RealWritePhyOcpRegWord(sc, 0xBF86, 0x9000);
25053 
25054                 SetEthPhyOcpBit(sc, 0xC402, BIT_10);
25055                 ClearEthPhyOcpBit(sc, 0xC402, BIT_10);
25056 
25057                 PhyRegValue = MP_RealReadPhyOcpRegWord(sc, 0xBF86);
25058                 PhyRegValue &= (BIT_1 | BIT_0);
25059                 if (PhyRegValue != 0)
25060                         device_printf(dev, "PHY watch dog not clear, value = 0x%x \n", PhyRegValue);
25061 
25062                 MP_RealWritePhyOcpRegWord(sc, 0xBD86, 0x1010);
25063                 MP_RealWritePhyOcpRegWord(sc, 0xBD88, 0x1010);
25064 
25065                 ClearAndSetEthPhyOcpBit(sc,
25066                                         0xBD4E,
25067                                         BIT_11 | BIT_10,
25068                                         BIT_11);
25069                 ClearAndSetEthPhyOcpBit(sc,
25070                                         0xBF46,
25071                                         BIT_11 | BIT_10 | BIT_9 | BIT_8,
25072                                         BIT_10 | BIT_9 | BIT_8);
25073                 break;
25074         }
25075 }
25076 
25077 static void re_hw_phy_config(struct re_softc *sc)
25078 {
25079         u_int16_t Data, PhyRegValue, TmpUshort;
25080         u_int32_t Data_u32;
25081         u_int16_t dout_tapbin;
25082         int	i;
25083         struct ifnet *ifp = RE_GET_IFNET(sc);
25084 
25085         switch (sc->re_type) {
25086         case MACFG_59:
25087         case MACFG_60:
25088         case MACFG_62:
25089         case MACFG_67:
25090         case MACFG_68:
25091         case MACFG_69:
25092         case MACFG_70:
25093         case MACFG_71:
25094         case MACFG_72:
25095         case MACFG_80:
25096         case MACFG_81:
25097         case MACFG_82:
25098         case MACFG_83:
25099                 re_disable_ocp_phy_power_saving(sc);
25100                 break;
25101         }
25102 
25103         if (HW_DASH_SUPPORT_TYPE_3(sc) && sc->HwPkgDet == 0x06) return;
25104 
25105         re_set_hw_phy_before_init_phy_mcu(sc);
25106 
25107         if (FALSE == re_phy_ram_code_check(sc)) {
25108                 re_set_phy_ram_code_check_fail_flag(sc);
25109                 return;
25110         }
25111 
25112         re_init_hw_phy_mcu(sc);
25113 
25114         MP_WritePhyUshort(sc, 0x1F, 0x0000);
25115 
25116         if (sc->re_type == MACFG_3) {
25117                 CSR_WRITE_1(sc, 0x82, CSR_READ_1(sc, 0x82)|BIT_0);
25118                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25119                 MP_WritePhyUshort(sc, 0x0b, 0x0000);
25120 
25121                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
25122                 MP_WritePhyUshort(sc, 0x06, 0x006e);
25123                 MP_WritePhyUshort(sc, 0x08, 0x0708);
25124                 MP_WritePhyUshort(sc, 0x15, 0x4000);
25125                 MP_WritePhyUshort(sc, 0x18, 0x65c7);
25126 
25127                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
25128                 MP_WritePhyUshort(sc, 0x03, 0x00a1);
25129                 MP_WritePhyUshort(sc, 0x02, 0x0008);
25130                 MP_WritePhyUshort(sc, 0x01, 0x0120);
25131                 MP_WritePhyUshort(sc, 0x00, 0x1000);
25132                 MP_WritePhyUshort(sc, 0x04, 0x0800);
25133                 MP_WritePhyUshort(sc, 0x04, 0x0000);
25134 
25135                 MP_WritePhyUshort(sc, 0x03, 0xff41);
25136                 MP_WritePhyUshort(sc, 0x02, 0xdf60);
25137                 MP_WritePhyUshort(sc, 0x01, 0x0140);
25138                 MP_WritePhyUshort(sc, 0x00, 0x0077);
25139                 MP_WritePhyUshort(sc, 0x04, 0x7800);
25140                 MP_WritePhyUshort(sc, 0x04, 0x7000);
25141 
25142                 MP_WritePhyUshort(sc, 0x03, 0x802f);
25143                 MP_WritePhyUshort(sc, 0x02, 0x4f02);
25144                 MP_WritePhyUshort(sc, 0x01, 0x0409);
25145                 MP_WritePhyUshort(sc, 0x00, 0xf0f9);
25146                 MP_WritePhyUshort(sc, 0x04, 0x9800);
25147                 MP_WritePhyUshort(sc, 0x04, 0x9000);
25148 
25149                 MP_WritePhyUshort(sc, 0x03, 0xdf01);
25150                 MP_WritePhyUshort(sc, 0x02, 0xdf20);
25151                 MP_WritePhyUshort(sc, 0x01, 0xff95);
25152                 MP_WritePhyUshort(sc, 0x00, 0xba00);
25153                 MP_WritePhyUshort(sc, 0x04, 0xa800);
25154                 MP_WritePhyUshort(sc, 0x04, 0xa000);
25155 
25156                 MP_WritePhyUshort(sc, 0x03, 0xff41);
25157                 MP_WritePhyUshort(sc, 0x02, 0xdf20);
25158                 MP_WritePhyUshort(sc, 0x01, 0x0140);
25159                 MP_WritePhyUshort(sc, 0x00, 0x00bb);
25160                 MP_WritePhyUshort(sc, 0x04, 0xb800);
25161                 MP_WritePhyUshort(sc, 0x04, 0xb000);
25162 
25163                 MP_WritePhyUshort(sc, 0x03, 0xdf41);
25164                 MP_WritePhyUshort(sc, 0x02, 0xdc60);
25165                 MP_WritePhyUshort(sc, 0x01, 0x6340);
25166                 MP_WritePhyUshort(sc, 0x00, 0x007d);
25167                 MP_WritePhyUshort(sc, 0x04, 0xd800);
25168                 MP_WritePhyUshort(sc, 0x04, 0xd000);
25169 
25170                 MP_WritePhyUshort(sc, 0x03, 0xdf01);
25171                 MP_WritePhyUshort(sc, 0x02, 0xdf20);
25172                 MP_WritePhyUshort(sc, 0x01, 0x100a);
25173                 MP_WritePhyUshort(sc, 0x00, 0xa0ff);
25174                 MP_WritePhyUshort(sc, 0x04, 0xf800);
25175                 MP_WritePhyUshort(sc, 0x04, 0xf000);
25176 
25177                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
25178                 MP_WritePhyUshort(sc, 0x0b, 0x0000);
25179                 MP_WritePhyUshort(sc, 0x00, 0x9200);
25180 
25181                 CSR_WRITE_1(sc, 0x82, 0x0d);
25182         } else if (sc->re_type == MACFG_4) {
25183                 MP_WritePhyUshort(sc, 0x1f, 0x0002);
25184                 MP_WritePhyUshort(sc, 0x01, 0x90D0);
25185                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
25186                 // MP_WritePhyUshort(sc, 0x1e, 0x8c00); /* PHY link down with some Giga switch */
25187         } else if (sc->re_type == MACFG_5) {
25188                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
25189                 MP_WritePhyUshort(sc, 0x04, 0x0000);
25190                 MP_WritePhyUshort(sc, 0x03, 0x00a1);
25191                 MP_WritePhyUshort(sc, 0x02, 0x0008);
25192                 MP_WritePhyUshort(sc, 0x01, 0x0120);
25193                 MP_WritePhyUshort(sc, 0x00, 0x1000);
25194                 MP_WritePhyUshort(sc, 0x04, 0x0800);
25195 
25196                 MP_WritePhyUshort(sc, 0x04, 0x9000);
25197                 MP_WritePhyUshort(sc, 0x03, 0x802f);
25198                 MP_WritePhyUshort(sc, 0x02, 0x4f02);
25199                 MP_WritePhyUshort(sc, 0x01, 0x0409);
25200                 MP_WritePhyUshort(sc, 0x00, 0xf099);
25201                 MP_WritePhyUshort(sc, 0x04, 0x9800);
25202 
25203                 MP_WritePhyUshort(sc, 0x04, 0xa000);
25204                 MP_WritePhyUshort(sc, 0x03, 0xdf01);
25205                 MP_WritePhyUshort(sc, 0x02, 0xdf20);
25206                 MP_WritePhyUshort(sc, 0x01, 0xff95);
25207                 MP_WritePhyUshort(sc, 0x00, 0xba00);
25208                 MP_WritePhyUshort(sc, 0x04, 0xa800);
25209 
25210                 MP_WritePhyUshort(sc, 0x04, 0xf000);
25211                 MP_WritePhyUshort(sc, 0x03, 0xdf01);
25212                 MP_WritePhyUshort(sc, 0x02, 0xdf20);
25213                 MP_WritePhyUshort(sc, 0x01, 0x101a);
25214                 MP_WritePhyUshort(sc, 0x00, 0xa0ff);
25215                 MP_WritePhyUshort(sc, 0x04, 0xf800);
25216                 MP_WritePhyUshort(sc, 0x04, 0x0000);
25217                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
25218 
25219                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
25220                 MP_WritePhyUshort(sc, 0x10, 0xf41b);
25221                 MP_WritePhyUshort(sc, 0x14, 0xfb54);
25222                 MP_WritePhyUshort(sc, 0x18, 0xf5c7);
25223                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
25224 
25225                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
25226                 MP_WritePhyUshort(sc, 0x17, 0x0CC0);
25227                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
25228 
25229                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
25230                 MP_WritePhyUshort(sc, 0x10, 0xf01b);
25231 
25232         } else if (sc->re_type == MACFG_6) {
25233                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
25234                 MP_WritePhyUshort(sc, 0x04, 0x0000);
25235                 MP_WritePhyUshort(sc, 0x03, 0x00a1);
25236                 MP_WritePhyUshort(sc, 0x02, 0x0008);
25237                 MP_WritePhyUshort(sc, 0x01, 0x0120);
25238                 MP_WritePhyUshort(sc, 0x00, 0x1000);
25239                 MP_WritePhyUshort(sc, 0x04, 0x0800);
25240 
25241                 MP_WritePhyUshort(sc, 0x04, 0x9000);
25242                 MP_WritePhyUshort(sc, 0x03, 0x802f);
25243                 MP_WritePhyUshort(sc, 0x02, 0x4f02);
25244                 MP_WritePhyUshort(sc, 0x01, 0x0409);
25245                 MP_WritePhyUshort(sc, 0x00, 0xf099);
25246                 MP_WritePhyUshort(sc, 0x04, 0x9800);
25247 
25248                 MP_WritePhyUshort(sc, 0x04, 0xa000);
25249                 MP_WritePhyUshort(sc, 0x03, 0xdf01);
25250                 MP_WritePhyUshort(sc, 0x02, 0xdf20);
25251                 MP_WritePhyUshort(sc, 0x01, 0xff95);
25252                 MP_WritePhyUshort(sc, 0x00, 0xba00);
25253                 MP_WritePhyUshort(sc, 0x04, 0xa800);
25254 
25255                 MP_WritePhyUshort(sc, 0x04, 0xf000);
25256                 MP_WritePhyUshort(sc, 0x03, 0xdf01);
25257                 MP_WritePhyUshort(sc, 0x02, 0xdf20);
25258                 MP_WritePhyUshort(sc, 0x01, 0x101a);
25259                 MP_WritePhyUshort(sc, 0x00, 0xa0ff);
25260                 MP_WritePhyUshort(sc, 0x04, 0xf800);
25261                 MP_WritePhyUshort(sc, 0x04, 0x0000);
25262                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
25263 
25264                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
25265                 MP_WritePhyUshort(sc, 0x0b, 0x8480);
25266                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
25267 
25268                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
25269                 MP_WritePhyUshort(sc, 0x18, 0x67c7);
25270                 MP_WritePhyUshort(sc, 0x04, 0x2000);
25271                 MP_WritePhyUshort(sc, 0x03, 0x002f);
25272                 MP_WritePhyUshort(sc, 0x02, 0x4360);
25273                 MP_WritePhyUshort(sc, 0x01, 0x0109);
25274                 MP_WritePhyUshort(sc, 0x00, 0x3022);
25275                 MP_WritePhyUshort(sc, 0x04, 0x2800);
25276                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
25277 
25278                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
25279                 MP_WritePhyUshort(sc, 0x17, 0x0CC0);
25280         } else if (sc->re_type == MACFG_14) {
25281                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
25282                 MP_WritePhyUshort(sc, 0x11, MP_ReadPhyUshort(sc, 0x11) | 0x1000);
25283                 MP_WritePhyUshort(sc, 0x19, MP_ReadPhyUshort(sc, 0x19) | 0x2000);
25284                 MP_WritePhyUshort(sc, 0x10, MP_ReadPhyUshort(sc, 0x10) | 0x8000);
25285 
25286                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
25287                 MP_WritePhyUshort(sc, 0x08, 0x441D);
25288                 MP_WritePhyUshort(sc, 0x01, 0x9100);
25289         } else if (sc->re_type == MACFG_15) {
25290                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
25291                 MP_WritePhyUshort(sc, 0x11, MP_ReadPhyUshort(sc, 0x11) | 0x1000);
25292                 MP_WritePhyUshort(sc, 0x19, MP_ReadPhyUshort(sc, 0x19) | 0x2000);
25293                 MP_WritePhyUshort(sc, 0x10, MP_ReadPhyUshort(sc, 0x10) | 0x8000);
25294 
25295                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
25296                 MP_WritePhyUshort(sc, 0x08, 0x441D);
25297                 MP_WritePhyUshort(sc, 0x01, 0x9100);
25298         } else if (sc->re_type == MACFG_17) {
25299                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
25300                 MP_WritePhyUshort(sc, 0x11, MP_ReadPhyUshort(sc, 0x11) | 0x1000);
25301                 MP_WritePhyUshort(sc, 0x19, MP_ReadPhyUshort(sc, 0x19) | 0x2000);
25302                 MP_WritePhyUshort(sc, 0x10, MP_ReadPhyUshort(sc, 0x10) | 0x8000);
25303 
25304                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
25305                 MP_WritePhyUshort(sc, 0x08, 0x441D);
25306 
25307                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
25308         } else if (sc->re_type == MACFG_21) {
25309                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
25310                 MP_WritePhyUshort(sc, 0x0B, 0x94B0);
25311 
25312                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
25313                 MP_WritePhyUshort(sc, 0x12, 0x6096);
25314                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25315         } else if (sc->re_type == MACFG_22) {
25316                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
25317                 MP_WritePhyUshort(sc, 0x0B, 0x94B0);
25318 
25319                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
25320                 MP_WritePhyUshort(sc, 0x12, 0x6096);
25321         } else if (sc->re_type == MACFG_23) {
25322                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
25323                 MP_WritePhyUshort(sc, 0x0B, 0x94B0);
25324 
25325                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
25326                 MP_WritePhyUshort(sc, 0x12, 0x6096);
25327         } else if (sc->re_type == MACFG_24) {
25328                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
25329                 MP_WritePhyUshort(sc, 0x12, 0x2300);
25330                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25331                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
25332                 MP_WritePhyUshort(sc, 0x16, 0x000A);
25333                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25334 
25335                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
25336                 MP_WritePhyUshort(sc, 0x12, 0xC096);
25337                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25338 
25339                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
25340                 MP_WritePhyUshort(sc, 0x00, 0x88DE);
25341                 MP_WritePhyUshort(sc, 0x01, 0x82B1);
25342                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25343 
25344                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
25345                 MP_WritePhyUshort(sc, 0x08, 0x9E30);
25346                 MP_WritePhyUshort(sc, 0x09, 0x01F0);
25347                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25348 
25349                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
25350                 MP_WritePhyUshort(sc, 0x0A, 0x5500);
25351                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25352 
25353                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
25354                 MP_WritePhyUshort(sc, 0x03, 0x7002);
25355                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25356 
25357                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25358                 MP_WritePhyUshort(sc, 0x14, MP_ReadPhyUshort(sc, 0x14) | BIT_5);
25359                 MP_WritePhyUshort(sc, 0x0d, MP_ReadPhyUshort(sc, 0x0d) | BIT_5);
25360         } else if (sc->re_type == MACFG_25) {
25361                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
25362                 MP_WritePhyUshort(sc, 0x12, 0x2300);
25363                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
25364                 MP_WritePhyUshort(sc, 0x16, 0x0F0A);
25365                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25366 
25367                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
25368                 MP_WritePhyUshort(sc, 0x00, 0x88DE);
25369                 MP_WritePhyUshort(sc, 0x01, 0x82B1);
25370                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25371 
25372                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
25373                 MP_WritePhyUshort(sc, 0x0C, 0x7EB8);
25374                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25375 
25376                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
25377                 MP_WritePhyUshort(sc, 0x06, 0x0761);
25378                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25379 
25380                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
25381                 MP_WritePhyUshort(sc, 0x03, 0x802F);
25382                 MP_WritePhyUshort(sc, 0x02, 0x4F02);
25383                 MP_WritePhyUshort(sc, 0x01, 0x0409);
25384                 MP_WritePhyUshort(sc, 0x00, 0xF099);
25385                 MP_WritePhyUshort(sc, 0x04, 0x9800);
25386                 MP_WritePhyUshort(sc, 0x04, 0x9000);
25387                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25388 
25389                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25390                 MP_WritePhyUshort(sc, 0x16, MP_ReadPhyUshort(sc, 0x16) | BIT_0);
25391 
25392                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25393                 MP_WritePhyUshort(sc, 0x14, MP_ReadPhyUshort(sc, 0x14) | BIT_5);
25394                 MP_WritePhyUshort(sc, 0x0D, MP_ReadPhyUshort(sc, 0x0D) & ~BIT_5);
25395 
25396                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
25397                 MP_WritePhyUshort(sc, 0x1D, 0x3D98);
25398                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25399 
25400                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
25401                 MP_WritePhyUshort(sc, 0x17, 0x0CC0);
25402                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25403         } else if (sc->re_type == MACFG_26) {
25404                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
25405                 MP_WritePhyUshort(sc, 0x12, 0x2300);
25406                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
25407                 MP_WritePhyUshort(sc, 0x16, 0x0F0A);
25408                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25409 
25410                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
25411                 MP_WritePhyUshort(sc, 0x00, 0x88DE);
25412                 MP_WritePhyUshort(sc, 0x01, 0x82B1);
25413                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25414 
25415                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
25416                 MP_WritePhyUshort(sc, 0x0C, 0x7EB8);
25417                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25418 
25419                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
25420                 MP_WritePhyUshort(sc, 0x06, 0x5461);
25421                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25422 
25423                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
25424                 MP_WritePhyUshort(sc, 0x06, 0x5461);
25425                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25426 
25427                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25428                 MP_WritePhyUshort(sc, 0x16, MP_ReadPhyUshort(sc, 0x16) | BIT_0);
25429 
25430                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25431                 MP_WritePhyUshort(sc, 0x14, MP_ReadPhyUshort(sc, 0x14) | BIT_5);
25432                 MP_WritePhyUshort(sc, 0x0D, MP_ReadPhyUshort(sc, 0x0D) & ~BIT_5);
25433 
25434                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
25435                 MP_WritePhyUshort(sc, 0x1D, 0x3D98);
25436                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25437 
25438                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
25439                 MP_WritePhyUshort(sc, 0x17, 0x0CC0);
25440                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25441         } else if (sc->re_type == MACFG_27) {
25442                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25443                 MP_WritePhyUshort(sc, 0x0d, MP_ReadPhyUshort(sc, 0x0d) | BIT_5);
25444                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25445 
25446                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
25447                 MP_WritePhyUshort(sc, 0x1D, 0x3D98);
25448                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25449 
25450                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
25451                 MP_WritePhyUshort(sc, 0x14, 0xCAA3);
25452                 MP_WritePhyUshort(sc, 0x1C, 0x000A);
25453                 MP_WritePhyUshort(sc, 0x18, 0x65D0);
25454 
25455                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
25456                 MP_WritePhyUshort(sc, 0x17, 0xB580);
25457                 MP_WritePhyUshort(sc, 0x18, 0xFF54);
25458                 MP_WritePhyUshort(sc, 0x19, 0x3954);
25459 
25460                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
25461                 MP_WritePhyUshort(sc, 0x0D, 0x310C);
25462                 MP_WritePhyUshort(sc, 0x0E, 0x310C);
25463                 MP_WritePhyUshort(sc, 0x0F, 0x311C);
25464                 MP_WritePhyUshort(sc, 0x06, 0x0761);
25465 
25466                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
25467                 MP_WritePhyUshort(sc, 0x18, 0xFF55);
25468                 MP_WritePhyUshort(sc, 0x19, 0x3955);
25469                 MP_WritePhyUshort(sc, 0x18, 0xFF54);
25470                 MP_WritePhyUshort(sc, 0x19, 0x3954);
25471 
25472                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
25473                 MP_WritePhyUshort(sc, 0x17, 0x0CC0);
25474         } else if (sc->re_type == MACFG_28) {
25475                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25476                 MP_WritePhyUshort(sc, 0x14, MP_ReadPhyUshort(sc, 0x14) | BIT_5);
25477                 MP_WritePhyUshort(sc, 0x0d, MP_ReadPhyUshort(sc, 0x0d) | BIT_5);
25478 
25479                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
25480                 MP_WritePhyUshort(sc, 0x14, 0xCAA3);
25481                 MP_WritePhyUshort(sc, 0x1C, 0x000A);
25482                 MP_WritePhyUshort(sc, 0x18, 0x65D0);
25483 
25484                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
25485                 MP_WritePhyUshort(sc, 0x17, 0xB580);
25486                 MP_WritePhyUshort(sc, 0x18, 0xFF54);
25487                 MP_WritePhyUshort(sc, 0x19, 0x3954);
25488 
25489                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
25490                 MP_WritePhyUshort(sc, 0x0D, 0x310C);
25491                 MP_WritePhyUshort(sc, 0x0E, 0x310C);
25492                 MP_WritePhyUshort(sc, 0x0F, 0x311C);
25493                 MP_WritePhyUshort(sc, 0x06, 0x0761);
25494 
25495                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
25496                 MP_WritePhyUshort(sc, 0x18, 0xFF55);
25497                 MP_WritePhyUshort(sc, 0x19, 0x3955);
25498                 MP_WritePhyUshort(sc, 0x18, 0xFF54);
25499                 MP_WritePhyUshort(sc, 0x19, 0x3954);
25500 
25501                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
25502                 MP_WritePhyUshort(sc, 0x17, 0x0CC0);
25503 
25504                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25505                 MP_WritePhyUshort(sc, 0x16, MP_ReadPhyUshort(sc, 0x16) | BIT_0);
25506                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25507         } else if (sc->re_type == MACFG_31) {
25508                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
25509                 MP_WritePhyUshort(sc, 0x06, 0x4064);
25510                 MP_WritePhyUshort(sc, 0x07, 0x2863);
25511                 MP_WritePhyUshort(sc, 0x08, 0x059C);
25512                 MP_WritePhyUshort(sc, 0x09, 0x26B4);
25513                 MP_WritePhyUshort(sc, 0x0A, 0x6A19);
25514                 MP_WritePhyUshort(sc, 0x0B, 0xDCC8);
25515                 MP_WritePhyUshort(sc, 0x10, 0xF06D);
25516                 MP_WritePhyUshort(sc, 0x14, 0x7F68);
25517                 MP_WritePhyUshort(sc, 0x18, 0x7FD9);
25518                 MP_WritePhyUshort(sc, 0x1C, 0xF0FF);
25519                 MP_WritePhyUshort(sc, 0x1D, 0x3D9C);
25520                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
25521                 MP_WritePhyUshort(sc, 0x12, 0xF49F);
25522                 MP_WritePhyUshort(sc, 0x13, 0x070B);
25523                 MP_WritePhyUshort(sc, 0x1A, 0x05AD);
25524                 MP_WritePhyUshort(sc, 0x14, 0x94C0);
25525 
25526                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
25527                 Data = MP_ReadPhyUshort(sc, 0x0B) & 0xFF00;
25528                 Data |= 0x10;
25529                 MP_WritePhyUshort(sc, 0x0B, Data);
25530                 Data = MP_ReadPhyUshort(sc, 0x0C) & 0x00FF;
25531                 Data |= 0xA200;
25532                 MP_WritePhyUshort(sc, 0x0C, Data);
25533 
25534                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
25535                 MP_WritePhyUshort(sc, 0x06, 0x5561);
25536                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
25537                 MP_WritePhyUshort(sc, 0x05, 0x8332);
25538                 MP_WritePhyUshort(sc, 0x06, 0x5561);
25539 
25540                 if (MP_ReadEfuse(sc, 0x01) == 0xb1) {
25541                         MP_WritePhyUshort(sc, 0x1F, 0x0002);
25542                         MP_WritePhyUshort(sc, 0x05, 0x669A);
25543                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
25544                         MP_WritePhyUshort(sc, 0x05, 0x8330);
25545                         MP_WritePhyUshort(sc, 0x06, 0x669A);
25546 
25547                         MP_WritePhyUshort(sc, 0x1F, 0x0002);
25548                         Data = MP_ReadPhyUshort(sc, 0x0D);
25549                         if ((Data & 0x00FF) != 0x006C) {
25550                                 Data &= 0xFF00;
25551                                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
25552                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0065);
25553                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0066);
25554                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0067);
25555                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0068);
25556                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0069);
25557                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x006A);
25558                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x006B);
25559                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x006C);
25560                         }
25561                 } else {
25562                         MP_WritePhyUshort(sc, 0x1F, 0x0002);
25563                         MP_WritePhyUshort(sc, 0x05, 0x6662);
25564                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
25565                         MP_WritePhyUshort(sc, 0x05, 0x8330);
25566                         MP_WritePhyUshort(sc, 0x06, 0x6662);
25567                 }
25568 
25569                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
25570                 Data = MP_ReadPhyUshort(sc, 0x0D);
25571                 Data |= 0x300;
25572                 MP_WritePhyUshort(sc, 0x0D, Data);
25573                 Data = MP_ReadPhyUshort(sc, 0x0F);
25574                 Data |= 0x10;
25575                 MP_WritePhyUshort(sc, 0x0F, Data);
25576 
25577                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
25578                 Data = MP_ReadPhyUshort(sc, 0x02);
25579                 Data &= ~0x600;
25580                 Data |= 0x100;
25581                 MP_WritePhyUshort(sc, 0x02, Data);
25582                 Data = MP_ReadPhyUshort(sc, 0x03);
25583                 Data &= ~0xE000;
25584                 MP_WritePhyUshort(sc, 0x03, Data);
25585 
25586                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
25587                 MP_WritePhyUshort(sc, 0x17, 0x0CC0);
25588 
25589                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
25590                 MP_WritePhyUshort(sc, 0x05, 0x001B);
25591                 if (MP_ReadPhyUshort(sc, 0x06) == 0xBF00) {
25592                         MP_WritePhyUshort(sc, 0x1f, 0x0005);
25593                         MP_WritePhyUshort(sc, 0x05, 0xfff6);
25594                         MP_WritePhyUshort(sc, 0x06, 0x0080);
25595                         MP_WritePhyUshort(sc, 0x05, 0x8000);
25596                         MP_WritePhyUshort(sc, 0x06, 0xf8f9);
25597                         MP_WritePhyUshort(sc, 0x06, 0xfaef);
25598                         MP_WritePhyUshort(sc, 0x06, 0x59ee);
25599                         MP_WritePhyUshort(sc, 0x06, 0xf8ea);
25600                         MP_WritePhyUshort(sc, 0x06, 0x00ee);
25601                         MP_WritePhyUshort(sc, 0x06, 0xf8eb);
25602                         MP_WritePhyUshort(sc, 0x06, 0x00e0);
25603                         MP_WritePhyUshort(sc, 0x06, 0xf87c);
25604                         MP_WritePhyUshort(sc, 0x06, 0xe1f8);
25605                         MP_WritePhyUshort(sc, 0x06, 0x7d59);
25606                         MP_WritePhyUshort(sc, 0x06, 0x0fef);
25607                         MP_WritePhyUshort(sc, 0x06, 0x0139);
25608                         MP_WritePhyUshort(sc, 0x06, 0x029e);
25609                         MP_WritePhyUshort(sc, 0x06, 0x06ef);
25610                         MP_WritePhyUshort(sc, 0x06, 0x1039);
25611                         MP_WritePhyUshort(sc, 0x06, 0x089f);
25612                         MP_WritePhyUshort(sc, 0x06, 0x2aee);
25613                         MP_WritePhyUshort(sc, 0x06, 0xf8ea);
25614                         MP_WritePhyUshort(sc, 0x06, 0x00ee);
25615                         MP_WritePhyUshort(sc, 0x06, 0xf8eb);
25616                         MP_WritePhyUshort(sc, 0x06, 0x01e0);
25617                         MP_WritePhyUshort(sc, 0x06, 0xf87c);
25618                         MP_WritePhyUshort(sc, 0x06, 0xe1f8);
25619                         MP_WritePhyUshort(sc, 0x06, 0x7d58);
25620                         MP_WritePhyUshort(sc, 0x06, 0x409e);
25621                         MP_WritePhyUshort(sc, 0x06, 0x0f39);
25622                         MP_WritePhyUshort(sc, 0x06, 0x46aa);
25623                         MP_WritePhyUshort(sc, 0x06, 0x0bbf);
25624                         MP_WritePhyUshort(sc, 0x06, 0x8290);
25625                         MP_WritePhyUshort(sc, 0x06, 0xd682);
25626                         MP_WritePhyUshort(sc, 0x06, 0x9802);
25627                         MP_WritePhyUshort(sc, 0x06, 0x014f);
25628                         MP_WritePhyUshort(sc, 0x06, 0xae09);
25629                         MP_WritePhyUshort(sc, 0x06, 0xbf82);
25630                         MP_WritePhyUshort(sc, 0x06, 0x98d6);
25631                         MP_WritePhyUshort(sc, 0x06, 0x82a0);
25632                         MP_WritePhyUshort(sc, 0x06, 0x0201);
25633                         MP_WritePhyUshort(sc, 0x06, 0x4fef);
25634                         MP_WritePhyUshort(sc, 0x06, 0x95fe);
25635                         MP_WritePhyUshort(sc, 0x06, 0xfdfc);
25636                         MP_WritePhyUshort(sc, 0x06, 0x05f8);
25637                         MP_WritePhyUshort(sc, 0x06, 0xf9fa);
25638                         MP_WritePhyUshort(sc, 0x06, 0xeef8);
25639                         MP_WritePhyUshort(sc, 0x06, 0xea00);
25640                         MP_WritePhyUshort(sc, 0x06, 0xeef8);
25641                         MP_WritePhyUshort(sc, 0x06, 0xeb00);
25642                         MP_WritePhyUshort(sc, 0x06, 0xe2f8);
25643                         MP_WritePhyUshort(sc, 0x06, 0x7ce3);
25644                         MP_WritePhyUshort(sc, 0x06, 0xf87d);
25645                         MP_WritePhyUshort(sc, 0x06, 0xa511);
25646                         MP_WritePhyUshort(sc, 0x06, 0x1112);
25647                         MP_WritePhyUshort(sc, 0x06, 0xd240);
25648                         MP_WritePhyUshort(sc, 0x06, 0xd644);
25649                         MP_WritePhyUshort(sc, 0x06, 0x4402);
25650                         MP_WritePhyUshort(sc, 0x06, 0x8217);
25651                         MP_WritePhyUshort(sc, 0x06, 0xd2a0);
25652                         MP_WritePhyUshort(sc, 0x06, 0xd6aa);
25653                         MP_WritePhyUshort(sc, 0x06, 0xaa02);
25654                         MP_WritePhyUshort(sc, 0x06, 0x8217);
25655                         MP_WritePhyUshort(sc, 0x06, 0xae0f);
25656                         MP_WritePhyUshort(sc, 0x06, 0xa544);
25657                         MP_WritePhyUshort(sc, 0x06, 0x4402);
25658                         MP_WritePhyUshort(sc, 0x06, 0xae4d);
25659                         MP_WritePhyUshort(sc, 0x06, 0xa5aa);
25660                         MP_WritePhyUshort(sc, 0x06, 0xaa02);
25661                         MP_WritePhyUshort(sc, 0x06, 0xae47);
25662                         MP_WritePhyUshort(sc, 0x06, 0xaf82);
25663                         MP_WritePhyUshort(sc, 0x06, 0x13ee);
25664                         MP_WritePhyUshort(sc, 0x06, 0x834e);
25665                         MP_WritePhyUshort(sc, 0x06, 0x00ee);
25666                         MP_WritePhyUshort(sc, 0x06, 0x834d);
25667                         MP_WritePhyUshort(sc, 0x06, 0x0fee);
25668                         MP_WritePhyUshort(sc, 0x06, 0x834c);
25669                         MP_WritePhyUshort(sc, 0x06, 0x0fee);
25670                         MP_WritePhyUshort(sc, 0x06, 0x834f);
25671                         MP_WritePhyUshort(sc, 0x06, 0x00ee);
25672                         MP_WritePhyUshort(sc, 0x06, 0x8351);
25673                         MP_WritePhyUshort(sc, 0x06, 0x00ee);
25674                         MP_WritePhyUshort(sc, 0x06, 0x834a);
25675                         MP_WritePhyUshort(sc, 0x06, 0xffee);
25676                         MP_WritePhyUshort(sc, 0x06, 0x834b);
25677                         MP_WritePhyUshort(sc, 0x06, 0xffe0);
25678                         MP_WritePhyUshort(sc, 0x06, 0x8330);
25679                         MP_WritePhyUshort(sc, 0x06, 0xe183);
25680                         MP_WritePhyUshort(sc, 0x06, 0x3158);
25681                         MP_WritePhyUshort(sc, 0x06, 0xfee4);
25682                         MP_WritePhyUshort(sc, 0x06, 0xf88a);
25683                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
25684                         MP_WritePhyUshort(sc, 0x06, 0x8be0);
25685                         MP_WritePhyUshort(sc, 0x06, 0x8332);
25686                         MP_WritePhyUshort(sc, 0x06, 0xe183);
25687                         MP_WritePhyUshort(sc, 0x06, 0x3359);
25688                         MP_WritePhyUshort(sc, 0x06, 0x0fe2);
25689                         MP_WritePhyUshort(sc, 0x06, 0x834d);
25690                         MP_WritePhyUshort(sc, 0x06, 0x0c24);
25691                         MP_WritePhyUshort(sc, 0x06, 0x5af0);
25692                         MP_WritePhyUshort(sc, 0x06, 0x1e12);
25693                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
25694                         MP_WritePhyUshort(sc, 0x06, 0x8ce5);
25695                         MP_WritePhyUshort(sc, 0x06, 0xf88d);
25696                         MP_WritePhyUshort(sc, 0x06, 0xaf82);
25697                         MP_WritePhyUshort(sc, 0x06, 0x13e0);
25698                         MP_WritePhyUshort(sc, 0x06, 0x834f);
25699                         MP_WritePhyUshort(sc, 0x06, 0x10e4);
25700                         MP_WritePhyUshort(sc, 0x06, 0x834f);
25701                         MP_WritePhyUshort(sc, 0x06, 0xe083);
25702                         MP_WritePhyUshort(sc, 0x06, 0x4e78);
25703                         MP_WritePhyUshort(sc, 0x06, 0x009f);
25704                         MP_WritePhyUshort(sc, 0x06, 0x0ae0);
25705                         MP_WritePhyUshort(sc, 0x06, 0x834f);
25706                         MP_WritePhyUshort(sc, 0x06, 0xa010);
25707                         MP_WritePhyUshort(sc, 0x06, 0xa5ee);
25708                         MP_WritePhyUshort(sc, 0x06, 0x834e);
25709                         MP_WritePhyUshort(sc, 0x06, 0x01e0);
25710                         MP_WritePhyUshort(sc, 0x06, 0x834e);
25711                         MP_WritePhyUshort(sc, 0x06, 0x7805);
25712                         MP_WritePhyUshort(sc, 0x06, 0x9e9a);
25713                         MP_WritePhyUshort(sc, 0x06, 0xe083);
25714                         MP_WritePhyUshort(sc, 0x06, 0x4e78);
25715                         MP_WritePhyUshort(sc, 0x06, 0x049e);
25716                         MP_WritePhyUshort(sc, 0x06, 0x10e0);
25717                         MP_WritePhyUshort(sc, 0x06, 0x834e);
25718                         MP_WritePhyUshort(sc, 0x06, 0x7803);
25719                         MP_WritePhyUshort(sc, 0x06, 0x9e0f);
25720                         MP_WritePhyUshort(sc, 0x06, 0xe083);
25721                         MP_WritePhyUshort(sc, 0x06, 0x4e78);
25722                         MP_WritePhyUshort(sc, 0x06, 0x019e);
25723                         MP_WritePhyUshort(sc, 0x06, 0x05ae);
25724                         MP_WritePhyUshort(sc, 0x06, 0x0caf);
25725                         MP_WritePhyUshort(sc, 0x06, 0x81f8);
25726                         MP_WritePhyUshort(sc, 0x06, 0xaf81);
25727                         MP_WritePhyUshort(sc, 0x06, 0xa3af);
25728                         MP_WritePhyUshort(sc, 0x06, 0x81dc);
25729                         MP_WritePhyUshort(sc, 0x06, 0xaf82);
25730                         MP_WritePhyUshort(sc, 0x06, 0x13ee);
25731                         MP_WritePhyUshort(sc, 0x06, 0x8348);
25732                         MP_WritePhyUshort(sc, 0x06, 0x00ee);
25733                         MP_WritePhyUshort(sc, 0x06, 0x8349);
25734                         MP_WritePhyUshort(sc, 0x06, 0x00e0);
25735                         MP_WritePhyUshort(sc, 0x06, 0x8351);
25736                         MP_WritePhyUshort(sc, 0x06, 0x10e4);
25737                         MP_WritePhyUshort(sc, 0x06, 0x8351);
25738                         MP_WritePhyUshort(sc, 0x06, 0x5801);
25739                         MP_WritePhyUshort(sc, 0x06, 0x9fea);
25740                         MP_WritePhyUshort(sc, 0x06, 0xd000);
25741                         MP_WritePhyUshort(sc, 0x06, 0xd180);
25742                         MP_WritePhyUshort(sc, 0x06, 0x1f66);
25743                         MP_WritePhyUshort(sc, 0x06, 0xe2f8);
25744                         MP_WritePhyUshort(sc, 0x06, 0xeae3);
25745                         MP_WritePhyUshort(sc, 0x06, 0xf8eb);
25746                         MP_WritePhyUshort(sc, 0x06, 0x5af8);
25747                         MP_WritePhyUshort(sc, 0x06, 0x1e20);
25748                         MP_WritePhyUshort(sc, 0x06, 0xe6f8);
25749                         MP_WritePhyUshort(sc, 0x06, 0xeae5);
25750                         MP_WritePhyUshort(sc, 0x06, 0xf8eb);
25751                         MP_WritePhyUshort(sc, 0x06, 0xd302);
25752                         MP_WritePhyUshort(sc, 0x06, 0xb3fe);
25753                         MP_WritePhyUshort(sc, 0x06, 0xe2f8);
25754                         MP_WritePhyUshort(sc, 0x06, 0x7cef);
25755                         MP_WritePhyUshort(sc, 0x06, 0x325b);
25756                         MP_WritePhyUshort(sc, 0x06, 0x80e3);
25757                         MP_WritePhyUshort(sc, 0x06, 0xf87d);
25758                         MP_WritePhyUshort(sc, 0x06, 0x9e03);
25759                         MP_WritePhyUshort(sc, 0x06, 0x7dff);
25760                         MP_WritePhyUshort(sc, 0x06, 0xff0d);
25761                         MP_WritePhyUshort(sc, 0x06, 0x581c);
25762                         MP_WritePhyUshort(sc, 0x06, 0x551a);
25763                         MP_WritePhyUshort(sc, 0x06, 0x6511);
25764                         MP_WritePhyUshort(sc, 0x06, 0xa190);
25765                         MP_WritePhyUshort(sc, 0x06, 0xd3e2);
25766                         MP_WritePhyUshort(sc, 0x06, 0x8348);
25767                         MP_WritePhyUshort(sc, 0x06, 0xe383);
25768                         MP_WritePhyUshort(sc, 0x06, 0x491b);
25769                         MP_WritePhyUshort(sc, 0x06, 0x56ab);
25770                         MP_WritePhyUshort(sc, 0x06, 0x08ef);
25771                         MP_WritePhyUshort(sc, 0x06, 0x56e6);
25772                         MP_WritePhyUshort(sc, 0x06, 0x8348);
25773                         MP_WritePhyUshort(sc, 0x06, 0xe783);
25774                         MP_WritePhyUshort(sc, 0x06, 0x4910);
25775                         MP_WritePhyUshort(sc, 0x06, 0xd180);
25776                         MP_WritePhyUshort(sc, 0x06, 0x1f66);
25777                         MP_WritePhyUshort(sc, 0x06, 0xa004);
25778                         MP_WritePhyUshort(sc, 0x06, 0xb9e2);
25779                         MP_WritePhyUshort(sc, 0x06, 0x8348);
25780                         MP_WritePhyUshort(sc, 0x06, 0xe383);
25781                         MP_WritePhyUshort(sc, 0x06, 0x49ef);
25782                         MP_WritePhyUshort(sc, 0x06, 0x65e2);
25783                         MP_WritePhyUshort(sc, 0x06, 0x834a);
25784                         MP_WritePhyUshort(sc, 0x06, 0xe383);
25785                         MP_WritePhyUshort(sc, 0x06, 0x4b1b);
25786                         MP_WritePhyUshort(sc, 0x06, 0x56aa);
25787                         MP_WritePhyUshort(sc, 0x06, 0x0eef);
25788                         MP_WritePhyUshort(sc, 0x06, 0x56e6);
25789                         MP_WritePhyUshort(sc, 0x06, 0x834a);
25790                         MP_WritePhyUshort(sc, 0x06, 0xe783);
25791                         MP_WritePhyUshort(sc, 0x06, 0x4be2);
25792                         MP_WritePhyUshort(sc, 0x06, 0x834d);
25793                         MP_WritePhyUshort(sc, 0x06, 0xe683);
25794                         MP_WritePhyUshort(sc, 0x06, 0x4ce0);
25795                         MP_WritePhyUshort(sc, 0x06, 0x834d);
25796                         MP_WritePhyUshort(sc, 0x06, 0xa000);
25797                         MP_WritePhyUshort(sc, 0x06, 0x0caf);
25798                         MP_WritePhyUshort(sc, 0x06, 0x81dc);
25799                         MP_WritePhyUshort(sc, 0x06, 0xe083);
25800                         MP_WritePhyUshort(sc, 0x06, 0x4d10);
25801                         MP_WritePhyUshort(sc, 0x06, 0xe483);
25802                         MP_WritePhyUshort(sc, 0x06, 0x4dae);
25803                         MP_WritePhyUshort(sc, 0x06, 0x0480);
25804                         MP_WritePhyUshort(sc, 0x06, 0xe483);
25805                         MP_WritePhyUshort(sc, 0x06, 0x4de0);
25806                         MP_WritePhyUshort(sc, 0x06, 0x834e);
25807                         MP_WritePhyUshort(sc, 0x06, 0x7803);
25808                         MP_WritePhyUshort(sc, 0x06, 0x9e0b);
25809                         MP_WritePhyUshort(sc, 0x06, 0xe083);
25810                         MP_WritePhyUshort(sc, 0x06, 0x4e78);
25811                         MP_WritePhyUshort(sc, 0x06, 0x049e);
25812                         MP_WritePhyUshort(sc, 0x06, 0x04ee);
25813                         MP_WritePhyUshort(sc, 0x06, 0x834e);
25814                         MP_WritePhyUshort(sc, 0x06, 0x02e0);
25815                         MP_WritePhyUshort(sc, 0x06, 0x8332);
25816                         MP_WritePhyUshort(sc, 0x06, 0xe183);
25817                         MP_WritePhyUshort(sc, 0x06, 0x3359);
25818                         MP_WritePhyUshort(sc, 0x06, 0x0fe2);
25819                         MP_WritePhyUshort(sc, 0x06, 0x834d);
25820                         MP_WritePhyUshort(sc, 0x06, 0x0c24);
25821                         MP_WritePhyUshort(sc, 0x06, 0x5af0);
25822                         MP_WritePhyUshort(sc, 0x06, 0x1e12);
25823                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
25824                         MP_WritePhyUshort(sc, 0x06, 0x8ce5);
25825                         MP_WritePhyUshort(sc, 0x06, 0xf88d);
25826                         MP_WritePhyUshort(sc, 0x06, 0xe083);
25827                         MP_WritePhyUshort(sc, 0x06, 0x30e1);
25828                         MP_WritePhyUshort(sc, 0x06, 0x8331);
25829                         MP_WritePhyUshort(sc, 0x06, 0x6801);
25830                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
25831                         MP_WritePhyUshort(sc, 0x06, 0x8ae5);
25832                         MP_WritePhyUshort(sc, 0x06, 0xf88b);
25833                         MP_WritePhyUshort(sc, 0x06, 0xae37);
25834                         MP_WritePhyUshort(sc, 0x06, 0xee83);
25835                         MP_WritePhyUshort(sc, 0x06, 0x4e03);
25836                         MP_WritePhyUshort(sc, 0x06, 0xe083);
25837                         MP_WritePhyUshort(sc, 0x06, 0x4ce1);
25838                         MP_WritePhyUshort(sc, 0x06, 0x834d);
25839                         MP_WritePhyUshort(sc, 0x06, 0x1b01);
25840                         MP_WritePhyUshort(sc, 0x06, 0x9e04);
25841                         MP_WritePhyUshort(sc, 0x06, 0xaaa1);
25842                         MP_WritePhyUshort(sc, 0x06, 0xaea8);
25843                         MP_WritePhyUshort(sc, 0x06, 0xee83);
25844                         MP_WritePhyUshort(sc, 0x06, 0x4e04);
25845                         MP_WritePhyUshort(sc, 0x06, 0xee83);
25846                         MP_WritePhyUshort(sc, 0x06, 0x4f00);
25847                         MP_WritePhyUshort(sc, 0x06, 0xaeab);
25848                         MP_WritePhyUshort(sc, 0x06, 0xe083);
25849                         MP_WritePhyUshort(sc, 0x06, 0x4f78);
25850                         MP_WritePhyUshort(sc, 0x06, 0x039f);
25851                         MP_WritePhyUshort(sc, 0x06, 0x14ee);
25852                         MP_WritePhyUshort(sc, 0x06, 0x834e);
25853                         MP_WritePhyUshort(sc, 0x06, 0x05d2);
25854                         MP_WritePhyUshort(sc, 0x06, 0x40d6);
25855                         MP_WritePhyUshort(sc, 0x06, 0x5554);
25856                         MP_WritePhyUshort(sc, 0x06, 0x0282);
25857                         MP_WritePhyUshort(sc, 0x06, 0x17d2);
25858                         MP_WritePhyUshort(sc, 0x06, 0xa0d6);
25859                         MP_WritePhyUshort(sc, 0x06, 0xba00);
25860                         MP_WritePhyUshort(sc, 0x06, 0x0282);
25861                         MP_WritePhyUshort(sc, 0x06, 0x17fe);
25862                         MP_WritePhyUshort(sc, 0x06, 0xfdfc);
25863                         MP_WritePhyUshort(sc, 0x06, 0x05f8);
25864                         MP_WritePhyUshort(sc, 0x06, 0xe0f8);
25865                         MP_WritePhyUshort(sc, 0x06, 0x60e1);
25866                         MP_WritePhyUshort(sc, 0x06, 0xf861);
25867                         MP_WritePhyUshort(sc, 0x06, 0x6802);
25868                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
25869                         MP_WritePhyUshort(sc, 0x06, 0x60e5);
25870                         MP_WritePhyUshort(sc, 0x06, 0xf861);
25871                         MP_WritePhyUshort(sc, 0x06, 0xe0f8);
25872                         MP_WritePhyUshort(sc, 0x06, 0x48e1);
25873                         MP_WritePhyUshort(sc, 0x06, 0xf849);
25874                         MP_WritePhyUshort(sc, 0x06, 0x580f);
25875                         MP_WritePhyUshort(sc, 0x06, 0x1e02);
25876                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
25877                         MP_WritePhyUshort(sc, 0x06, 0x48e5);
25878                         MP_WritePhyUshort(sc, 0x06, 0xf849);
25879                         MP_WritePhyUshort(sc, 0x06, 0xd000);
25880                         MP_WritePhyUshort(sc, 0x06, 0x0282);
25881                         MP_WritePhyUshort(sc, 0x06, 0x5bbf);
25882                         MP_WritePhyUshort(sc, 0x06, 0x8350);
25883                         MP_WritePhyUshort(sc, 0x06, 0xef46);
25884                         MP_WritePhyUshort(sc, 0x06, 0xdc19);
25885                         MP_WritePhyUshort(sc, 0x06, 0xddd0);
25886                         MP_WritePhyUshort(sc, 0x06, 0x0102);
25887                         MP_WritePhyUshort(sc, 0x06, 0x825b);
25888                         MP_WritePhyUshort(sc, 0x06, 0x0282);
25889                         MP_WritePhyUshort(sc, 0x06, 0x77e0);
25890                         MP_WritePhyUshort(sc, 0x06, 0xf860);
25891                         MP_WritePhyUshort(sc, 0x06, 0xe1f8);
25892                         MP_WritePhyUshort(sc, 0x06, 0x6158);
25893                         MP_WritePhyUshort(sc, 0x06, 0xfde4);
25894                         MP_WritePhyUshort(sc, 0x06, 0xf860);
25895                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
25896                         MP_WritePhyUshort(sc, 0x06, 0x61fc);
25897                         MP_WritePhyUshort(sc, 0x06, 0x04f9);
25898                         MP_WritePhyUshort(sc, 0x06, 0xfafb);
25899                         MP_WritePhyUshort(sc, 0x06, 0xc6bf);
25900                         MP_WritePhyUshort(sc, 0x06, 0xf840);
25901                         MP_WritePhyUshort(sc, 0x06, 0xbe83);
25902                         MP_WritePhyUshort(sc, 0x06, 0x50a0);
25903                         MP_WritePhyUshort(sc, 0x06, 0x0101);
25904                         MP_WritePhyUshort(sc, 0x06, 0x071b);
25905                         MP_WritePhyUshort(sc, 0x06, 0x89cf);
25906                         MP_WritePhyUshort(sc, 0x06, 0xd208);
25907                         MP_WritePhyUshort(sc, 0x06, 0xebdb);
25908                         MP_WritePhyUshort(sc, 0x06, 0x19b2);
25909                         MP_WritePhyUshort(sc, 0x06, 0xfbff);
25910                         MP_WritePhyUshort(sc, 0x06, 0xfefd);
25911                         MP_WritePhyUshort(sc, 0x06, 0x04f8);
25912                         MP_WritePhyUshort(sc, 0x06, 0xe0f8);
25913                         MP_WritePhyUshort(sc, 0x06, 0x48e1);
25914                         MP_WritePhyUshort(sc, 0x06, 0xf849);
25915                         MP_WritePhyUshort(sc, 0x06, 0x6808);
25916                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
25917                         MP_WritePhyUshort(sc, 0x06, 0x48e5);
25918                         MP_WritePhyUshort(sc, 0x06, 0xf849);
25919                         MP_WritePhyUshort(sc, 0x06, 0x58f7);
25920                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
25921                         MP_WritePhyUshort(sc, 0x06, 0x48e5);
25922                         MP_WritePhyUshort(sc, 0x06, 0xf849);
25923                         MP_WritePhyUshort(sc, 0x06, 0xfc04);
25924                         MP_WritePhyUshort(sc, 0x06, 0x4d20);
25925                         MP_WritePhyUshort(sc, 0x06, 0x0002);
25926                         MP_WritePhyUshort(sc, 0x06, 0x4e22);
25927                         MP_WritePhyUshort(sc, 0x06, 0x0002);
25928                         MP_WritePhyUshort(sc, 0x06, 0x4ddf);
25929                         MP_WritePhyUshort(sc, 0x06, 0xff01);
25930                         MP_WritePhyUshort(sc, 0x06, 0x4edd);
25931                         MP_WritePhyUshort(sc, 0x06, 0xff01);
25932                         MP_WritePhyUshort(sc, 0x06, 0xf8fa);
25933                         MP_WritePhyUshort(sc, 0x06, 0xfbef);
25934                         MP_WritePhyUshort(sc, 0x06, 0x79bf);
25935                         MP_WritePhyUshort(sc, 0x06, 0xf822);
25936                         MP_WritePhyUshort(sc, 0x06, 0xd819);
25937                         MP_WritePhyUshort(sc, 0x06, 0xd958);
25938                         MP_WritePhyUshort(sc, 0x06, 0x849f);
25939                         MP_WritePhyUshort(sc, 0x06, 0x09bf);
25940                         MP_WritePhyUshort(sc, 0x06, 0x82be);
25941                         MP_WritePhyUshort(sc, 0x06, 0xd682);
25942                         MP_WritePhyUshort(sc, 0x06, 0xc602);
25943                         MP_WritePhyUshort(sc, 0x06, 0x014f);
25944                         MP_WritePhyUshort(sc, 0x06, 0xef97);
25945                         MP_WritePhyUshort(sc, 0x06, 0xfffe);
25946                         MP_WritePhyUshort(sc, 0x06, 0xfc05);
25947                         MP_WritePhyUshort(sc, 0x06, 0x17ff);
25948                         MP_WritePhyUshort(sc, 0x06, 0xfe01);
25949                         MP_WritePhyUshort(sc, 0x06, 0x1700);
25950                         MP_WritePhyUshort(sc, 0x06, 0x0102);
25951                         MP_WritePhyUshort(sc, 0x05, 0x83d8);
25952                         MP_WritePhyUshort(sc, 0x06, 0x8051);
25953                         MP_WritePhyUshort(sc, 0x05, 0x83d6);
25954                         MP_WritePhyUshort(sc, 0x06, 0x82a0);
25955                         MP_WritePhyUshort(sc, 0x05, 0x83d4);
25956                         MP_WritePhyUshort(sc, 0x06, 0x8000);
25957                         MP_WritePhyUshort(sc, 0x02, 0x2010);
25958                         MP_WritePhyUshort(sc, 0x03, 0xdc00);
25959                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
25960                         MP_WritePhyUshort(sc, 0x0b, 0x0600);
25961                         MP_WritePhyUshort(sc, 0x1f, 0x0005);
25962                         MP_WritePhyUshort(sc, 0x05, 0xfff6);
25963                         MP_WritePhyUshort(sc, 0x06, 0x00fc);
25964                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
25965                 }
25966 
25967                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25968                 MP_WritePhyUshort(sc, 0x0D, 0xF880);
25969                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25970         } else if (sc->re_type == MACFG_32) {
25971                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
25972                 MP_WritePhyUshort(sc, 0x06, 0x4064);
25973                 MP_WritePhyUshort(sc, 0x07, 0x2863);
25974                 MP_WritePhyUshort(sc, 0x08, 0x059C);
25975                 MP_WritePhyUshort(sc, 0x09, 0x26B4);
25976                 MP_WritePhyUshort(sc, 0x0A, 0x6A19);
25977                 MP_WritePhyUshort(sc, 0x0B, 0xBCC0);
25978                 MP_WritePhyUshort(sc, 0x10, 0xF06D);
25979                 MP_WritePhyUshort(sc, 0x14, 0x7F68);
25980                 MP_WritePhyUshort(sc, 0x18, 0x7FD9);
25981                 MP_WritePhyUshort(sc, 0x1C, 0xF0FF);
25982                 MP_WritePhyUshort(sc, 0x1D, 0x3D9C);
25983                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
25984                 MP_WritePhyUshort(sc, 0x12, 0xF49F);
25985                 MP_WritePhyUshort(sc, 0x13, 0x070B);
25986                 MP_WritePhyUshort(sc, 0x1A, 0x05AD);
25987                 MP_WritePhyUshort(sc, 0x14, 0x94C0);
25988 
25989                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
25990                 MP_WritePhyUshort(sc, 0x06, 0x5571);
25991 
25992                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
25993                 MP_WritePhyUshort(sc, 0x05, 0x2642);
25994 
25995                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
25996                 MP_WritePhyUshort(sc, 0x02, 0xC107);
25997                 MP_WritePhyUshort(sc, 0x03, 0x1002);
25998 
25999                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
26000                 MP_WritePhyUshort(sc, 0x16, 0x0CC0);
26001 
26002                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
26003                 MP_WritePhyUshort(sc, 0x0F, 0x0017);
26004 
26005                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
26006                 MP_WritePhyUshort(sc, 0x05, 0x8200);
26007                 MP_WritePhyUshort(sc, 0x06, 0xF8F9);
26008                 MP_WritePhyUshort(sc, 0x06, 0xFAEF);
26009                 MP_WritePhyUshort(sc, 0x06, 0x59EE);
26010                 MP_WritePhyUshort(sc, 0x06, 0xF8EA);
26011                 MP_WritePhyUshort(sc, 0x06, 0x00EE);
26012                 MP_WritePhyUshort(sc, 0x06, 0xF8EB);
26013                 MP_WritePhyUshort(sc, 0x06, 0x00E0);
26014                 MP_WritePhyUshort(sc, 0x06, 0xF87C);
26015                 MP_WritePhyUshort(sc, 0x06, 0xE1F8);
26016                 MP_WritePhyUshort(sc, 0x06, 0x7D59);
26017                 MP_WritePhyUshort(sc, 0x06, 0x0FEF);
26018                 MP_WritePhyUshort(sc, 0x06, 0x0139);
26019                 MP_WritePhyUshort(sc, 0x06, 0x029E);
26020                 MP_WritePhyUshort(sc, 0x06, 0x06EF);
26021                 MP_WritePhyUshort(sc, 0x06, 0x1039);
26022                 MP_WritePhyUshort(sc, 0x06, 0x089F);
26023                 MP_WritePhyUshort(sc, 0x06, 0x2AEE);
26024                 MP_WritePhyUshort(sc, 0x06, 0xF8EA);
26025                 MP_WritePhyUshort(sc, 0x06, 0x00EE);
26026                 MP_WritePhyUshort(sc, 0x06, 0xF8EB);
26027                 MP_WritePhyUshort(sc, 0x06, 0x01E0);
26028                 MP_WritePhyUshort(sc, 0x06, 0xF87C);
26029                 MP_WritePhyUshort(sc, 0x06, 0xE1F8);
26030                 MP_WritePhyUshort(sc, 0x06, 0x7D58);
26031                 MP_WritePhyUshort(sc, 0x06, 0x409E);
26032                 MP_WritePhyUshort(sc, 0x06, 0x0F39);
26033                 MP_WritePhyUshort(sc, 0x06, 0x46AA);
26034                 MP_WritePhyUshort(sc, 0x06, 0x0BBF);
26035                 MP_WritePhyUshort(sc, 0x06, 0x8251);
26036                 MP_WritePhyUshort(sc, 0x06, 0xD682);
26037                 MP_WritePhyUshort(sc, 0x06, 0x5902);
26038                 MP_WritePhyUshort(sc, 0x06, 0x014F);
26039                 MP_WritePhyUshort(sc, 0x06, 0xAE09);
26040                 MP_WritePhyUshort(sc, 0x06, 0xBF82);
26041                 MP_WritePhyUshort(sc, 0x06, 0x59D6);
26042                 MP_WritePhyUshort(sc, 0x06, 0x8261);
26043                 MP_WritePhyUshort(sc, 0x06, 0x0201);
26044                 MP_WritePhyUshort(sc, 0x06, 0x4FEF);
26045                 MP_WritePhyUshort(sc, 0x06, 0x95FE);
26046                 MP_WritePhyUshort(sc, 0x06, 0xFDFC);
26047                 MP_WritePhyUshort(sc, 0x06, 0x054D);
26048                 MP_WritePhyUshort(sc, 0x06, 0x2000);
26049                 MP_WritePhyUshort(sc, 0x06, 0x024E);
26050                 MP_WritePhyUshort(sc, 0x06, 0x2200);
26051                 MP_WritePhyUshort(sc, 0x06, 0x024D);
26052                 MP_WritePhyUshort(sc, 0x06, 0xDFFF);
26053                 MP_WritePhyUshort(sc, 0x06, 0x014E);
26054                 MP_WritePhyUshort(sc, 0x06, 0xDDFF);
26055                 MP_WritePhyUshort(sc, 0x06, 0x0100);
26056                 MP_WritePhyUshort(sc, 0x02, 0x6010);
26057                 MP_WritePhyUshort(sc, 0x05, 0xFFF6);
26058                 MP_WritePhyUshort(sc, 0x06, 0x00EC);
26059                 MP_WritePhyUshort(sc, 0x05, 0x83D4);
26060                 MP_WritePhyUshort(sc, 0x06, 0x8200);
26061 
26062         } else if (sc->re_type == MACFG_33) {
26063                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
26064                 MP_WritePhyUshort(sc, 0x06, 0x4064);
26065                 MP_WritePhyUshort(sc, 0x07, 0x2863);
26066                 MP_WritePhyUshort(sc, 0x08, 0x059C);
26067                 MP_WritePhyUshort(sc, 0x09, 0x26B4);
26068                 MP_WritePhyUshort(sc, 0x0A, 0x6A19);
26069                 MP_WritePhyUshort(sc, 0x0B, 0xDCC8);
26070                 MP_WritePhyUshort(sc, 0x10, 0xF06D);
26071                 MP_WritePhyUshort(sc, 0x14, 0x7F68);
26072                 MP_WritePhyUshort(sc, 0x18, 0x7FD9);
26073                 MP_WritePhyUshort(sc, 0x1C, 0xF0FF);
26074                 MP_WritePhyUshort(sc, 0x1D, 0x3D9C);
26075                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
26076                 MP_WritePhyUshort(sc, 0x12, 0xF49F);
26077                 MP_WritePhyUshort(sc, 0x13, 0x070B);
26078                 MP_WritePhyUshort(sc, 0x1A, 0x05AD);
26079                 MP_WritePhyUshort(sc, 0x14, 0x94C0);
26080 
26081                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
26082                 MP_WritePhyUshort(sc, 0x06, 0x5561);
26083                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
26084                 MP_WritePhyUshort(sc, 0x05, 0x8332);
26085                 MP_WritePhyUshort(sc, 0x06, 0x5561);
26086 
26087                 if (MP_ReadEfuse(sc, 0x01) == 0xb1) {
26088                         MP_WritePhyUshort(sc, 0x1F, 0x0002);
26089                         MP_WritePhyUshort(sc, 0x05, 0x669A);
26090                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
26091                         MP_WritePhyUshort(sc, 0x05, 0x8330);
26092                         MP_WritePhyUshort(sc, 0x06, 0x669A);
26093 
26094                         MP_WritePhyUshort(sc, 0x1F, 0x0002);
26095                         Data = MP_ReadPhyUshort(sc, 0x0D);
26096                         if ((Data & 0x00FF) != 0x006C) {
26097                                 Data &= 0xFF00;
26098                                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
26099                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0065);
26100                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0066);
26101                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0067);
26102                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0068);
26103                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0069);
26104                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x006A);
26105                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x006B);
26106                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x006C);
26107                         }
26108                 } else {
26109                         MP_WritePhyUshort(sc, 0x1F, 0x0002);
26110                         MP_WritePhyUshort(sc, 0x05, 0x2642);
26111                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
26112                         MP_WritePhyUshort(sc, 0x05, 0x8330);
26113                         MP_WritePhyUshort(sc, 0x06, 0x2642);
26114                 }
26115 
26116                 if (MP_ReadEfuse(sc, 0x30) == 0x98) {
26117                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
26118                         MP_WritePhyUshort(sc, 0x11, MP_ReadPhyUshort(sc, 0x11) & ~0x02);
26119                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
26120                         MP_WritePhyUshort(sc, 0x01, MP_ReadPhyUshort(sc, 0x01) | 0x200);
26121                 } else if (MP_ReadEfuse(sc, 0x30) == 0x90) {
26122                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
26123                         MP_WritePhyUshort(sc, 0x01, MP_ReadPhyUshort(sc, 0x01) & ~0x200);
26124                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
26125                         MP_WritePhyUshort(sc, 0x16, 0x5101);
26126                 }
26127 
26128                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
26129                 Data = MP_ReadPhyUshort(sc, 0x02);
26130                 Data &= ~0x600;
26131                 Data |= 0x100;
26132                 MP_WritePhyUshort(sc, 0x02, Data);
26133                 Data = MP_ReadPhyUshort(sc, 0x03);
26134                 Data &= ~0xE000;
26135                 MP_WritePhyUshort(sc, 0x03, Data);
26136 
26137                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
26138                 MP_WritePhyUshort(sc, 0x17, 0x0CC0);
26139 
26140                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
26141                 Data = MP_ReadPhyUshort(sc, 0x0F);
26142                 Data |= 0x17;
26143                 MP_WritePhyUshort(sc, 0x0F, Data);
26144 
26145                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
26146                 MP_WritePhyUshort(sc, 0x05, 0x001B);
26147                 if (MP_ReadPhyUshort(sc, 0x06) == 0xB300) {
26148                         MP_WritePhyUshort(sc, 0x1f, 0x0005);
26149                         MP_WritePhyUshort(sc, 0x05, 0xfff6);
26150                         MP_WritePhyUshort(sc, 0x06, 0x0080);
26151                         MP_WritePhyUshort(sc, 0x05, 0x8000);
26152                         MP_WritePhyUshort(sc, 0x06, 0xf8f9);
26153                         MP_WritePhyUshort(sc, 0x06, 0xfaee);
26154                         MP_WritePhyUshort(sc, 0x06, 0xf8ea);
26155                         MP_WritePhyUshort(sc, 0x06, 0x00ee);
26156                         MP_WritePhyUshort(sc, 0x06, 0xf8eb);
26157                         MP_WritePhyUshort(sc, 0x06, 0x00e2);
26158                         MP_WritePhyUshort(sc, 0x06, 0xf87c);
26159                         MP_WritePhyUshort(sc, 0x06, 0xe3f8);
26160                         MP_WritePhyUshort(sc, 0x06, 0x7da5);
26161                         MP_WritePhyUshort(sc, 0x06, 0x1111);
26162                         MP_WritePhyUshort(sc, 0x06, 0x12d2);
26163                         MP_WritePhyUshort(sc, 0x06, 0x40d6);
26164                         MP_WritePhyUshort(sc, 0x06, 0x4444);
26165                         MP_WritePhyUshort(sc, 0x06, 0x0281);
26166                         MP_WritePhyUshort(sc, 0x06, 0xc6d2);
26167                         MP_WritePhyUshort(sc, 0x06, 0xa0d6);
26168                         MP_WritePhyUshort(sc, 0x06, 0xaaaa);
26169                         MP_WritePhyUshort(sc, 0x06, 0x0281);
26170                         MP_WritePhyUshort(sc, 0x06, 0xc6ae);
26171                         MP_WritePhyUshort(sc, 0x06, 0x0fa5);
26172                         MP_WritePhyUshort(sc, 0x06, 0x4444);
26173                         MP_WritePhyUshort(sc, 0x06, 0x02ae);
26174                         MP_WritePhyUshort(sc, 0x06, 0x4da5);
26175                         MP_WritePhyUshort(sc, 0x06, 0xaaaa);
26176                         MP_WritePhyUshort(sc, 0x06, 0x02ae);
26177                         MP_WritePhyUshort(sc, 0x06, 0x47af);
26178                         MP_WritePhyUshort(sc, 0x06, 0x81c2);
26179                         MP_WritePhyUshort(sc, 0x06, 0xee83);
26180                         MP_WritePhyUshort(sc, 0x06, 0x4e00);
26181                         MP_WritePhyUshort(sc, 0x06, 0xee83);
26182                         MP_WritePhyUshort(sc, 0x06, 0x4d0f);
26183                         MP_WritePhyUshort(sc, 0x06, 0xee83);
26184                         MP_WritePhyUshort(sc, 0x06, 0x4c0f);
26185                         MP_WritePhyUshort(sc, 0x06, 0xee83);
26186                         MP_WritePhyUshort(sc, 0x06, 0x4f00);
26187                         MP_WritePhyUshort(sc, 0x06, 0xee83);
26188                         MP_WritePhyUshort(sc, 0x06, 0x5100);
26189                         MP_WritePhyUshort(sc, 0x06, 0xee83);
26190                         MP_WritePhyUshort(sc, 0x06, 0x4aff);
26191                         MP_WritePhyUshort(sc, 0x06, 0xee83);
26192                         MP_WritePhyUshort(sc, 0x06, 0x4bff);
26193                         MP_WritePhyUshort(sc, 0x06, 0xe083);
26194                         MP_WritePhyUshort(sc, 0x06, 0x30e1);
26195                         MP_WritePhyUshort(sc, 0x06, 0x8331);
26196                         MP_WritePhyUshort(sc, 0x06, 0x58fe);
26197                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
26198                         MP_WritePhyUshort(sc, 0x06, 0x8ae5);
26199                         MP_WritePhyUshort(sc, 0x06, 0xf88b);
26200                         MP_WritePhyUshort(sc, 0x06, 0xe083);
26201                         MP_WritePhyUshort(sc, 0x06, 0x32e1);
26202                         MP_WritePhyUshort(sc, 0x06, 0x8333);
26203                         MP_WritePhyUshort(sc, 0x06, 0x590f);
26204                         MP_WritePhyUshort(sc, 0x06, 0xe283);
26205                         MP_WritePhyUshort(sc, 0x06, 0x4d0c);
26206                         MP_WritePhyUshort(sc, 0x06, 0x245a);
26207                         MP_WritePhyUshort(sc, 0x06, 0xf01e);
26208                         MP_WritePhyUshort(sc, 0x06, 0x12e4);
26209                         MP_WritePhyUshort(sc, 0x06, 0xf88c);
26210                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
26211                         MP_WritePhyUshort(sc, 0x06, 0x8daf);
26212                         MP_WritePhyUshort(sc, 0x06, 0x81c2);
26213                         MP_WritePhyUshort(sc, 0x06, 0xe083);
26214                         MP_WritePhyUshort(sc, 0x06, 0x4f10);
26215                         MP_WritePhyUshort(sc, 0x06, 0xe483);
26216                         MP_WritePhyUshort(sc, 0x06, 0x4fe0);
26217                         MP_WritePhyUshort(sc, 0x06, 0x834e);
26218                         MP_WritePhyUshort(sc, 0x06, 0x7800);
26219                         MP_WritePhyUshort(sc, 0x06, 0x9f0a);
26220                         MP_WritePhyUshort(sc, 0x06, 0xe083);
26221                         MP_WritePhyUshort(sc, 0x06, 0x4fa0);
26222                         MP_WritePhyUshort(sc, 0x06, 0x10a5);
26223                         MP_WritePhyUshort(sc, 0x06, 0xee83);
26224                         MP_WritePhyUshort(sc, 0x06, 0x4e01);
26225                         MP_WritePhyUshort(sc, 0x06, 0xe083);
26226                         MP_WritePhyUshort(sc, 0x06, 0x4e78);
26227                         MP_WritePhyUshort(sc, 0x06, 0x059e);
26228                         MP_WritePhyUshort(sc, 0x06, 0x9ae0);
26229                         MP_WritePhyUshort(sc, 0x06, 0x834e);
26230                         MP_WritePhyUshort(sc, 0x06, 0x7804);
26231                         MP_WritePhyUshort(sc, 0x06, 0x9e10);
26232                         MP_WritePhyUshort(sc, 0x06, 0xe083);
26233                         MP_WritePhyUshort(sc, 0x06, 0x4e78);
26234                         MP_WritePhyUshort(sc, 0x06, 0x039e);
26235                         MP_WritePhyUshort(sc, 0x06, 0x0fe0);
26236                         MP_WritePhyUshort(sc, 0x06, 0x834e);
26237                         MP_WritePhyUshort(sc, 0x06, 0x7801);
26238                         MP_WritePhyUshort(sc, 0x06, 0x9e05);
26239                         MP_WritePhyUshort(sc, 0x06, 0xae0c);
26240                         MP_WritePhyUshort(sc, 0x06, 0xaf81);
26241                         MP_WritePhyUshort(sc, 0x06, 0xa7af);
26242                         MP_WritePhyUshort(sc, 0x06, 0x8152);
26243                         MP_WritePhyUshort(sc, 0x06, 0xaf81);
26244                         MP_WritePhyUshort(sc, 0x06, 0x8baf);
26245                         MP_WritePhyUshort(sc, 0x06, 0x81c2);
26246                         MP_WritePhyUshort(sc, 0x06, 0xee83);
26247                         MP_WritePhyUshort(sc, 0x06, 0x4800);
26248                         MP_WritePhyUshort(sc, 0x06, 0xee83);
26249                         MP_WritePhyUshort(sc, 0x06, 0x4900);
26250                         MP_WritePhyUshort(sc, 0x06, 0xe083);
26251                         MP_WritePhyUshort(sc, 0x06, 0x5110);
26252                         MP_WritePhyUshort(sc, 0x06, 0xe483);
26253                         MP_WritePhyUshort(sc, 0x06, 0x5158);
26254                         MP_WritePhyUshort(sc, 0x06, 0x019f);
26255                         MP_WritePhyUshort(sc, 0x06, 0xead0);
26256                         MP_WritePhyUshort(sc, 0x06, 0x00d1);
26257                         MP_WritePhyUshort(sc, 0x06, 0x801f);
26258                         MP_WritePhyUshort(sc, 0x06, 0x66e2);
26259                         MP_WritePhyUshort(sc, 0x06, 0xf8ea);
26260                         MP_WritePhyUshort(sc, 0x06, 0xe3f8);
26261                         MP_WritePhyUshort(sc, 0x06, 0xeb5a);
26262                         MP_WritePhyUshort(sc, 0x06, 0xf81e);
26263                         MP_WritePhyUshort(sc, 0x06, 0x20e6);
26264                         MP_WritePhyUshort(sc, 0x06, 0xf8ea);
26265                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
26266                         MP_WritePhyUshort(sc, 0x06, 0xebd3);
26267                         MP_WritePhyUshort(sc, 0x06, 0x02b3);
26268                         MP_WritePhyUshort(sc, 0x06, 0xfee2);
26269                         MP_WritePhyUshort(sc, 0x06, 0xf87c);
26270                         MP_WritePhyUshort(sc, 0x06, 0xef32);
26271                         MP_WritePhyUshort(sc, 0x06, 0x5b80);
26272                         MP_WritePhyUshort(sc, 0x06, 0xe3f8);
26273                         MP_WritePhyUshort(sc, 0x06, 0x7d9e);
26274                         MP_WritePhyUshort(sc, 0x06, 0x037d);
26275                         MP_WritePhyUshort(sc, 0x06, 0xffff);
26276                         MP_WritePhyUshort(sc, 0x06, 0x0d58);
26277                         MP_WritePhyUshort(sc, 0x06, 0x1c55);
26278                         MP_WritePhyUshort(sc, 0x06, 0x1a65);
26279                         MP_WritePhyUshort(sc, 0x06, 0x11a1);
26280                         MP_WritePhyUshort(sc, 0x06, 0x90d3);
26281                         MP_WritePhyUshort(sc, 0x06, 0xe283);
26282                         MP_WritePhyUshort(sc, 0x06, 0x48e3);
26283                         MP_WritePhyUshort(sc, 0x06, 0x8349);
26284                         MP_WritePhyUshort(sc, 0x06, 0x1b56);
26285                         MP_WritePhyUshort(sc, 0x06, 0xab08);
26286                         MP_WritePhyUshort(sc, 0x06, 0xef56);
26287                         MP_WritePhyUshort(sc, 0x06, 0xe683);
26288                         MP_WritePhyUshort(sc, 0x06, 0x48e7);
26289                         MP_WritePhyUshort(sc, 0x06, 0x8349);
26290                         MP_WritePhyUshort(sc, 0x06, 0x10d1);
26291                         MP_WritePhyUshort(sc, 0x06, 0x801f);
26292                         MP_WritePhyUshort(sc, 0x06, 0x66a0);
26293                         MP_WritePhyUshort(sc, 0x06, 0x04b9);
26294                         MP_WritePhyUshort(sc, 0x06, 0xe283);
26295                         MP_WritePhyUshort(sc, 0x06, 0x48e3);
26296                         MP_WritePhyUshort(sc, 0x06, 0x8349);
26297                         MP_WritePhyUshort(sc, 0x06, 0xef65);
26298                         MP_WritePhyUshort(sc, 0x06, 0xe283);
26299                         MP_WritePhyUshort(sc, 0x06, 0x4ae3);
26300                         MP_WritePhyUshort(sc, 0x06, 0x834b);
26301                         MP_WritePhyUshort(sc, 0x06, 0x1b56);
26302                         MP_WritePhyUshort(sc, 0x06, 0xaa0e);
26303                         MP_WritePhyUshort(sc, 0x06, 0xef56);
26304                         MP_WritePhyUshort(sc, 0x06, 0xe683);
26305                         MP_WritePhyUshort(sc, 0x06, 0x4ae7);
26306                         MP_WritePhyUshort(sc, 0x06, 0x834b);
26307                         MP_WritePhyUshort(sc, 0x06, 0xe283);
26308                         MP_WritePhyUshort(sc, 0x06, 0x4de6);
26309                         MP_WritePhyUshort(sc, 0x06, 0x834c);
26310                         MP_WritePhyUshort(sc, 0x06, 0xe083);
26311                         MP_WritePhyUshort(sc, 0x06, 0x4da0);
26312                         MP_WritePhyUshort(sc, 0x06, 0x000c);
26313                         MP_WritePhyUshort(sc, 0x06, 0xaf81);
26314                         MP_WritePhyUshort(sc, 0x06, 0x8be0);
26315                         MP_WritePhyUshort(sc, 0x06, 0x834d);
26316                         MP_WritePhyUshort(sc, 0x06, 0x10e4);
26317                         MP_WritePhyUshort(sc, 0x06, 0x834d);
26318                         MP_WritePhyUshort(sc, 0x06, 0xae04);
26319                         MP_WritePhyUshort(sc, 0x06, 0x80e4);
26320                         MP_WritePhyUshort(sc, 0x06, 0x834d);
26321                         MP_WritePhyUshort(sc, 0x06, 0xe083);
26322                         MP_WritePhyUshort(sc, 0x06, 0x4e78);
26323                         MP_WritePhyUshort(sc, 0x06, 0x039e);
26324                         MP_WritePhyUshort(sc, 0x06, 0x0be0);
26325                         MP_WritePhyUshort(sc, 0x06, 0x834e);
26326                         MP_WritePhyUshort(sc, 0x06, 0x7804);
26327                         MP_WritePhyUshort(sc, 0x06, 0x9e04);
26328                         MP_WritePhyUshort(sc, 0x06, 0xee83);
26329                         MP_WritePhyUshort(sc, 0x06, 0x4e02);
26330                         MP_WritePhyUshort(sc, 0x06, 0xe083);
26331                         MP_WritePhyUshort(sc, 0x06, 0x32e1);
26332                         MP_WritePhyUshort(sc, 0x06, 0x8333);
26333                         MP_WritePhyUshort(sc, 0x06, 0x590f);
26334                         MP_WritePhyUshort(sc, 0x06, 0xe283);
26335                         MP_WritePhyUshort(sc, 0x06, 0x4d0c);
26336                         MP_WritePhyUshort(sc, 0x06, 0x245a);
26337                         MP_WritePhyUshort(sc, 0x06, 0xf01e);
26338                         MP_WritePhyUshort(sc, 0x06, 0x12e4);
26339                         MP_WritePhyUshort(sc, 0x06, 0xf88c);
26340                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
26341                         MP_WritePhyUshort(sc, 0x06, 0x8de0);
26342                         MP_WritePhyUshort(sc, 0x06, 0x8330);
26343                         MP_WritePhyUshort(sc, 0x06, 0xe183);
26344                         MP_WritePhyUshort(sc, 0x06, 0x3168);
26345                         MP_WritePhyUshort(sc, 0x06, 0x01e4);
26346                         MP_WritePhyUshort(sc, 0x06, 0xf88a);
26347                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
26348                         MP_WritePhyUshort(sc, 0x06, 0x8bae);
26349                         MP_WritePhyUshort(sc, 0x06, 0x37ee);
26350                         MP_WritePhyUshort(sc, 0x06, 0x834e);
26351                         MP_WritePhyUshort(sc, 0x06, 0x03e0);
26352                         MP_WritePhyUshort(sc, 0x06, 0x834c);
26353                         MP_WritePhyUshort(sc, 0x06, 0xe183);
26354                         MP_WritePhyUshort(sc, 0x06, 0x4d1b);
26355                         MP_WritePhyUshort(sc, 0x06, 0x019e);
26356                         MP_WritePhyUshort(sc, 0x06, 0x04aa);
26357                         MP_WritePhyUshort(sc, 0x06, 0xa1ae);
26358                         MP_WritePhyUshort(sc, 0x06, 0xa8ee);
26359                         MP_WritePhyUshort(sc, 0x06, 0x834e);
26360                         MP_WritePhyUshort(sc, 0x06, 0x04ee);
26361                         MP_WritePhyUshort(sc, 0x06, 0x834f);
26362                         MP_WritePhyUshort(sc, 0x06, 0x00ae);
26363                         MP_WritePhyUshort(sc, 0x06, 0xabe0);
26364                         MP_WritePhyUshort(sc, 0x06, 0x834f);
26365                         MP_WritePhyUshort(sc, 0x06, 0x7803);
26366                         MP_WritePhyUshort(sc, 0x06, 0x9f14);
26367                         MP_WritePhyUshort(sc, 0x06, 0xee83);
26368                         MP_WritePhyUshort(sc, 0x06, 0x4e05);
26369                         MP_WritePhyUshort(sc, 0x06, 0xd240);
26370                         MP_WritePhyUshort(sc, 0x06, 0xd655);
26371                         MP_WritePhyUshort(sc, 0x06, 0x5402);
26372                         MP_WritePhyUshort(sc, 0x06, 0x81c6);
26373                         MP_WritePhyUshort(sc, 0x06, 0xd2a0);
26374                         MP_WritePhyUshort(sc, 0x06, 0xd6ba);
26375                         MP_WritePhyUshort(sc, 0x06, 0x0002);
26376                         MP_WritePhyUshort(sc, 0x06, 0x81c6);
26377                         MP_WritePhyUshort(sc, 0x06, 0xfefd);
26378                         MP_WritePhyUshort(sc, 0x06, 0xfc05);
26379                         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
26380                         MP_WritePhyUshort(sc, 0x06, 0xf860);
26381                         MP_WritePhyUshort(sc, 0x06, 0xe1f8);
26382                         MP_WritePhyUshort(sc, 0x06, 0x6168);
26383                         MP_WritePhyUshort(sc, 0x06, 0x02e4);
26384                         MP_WritePhyUshort(sc, 0x06, 0xf860);
26385                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
26386                         MP_WritePhyUshort(sc, 0x06, 0x61e0);
26387                         MP_WritePhyUshort(sc, 0x06, 0xf848);
26388                         MP_WritePhyUshort(sc, 0x06, 0xe1f8);
26389                         MP_WritePhyUshort(sc, 0x06, 0x4958);
26390                         MP_WritePhyUshort(sc, 0x06, 0x0f1e);
26391                         MP_WritePhyUshort(sc, 0x06, 0x02e4);
26392                         MP_WritePhyUshort(sc, 0x06, 0xf848);
26393                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
26394                         MP_WritePhyUshort(sc, 0x06, 0x49d0);
26395                         MP_WritePhyUshort(sc, 0x06, 0x0002);
26396                         MP_WritePhyUshort(sc, 0x06, 0x820a);
26397                         MP_WritePhyUshort(sc, 0x06, 0xbf83);
26398                         MP_WritePhyUshort(sc, 0x06, 0x50ef);
26399                         MP_WritePhyUshort(sc, 0x06, 0x46dc);
26400                         MP_WritePhyUshort(sc, 0x06, 0x19dd);
26401                         MP_WritePhyUshort(sc, 0x06, 0xd001);
26402                         MP_WritePhyUshort(sc, 0x06, 0x0282);
26403                         MP_WritePhyUshort(sc, 0x06, 0x0a02);
26404                         MP_WritePhyUshort(sc, 0x06, 0x8226);
26405                         MP_WritePhyUshort(sc, 0x06, 0xe0f8);
26406                         MP_WritePhyUshort(sc, 0x06, 0x60e1);
26407                         MP_WritePhyUshort(sc, 0x06, 0xf861);
26408                         MP_WritePhyUshort(sc, 0x06, 0x58fd);
26409                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
26410                         MP_WritePhyUshort(sc, 0x06, 0x60e5);
26411                         MP_WritePhyUshort(sc, 0x06, 0xf861);
26412                         MP_WritePhyUshort(sc, 0x06, 0xfc04);
26413                         MP_WritePhyUshort(sc, 0x06, 0xf9fa);
26414                         MP_WritePhyUshort(sc, 0x06, 0xfbc6);
26415                         MP_WritePhyUshort(sc, 0x06, 0xbff8);
26416                         MP_WritePhyUshort(sc, 0x06, 0x40be);
26417                         MP_WritePhyUshort(sc, 0x06, 0x8350);
26418                         MP_WritePhyUshort(sc, 0x06, 0xa001);
26419                         MP_WritePhyUshort(sc, 0x06, 0x0107);
26420                         MP_WritePhyUshort(sc, 0x06, 0x1b89);
26421                         MP_WritePhyUshort(sc, 0x06, 0xcfd2);
26422                         MP_WritePhyUshort(sc, 0x06, 0x08eb);
26423                         MP_WritePhyUshort(sc, 0x06, 0xdb19);
26424                         MP_WritePhyUshort(sc, 0x06, 0xb2fb);
26425                         MP_WritePhyUshort(sc, 0x06, 0xfffe);
26426                         MP_WritePhyUshort(sc, 0x06, 0xfd04);
26427                         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
26428                         MP_WritePhyUshort(sc, 0x06, 0xf848);
26429                         MP_WritePhyUshort(sc, 0x06, 0xe1f8);
26430                         MP_WritePhyUshort(sc, 0x06, 0x4968);
26431                         MP_WritePhyUshort(sc, 0x06, 0x08e4);
26432                         MP_WritePhyUshort(sc, 0x06, 0xf848);
26433                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
26434                         MP_WritePhyUshort(sc, 0x06, 0x4958);
26435                         MP_WritePhyUshort(sc, 0x06, 0xf7e4);
26436                         MP_WritePhyUshort(sc, 0x06, 0xf848);
26437                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
26438                         MP_WritePhyUshort(sc, 0x06, 0x49fc);
26439                         MP_WritePhyUshort(sc, 0x06, 0x044d);
26440                         MP_WritePhyUshort(sc, 0x06, 0x2000);
26441                         MP_WritePhyUshort(sc, 0x06, 0x024e);
26442                         MP_WritePhyUshort(sc, 0x06, 0x2200);
26443                         MP_WritePhyUshort(sc, 0x06, 0x024d);
26444                         MP_WritePhyUshort(sc, 0x06, 0xdfff);
26445                         MP_WritePhyUshort(sc, 0x06, 0x014e);
26446                         MP_WritePhyUshort(sc, 0x06, 0xddff);
26447                         MP_WritePhyUshort(sc, 0x06, 0x01f8);
26448                         MP_WritePhyUshort(sc, 0x06, 0xfafb);
26449                         MP_WritePhyUshort(sc, 0x06, 0xef79);
26450                         MP_WritePhyUshort(sc, 0x06, 0xbff8);
26451                         MP_WritePhyUshort(sc, 0x06, 0x22d8);
26452                         MP_WritePhyUshort(sc, 0x06, 0x19d9);
26453                         MP_WritePhyUshort(sc, 0x06, 0x5884);
26454                         MP_WritePhyUshort(sc, 0x06, 0x9f09);
26455                         MP_WritePhyUshort(sc, 0x06, 0xbf82);
26456                         MP_WritePhyUshort(sc, 0x06, 0x6dd6);
26457                         MP_WritePhyUshort(sc, 0x06, 0x8275);
26458                         MP_WritePhyUshort(sc, 0x06, 0x0201);
26459                         MP_WritePhyUshort(sc, 0x06, 0x4fef);
26460                         MP_WritePhyUshort(sc, 0x06, 0x97ff);
26461                         MP_WritePhyUshort(sc, 0x06, 0xfefc);
26462                         MP_WritePhyUshort(sc, 0x06, 0x0517);
26463                         MP_WritePhyUshort(sc, 0x06, 0xfffe);
26464                         MP_WritePhyUshort(sc, 0x06, 0x0117);
26465                         MP_WritePhyUshort(sc, 0x06, 0x0001);
26466                         MP_WritePhyUshort(sc, 0x06, 0x0200);
26467                         MP_WritePhyUshort(sc, 0x05, 0x83d8);
26468                         MP_WritePhyUshort(sc, 0x06, 0x8000);
26469                         MP_WritePhyUshort(sc, 0x05, 0x83d6);
26470                         MP_WritePhyUshort(sc, 0x06, 0x824f);
26471                         MP_WritePhyUshort(sc, 0x02, 0x2010);
26472                         MP_WritePhyUshort(sc, 0x03, 0xdc00);
26473                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
26474                         MP_WritePhyUshort(sc, 0x0b, 0x0600);
26475                         MP_WritePhyUshort(sc, 0x1f, 0x0005);
26476                         MP_WritePhyUshort(sc, 0x05, 0xfff6);
26477                         MP_WritePhyUshort(sc, 0x06, 0x00fc);
26478                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
26479                 }
26480 
26481                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
26482                 MP_WritePhyUshort(sc, 0x0D, 0xF880);
26483                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
26484         } else if (sc->re_type == MACFG_36 || sc->re_type == MACFG_37) {
26485                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
26486                 MP_WritePhyUshort(sc, 0x1E, 0x0023);
26487                 Data = MP_ReadPhyUshort(sc, 0x17) | 0x0006;
26488                 if (sc->RequiredSecLanDonglePatch)
26489                         Data &= ~(BIT_2);
26490                 else
26491                         Data |= (BIT_2);
26492                 MP_WritePhyUshort(sc, 0x17, Data);
26493                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
26494 
26495                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
26496                 MP_WritePhyUshort(sc, 0x05, 0x8b80);
26497                 MP_WritePhyUshort(sc, 0x06, 0xc896);
26498                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
26499 
26500                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
26501                 MP_WritePhyUshort(sc, 0x0B, 0x6C20);
26502                 MP_WritePhyUshort(sc, 0x07, 0x2872);
26503                 MP_WritePhyUshort(sc, 0x1C, 0xEFFF);
26504                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
26505                 MP_WritePhyUshort(sc, 0x14, 0x6420);
26506                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
26507 
26508                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
26509                 Data = MP_ReadPhyUshort(sc, 0x08) & 0x00FF;
26510                 MP_WritePhyUshort(sc, 0x08, Data | 0x8000);
26511 
26512                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
26513                 MP_WritePhyUshort(sc, 0x1E, 0x002D);
26514                 Data = MP_ReadPhyUshort(sc, 0x18);
26515                 MP_WritePhyUshort(sc, 0x18, Data | 0x0050);
26516                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
26517                 Data = MP_ReadPhyUshort(sc, 0x14);
26518                 MP_WritePhyUshort(sc, 0x14, Data | 0x8000);
26519 
26520                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
26521                 MP_WritePhyUshort(sc, 0x00, 0x080B);
26522                 MP_WritePhyUshort(sc, 0x0B, 0x09D7);
26523                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
26524                 MP_WritePhyUshort(sc, 0x15, 0x1006);
26525 
26526                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
26527                 MP_WritePhyUshort(sc, 0x1E, 0x002F);
26528                 MP_WritePhyUshort(sc, 0x15, 0x1919);
26529                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
26530 
26531                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
26532                 MP_WritePhyUshort(sc, 0x19, 0x7F46);
26533                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
26534                 MP_WritePhyUshort(sc, 0x05, 0x8AD2);
26535                 MP_WritePhyUshort(sc, 0x06, 0x6810);
26536                 MP_WritePhyUshort(sc, 0x05, 0x8AD4);
26537                 MP_WritePhyUshort(sc, 0x06, 0x8002);
26538                 MP_WritePhyUshort(sc, 0x05, 0x8ADE);
26539                 MP_WritePhyUshort(sc, 0x06, 0x8025);
26540                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
26541         } else if (sc->re_type == MACFG_38) {
26542                 CSR_WRITE_1(sc, 0x6E, CSR_READ_1(sc, 0x6E)| (1<<6));
26543 
26544                 Data_u32 = re_eri_read(sc, 0x1D0, 4, ERIAR_ExGMAC);
26545                 Data_u32 &= ~BIT_1;
26546                 re_eri_write(sc, 0x1D0, 4, Data_u32, ERIAR_ExGMAC);
26547 
26548                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
26549                 MP_WritePhyUshort(sc, 0x05, 0x8B80);
26550                 Data = MP_ReadPhyUshort(sc, 0x06);
26551                 Data |= BIT_2 | BIT_1;
26552                 MP_WritePhyUshort(sc, 0x06, Data);
26553                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
26554 
26555                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
26556                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
26557                 MP_WritePhyUshort(sc, 0x1e, 0x002D);
26558                 Data = MP_ReadPhyUshort(sc, 0x18);
26559                 Data |= BIT_4;
26560                 MP_WritePhyUshort(sc, 0x18, Data);
26561                 MP_WritePhyUshort(sc, 0x1f, 0x0002);
26562                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
26563                 Data = MP_ReadPhyUshort(sc, 0x14);
26564                 Data |= BIT_15;
26565                 MP_WritePhyUshort(sc, 0x14, Data);
26566 
26567                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
26568                 MP_WritePhyUshort(sc, 0x05, 0x8B86);
26569                 Data = MP_ReadPhyUshort(sc, 0x06);
26570                 Data |= BIT_0;
26571                 MP_WritePhyUshort(sc, 0x06, Data);
26572                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
26573 
26574                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
26575                 MP_WritePhyUshort(sc, 0x0B, 0x6C14);
26576                 MP_WritePhyUshort(sc, 0x14, 0x7F3D);
26577                 MP_WritePhyUshort(sc, 0x1C, 0xFAFE);
26578                 MP_WritePhyUshort(sc, 0x08, 0x07C5);
26579                 MP_WritePhyUshort(sc, 0x10, 0xF090);
26580                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
26581                 MP_WritePhyUshort(sc, 0x14, 0x641A);
26582                 MP_WritePhyUshort(sc, 0x1A, 0x0606);
26583                 MP_WritePhyUshort(sc, 0x12, 0xF480);
26584                 MP_WritePhyUshort(sc, 0x13, 0x0747);
26585                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
26586 
26587                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
26588                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
26589                 MP_WritePhyUshort(sc, 0x1E, 0x0078);
26590                 MP_WritePhyUshort(sc, 0x15, 0xA408);
26591                 MP_WritePhyUshort(sc, 0x17, 0x5100);
26592                 MP_WritePhyUshort(sc, 0x19, 0x0008);
26593                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
26594                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
26595 
26596                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
26597                 MP_WritePhyUshort(sc, 0x0D, 0x0207);
26598                 MP_WritePhyUshort(sc, 0x02, 0x5FD0);
26599                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
26600 
26601                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
26602                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
26603                 MP_WritePhyUshort(sc, 0x1E, 0x00A1);
26604                 Data = MP_ReadPhyUshort(sc, 0x1A);
26605                 Data &= ~BIT_2;
26606                 MP_WritePhyUshort(sc, 0x1A, Data);
26607                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
26608                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
26609 
26610                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
26611                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
26612                 MP_WritePhyUshort(sc, 0x1E, 0x002D);
26613                 Data = MP_ReadPhyUshort(sc, 0x16);
26614                 Data |= BIT_5;
26615                 MP_WritePhyUshort(sc, 0x16, Data);
26616                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
26617                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
26618 
26619                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
26620                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
26621                 MP_WritePhyUshort(sc, 0x1E, 0x00AC);
26622                 MP_WritePhyUshort(sc, 0x18, 0x0006);
26623                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
26624                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
26625 
26626                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
26627                 MP_WritePhyUshort(sc, 0x09, 0xA20F);
26628                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
26629 
26630                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
26631                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
26632                 Data = MP_ReadPhyUshort(sc, 0x06);
26633                 Data |= BIT_14;
26634                 MP_WritePhyUshort(sc, 0x06, Data);
26635                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
26636 
26637                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
26638                 MP_WritePhyUshort(sc, 0x05, 0x8B54);
26639                 Data = MP_ReadPhyUshort(sc, 0x06);
26640                 Data &= ~BIT_11;
26641                 MP_WritePhyUshort(sc, 0x06, Data);
26642                 MP_WritePhyUshort(sc, 0x05, 0x8B5D);
26643                 Data = MP_ReadPhyUshort(sc, 0x06);
26644                 Data &= ~BIT_11;
26645                 MP_WritePhyUshort(sc, 0x06, Data);
26646                 MP_WritePhyUshort(sc, 0x05, 0x8A7C);
26647                 Data = MP_ReadPhyUshort(sc, 0x06);
26648                 Data &= ~BIT_8;
26649                 MP_WritePhyUshort(sc, 0x06, Data);
26650                 MP_WritePhyUshort(sc, 0x05, 0x8A7F);
26651                 Data = MP_ReadPhyUshort(sc, 0x06);
26652                 Data |= BIT_8;
26653                 MP_WritePhyUshort(sc, 0x06, Data);
26654                 MP_WritePhyUshort(sc, 0x05, 0x8A82);
26655                 Data = MP_ReadPhyUshort(sc, 0x06);
26656                 Data &= ~BIT_8;
26657                 MP_WritePhyUshort(sc, 0x06, Data);
26658                 MP_WritePhyUshort(sc, 0x05, 0x8A85);
26659                 Data = MP_ReadPhyUshort(sc, 0x06);
26660                 Data &= ~BIT_8;
26661                 MP_WritePhyUshort(sc, 0x06, Data);
26662                 MP_WritePhyUshort(sc, 0x05, 0x8A88);
26663                 Data = MP_ReadPhyUshort(sc, 0x06);
26664                 Data &= ~BIT_8;
26665                 MP_WritePhyUshort(sc, 0x06, Data);
26666                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
26667 
26668                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
26669                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
26670                 Data = MP_ReadPhyUshort(sc, 0x06);
26671                 Data |= BIT_15;
26672                 MP_WritePhyUshort(sc, 0x06, Data);
26673                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
26674 
26675                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
26676                 Data = MP_ReadPhyUshort(sc, 0x19);
26677                 Data &= ~BIT_0;
26678                 MP_WritePhyUshort(sc, 0x19, Data);
26679                 Data = MP_ReadPhyUshort(sc, 0x10);
26680                 Data &= ~BIT_10;
26681                 MP_WritePhyUshort(sc, 0x10, Data);
26682                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
26683         } else if (sc->re_type == MACFG_39) {
26684                 Data_u32 = re_eri_read(sc, 0x1D0, 4, ERIAR_ExGMAC);
26685                 Data_u32 &= ~BIT_1;
26686                 re_eri_write(sc, 0x1D0, 4, Data_u32, ERIAR_ExGMAC);
26687 
26688                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
26689                 MP_WritePhyUshort(sc, 0x05, 0x8B80);
26690                 Data = MP_ReadPhyUshort(sc, 0x06);
26691                 Data |= BIT_2 | BIT_1;
26692                 MP_WritePhyUshort(sc, 0x06, Data);
26693                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
26694 
26695                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
26696                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
26697                 Data = MP_ReadPhyUshort(sc, 0x06);
26698                 Data |= BIT_15;
26699                 MP_WritePhyUshort(sc, 0x06, Data);
26700                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
26701 
26702                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
26703                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
26704                 MP_WritePhyUshort(sc, 0x1e, 0x002D);
26705                 Data = MP_ReadPhyUshort(sc, 0x18);
26706                 Data |= BIT_4;
26707                 MP_WritePhyUshort(sc, 0x18, Data);
26708                 MP_WritePhyUshort(sc, 0x1f, 0x0002);
26709                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
26710                 Data = MP_ReadPhyUshort(sc, 0x14);
26711                 Data |= BIT_15;
26712                 MP_WritePhyUshort(sc, 0x14, Data);
26713 
26714                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
26715                 MP_WritePhyUshort(sc, 0x05, 0x8B86);
26716                 Data = MP_ReadPhyUshort(sc, 0x06);
26717                 Data |= BIT_0;
26718                 MP_WritePhyUshort(sc, 0x06, Data);
26719                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
26720 
26721                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
26722                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
26723                 MP_WritePhyUshort(sc, 0x1E, 0x00AC);
26724                 MP_WritePhyUshort(sc, 0x18, 0x0006);
26725                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
26726                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
26727 
26728                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
26729                 MP_WritePhyUshort(sc, 0x09, 0xA20F);
26730                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
26731 
26732                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
26733                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
26734                 Data = MP_ReadPhyUshort(sc, 0x06);
26735                 Data |= BIT_14;
26736                 MP_WritePhyUshort(sc, 0x06, Data);
26737                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
26738 
26739                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
26740                 MP_WritePhyUshort(sc, 0x05, 0x8B54);
26741                 Data = MP_ReadPhyUshort(sc, 0x06);
26742                 Data &= ~BIT_11;
26743                 MP_WritePhyUshort(sc, 0x06, Data);
26744                 MP_WritePhyUshort(sc, 0x05, 0x8B5D);
26745                 Data = MP_ReadPhyUshort(sc, 0x06);
26746                 Data &= ~BIT_11;
26747                 MP_WritePhyUshort(sc, 0x06, Data);
26748                 MP_WritePhyUshort(sc, 0x05, 0x8A7C);
26749                 Data = MP_ReadPhyUshort(sc, 0x06);
26750                 Data &= ~BIT_8;
26751                 MP_WritePhyUshort(sc, 0x06, Data);
26752                 MP_WritePhyUshort(sc, 0x05, 0x8A7F);
26753                 Data = MP_ReadPhyUshort(sc, 0x06);
26754                 Data |= BIT_8;
26755                 MP_WritePhyUshort(sc, 0x06, Data);
26756                 MP_WritePhyUshort(sc, 0x05, 0x8A82);
26757                 Data = MP_ReadPhyUshort(sc, 0x06);
26758                 Data &= ~BIT_8;
26759                 MP_WritePhyUshort(sc, 0x06, Data);
26760                 MP_WritePhyUshort(sc, 0x05, 0x8A85);
26761                 Data = MP_ReadPhyUshort(sc, 0x06);
26762                 Data &= ~BIT_8;
26763                 MP_WritePhyUshort(sc, 0x06, Data);
26764                 MP_WritePhyUshort(sc, 0x05, 0x8A88);
26765                 Data = MP_ReadPhyUshort(sc, 0x06);
26766                 Data &= ~BIT_8;
26767                 MP_WritePhyUshort(sc, 0x06, Data);
26768                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
26769 
26770                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
26771                 Data = MP_ReadPhyUshort(sc, 0x19);
26772                 Data &= ~BIT_0;
26773                 MP_WritePhyUshort(sc, 0x19, Data);
26774                 Data = MP_ReadPhyUshort(sc, 0x10);
26775                 Data &= ~BIT_10;
26776                 MP_WritePhyUshort(sc, 0x10, Data);
26777                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
26778         } else if (sc->re_type == MACFG_41) {
26779                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
26780                 MP_WritePhyUshort(sc, 0x11, MP_ReadPhyUshort(sc, 0x11) | 0x1000);
26781                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
26782                 MP_WritePhyUshort(sc, 0x0F, MP_ReadPhyUshort(sc, 0x0F) | 0x0003);
26783                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
26784 
26785                 for (Data_u32=0x800E0068; Data_u32<0x800E006D; Data_u32++) {
26786                         CSR_WRITE_4(sc, 0xF8, Data_u32);
26787                         for (i=0; i<10; i++) {
26788                                 DELAY(400);
26789                                 if ((CSR_READ_4(sc, 0xF8)&0x80000000)==0)
26790                                         break;
26791                         }
26792                 }
26793         } else if (sc->re_type == MACFG_42 || sc->re_type == MACFG_43) {
26794                 Data_u32 = re_eri_read(sc, 0x1D0, 4, ERIAR_ExGMAC);
26795                 Data_u32 &= 0xFFFF0000;
26796                 re_eri_write(sc, 0x1D0, 4, Data_u32, ERIAR_ExGMAC);
26797 
26798                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
26799                 MP_WritePhyUshort(sc, 0x18, 0x0310);
26800                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
26801 
26802                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
26803                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
26804                 MP_WritePhyUshort(sc, 0x19, 0x7070);
26805                 MP_WritePhyUshort(sc, 0x1c, 0x0600);
26806                 MP_WritePhyUshort(sc, 0x1d, 0x9700);
26807                 MP_WritePhyUshort(sc, 0x1d, 0x7d00);
26808                 MP_WritePhyUshort(sc, 0x1d, 0x6900);
26809                 MP_WritePhyUshort(sc, 0x1d, 0x7d00);
26810                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
26811                 MP_WritePhyUshort(sc, 0x1d, 0x4899);
26812                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
26813                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
26814                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
26815                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
26816                 MP_WritePhyUshort(sc, 0x1d, 0x8000);
26817                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
26818                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
26819                 MP_WritePhyUshort(sc, 0x1d, 0x4007);
26820                 MP_WritePhyUshort(sc, 0x1d, 0x4400);
26821                 MP_WritePhyUshort(sc, 0x1d, 0x4800);
26822                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
26823                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
26824                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
26825                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
26826                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
26827                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
26828                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
26829                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
26830                 MP_WritePhyUshort(sc, 0x1d, 0x571f);
26831                 MP_WritePhyUshort(sc, 0x1d, 0x5ffb);
26832                 MP_WritePhyUshort(sc, 0x1d, 0xaa03);
26833                 MP_WritePhyUshort(sc, 0x1d, 0x5b58);
26834                 MP_WritePhyUshort(sc, 0x1d, 0x301e);
26835                 MP_WritePhyUshort(sc, 0x1d, 0x5b64);
26836                 MP_WritePhyUshort(sc, 0x1d, 0xa6fc);
26837                 MP_WritePhyUshort(sc, 0x1d, 0xdcdb);
26838                 MP_WritePhyUshort(sc, 0x1d, 0x0014);
26839                 MP_WritePhyUshort(sc, 0x1d, 0xd9a9);
26840                 MP_WritePhyUshort(sc, 0x1d, 0x0013);
26841                 MP_WritePhyUshort(sc, 0x1d, 0xd16b);
26842                 MP_WritePhyUshort(sc, 0x1d, 0x0011);
26843                 MP_WritePhyUshort(sc, 0x1d, 0xb40e);
26844                 MP_WritePhyUshort(sc, 0x1d, 0xd06b);
26845                 MP_WritePhyUshort(sc, 0x1d, 0x000c);
26846                 MP_WritePhyUshort(sc, 0x1d, 0xb206);
26847                 MP_WritePhyUshort(sc, 0x1d, 0x7c01);
26848                 MP_WritePhyUshort(sc, 0x1d, 0x5800);
26849                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
26850                 MP_WritePhyUshort(sc, 0x1d, 0x5c00);
26851                 MP_WritePhyUshort(sc, 0x1d, 0x301a);
26852                 MP_WritePhyUshort(sc, 0x1d, 0x7c01);
26853                 MP_WritePhyUshort(sc, 0x1d, 0x5801);
26854                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
26855                 MP_WritePhyUshort(sc, 0x1d, 0x5c04);
26856                 MP_WritePhyUshort(sc, 0x1d, 0x301e);
26857                 MP_WritePhyUshort(sc, 0x1d, 0x314d);
26858                 MP_WritePhyUshort(sc, 0x1d, 0x31f0);
26859                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
26860                 MP_WritePhyUshort(sc, 0x1d, 0x4c20);
26861                 MP_WritePhyUshort(sc, 0x1d, 0x6004);
26862                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
26863                 MP_WritePhyUshort(sc, 0x1d, 0x4833);
26864                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
26865                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
26866                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
26867                 MP_WritePhyUshort(sc, 0x1d, 0x4c08);
26868                 MP_WritePhyUshort(sc, 0x1d, 0x8300);
26869                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
26870                 MP_WritePhyUshort(sc, 0x1d, 0x6600);
26871                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
26872                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
26873                 MP_WritePhyUshort(sc, 0x1d, 0xb90c);
26874                 MP_WritePhyUshort(sc, 0x1d, 0x30d3);
26875                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
26876                 MP_WritePhyUshort(sc, 0x1d, 0x4de0);
26877                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
26878                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
26879                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
26880                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
26881                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
26882                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
26883                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
26884                 MP_WritePhyUshort(sc, 0x1d, 0x300b);
26885                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
26886                 MP_WritePhyUshort(sc, 0x1d, 0x4c60);
26887                 MP_WritePhyUshort(sc, 0x1d, 0x6803);
26888                 MP_WritePhyUshort(sc, 0x1d, 0x6520);
26889                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
26890                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
26891                 MP_WritePhyUshort(sc, 0x1d, 0xaf03);
26892                 MP_WritePhyUshort(sc, 0x1d, 0x6015);
26893                 MP_WritePhyUshort(sc, 0x1d, 0x3059);
26894                 MP_WritePhyUshort(sc, 0x1d, 0x6017);
26895                 MP_WritePhyUshort(sc, 0x1d, 0x57e0);
26896                 MP_WritePhyUshort(sc, 0x1d, 0x580c);
26897                 MP_WritePhyUshort(sc, 0x1d, 0x588c);
26898                 MP_WritePhyUshort(sc, 0x1d, 0x7ffc);
26899                 MP_WritePhyUshort(sc, 0x1d, 0x5fa3);
26900                 MP_WritePhyUshort(sc, 0x1d, 0x4827);
26901                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
26902                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
26903                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
26904                 MP_WritePhyUshort(sc, 0x1d, 0x4c10);
26905                 MP_WritePhyUshort(sc, 0x1d, 0x8400);
26906                 MP_WritePhyUshort(sc, 0x1d, 0x7c30);
26907                 MP_WritePhyUshort(sc, 0x1d, 0x6020);
26908                 MP_WritePhyUshort(sc, 0x1d, 0x48bf);
26909                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
26910                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
26911                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
26912                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
26913                 MP_WritePhyUshort(sc, 0x1d, 0xad09);
26914                 MP_WritePhyUshort(sc, 0x1d, 0x7c03);
26915                 MP_WritePhyUshort(sc, 0x1d, 0x5c03);
26916                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
26917                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
26918                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
26919                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
26920                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
26921                 MP_WritePhyUshort(sc, 0x1d, 0x4400);
26922                 MP_WritePhyUshort(sc, 0x1d, 0xad2c);
26923                 MP_WritePhyUshort(sc, 0x1d, 0xd6cf);
26924                 MP_WritePhyUshort(sc, 0x1d, 0x0002);
26925                 MP_WritePhyUshort(sc, 0x1d, 0x80f4);
26926                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
26927                 MP_WritePhyUshort(sc, 0x1d, 0x4c80);
26928                 MP_WritePhyUshort(sc, 0x1d, 0x7c20);
26929                 MP_WritePhyUshort(sc, 0x1d, 0x5c20);
26930                 MP_WritePhyUshort(sc, 0x1d, 0x481e);
26931                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
26932                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
26933                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
26934                 MP_WritePhyUshort(sc, 0x1d, 0x4c02);
26935                 MP_WritePhyUshort(sc, 0x1d, 0xad0a);
26936                 MP_WritePhyUshort(sc, 0x1d, 0x7c03);
26937                 MP_WritePhyUshort(sc, 0x1d, 0x5c03);
26938                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
26939                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
26940                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
26941                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
26942                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
26943                 MP_WritePhyUshort(sc, 0x1d, 0x4400);
26944                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
26945                 MP_WritePhyUshort(sc, 0x1d, 0x8d02);
26946                 MP_WritePhyUshort(sc, 0x1d, 0x4401);
26947                 MP_WritePhyUshort(sc, 0x1d, 0x81f4);
26948                 MP_WritePhyUshort(sc, 0x1d, 0x3114);
26949                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
26950                 MP_WritePhyUshort(sc, 0x1d, 0x4d00);
26951                 MP_WritePhyUshort(sc, 0x1d, 0x4832);
26952                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
26953                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
26954                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
26955                 MP_WritePhyUshort(sc, 0x1d, 0x4c10);
26956                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
26957                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
26958                 MP_WritePhyUshort(sc, 0x1d, 0xa4b7);
26959                 MP_WritePhyUshort(sc, 0x1d, 0xd9b3);
26960                 MP_WritePhyUshort(sc, 0x1d, 0xfffe);
26961                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
26962                 MP_WritePhyUshort(sc, 0x1d, 0x4d20);
26963                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
26964                 MP_WritePhyUshort(sc, 0x1d, 0x6200);
26965                 MP_WritePhyUshort(sc, 0x1d, 0x3045);
26966                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
26967                 MP_WritePhyUshort(sc, 0x1d, 0x4d40);
26968                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
26969                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
26970                 MP_WritePhyUshort(sc, 0x1d, 0x4401);
26971                 MP_WritePhyUshort(sc, 0x1d, 0x5210);
26972                 MP_WritePhyUshort(sc, 0x1d, 0x4833);
26973                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
26974                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
26975                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
26976                 MP_WritePhyUshort(sc, 0x1d, 0x4c08);
26977                 MP_WritePhyUshort(sc, 0x1d, 0x8300);
26978                 MP_WritePhyUshort(sc, 0x1d, 0x5f80);
26979                 MP_WritePhyUshort(sc, 0x1d, 0x55e0);
26980                 MP_WritePhyUshort(sc, 0x1d, 0xc06f);
26981                 MP_WritePhyUshort(sc, 0x1d, 0x0005);
26982                 MP_WritePhyUshort(sc, 0x1d, 0xd9b3);
26983                 MP_WritePhyUshort(sc, 0x1d, 0xfffd);
26984                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
26985                 MP_WritePhyUshort(sc, 0x1d, 0x6040);
26986                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
26987                 MP_WritePhyUshort(sc, 0x1d, 0x4d60);
26988                 MP_WritePhyUshort(sc, 0x1d, 0x57e0);
26989                 MP_WritePhyUshort(sc, 0x1d, 0x4814);
26990                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
26991                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
26992                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
26993                 MP_WritePhyUshort(sc, 0x1d, 0x4c04);
26994                 MP_WritePhyUshort(sc, 0x1d, 0x8200);
26995                 MP_WritePhyUshort(sc, 0x1d, 0x7c03);
26996                 MP_WritePhyUshort(sc, 0x1d, 0x5c03);
26997                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
26998                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
26999                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27000                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27001                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27002                 MP_WritePhyUshort(sc, 0x1d, 0xad02);
27003                 MP_WritePhyUshort(sc, 0x1d, 0x4400);
27004                 MP_WritePhyUshort(sc, 0x1d, 0xc0e9);
27005                 MP_WritePhyUshort(sc, 0x1d, 0x0003);
27006                 MP_WritePhyUshort(sc, 0x1d, 0xadd8);
27007                 MP_WritePhyUshort(sc, 0x1d, 0x30c6);
27008                 MP_WritePhyUshort(sc, 0x1d, 0x3078);
27009                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27010                 MP_WritePhyUshort(sc, 0x1d, 0x4dc0);
27011                 MP_WritePhyUshort(sc, 0x1d, 0x6730);
27012                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27013                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27014                 MP_WritePhyUshort(sc, 0x1d, 0xd09d);
27015                 MP_WritePhyUshort(sc, 0x1d, 0x0002);
27016                 MP_WritePhyUshort(sc, 0x1d, 0xb4fe);
27017                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27018                 MP_WritePhyUshort(sc, 0x1d, 0x4d80);
27019                 MP_WritePhyUshort(sc, 0x1d, 0x6802);
27020                 MP_WritePhyUshort(sc, 0x1d, 0x6600);
27021                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27022                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27023                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
27024                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
27025                 MP_WritePhyUshort(sc, 0x1d, 0x486c);
27026                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27027                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
27028                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27029                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
27030                 MP_WritePhyUshort(sc, 0x1d, 0x9503);
27031                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
27032                 MP_WritePhyUshort(sc, 0x1d, 0x6200);
27033                 MP_WritePhyUshort(sc, 0x1d, 0x571f);
27034                 MP_WritePhyUshort(sc, 0x1d, 0x5fbb);
27035                 MP_WritePhyUshort(sc, 0x1d, 0xaa03);
27036                 MP_WritePhyUshort(sc, 0x1d, 0x5b58);
27037                 MP_WritePhyUshort(sc, 0x1d, 0x30e9);
27038                 MP_WritePhyUshort(sc, 0x1d, 0x5b64);
27039                 MP_WritePhyUshort(sc, 0x1d, 0xcdab);
27040                 MP_WritePhyUshort(sc, 0x1d, 0xff5b);
27041                 MP_WritePhyUshort(sc, 0x1d, 0xcd8d);
27042                 MP_WritePhyUshort(sc, 0x1d, 0xff59);
27043                 MP_WritePhyUshort(sc, 0x1d, 0xd96b);
27044                 MP_WritePhyUshort(sc, 0x1d, 0xff57);
27045                 MP_WritePhyUshort(sc, 0x1d, 0xd0a0);
27046                 MP_WritePhyUshort(sc, 0x1d, 0xffdb);
27047                 MP_WritePhyUshort(sc, 0x1d, 0xcba0);
27048                 MP_WritePhyUshort(sc, 0x1d, 0x0003);
27049                 MP_WritePhyUshort(sc, 0x1d, 0x80f0);
27050                 MP_WritePhyUshort(sc, 0x1d, 0x30f6);
27051                 MP_WritePhyUshort(sc, 0x1d, 0x3109);
27052                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27053                 MP_WritePhyUshort(sc, 0x1d, 0x4ce0);
27054                 MP_WritePhyUshort(sc, 0x1d, 0x7d30);
27055                 MP_WritePhyUshort(sc, 0x1d, 0x6530);
27056                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27057                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27058                 MP_WritePhyUshort(sc, 0x1d, 0x7ce0);
27059                 MP_WritePhyUshort(sc, 0x1d, 0x5400);
27060                 MP_WritePhyUshort(sc, 0x1d, 0x4832);
27061                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27062                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
27063                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27064                 MP_WritePhyUshort(sc, 0x1d, 0x4c08);
27065                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
27066                 MP_WritePhyUshort(sc, 0x1d, 0x6008);
27067                 MP_WritePhyUshort(sc, 0x1d, 0x8300);
27068                 MP_WritePhyUshort(sc, 0x1d, 0xb902);
27069                 MP_WritePhyUshort(sc, 0x1d, 0x30d3);
27070                 MP_WritePhyUshort(sc, 0x1d, 0x308f);
27071                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27072                 MP_WritePhyUshort(sc, 0x1d, 0x4da0);
27073                 MP_WritePhyUshort(sc, 0x1d, 0x57a0);
27074                 MP_WritePhyUshort(sc, 0x1d, 0x590c);
27075                 MP_WritePhyUshort(sc, 0x1d, 0x5fa2);
27076                 MP_WritePhyUshort(sc, 0x1d, 0xcba4);
27077                 MP_WritePhyUshort(sc, 0x1d, 0x0005);
27078                 MP_WritePhyUshort(sc, 0x1d, 0xcd8d);
27079                 MP_WritePhyUshort(sc, 0x1d, 0x0003);
27080                 MP_WritePhyUshort(sc, 0x1d, 0x80fc);
27081                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27082                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27083                 MP_WritePhyUshort(sc, 0x1d, 0x4ca0);
27084                 MP_WritePhyUshort(sc, 0x1d, 0xb603);
27085                 MP_WritePhyUshort(sc, 0x1d, 0x7c10);
27086                 MP_WritePhyUshort(sc, 0x1d, 0x6010);
27087                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27088                 MP_WritePhyUshort(sc, 0x1d, 0x541f);
27089                 MP_WritePhyUshort(sc, 0x1d, 0x7ffc);
27090                 MP_WritePhyUshort(sc, 0x1d, 0x5fb3);
27091                 MP_WritePhyUshort(sc, 0x1d, 0x9403);
27092                 MP_WritePhyUshort(sc, 0x1d, 0x7c03);
27093                 MP_WritePhyUshort(sc, 0x1d, 0x5c03);
27094                 MP_WritePhyUshort(sc, 0x1d, 0xaa05);
27095                 MP_WritePhyUshort(sc, 0x1d, 0x7c80);
27096                 MP_WritePhyUshort(sc, 0x1d, 0x5800);
27097                 MP_WritePhyUshort(sc, 0x1d, 0x5b58);
27098                 MP_WritePhyUshort(sc, 0x1d, 0x3128);
27099                 MP_WritePhyUshort(sc, 0x1d, 0x7c80);
27100                 MP_WritePhyUshort(sc, 0x1d, 0x5800);
27101                 MP_WritePhyUshort(sc, 0x1d, 0x5b64);
27102                 MP_WritePhyUshort(sc, 0x1d, 0x4827);
27103                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27104                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
27105                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27106                 MP_WritePhyUshort(sc, 0x1d, 0x4c10);
27107                 MP_WritePhyUshort(sc, 0x1d, 0x8400);
27108                 MP_WritePhyUshort(sc, 0x1d, 0x7c10);
27109                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
27110                 MP_WritePhyUshort(sc, 0x1d, 0x4824);
27111                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27112                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
27113                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27114                 MP_WritePhyUshort(sc, 0x1d, 0x4c04);
27115                 MP_WritePhyUshort(sc, 0x1d, 0x8200);
27116                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27117                 MP_WritePhyUshort(sc, 0x1d, 0x4cc0);
27118                 MP_WritePhyUshort(sc, 0x1d, 0x7d00);
27119                 MP_WritePhyUshort(sc, 0x1d, 0x6400);
27120                 MP_WritePhyUshort(sc, 0x1d, 0x7ffc);
27121                 MP_WritePhyUshort(sc, 0x1d, 0x5fbb);
27122                 MP_WritePhyUshort(sc, 0x1d, 0x4824);
27123                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27124                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
27125                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27126                 MP_WritePhyUshort(sc, 0x1d, 0x4c04);
27127                 MP_WritePhyUshort(sc, 0x1d, 0x8200);
27128                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
27129                 MP_WritePhyUshort(sc, 0x1d, 0x6a00);
27130                 MP_WritePhyUshort(sc, 0x1d, 0x4824);
27131                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27132                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
27133                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27134                 MP_WritePhyUshort(sc, 0x1d, 0x4c04);
27135                 MP_WritePhyUshort(sc, 0x1d, 0x8200);
27136                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
27137                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
27138                 MP_WritePhyUshort(sc, 0x1d, 0x30f6);
27139                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27140                 MP_WritePhyUshort(sc, 0x1d, 0x4e00);
27141                 MP_WritePhyUshort(sc, 0x1d, 0x4007);
27142                 MP_WritePhyUshort(sc, 0x1d, 0x4400);
27143                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
27144                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
27145                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
27146                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27147                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27148                 MP_WritePhyUshort(sc, 0x1d, 0x570f);
27149                 MP_WritePhyUshort(sc, 0x1d, 0x5fff);
27150                 MP_WritePhyUshort(sc, 0x1d, 0xaa03);
27151                 MP_WritePhyUshort(sc, 0x1d, 0x585b);
27152                 MP_WritePhyUshort(sc, 0x1d, 0x315c);
27153                 MP_WritePhyUshort(sc, 0x1d, 0x5867);
27154                 MP_WritePhyUshort(sc, 0x1d, 0x9402);
27155                 MP_WritePhyUshort(sc, 0x1d, 0x6200);
27156                 MP_WritePhyUshort(sc, 0x1d, 0xcda3);
27157                 MP_WritePhyUshort(sc, 0x1d, 0x009d);
27158                 MP_WritePhyUshort(sc, 0x1d, 0xcd85);
27159                 MP_WritePhyUshort(sc, 0x1d, 0x009b);
27160                 MP_WritePhyUshort(sc, 0x1d, 0xd96b);
27161                 MP_WritePhyUshort(sc, 0x1d, 0x0099);
27162                 MP_WritePhyUshort(sc, 0x1d, 0x96e9);
27163                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
27164                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
27165                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27166                 MP_WritePhyUshort(sc, 0x1d, 0x4e20);
27167                 MP_WritePhyUshort(sc, 0x1d, 0x96e4);
27168                 MP_WritePhyUshort(sc, 0x1d, 0x8b04);
27169                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
27170                 MP_WritePhyUshort(sc, 0x1d, 0x5008);
27171                 MP_WritePhyUshort(sc, 0x1d, 0xab03);
27172                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
27173                 MP_WritePhyUshort(sc, 0x1d, 0x5000);
27174                 MP_WritePhyUshort(sc, 0x1d, 0x6801);
27175                 MP_WritePhyUshort(sc, 0x1d, 0x6776);
27176                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27177                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27178                 MP_WritePhyUshort(sc, 0x1d, 0xdb7c);
27179                 MP_WritePhyUshort(sc, 0x1d, 0xfff0);
27180                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27181                 MP_WritePhyUshort(sc, 0x1d, 0x7fe1);
27182                 MP_WritePhyUshort(sc, 0x1d, 0x4e40);
27183                 MP_WritePhyUshort(sc, 0x1d, 0x4837);
27184                 MP_WritePhyUshort(sc, 0x1d, 0x4418);
27185                 MP_WritePhyUshort(sc, 0x1d, 0x41c7);
27186                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27187                 MP_WritePhyUshort(sc, 0x1d, 0x4e40);
27188                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
27189                 MP_WritePhyUshort(sc, 0x1d, 0x5400);
27190                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27191                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
27192                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27193                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
27194                 MP_WritePhyUshort(sc, 0x1d, 0x8fc9);
27195                 MP_WritePhyUshort(sc, 0x1d, 0xd2a0);
27196                 MP_WritePhyUshort(sc, 0x1d, 0x004a);
27197                 MP_WritePhyUshort(sc, 0x1d, 0x9203);
27198                 MP_WritePhyUshort(sc, 0x1d, 0xa041);
27199                 MP_WritePhyUshort(sc, 0x1d, 0x3184);
27200                 MP_WritePhyUshort(sc, 0x1d, 0x7fe1);
27201                 MP_WritePhyUshort(sc, 0x1d, 0x4e60);
27202                 MP_WritePhyUshort(sc, 0x1d, 0x489c);
27203                 MP_WritePhyUshort(sc, 0x1d, 0x4628);
27204                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27205                 MP_WritePhyUshort(sc, 0x1d, 0x4e60);
27206                 MP_WritePhyUshort(sc, 0x1d, 0x7e28);
27207                 MP_WritePhyUshort(sc, 0x1d, 0x4628);
27208                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
27209                 MP_WritePhyUshort(sc, 0x1d, 0x5400);
27210                 MP_WritePhyUshort(sc, 0x1d, 0x7c01);
27211                 MP_WritePhyUshort(sc, 0x1d, 0x5800);
27212                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
27213                 MP_WritePhyUshort(sc, 0x1d, 0x5c00);
27214                 MP_WritePhyUshort(sc, 0x1d, 0x41e8);
27215                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27216                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
27217                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27218                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
27219                 MP_WritePhyUshort(sc, 0x1d, 0x8fb0);
27220                 MP_WritePhyUshort(sc, 0x1d, 0xb241);
27221                 MP_WritePhyUshort(sc, 0x1d, 0xa02a);
27222                 MP_WritePhyUshort(sc, 0x1d, 0x319d);
27223                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27224                 MP_WritePhyUshort(sc, 0x1d, 0x4ea0);
27225                 MP_WritePhyUshort(sc, 0x1d, 0x7c02);
27226                 MP_WritePhyUshort(sc, 0x1d, 0x4402);
27227                 MP_WritePhyUshort(sc, 0x1d, 0x4448);
27228                 MP_WritePhyUshort(sc, 0x1d, 0x4894);
27229                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27230                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
27231                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27232                 MP_WritePhyUshort(sc, 0x1d, 0x4c03);
27233                 MP_WritePhyUshort(sc, 0x1d, 0x4824);
27234                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27235                 MP_WritePhyUshort(sc, 0x1d, 0x4c07);
27236                 MP_WritePhyUshort(sc, 0x1d, 0x41ef);
27237                 MP_WritePhyUshort(sc, 0x1d, 0x41ff);
27238                 MP_WritePhyUshort(sc, 0x1d, 0x4891);
27239                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27240                 MP_WritePhyUshort(sc, 0x1d, 0x4c07);
27241                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27242                 MP_WritePhyUshort(sc, 0x1d, 0x4c17);
27243                 MP_WritePhyUshort(sc, 0x1d, 0x8400);
27244                 MP_WritePhyUshort(sc, 0x1d, 0x8ef8);
27245                 MP_WritePhyUshort(sc, 0x1d, 0x41c7);
27246                 MP_WritePhyUshort(sc, 0x1d, 0x8f95);
27247                 MP_WritePhyUshort(sc, 0x1d, 0x92d5);
27248                 MP_WritePhyUshort(sc, 0x1d, 0xa10f);
27249                 MP_WritePhyUshort(sc, 0x1d, 0xd480);
27250                 MP_WritePhyUshort(sc, 0x1d, 0x0008);
27251                 MP_WritePhyUshort(sc, 0x1d, 0xd580);
27252                 MP_WritePhyUshort(sc, 0x1d, 0xffb9);
27253                 MP_WritePhyUshort(sc, 0x1d, 0xa202);
27254                 MP_WritePhyUshort(sc, 0x1d, 0x31b8);
27255                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
27256                 MP_WritePhyUshort(sc, 0x1d, 0x4404);
27257                 MP_WritePhyUshort(sc, 0x1d, 0x31b8);
27258                 MP_WritePhyUshort(sc, 0x1d, 0xd484);
27259                 MP_WritePhyUshort(sc, 0x1d, 0xfff3);
27260                 MP_WritePhyUshort(sc, 0x1d, 0xd484);
27261                 MP_WritePhyUshort(sc, 0x1d, 0xfff1);
27262                 MP_WritePhyUshort(sc, 0x1d, 0x314d);
27263                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27264                 MP_WritePhyUshort(sc, 0x1d, 0x4ee0);
27265                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
27266                 MP_WritePhyUshort(sc, 0x1d, 0x5400);
27267                 MP_WritePhyUshort(sc, 0x1d, 0x4488);
27268                 MP_WritePhyUshort(sc, 0x1d, 0x41cf);
27269                 MP_WritePhyUshort(sc, 0x1d, 0x314d);
27270                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27271                 MP_WritePhyUshort(sc, 0x1d, 0x4ec0);
27272                 MP_WritePhyUshort(sc, 0x1d, 0x48f3);
27273                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27274                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
27275                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27276                 MP_WritePhyUshort(sc, 0x1d, 0x4c09);
27277                 MP_WritePhyUshort(sc, 0x1d, 0x4508);
27278                 MP_WritePhyUshort(sc, 0x1d, 0x41c7);
27279                 MP_WritePhyUshort(sc, 0x1d, 0x8f24);
27280                 MP_WritePhyUshort(sc, 0x1d, 0xd218);
27281                 MP_WritePhyUshort(sc, 0x1d, 0x0022);
27282                 MP_WritePhyUshort(sc, 0x1d, 0xd2a4);
27283                 MP_WritePhyUshort(sc, 0x1d, 0xff9f);
27284                 MP_WritePhyUshort(sc, 0x1d, 0x31d9);
27285                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27286                 MP_WritePhyUshort(sc, 0x1d, 0x4e80);
27287                 MP_WritePhyUshort(sc, 0x1d, 0x4832);
27288                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27289                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
27290                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27291                 MP_WritePhyUshort(sc, 0x1d, 0x4c11);
27292                 MP_WritePhyUshort(sc, 0x1d, 0x4428);
27293                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
27294                 MP_WritePhyUshort(sc, 0x1d, 0x5440);
27295                 MP_WritePhyUshort(sc, 0x1d, 0x7c01);
27296                 MP_WritePhyUshort(sc, 0x1d, 0x5801);
27297                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
27298                 MP_WritePhyUshort(sc, 0x1d, 0x5c04);
27299                 MP_WritePhyUshort(sc, 0x1d, 0x41e8);
27300                 MP_WritePhyUshort(sc, 0x1d, 0xa4b3);
27301                 MP_WritePhyUshort(sc, 0x1d, 0x31ee);
27302                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
27303                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
27304                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27305                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27306                 MP_WritePhyUshort(sc, 0x1d, 0x570f);
27307                 MP_WritePhyUshort(sc, 0x1d, 0x5fff);
27308                 MP_WritePhyUshort(sc, 0x1d, 0xaa03);
27309                 MP_WritePhyUshort(sc, 0x1d, 0x585b);
27310                 MP_WritePhyUshort(sc, 0x1d, 0x31fa);
27311                 MP_WritePhyUshort(sc, 0x1d, 0x5867);
27312                 MP_WritePhyUshort(sc, 0x1d, 0xbcf6);
27313                 MP_WritePhyUshort(sc, 0x1d, 0x300b);
27314                 MP_WritePhyUshort(sc, 0x1d, 0x300b);
27315                 MP_WritePhyUshort(sc, 0x1d, 0x314d);
27316                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
27317                 MP_WritePhyUshort(sc, 0x1c, 0x0200);
27318                 MP_WritePhyUshort(sc, 0x19, 0x7030);
27319                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
27320 
27321                 if (CSR_READ_1(sc, 0xEF)&0x08) {
27322                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
27323                         MP_WritePhyUshort(sc, 0x1A, 0x0004);
27324                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
27325                 } else {
27326                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
27327                         MP_WritePhyUshort(sc, 0x1A, 0x0000);
27328                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
27329                 }
27330 
27331                 if (CSR_READ_1(sc, 0xEF)&0x10) {
27332                         MP_WritePhyUshort(sc, 0x1F, 0x0004);
27333                         MP_WritePhyUshort(sc, 0x1C, 0x0000);
27334                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
27335                 } else {
27336                         MP_WritePhyUshort(sc, 0x1F, 0x0004);
27337                         MP_WritePhyUshort(sc, 0x1C, 0x0200);
27338                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
27339                 }
27340 
27341                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
27342                 MP_WritePhyUshort(sc, 0x15, 0x7701);
27343                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
27344 
27345                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
27346                 ClearEthPhyBit(sc, 0x1A, BIT_14);
27347 
27348                 if (phy_power_saving == 1) {
27349                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
27350                         MP_WritePhyUshort(sc, 0x18, 0x8310);
27351                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
27352                 } else {
27353                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
27354                         MP_WritePhyUshort(sc, 0x18, 0x0310);
27355                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
27356                         DELAY(20000);
27357                 }
27358 
27359                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
27360                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
27361                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
27362                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
27363                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
27364                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
27365                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
27366                 MP_WritePhyUshort(sc, 0x0D, 0x0003);
27367                 MP_WritePhyUshort(sc, 0x0E, 0x0015);
27368                 MP_WritePhyUshort(sc, 0x0D, 0x4003);
27369                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
27370                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
27371 
27372         } else if (sc->re_type == MACFG_50) {
27373                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
27374                 MP_WritePhyUshort(sc, 0x05, 0x8B80);
27375                 Data = MP_ReadPhyUshort(sc, 0x06);
27376                 Data |= BIT_2 | BIT_1;
27377                 MP_WritePhyUshort(sc, 0x06, Data);
27378                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
27379 
27380                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
27381                 MP_WritePhyUshort(sc, 0x1E, 0x002D);
27382                 Data = MP_ReadPhyUshort(sc, 0x18);
27383                 Data |= BIT_4;
27384                 MP_WritePhyUshort(sc, 0x18, Data);
27385                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
27386                 Data = MP_ReadPhyUshort(sc, 0x14);
27387                 Data |= BIT_15;
27388                 MP_WritePhyUshort(sc, 0x14, Data);
27389 
27390                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
27391                 MP_WritePhyUshort(sc, 0x05, 0x8B86);
27392                 Data = MP_ReadPhyUshort(sc, 0x06);
27393                 Data |= BIT_0;
27394                 MP_WritePhyUshort(sc, 0x06, Data);
27395                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
27396 
27397                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
27398                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
27399                 Data = MP_ReadPhyUshort(sc, 0x06);
27400                 Data |= BIT_14;
27401                 MP_WritePhyUshort(sc, 0x06, Data);
27402                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
27403 
27404                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
27405                 MP_WritePhyUshort(sc, 0x09, 0xA20F);
27406                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
27407 
27408                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
27409                 MP_WritePhyUshort(sc, 0x05, 0x8B55);
27410                 MP_WritePhyUshort(sc, 0x06, 0x0000);
27411                 MP_WritePhyUshort(sc, 0x05, 0x8B5E);
27412                 MP_WritePhyUshort(sc, 0x06, 0x0000);
27413                 MP_WritePhyUshort(sc, 0x05, 0x8B67);
27414                 MP_WritePhyUshort(sc, 0x06, 0x0000);
27415                 MP_WritePhyUshort(sc, 0x05, 0x8B70);
27416                 MP_WritePhyUshort(sc, 0x06, 0x0000);
27417                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
27418                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
27419                 MP_WritePhyUshort(sc, 0x1E, 0x0078);
27420                 MP_WritePhyUshort(sc, 0x17, 0x0000);
27421                 MP_WritePhyUshort(sc, 0x19, 0x00FB);
27422                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
27423 
27424                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
27425                 MP_WritePhyUshort(sc, 0x05, 0x8B79);
27426                 MP_WritePhyUshort(sc, 0x06, 0xAA00);
27427                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
27428 
27429                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
27430                 MP_WritePhyUshort(sc, 0x01, 0x328A);
27431                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
27432 
27433                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
27434                 MP_WritePhyUshort(sc, 0x05, 0x8B54);
27435                 Data = MP_ReadPhyUshort(sc, 0x06);
27436                 Data &= ~BIT_11;
27437                 MP_WritePhyUshort(sc, 0x06, Data);
27438                 MP_WritePhyUshort(sc, 0x05, 0x8B5D);
27439                 Data = MP_ReadPhyUshort(sc, 0x06);
27440                 Data &= ~BIT_11;
27441                 MP_WritePhyUshort(sc, 0x06, Data);
27442                 MP_WritePhyUshort(sc, 0x05, 0x8A7C);
27443                 Data = MP_ReadPhyUshort(sc, 0x06);
27444                 Data &= ~BIT_8;
27445                 MP_WritePhyUshort(sc, 0x06, Data);
27446                 MP_WritePhyUshort(sc, 0x05, 0x8A7F);
27447                 Data = MP_ReadPhyUshort(sc, 0x06);
27448                 Data |= BIT_8;
27449                 MP_WritePhyUshort(sc, 0x06, Data);
27450                 MP_WritePhyUshort(sc, 0x05, 0x8A82);
27451                 Data = MP_ReadPhyUshort(sc, 0x06);
27452                 Data &= ~BIT_8;
27453                 MP_WritePhyUshort(sc, 0x06, Data);
27454                 MP_WritePhyUshort(sc, 0x05, 0x8A85);
27455                 Data = MP_ReadPhyUshort(sc, 0x06);
27456                 Data &= ~BIT_8;
27457                 MP_WritePhyUshort(sc, 0x06, Data);
27458                 MP_WritePhyUshort(sc, 0x05, 0x8A88);
27459                 Data = MP_ReadPhyUshort(sc, 0x06);
27460                 Data &= ~BIT_8;
27461                 MP_WritePhyUshort(sc, 0x06, Data);
27462                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
27463 
27464                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
27465                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
27466                 Data = MP_ReadPhyUshort(sc, 0x06);
27467                 Data |= BIT_15;
27468                 MP_WritePhyUshort(sc, 0x06, Data);
27469                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
27470 
27471                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
27472                 Data = MP_ReadPhyUshort(sc, 0x19);
27473                 Data &= ~BIT_0;
27474                 MP_WritePhyUshort(sc, 0x19, Data);
27475                 Data = MP_ReadPhyUshort(sc, 0x10);
27476                 Data &= ~BIT_10;
27477                 MP_WritePhyUshort(sc, 0x10, Data);
27478                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
27479         } else if (sc->re_type == MACFG_51) {
27480                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
27481                 MP_WritePhyUshort(sc, 0x05, 0x8B80);
27482                 Data = MP_ReadPhyUshort(sc, 0x06);
27483                 Data |= BIT_2 | BIT_1;
27484                 MP_WritePhyUshort(sc, 0x06, Data);
27485                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
27486 
27487                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
27488                 MP_WritePhyUshort(sc, 0x1E, 0x002D);
27489                 Data = MP_ReadPhyUshort(sc, 0x18);
27490                 Data |= BIT_4;
27491                 MP_WritePhyUshort(sc, 0x18, Data);
27492                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
27493                 Data = MP_ReadPhyUshort(sc, 0x14);
27494                 Data |= BIT_15;
27495                 MP_WritePhyUshort(sc, 0x14, Data);
27496 
27497                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
27498                 MP_WritePhyUshort(sc, 0x05, 0x8B86);
27499                 Data = MP_ReadPhyUshort(sc, 0x06);
27500                 Data |= BIT_0;
27501                 MP_WritePhyUshort(sc, 0x06, Data);
27502                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
27503 
27504                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
27505                 MP_WritePhyUshort(sc, 0x05, 0x8B54);
27506                 Data = MP_ReadPhyUshort(sc, 0x06);
27507                 Data &= ~BIT_11;
27508                 MP_WritePhyUshort(sc, 0x06, Data);
27509                 MP_WritePhyUshort(sc, 0x05, 0x8B5D);
27510                 Data = MP_ReadPhyUshort(sc, 0x06);
27511                 Data &= ~BIT_11;
27512                 MP_WritePhyUshort(sc, 0x06, Data);
27513                 MP_WritePhyUshort(sc, 0x05, 0x8A7C);
27514                 Data = MP_ReadPhyUshort(sc, 0x06);
27515                 Data &= ~BIT_8;
27516                 MP_WritePhyUshort(sc, 0x06, Data);
27517                 MP_WritePhyUshort(sc, 0x05, 0x8A7F);
27518                 Data = MP_ReadPhyUshort(sc, 0x06);
27519                 Data |= BIT_8;
27520                 MP_WritePhyUshort(sc, 0x06, Data);
27521                 MP_WritePhyUshort(sc, 0x05, 0x8A82);
27522                 Data = MP_ReadPhyUshort(sc, 0x06);
27523                 Data &= ~BIT_8;
27524                 MP_WritePhyUshort(sc, 0x06, Data);
27525                 MP_WritePhyUshort(sc, 0x05, 0x8A85);
27526                 Data = MP_ReadPhyUshort(sc, 0x06);
27527                 Data &= ~BIT_8;
27528                 MP_WritePhyUshort(sc, 0x06, Data);
27529                 MP_WritePhyUshort(sc, 0x05, 0x8A88);
27530                 Data = MP_ReadPhyUshort(sc, 0x06);
27531                 Data &= ~BIT_8;
27532                 MP_WritePhyUshort(sc, 0x06, Data);
27533                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
27534 
27535                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
27536                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
27537                 Data = MP_ReadPhyUshort(sc, 0x06);
27538                 Data |= BIT_15;
27539                 MP_WritePhyUshort(sc, 0x06, Data);
27540                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
27541 
27542                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
27543                 Data = MP_ReadPhyUshort(sc, 0x19);
27544                 Data &= ~BIT_0;
27545                 MP_WritePhyUshort(sc, 0x19, Data);
27546                 Data = MP_ReadPhyUshort(sc, 0x10);
27547                 Data &= ~BIT_10;
27548                 MP_WritePhyUshort(sc, 0x10, Data);
27549                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
27550         } else if (sc->re_type == MACFG_52) {
27551                 Data_u32 = re_eri_read(sc, 0x1D0, 4, ERIAR_ExGMAC);
27552                 Data_u32 &= ~BIT_1;
27553                 re_eri_write(sc, 0x1D0, 4, Data_u32, ERIAR_ExGMAC);
27554 
27555                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
27556                 MP_WritePhyUshort(sc, 0x05, 0x8B80);
27557                 Data = MP_ReadPhyUshort(sc, 0x06);
27558                 Data |= BIT_2 | BIT_1;
27559                 MP_WritePhyUshort(sc, 0x06, Data);
27560                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
27561 
27562                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
27563                 MP_WritePhyUshort(sc, 0x1E, 0x002D);
27564                 Data = MP_ReadPhyUshort(sc, 0x18);
27565                 Data |= BIT_4;
27566                 MP_WritePhyUshort(sc, 0x18, Data);
27567                 MP_WritePhyUshort(sc, 0x1f, 0x0002);
27568                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
27569                 Data = MP_ReadPhyUshort(sc, 0x14);
27570                 Data |= BIT_15;
27571                 MP_WritePhyUshort(sc, 0x14, Data);
27572 
27573                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
27574                 MP_WritePhyUshort(sc, 0x05, 0x8B86);
27575                 Data = MP_ReadPhyUshort(sc, 0x06);
27576                 Data |= BIT_0;
27577                 MP_WritePhyUshort(sc, 0x06, Data);
27578                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
27579 
27580                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
27581                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
27582                 Data = MP_ReadPhyUshort(sc, 0x06);
27583                 Data |= BIT_14;
27584                 MP_WritePhyUshort(sc, 0x06, Data);
27585                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
27586 
27587                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
27588                 MP_WritePhyUshort(sc, 0x09, 0xA20F);
27589                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
27590 
27591                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
27592                 MP_WritePhyUshort(sc, 0x05, 0x8B55);
27593                 MP_WritePhyUshort(sc, 0x06, 0x0000);
27594                 MP_WritePhyUshort(sc, 0x05, 0x8B5E);
27595                 MP_WritePhyUshort(sc, 0x06, 0x0000);
27596                 MP_WritePhyUshort(sc, 0x05, 0x8B67);
27597                 MP_WritePhyUshort(sc, 0x06, 0x0000);
27598                 MP_WritePhyUshort(sc, 0x05, 0x8B70);
27599                 MP_WritePhyUshort(sc, 0x06, 0x0000);
27600                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
27601                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
27602                 MP_WritePhyUshort(sc, 0x1E, 0x0078);
27603                 MP_WritePhyUshort(sc, 0x17, 0x0000);
27604                 MP_WritePhyUshort(sc, 0x19, 0x00FB);
27605                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
27606 
27607                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
27608                 MP_WritePhyUshort(sc, 0x05, 0x8B79);
27609                 MP_WritePhyUshort(sc, 0x06, 0xAA00);
27610                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
27611 
27612                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
27613                 MP_WritePhyUshort(sc, 0x01, 0x328A);
27614                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
27615 
27616                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
27617                 MP_WritePhyUshort(sc, 0x05, 0x8B54);
27618                 Data = MP_ReadPhyUshort(sc, 0x06);
27619                 Data &= ~BIT_11;
27620                 MP_WritePhyUshort(sc, 0x06, Data);
27621                 MP_WritePhyUshort(sc, 0x05, 0x8B5D);
27622                 Data = MP_ReadPhyUshort(sc, 0x06);
27623                 Data &= ~BIT_11;
27624                 MP_WritePhyUshort(sc, 0x06, Data);
27625                 MP_WritePhyUshort(sc, 0x05, 0x8A7C);
27626                 Data = MP_ReadPhyUshort(sc, 0x06);
27627                 Data &= ~BIT_8;
27628                 MP_WritePhyUshort(sc, 0x06, Data);
27629                 MP_WritePhyUshort(sc, 0x05, 0x8A7F);
27630                 Data = MP_ReadPhyUshort(sc, 0x06);
27631                 Data |= BIT_8;
27632                 MP_WritePhyUshort(sc, 0x06, Data);
27633                 MP_WritePhyUshort(sc, 0x05, 0x8A82);
27634                 Data = MP_ReadPhyUshort(sc, 0x06);
27635                 Data &= ~BIT_8;
27636                 MP_WritePhyUshort(sc, 0x06, Data);
27637                 MP_WritePhyUshort(sc, 0x05, 0x8A85);
27638                 Data = MP_ReadPhyUshort(sc, 0x06);
27639                 Data &= ~BIT_8;
27640                 MP_WritePhyUshort(sc, 0x06, Data);
27641                 MP_WritePhyUshort(sc, 0x05, 0x8A88);
27642                 Data = MP_ReadPhyUshort(sc, 0x06);
27643                 Data &= ~BIT_8;
27644                 MP_WritePhyUshort(sc, 0x06, Data);
27645                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
27646 
27647                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
27648                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
27649                 Data = MP_ReadPhyUshort(sc, 0x06);
27650                 Data |= BIT_15;
27651                 MP_WritePhyUshort(sc, 0x06, Data);
27652                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
27653 
27654                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
27655                 Data = MP_ReadPhyUshort(sc, 0x19);
27656                 Data &= ~BIT_0;
27657                 MP_WritePhyUshort(sc, 0x19, Data);
27658                 Data = MP_ReadPhyUshort(sc, 0x10);
27659                 Data &= ~BIT_10;
27660                 MP_WritePhyUshort(sc, 0x10, Data);
27661                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
27662         } else if (sc->re_type == MACFG_53) {
27663                 Data_u32 = re_eri_read(sc, 0x1D0, 4, ERIAR_ExGMAC);
27664                 Data_u32 &= 0xFFFF0000;
27665                 re_eri_write(sc, 0x1D0, 4, Data_u32, ERIAR_ExGMAC);
27666 
27667                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
27668                 MP_WritePhyUshort(sc, 0x18, 0x0310);
27669                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
27670 
27671                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
27672                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
27673                 MP_WritePhyUshort(sc, 0x19, 0x7070);
27674                 MP_WritePhyUshort(sc, 0x1c, 0x0600);
27675                 MP_WritePhyUshort(sc, 0x1d, 0x9700);
27676                 MP_WritePhyUshort(sc, 0x1d, 0x7d00);
27677                 MP_WritePhyUshort(sc, 0x1d, 0x6900);
27678                 MP_WritePhyUshort(sc, 0x1d, 0x7d00);
27679                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
27680                 MP_WritePhyUshort(sc, 0x1d, 0x4899);
27681                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27682                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
27683                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27684                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
27685                 MP_WritePhyUshort(sc, 0x1d, 0x8000);
27686                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27687                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
27688                 MP_WritePhyUshort(sc, 0x1d, 0x4007);
27689                 MP_WritePhyUshort(sc, 0x1d, 0x4400);
27690                 MP_WritePhyUshort(sc, 0x1d, 0x4800);
27691                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27692                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
27693                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
27694                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
27695                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
27696                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
27697                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27698                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27699                 MP_WritePhyUshort(sc, 0x1d, 0x571f);
27700                 MP_WritePhyUshort(sc, 0x1d, 0x5ffb);
27701                 MP_WritePhyUshort(sc, 0x1d, 0xaa03);
27702                 MP_WritePhyUshort(sc, 0x1d, 0x5b58);
27703                 MP_WritePhyUshort(sc, 0x1d, 0x301e);
27704                 MP_WritePhyUshort(sc, 0x1d, 0x5b64);
27705                 MP_WritePhyUshort(sc, 0x1d, 0xa6fc);
27706                 MP_WritePhyUshort(sc, 0x1d, 0xdcdb);
27707                 MP_WritePhyUshort(sc, 0x1d, 0x0015);
27708                 MP_WritePhyUshort(sc, 0x1d, 0xb915);
27709                 MP_WritePhyUshort(sc, 0x1d, 0xb511);
27710                 MP_WritePhyUshort(sc, 0x1d, 0xd16b);
27711                 MP_WritePhyUshort(sc, 0x1d, 0x000f);
27712                 MP_WritePhyUshort(sc, 0x1d, 0xb40f);
27713                 MP_WritePhyUshort(sc, 0x1d, 0xd06b);
27714                 MP_WritePhyUshort(sc, 0x1d, 0x000d);
27715                 MP_WritePhyUshort(sc, 0x1d, 0xb206);
27716                 MP_WritePhyUshort(sc, 0x1d, 0x7c01);
27717                 MP_WritePhyUshort(sc, 0x1d, 0x5800);
27718                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
27719                 MP_WritePhyUshort(sc, 0x1d, 0x5c00);
27720                 MP_WritePhyUshort(sc, 0x1d, 0x301a);
27721                 MP_WritePhyUshort(sc, 0x1d, 0x7c01);
27722                 MP_WritePhyUshort(sc, 0x1d, 0x5801);
27723                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
27724                 MP_WritePhyUshort(sc, 0x1d, 0x5c04);
27725                 MP_WritePhyUshort(sc, 0x1d, 0x301e);
27726                 MP_WritePhyUshort(sc, 0x1d, 0x3079);
27727                 MP_WritePhyUshort(sc, 0x1d, 0x30f1);
27728                 MP_WritePhyUshort(sc, 0x1d, 0x3199);
27729                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27730                 MP_WritePhyUshort(sc, 0x1d, 0x4c60);
27731                 MP_WritePhyUshort(sc, 0x1d, 0x6803);
27732                 MP_WritePhyUshort(sc, 0x1d, 0x6420);
27733                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27734                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27735                 MP_WritePhyUshort(sc, 0x1d, 0xaf03);
27736                 MP_WritePhyUshort(sc, 0x1d, 0x6015);
27737                 MP_WritePhyUshort(sc, 0x1d, 0x3040);
27738                 MP_WritePhyUshort(sc, 0x1d, 0x6017);
27739                 MP_WritePhyUshort(sc, 0x1d, 0x57e0);
27740                 MP_WritePhyUshort(sc, 0x1d, 0x580c);
27741                 MP_WritePhyUshort(sc, 0x1d, 0x588c);
27742                 MP_WritePhyUshort(sc, 0x1d, 0x5fa3);
27743                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27744                 MP_WritePhyUshort(sc, 0x1d, 0x4827);
27745                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27746                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
27747                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27748                 MP_WritePhyUshort(sc, 0x1d, 0x4c10);
27749                 MP_WritePhyUshort(sc, 0x1d, 0x8400);
27750                 MP_WritePhyUshort(sc, 0x1d, 0x7c30);
27751                 MP_WritePhyUshort(sc, 0x1d, 0x6020);
27752                 MP_WritePhyUshort(sc, 0x1d, 0x48bf);
27753                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27754                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
27755                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27756                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
27757                 MP_WritePhyUshort(sc, 0x1d, 0xd6cf);
27758                 MP_WritePhyUshort(sc, 0x1d, 0x0002);
27759                 MP_WritePhyUshort(sc, 0x1d, 0x80fe);
27760                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27761                 MP_WritePhyUshort(sc, 0x1d, 0x4c80);
27762                 MP_WritePhyUshort(sc, 0x1d, 0x7c20);
27763                 MP_WritePhyUshort(sc, 0x1d, 0x5c20);
27764                 MP_WritePhyUshort(sc, 0x1d, 0x481e);
27765                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27766                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
27767                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27768                 MP_WritePhyUshort(sc, 0x1d, 0x4c02);
27769                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
27770                 MP_WritePhyUshort(sc, 0x1d, 0x81ff);
27771                 MP_WritePhyUshort(sc, 0x1d, 0x30ba);
27772                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27773                 MP_WritePhyUshort(sc, 0x1d, 0x4d00);
27774                 MP_WritePhyUshort(sc, 0x1d, 0x4832);
27775                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27776                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
27777                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27778                 MP_WritePhyUshort(sc, 0x1d, 0x4c10);
27779                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
27780                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
27781                 MP_WritePhyUshort(sc, 0x1d, 0xa4cc);
27782                 MP_WritePhyUshort(sc, 0x1d, 0xd9b3);
27783                 MP_WritePhyUshort(sc, 0x1d, 0xfffe);
27784                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27785                 MP_WritePhyUshort(sc, 0x1d, 0x4d20);
27786                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
27787                 MP_WritePhyUshort(sc, 0x1d, 0x6200);
27788                 MP_WritePhyUshort(sc, 0x1d, 0x300b);
27789                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27790                 MP_WritePhyUshort(sc, 0x1d, 0x4dc0);
27791                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27792                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27793                 MP_WritePhyUshort(sc, 0x1d, 0xd09d);
27794                 MP_WritePhyUshort(sc, 0x1d, 0x0002);
27795                 MP_WritePhyUshort(sc, 0x1d, 0xb4fe);
27796                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27797                 MP_WritePhyUshort(sc, 0x1d, 0x4d80);
27798                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
27799                 MP_WritePhyUshort(sc, 0x1d, 0x6004);
27800                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
27801                 MP_WritePhyUshort(sc, 0x1d, 0x6802);
27802                 MP_WritePhyUshort(sc, 0x1d, 0x6720);
27803                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27804                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27805                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
27806                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
27807                 MP_WritePhyUshort(sc, 0x1d, 0x486c);
27808                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27809                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
27810                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27811                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
27812                 MP_WritePhyUshort(sc, 0x1d, 0x9503);
27813                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
27814                 MP_WritePhyUshort(sc, 0x1d, 0x6200);
27815                 MP_WritePhyUshort(sc, 0x1d, 0x571f);
27816                 MP_WritePhyUshort(sc, 0x1d, 0x5fbb);
27817                 MP_WritePhyUshort(sc, 0x1d, 0xaa03);
27818                 MP_WritePhyUshort(sc, 0x1d, 0x5b58);
27819                 MP_WritePhyUshort(sc, 0x1d, 0x3092);
27820                 MP_WritePhyUshort(sc, 0x1d, 0x5b64);
27821                 MP_WritePhyUshort(sc, 0x1d, 0xcdab);
27822                 MP_WritePhyUshort(sc, 0x1d, 0xff78);
27823                 MP_WritePhyUshort(sc, 0x1d, 0xcd8d);
27824                 MP_WritePhyUshort(sc, 0x1d, 0xff76);
27825                 MP_WritePhyUshort(sc, 0x1d, 0xd96b);
27826                 MP_WritePhyUshort(sc, 0x1d, 0xff74);
27827                 MP_WritePhyUshort(sc, 0x1d, 0xd0a0);
27828                 MP_WritePhyUshort(sc, 0x1d, 0xffd9);
27829                 MP_WritePhyUshort(sc, 0x1d, 0xcba0);
27830                 MP_WritePhyUshort(sc, 0x1d, 0x0003);
27831                 MP_WritePhyUshort(sc, 0x1d, 0x80f0);
27832                 MP_WritePhyUshort(sc, 0x1d, 0x309f);
27833                 MP_WritePhyUshort(sc, 0x1d, 0x30ac);
27834                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27835                 MP_WritePhyUshort(sc, 0x1d, 0x4ce0);
27836                 MP_WritePhyUshort(sc, 0x1d, 0x4832);
27837                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27838                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
27839                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27840                 MP_WritePhyUshort(sc, 0x1d, 0x4c08);
27841                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
27842                 MP_WritePhyUshort(sc, 0x1d, 0x6008);
27843                 MP_WritePhyUshort(sc, 0x1d, 0x8300);
27844                 MP_WritePhyUshort(sc, 0x1d, 0xb902);
27845                 MP_WritePhyUshort(sc, 0x1d, 0x3079);
27846                 MP_WritePhyUshort(sc, 0x1d, 0x3061);
27847                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27848                 MP_WritePhyUshort(sc, 0x1d, 0x4da0);
27849                 MP_WritePhyUshort(sc, 0x1d, 0x6400);
27850                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27851                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27852                 MP_WritePhyUshort(sc, 0x1d, 0x57a0);
27853                 MP_WritePhyUshort(sc, 0x1d, 0x590c);
27854                 MP_WritePhyUshort(sc, 0x1d, 0x5fa3);
27855                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27856                 MP_WritePhyUshort(sc, 0x1d, 0xcba4);
27857                 MP_WritePhyUshort(sc, 0x1d, 0x0004);
27858                 MP_WritePhyUshort(sc, 0x1d, 0xcd8d);
27859                 MP_WritePhyUshort(sc, 0x1d, 0x0002);
27860                 MP_WritePhyUshort(sc, 0x1d, 0x80fc);
27861                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27862                 MP_WritePhyUshort(sc, 0x1d, 0x4ca0);
27863                 MP_WritePhyUshort(sc, 0x1d, 0xb603);
27864                 MP_WritePhyUshort(sc, 0x1d, 0x7c10);
27865                 MP_WritePhyUshort(sc, 0x1d, 0x6010);
27866                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27867                 MP_WritePhyUshort(sc, 0x1d, 0x541f);
27868                 MP_WritePhyUshort(sc, 0x1d, 0x5fb3);
27869                 MP_WritePhyUshort(sc, 0x1d, 0xaa05);
27870                 MP_WritePhyUshort(sc, 0x1d, 0x7c80);
27871                 MP_WritePhyUshort(sc, 0x1d, 0x5800);
27872                 MP_WritePhyUshort(sc, 0x1d, 0x5b58);
27873                 MP_WritePhyUshort(sc, 0x1d, 0x30ca);
27874                 MP_WritePhyUshort(sc, 0x1d, 0x7c80);
27875                 MP_WritePhyUshort(sc, 0x1d, 0x5800);
27876                 MP_WritePhyUshort(sc, 0x1d, 0x5b64);
27877                 MP_WritePhyUshort(sc, 0x1d, 0x4824);
27878                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27879                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
27880                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27881                 MP_WritePhyUshort(sc, 0x1d, 0x4c04);
27882                 MP_WritePhyUshort(sc, 0x1d, 0x8200);
27883                 MP_WritePhyUshort(sc, 0x1d, 0x4827);
27884                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27885                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
27886                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27887                 MP_WritePhyUshort(sc, 0x1d, 0x4c10);
27888                 MP_WritePhyUshort(sc, 0x1d, 0x8400);
27889                 MP_WritePhyUshort(sc, 0x1d, 0x7c10);
27890                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
27891                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27892                 MP_WritePhyUshort(sc, 0x1d, 0x4cc0);
27893                 MP_WritePhyUshort(sc, 0x1d, 0x5fbb);
27894                 MP_WritePhyUshort(sc, 0x1d, 0x4824);
27895                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27896                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
27897                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27898                 MP_WritePhyUshort(sc, 0x1d, 0x4c04);
27899                 MP_WritePhyUshort(sc, 0x1d, 0x8200);
27900                 MP_WritePhyUshort(sc, 0x1d, 0x7ce0);
27901                 MP_WritePhyUshort(sc, 0x1d, 0x5400);
27902                 MP_WritePhyUshort(sc, 0x1d, 0x6720);
27903                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27904                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27905                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
27906                 MP_WritePhyUshort(sc, 0x1d, 0x6a00);
27907                 MP_WritePhyUshort(sc, 0x1d, 0x4824);
27908                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27909                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
27910                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27911                 MP_WritePhyUshort(sc, 0x1d, 0x4c04);
27912                 MP_WritePhyUshort(sc, 0x1d, 0x8200);
27913                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
27914                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
27915                 MP_WritePhyUshort(sc, 0x1d, 0x309f);
27916                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27917                 MP_WritePhyUshort(sc, 0x1d, 0x4e00);
27918                 MP_WritePhyUshort(sc, 0x1d, 0x4007);
27919                 MP_WritePhyUshort(sc, 0x1d, 0x4400);
27920                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
27921                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
27922                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
27923                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27924                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27925                 MP_WritePhyUshort(sc, 0x1d, 0x570f);
27926                 MP_WritePhyUshort(sc, 0x1d, 0x5fff);
27927                 MP_WritePhyUshort(sc, 0x1d, 0xaa03);
27928                 MP_WritePhyUshort(sc, 0x1d, 0x585b);
27929                 MP_WritePhyUshort(sc, 0x1d, 0x3100);
27930                 MP_WritePhyUshort(sc, 0x1d, 0x5867);
27931                 MP_WritePhyUshort(sc, 0x1d, 0x9403);
27932                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
27933                 MP_WritePhyUshort(sc, 0x1d, 0x6200);
27934                 MP_WritePhyUshort(sc, 0x1d, 0xcda3);
27935                 MP_WritePhyUshort(sc, 0x1d, 0x002d);
27936                 MP_WritePhyUshort(sc, 0x1d, 0xcd85);
27937                 MP_WritePhyUshort(sc, 0x1d, 0x002b);
27938                 MP_WritePhyUshort(sc, 0x1d, 0xd96b);
27939                 MP_WritePhyUshort(sc, 0x1d, 0x0029);
27940                 MP_WritePhyUshort(sc, 0x1d, 0x9629);
27941                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
27942                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
27943                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27944                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27945                 MP_WritePhyUshort(sc, 0x1d, 0x9624);
27946                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27947                 MP_WritePhyUshort(sc, 0x1d, 0x4e20);
27948                 MP_WritePhyUshort(sc, 0x1d, 0x8b04);
27949                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
27950                 MP_WritePhyUshort(sc, 0x1d, 0x5008);
27951                 MP_WritePhyUshort(sc, 0x1d, 0xab03);
27952                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
27953                 MP_WritePhyUshort(sc, 0x1d, 0x5000);
27954                 MP_WritePhyUshort(sc, 0x1d, 0x6801);
27955                 MP_WritePhyUshort(sc, 0x1d, 0x6776);
27956                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27957                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27958                 MP_WritePhyUshort(sc, 0x1d, 0xdb7c);
27959                 MP_WritePhyUshort(sc, 0x1d, 0xffee);
27960                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
27961                 MP_WritePhyUshort(sc, 0x1d, 0x7fe1);
27962                 MP_WritePhyUshort(sc, 0x1d, 0x4e40);
27963                 MP_WritePhyUshort(sc, 0x1d, 0x4837);
27964                 MP_WritePhyUshort(sc, 0x1d, 0x4418);
27965                 MP_WritePhyUshort(sc, 0x1d, 0x41c7);
27966                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27967                 MP_WritePhyUshort(sc, 0x1d, 0x4e40);
27968                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
27969                 MP_WritePhyUshort(sc, 0x1d, 0x5400);
27970                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27971                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
27972                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27973                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
27974                 MP_WritePhyUshort(sc, 0x1d, 0x8f07);
27975                 MP_WritePhyUshort(sc, 0x1d, 0xd2a0);
27976                 MP_WritePhyUshort(sc, 0x1d, 0x004c);
27977                 MP_WritePhyUshort(sc, 0x1d, 0x9205);
27978                 MP_WritePhyUshort(sc, 0x1d, 0xa043);
27979                 MP_WritePhyUshort(sc, 0x1d, 0x312b);
27980                 MP_WritePhyUshort(sc, 0x1d, 0x300b);
27981                 MP_WritePhyUshort(sc, 0x1d, 0x30f1);
27982                 MP_WritePhyUshort(sc, 0x1d, 0x7fe1);
27983                 MP_WritePhyUshort(sc, 0x1d, 0x4e60);
27984                 MP_WritePhyUshort(sc, 0x1d, 0x489c);
27985                 MP_WritePhyUshort(sc, 0x1d, 0x4628);
27986                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
27987                 MP_WritePhyUshort(sc, 0x1d, 0x4e60);
27988                 MP_WritePhyUshort(sc, 0x1d, 0x7e28);
27989                 MP_WritePhyUshort(sc, 0x1d, 0x4628);
27990                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
27991                 MP_WritePhyUshort(sc, 0x1d, 0x5400);
27992                 MP_WritePhyUshort(sc, 0x1d, 0x7c01);
27993                 MP_WritePhyUshort(sc, 0x1d, 0x5800);
27994                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
27995                 MP_WritePhyUshort(sc, 0x1d, 0x5c00);
27996                 MP_WritePhyUshort(sc, 0x1d, 0x41e8);
27997                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
27998                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
27999                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28000                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
28001                 MP_WritePhyUshort(sc, 0x1d, 0x8fec);
28002                 MP_WritePhyUshort(sc, 0x1d, 0xb241);
28003                 MP_WritePhyUshort(sc, 0x1d, 0xa02a);
28004                 MP_WritePhyUshort(sc, 0x1d, 0x3146);
28005                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
28006                 MP_WritePhyUshort(sc, 0x1d, 0x4ea0);
28007                 MP_WritePhyUshort(sc, 0x1d, 0x7c02);
28008                 MP_WritePhyUshort(sc, 0x1d, 0x4402);
28009                 MP_WritePhyUshort(sc, 0x1d, 0x4448);
28010                 MP_WritePhyUshort(sc, 0x1d, 0x4894);
28011                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28012                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
28013                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28014                 MP_WritePhyUshort(sc, 0x1d, 0x4c03);
28015                 MP_WritePhyUshort(sc, 0x1d, 0x4824);
28016                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28017                 MP_WritePhyUshort(sc, 0x1d, 0x4c07);
28018                 MP_WritePhyUshort(sc, 0x1d, 0x41ef);
28019                 MP_WritePhyUshort(sc, 0x1d, 0x41ff);
28020                 MP_WritePhyUshort(sc, 0x1d, 0x4891);
28021                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28022                 MP_WritePhyUshort(sc, 0x1d, 0x4c07);
28023                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28024                 MP_WritePhyUshort(sc, 0x1d, 0x4c17);
28025                 MP_WritePhyUshort(sc, 0x1d, 0x8400);
28026                 MP_WritePhyUshort(sc, 0x1d, 0x8ef8);
28027                 MP_WritePhyUshort(sc, 0x1d, 0x41c7);
28028                 MP_WritePhyUshort(sc, 0x1d, 0x8fd1);
28029                 MP_WritePhyUshort(sc, 0x1d, 0x92d5);
28030                 MP_WritePhyUshort(sc, 0x1d, 0xa10f);
28031                 MP_WritePhyUshort(sc, 0x1d, 0xd480);
28032                 MP_WritePhyUshort(sc, 0x1d, 0x0008);
28033                 MP_WritePhyUshort(sc, 0x1d, 0xd580);
28034                 MP_WritePhyUshort(sc, 0x1d, 0xffb7);
28035                 MP_WritePhyUshort(sc, 0x1d, 0xa202);
28036                 MP_WritePhyUshort(sc, 0x1d, 0x3161);
28037                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
28038                 MP_WritePhyUshort(sc, 0x1d, 0x4404);
28039                 MP_WritePhyUshort(sc, 0x1d, 0x3161);
28040                 MP_WritePhyUshort(sc, 0x1d, 0xd484);
28041                 MP_WritePhyUshort(sc, 0x1d, 0xfff3);
28042                 MP_WritePhyUshort(sc, 0x1d, 0xd484);
28043                 MP_WritePhyUshort(sc, 0x1d, 0xfff1);
28044                 MP_WritePhyUshort(sc, 0x1d, 0x30f1);
28045                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
28046                 MP_WritePhyUshort(sc, 0x1d, 0x4ee0);
28047                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
28048                 MP_WritePhyUshort(sc, 0x1d, 0x5400);
28049                 MP_WritePhyUshort(sc, 0x1d, 0x4488);
28050                 MP_WritePhyUshort(sc, 0x1d, 0x41cf);
28051                 MP_WritePhyUshort(sc, 0x1d, 0x30f1);
28052                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
28053                 MP_WritePhyUshort(sc, 0x1d, 0x4ec0);
28054                 MP_WritePhyUshort(sc, 0x1d, 0x48f3);
28055                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28056                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
28057                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28058                 MP_WritePhyUshort(sc, 0x1d, 0x4c09);
28059                 MP_WritePhyUshort(sc, 0x1d, 0x4508);
28060                 MP_WritePhyUshort(sc, 0x1d, 0x41c7);
28061                 MP_WritePhyUshort(sc, 0x1d, 0x8fb0);
28062                 MP_WritePhyUshort(sc, 0x1d, 0xd218);
28063                 MP_WritePhyUshort(sc, 0x1d, 0xffae);
28064                 MP_WritePhyUshort(sc, 0x1d, 0xd2a4);
28065                 MP_WritePhyUshort(sc, 0x1d, 0xff9d);
28066                 MP_WritePhyUshort(sc, 0x1d, 0x3182);
28067                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
28068                 MP_WritePhyUshort(sc, 0x1d, 0x4e80);
28069                 MP_WritePhyUshort(sc, 0x1d, 0x4832);
28070                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28071                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
28072                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28073                 MP_WritePhyUshort(sc, 0x1d, 0x4c11);
28074                 MP_WritePhyUshort(sc, 0x1d, 0x4428);
28075                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
28076                 MP_WritePhyUshort(sc, 0x1d, 0x5440);
28077                 MP_WritePhyUshort(sc, 0x1d, 0x7c01);
28078                 MP_WritePhyUshort(sc, 0x1d, 0x5801);
28079                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
28080                 MP_WritePhyUshort(sc, 0x1d, 0x5c04);
28081                 MP_WritePhyUshort(sc, 0x1d, 0x41e8);
28082                 MP_WritePhyUshort(sc, 0x1d, 0xa4b3);
28083                 MP_WritePhyUshort(sc, 0x1d, 0x3197);
28084                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
28085                 MP_WritePhyUshort(sc, 0x1d, 0x4f20);
28086                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
28087                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
28088                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
28089                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
28090                 MP_WritePhyUshort(sc, 0x1d, 0x570f);
28091                 MP_WritePhyUshort(sc, 0x1d, 0x5fff);
28092                 MP_WritePhyUshort(sc, 0x1d, 0xaa03);
28093                 MP_WritePhyUshort(sc, 0x1d, 0x585b);
28094                 MP_WritePhyUshort(sc, 0x1d, 0x31a5);
28095                 MP_WritePhyUshort(sc, 0x1d, 0x5867);
28096                 MP_WritePhyUshort(sc, 0x1d, 0xbcf4);
28097                 MP_WritePhyUshort(sc, 0x1d, 0x300b);
28098                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
28099                 MP_WritePhyUshort(sc, 0x1c, 0x0200);
28100                 MP_WritePhyUshort(sc, 0x19, 0x7030);
28101                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
28102 
28103                 if (phy_power_saving == 1) {
28104                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
28105                         MP_WritePhyUshort(sc, 0x18, 0x8310);
28106                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
28107                 } else {
28108                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
28109                         MP_WritePhyUshort(sc, 0x18, 0x0310);
28110                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
28111                         DELAY(20000);
28112                 }
28113 
28114                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
28115                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
28116                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
28117                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
28118                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
28119                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
28120         } else if (sc->re_type == MACFG_54 || sc->re_type == MACFG_55) {
28121                 Data_u32 = re_eri_read(sc, 0x1D0, 4, ERIAR_ExGMAC);
28122                 Data_u32 &= 0xFFFF0000;
28123                 re_eri_write(sc, 0x1D0, 4, Data_u32, ERIAR_ExGMAC);
28124 
28125                 if (sc->re_type == MACFG_55) {
28126                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
28127                         MP_WritePhyUshort(sc, 0x18, 0x0310);
28128                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
28129 
28130                         MP_WritePhyUshort(sc, 0x1f, 0x0004);
28131                         MP_WritePhyUshort(sc, 0x1f, 0x0004);
28132                         MP_WritePhyUshort(sc, 0x19, 0x7070);
28133                         MP_WritePhyUshort(sc, 0x1c, 0x0600);
28134                         MP_WritePhyUshort(sc, 0x1d, 0x9700);
28135                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
28136                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
28137                         MP_WritePhyUshort(sc, 0x1d, 0x4007);
28138                         MP_WritePhyUshort(sc, 0x1d, 0x4400);
28139                         MP_WritePhyUshort(sc, 0x1d, 0x4800);
28140                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28141                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
28142                         MP_WritePhyUshort(sc, 0x1d, 0x5310);
28143                         MP_WritePhyUshort(sc, 0x1d, 0x6000);
28144                         MP_WritePhyUshort(sc, 0x1d, 0x6800);
28145                         MP_WritePhyUshort(sc, 0x1d, 0x673e);
28146                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28147                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28148                         MP_WritePhyUshort(sc, 0x1d, 0x571f);
28149                         MP_WritePhyUshort(sc, 0x1d, 0x5ffb);
28150                         MP_WritePhyUshort(sc, 0x1d, 0xaa04);
28151                         MP_WritePhyUshort(sc, 0x1d, 0x5b58);
28152                         MP_WritePhyUshort(sc, 0x1d, 0x6100);
28153                         MP_WritePhyUshort(sc, 0x1d, 0x3016);
28154                         MP_WritePhyUshort(sc, 0x1d, 0x5b64);
28155                         MP_WritePhyUshort(sc, 0x1d, 0x6080);
28156                         MP_WritePhyUshort(sc, 0x1d, 0xa6fa);
28157                         MP_WritePhyUshort(sc, 0x1d, 0xdcdb);
28158                         MP_WritePhyUshort(sc, 0x1d, 0x0015);
28159                         MP_WritePhyUshort(sc, 0x1d, 0xb915);
28160                         MP_WritePhyUshort(sc, 0x1d, 0xb511);
28161                         MP_WritePhyUshort(sc, 0x1d, 0xd16b);
28162                         MP_WritePhyUshort(sc, 0x1d, 0x000f);
28163                         MP_WritePhyUshort(sc, 0x1d, 0xb40f);
28164                         MP_WritePhyUshort(sc, 0x1d, 0xd06b);
28165                         MP_WritePhyUshort(sc, 0x1d, 0x000d);
28166                         MP_WritePhyUshort(sc, 0x1d, 0xb206);
28167                         MP_WritePhyUshort(sc, 0x1d, 0x7c01);
28168                         MP_WritePhyUshort(sc, 0x1d, 0x5800);
28169                         MP_WritePhyUshort(sc, 0x1d, 0x7c04);
28170                         MP_WritePhyUshort(sc, 0x1d, 0x5c00);
28171                         MP_WritePhyUshort(sc, 0x1d, 0x3010);
28172                         MP_WritePhyUshort(sc, 0x1d, 0x7c01);
28173                         MP_WritePhyUshort(sc, 0x1d, 0x5801);
28174                         MP_WritePhyUshort(sc, 0x1d, 0x7c04);
28175                         MP_WritePhyUshort(sc, 0x1d, 0x5c04);
28176                         MP_WritePhyUshort(sc, 0x1d, 0x3016);
28177                         MP_WritePhyUshort(sc, 0x1d, 0x307e);
28178                         MP_WritePhyUshort(sc, 0x1d, 0x30f4);
28179                         MP_WritePhyUshort(sc, 0x1d, 0x319f);
28180                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
28181                         MP_WritePhyUshort(sc, 0x1d, 0x4c60);
28182                         MP_WritePhyUshort(sc, 0x1d, 0x6803);
28183                         MP_WritePhyUshort(sc, 0x1d, 0x7d00);
28184                         MP_WritePhyUshort(sc, 0x1d, 0x6900);
28185                         MP_WritePhyUshort(sc, 0x1d, 0x6520);
28186                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28187                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28188                         MP_WritePhyUshort(sc, 0x1d, 0xaf03);
28189                         MP_WritePhyUshort(sc, 0x1d, 0x6115);
28190                         MP_WritePhyUshort(sc, 0x1d, 0x303a);
28191                         MP_WritePhyUshort(sc, 0x1d, 0x6097);
28192                         MP_WritePhyUshort(sc, 0x1d, 0x57e0);
28193                         MP_WritePhyUshort(sc, 0x1d, 0x580c);
28194                         MP_WritePhyUshort(sc, 0x1d, 0x588c);
28195                         MP_WritePhyUshort(sc, 0x1d, 0x5f80);
28196                         MP_WritePhyUshort(sc, 0x1d, 0x4827);
28197                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28198                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
28199                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28200                         MP_WritePhyUshort(sc, 0x1d, 0x4c10);
28201                         MP_WritePhyUshort(sc, 0x1d, 0x8400);
28202                         MP_WritePhyUshort(sc, 0x1d, 0x7c30);
28203                         MP_WritePhyUshort(sc, 0x1d, 0x6020);
28204                         MP_WritePhyUshort(sc, 0x1d, 0x48bf);
28205                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28206                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
28207                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28208                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
28209                         MP_WritePhyUshort(sc, 0x1d, 0xb802);
28210                         MP_WritePhyUshort(sc, 0x1d, 0x3053);
28211                         MP_WritePhyUshort(sc, 0x1d, 0x7c08);
28212                         MP_WritePhyUshort(sc, 0x1d, 0x6808);
28213                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28214                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28215                         MP_WritePhyUshort(sc, 0x1d, 0x7c10);
28216                         MP_WritePhyUshort(sc, 0x1d, 0x6810);
28217                         MP_WritePhyUshort(sc, 0x1d, 0xd6cf);
28218                         MP_WritePhyUshort(sc, 0x1d, 0x0002);
28219                         MP_WritePhyUshort(sc, 0x1d, 0x80fe);
28220                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
28221                         MP_WritePhyUshort(sc, 0x1d, 0x4c80);
28222                         MP_WritePhyUshort(sc, 0x1d, 0x7c10);
28223                         MP_WritePhyUshort(sc, 0x1d, 0x6800);
28224                         MP_WritePhyUshort(sc, 0x1d, 0x7c08);
28225                         MP_WritePhyUshort(sc, 0x1d, 0x6800);
28226                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28227                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28228                         MP_WritePhyUshort(sc, 0x1d, 0x7c23);
28229                         MP_WritePhyUshort(sc, 0x1d, 0x5c23);
28230                         MP_WritePhyUshort(sc, 0x1d, 0x481e);
28231                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28232                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
28233                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28234                         MP_WritePhyUshort(sc, 0x1d, 0x4c02);
28235                         MP_WritePhyUshort(sc, 0x1d, 0x5310);
28236                         MP_WritePhyUshort(sc, 0x1d, 0x81ff);
28237                         MP_WritePhyUshort(sc, 0x1d, 0x30c1);
28238                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
28239                         MP_WritePhyUshort(sc, 0x1d, 0x4d00);
28240                         MP_WritePhyUshort(sc, 0x1d, 0x4832);
28241                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28242                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
28243                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28244                         MP_WritePhyUshort(sc, 0x1d, 0x4c10);
28245                         MP_WritePhyUshort(sc, 0x1d, 0x7c08);
28246                         MP_WritePhyUshort(sc, 0x1d, 0x6000);
28247                         MP_WritePhyUshort(sc, 0x1d, 0xa4bd);
28248                         MP_WritePhyUshort(sc, 0x1d, 0xd9b3);
28249                         MP_WritePhyUshort(sc, 0x1d, 0x00fe);
28250                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
28251                         MP_WritePhyUshort(sc, 0x1d, 0x4d20);
28252                         MP_WritePhyUshort(sc, 0x1d, 0x7e00);
28253                         MP_WritePhyUshort(sc, 0x1d, 0x6200);
28254                         MP_WritePhyUshort(sc, 0x1d, 0x3001);
28255                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
28256                         MP_WritePhyUshort(sc, 0x1d, 0x4dc0);
28257                         MP_WritePhyUshort(sc, 0x1d, 0xd09d);
28258                         MP_WritePhyUshort(sc, 0x1d, 0x0002);
28259                         MP_WritePhyUshort(sc, 0x1d, 0xb4fe);
28260                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
28261                         MP_WritePhyUshort(sc, 0x1d, 0x4d80);
28262                         MP_WritePhyUshort(sc, 0x1d, 0x7c04);
28263                         MP_WritePhyUshort(sc, 0x1d, 0x6004);
28264                         MP_WritePhyUshort(sc, 0x1d, 0x6802);
28265                         MP_WritePhyUshort(sc, 0x1d, 0x6728);
28266                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28267                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28268                         MP_WritePhyUshort(sc, 0x1d, 0x7c08);
28269                         MP_WritePhyUshort(sc, 0x1d, 0x6000);
28270                         MP_WritePhyUshort(sc, 0x1d, 0x486c);
28271                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28272                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
28273                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28274                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
28275                         MP_WritePhyUshort(sc, 0x1d, 0x9503);
28276                         MP_WritePhyUshort(sc, 0x1d, 0x7e00);
28277                         MP_WritePhyUshort(sc, 0x1d, 0x6200);
28278                         MP_WritePhyUshort(sc, 0x1d, 0x571f);
28279                         MP_WritePhyUshort(sc, 0x1d, 0x5fbb);
28280                         MP_WritePhyUshort(sc, 0x1d, 0xaa05);
28281                         MP_WritePhyUshort(sc, 0x1d, 0x5b58);
28282                         MP_WritePhyUshort(sc, 0x1d, 0x7d80);
28283                         MP_WritePhyUshort(sc, 0x1d, 0x6100);
28284                         MP_WritePhyUshort(sc, 0x1d, 0x309a);
28285                         MP_WritePhyUshort(sc, 0x1d, 0x5b64);
28286                         MP_WritePhyUshort(sc, 0x1d, 0x7d80);
28287                         MP_WritePhyUshort(sc, 0x1d, 0x6080);
28288                         MP_WritePhyUshort(sc, 0x1d, 0xcdab);
28289                         MP_WritePhyUshort(sc, 0x1d, 0x0058);
28290                         MP_WritePhyUshort(sc, 0x1d, 0xcd8d);
28291                         MP_WritePhyUshort(sc, 0x1d, 0x0056);
28292                         MP_WritePhyUshort(sc, 0x1d, 0xd96b);
28293                         MP_WritePhyUshort(sc, 0x1d, 0x0054);
28294                         MP_WritePhyUshort(sc, 0x1d, 0xd0a0);
28295                         MP_WritePhyUshort(sc, 0x1d, 0x00d8);
28296                         MP_WritePhyUshort(sc, 0x1d, 0xcba0);
28297                         MP_WritePhyUshort(sc, 0x1d, 0x0003);
28298                         MP_WritePhyUshort(sc, 0x1d, 0x80ec);
28299                         MP_WritePhyUshort(sc, 0x1d, 0x30a7);
28300                         MP_WritePhyUshort(sc, 0x1d, 0x30b4);
28301                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
28302                         MP_WritePhyUshort(sc, 0x1d, 0x4ce0);
28303                         MP_WritePhyUshort(sc, 0x1d, 0x4832);
28304                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28305                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
28306                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28307                         MP_WritePhyUshort(sc, 0x1d, 0x4c08);
28308                         MP_WritePhyUshort(sc, 0x1d, 0x7c08);
28309                         MP_WritePhyUshort(sc, 0x1d, 0x6008);
28310                         MP_WritePhyUshort(sc, 0x1d, 0x8300);
28311                         MP_WritePhyUshort(sc, 0x1d, 0xb902);
28312                         MP_WritePhyUshort(sc, 0x1d, 0x307e);
28313                         MP_WritePhyUshort(sc, 0x1d, 0x3068);
28314                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
28315                         MP_WritePhyUshort(sc, 0x1d, 0x4da0);
28316                         MP_WritePhyUshort(sc, 0x1d, 0x6608);
28317                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28318                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28319                         MP_WritePhyUshort(sc, 0x1d, 0x56a0);
28320                         MP_WritePhyUshort(sc, 0x1d, 0x590c);
28321                         MP_WritePhyUshort(sc, 0x1d, 0x5fa0);
28322                         MP_WritePhyUshort(sc, 0x1d, 0xcba4);
28323                         MP_WritePhyUshort(sc, 0x1d, 0x0004);
28324                         MP_WritePhyUshort(sc, 0x1d, 0xcd8d);
28325                         MP_WritePhyUshort(sc, 0x1d, 0x0002);
28326                         MP_WritePhyUshort(sc, 0x1d, 0x80fc);
28327                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
28328                         MP_WritePhyUshort(sc, 0x1d, 0x4ca0);
28329                         MP_WritePhyUshort(sc, 0x1d, 0x7c08);
28330                         MP_WritePhyUshort(sc, 0x1d, 0x6408);
28331                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28332                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28333                         MP_WritePhyUshort(sc, 0x1d, 0x7d00);
28334                         MP_WritePhyUshort(sc, 0x1d, 0x6800);
28335                         MP_WritePhyUshort(sc, 0x1d, 0xb603);
28336                         MP_WritePhyUshort(sc, 0x1d, 0x7c10);
28337                         MP_WritePhyUshort(sc, 0x1d, 0x6010);
28338                         MP_WritePhyUshort(sc, 0x1d, 0x7d1f);
28339                         MP_WritePhyUshort(sc, 0x1d, 0x551f);
28340                         MP_WritePhyUshort(sc, 0x1d, 0x5fb3);
28341                         MP_WritePhyUshort(sc, 0x1d, 0xaa05);
28342                         MP_WritePhyUshort(sc, 0x1d, 0x7c80);
28343                         MP_WritePhyUshort(sc, 0x1d, 0x5800);
28344                         MP_WritePhyUshort(sc, 0x1d, 0x5b58);
28345                         MP_WritePhyUshort(sc, 0x1d, 0x30d7);
28346                         MP_WritePhyUshort(sc, 0x1d, 0x7c80);
28347                         MP_WritePhyUshort(sc, 0x1d, 0x5800);
28348                         MP_WritePhyUshort(sc, 0x1d, 0x5b64);
28349                         MP_WritePhyUshort(sc, 0x1d, 0x4827);
28350                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28351                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
28352                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28353                         MP_WritePhyUshort(sc, 0x1d, 0x4c10);
28354                         MP_WritePhyUshort(sc, 0x1d, 0x8400);
28355                         MP_WritePhyUshort(sc, 0x1d, 0x7c10);
28356                         MP_WritePhyUshort(sc, 0x1d, 0x6000);
28357                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
28358                         MP_WritePhyUshort(sc, 0x1d, 0x4cc0);
28359                         MP_WritePhyUshort(sc, 0x1d, 0x7d00);
28360                         MP_WritePhyUshort(sc, 0x1d, 0x6400);
28361                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28362                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28363                         MP_WritePhyUshort(sc, 0x1d, 0x5fbb);
28364                         MP_WritePhyUshort(sc, 0x1d, 0x4824);
28365                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28366                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
28367                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28368                         MP_WritePhyUshort(sc, 0x1d, 0x4c04);
28369                         MP_WritePhyUshort(sc, 0x1d, 0x8200);
28370                         MP_WritePhyUshort(sc, 0x1d, 0x7ce0);
28371                         MP_WritePhyUshort(sc, 0x1d, 0x5400);
28372                         MP_WritePhyUshort(sc, 0x1d, 0x7d00);
28373                         MP_WritePhyUshort(sc, 0x1d, 0x6500);
28374                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28375                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28376                         MP_WritePhyUshort(sc, 0x1d, 0x30a7);
28377                         MP_WritePhyUshort(sc, 0x1d, 0x3001);
28378                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
28379                         MP_WritePhyUshort(sc, 0x1d, 0x4e00);
28380                         MP_WritePhyUshort(sc, 0x1d, 0x4007);
28381                         MP_WritePhyUshort(sc, 0x1d, 0x4400);
28382                         MP_WritePhyUshort(sc, 0x1d, 0x5310);
28383                         MP_WritePhyUshort(sc, 0x1d, 0x6800);
28384                         MP_WritePhyUshort(sc, 0x1d, 0x673e);
28385                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28386                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28387                         MP_WritePhyUshort(sc, 0x1d, 0x570f);
28388                         MP_WritePhyUshort(sc, 0x1d, 0x5fff);
28389                         MP_WritePhyUshort(sc, 0x1d, 0xaa05);
28390                         MP_WritePhyUshort(sc, 0x1d, 0x585b);
28391                         MP_WritePhyUshort(sc, 0x1d, 0x7d80);
28392                         MP_WritePhyUshort(sc, 0x1d, 0x6100);
28393                         MP_WritePhyUshort(sc, 0x1d, 0x3107);
28394                         MP_WritePhyUshort(sc, 0x1d, 0x5867);
28395                         MP_WritePhyUshort(sc, 0x1d, 0x7d80);
28396                         MP_WritePhyUshort(sc, 0x1d, 0x6080);
28397                         MP_WritePhyUshort(sc, 0x1d, 0x9403);
28398                         MP_WritePhyUshort(sc, 0x1d, 0x7e00);
28399                         MP_WritePhyUshort(sc, 0x1d, 0x6200);
28400                         MP_WritePhyUshort(sc, 0x1d, 0xcda3);
28401                         MP_WritePhyUshort(sc, 0x1d, 0x00e8);
28402                         MP_WritePhyUshort(sc, 0x1d, 0xcd85);
28403                         MP_WritePhyUshort(sc, 0x1d, 0x00e6);
28404                         MP_WritePhyUshort(sc, 0x1d, 0xd96b);
28405                         MP_WritePhyUshort(sc, 0x1d, 0x00e4);
28406                         MP_WritePhyUshort(sc, 0x1d, 0x96e4);
28407                         MP_WritePhyUshort(sc, 0x1d, 0x6800);
28408                         MP_WritePhyUshort(sc, 0x1d, 0x673e);
28409                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28410                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28411                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
28412                         MP_WritePhyUshort(sc, 0x1d, 0x4e20);
28413                         MP_WritePhyUshort(sc, 0x1d, 0x96dd);
28414                         MP_WritePhyUshort(sc, 0x1d, 0x8b04);
28415                         MP_WritePhyUshort(sc, 0x1d, 0x7c08);
28416                         MP_WritePhyUshort(sc, 0x1d, 0x5008);
28417                         MP_WritePhyUshort(sc, 0x1d, 0xab03);
28418                         MP_WritePhyUshort(sc, 0x1d, 0x7c08);
28419                         MP_WritePhyUshort(sc, 0x1d, 0x5000);
28420                         MP_WritePhyUshort(sc, 0x1d, 0x6801);
28421                         MP_WritePhyUshort(sc, 0x1d, 0x677e);
28422                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28423                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28424                         MP_WritePhyUshort(sc, 0x1d, 0xdb7c);
28425                         MP_WritePhyUshort(sc, 0x1d, 0x00ee);
28426                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28427                         MP_WritePhyUshort(sc, 0x1d, 0x7fe1);
28428                         MP_WritePhyUshort(sc, 0x1d, 0x4e40);
28429                         MP_WritePhyUshort(sc, 0x1d, 0x4837);
28430                         MP_WritePhyUshort(sc, 0x1d, 0x4418);
28431                         MP_WritePhyUshort(sc, 0x1d, 0x41c7);
28432                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
28433                         MP_WritePhyUshort(sc, 0x1d, 0x4e40);
28434                         MP_WritePhyUshort(sc, 0x1d, 0x7c40);
28435                         MP_WritePhyUshort(sc, 0x1d, 0x5400);
28436                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28437                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
28438                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28439                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
28440                         MP_WritePhyUshort(sc, 0x1d, 0x8fc2);
28441                         MP_WritePhyUshort(sc, 0x1d, 0xd2a0);
28442                         MP_WritePhyUshort(sc, 0x1d, 0x004b);
28443                         MP_WritePhyUshort(sc, 0x1d, 0x9204);
28444                         MP_WritePhyUshort(sc, 0x1d, 0xa042);
28445                         MP_WritePhyUshort(sc, 0x1d, 0x3132);
28446                         MP_WritePhyUshort(sc, 0x1d, 0x30f4);
28447                         MP_WritePhyUshort(sc, 0x1d, 0x7fe1);
28448                         MP_WritePhyUshort(sc, 0x1d, 0x4e60);
28449                         MP_WritePhyUshort(sc, 0x1d, 0x489c);
28450                         MP_WritePhyUshort(sc, 0x1d, 0x4628);
28451                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
28452                         MP_WritePhyUshort(sc, 0x1d, 0x4e60);
28453                         MP_WritePhyUshort(sc, 0x1d, 0x7e28);
28454                         MP_WritePhyUshort(sc, 0x1d, 0x4628);
28455                         MP_WritePhyUshort(sc, 0x1d, 0x7c40);
28456                         MP_WritePhyUshort(sc, 0x1d, 0x5400);
28457                         MP_WritePhyUshort(sc, 0x1d, 0x7c01);
28458                         MP_WritePhyUshort(sc, 0x1d, 0x5800);
28459                         MP_WritePhyUshort(sc, 0x1d, 0x7c04);
28460                         MP_WritePhyUshort(sc, 0x1d, 0x5c00);
28461                         MP_WritePhyUshort(sc, 0x1d, 0x41e8);
28462                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28463                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
28464                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28465                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
28466                         MP_WritePhyUshort(sc, 0x1d, 0x8fa8);
28467                         MP_WritePhyUshort(sc, 0x1d, 0xb241);
28468                         MP_WritePhyUshort(sc, 0x1d, 0xa02a);
28469                         MP_WritePhyUshort(sc, 0x1d, 0x314c);
28470                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
28471                         MP_WritePhyUshort(sc, 0x1d, 0x4ea0);
28472                         MP_WritePhyUshort(sc, 0x1d, 0x7c02);
28473                         MP_WritePhyUshort(sc, 0x1d, 0x4402);
28474                         MP_WritePhyUshort(sc, 0x1d, 0x4448);
28475                         MP_WritePhyUshort(sc, 0x1d, 0x4894);
28476                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28477                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
28478                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28479                         MP_WritePhyUshort(sc, 0x1d, 0x4c03);
28480                         MP_WritePhyUshort(sc, 0x1d, 0x4824);
28481                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28482                         MP_WritePhyUshort(sc, 0x1d, 0x4c07);
28483                         MP_WritePhyUshort(sc, 0x1d, 0x41ef);
28484                         MP_WritePhyUshort(sc, 0x1d, 0x41ff);
28485                         MP_WritePhyUshort(sc, 0x1d, 0x4891);
28486                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28487                         MP_WritePhyUshort(sc, 0x1d, 0x4c07);
28488                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28489                         MP_WritePhyUshort(sc, 0x1d, 0x4c17);
28490                         MP_WritePhyUshort(sc, 0x1d, 0x8400);
28491                         MP_WritePhyUshort(sc, 0x1d, 0x8ef8);
28492                         MP_WritePhyUshort(sc, 0x1d, 0x41c7);
28493                         MP_WritePhyUshort(sc, 0x1d, 0x8f8d);
28494                         MP_WritePhyUshort(sc, 0x1d, 0x92d5);
28495                         MP_WritePhyUshort(sc, 0x1d, 0xa10f);
28496                         MP_WritePhyUshort(sc, 0x1d, 0xd480);
28497                         MP_WritePhyUshort(sc, 0x1d, 0x0008);
28498                         MP_WritePhyUshort(sc, 0x1d, 0xd580);
28499                         MP_WritePhyUshort(sc, 0x1d, 0x00b8);
28500                         MP_WritePhyUshort(sc, 0x1d, 0xa202);
28501                         MP_WritePhyUshort(sc, 0x1d, 0x3167);
28502                         MP_WritePhyUshort(sc, 0x1d, 0x7c04);
28503                         MP_WritePhyUshort(sc, 0x1d, 0x4404);
28504                         MP_WritePhyUshort(sc, 0x1d, 0x3167);
28505                         MP_WritePhyUshort(sc, 0x1d, 0xd484);
28506                         MP_WritePhyUshort(sc, 0x1d, 0x00f3);
28507                         MP_WritePhyUshort(sc, 0x1d, 0xd484);
28508                         MP_WritePhyUshort(sc, 0x1d, 0x00f1);
28509                         MP_WritePhyUshort(sc, 0x1d, 0x30f4);
28510                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
28511                         MP_WritePhyUshort(sc, 0x1d, 0x4ee0);
28512                         MP_WritePhyUshort(sc, 0x1d, 0x7c40);
28513                         MP_WritePhyUshort(sc, 0x1d, 0x5400);
28514                         MP_WritePhyUshort(sc, 0x1d, 0x4488);
28515                         MP_WritePhyUshort(sc, 0x1d, 0x41cf);
28516                         MP_WritePhyUshort(sc, 0x1d, 0x30f4);
28517                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
28518                         MP_WritePhyUshort(sc, 0x1d, 0x4ec0);
28519                         MP_WritePhyUshort(sc, 0x1d, 0x48f3);
28520                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28521                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
28522                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28523                         MP_WritePhyUshort(sc, 0x1d, 0x4c09);
28524                         MP_WritePhyUshort(sc, 0x1d, 0x4508);
28525                         MP_WritePhyUshort(sc, 0x1d, 0x41c7);
28526                         MP_WritePhyUshort(sc, 0x1d, 0x8fb0);
28527                         MP_WritePhyUshort(sc, 0x1d, 0xd218);
28528                         MP_WritePhyUshort(sc, 0x1d, 0x00ae);
28529                         MP_WritePhyUshort(sc, 0x1d, 0xd2a4);
28530                         MP_WritePhyUshort(sc, 0x1d, 0x009e);
28531                         MP_WritePhyUshort(sc, 0x1d, 0x3188);
28532                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
28533                         MP_WritePhyUshort(sc, 0x1d, 0x4e80);
28534                         MP_WritePhyUshort(sc, 0x1d, 0x4832);
28535                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28536                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
28537                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
28538                         MP_WritePhyUshort(sc, 0x1d, 0x4c11);
28539                         MP_WritePhyUshort(sc, 0x1d, 0x4428);
28540                         MP_WritePhyUshort(sc, 0x1d, 0x7c40);
28541                         MP_WritePhyUshort(sc, 0x1d, 0x5440);
28542                         MP_WritePhyUshort(sc, 0x1d, 0x7c01);
28543                         MP_WritePhyUshort(sc, 0x1d, 0x5801);
28544                         MP_WritePhyUshort(sc, 0x1d, 0x7c04);
28545                         MP_WritePhyUshort(sc, 0x1d, 0x5c04);
28546                         MP_WritePhyUshort(sc, 0x1d, 0x41e8);
28547                         MP_WritePhyUshort(sc, 0x1d, 0xa4b3);
28548                         MP_WritePhyUshort(sc, 0x1d, 0x319d);
28549                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
28550                         MP_WritePhyUshort(sc, 0x1d, 0x4f20);
28551                         MP_WritePhyUshort(sc, 0x1d, 0x6800);
28552                         MP_WritePhyUshort(sc, 0x1d, 0x673e);
28553                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28554                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
28555                         MP_WritePhyUshort(sc, 0x1d, 0x570f);
28556                         MP_WritePhyUshort(sc, 0x1d, 0x5fff);
28557                         MP_WritePhyUshort(sc, 0x1d, 0xaa04);
28558                         MP_WritePhyUshort(sc, 0x1d, 0x585b);
28559                         MP_WritePhyUshort(sc, 0x1d, 0x6100);
28560                         MP_WritePhyUshort(sc, 0x1d, 0x31ad);
28561                         MP_WritePhyUshort(sc, 0x1d, 0x5867);
28562                         MP_WritePhyUshort(sc, 0x1d, 0x6080);
28563                         MP_WritePhyUshort(sc, 0x1d, 0xbcf2);
28564                         MP_WritePhyUshort(sc, 0x1d, 0x3001);
28565                         MP_WritePhyUshort(sc, 0x1f, 0x0004);
28566                         MP_WritePhyUshort(sc, 0x1c, 0x0200);
28567                         MP_WritePhyUshort(sc, 0x19, 0x7030);
28568                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
28569                 }
28570 
28571                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
28572                 MP_WritePhyUshort(sc, 0x11, 0x83BA);
28573                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
28574 
28575                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
28576                 ClearEthPhyBit(sc, 0x1A, BIT_2);
28577                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
28578 
28579                 if (phy_power_saving == 1) {
28580                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
28581                         MP_WritePhyUshort(sc, 0x18, 0x8310);
28582                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
28583                 } else {
28584                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
28585                         MP_WritePhyUshort(sc, 0x18, 0x0310);
28586                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
28587                         DELAY(20000);
28588                 }
28589 
28590                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
28591                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
28592                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
28593                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
28594                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
28595                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
28596                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
28597                 MP_WritePhyUshort(sc, 0x0D, 0x0003);
28598                 MP_WritePhyUshort(sc, 0x0E, 0x0015);
28599                 MP_WritePhyUshort(sc, 0x0D, 0x4003);
28600                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
28601                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
28602         } else if (sc->re_type == MACFG_56) {
28603                 MP_WritePhyUshort(sc, 0x1F, 0x0A46);
28604                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
28605                 TmpUshort = (PhyRegValue & BIT_8) ? 0 : BIT_15;
28606 
28607                 MP_WritePhyUshort(sc, 0x1F, 0x0BCC);
28608                 ClearEthPhyBit(sc, 0x12, BIT_15);
28609                 SetEthPhyBit(sc, 0x12, TmpUshort);
28610 
28611 
28612                 MP_WritePhyUshort(sc, 0x1F, 0x0A46);
28613                 PhyRegValue = MP_ReadPhyUshort(sc, 0x13);
28614                 TmpUshort = (PhyRegValue & BIT_8) ? BIT_1 : 0;
28615 
28616                 MP_WritePhyUshort(sc, 0x1F, 0x0C41);
28617                 ClearEthPhyBit(sc, 0x15, BIT_1);
28618                 SetEthPhyBit(sc, 0x15, TmpUshort);
28619 
28620                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
28621                 SetEthPhyBit(sc, 0x11, (BIT_3 | BIT_2));
28622                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
28623 
28624 
28625                 MP_WritePhyUshort(sc, 0x1F, 0x0BCC);
28626                 ClearEthPhyBit(sc, 0x14, BIT_8);
28627                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
28628                 SetEthPhyBit(sc, 0x11, BIT_7);
28629                 SetEthPhyBit(sc, 0x11, BIT_6);
28630                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
28631                 MP_WritePhyUshort(sc, 0x13, 0x8084);
28632                 ClearEthPhyBit(sc, 0x14, (BIT_14 | BIT_13));
28633                 SetEthPhyBit(sc, 0x10, BIT_12);
28634                 SetEthPhyBit(sc, 0x10, BIT_1);
28635                 SetEthPhyBit(sc, 0x10, BIT_0);
28636                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
28637 
28638 
28639                 MP_WritePhyUshort(sc, 0x1F, 0x0A4B);
28640                 SetEthPhyBit(sc, 0x11, BIT_2);
28641                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
28642 
28643 
28644 
28645                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
28646                 MP_WritePhyUshort(sc, 0x13, 0x8012);
28647                 SetEthPhyBit(sc, 0x14, BIT_15);
28648                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
28649 
28650 
28651 
28652                 MP_WritePhyUshort(sc, 0x1F, 0x0C42);
28653                 ClearAndSetEthPhyBit(sc,
28654                                      0x11,
28655                                      BIT_13,
28656                                      BIT_14
28657                                     );
28658                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
28659 
28660                 if (phy_power_saving == 1) {
28661                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
28662                         SetEthPhyBit(sc, 0x10, BIT_2);
28663                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
28664                 } else {
28665                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
28666                         ClearEthPhyBit(sc, 0x10, BIT_2);
28667                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
28668                         DELAY(20000);
28669                 }
28670 
28671                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
28672                 MP_WritePhyUshort(sc, 0x13, 0x809A);
28673                 MP_WritePhyUshort(sc, 0x14, 0x8022);
28674                 MP_WritePhyUshort(sc, 0x13, 0x80A0);
28675                 ClearAndSetEthPhyBit(sc,
28676                                      0x14,
28677                                      0xFF00,
28678                                      0x1000
28679                                     );
28680                 MP_WritePhyUshort(sc, 0x13, 0x8088);
28681                 MP_WritePhyUshort(sc, 0x14, 0x9222);
28682                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
28683 
28684                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
28685                 MP_WritePhyUshort(sc, 0x13, 0x8011);
28686                 ClearEthPhyBit(sc, 0x14, BIT_14);
28687                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
28688                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
28689                 MP_WritePhyUshort(sc, 0x00, 0x9200);
28690         } else if (sc->re_type == MACFG_58) {
28691                 MP_WritePhyUshort(sc, 0x1F, 0x0BCC);
28692                 ClearEthPhyBit(sc, 0x14, BIT_8);
28693                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
28694                 SetEthPhyBit(sc, 0x11, BIT_7);
28695                 SetEthPhyBit(sc, 0x11, BIT_6);
28696                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
28697                 MP_WritePhyUshort(sc, 0x13, 0x8084);
28698                 ClearEthPhyBit(sc, 0x14, (BIT_14 | BIT_13));
28699                 SetEthPhyBit(sc, 0x10, BIT_12);
28700                 SetEthPhyBit(sc, 0x10, BIT_1);
28701                 SetEthPhyBit(sc, 0x10, BIT_0);
28702                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
28703 
28704                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
28705                 MP_WritePhyUshort(sc, 0x13, 0x8012);
28706                 SetEthPhyBit(sc, 0x14, BIT_15);
28707                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
28708 
28709                 MP_WritePhyUshort(sc, 0x1F, 0x0C42);
28710                 ClearAndSetEthPhyBit(sc,
28711                                      0x11,
28712                                      BIT_13,
28713                                      BIT_14
28714                                     );
28715                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
28716 
28717                 if (phy_power_saving == 1) {
28718                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
28719                         SetEthPhyBit(sc, 0x10, BIT_2);
28720                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
28721                 } else {
28722                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
28723                         ClearEthPhyBit(sc, 0x10, BIT_2);
28724                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
28725                         DELAY(20000);
28726                 }
28727 
28728                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
28729                 MP_WritePhyUshort(sc, 0x13, 0x8011);
28730                 ClearEthPhyBit(sc, 0x14, BIT_14);
28731                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
28732                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
28733                 MP_WritePhyUshort(sc, 0x00, 0x9200);
28734         } else if (sc->re_type == MACFG_59) {
28735                 MP_WritePhyUshort(sc, 0x1F, 0x0BCC);
28736                 ClearEthPhyBit(sc, 0x14, BIT_8);
28737                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
28738                 SetEthPhyBit(sc, 0x11, BIT_7);
28739                 SetEthPhyBit(sc, 0x11, BIT_6);
28740                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
28741                 MP_WritePhyUshort(sc, 0x13, 0x8084);
28742                 ClearEthPhyBit(sc, 0x14, (BIT_14 | BIT_13));
28743                 SetEthPhyBit(sc, 0x10, BIT_12);
28744                 SetEthPhyBit(sc, 0x10, BIT_1);
28745                 SetEthPhyBit(sc, 0x10, BIT_0);
28746 
28747 
28748                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
28749                 MP_WritePhyUshort(sc, 0x13, 0x8012);
28750                 SetEthPhyBit(sc, 0x14, BIT_15);
28751                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
28752 
28753                 MP_WritePhyUshort(sc, 0x1F, 0x0BCE);
28754                 MP_WritePhyUshort(sc, 0x12, 0x8860);
28755                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
28756 
28757                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
28758                 MP_WritePhyUshort(sc, 0x13, 0x80F3);
28759                 ClearAndSetEthPhyBit(sc,
28760                                      0x14,
28761                                      0xFF00,
28762                                      0x8B00
28763                                     );
28764                 MP_WritePhyUshort(sc, 0x13, 0x80F0);
28765                 ClearAndSetEthPhyBit(sc,
28766                                      0x14,
28767                                      0xFF00,
28768                                      0x3A00
28769                                     );
28770                 MP_WritePhyUshort(sc, 0x13, 0x80EF);
28771                 ClearAndSetEthPhyBit(sc,
28772                                      0x14,
28773                                      0xFF00,
28774                                      0x0500
28775                                     );
28776                 MP_WritePhyUshort(sc, 0x13, 0x80F6);
28777                 ClearAndSetEthPhyBit(sc,
28778                                      0x14,
28779                                      0xFF00,
28780                                      0x6E00
28781                                     );
28782                 MP_WritePhyUshort(sc, 0x13, 0x80EC);
28783                 ClearAndSetEthPhyBit(sc,
28784                                      0x14,
28785                                      0xFF00,
28786                                      0x6800
28787                                     );
28788                 MP_WritePhyUshort(sc, 0x13, 0x80ED);
28789                 ClearAndSetEthPhyBit(sc,
28790                                      0x14,
28791                                      0xFF00,
28792                                      0x7C00
28793                                     );
28794                 MP_WritePhyUshort(sc, 0x13, 0x80F2);
28795                 ClearAndSetEthPhyBit(sc,
28796                                      0x14,
28797                                      0xFF00,
28798                                      0xF400
28799                                     );
28800                 MP_WritePhyUshort(sc, 0x13, 0x80F4);
28801                 ClearAndSetEthPhyBit(sc,
28802                                      0x14,
28803                                      0xFF00,
28804                                      0x8500
28805                                     );
28806 
28807                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
28808                 MP_WritePhyUshort(sc, 0x13, 0x8110);
28809                 ClearAndSetEthPhyBit(sc,
28810                                      0x14,
28811                                      0xFF00,
28812                                      0xA800
28813                                     );
28814                 MP_WritePhyUshort(sc, 0x13, 0x810F);
28815                 ClearAndSetEthPhyBit(sc,
28816                                      0x14,
28817                                      0xFF00,
28818                                      0x1D00
28819                                     );
28820                 MP_WritePhyUshort(sc, 0x13, 0x8111);
28821                 ClearAndSetEthPhyBit(sc,
28822                                      0x14,
28823                                      0xFF00,
28824                                      0xF500
28825                                     );
28826                 MP_WritePhyUshort(sc, 0x13, 0x8113);
28827                 ClearAndSetEthPhyBit(sc,
28828                                      0x14,
28829                                      0xFF00,
28830                                      0x6100
28831                                     );
28832                 MP_WritePhyUshort(sc, 0x13, 0x8115);
28833                 ClearAndSetEthPhyBit(sc,
28834                                      0x14,
28835                                      0xFF00,
28836                                      0x9200
28837                                     );
28838                 MP_WritePhyUshort(sc, 0x13, 0x810E);
28839                 ClearAndSetEthPhyBit(sc,
28840                                      0x14,
28841                                      0xFF00,
28842                                      0x0400
28843                                     );
28844                 MP_WritePhyUshort(sc, 0x13, 0x810C);
28845                 ClearAndSetEthPhyBit(sc,
28846                                      0x14,
28847                                      0xFF00,
28848                                      0x7C00
28849                                     );
28850                 MP_WritePhyUshort(sc, 0x13, 0x810B);
28851                 ClearAndSetEthPhyBit(sc,
28852                                      0x14,
28853                                      0xFF00,
28854                                      0x5A00
28855                                     );
28856 
28857                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
28858                 MP_WritePhyUshort(sc, 0x13, 0x80D1);
28859                 ClearAndSetEthPhyBit(sc,
28860                                      0x14,
28861                                      0xFF00,
28862                                      0xFF00
28863                                     );
28864                 MP_WritePhyUshort(sc, 0x13, 0x80CD);
28865                 ClearAndSetEthPhyBit(sc,
28866                                      0x14,
28867                                      0xFF00,
28868                                      0x9E00
28869                                     );
28870                 MP_WritePhyUshort(sc, 0x13, 0x80D3);
28871                 ClearAndSetEthPhyBit(sc,
28872                                      0x14,
28873                                      0xFF00,
28874                                      0x0E00
28875                                     );
28876                 MP_WritePhyUshort(sc, 0x13, 0x80D5);
28877                 ClearAndSetEthPhyBit(sc,
28878                                      0x14,
28879                                      0xFF00,
28880                                      0xCA00
28881                                     );
28882                 MP_WritePhyUshort(sc, 0x13, 0x80D7);
28883                 ClearAndSetEthPhyBit(sc,
28884                                      0x14,
28885                                      0xFF00,
28886                                      0x8400
28887                                     );
28888 
28889                 if (phy_power_saving == 1) {
28890                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
28891                         SetEthPhyBit(sc, 0x10, BIT_2);
28892                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
28893                 } else {
28894                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
28895                         ClearEthPhyBit(sc, 0x10, BIT_2);
28896                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
28897                         DELAY(20000);
28898                 }
28899 
28900                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
28901                 MP_WritePhyUshort(sc, 0x13, 0x8011);
28902                 ClearEthPhyBit(sc, 0x14, BIT_14);
28903                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
28904                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
28905                 MP_WritePhyUshort(sc, 0x00, 0x9200);
28906         } else if (sc->re_type == MACFG_60) {
28907                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
28908                 MP_WritePhyUshort(sc, 0x13, 0x8012);
28909                 SetEthPhyBit(sc, 0x14, BIT_15);
28910                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
28911 
28912                 MP_WritePhyUshort(sc, 0x1F, 0x0BCE);
28913                 MP_WritePhyUshort(sc, 0x12, 0x8860);
28914                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
28915 
28916                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
28917                 MP_WritePhyUshort(sc, 0x13, 0x80F3);
28918                 ClearAndSetEthPhyBit(sc,
28919                                      0x14,
28920                                      0xFF00,
28921                                      0x8B00
28922                                     );
28923                 MP_WritePhyUshort(sc, 0x13, 0x80F0);
28924                 ClearAndSetEthPhyBit(sc,
28925                                      0x14,
28926                                      0xFF00,
28927                                      0x3A00
28928                                     );
28929                 MP_WritePhyUshort(sc, 0x13, 0x80EF);
28930                 ClearAndSetEthPhyBit(sc,
28931                                      0x14,
28932                                      0xFF00,
28933                                      0x0500
28934                                     );
28935                 MP_WritePhyUshort(sc, 0x13, 0x80F6);
28936                 ClearAndSetEthPhyBit(sc,
28937                                      0x14,
28938                                      0xFF00,
28939                                      0x6E00
28940                                     );
28941                 MP_WritePhyUshort(sc, 0x13, 0x80EC);
28942                 ClearAndSetEthPhyBit(sc,
28943                                      0x14,
28944                                      0xFF00,
28945                                      0x6800
28946                                     );
28947                 MP_WritePhyUshort(sc, 0x13, 0x80ED);
28948                 ClearAndSetEthPhyBit(sc,
28949                                      0x14,
28950                                      0xFF00,
28951                                      0x7C00
28952                                     );
28953                 MP_WritePhyUshort(sc, 0x13, 0x80F2);
28954                 ClearAndSetEthPhyBit(sc,
28955                                      0x14,
28956                                      0xFF00,
28957                                      0xF400
28958                                     );
28959                 MP_WritePhyUshort(sc, 0x13, 0x80F4);
28960                 ClearAndSetEthPhyBit(sc,
28961                                      0x14,
28962                                      0xFF00,
28963                                      0x8500
28964                                     );
28965 
28966                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
28967                 MP_WritePhyUshort(sc, 0x13, 0x8110);
28968                 ClearAndSetEthPhyBit(sc,
28969                                      0x14,
28970                                      0xFF00,
28971                                      0xA800
28972                                     );
28973                 MP_WritePhyUshort(sc, 0x13, 0x810F);
28974                 ClearAndSetEthPhyBit(sc,
28975                                      0x14,
28976                                      0xFF00,
28977                                      0x1D00
28978                                     );
28979                 MP_WritePhyUshort(sc, 0x13, 0x8111);
28980                 ClearAndSetEthPhyBit(sc,
28981                                      0x14,
28982                                      0xFF00,
28983                                      0xF500
28984                                     );
28985                 MP_WritePhyUshort(sc, 0x13, 0x8113);
28986                 ClearAndSetEthPhyBit(sc,
28987                                      0x14,
28988                                      0xFF00,
28989                                      0x6100
28990                                     );
28991                 MP_WritePhyUshort(sc, 0x13, 0x8115);
28992                 ClearAndSetEthPhyBit(sc,
28993                                      0x14,
28994                                      0xFF00,
28995                                      0x9200
28996                                     );
28997                 MP_WritePhyUshort(sc, 0x13, 0x810E);
28998                 ClearAndSetEthPhyBit(sc,
28999                                      0x14,
29000                                      0xFF00,
29001                                      0x0400
29002                                     );
29003                 MP_WritePhyUshort(sc, 0x13, 0x810C);
29004                 ClearAndSetEthPhyBit(sc,
29005                                      0x14,
29006                                      0xFF00,
29007                                      0x7C00
29008                                     );
29009                 MP_WritePhyUshort(sc, 0x13, 0x810B);
29010                 ClearAndSetEthPhyBit(sc,
29011                                      0x14,
29012                                      0xFF00,
29013                                      0x5A00
29014                                     );
29015 
29016                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29017                 MP_WritePhyUshort(sc, 0x13, 0x80D1);
29018                 ClearAndSetEthPhyBit(sc,
29019                                      0x14,
29020                                      0xFF00,
29021                                      0xFF00
29022                                     );
29023                 MP_WritePhyUshort(sc, 0x13, 0x80CD);
29024                 ClearAndSetEthPhyBit(sc,
29025                                      0x14,
29026                                      0xFF00,
29027                                      0x9E00
29028                                     );
29029                 MP_WritePhyUshort(sc, 0x13, 0x80D3);
29030                 ClearAndSetEthPhyBit(sc,
29031                                      0x14,
29032                                      0xFF00,
29033                                      0x0E00
29034                                     );
29035                 MP_WritePhyUshort(sc, 0x13, 0x80D5);
29036                 ClearAndSetEthPhyBit(sc,
29037                                      0x14,
29038                                      0xFF00,
29039                                      0xCA00
29040                                     );
29041                 MP_WritePhyUshort(sc, 0x13, 0x80D7);
29042                 ClearAndSetEthPhyBit(sc,
29043                                      0x14,
29044                                      0xFF00,
29045                                      0x8400
29046                                     );
29047 
29048                 if (phy_power_saving == 1) {
29049                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29050                         SetEthPhyBit(sc, 0x10, BIT_2);
29051                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
29052                 } else {
29053                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29054                         ClearEthPhyBit(sc, 0x10, BIT_2);
29055                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
29056                         DELAY(20000);
29057                 }
29058 
29059                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29060                 MP_WritePhyUshort(sc, 0x13, 0x8011);
29061                 ClearEthPhyBit(sc, 0x14, BIT_14);
29062                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
29063                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29064                 MP_WritePhyUshort(sc, 0x00, 0x9200);
29065         } else if (sc->re_type == MACFG_61) {
29066                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
29067                 SetEthPhyBit(sc, 0x11, (BIT_3 | BIT_2));
29068                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29069 
29070 
29071                 MP_WritePhyUshort(sc, 0x1F, 0x0BCC);
29072                 ClearEthPhyBit(sc, 0x14, BIT_8);
29073                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
29074                 SetEthPhyBit(sc, 0x11, BIT_7);
29075                 SetEthPhyBit(sc, 0x11, BIT_6);
29076                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29077                 MP_WritePhyUshort(sc, 0x13, 0x8084);
29078                 ClearEthPhyBit(sc, 0x14, (BIT_14 | BIT_13));
29079                 SetEthPhyBit(sc, 0x10, BIT_12);
29080                 SetEthPhyBit(sc, 0x10, BIT_1);
29081                 SetEthPhyBit(sc, 0x10, BIT_0);
29082                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29083 
29084                 MP_WritePhyUshort(sc, 0x1F, 0x0A4B);
29085                 SetEthPhyBit(sc, 0x11, BIT_2);
29086                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29087 
29088                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29089                 MP_WritePhyUshort(sc, 0x13, 0x8012);
29090                 SetEthPhyBit(sc, 0x14, BIT_15);
29091                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29092 
29093                 MP_WritePhyUshort(sc, 0x1F, 0x0C42);
29094                 ClearAndSetEthPhyBit(sc,
29095                                      0x11,
29096                                      BIT_13,
29097                                      BIT_14
29098                                     );
29099                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29100 
29101                 if (phy_power_saving == 1) {
29102                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29103                         SetEthPhyBit(sc, 0x10, BIT_2);
29104                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
29105                 } else {
29106                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29107                         ClearEthPhyBit(sc, 0x10, BIT_2);
29108                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
29109                         DELAY(20000);
29110                 }
29111 
29112                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29113                 MP_WritePhyUshort(sc, 0x13, 0x8011);
29114                 ClearEthPhyBit(sc, 0x14, BIT_14);
29115                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
29116                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29117                 MP_WritePhyUshort(sc, 0x00, 0x9200);
29118         } else if (sc->re_type == MACFG_62 || sc->re_type == MACFG_67) {
29119                 MP_WritePhyUshort(sc, 0x1F, 0x0BCC);
29120                 ClearEthPhyBit(sc, 0x14, BIT_8);
29121                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
29122                 SetEthPhyBit(sc, 0x11, BIT_7);
29123                 SetEthPhyBit(sc, 0x11, BIT_6);
29124                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29125                 MP_WritePhyUshort(sc, 0x13, 0x8084);
29126                 ClearEthPhyBit(sc, 0x14, (BIT_14 | BIT_13));
29127                 SetEthPhyBit(sc, 0x10, BIT_12);
29128                 SetEthPhyBit(sc, 0x10, BIT_1);
29129                 SetEthPhyBit(sc, 0x10, BIT_0);
29130                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29131 
29132                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29133                 MP_WritePhyUshort(sc, 0x13, 0x8012);
29134                 SetEthPhyBit(sc, 0x14, BIT_15);
29135                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29136 
29137                 MP_WritePhyUshort(sc, 0x1F, 0x0C42);
29138                 ClearAndSetEthPhyBit(sc,
29139                                      0x11,
29140                                      BIT_13,
29141                                      BIT_14
29142                                     );
29143                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29144 
29145                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29146                 MP_WritePhyUshort(sc, 0x13, 0x80F3);
29147                 ClearAndSetEthPhyBit(sc,
29148                                      0x14,
29149                                      0xFF00,
29150                                      0x8B00
29151                                     );
29152                 MP_WritePhyUshort(sc, 0x13, 0x80F0);
29153                 ClearAndSetEthPhyBit(sc,
29154                                      0x14,
29155                                      0xFF00,
29156                                      0x3A00
29157                                     );
29158                 MP_WritePhyUshort(sc, 0x13, 0x80EF);
29159                 ClearAndSetEthPhyBit(sc,
29160                                      0x14,
29161                                      0xFF00,
29162                                      0x0500
29163                                     );
29164                 MP_WritePhyUshort(sc, 0x13, 0x80F6);
29165                 ClearAndSetEthPhyBit(sc,
29166                                      0x14,
29167                                      0xFF00,
29168                                      0x6E00
29169                                     );
29170                 MP_WritePhyUshort(sc, 0x13, 0x80EC);
29171                 ClearAndSetEthPhyBit(sc,
29172                                      0x14,
29173                                      0xFF00,
29174                                      0x6800
29175                                     );
29176                 MP_WritePhyUshort(sc, 0x13, 0x80ED);
29177                 ClearAndSetEthPhyBit(sc,
29178                                      0x14,
29179                                      0xFF00,
29180                                      0x7C00
29181                                     );
29182                 MP_WritePhyUshort(sc, 0x13, 0x80F2);
29183                 ClearAndSetEthPhyBit(sc,
29184                                      0x14,
29185                                      0xFF00,
29186                                      0xF400
29187                                     );
29188                 MP_WritePhyUshort(sc, 0x13, 0x80F4);
29189                 ClearAndSetEthPhyBit(sc,
29190                                      0x14,
29191                                      0xFF00,
29192                                      0x8500
29193                                     );
29194 
29195                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29196                 MP_WritePhyUshort(sc, 0x13, 0x8110);
29197                 ClearAndSetEthPhyBit(sc,
29198                                      0x14,
29199                                      0xFF00,
29200                                      0xA800
29201                                     );
29202                 MP_WritePhyUshort(sc, 0x13, 0x810F);
29203                 ClearAndSetEthPhyBit(sc,
29204                                      0x14,
29205                                      0xFF00,
29206                                      0x1D00
29207                                     );
29208                 MP_WritePhyUshort(sc, 0x13, 0x8111);
29209                 ClearAndSetEthPhyBit(sc,
29210                                      0x14,
29211                                      0xFF00,
29212                                      0xF500
29213                                     );
29214                 MP_WritePhyUshort(sc, 0x13, 0x8113);
29215                 ClearAndSetEthPhyBit(sc,
29216                                      0x14,
29217                                      0xFF00,
29218                                      0x6100
29219                                     );
29220                 MP_WritePhyUshort(sc, 0x13, 0x8115);
29221                 ClearAndSetEthPhyBit(sc,
29222                                      0x14,
29223                                      0xFF00,
29224                                      0x9200
29225                                     );
29226                 MP_WritePhyUshort(sc, 0x13, 0x810E);
29227                 ClearAndSetEthPhyBit(sc,
29228                                      0x14,
29229                                      0xFF00,
29230                                      0x0400
29231                                     );
29232                 MP_WritePhyUshort(sc, 0x13, 0x810C);
29233                 ClearAndSetEthPhyBit(sc,
29234                                      0x14,
29235                                      0xFF00,
29236                                      0x7C00
29237                                     );
29238                 MP_WritePhyUshort(sc, 0x13, 0x810B);
29239                 ClearAndSetEthPhyBit(sc,
29240                                      0x14,
29241                                      0xFF00,
29242                                      0x5A00
29243                                     );
29244 
29245                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29246                 MP_WritePhyUshort(sc, 0x13, 0x80D1);
29247                 ClearAndSetEthPhyBit(sc,
29248                                      0x14,
29249                                      0xFF00,
29250                                      0xFF00
29251                                     );
29252                 MP_WritePhyUshort(sc, 0x13, 0x80CD);
29253                 ClearAndSetEthPhyBit(sc,
29254                                      0x14,
29255                                      0xFF00,
29256                                      0x9E00
29257                                     );
29258                 MP_WritePhyUshort(sc, 0x13, 0x80D3);
29259                 ClearAndSetEthPhyBit(sc,
29260                                      0x14,
29261                                      0xFF00,
29262                                      0x0E00
29263                                     );
29264                 MP_WritePhyUshort(sc, 0x13, 0x80D5);
29265                 ClearAndSetEthPhyBit(sc,
29266                                      0x14,
29267                                      0xFF00,
29268                                      0xCA00
29269                                     );
29270                 MP_WritePhyUshort(sc, 0x13, 0x80D7);
29271                 ClearAndSetEthPhyBit(sc,
29272                                      0x14,
29273                                      0xFF00,
29274                                      0x8400
29275                                     );
29276 
29277                 if (phy_power_saving == 1) {
29278                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29279                         SetEthPhyBit(sc, 0x10, BIT_2);
29280                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
29281                 } else {
29282                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29283                         ClearEthPhyBit(sc, 0x10, BIT_2);
29284                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
29285                         DELAY(20000);
29286                 }
29287 
29288                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29289                 MP_WritePhyUshort(sc, 0x13, 0x8011);
29290                 ClearEthPhyBit(sc, 0x14, BIT_14);
29291                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
29292                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29293                 MP_WritePhyUshort(sc, 0x00, 0x9200);
29294         } else if (sc->re_type == MACFG_63) {
29295                 MP_WritePhyUshort(sc, 0x1f, 0x0002);
29296                 MP_WritePhyUshort(sc, 0x10, 0x0008);
29297                 MP_WritePhyUshort(sc, 0x0d, 0x006c);
29298                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
29299 
29300                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
29301                 MP_WritePhyUshort(sc, 0x17, 0x0cc0);
29302                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
29303 
29304                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
29305                 MP_WritePhyUshort(sc, 0x0B, 0xA4D8);
29306                 MP_WritePhyUshort(sc, 0x09, 0x281C);
29307                 MP_WritePhyUshort(sc, 0x07, 0x2883);
29308                 MP_WritePhyUshort(sc, 0x0A, 0x6B35);
29309                 MP_WritePhyUshort(sc, 0x1D, 0x3DA4);
29310                 MP_WritePhyUshort(sc, 0x1C, 0xEFFD);
29311                 MP_WritePhyUshort(sc, 0x14, 0x7F52);
29312                 MP_WritePhyUshort(sc, 0x18, 0x7FC6);
29313                 MP_WritePhyUshort(sc, 0x08, 0x0601);
29314                 MP_WritePhyUshort(sc, 0x06, 0x4063);
29315                 MP_WritePhyUshort(sc, 0x10, 0xF074);
29316                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
29317                 MP_WritePhyUshort(sc, 0x13, 0x0789);
29318                 MP_WritePhyUshort(sc, 0x12, 0xF4BD);
29319                 MP_WritePhyUshort(sc, 0x1A, 0x04FD);
29320                 MP_WritePhyUshort(sc, 0x14, 0x84B0);
29321                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29322 
29323                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
29324                 MP_WritePhyUshort(sc, 0x01, 0x0340);
29325                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
29326                 MP_WritePhyUshort(sc, 0x04, 0x4000);
29327                 MP_WritePhyUshort(sc, 0x03, 0x1D21);
29328                 MP_WritePhyUshort(sc, 0x02, 0x0C32);
29329                 MP_WritePhyUshort(sc, 0x01, 0x0200);
29330                 MP_WritePhyUshort(sc, 0x00, 0x5554);
29331                 MP_WritePhyUshort(sc, 0x04, 0x4800);
29332                 MP_WritePhyUshort(sc, 0x04, 0x4000);
29333                 MP_WritePhyUshort(sc, 0x04, 0xF000);
29334                 MP_WritePhyUshort(sc, 0x03, 0xDF01);
29335                 MP_WritePhyUshort(sc, 0x02, 0xDF20);
29336                 MP_WritePhyUshort(sc, 0x01, 0x101A);
29337                 MP_WritePhyUshort(sc, 0x00, 0xA0FF);
29338                 MP_WritePhyUshort(sc, 0x04, 0xF800);
29339                 MP_WritePhyUshort(sc, 0x04, 0xF000);
29340                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29341 
29342                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
29343                 MP_WritePhyUshort(sc, 0x1E, 0x0023);
29344                 MP_WritePhyUshort(sc, 0x16, 0x0000);
29345                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29346 
29347                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29348                 PhyRegValue = MP_ReadPhyUshort(sc, 0x0D);
29349                 PhyRegValue |= (BIT_5);
29350                 MP_WritePhyUshort(sc, 0x0D, PhyRegValue);
29351 
29352                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
29353                 PhyRegValue = MP_ReadPhyUshort(sc, 0x0C);
29354                 PhyRegValue |= (BIT_10);
29355                 MP_WritePhyUshort(sc, 0x0C, PhyRegValue);
29356                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29357         } else if (sc->re_type == MACFG_64) {
29358                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
29359                 MP_WritePhyUshort(sc, 0x17, 0x0cc0);
29360                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
29361 
29362                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
29363                 MP_WritePhyUshort(sc, 0x01, 0x0340);
29364                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
29365                 MP_WritePhyUshort(sc, 0x04, 0x4000);
29366                 MP_WritePhyUshort(sc, 0x03, 0x1D21);
29367                 MP_WritePhyUshort(sc, 0x02, 0x0C32);
29368                 MP_WritePhyUshort(sc, 0x01, 0x0200);
29369                 MP_WritePhyUshort(sc, 0x00, 0x5554);
29370                 MP_WritePhyUshort(sc, 0x04, 0x4800);
29371                 MP_WritePhyUshort(sc, 0x04, 0x4000);
29372                 MP_WritePhyUshort(sc, 0x04, 0xF000);
29373                 MP_WritePhyUshort(sc, 0x03, 0xDF01);
29374                 MP_WritePhyUshort(sc, 0x02, 0xDF20);
29375                 MP_WritePhyUshort(sc, 0x01, 0x101A);
29376                 MP_WritePhyUshort(sc, 0x00, 0xA0FF);
29377                 MP_WritePhyUshort(sc, 0x04, 0xF800);
29378                 MP_WritePhyUshort(sc, 0x04, 0xF000);
29379                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29380 
29381                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
29382                 MP_WritePhyUshort(sc, 0x1E, 0x0023);
29383                 MP_WritePhyUshort(sc, 0x16, 0x0000);
29384                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29385 
29386                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29387                 PhyRegValue = MP_ReadPhyUshort(sc, 0x0D);
29388                 PhyRegValue |= (BIT_5);
29389                 MP_WritePhyUshort(sc, 0x0D, PhyRegValue);
29390 
29391                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
29392                 PhyRegValue = MP_ReadPhyUshort(sc, 0x0C);
29393                 PhyRegValue |= (BIT_10);
29394                 MP_WritePhyUshort(sc, 0x0C, PhyRegValue);
29395                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29396         } else if (sc->re_type == MACFG_65) {
29397                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
29398                 MP_WritePhyUshort(sc, 0x17, 0x0cc0);
29399                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
29400 
29401                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29402                 PhyRegValue = MP_ReadPhyUshort(sc, 0x0D);
29403                 PhyRegValue |= (BIT_5);
29404                 MP_WritePhyUshort(sc, 0x0D, PhyRegValue);
29405 
29406                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
29407                 PhyRegValue = MP_ReadPhyUshort(sc, 0x0C);
29408                 PhyRegValue |= (BIT_10);
29409                 MP_WritePhyUshort(sc, 0x0C, PhyRegValue);
29410                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29411 
29412                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
29413                 MP_WritePhyUshort(sc, 0x1E, 0x002C);
29414                 MP_WritePhyUshort(sc, 0x15, 0x035D);
29415                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
29416                 MP_WritePhyUshort(sc, 0x01, 0x0300);
29417                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29418         } else if (sc->re_type == MACFG_66) {
29419                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29420                 PhyRegValue = MP_ReadPhyUshort(sc, 0x0D);
29421                 PhyRegValue |= (BIT_5);
29422                 MP_WritePhyUshort(sc, 0x0D, PhyRegValue);
29423 
29424                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
29425                 PhyRegValue = MP_ReadPhyUshort(sc, 0x0C);
29426                 PhyRegValue |= (BIT_10);
29427                 MP_WritePhyUshort(sc, 0x0C, PhyRegValue);
29428                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29429         } else if (sc->re_type == MACFG_68) {
29430                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29431                 MP_WritePhyUshort(sc, 0x13, 0x809b);
29432                 ClearAndSetEthPhyBit(sc,
29433                                      0x14,
29434                                      0xF800,
29435                                      0x8000
29436                                     );
29437                 MP_WritePhyUshort(sc, 0x13, 0x80A2);
29438                 ClearAndSetEthPhyBit(sc,
29439                                      0x14,
29440                                      0xFF00,
29441                                      0x8000
29442                                     );
29443                 MP_WritePhyUshort(sc, 0x13, 0x80A4);
29444                 ClearAndSetEthPhyBit(sc,
29445                                      0x14,
29446                                      0xFF00,
29447                                      0x8500
29448                                     );
29449                 MP_WritePhyUshort(sc, 0x13, 0x809C);
29450                 ClearAndSetEthPhyBit(sc,
29451                                      0x14,
29452                                      0xFF00,
29453                                      0xbd00
29454                                     );
29455                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29456 
29457                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29458                 MP_WritePhyUshort(sc, 0x13, 0x80AD);
29459                 ClearAndSetEthPhyBit(sc,
29460                                      0x14,
29461                                      0xF800,
29462                                      0x7000
29463                                     );
29464                 MP_WritePhyUshort(sc, 0x13, 0x80B4);
29465                 ClearAndSetEthPhyBit(sc,
29466                                      0x14,
29467                                      0xFF00,
29468                                      0x5000
29469                                     );
29470                 MP_WritePhyUshort(sc, 0x13, 0x80AC);
29471                 ClearAndSetEthPhyBit(sc,
29472                                      0x14,
29473                                      0xFF00,
29474                                      0x4000
29475                                     );
29476                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29477 
29478                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29479                 MP_WritePhyUshort(sc, 0x13, 0x808E);
29480                 ClearAndSetEthPhyBit(sc,
29481                                      0x14,
29482                                      0xFF00,
29483                                      0x1200
29484                                     );
29485                 MP_WritePhyUshort(sc, 0x13, 0x8090);
29486                 ClearAndSetEthPhyBit(sc,
29487                                      0x14,
29488                                      0xFF00,
29489                                      0xE500
29490                                     );
29491                 MP_WritePhyUshort(sc, 0x13, 0x8092);
29492                 ClearAndSetEthPhyBit(sc,
29493                                      0x14,
29494                                      0xFF00,
29495                                      0x9F00
29496                                     );
29497                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29498 
29499                 dout_tapbin = 0x0000;
29500                 MP_WritePhyUshort(sc, 0x1F, 0x0A46);
29501                 TmpUshort = MP_ReadPhyUshort(sc, 0x13);
29502                 TmpUshort &= (BIT_1|BIT_0);
29503                 TmpUshort <<= 2;
29504                 dout_tapbin |= TmpUshort;
29505 
29506                 TmpUshort = MP_ReadPhyUshort(sc, 0x12);
29507                 TmpUshort &= (BIT_15|BIT_14);
29508                 TmpUshort >>= 14;
29509                 dout_tapbin |= TmpUshort;
29510 
29511                 dout_tapbin = ~(dout_tapbin^BIT_3);
29512                 dout_tapbin <<= 12;
29513                 dout_tapbin &= 0xF000;
29514 
29515                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29516 
29517                 MP_WritePhyUshort(sc, 0x13, 0x827A);
29518                 ClearAndSetEthPhyBit(sc,
29519                                      0x14,
29520                                      BIT_15|BIT_14|BIT_13|BIT_12,
29521                                      dout_tapbin
29522                                     );
29523 
29524 
29525                 MP_WritePhyUshort(sc, 0x13, 0x827B);
29526                 ClearAndSetEthPhyBit(sc,
29527                                      0x14,
29528                                      BIT_15|BIT_14|BIT_13|BIT_12,
29529                                      dout_tapbin
29530                                     );
29531 
29532 
29533                 MP_WritePhyUshort(sc, 0x13, 0x827C);
29534                 ClearAndSetEthPhyBit(sc,
29535                                      0x14,
29536                                      BIT_15|BIT_14|BIT_13|BIT_12,
29537                                      dout_tapbin
29538                                     );
29539 
29540 
29541                 MP_WritePhyUshort(sc, 0x13, 0x827D);
29542                 ClearAndSetEthPhyBit(sc,
29543                                      0x14,
29544                                      BIT_15|BIT_14|BIT_13|BIT_12,
29545                                      dout_tapbin
29546                                     );
29547 
29548                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29549                 MP_WritePhyUshort(sc, 0x13, 0x8011);
29550                 SetEthPhyBit(sc, 0x14, BIT_11);
29551                 MP_WritePhyUshort(sc, 0x1F, 0x0A42);
29552                 SetEthPhyBit(sc, 0x16, BIT_1);
29553 
29554                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
29555                 SetEthPhyBit(sc, 0x11, BIT_11);
29556                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29557 
29558                 MP_WritePhyUshort(sc, 0x1F, 0x0BCA);
29559                 ClearAndSetEthPhyBit(sc,
29560                                      0x17,
29561                                      (BIT_13 | BIT_12),
29562                                      BIT_14
29563                                     );
29564                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29565 
29566                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29567                 MP_WritePhyUshort(sc, 0x13, 0x803F);
29568                 ClearEthPhyBit(sc, 0x14, (BIT_13 | BIT_12));
29569                 MP_WritePhyUshort(sc, 0x13, 0x8047);
29570                 ClearEthPhyBit(sc, 0x14, (BIT_13 | BIT_12));
29571                 MP_WritePhyUshort(sc, 0x13, 0x804F);
29572                 ClearEthPhyBit(sc, 0x14, (BIT_13 | BIT_12));
29573                 MP_WritePhyUshort(sc, 0x13, 0x8057);
29574                 ClearEthPhyBit(sc, 0x14, (BIT_13 | BIT_12));
29575                 MP_WritePhyUshort(sc, 0x13, 0x805F);
29576                 ClearEthPhyBit(sc, 0x14, (BIT_13 | BIT_12));
29577                 MP_WritePhyUshort(sc, 0x13, 0x8067);
29578                 ClearEthPhyBit(sc, 0x14, (BIT_13 | BIT_12));
29579                 MP_WritePhyUshort(sc, 0x13, 0x806F);
29580                 ClearEthPhyBit(sc, 0x14, (BIT_13 | BIT_12));
29581                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29582 
29583                 if (phy_power_saving == 1) {
29584                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29585                         SetEthPhyBit(sc, 0x10, BIT_2);
29586                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
29587                 } else {
29588                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29589                         ClearEthPhyBit(sc, 0x10, BIT_2);
29590                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
29591                         DELAY(20000);
29592                 }
29593 
29594                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29595                 MP_WritePhyUshort(sc, 0x13, 0x8045);
29596                 MP_WritePhyUshort(sc, 0x14, 0x2444);
29597                 MP_WritePhyUshort(sc, 0x13, 0x804d);
29598                 MP_WritePhyUshort(sc, 0x14, 0x2444);
29599                 MP_WritePhyUshort(sc, 0x13, 0x805d);
29600                 MP_WritePhyUshort(sc, 0x14, 0x2444);
29601                 MP_WritePhyUshort(sc, 0x13, 0x8011);
29602                 SetEthPhyBit(sc, 0x14, BIT_15);
29603                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
29604                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29605                 MP_WritePhyUshort(sc, 0x00, 0x9200);
29606         } else if (sc->re_type == MACFG_69) {
29607                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29608                 MP_WritePhyUshort(sc, 0x13, 0x808A);
29609                 ClearAndSetEthPhyBit(sc,
29610                                      0x14,
29611                                      BIT_5 | BIT_4 | BIT_3 | BIT_2 | BIT_1 | BIT_0,
29612                                      0x0A);
29613 
29614                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29615                 MP_WritePhyUshort(sc, 0x13, 0x8011);
29616                 SetEthPhyBit(sc, 0x14, BIT_11);
29617                 MP_WritePhyUshort(sc, 0x1F, 0x0A42);
29618                 SetEthPhyBit(sc, 0x16, BIT_1);
29619 
29620                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
29621                 SetEthPhyBit(sc, 0x11, BIT_11);
29622                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29623 
29624                 if (sc->RequireAdcBiasPatch) {
29625                         MP_WritePhyUshort(sc, 0x1F, 0x0BCF);
29626                         MP_WritePhyUshort(sc, 0x16, sc->AdcBiasPatchIoffset);
29627                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
29628                 }
29629 
29630                 {
29631                         u_int16_t rlen;
29632 
29633                         MP_WritePhyUshort(sc, 0x1F, 0x0BCD);
29634                         PhyRegValue = MP_ReadPhyUshort(sc, 0x16);
29635                         PhyRegValue &= 0x000F;
29636 
29637                         if (PhyRegValue > 3) {
29638                                 rlen = PhyRegValue - 3;
29639                         } else {
29640                                 rlen = 0;
29641                         }
29642 
29643                         PhyRegValue = rlen | (rlen<<4) | (rlen<<8) | (rlen<<12);
29644 
29645                         MP_WritePhyUshort(sc, 0x1F, 0x0BCD);
29646                         MP_WritePhyUshort(sc, 0x17, PhyRegValue);
29647                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
29648                 }
29649 
29650                 if (phy_power_saving == 1) {
29651                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29652                         SetEthPhyBit(sc, 0x10, BIT_2);
29653                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
29654                 } else {
29655                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29656                         ClearEthPhyBit(sc, 0x10, BIT_2);
29657                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
29658                         DELAY(20000);
29659                 }
29660 
29661                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29662                 MP_WritePhyUshort(sc, 0x13, 0x85FE);
29663                 ClearAndSetEthPhyBit(
29664                         sc,
29665                         0x14,
29666                         BIT_15|BIT_14|BIT_13|BIT_12|BIT_11|BIT_10|BIT_8,
29667                         BIT_9);
29668                 MP_WritePhyUshort(sc, 0x13, 0x85FF);
29669                 ClearAndSetEthPhyBit(
29670                         sc,
29671                         0x14,
29672                         BIT_15|BIT_14|BIT_13|BIT_12,
29673                         BIT_11|BIT_10|BIT_9|BIT_8);
29674                 MP_WritePhyUshort(sc, 0x13, 0x814B);
29675                 ClearAndSetEthPhyBit(
29676                         sc,
29677                         0x14,
29678                         BIT_15|BIT_14|BIT_13|BIT_11|BIT_10|BIT_9|BIT_8,
29679                         BIT_12);
29680 
29681                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29682                 MP_WritePhyUshort(sc, 0x13, 0x8045);
29683                 MP_WritePhyUshort(sc, 0x14, 0x2444);
29684                 MP_WritePhyUshort(sc, 0x13, 0x804d);
29685                 MP_WritePhyUshort(sc, 0x14, 0x2444);
29686                 MP_WritePhyUshort(sc, 0x13, 0x805d);
29687                 MP_WritePhyUshort(sc, 0x14, 0x2444);
29688                 MP_WritePhyUshort(sc, 0x13, 0x8011);
29689                 SetEthPhyBit(sc, 0x14, BIT_15);
29690                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
29691                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29692                 MP_WritePhyUshort(sc, 0x00, 0x9200);
29693         }  else if (sc->re_type == MACFG_70 || sc->re_type == MACFG_71 ||
29694                     sc->re_type == MACFG_72) {
29695                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29696                 MP_WritePhyUshort(sc, 0x13, 0x808E);
29697                 ClearAndSetEthPhyBit(sc,
29698                                      0x14,
29699                                      0xFF00,
29700                                      0x4800);
29701                 MP_WritePhyUshort(sc, 0x13, 0x8090);
29702                 ClearAndSetEthPhyBit(sc,
29703                                      0x14,
29704                                      0xFF00,
29705                                      0xCC00);
29706                 MP_WritePhyUshort(sc, 0x13, 0x8092);
29707                 ClearAndSetEthPhyBit(sc,
29708                                      0x14,
29709                                      0xFF00,
29710                                      0xB000);
29711                 MP_WritePhyUshort(sc, 0x13, 0x8088);
29712                 ClearAndSetEthPhyBit(sc,
29713                                      0x14,
29714                                      0xFF00,
29715                                      0x6000);
29716                 MP_WritePhyUshort(sc, 0x13, 0x808B);
29717                 ClearAndSetEthPhyBit(sc,
29718                                      0x14,
29719                                      BIT_13|BIT_12|BIT_11|BIT_10|BIT_9|BIT_8,
29720                                      0x0B00);
29721                 MP_WritePhyUshort(sc, 0x13, 0x808D);
29722                 ClearAndSetEthPhyBit(sc,
29723                                      0x14,
29724                                      BIT_12|BIT_11|BIT_10|BIT_9|BIT_8,
29725                                      0x0600);
29726                 MP_WritePhyUshort(sc, 0x13, 0x808C);
29727                 ClearAndSetEthPhyBit(sc,
29728                                      0x14,
29729                                      0xFF00,
29730                                      0xB000);
29731 
29732                 MP_WritePhyUshort(sc, 0x13, 0x80A0);
29733                 ClearAndSetEthPhyBit(sc,
29734                                      0x14,
29735                                      0xFF00,
29736                                      0x2800);
29737                 MP_WritePhyUshort(sc, 0x13, 0x80A2);
29738                 ClearAndSetEthPhyBit(sc,
29739                                      0x14,
29740                                      0xFF00,
29741                                      0x5000);
29742                 MP_WritePhyUshort(sc, 0x13, 0x809B);
29743                 ClearAndSetEthPhyBit(sc,
29744                                      0x14,
29745                                      BIT_15|BIT_14|BIT_13|BIT_12|BIT_11,
29746                                      BIT_15|BIT_13|BIT_12);
29747                 MP_WritePhyUshort(sc, 0x13, 0x809A);
29748                 ClearAndSetEthPhyBit(sc,
29749                                      0x14,
29750                                      0xFF00,
29751                                      0x4B00);
29752                 MP_WritePhyUshort(sc, 0x13, 0x809D);
29753                 ClearAndSetEthPhyBit(sc,
29754                                      0x14,
29755                                      BIT_13|BIT_12|BIT_11|BIT_10|BIT_9|BIT_8,
29756                                      0x0800);
29757                 MP_WritePhyUshort(sc, 0x13, 0x80A1);
29758                 ClearAndSetEthPhyBit(sc,
29759                                      0x14,
29760                                      0xFF00,
29761                                      0x7000);
29762                 MP_WritePhyUshort(sc, 0x13, 0x809F);
29763                 ClearAndSetEthPhyBit(sc,
29764                                      0x14,
29765                                      BIT_12|BIT_11|BIT_10|BIT_9|BIT_8,
29766                                      0x0300);
29767                 MP_WritePhyUshort(sc, 0x13, 0x809E);
29768                 ClearAndSetEthPhyBit(sc,
29769                                      0x14,
29770                                      0xFF00,
29771                                      0x8800);
29772 
29773                 MP_WritePhyUshort(sc, 0x13, 0x80B2);
29774                 ClearAndSetEthPhyBit(sc,
29775                                      0x14,
29776                                      0xFF00,
29777                                      0x2200);
29778                 MP_WritePhyUshort(sc, 0x13, 0x80AD);
29779                 ClearAndSetEthPhyBit(sc,
29780                                      0x14,
29781                                      BIT_15|BIT_14|BIT_13|BIT_12|BIT_11,
29782                                      BIT_15|BIT_12|BIT_11);
29783                 MP_WritePhyUshort(sc, 0x13, 0x80AF);
29784                 ClearAndSetEthPhyBit(sc,
29785                                      0x14,
29786                                      BIT_13|BIT_12|BIT_11|BIT_10|BIT_9|BIT_8,
29787                                      0x0800);
29788                 MP_WritePhyUshort(sc, 0x13, 0x80B3);
29789                 ClearAndSetEthPhyBit(sc,
29790                                      0x14,
29791                                      0xFF00,
29792                                      0x6F00);
29793                 MP_WritePhyUshort(sc, 0x13, 0x80B1);
29794                 ClearAndSetEthPhyBit(sc,
29795                                      0x14,
29796                                      BIT_12|BIT_11|BIT_10|BIT_9|BIT_8,
29797                                      0x0300);
29798                 MP_WritePhyUshort(sc, 0x13, 0x80B0);
29799                 ClearAndSetEthPhyBit(sc,
29800                                      0x14,
29801                                      0xFF00,
29802                                      0x9300);
29803                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29804 
29805                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29806                 MP_WritePhyUshort(sc, 0x13, 0x8011);
29807                 SetEthPhyBit(sc, 0x14, BIT_11);
29808                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29809 
29810                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
29811                 SetEthPhyBit( sc, 0x11, BIT_11 );
29812                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29813 
29814                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29815                 MP_WritePhyUshort(sc, 0x13, 0x8016);
29816                 SetEthPhyBit(sc, 0x14, BIT_10);
29817                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29818 
29819                 if (phy_power_saving == 1 && !HW_SUPP_SERDES_PHY(sc)) {
29820                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29821                         SetEthPhyBit(sc, 0x10, BIT_2);
29822                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
29823                 } else {
29824                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29825                         ClearEthPhyBit(sc, 0x10, BIT_2);
29826                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
29827                         DELAY(20000);
29828                 }
29829 
29830                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
29831                 MP_WritePhyUshort(sc, 0x13, 0x8045);
29832                 MP_WritePhyUshort(sc, 0x14, 0x2444);
29833                 MP_WritePhyUshort(sc, 0x13, 0x804d);
29834                 MP_WritePhyUshort(sc, 0x14, 0x2444);
29835                 MP_WritePhyUshort(sc, 0x13, 0x805d);
29836                 MP_WritePhyUshort(sc, 0x14, 0x2444);
29837                 MP_WritePhyUshort(sc, 0x13, 0x8011);
29838                 SetEthPhyBit(sc, 0x14, BIT_15);
29839                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
29840                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
29841                 MP_WritePhyUshort(sc, 0x00, 0x9200);
29842         } else if (sc->re_type == MACFG_80) {
29843                 ClearAndSetEthPhyOcpBit(sc,
29844                                         0xAD40,
29845                                         0x03FF,
29846                                         0x84
29847                                        );
29848 
29849                 SetEthPhyOcpBit(sc, 0xAD4E, BIT_4);
29850                 ClearAndSetEthPhyOcpBit(sc,
29851                                         0xAD16,
29852                                         0x03FF,
29853                                         0x0006
29854                                        );
29855                 ClearAndSetEthPhyOcpBit(sc,
29856                                         0xAD32,
29857                                         0x003F,
29858                                         0x0006
29859                                        );
29860                 ClearEthPhyOcpBit(sc, 0xAC08, BIT_12);
29861                 ClearEthPhyOcpBit(sc, 0xAC08, BIT_8);
29862                 ClearAndSetEthPhyOcpBit(sc,
29863                                         0xAC8A,
29864                                         BIT_15|BIT_14|BIT_13|BIT_12,
29865                                         BIT_14|BIT_13|BIT_12
29866                                        );
29867                 SetEthPhyOcpBit(sc, 0xAD18, BIT_10);
29868                 SetEthPhyOcpBit(sc, 0xAD1A, 0x3FF);
29869                 SetEthPhyOcpBit(sc, 0xAD1C, 0x3FF);
29870 
29871 
29872                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80EA);
29873                 ClearAndSetEthPhyOcpBit(sc,
29874                                         0xA438,
29875                                         0xFF00,
29876                                         0xC400
29877                                        );
29878                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80EB);
29879                 ClearAndSetEthPhyOcpBit(sc,
29880                                         0xA438,
29881                                         0x0700,
29882                                         0x0300
29883                                        );
29884                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80F8);
29885                 ClearAndSetEthPhyOcpBit(sc,
29886                                         0xA438,
29887                                         0xFF00,
29888                                         0x1C00
29889                                        );
29890                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80F1);
29891                 ClearAndSetEthPhyOcpBit(sc,
29892                                         0xA438,
29893                                         0xFF00,
29894                                         0x3000
29895                                        );
29896 
29897 
29898                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80FE);
29899                 ClearAndSetEthPhyOcpBit(sc,
29900                                         0xA438,
29901                                         0xFF00,
29902                                         0xA500
29903                                        );
29904                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x8102);
29905                 ClearAndSetEthPhyOcpBit(sc,
29906                                         0xA438,
29907                                         0xFF00,
29908                                         0x5000
29909                                        );
29910                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x8105);
29911                 ClearAndSetEthPhyOcpBit(sc,
29912                                         0xA438,
29913                                         0xFF00,
29914                                         0x3300
29915                                        );
29916                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x8100);
29917                 ClearAndSetEthPhyOcpBit(sc,
29918                                         0xA438,
29919                                         0xFF00,
29920                                         0x7000
29921                                        );
29922                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x8104);
29923                 ClearAndSetEthPhyOcpBit(sc,
29924                                         0xA438,
29925                                         0xFF00,
29926                                         0xF000
29927                                        );
29928                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x8106);
29929                 ClearAndSetEthPhyOcpBit(sc,
29930                                         0xA438,
29931                                         0xFF00,
29932                                         0x6500
29933                                        );
29934                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80DC);
29935                 ClearAndSetEthPhyOcpBit(sc,
29936                                         0xA438,
29937                                         0xFF00,
29938                                         0xED00
29939                                        );
29940                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80DF);
29941                 SetEthPhyOcpBit(sc, 0xA438, BIT_8);
29942                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80E1);
29943                 ClearEthPhyOcpBit(sc, 0xA438, BIT_8);
29944 
29945 
29946                 ClearAndSetEthPhyOcpBit(sc,
29947                                         0xBF06,
29948                                         0x003F,
29949                                         0x38
29950                                        );
29951 
29952 
29953                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x819F);
29954                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xD0B6);
29955 
29956 
29957                 MP_RealWritePhyOcpRegWord(sc, 0xBC34, 0x5555);
29958                 ClearAndSetEthPhyOcpBit(sc,
29959                                         0xBF0A,
29960                                         BIT_11|BIT_10|BIT_9,
29961                                         BIT_11|BIT_9
29962                                        );
29963 
29964 
29965                 ClearEthPhyOcpBit(sc, 0xA5C0, BIT_10);
29966 
29967 
29968                 SetEthPhyOcpBit(sc, 0xA442, BIT_11);
29969 
29970 
29971                 if (phy_power_saving == 1) {
29972                         SetEthPhyOcpBit(sc, 0xA430, BIT_2);
29973                 } else {
29974                         ClearEthPhyOcpBit(sc, 0xA430, BIT_2);
29975                         DELAY(20000);
29976                 }
29977         } else if (sc->re_type == MACFG_81) {
29978                 SetEthPhyOcpBit(sc, 0xAD4E, BIT_4);
29979                 ClearAndSetEthPhyOcpBit(sc,
29980                                         0xAD16,
29981                                         0x03FF,
29982                                         0x03FF
29983                                        );
29984                 ClearAndSetEthPhyOcpBit(sc,
29985                                         0xAD32,
29986                                         0x003F,
29987                                         0x0006
29988                                        );
29989                 ClearEthPhyOcpBit(sc, 0xAC08, BIT_12);
29990                 ClearEthPhyOcpBit(sc, 0xAC08, BIT_8);
29991                 ClearAndSetEthPhyOcpBit(sc,
29992                                         0xACC0,
29993                                         BIT_1|BIT_0,
29994                                         BIT_1
29995                                        );
29996                 ClearAndSetEthPhyOcpBit(sc,
29997                                         0xAD40,
29998                                         BIT_7|BIT_6|BIT_5,
29999                                         BIT_6
30000                                        );
30001                 ClearAndSetEthPhyOcpBit(sc,
30002                                         0xAD40,
30003                                         BIT_2|BIT_1|BIT_0,
30004                                         BIT_2
30005                                        );
30006                 ClearEthPhyOcpBit(sc, 0xAC14, BIT_7);
30007                 ClearEthPhyOcpBit(sc, 0xAC80, BIT_9|BIT_8);
30008                 ClearAndSetEthPhyOcpBit(sc,
30009                                         0xAC5E,
30010                                         BIT_2|BIT_1|BIT_0,
30011                                         BIT_1
30012                                        );
30013                 MP_RealWritePhyOcpRegWord(sc, 0xAD4C, 0x00A8);
30014                 MP_RealWritePhyOcpRegWord(sc, 0xAC5C, 0x01FF);
30015                 ClearAndSetEthPhyOcpBit(sc,
30016                                         0xAC8A,
30017                                         BIT_7|BIT_6|BIT_5|BIT_4,
30018                                         BIT_5|BIT_4
30019                                        );
30020                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8157);
30021                 ClearAndSetEthPhyOcpBit(sc,
30022                                         0xB87E,
30023                                         0xFF00,
30024                                         0x0500
30025                                        );
30026                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8159);
30027                 ClearAndSetEthPhyOcpBit(sc,
30028                                         0xB87E,
30029                                         0xFF00,
30030                                         0x0700
30031                                        );
30032 
30033 
30034                 CSR_WRITE_2(sc, RE_EEE_TXIDLE_TIMER_8125, ifp->if_mtu + ETHER_HDR_LEN + 0x20);
30035 
30036 
30037                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x80A2);
30038                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x0153);
30039                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x809C);
30040                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x0153);
30041 
30042 
30043                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x81B3);
30044                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0043);
30045                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x00A7);
30046                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x00D6);
30047                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x00EC);
30048                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x00F6);
30049                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x00FB);
30050                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x00FD);
30051                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x00FF);
30052                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x00BB);
30053                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0058);
30054                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0029);
30055                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0013);
30056                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0009);
30057                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0004);
30058                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0002);
30059                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
30060                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
30061                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
30062                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
30063                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
30064                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
30065                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
30066                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
30067                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
30068                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
30069                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
30070                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
30071                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
30072                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
30073                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
30074                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
30075                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
30076                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
30077                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
30078                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
30079                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
30080                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
30081                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
30082                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
30083                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0000);
30084 
30085 
30086                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x8257);
30087                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x020F);
30088 
30089 
30090                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80EA);
30091                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x7843);
30092 
30093 
30094                 re_set_phy_mcu_patch_request(sc);
30095 
30096                 ClearEthPhyOcpBit(sc, 0xB896, BIT_0);
30097                 ClearEthPhyOcpBit(sc, 0xB892, 0xFF00);
30098 
30099 
30100                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC091);
30101                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x6E12);
30102                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC092);
30103                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x1214);
30104                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC094);
30105                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x1516);
30106                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC096);
30107                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x171B);
30108                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC098);
30109                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x1B1C);
30110                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC09A);
30111                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x1F1F);
30112                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC09C);
30113                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x2021);
30114                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC09E);
30115                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x2224);
30116                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC0A0);
30117                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x2424);
30118                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC0A2);
30119                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x2424);
30120                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC0A4);
30121                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x2424);
30122                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC018);
30123                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x0AF2);
30124                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC01A);
30125                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x0D4A);
30126                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC01C);
30127                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x0F26);
30128                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC01E);
30129                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x118D);
30130                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC020);
30131                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x14F3);
30132                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC022);
30133                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x175A);
30134                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC024);
30135                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x19C0);
30136                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC026);
30137                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x1C26);
30138                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC089);
30139                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x6050);
30140                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC08A);
30141                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x5F6E);
30142                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC08C);
30143                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x6E6E);
30144                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC08E);
30145                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x6E6E);
30146                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC090);
30147                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x6E12);
30148 
30149                 SetEthPhyOcpBit(sc, 0xB896, BIT_0);
30150 
30151                 re_clear_phy_mcu_patch_request(sc);
30152 
30153 
30154                 SetEthPhyOcpBit(sc, 0xD068, BIT_13);
30155 
30156 
30157                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x81A2);
30158                 SetEthPhyOcpBit(sc, 0xA438, BIT_8);
30159                 ClearAndSetEthPhyOcpBit(sc,
30160                                         0xB54C,
30161                                         0xFF00,
30162                                         0xDB00);
30163 
30164 
30165                 ClearEthPhyOcpBit(sc, 0xA454, BIT_0);
30166 
30167 
30168                 SetEthPhyOcpBit(sc, 0xA5D4, BIT_5);
30169                 ClearEthPhyOcpBit(sc, 0xAD4E, BIT_4);
30170                 ClearEthPhyOcpBit(sc, 0xA86A, BIT_0);
30171 
30172 
30173                 SetEthPhyOcpBit(sc, 0xA442, BIT_11);
30174 
30175 
30176                 if (sc->RequirePhyMdiSwapPatch) {
30177                         u_int16_t adccal_offset_p0;
30178                         u_int16_t adccal_offset_p1;
30179                         u_int16_t adccal_offset_p2;
30180                         u_int16_t adccal_offset_p3;
30181                         u_int16_t rg_lpf_cap_xg_p0;
30182                         u_int16_t rg_lpf_cap_xg_p1;
30183                         u_int16_t rg_lpf_cap_xg_p2;
30184                         u_int16_t rg_lpf_cap_xg_p3;
30185                         u_int16_t rg_lpf_cap_p0;
30186                         u_int16_t rg_lpf_cap_p1;
30187                         u_int16_t rg_lpf_cap_p2;
30188                         u_int16_t rg_lpf_cap_p3;
30189 
30190                         //	GPHY OCP 0xD068 bit[2:0] = 0x1 ([2:1]:subadc,[0]:offset)
30191                         //	GPHY OCP 0xD068 bit[4:3] = 0x0 (p0)
30192                         //	adccal_offset_p0 = GPHY OCP 0xD06A bit[10:0]
30193                         //	GPHY OCP 0xD068 bit[4:3] = 0x1 (p1)
30194                         //	adccal_offset_p1 = GPHY OCP 0xD06A bit[10:0]
30195                         //	GPHY OCP 0xD068 bit[4:3] = 0x2 (p2)
30196                         //	adccal_offset_p2 = GPHY OCP 0xD06A bit[10:0]
30197                         //	GPHY OCP 0xD068 bit[4:3] = 0x3 (p3)
30198                         //	adccal_offset_p3 = GPHY OCP 0xD06A bit[10:0]
30199                         ClearAndSetEthPhyOcpBit(sc,
30200                                                 0xD068,
30201                                                 0x0007,
30202                                                 0x0001
30203                                                );
30204                         ClearAndSetEthPhyOcpBit(sc,
30205                                                 0xD068,
30206                                                 0x0018,
30207                                                 0x0000
30208                                                );
30209                         adccal_offset_p0 = MP_RealReadPhyOcpRegWord(sc, 0xD06A);
30210                         adccal_offset_p0 &= 0x07FF;
30211                         ClearAndSetEthPhyOcpBit(sc,
30212                                                 0xD068,
30213                                                 0x0018,
30214                                                 0x0008
30215                                                );
30216                         adccal_offset_p1 = MP_RealReadPhyOcpRegWord(sc, 0xD06A);
30217                         adccal_offset_p1 &= 0x07FF;
30218                         ClearAndSetEthPhyOcpBit(sc,
30219                                                 0xD068,
30220                                                 0x0018,
30221                                                 0x0010
30222                                                );
30223                         adccal_offset_p2 = MP_RealReadPhyOcpRegWord(sc, 0xD06A);
30224                         adccal_offset_p2 &= 0x07FF;
30225                         ClearAndSetEthPhyOcpBit(sc,
30226                                                 0xD068,
30227                                                 0x0018,
30228                                                 0x0018
30229                                                );
30230                         adccal_offset_p3 = MP_RealReadPhyOcpRegWord(sc, 0xD06A);
30231                         adccal_offset_p3 &= 0x07FF;
30232 
30233 
30234                         //	GPHY OCP 0xD068 bit[4:3] = 0x0 (p0)
30235                         //	GPHY OCP 0xD06A bit[10:0] = adccal_offset_p3
30236                         //	GPHY OCP 0xD068 bit[4:3] = 0x1 (p1)
30237                         //	GPHY OCP 0xD06A bit[10:0] = adccal_offset_p2
30238                         //	GPHY OCP 0xD068 bit[4:3] = 0x2 (p2)
30239                         //	GPHY OCP 0xD06A bit[10:0] = adccal_offset_p1
30240                         //	GPHY OCP 0xD068 bit[4:3] = 0x3 (p3)
30241                         //	GPHY OCP 0xD06A bit[10:0] = adccal_offset_p0
30242                         ClearAndSetEthPhyOcpBit(sc,
30243                                                 0xD068,
30244                                                 0x0018,
30245                                                 0x0000
30246                                                );
30247                         ClearAndSetEthPhyOcpBit(sc,
30248                                                 0xD06A,
30249                                                 0x07FF,
30250                                                 adccal_offset_p3
30251                                                );
30252                         ClearAndSetEthPhyOcpBit(sc,
30253                                                 0xD068,
30254                                                 0x0018,
30255                                                 0x0008
30256                                                );
30257                         ClearAndSetEthPhyOcpBit(sc,
30258                                                 0xD06A,
30259                                                 0x07FF,
30260                                                 adccal_offset_p2
30261                                                );
30262                         ClearAndSetEthPhyOcpBit(sc,
30263                                                 0xD068,
30264                                                 0x0018,
30265                                                 0x0010
30266                                                );
30267                         ClearAndSetEthPhyOcpBit(sc,
30268                                                 0xD06A,
30269                                                 0x07FF,
30270                                                 adccal_offset_p1
30271                                                );
30272                         ClearAndSetEthPhyOcpBit(sc,
30273                                                 0xD068,
30274                                                 0x0018,
30275                                                 0x0018
30276                                                );
30277                         ClearAndSetEthPhyOcpBit(sc,
30278                                                 0xD06A,
30279                                                 0x07FF,
30280                                                 adccal_offset_p0
30281                                                );
30282                         //	rg_lpf_cap_xg_p0 = GPHY OCP 0xBD5A bit[4:0]
30283                         //	rg_lpf_cap_xg_p1 = GPHY OCP 0xBD5A bit[12:8]
30284                         //	rg_lpf_cap_xg_p2 = GPHY OCP 0xBD5C bit[4:0]
30285                         //	rg_lpf_cap_xg_p3 = GPHY OCP 0xBD5C bit[12:8]
30286                         //	rg_lpf_cap_p0 = GPHY OCP 0xBC18 bit[4:0]
30287                         //	rg_lpf_cap_p1 = GPHY OCP 0xBC18 bit[12:8]
30288                         //	rg_lpf_cap_p2 = GPHY OCP 0xBC1A bit[4:0]
30289                         //	rg_lpf_cap_p3 = GPHY OCP 0xBC1A bit[12:8]
30290                         rg_lpf_cap_xg_p0 = MP_RealReadPhyOcpRegWord(sc, 0xBD5A);
30291                         rg_lpf_cap_xg_p0 &= 0x001F;
30292                         rg_lpf_cap_xg_p1 = MP_RealReadPhyOcpRegWord(sc, 0xBD5A);
30293                         rg_lpf_cap_xg_p1 &= 0x1F00;
30294                         rg_lpf_cap_xg_p2 = MP_RealReadPhyOcpRegWord(sc, 0xBD5C);
30295                         rg_lpf_cap_xg_p2 &= 0x001F;
30296                         rg_lpf_cap_xg_p3 = MP_RealReadPhyOcpRegWord(sc, 0xBD5C);
30297                         rg_lpf_cap_xg_p3 &= 0x1F00;
30298                         rg_lpf_cap_p0 = MP_RealReadPhyOcpRegWord(sc, 0xBC18);
30299                         rg_lpf_cap_p0 &= 0x001F;
30300                         rg_lpf_cap_p1 = MP_RealReadPhyOcpRegWord(sc, 0xBC18);
30301                         rg_lpf_cap_p1 &= 0x1F00;
30302                         rg_lpf_cap_p2 = MP_RealReadPhyOcpRegWord(sc, 0xBC1A);
30303                         rg_lpf_cap_p2 &= 0x001F;
30304                         rg_lpf_cap_p3 = MP_RealReadPhyOcpRegWord(sc, 0xBC1A);
30305                         rg_lpf_cap_p3 &= 0x1F00;
30306 
30307                         //	GPHY OCP 0xBD5A bit[4:0] = rg_lpf_cap_xg_p3
30308                         //	GPHY OCP 0xBD5A bit[12:8] = rg_lpf_cap_xg_p2
30309                         //	GPHY OCP 0xBD5C bit[4:0] = rg_lpf_cap_xg_p1
30310                         //	GPHY OCP 0xBD5C bit[12:8] = rg_lpf_cap_xg_p0
30311                         //	GPHY OCP 0xBC18 bit[4:0] = rg_lpf_cap_p3
30312                         //	GPHY OCP 0xBC18 bit[12:8] = rg_lpf_cap_p2
30313                         //	GPHY OCP 0xBC1A bit[4:0] = rg_lpf_cap_p1
30314                         //	GPHY OCP 0xBC1A bit[12:8] = rg_lpf_cap_p0
30315                         ClearAndSetEthPhyOcpBit(sc,
30316                                                 0xBD5A,
30317                                                 0x001F,
30318                                                 rg_lpf_cap_xg_p3 >> 8
30319                                                );
30320                         ClearAndSetEthPhyOcpBit(sc,
30321                                                 0xBD5A,
30322                                                 0x1F00,
30323                                                 rg_lpf_cap_xg_p2 << 8
30324                                                );
30325                         ClearAndSetEthPhyOcpBit(sc,
30326                                                 0xBD5C,
30327                                                 0x001F,
30328                                                 rg_lpf_cap_xg_p1 >> 8
30329                                                );
30330                         ClearAndSetEthPhyOcpBit(sc,
30331                                                 0xBD5C,
30332                                                 0x1F00,
30333                                                 rg_lpf_cap_xg_p0 << 8
30334                                                );
30335                         ClearAndSetEthPhyOcpBit(sc,
30336                                                 0xBC18,
30337                                                 0x001F,
30338                                                 rg_lpf_cap_p3 >> 8
30339                                                );
30340                         ClearAndSetEthPhyOcpBit(sc,
30341                                                 0xBC18,
30342                                                 0x1F00,
30343                                                 rg_lpf_cap_p2 << 8
30344                                                );
30345                         ClearAndSetEthPhyOcpBit(sc,
30346                                                 0xBC1A,
30347                                                 0x001F,
30348                                                 rg_lpf_cap_p1 >> 8
30349                                                );
30350                         ClearAndSetEthPhyOcpBit(sc,
30351                                                 0xBC1A,
30352                                                 0x1F00,
30353                                                 rg_lpf_cap_p0 << 8
30354                                                );
30355                 }
30356 
30357 
30358                 if (phy_power_saving == 1) {
30359                         SetEthPhyOcpBit(sc, 0xA430, BIT_2);
30360                 } else {
30361                         ClearEthPhyOcpBit(sc, 0xA430, BIT_2);
30362                         DELAY(20000);
30363                 }
30364         } else if (sc->re_type == MACFG_82) {
30365                 SetEthPhyOcpBit(sc, 0xA442, BIT_11);
30366 
30367 
30368                 SetEthPhyOcpBit(sc, 0xBC08, (BIT_3 | BIT_2));
30369 
30370 
30371                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x8FFF);
30372                 ClearAndSetEthPhyOcpBit(sc,
30373                                         0xA438,
30374                                         0xFF00,
30375                                         0x0400
30376                                        );
30377                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8560);
30378                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x19CC);
30379                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8562);
30380                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x19CC);
30381                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8564);
30382                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x19CC);
30383                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8566);
30384                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x147D);
30385                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8568);
30386                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x147D);
30387                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x856A);
30388                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x147D);
30389                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8FFE);
30390                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x0907);
30391                 ClearAndSetEthPhyOcpBit(sc,
30392                                         0xACDA,
30393                                         0xFF00,
30394                                         0xFF00
30395                                        );
30396                 ClearAndSetEthPhyOcpBit(sc,
30397                                         0xACDE,
30398                                         0xF000,
30399                                         0xF000
30400                                        );
30401                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x80D6);
30402                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x2801);
30403                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x80F2);
30404                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x2801);
30405                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x80F4);
30406                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x6077);
30407                 MP_RealWritePhyOcpRegWord(sc, 0xB506, 0x01E7);
30408                 MP_RealWritePhyOcpRegWord(sc, 0xAC8C, 0x0FFC);
30409                 MP_RealWritePhyOcpRegWord(sc, 0xAC46, 0xB7B4);
30410                 MP_RealWritePhyOcpRegWord(sc, 0xAC50, 0x0FBC);
30411                 MP_RealWritePhyOcpRegWord(sc, 0xAC3C, 0x9240);
30412                 MP_RealWritePhyOcpRegWord(sc, 0xAC4E, 0x0DB4);
30413                 MP_RealWritePhyOcpRegWord(sc, 0xACC6, 0x0707);
30414                 MP_RealWritePhyOcpRegWord(sc, 0xACC8, 0xA0D3);
30415                 MP_RealWritePhyOcpRegWord(sc, 0xAD08, 0x0007);
30416 
30417                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8013);
30418                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x0700);
30419                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8FB9);
30420                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x2801);
30421                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8FBA);
30422                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x0100);
30423                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8FBC);
30424                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x1900);
30425                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8FBE);
30426                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0xE100);
30427                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8FC0);
30428                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x0800);
30429                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8FC2);
30430                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0xE500);
30431                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8FC4);
30432                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x0F00);
30433                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8FC6);
30434                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0xF100);
30435                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8FC8);
30436                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x0400);
30437                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8FCa);
30438                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0xF300);
30439                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8FCc);
30440                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0xFD00);
30441                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8FCe);
30442                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0xFF00);
30443                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8FD0);
30444                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0xFB00);
30445                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8FD2);
30446                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x0100);
30447                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8FD4);
30448                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0xF400);
30449                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8FD6);
30450                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0xFF00);
30451                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8FD8);
30452                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0xF600);
30453 
30454 
30455                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x813D);
30456                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x390E);
30457                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x814F);
30458                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x790E);
30459                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x80B0);
30460                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x0F31);
30461                 SetEthPhyOcpBit(sc, 0xBF4C, BIT_1);
30462                 SetEthPhyOcpBit(sc, 0xBCCA, (BIT_9 | BIT_8));
30463                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8141);
30464                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x320E);
30465                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8153);
30466                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x720E);
30467                 ClearEthPhyOcpBit(sc, 0xA432, BIT_6);
30468                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8529);
30469                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x050E);
30470 
30471 
30472                 CSR_WRITE_2(sc, RE_EEE_TXIDLE_TIMER_8125, ifp->if_mtu + ETHER_HDR_LEN + 0x20);
30473 
30474 
30475                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x816C);
30476                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xC4A0);
30477                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x8170);
30478                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xC4A0);
30479                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x8174);
30480                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x04A0);
30481                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x8178);
30482                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x04A0);
30483                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x817C);
30484                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0719);
30485                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x8FF4);
30486                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0400);
30487                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x8FF1);
30488                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0404);
30489                 MP_RealWritePhyOcpRegWord(sc, 0xBF4A, 0x001B);
30490                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8033);
30491                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x7C13);
30492                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8037);
30493                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x7C13);
30494                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x803B);
30495                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0xFC32);
30496                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x803F);
30497                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x7C13);
30498                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8043);
30499                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x7C13);
30500                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8047);
30501                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x7C13);
30502 
30503 
30504                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8145);
30505                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x370E);
30506                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8157);
30507                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x770E);
30508                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8169);
30509                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x0D0A);
30510                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x817B);
30511                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x1D0A);
30512 
30513 
30514                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x8217);
30515                 ClearAndSetEthPhyOcpBit(sc,
30516                                         0xA438,
30517                                         0xFF00,
30518                                         0x5000
30519                                        );
30520                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x821A);
30521                 ClearAndSetEthPhyOcpBit(sc,
30522                                         0xA438,
30523                                         0xFF00,
30524                                         0x5000
30525                                        );
30526 
30527                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80DA);
30528                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0403);
30529                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80DC);
30530                 ClearAndSetEthPhyOcpBit(sc,
30531                                         0xA438,
30532                                         0xFF00,
30533                                         0x1000
30534                                        );
30535                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80B3);
30536                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x0384);
30537                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80B7);
30538                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x2007);
30539                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80BA);
30540                 ClearAndSetEthPhyOcpBit(sc,
30541                                         0xA438,
30542                                         0xFF00,
30543                                         0x6C00
30544                                        );
30545                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80B5);
30546                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xF009);
30547                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80BD);
30548                 ClearAndSetEthPhyOcpBit(sc,
30549                                         0xA438,
30550                                         0xFF00,
30551                                         0x9F00
30552                                        );
30553 
30554                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80C7);
30555                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xf083);
30556                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80DD);
30557                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x03f0);
30558                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80DF);
30559                 ClearAndSetEthPhyOcpBit(sc,
30560                                         0xA438,
30561                                         0xFF00,
30562                                         0x1000
30563                                        );
30564                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80CB);
30565                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x2007);
30566                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80CE);
30567                 ClearAndSetEthPhyOcpBit(sc,
30568                                         0xA438,
30569                                         0xFF00,
30570                                         0x6C00
30571                                        );
30572                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80C9);
30573                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x8009);
30574                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80D1);
30575                 ClearAndSetEthPhyOcpBit(sc,
30576                                         0xA438,
30577                                         0xFF00,
30578                                         0x8000
30579                                        );
30580 
30581                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80A3);
30582                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x200A);
30583                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80A5);
30584                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0xF0AD);
30585                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x809F);
30586                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x6073);
30587                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80A1);
30588                 MP_RealWritePhyOcpRegWord(sc, 0xA438, 0x000B);
30589                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x80A9);
30590                 ClearAndSetEthPhyOcpBit(sc,
30591                                         0xA438,
30592                                         0xFF00,
30593                                         0xC000
30594                                        );
30595 
30596                 re_set_phy_mcu_patch_request(sc);
30597 
30598                 ClearEthPhyOcpBit(sc, 0xB896, BIT_0);
30599                 ClearEthPhyOcpBit(sc, 0xB892, 0xFF00);
30600 
30601                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC23E);
30602                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x0000);
30603                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC240);
30604                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x0103);
30605                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC242);
30606                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x0507);
30607                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC244);
30608                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x090B);
30609                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC246);
30610                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x0C0E);
30611                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC248);
30612                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x1012);
30613                 MP_RealWritePhyOcpRegWord(sc, 0xB88E, 0xC24A);
30614                 MP_RealWritePhyOcpRegWord(sc, 0xB890, 0x1416);
30615 
30616                 SetEthPhyOcpBit(sc, 0xB896, BIT_0);
30617 
30618                 re_clear_phy_mcu_patch_request(sc);
30619 
30620 
30621                 SetEthPhyOcpBit(sc, 0xA86A, BIT_0);
30622                 SetEthPhyOcpBit(sc, 0xA6F0, BIT_0);
30623 
30624 
30625                 MP_RealWritePhyOcpRegWord(sc, 0xBFA0, 0xD70D);
30626                 MP_RealWritePhyOcpRegWord(sc, 0xBFA2, 0x4100);
30627                 MP_RealWritePhyOcpRegWord(sc, 0xBFA4, 0xE868);
30628                 MP_RealWritePhyOcpRegWord(sc, 0xBFA6, 0xDC59);
30629                 MP_RealWritePhyOcpRegWord(sc, 0xB54C, 0x3C18);
30630                 ClearEthPhyOcpBit(sc, 0xBFA4, BIT_5);
30631                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x817D);
30632                 SetEthPhyOcpBit(sc, 0xA438, BIT_12);
30633 
30634 
30635                 if (phy_power_saving == 1) {
30636                         SetEthPhyOcpBit(sc, 0xA430, BIT_2);
30637                 } else {
30638                         ClearEthPhyOcpBit(sc, 0xA430, BIT_2);
30639                         DELAY(20000);
30640                 }
30641         } else if (sc->re_type == MACFG_83) {
30642                 SetEthPhyOcpBit(sc, 0xA442, BIT_11);
30643 
30644 
30645                 ClearAndSetEthPhyOcpBit(sc,
30646                                         0xAC46,
30647                                         0x00F0,
30648                                         0x0090
30649                                        );
30650                 ClearAndSetEthPhyOcpBit(sc,
30651                                         0xAD30,
30652                                         0x0003,
30653                                         0x0001
30654                                        );
30655 
30656 
30657                 CSR_WRITE_2(sc, RE_EEE_TXIDLE_TIMER_8125, ifp->if_mtu + ETHER_HDR_LEN + 0x20);
30658 
30659                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x80F5);
30660                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x760E);
30661                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8107);
30662                 MP_RealWritePhyOcpRegWord(sc, 0xB87E, 0x360E);
30663                 MP_RealWritePhyOcpRegWord(sc, 0xB87C, 0x8551);
30664                 ClearAndSetEthPhyOcpBit(sc,
30665                                         0xB87E,
30666                                         BIT_15 | BIT_14 | BIT_13 | BIT_12 | BIT_11 | BIT_10 | BIT_9 | BIT_8,
30667                                         BIT_11
30668                                        );
30669 
30670                 ClearAndSetEthPhyOcpBit(sc,
30671                                         0xbf00,
30672                                         0xE000,
30673                                         0xA000
30674                                        );
30675                 ClearAndSetEthPhyOcpBit(sc,
30676                                         0xbf46,
30677                                         0x0F00,
30678                                         0x0300
30679                                        );
30680                 MP_RealWritePhyOcpRegWord(sc, 0xa436, 0x8044);
30681                 MP_RealWritePhyOcpRegWord(sc, 0xa438, 0x2417);
30682                 MP_RealWritePhyOcpRegWord(sc, 0xa436, 0x804A);
30683                 MP_RealWritePhyOcpRegWord(sc, 0xa438, 0x2417);
30684                 MP_RealWritePhyOcpRegWord(sc, 0xa436, 0x8050);
30685                 MP_RealWritePhyOcpRegWord(sc, 0xa438, 0x2417);
30686                 MP_RealWritePhyOcpRegWord(sc, 0xa436, 0x8056);
30687                 MP_RealWritePhyOcpRegWord(sc, 0xa438, 0x2417);
30688                 MP_RealWritePhyOcpRegWord(sc, 0xa436, 0x805C);
30689                 MP_RealWritePhyOcpRegWord(sc, 0xa438, 0x2417);
30690                 MP_RealWritePhyOcpRegWord(sc, 0xa436, 0x8062);
30691                 MP_RealWritePhyOcpRegWord(sc, 0xa438, 0x2417);
30692                 MP_RealWritePhyOcpRegWord(sc, 0xa436, 0x8068);
30693                 MP_RealWritePhyOcpRegWord(sc, 0xa438, 0x2417);
30694                 MP_RealWritePhyOcpRegWord(sc, 0xa436, 0x806E);
30695                 MP_RealWritePhyOcpRegWord(sc, 0xa438, 0x2417);
30696                 MP_RealWritePhyOcpRegWord(sc, 0xa436, 0x8074);
30697                 MP_RealWritePhyOcpRegWord(sc, 0xa438, 0x2417);
30698                 MP_RealWritePhyOcpRegWord(sc, 0xa436, 0x807A);
30699                 MP_RealWritePhyOcpRegWord(sc, 0xa438, 0x2417);
30700 
30701                 ////Nway DACONB
30702                 //GPHY OCP 0xA4CA bit[6] = 0x1 (rg_dac_lp_burst_off_option)
30703                 SetEthPhyOcpBit(sc, 0xA4CA, BIT_6);
30704 
30705                 /*
30706                 MP_RealWritePhyOcpRegWord(sc, 0xBFA0, 0xD70D);
30707                 MP_RealWritePhyOcpRegWord(sc, 0xBFA2, 0x4100);
30708                 MP_RealWritePhyOcpRegWord(sc, 0xBFA4, 0xE868);
30709                 MP_RealWritePhyOcpRegWord(sc, 0xBFA6, 0xDC59);
30710                 MP_RealWritePhyOcpRegWord(sc, 0xB54C, 0x3C18);
30711                 ClearEthPhyOcpBit(sc, 0xBFA4, BIT_5);
30712                 MP_RealWritePhyOcpRegWord(sc, 0xA436, 0x817D);
30713                 SetEthPhyOcpBit(sc, 0xA438, BIT_12);
30714                 */
30715 
30716 
30717                 if (phy_power_saving == 1) {
30718                         SetEthPhyOcpBit(sc, 0xA430, BIT_2);
30719                 } else {
30720                         ClearEthPhyOcpBit(sc, 0xA430, BIT_2);
30721                         DELAY(20000);
30722                 }
30723         }
30724 
30725 #ifdef ENABLE_FIBER_SUPPORT
30726         if (HW_FIBER_MODE_ENABLED(sc))
30727                 re_hw_fiber_phy_config(sc);
30728 #endif //ENABLE_FIBER_SUPPORT
30729 
30730         //EthPhyPPSW
30731         if (sc->re_type == MACFG_56 || sc->re_type == MACFG_57 ||
30732             sc->re_type == MACFG_58 || sc->re_type == MACFG_59 ||
30733             sc->re_type == MACFG_60) {
30734                 //disable EthPhyPPSW
30735                 MP_WritePhyUshort(sc, 0x1F, 0x0BCD);
30736                 MP_WritePhyUshort(sc, 0x14, 0x5065);
30737                 MP_WritePhyUshort(sc, 0x14, 0xD065);
30738                 MP_WritePhyUshort(sc, 0x1F, 0x0BC8);
30739                 MP_WritePhyUshort(sc, 0x12, 0x00ED);
30740                 MP_WritePhyUshort(sc, 0x1F, 0x0BCD);
30741                 MP_WritePhyUshort(sc, 0x14, 0x1065);
30742                 MP_WritePhyUshort(sc, 0x14, 0x9065);
30743                 MP_WritePhyUshort(sc, 0x14, 0x1065);
30744                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
30745         } else if (sc->re_type == MACFG_68 || sc->re_type == MACFG_69) {
30746                 //enable EthPhyPPSW
30747                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
30748                 SetEthPhyBit(sc, 0x11, BIT_7);
30749                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
30750         }
30751 
30752         switch(sc->re_type) {
30753         case MACFG_56:
30754         case MACFG_57:
30755         case MACFG_58:
30756         case MACFG_59:
30757         case MACFG_60:
30758         case MACFG_61:
30759         case MACFG_62:
30760         case MACFG_67:
30761         case MACFG_68:
30762         case MACFG_69:
30763         case MACFG_70:
30764         case MACFG_71:
30765         case MACFG_72:
30766         case MACFG_80:
30767         case MACFG_81:
30768         case MACFG_82:
30769         case MACFG_83:
30770                 if (phy_mdix_mode == RE_ETH_PHY_FORCE_MDI) {
30771                         //Force MDI
30772                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
30773                         SetEthPhyBit(sc, 0x10, BIT_8 | BIT_9);
30774                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
30775                 } else if (phy_mdix_mode == RE_ETH_PHY_FORCE_MDIX) {
30776                         //Force MDIX
30777                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
30778                         ClearEthPhyBit(sc, 0x10, BIT_8);
30779                         SetEthPhyBit(sc, 0x10, BIT_9);
30780                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
30781                 } else {
30782                         //Auto MDI/MDIX
30783                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
30784                         ClearEthPhyBit(sc, 0x10, BIT_8 | BIT_9);
30785                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
30786                 }
30787 
30788                 break;
30789         }
30790 
30791         //legacy force mode(Chap 22)
30792         switch(sc->re_type) {
30793         case MACFG_80:
30794         case MACFG_81:
30795         case MACFG_82:
30796         case MACFG_83:
30797                 MP_WritePhyUshort(sc, 0x1F, 0x0A5B);
30798                 ClearEthPhyBit(sc, 0x12, BIT_15);
30799                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
30800                 break;
30801         }
30802 
30803         if (phy_power_saving == 1) {
30804                 switch (sc->re_type) {
30805                 case MACFG_59:
30806                 case MACFG_60:
30807                 case MACFG_62:
30808                 case MACFG_67:
30809                 case MACFG_68:
30810                 case MACFG_69:
30811                 case MACFG_70:
30812                 case MACFG_71:
30813                 case MACFG_72:
30814                         re_enable_ocp_phy_power_saving(sc);
30815                         break;
30816                 case MACFG_80:
30817                 case MACFG_81:
30818                 case MACFG_82:
30819                 case MACFG_83:
30820                         //re_enable_ocp_phy_power_saving(sc);
30821                         break;
30822                 }
30823         }
30824 
30825         if (eee_enable == 1)
30826                 re_enable_EEE(sc);
30827         else
30828                 re_disable_EEE(sc);
30829 
30830         MP_WritePhyUshort(sc, 0x1F, 0x0000);
30831 }
30832 
30833 void MP_WritePhyUshort(struct re_softc *sc,u_int8_t RegAddr,u_int16_t RegData)
30834 {
30835         u_int32_t		TmpUlong=0x80000000;
30836         u_int32_t		Timeout=0;
30837 
30838         if (RegAddr == 0x1F) {
30839                 sc->cur_page = RegData;
30840         }
30841 
30842         if (sc->re_type == MACFG_63) {
30843                 int i;
30844                 CSR_WRITE_4(sc, RE_OCPDR, OCPDR_Write |
30845                             (RegAddr & OCPDR_Reg_Mask) << OCPDR_GPHY_Reg_shift |
30846                             (RegData & OCPDR_Data_Mask));
30847                 CSR_WRITE_4(sc, RE_OCPAR, OCPAR_GPHY_Write);
30848                 CSR_WRITE_4(sc, RE_EPHY_RXER_NUM, 0);
30849 
30850                 for (i = 0; i < 100; i++) {
30851                         DELAY(1000);
30852                         if (!(CSR_READ_4(sc, RE_OCPAR) & OCPAR_Flag))
30853                                 break;
30854                 }
30855         } else if (sc->re_type == MACFG_56 || sc->re_type == MACFG_57 ||
30856                    sc->re_type == MACFG_58 || sc->re_type == MACFG_59 ||
30857                    sc->re_type == MACFG_60 || sc->re_type == MACFG_61 ||
30858                    sc->re_type == MACFG_62 || sc->re_type == MACFG_67 ||
30859                    sc->re_type == MACFG_68 || sc->re_type == MACFG_69 ||
30860                    sc->re_type == MACFG_70 || sc->re_type == MACFG_71 ||
30861                    sc->re_type == MACFG_72 || sc->re_type == MACFG_80 ||
30862                    sc->re_type == MACFG_81 || sc->re_type == MACFG_82 ||
30863                    sc->re_type == MACFG_83) {
30864                 if (RegAddr == 0x1F) {
30865                         return;
30866                 }
30867 
30868                 MP_WritePhyOcpRegWord(sc, sc->cur_page, RegAddr, RegData);
30869         } else {
30870                 if (sc->re_type == MACFG_65 || sc->re_type == MACFG_66)
30871                         CSR_WRITE_4(sc, 0xD0, CSR_READ_4(sc, 0xD0) & ~0x00020000);
30872 
30873                 TmpUlong |= (((u_int32_t)RegAddr)<<16 | (u_int32_t)RegData);
30874 
30875                 CSR_WRITE_4(sc, RE_PHYAR, TmpUlong);
30876 
30877                 /* Wait for writing to Phy ok */
30878                 for (Timeout=0; Timeout<5; Timeout++) {
30879                         DELAY(1000);
30880                         if ((CSR_READ_4(sc, RE_PHYAR)&PHYAR_Flag)==0)
30881                                 break;
30882                 }
30883 
30884                 if (sc->re_type == MACFG_65 || sc->re_type == MACFG_66)
30885                         CSR_WRITE_4(sc, 0xD0, CSR_READ_4(sc, 0xD0) | 0x00020000);
30886         }
30887 }
30888 
30889 u_int16_t MP_ReadPhyUshort(struct re_softc *sc,u_int8_t RegAddr)
30890 {
30891         u_int16_t		RegData;
30892         u_int32_t		TmpUlong;
30893         u_int32_t		Timeout=0;
30894 
30895         if (sc->re_type == MACFG_63) {
30896                 int i;
30897                 CSR_WRITE_4(sc, RE_OCPDR, OCPDR_Read |
30898                             (RegAddr & OCPDR_Reg_Mask) << OCPDR_GPHY_Reg_shift);
30899                 CSR_WRITE_4(sc, RE_OCPAR, OCPAR_GPHY_Write);
30900                 CSR_WRITE_4(sc, RE_EPHY_RXER_NUM, 0);
30901 
30902                 for (i = 0; i < 100; i++) {
30903                         DELAY(1000);
30904                         if (!(CSR_READ_4(sc, RE_OCPAR) & OCPAR_Flag))
30905                                 break;
30906                 }
30907 
30908                 DELAY(1000);
30909                 CSR_WRITE_4(sc, RE_OCPAR, OCPAR_GPHY_Read);
30910                 CSR_WRITE_4(sc, RE_EPHY_RXER_NUM, 0);
30911 
30912                 for (i = 0; i < 100; i++) {
30913                         DELAY(1000);
30914                         if (CSR_READ_4(sc, RE_OCPAR) & OCPAR_Flag)
30915                                 break;
30916                 }
30917 
30918                 RegData = CSR_READ_4(sc, RE_OCPDR) & OCPDR_Data_Mask;
30919         } else if (sc->re_type == MACFG_56 || sc->re_type == MACFG_57 ||
30920                    sc->re_type == MACFG_58 || sc->re_type == MACFG_59 ||
30921                    sc->re_type == MACFG_60 || sc->re_type == MACFG_61 ||
30922                    sc->re_type == MACFG_62 || sc->re_type == MACFG_67 ||
30923                    sc->re_type == MACFG_68 || sc->re_type == MACFG_69 ||
30924                    sc->re_type == MACFG_70 || sc->re_type == MACFG_71 ||
30925                    sc->re_type == MACFG_72 || sc->re_type == MACFG_80 ||
30926                    sc->re_type == MACFG_81 || sc->re_type == MACFG_82 ||
30927                    sc->re_type == MACFG_83) {
30928                 RegData = MP_ReadPhyOcpRegWord(sc, sc->cur_page, RegAddr);
30929         } else {
30930                 if (sc->re_type == MACFG_65 || sc->re_type == MACFG_66)
30931                         CSR_WRITE_4(sc, 0xD0, CSR_READ_4(sc, 0xD0) & ~0x00020000);
30932 
30933                 TmpUlong = ((u_int32_t)RegAddr << 16);
30934                 CSR_WRITE_4(sc, RE_PHYAR, TmpUlong);
30935 
30936                 /* Wait for writing to Phy ok */
30937                 for (Timeout=0; Timeout<5; Timeout++) {
30938                         DELAY(1000);
30939                         TmpUlong = CSR_READ_4(sc, RE_PHYAR);
30940                         if ((TmpUlong&PHYAR_Flag)!=0)
30941                                 break;
30942                 }
30943 
30944                 RegData = (u_int16_t)(TmpUlong & 0x0000ffff);
30945 
30946                 if (sc->re_type == MACFG_65 || sc->re_type == MACFG_66)
30947                         CSR_WRITE_4(sc, 0xD0, CSR_READ_4(sc, 0xD0) | 0x00020000);
30948         }
30949 
30950         return RegData;
30951 }
30952 
30953 void MP_WriteEPhyUshort(struct re_softc *sc, u_int8_t RegAddr, u_int16_t RegData)
30954 {
30955         u_int32_t		TmpUlong=0x80000000;
30956         u_int32_t		Timeout=0;
30957 
30958         TmpUlong |= (((u_int32_t)RegAddr<<16) | (u_int32_t)RegData);
30959 
30960         CSR_WRITE_4(sc, RE_EPHYAR, TmpUlong);
30961 
30962         /* Wait for writing to Phy ok */
30963         for (Timeout=0; Timeout<5; Timeout++) {
30964                 DELAY(1000);
30965                 if ((CSR_READ_4(sc, RE_EPHYAR)&PHYAR_Flag)==0)
30966                         break;
30967         }
30968 }
30969 
30970 u_int16_t MP_ReadEPhyUshort(struct re_softc *sc, u_int8_t RegAddr)
30971 {
30972         u_int16_t		RegData;
30973         u_int32_t		TmpUlong;
30974         u_int32_t		Timeout=0;
30975 
30976         TmpUlong = ((u_int32_t)RegAddr << 16);
30977         CSR_WRITE_4(sc, RE_EPHYAR, TmpUlong);
30978 
30979         /* Wait for writing to Phy ok */
30980         for (Timeout=0; Timeout<5; Timeout++) {
30981                 DELAY(1000);
30982                 TmpUlong = CSR_READ_4(sc, RE_EPHYAR);
30983                 if ((TmpUlong&PHYAR_Flag)!=0)
30984                         break;
30985         }
30986 
30987         RegData = (u_int16_t)(TmpUlong & 0x0000ffff);
30988 
30989         return RegData;
30990 }
30991 
30992 static u_int8_t re_calc_efuse_dummy_bit(u_int16_t reg)
30993 {
30994         int s,a,b;
30995         u_int8_t dummyBitPos = 0;
30996 
30997 
30998         s=reg% 32;
30999         a=s % 16;
31000         b=s/16;
31001 
31002         if (s/16) {
31003                 dummyBitPos = (u_int8_t)(16-a);
31004         } else {
31005                 dummyBitPos = (u_int8_t)a;
31006         }
31007 
31008         return dummyBitPos;
31009 }
31010 
31011 static u_int32_t re_decode_efuse_cmd(struct re_softc *sc, u_int32_t DwCmd)
31012 {
31013         u_int16_t reg = (u_int16_t)((DwCmd & 0x00FE0000) >> 17);
31014         u_int32_t DummyPos = re_calc_efuse_dummy_bit(reg);
31015         u_int32_t DeCodeDwCmd = DwCmd;
31016         u_int32_t Dw17BitData;
31017 
31018 
31019         if (sc->re_efuse_ver < 3) {
31020                 DeCodeDwCmd = (DwCmd>>(DummyPos+1))<<DummyPos;
31021                 if (DummyPos > 0) {
31022                         DeCodeDwCmd |= ((DwCmd<<(32-DummyPos))>>(32-DummyPos));
31023                 }
31024         } else {
31025                 reg = (u_int16_t)((DwCmd & 0x007F0000) >> 16);
31026                 DummyPos = re_calc_efuse_dummy_bit(reg);
31027                 Dw17BitData = ((DwCmd & BIT_23) >> 23);
31028                 Dw17BitData <<= 16;
31029                 Dw17BitData |= (DwCmd & 0x0000FFFF);
31030                 DeCodeDwCmd = (Dw17BitData>>(DummyPos+1))<<DummyPos;
31031                 if (DummyPos > 0) {
31032                         DeCodeDwCmd |= ((Dw17BitData<<(32-DummyPos))>>(32-DummyPos));
31033                 }
31034         }
31035 
31036         return DeCodeDwCmd;
31037 }
31038 
31039 #define EFUSE_WRITE 0x80000000
31040 #define EFUSE_WRITE_OK  0x00000000
31041 #define EFUSE_READ  0x00000000
31042 #define EFUSE_READ_OK  0x80000000
31043 #define EFUSE_Reg_Mask 0x03FF
31044 #define EFUSE_Reg_Shift 8
31045 #define EFUSE_Check_Cnt 300
31046 #define EFUSE_READ_FAIL 0xFF
31047 #define EFUSE_Data_Mask 0x000000FF
31048 
31049 u_int8_t MP_ReadEfuse(struct re_softc *sc, u_int16_t reg)
31050 {
31051         u_int8_t efuse_data = 0;
31052         u_int32_t temp;
31053         u_int32_t cnt;
31054 
31055         if (sc->re_efuse_ver == EFUSE_NOT_SUPPORT)
31056                 return EFUSE_READ_FAIL;
31057 
31058         if (sc->re_efuse_ver == EFUSE_SUPPORT_V1) {
31059                 temp = EFUSE_READ | ((reg & EFUSE_Reg_Mask) << EFUSE_Reg_Shift);
31060                 CSR_WRITE_4(sc, RE_EFUSEAR, temp);
31061 
31062                 cnt = 0;
31063                 do {
31064                         DELAY(100);
31065                         temp = CSR_READ_4(sc, RE_EFUSEAR);
31066                         cnt++;
31067                 } while (!(temp & EFUSE_READ_OK) && (cnt < EFUSE_Check_Cnt));
31068 
31069                 if (cnt == EFUSE_Check_Cnt)
31070                         efuse_data = EFUSE_READ_FAIL;
31071                 else
31072                         efuse_data = (u_int8_t)(CSR_READ_4(sc, RE_EFUSEAR) & EFUSE_Data_Mask);
31073         } else  if (sc->re_efuse_ver == EFUSE_SUPPORT_V2) {
31074                 temp = (reg/2) & 0x03ff;
31075                 temp <<= 17;
31076                 temp |= EFUSE_READ;
31077                 CSR_WRITE_4(sc, RE_EFUSEAR, temp);
31078 
31079                 cnt = 0;
31080                 do {
31081                         DELAY(100);
31082                         temp = CSR_READ_4(sc, RE_EFUSEAR);
31083                         cnt++;
31084                 } while (!(temp & EFUSE_READ_OK) && (cnt < EFUSE_Check_Cnt));
31085 
31086                 if (cnt == EFUSE_Check_Cnt) {
31087                         efuse_data = EFUSE_READ_FAIL;
31088                 } else {
31089                         temp = CSR_READ_4(sc, RE_EFUSEAR);
31090                         temp = re_decode_efuse_cmd(sc, temp);
31091 
31092                         if (reg%2) {
31093                                 temp >>= 8;
31094                                 efuse_data = (u_int8_t)temp;
31095                         } else {
31096                                 efuse_data = (u_int8_t)temp;
31097                         }
31098                 }
31099         } else  if (sc->re_efuse_ver == EFUSE_SUPPORT_V3) {
31100                 temp = (reg/2) & 0x03ff;
31101                 temp <<= 16;
31102                 temp |= EFUSE_READ;
31103                 CSR_WRITE_4(sc, RE_EFUSEAR, temp);
31104 
31105                 cnt = 0;
31106                 do {
31107                         DELAY(100);
31108                         temp = CSR_READ_4(sc, RE_EFUSEAR);
31109                         cnt++;
31110                 } while (!(temp & EFUSE_READ_OK) && (cnt < EFUSE_Check_Cnt));
31111 
31112                 if (cnt == EFUSE_Check_Cnt) {
31113                         efuse_data = EFUSE_READ_FAIL;
31114                 } else {
31115                         temp = CSR_READ_4(sc, RE_EFUSEAR);
31116                         temp = re_decode_efuse_cmd(sc, temp);
31117 
31118                         if (reg%2) {
31119                                 temp >>= 8;
31120                                 efuse_data = (u_int8_t)temp;
31121                         } else {
31122                                 efuse_data = (u_int8_t)temp;
31123                         }
31124                 }
31125         }
31126 
31127         DELAY(20);
31128 
31129         return efuse_data;
31130 }
31131 
31132 void MP_WriteOtherFunPciEConfigSpace(
31133         struct re_softc *sc,
31134         u_int8_t MultiFunSelBit,
31135         u_int16_t ByteEnAndAddr,
31136         u_int32_t RegData)
31137 {
31138         u_int32_t Timeout = 0, WaitCount = 10;
31139         u_int32_t TmpUlong = 0x80000000;
31140         u_int32_t WriteDone;
31141 
31142         if (MultiFunSelBit > 7) {
31143                 return;
31144         }
31145 
31146         TmpUlong |= MultiFunSelBit << 16;
31147 
31148         CSR_WRITE_4(sc, RE_CSIDR, RegData);
31149         TmpUlong |= (u_int32_t) ByteEnAndAddr;
31150         CSR_WRITE_4(sc, RE_CSIAR, TmpUlong);
31151 
31152         do {
31153                 DELAY(100);
31154 
31155                 WriteDone = CSR_READ_4(sc, RE_CSIAR);
31156                 Timeout++;
31157         } while (((WriteDone & 0x80000000) != 0) && (Timeout < WaitCount));
31158 
31159 
31160         DELAY(50);
31161 }
31162 
31163 u_int32_t MP_ReadOtherFunPciEConfigSpace(
31164         struct re_softc *sc,
31165         u_int8_t MultiFunSelBit,
31166         u_int16_t ByteEnAndAddr)
31167 {
31168         u_int32_t Timeout = 0, WaitCount = 10;
31169         u_int32_t TmpUlong = 0x00000000;
31170         u_int32_t ReadDone;
31171         u_int32_t RetVal = 0xffffffff;
31172 
31173         if (MultiFunSelBit > 7) {
31174                 return 0xffffffff;
31175         }
31176 
31177         TmpUlong |= MultiFunSelBit << 16;
31178 
31179         TmpUlong |= (u_int32_t) ByteEnAndAddr;
31180         CSR_WRITE_4(sc, RE_CSIAR, TmpUlong);
31181 
31182         do {
31183                 DELAY(100);
31184 
31185                 ReadDone = CSR_READ_4(sc, RE_CSIAR);
31186                 Timeout++;
31187         } while (((ReadDone & 0x80000000) == 0)&& (Timeout < WaitCount));
31188 
31189         DELAY(50);
31190 
31191         return RetVal;
31192 }
31193 
31194 void MP_WritePciEConfigSpace(
31195         struct re_softc *sc,
31196         u_int16_t ByteEnAndAddr,
31197         u_int32_t RegData)
31198 {
31199         u_int8_t MultiFunSelBit;
31200 
31201         if (sc->re_type == MACFG_52 || sc->re_type == MACFG_53) {
31202                 MultiFunSelBit = 2;
31203         } else if (sc->re_type == MACFG_60) {
31204                 MultiFunSelBit = 1;
31205         } else {
31206                 MultiFunSelBit = 0;
31207         }
31208 
31209         MP_WriteOtherFunPciEConfigSpace(sc, MultiFunSelBit, ByteEnAndAddr, RegData);
31210 
31211 }
31212 
31213 u_int32_t MP_ReadPciEConfigSpace(
31214         struct re_softc *sc,
31215         u_int16_t ByteEnAndAddr)
31216 {
31217         u_int8_t MultiFunSelBit;
31218 
31219         if (sc->re_type == MACFG_52 || sc->re_type == MACFG_53) {
31220                 MultiFunSelBit = 2;
31221         } else if (sc->re_type == MACFG_60) {
31222                 MultiFunSelBit = 1;
31223         } else {
31224                 MultiFunSelBit = 0;
31225         }
31226 
31227         return MP_ReadOtherFunPciEConfigSpace(sc, MultiFunSelBit, ByteEnAndAddr);
31228 }
31229 
31230 u_int8_t MP_ReadByteFun0PciEConfigSpace(
31231         struct re_softc *sc,
31232         u_int16_t RegAddr)
31233 {
31234         u_int8_t RetVal = 0;
31235         u_int32_t TmpUlong;
31236         u_int16_t RegAlignAddr;
31237         u_int8_t ShiftByte;
31238 
31239         RegAlignAddr = RegAddr & ~(0x3);
31240         ShiftByte = RegAddr & (0x3);
31241 
31242         TmpUlong = MP_ReadOtherFunPciEConfigSpace(sc, 0, RegAlignAddr | 0xF000);
31243         TmpUlong >>= (8*ShiftByte);
31244         RetVal = (u_int8_t)TmpUlong;
31245 
31246         return RetVal;
31247 }
31248 
31249 static u_int16_t MappingPhyOcpAddress(
31250         struct re_softc *sc,
31251         u_int16_t   PageNum,
31252         u_int8_t  RegNum)
31253 {
31254         u_int16_t OcpPageNum = 0;
31255         u_int8_t OcpRegNum = 0;
31256         u_int16_t OcpPhyAddress = 0;
31257 
31258         if (PageNum == 0) {
31259                 OcpPageNum = 0x0A40 + (RegNum / 8);
31260                 OcpRegNum = 0x10 + (RegNum % 8);
31261         } else {
31262                 OcpPageNum = PageNum;
31263                 OcpRegNum = RegNum;
31264         }
31265 
31266         OcpPageNum <<= 4;
31267 
31268         if (OcpRegNum < 16) {
31269                 OcpPhyAddress = 0;
31270         } else {
31271                 OcpRegNum -= 16;
31272                 OcpRegNum <<= 1;
31273 
31274                 OcpPhyAddress = OcpPageNum + OcpRegNum;
31275         }
31276 
31277         return OcpPhyAddress;
31278 }
31279 
31280 u_int16_t MP_RealReadPhyOcpRegWord(
31281         struct re_softc *sc,
31282         u_int16_t OcpRegAddr)
31283 {
31284         u_int32_t Timeout = 0, WaitCount = 100;
31285         u_int32_t TmpUlong;
31286         u_int16_t RetVal = 0xffff;
31287 
31288         TmpUlong = OcpRegAddr / 2;
31289         TmpUlong <<= 16;
31290 
31291         CSR_WRITE_4(sc, RE_PHYOCPACCESS, TmpUlong);
31292 
31293         do {
31294                 DELAY(1);
31295 
31296                 TmpUlong = CSR_READ_4(sc, RE_PHYOCPACCESS);
31297 
31298                 Timeout++;
31299         } while ((!(TmpUlong & PHYAR_Flag)) && (Timeout < WaitCount));
31300 
31301         RetVal = (u_int16_t)TmpUlong;
31302 
31303         return RetVal;
31304 }
31305 
31306 u_int16_t MP_ReadPhyOcpRegWord(
31307         struct re_softc *sc,
31308         u_int16_t PhyPage,
31309         u_int8_t PhyRegNum)
31310 {
31311         u_int16_t OcpRegAddr;
31312         u_int16_t RetVal = 0xffff;
31313 
31314         OcpRegAddr = MappingPhyOcpAddress(sc, PhyPage, PhyRegNum);
31315 
31316         if (OcpRegAddr % 2) {
31317                 u_int16_t tmpUshort;
31318 
31319                 tmpUshort = MP_RealReadPhyOcpRegWord(sc, OcpRegAddr);
31320                 tmpUshort &= 0xFF00;
31321                 tmpUshort >>= 8;
31322                 RetVal = tmpUshort;
31323 
31324 
31325                 tmpUshort = MP_RealReadPhyOcpRegWord(sc, OcpRegAddr + 1);
31326                 tmpUshort &= 0x00FF;
31327                 tmpUshort <<= 8;
31328                 RetVal |= tmpUshort;
31329         } else {
31330                 RetVal = MP_RealReadPhyOcpRegWord(sc, OcpRegAddr);
31331         }
31332 
31333         return RetVal;
31334 }
31335 
31336 void MP_RealWritePhyOcpRegWord(
31337         struct re_softc *sc,
31338         u_int16_t OcpRegAddr,
31339         u_int16_t RegData)
31340 {
31341         u_int32_t Timeout = 0, WaitCount = 100;
31342         u_int32_t TmpUlong;
31343 
31344         TmpUlong = OcpRegAddr / 2;
31345         TmpUlong <<= 16;
31346         TmpUlong += RegData;
31347         TmpUlong |= BIT_31;
31348 
31349         CSR_WRITE_4(sc, RE_PHYOCPACCESS, TmpUlong);
31350 
31351         do {
31352                 DELAY(1);
31353 
31354                 TmpUlong = CSR_READ_4(sc, RE_PHYOCPACCESS);
31355 
31356                 Timeout++;
31357         } while ((TmpUlong & PHYAR_Flag) && (Timeout < WaitCount));
31358 }
31359 
31360 void MP_WritePhyOcpRegWord(
31361         struct re_softc *sc,
31362         u_int16_t PhyPage,
31363         u_int8_t PhyRegNum,
31364         u_int16_t RegData)
31365 {
31366         u_int16_t OcpRegAddr;
31367 
31368         OcpRegAddr = MappingPhyOcpAddress(sc, PhyPage, PhyRegNum);
31369 
31370         if (OcpRegAddr % 2) {
31371                 u_int16_t tmpUshort;
31372 
31373                 tmpUshort = MP_RealReadPhyOcpRegWord(sc, OcpRegAddr);
31374                 tmpUshort &= 0x00FF;
31375                 tmpUshort |= (RegData <<  8);
31376                 MP_RealWritePhyOcpRegWord(sc, OcpRegAddr, tmpUshort);
31377                 tmpUshort = MP_RealReadPhyOcpRegWord(sc, OcpRegAddr + 1);
31378                 tmpUshort &= 0xFF00;
31379                 tmpUshort |= (RegData >> 8);
31380                 MP_RealWritePhyOcpRegWord(sc, OcpRegAddr + 1, tmpUshort);
31381         } else {
31382                 MP_RealWritePhyOcpRegWord(sc, OcpRegAddr, RegData);
31383         }
31384 }
31385 
31386 void MP_WriteMcuAccessRegWord(
31387         struct re_softc *sc,
31388         u_int16_t ExtRegAddr,
31389         u_int16_t RegData)
31390 {
31391         u_int32_t TmpUlong;
31392 
31393         TmpUlong = ExtRegAddr / 2;
31394         TmpUlong <<= 16;
31395         TmpUlong += RegData;
31396         TmpUlong |= BIT_31;
31397 
31398         CSR_WRITE_4(sc, RE_MCUACCESS, TmpUlong);
31399 }
31400 
31401 u_int16_t MP_ReadMcuAccessRegWord(
31402         struct re_softc *sc,
31403         u_int16_t ExtRegAddr)
31404 {
31405         u_int32_t TmpUlong;
31406         u_int16_t RetVal = 0xffff;
31407 
31408         TmpUlong = ExtRegAddr / 2;
31409         TmpUlong <<= 16;
31410 
31411         CSR_WRITE_4(sc, RE_MCUACCESS, TmpUlong);
31412         TmpUlong = CSR_READ_4(sc, RE_MCUACCESS);
31413         RetVal = (u_int16_t)TmpUlong;
31414 
31415         return RetVal;
31416 }
31417 
31418 static u_int32_t real_ocp_read(struct re_softc *sc, u_int16_t addr, u_int8_t len)
31419 {
31420         int i, val_shift, shift = 0;
31421         u_int32_t value1 = 0, value2 = 0, mask;
31422 
31423         if (len > 4 || len <= 0)
31424                 return -1;
31425 
31426         while (len > 0) {
31427                 val_shift = addr % 4;
31428                 addr = addr & ~0x3;
31429 
31430                 CSR_WRITE_4(sc, RE_OCPAR, (0x0F<<12) | (addr&0xFFF));
31431 
31432                 for (i = 0; i < 20; i++) {
31433                         DELAY(100);
31434                         if (CSR_READ_4(sc, RE_OCPAR) & OCPAR_Flag)
31435                                 break;
31436                 }
31437 
31438                 if (len == 1)       mask = (0xFF << (val_shift * 8)) & 0xFFFFFFFF;
31439                 else if (len == 2)  mask = (0xFFFF << (val_shift * 8)) & 0xFFFFFFFF;
31440                 else if (len == 3)  mask = (0xFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
31441                 else            mask = (0xFFFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
31442 
31443                 value1 = CSR_READ_4(sc, RE_OCPDR) & mask;
31444                 value2 |= (value1 >> val_shift * 8) << shift * 8;
31445 
31446                 if (len <= 4 - val_shift) {
31447                         len = 0;
31448                 } else {
31449                         len -= (4 - val_shift);
31450                         shift = 4 - val_shift;
31451                         addr += 4;
31452                 }
31453         }
31454 
31455         DELAY(20);
31456 
31457         return value2;
31458 }
31459 
31460 static u_int32_t OCP_read_with_oob_base_address(struct re_softc *sc, u_int16_t addr, u_int8_t len, const u_int32_t base_address)
31461 {
31462         return re_eri_read_with_oob_base_address(sc, addr, len, ERIAR_OOB, base_address);
31463 }
31464 
31465 static u_int32_t OCP_read(struct re_softc *sc, u_int16_t addr, u_int8_t len)
31466 {
31467         u_int32_t value = 0;
31468 
31469         if (HW_DASH_SUPPORT_TYPE_2(sc))
31470                 value = re_eri_read(sc, addr, len, ERIAR_OOB);
31471         else if (HW_DASH_SUPPORT_TYPE_3(sc))
31472                 value = OCP_read_with_oob_base_address(sc, addr, len, RTL8168FP_OOBMAC_BASE);
31473         else
31474                 value = real_ocp_read(sc, addr, len);
31475 
31476         return value;
31477 }
31478 
31479 static int real_ocp_write(struct re_softc *sc, u_int16_t addr, u_int8_t len, u_int32_t value)
31480 {
31481         int i, val_shift, shift = 0;
31482         u_int32_t value1 = 0, mask;
31483 
31484         if (len > 4 || len <= 0)
31485                 return -1;
31486 
31487         while (len > 0) {
31488                 val_shift = addr % 4;
31489                 addr = addr & ~0x3;
31490 
31491                 if (len == 1)       mask = (0xFF << (val_shift * 8)) & 0xFFFFFFFF;
31492                 else if (len == 2)  mask = (0xFFFF << (val_shift * 8)) & 0xFFFFFFFF;
31493                 else if (len == 3)  mask = (0xFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
31494                 else            mask = (0xFFFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
31495 
31496                 value1 = OCP_read(sc, addr, 4) & ~mask;
31497                 value1 |= ((value << val_shift * 8) >> shift * 8);
31498 
31499                 CSR_WRITE_4(sc, RE_OCPDR, value1);
31500                 CSR_WRITE_4(sc, RE_OCPAR, OCPAR_Flag | (0x0F<<12) | (addr&0xFFF));
31501 
31502                 for (i = 0; i < 10; i++) {
31503                         DELAY(100);
31504 
31505                         /* Check if the RTL8168 has completed ERI write */
31506                         if (!(CSR_READ_4(sc, RE_OCPAR) & OCPAR_Flag))
31507                                 break;
31508                 }
31509 
31510                 if (len <= 4 - val_shift) {
31511                         len = 0;
31512                 } else {
31513                         len -= (4 - val_shift);
31514                         shift = 4 - val_shift;
31515                         addr += 4;
31516                 }
31517         }
31518 
31519         DELAY(20);
31520 
31521         return 0;
31522 }
31523 
31524 static int OCP_write_with_oob_base_address(struct re_softc *sc, u_int16_t addr, u_int8_t len, u_int32_t value, const u_int32_t base_address)
31525 {
31526         return re_eri_write_with_oob_base_address(sc, addr, len, value, ERIAR_OOB, base_address);
31527 }
31528 
31529 static void OCP_write(struct re_softc *sc, u_int16_t addr, u_int8_t len, u_int32_t value)
31530 {
31531         if (HW_DASH_SUPPORT_TYPE_2(sc))
31532                 re_eri_write(sc, addr, len, value, ERIAR_OOB);
31533         else if (HW_DASH_SUPPORT_TYPE_3(sc))
31534                 OCP_write_with_oob_base_address(sc, addr, len, value, RTL8168FP_OOBMAC_BASE);
31535         else
31536                 real_ocp_write(sc, addr, len, value);
31537 }
31538 
31539 static void OOB_mutex_lock(struct re_softc *sc)
31540 {
31541         u_int8_t reg_16, reg_a0;
31542         u_int32_t wait_cnt_0, wait_Cnt_1;
31543         u_int16_t ocp_reg_mutex_ib;
31544         u_int16_t ocp_reg_mutex_oob;
31545         u_int16_t ocp_reg_mutex_prio;
31546 
31547         switch (sc->re_type) {
31548         case MACFG_63:
31549         case MACFG_64:
31550         case MACFG_65:
31551                 ocp_reg_mutex_oob = 0x16;
31552                 ocp_reg_mutex_ib = 0x17;
31553                 ocp_reg_mutex_prio = 0x9C;
31554                 break;
31555         case MACFG_66:
31556                 ocp_reg_mutex_oob = 0x06;
31557                 ocp_reg_mutex_ib = 0x07;
31558                 ocp_reg_mutex_prio = 0x9C;
31559                 break;
31560         case MACFG_61:
31561         case MACFG_62:
31562         case MACFG_67:
31563         case MACFG_70:
31564         case MACFG_71:
31565         case MACFG_72:
31566         default:
31567                 ocp_reg_mutex_oob = 0x110;
31568                 ocp_reg_mutex_ib = 0x114;
31569                 ocp_reg_mutex_prio = 0x11C;
31570                 break;
31571         }
31572 
31573         OCP_write(sc, ocp_reg_mutex_ib, 1, BIT_0);
31574         reg_16 = OCP_read(sc, ocp_reg_mutex_oob, 1);
31575         wait_cnt_0 = 0;
31576         while(reg_16) {
31577                 reg_a0 = OCP_read(sc, ocp_reg_mutex_prio, 1);
31578                 if (reg_a0) {
31579                         OCP_write(sc, ocp_reg_mutex_ib, 1, 0x00);
31580                         reg_a0 = OCP_read(sc, ocp_reg_mutex_prio, 1);
31581                         wait_Cnt_1 = 0;
31582                         while(reg_a0) {
31583                                 reg_a0 = OCP_read(sc, ocp_reg_mutex_prio, 1);
31584 
31585                                 wait_Cnt_1++;
31586 
31587                                 if (wait_Cnt_1 > 2000)
31588                                         break;
31589                         };
31590                         OCP_write(sc, ocp_reg_mutex_ib, 1, BIT_0);
31591 
31592                 }
31593                 reg_16 = OCP_read(sc, ocp_reg_mutex_oob, 1);
31594 
31595                 wait_cnt_0++;
31596 
31597                 if (wait_cnt_0 > 2000)
31598                         break;
31599         };
31600 }
31601 
31602 static void OOB_mutex_unlock(struct re_softc *sc)
31603 {
31604         u_int16_t ocp_reg_mutex_ib;
31605         u_int16_t ocp_reg_mutex_oob;
31606         u_int16_t ocp_reg_mutex_prio;
31607 
31608         switch (sc->re_type) {
31609         case MACFG_63:
31610         case MACFG_64:
31611         case MACFG_65:
31612                 ocp_reg_mutex_oob = 0x16;
31613                 ocp_reg_mutex_ib = 0x17;
31614                 ocp_reg_mutex_prio = 0x9C;
31615                 break;
31616         case MACFG_66:
31617                 ocp_reg_mutex_oob = 0x06;
31618                 ocp_reg_mutex_ib = 0x07;
31619                 ocp_reg_mutex_prio = 0x9C;
31620                 break;
31621         case MACFG_61:
31622         case MACFG_62:
31623         case MACFG_67:
31624         case MACFG_70:
31625         case MACFG_71:
31626         case MACFG_72:
31627         default:
31628                 ocp_reg_mutex_oob = 0x110;
31629                 ocp_reg_mutex_ib = 0x114;
31630                 ocp_reg_mutex_prio = 0x11C;
31631                 break;
31632         }
31633 
31634         OCP_write(sc, ocp_reg_mutex_prio, 1, BIT_0);
31635         OCP_write(sc, ocp_reg_mutex_ib, 1, 0x00);
31636 }
31637 
31638 static int re_check_dash(struct re_softc *sc)
31639 {
31640         switch(sc->re_type) {
31641         case MACFG_61:
31642         case MACFG_62:
31643         case MACFG_67:
31644         case MACFG_63:
31645         case MACFG_64:
31646         case MACFG_65:
31647         case MACFG_66:
31648         case MACFG_70:
31649         case MACFG_71:
31650         case MACFG_72:
31651                 if (HW_DASH_SUPPORT_TYPE_2(sc) || HW_DASH_SUPPORT_TYPE_3(sc)) {
31652                         if (OCP_read(sc, 0x128, 1) & BIT_0)
31653                                 return 1;
31654                         else
31655                                 return 0;
31656                 } else {
31657                         u_int32_t reg;
31658 
31659                         if (sc->re_type == MACFG_66)
31660                                 reg = 0xb8;
31661                         else
31662                                 reg = 0x10;
31663 
31664                         if (OCP_read(sc, reg, 2) & 0x00008000)
31665                                 return 1;
31666                         else
31667                                 return 0;
31668                 }
31669                 break;
31670         default:
31671                 return 0;
31672         }
31673 }
31674 
31675 static void OOB_notify(struct re_softc *sc, u_int8_t cmd)
31676 {
31677         int i;
31678 
31679         CSR_WRITE_1(sc, RE_ERIDR, cmd);
31680         CSR_WRITE_4(sc, RE_ERIAR, 0x800010E8);
31681         DELAY(2000);
31682         for (i = 0; i < 5; i++) {
31683                 DELAY(100);
31684                 if (!(CSR_READ_4(sc, RE_ERIAR) & ERIAR_Flag))
31685                         break;
31686         }
31687 
31688         OCP_write(sc, 0x30, 1, 0x01);
31689 }
31690 
31691 void re_driver_start(struct re_softc *sc)
31692 {
31693         if (HW_DASH_SUPPORT_TYPE_2(sc) || HW_DASH_SUPPORT_TYPE_3(sc)) {
31694                 u_int32_t tmp_value;
31695 
31696                 if (!sc->re_dash)
31697                         return;
31698 
31699                 OCP_write(sc, 0x180, 1, OOB_CMD_DRIVER_START);
31700                 tmp_value = OCP_read(sc, 0x30, 1);
31701                 tmp_value |= BIT_0;
31702                 OCP_write(sc, 0x30, 1, tmp_value);
31703         } else {
31704                 int timeout;
31705                 u_int32_t reg;
31706 
31707                 if (sc->re_type == MACFG_66) {
31708                         CSR_WRITE_1(sc, RE_TwiCmdReg, CSR_READ_1(sc, RE_TwiCmdReg) | (BIT_7));
31709                 }
31710 
31711                 OOB_notify(sc, OOB_CMD_DRIVER_START);
31712 
31713                 if (sc->re_type == MACFG_66)
31714                         reg = 0xB8;
31715                 else
31716                         reg = 0x10;
31717 
31718                 for (timeout = 0; timeout < 10; timeout++) {
31719                         DELAY(10000);
31720                         if (OCP_read(sc, reg, 2) & BIT_11)
31721                                 break;
31722                 }
31723         }
31724 }
31725 
31726 void re_driver_stop(struct re_softc *sc)
31727 {
31728         if (HW_DASH_SUPPORT_TYPE_2(sc) || HW_DASH_SUPPORT_TYPE_3(sc)) {
31729                 u_int32_t tmp_value;
31730 
31731                 if (!sc->re_dash)
31732                         return;
31733 
31734                 Dash2DisableTxRx(sc);
31735 
31736                 OCP_write(sc, 0x180, 1, OOB_CMD_DRIVER_STOP);
31737                 tmp_value = OCP_read(sc, 0x30, 1);
31738                 tmp_value |= BIT_0;
31739                 OCP_write(sc, 0x30, 1, tmp_value);
31740         } else {
31741                 int timeout;
31742                 u_int32_t reg;
31743 
31744                 OOB_notify(sc, OOB_CMD_DRIVER_STOP);
31745 
31746                 if (sc->re_type == MACFG_66)
31747                         reg = 0xB8;
31748                 else
31749                         reg = 0x10;
31750 
31751                 for (timeout = 0; timeout < 10; timeout++) {
31752                         DELAY(10000);
31753                         if ((OCP_read(sc, reg, 4) & BIT_11) == 0)
31754                                 break;
31755                 }
31756 
31757                 if (sc->re_type == MACFG_66) {
31758                         CSR_WRITE_1(sc, RE_TwiCmdReg, CSR_READ_1(sc, RE_TwiCmdReg) & ~(BIT_7));
31759                 }
31760         }
31761 }
31762 
31763 /*----------------------------------------------------------------------------*/
31764 /*	8139 (CR9346) 9346 command register bits (offset 0x50, 1 byte)*/
31765 /*----------------------------------------------------------------------------*/
31766 #define CR9346_EEDO				0x01			/* 9346 data out*/
31767 #define CR9346_EEDI				0x02			/* 9346 data in*/
31768 #define CR9346_EESK				0x04			/* 9346 serial clock*/
31769 #define CR9346_EECS				0x08			/* 9346 chip select*/
31770 #define CR9346_EEM0				0x40			/* select 8139 operating mode*/
31771 #define CR9346_EEM1				0x80			/* 00: normal*/
31772 #define CR9346_CFGRW			0xC0			/* Config register write*/
31773 #define CR9346_NORM			0x00
31774 
31775 /*----------------------------------------------------------------------------*/
31776 /*	EEPROM bit definitions(EEPROM control register bits)*/
31777 /*----------------------------------------------------------------------------*/
31778 #define EN_TRNF					0x10			/* Enable turnoff*/
31779 #define EEDO						CR9346_EEDO	/* EEPROM data out*/
31780 #define EEDI						CR9346_EEDI		/* EEPROM data in (set for writing data)*/
31781 #define EECS						CR9346_EECS		/* EEPROM chip select (1=high, 0=low)*/
31782 #define EESK						CR9346_EESK		/* EEPROM shift clock (1=high, 0=low)*/
31783 
31784 /*----------------------------------------------------------------------------*/
31785 /*	EEPROM opcodes*/
31786 /*----------------------------------------------------------------------------*/
31787 #define EEPROM_READ_OPCODE	06
31788 #define EEPROM_WRITE_OPCODE	05
31789 #define EEPROM_ERASE_OPCODE	07
31790 #define EEPROM_EWEN_OPCODE	19				/* Erase/write enable*/
31791 #define EEPROM_EWDS_OPCODE	16				/* Erase/write disable*/
31792 
31793 #define	CLOCK_RATE				50				/* us*/
31794 
31795 #define RaiseClock(_sc,_x)				\
31796 	(_x) = (_x) | EESK;					\
31797 	CSR_WRITE_1((_sc), RE_EECMD, (_x));	\
31798 	DELAY(CLOCK_RATE);
31799 
31800 #define LowerClock(_sc,_x)				\
31801 	(_x) = (_x) & ~EESK;					\
31802 	CSR_WRITE_1((_sc), RE_EECMD, (_x));	\
31803 	DELAY(CLOCK_RATE);
31804 
31805 /*
31806  * Shift out bit(s) to the EEPROM.
31807  */
31808 static void re_eeprom_ShiftOutBits(struct re_softc *sc, int data, int count)
31809 {
31810         u_int16_t x, mask;
31811 
31812         mask = 0x01 << (count - 1);
31813         x = CSR_READ_1(sc, RE_EECMD);
31814 
31815         x &= ~(EEDO | EEDI);
31816 
31817         do {
31818                 x &= ~EEDI;
31819                 if (data & mask)
31820                         x |= EEDI;
31821 
31822                 CSR_WRITE_1(sc, RE_EECMD, x);
31823                 DELAY(CLOCK_RATE);
31824                 RaiseClock(sc,x);
31825                 LowerClock(sc,x);
31826                 mask = mask >> 1;
31827         } while (mask);
31828 
31829         x &= ~EEDI;
31830         CSR_WRITE_1(sc, RE_EECMD, x);
31831 }
31832 
31833 /*
31834  * Shift in bit(s) from the EEPROM.
31835  */
31836 static u_int16_t re_eeprom_ShiftInBits(struct re_softc *sc)
31837 {
31838         u_int16_t x,d,i;
31839         x = CSR_READ_1(sc, RE_EECMD);
31840 
31841         x &= ~(EEDO | EEDI);
31842         d = 0;
31843 
31844         for (i=0; i<16; i++) {
31845                 d = d << 1;
31846                 RaiseClock(sc, x);
31847 
31848                 x = CSR_READ_1(sc, RE_EECMD);
31849 
31850                 x &= ~(EEDI);
31851                 if (x & EEDO)
31852                         d |= 1;
31853 
31854                 LowerClock(sc, x);
31855         }
31856 
31857         return d;
31858 }
31859 
31860 /*
31861  * Clean up EEprom read/write setting
31862  */
31863 static void re_eeprom_EEpromCleanup(struct re_softc *sc)
31864 {
31865         u_int16_t x;
31866         x = CSR_READ_1(sc, RE_EECMD);
31867 
31868         x &= ~(EECS | EEDI);
31869         CSR_WRITE_1(sc, RE_EECMD, x);
31870 
31871         RaiseClock(sc, x);
31872         LowerClock(sc, x);
31873 }
31874 
31875 /*
31876  * Read a word of data stored in the EEPROM at address 'addr.'
31877  */
31878 static void re_eeprom_getword(struct re_softc *sc, int addr, u_int16_t *dest)
31879 {
31880         u_int16_t x;
31881 
31882         /* select EEPROM, reset bits, set EECS*/
31883         x = CSR_READ_1(sc, RE_EECMD);
31884 
31885         x &= ~(EEDI | EEDO | EESK | CR9346_EEM0);
31886         x |= CR9346_EEM1 | EECS;
31887         CSR_WRITE_1(sc, RE_EECMD, x);
31888 
31889         /* write the read opcode and register number in that order*/
31890         /* The opcode is 3bits in length, reg is 6 bits long*/
31891         re_eeprom_ShiftOutBits(sc, EEPROM_READ_OPCODE, 3);
31892 
31893         if (CSR_READ_4(sc, RE_RXCFG) & RE_RXCFG_RX_9356SEL)
31894                 re_eeprom_ShiftOutBits(sc, addr,8);	/*93c56=8*/
31895         else
31896                 re_eeprom_ShiftOutBits(sc, addr,6);	/*93c46=6*/
31897 
31898         /* Now read the data (16 bits) in from the selected EEPROM word*/
31899         *dest=re_eeprom_ShiftInBits(sc);
31900 
31901         re_eeprom_EEpromCleanup(sc);
31902         return;
31903 }
31904 
31905 /*
31906  * Read a sequence of words from the EEPROM.
31907  */
31908 static void re_read_eeprom(struct re_softc *sc, caddr_t dest, int off, int cnt, int swap)
31909 {
31910         int			i;
31911         u_int16_t		word = 0, *ptr;
31912 
31913         for (i = 0; i < cnt; i++) {
31914                 re_eeprom_getword(sc, off + i, &word);
31915                 ptr = (u_int16_t *)(dest + (i * 2));
31916                 if (swap)
31917                         *ptr = ntohs(word);
31918                 else
31919                         *ptr = word;
31920         }
31921 
31922         return;
31923 }
31924 
31925 #ifdef __DragonFly__
31926 
31927 int
31928 rtl_check_mac_version(struct re_softc *sc)
31929 {
31930 
31931 	return (re_check_mac_version(sc));
31932 }
31933 
31934 void
31935 rtl_init_software_variable(struct re_softc *sc)
31936 {
31937 
31938 	re_init_software_variable(sc);
31939 }
31940 
31941 void
31942 rtl_exit_oob(struct re_softc *sc)
31943 {
31944 
31945 	re_exit_oob(sc);
31946 }
31947 
31948 void
31949 rtl_hw_init(struct re_softc *sc)
31950 {
31951 
31952 	re_hw_init(sc);
31953 }
31954 
31955 void
31956 rtl_reset(struct re_softc *sc)
31957 {
31958 
31959 	re_reset(sc);
31960 }
31961 
31962 void
31963 rtl_get_hw_mac_address(struct re_softc *sc, u_int8_t *eaddr)
31964 {
31965 
31966 	re_get_hw_mac_address(sc, eaddr);
31967 }
31968 
31969 void
31970 rtl_phy_power_up(struct re_softc *sc)
31971 {
31972 
31973 	re_phy_power_up(sc->dev);
31974 }
31975 
31976 void
31977 rtl_hw_phy_config(struct re_softc *sc)
31978 {
31979 
31980 	re_hw_phy_config(sc);
31981 }
31982 
31983 void
31984 rtl_clrwol(struct re_softc *sc)
31985 {
31986 
31987 	re_clrwol(sc);
31988 }
31989 
31990 int
31991 rtl_ifmedia_upd(struct ifnet *ifp)
31992 {
31993 	struct re_softc *sc = ifp->if_softc;
31994 
31995 	if (sc->re_device_id == RT_DEVICEID_8125)
31996 		return (re_ifmedia_upd_8125(ifp));
31997 	else
31998 		return (re_ifmedia_upd(ifp));
31999 }
32000 
32001 void
32002 rtl_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr)
32003 {
32004 	struct re_softc *sc = ifp->if_softc;
32005 
32006 	if (sc->re_device_id == RT_DEVICEID_8125)
32007 		re_ifmedia_sts_8125(ifp, ifmr);
32008 	else
32009 		re_ifmedia_sts(ifp, ifmr);
32010 }
32011 
32012 void
32013 rtl_stop(struct re_softc *sc)
32014 {
32015 
32016 	sc->phy_reg_anlpar = re_get_phy_lp_ability(sc);
32017 	re_stop_rtl(sc);
32018 }
32019 
32020 u_int8_t
32021 rtl_link_ok(struct re_softc *sc)
32022 {
32023 
32024 	return (re_link_ok(sc));
32025 }
32026 
32027 void
32028 rtl_link_on_patch(struct re_softc *sc)
32029 {
32030 
32031 	re_link_on_patch(sc);
32032 }
32033 
32034 void
32035 rtl_set_eaddr(struct re_softc *sc)
32036 {
32037 
32038 	re_init_unlock(sc);
32039 }
32040 
32041 void
32042 rtl_hw_start(struct re_softc *sc)
32043 {
32044 
32045 	if (sc->re_device_id == RT_DEVICEID_8125)
32046 		re_hw_start_unlock_8125(sc);
32047 	else
32048 		re_hw_start_unlock(sc);
32049 }
32050 
32051 void
32052 rtl_set_rx_packet_filter(struct re_softc *sc)
32053 {
32054 
32055 	re_set_rx_packet_filter(sc);
32056 }
32057 
32058 void
32059 rtl_hw_d3_para(struct re_softc *sc)
32060 {
32061 
32062 	re_hw_d3_para(sc);
32063 }
32064 
32065 void
32066 rtl_phy_power_down(struct re_softc *sc)
32067 {
32068 
32069 	re_phy_power_down(sc->dev);
32070 }
32071 
32072 void
32073 rtl_cmac_unmap(struct re_softc *sc)
32074 {
32075 
32076 	if (HW_DASH_SUPPORT_TYPE_3(sc) && sc->re_dash &&
32077 	    sc->re_mapped_cmac_handle != 0) {
32078 		bus_space_unmap(sc->re_cmac_tag, sc->re_mapped_cmac_handle,
32079 		    RE_REGS_SIZE);
32080 	}
32081 }
32082 
32083 #endif	/* __DragonFly__ */
32084