xref: /dragonfly/sys/dev/netif/re/re.c (revision 757c006e)
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 __FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v 1.94.01 " __DATE__ " " __TIME__ "  wpaul Exp $");
46 
47 /*
48 * This driver also support Realtek 8139C+, 8110S/SB/SC, RTL8111B/C/CP/D and RTL8101E/8102E/8103E.
49 */
50 
51 #include <sys/param.h>
52 #include <sys/systm.h>
53 #include <sys/sockio.h>
54 #include <sys/mbuf.h>
55 #include <sys/malloc.h>
56 #include <sys/kernel.h>
57 #include <sys/socket.h>
58 #include <sys/taskqueue.h>
59 #include <sys/random.h>
60 
61 #include <net/if.h>
62 #include <net/if_var.h>
63 #include <net/if_arp.h>
64 #include <net/ethernet.h>
65 #include <net/if_dl.h>
66 #include <net/if_media.h>
67 
68 #include <net/bpf.h>
69 
70 #include <vm/vm.h>              /* for vtophys */
71 #include <vm/pmap.h>            /* for vtophys */
72 #include <machine/clock.h>      /* for DELAY */
73 
74 #include <machine/bus.h>
75 #include <machine/resource.h>
76 #include <sys/bus.h>
77 #include <sys/rman.h>
78 #include <sys/endian.h>
79 
80 #include <dev/mii/mii.h>
81 #include <dev/re/if_rereg.h>
82 
83 #if OS_VER < VERSION(5,3)
84 #include <pci/pcireg.h>
85 #include <pci/pcivar.h>
86 #include <machine/bus_pio.h>
87 #include <machine/bus_memio.h>
88 #else
89 #include <dev/pci/pcireg.h>
90 #include <dev/pci/pcivar.h>
91 #include <sys/module.h>
92 #endif
93 
94 #if OS_VER > VERSION(5,9)
95 #include <sys/cdefs.h>
96 #include <sys/endian.h>
97 #include <net/if_types.h>
98 #include <net/if_vlan_var.h>
99 #endif
100 #else	/* __DragonFly__ */
101 
102 #include <sys/param.h>
103 #include <sys/bus.h>
104 #include <sys/endian.h>
105 #include <sys/kernel.h>
106 #include <sys/systm.h>
107 
108 #include <net/ethernet.h>
109 #include <net/if.h>
110 #include <net/if_arp.h>
111 #include <net/if_dl.h>
112 #include <net/if_media.h>
113 #include <net/if_poll.h>
114 #include <net/vlan/if_vlan_var.h>
115 
116 #include <bus/pci/pcireg.h>
117 #include <bus/pci/pcivar.h>
118 
119 #include <dev/netif/mii_layer/mii.h>
120 #include <dev/netif/re/if_revar.h>
121 #include <dev/netif/re/re.h>
122 #include <dev/netif/re/re_dragonfly.h>
123 
124 #define RE_LOCK(sc)
125 #define RE_UNLOCK(sc)
126 #define RE_LOCK_ASSERT(sc)
127 
128 #define RE_GET_IFNET(sc)	&(sc)->arpcom.ac_if
129 
130 #endif	/* !__DragonFly__ */
131 
132 #define EE_SET(x)					\
133 	CSR_WRITE_1(sc, RE_EECMD,			\
134 		CSR_READ_1(sc, RE_EECMD) | x)
135 
136 #define EE_CLR(x)					\
137 	CSR_WRITE_1(sc, RE_EECMD,			\
138 		CSR_READ_1(sc, RE_EECMD) & ~x)
139 
140 #ifndef __DragonFly__
141 /*
142  * Various supported device vendors/types and their names.
143  */
144 static struct re_type re_devs[] = {
145         {
146                 RT_VENDORID, RT_DEVICEID_8169,
147                 "Realtek PCI GBE Family Controller"
148         },
149         {
150                 RT_VENDORID, RT_DEVICEID_8169SC,
151                 "Realtek PCI GBE Family Controller"
152         },
153         {
154                 RT_VENDORID, RT_DEVICEID_8168,
155                 "Realtek PCIe GBE Family Controller"
156         },
157         {
158                 RT_VENDORID, RT_DEVICEID_8161,
159                 "Realtek PCIe GBE Family Controller"
160         },
161         {
162                 RT_VENDORID, RT_DEVICEID_8136,
163                 "Realtek PCIe FE Family Controller"
164         },
165         {
166                 DLINK_VENDORID, 0x4300,
167                 "Realtek PCI GBE Family Controller"
168         },
169         { 0, 0, NULL }
170 };
171 
172 static int	re_probe			__P((device_t));
173 static int	re_attach			__P((device_t));
174 static int	re_detach			__P((device_t));
175 static int	re_suspend 			__P((device_t));
176 static int	re_resume 			__P((device_t));
177 static int	re_shutdown			__P((device_t));
178 
179 static void MP_WritePhyUshort			__P((struct re_softc*, u_int8_t, u_int16_t));
180 static u_int16_t MP_ReadPhyUshort		__P((struct re_softc*, u_int8_t));
181 static void MP_WriteEPhyUshort			__P((struct re_softc*, u_int8_t, u_int16_t));
182 static u_int16_t MP_ReadEPhyUshort		__P((struct re_softc*, u_int8_t));
183 static u_int8_t MP_ReadEfuse			__P((struct re_softc*, u_int16_t));
184 static void MP_WritePhyOcpRegWord       __P((struct re_softc*, u_int16_t, u_int8_t, u_int16_t));
185 static u_int16_t MP_ReadPhyOcpRegWord   __P((struct re_softc*, u_int16_t, u_int8_t));
186 static void MP_WriteMcuAccessRegWord    __P((struct re_softc*, u_int16_t, u_int16_t));
187 static u_int16_t MP_ReadMcuAccessRegWord  __P((struct re_softc*, u_int16_t));
188 static void MP_WriteOtherFunPciEConfigSpace    __P((struct re_softc *, u_int8_t, u_int16_t, u_int32_t Regata));
189 static u_int32_t MP_ReadOtherFunPciEConfigSpace   __P((struct re_softc *, u_int8_t, u_int16_t));
190 static void MP_WritePciEConfigSpace     __P((struct re_softc*, u_int16_t, u_int32_t));
191 static u_int32_t MP_ReadPciEConfigSpace __P((struct re_softc*, u_int16_t));
192 #endif	/* !__DragonFly__ */
193 
194 static int re_check_dash  __P((struct re_softc *));
195 
196 #ifndef __DragonFly__
197 static void re_driver_start             __P((struct re_softc*));
198 static void re_driver_stop         	__P((struct re_softc*));
199 
200 static void re_hw_phy_config		__P((struct re_softc *));
201 static void re_init			__P((void *));
202 static int  re_var_init			__P((struct re_softc *));
203 static void re_reset			__P((struct re_softc *));
204 static void re_stop			__P((struct re_softc *));
205 static void re_setwol			__P((struct re_softc *));
206 #endif	/* !__DragonFly__ */
207 static void re_clrwol			__P((struct re_softc *));
208 static void re_set_wol_linkspeed 	__P((struct re_softc *));
209 
210 #ifndef __DragonFly__
211 static void re_start				__P((struct ifnet *));
212 static int re_encap				__P((struct re_softc *, struct mbuf *));
213 static void WritePacket				__P((struct re_softc *, caddr_t, int, int, int, uint32_t, uint32_t));
214 static int CountFreeTxDescNum			__P((struct re_descriptor));
215 static int CountMbufNum				__P((struct mbuf *));
216 #ifdef RE_FIXUP_RX
217 static __inline void re_fixup_rx		__P((struct mbuf *));
218 #endif
219 static void re_txeof				__P((struct re_softc *));
220 
221 static void re_rxeof				__P((struct re_softc *));
222 
223 #if OS_VER < VERSION(7,0)
224 static void re_intr				__P((void *));
225 #else
226 static int re_intr				__P((void *));
227 #endif //OS_VER < VERSION(7,0)
228 #endif	/* !__DragonFly__ */
229 static void re_set_multicast_reg	__P((struct re_softc *, u_int32_t, u_int32_t));
230 #ifndef __DragonFly__
231 static void re_set_rx_packet_filter_in_sleep_state	__P((struct re_softc *));
232 #endif
233 static void re_set_rx_packet_filter	__P((struct re_softc *));
234 static void re_setmulti			__P((struct re_softc *));
235 #ifndef __DragonFly__
236 static int  re_ioctl			__P((struct ifnet *, u_long, caddr_t));
237 #endif
238 static u_int8_t re_link_ok	__P((struct re_softc *));
239 static void re_link_on_patch	__P((struct re_softc *));
240 #ifndef __DragonFly__
241 static void re_link_down_patch	__P((struct re_softc *));
242 static void re_init_timer	__P((struct re_softc *));
243 static void re_stop_timer	__P((struct re_softc *));
244 static void re_start_timer	__P((struct re_softc *));
245 static void re_tick				__P((void *));
246 #if OS_VER < VERSION(7,0)
247 static void re_watchdog				__P((struct ifnet *));
248 #endif
249 #endif	/* !__DragonFly__ */
250 
251 static int  re_ifmedia_upd			__P((struct ifnet *));
252 static void re_ifmedia_sts			__P((struct ifnet *, struct ifmediareq *));
253 
254 static void re_eeprom_ShiftOutBits		__P((struct re_softc *, int, int));
255 static u_int16_t re_eeprom_ShiftInBits		__P((struct re_softc *));
256 static void re_eeprom_EEpromCleanup		__P((struct re_softc *));
257 static void re_eeprom_getword			__P((struct re_softc *, int, u_int16_t *));
258 static void re_read_eeprom			__P((struct re_softc *, caddr_t, int, int, int));
259 #ifndef __DragonFly__
260 static void re_int_task				(void *, int);
261 #endif	/* !__DragonFly__ */
262 
263 static void re_phy_power_up(device_t dev);
264 static void re_phy_power_down(device_t dev);
265 #ifndef __DragonFly__
266 static int re_alloc_buf(struct re_softc *);
267 static void re_release_buf(struct re_softc *);
268 static void set_rxbufsize(struct re_softc*);
269 static void re_release_rx_buf(struct re_softc *);
270 static void re_release_tx_buf(struct re_softc *);
271 #endif	/* !__DragonFly__ */
272 static u_int32_t re_eri_read(struct re_softc *, int, int, int);
273 static int re_eri_write(struct re_softc *, int, int, u_int32_t, int);
274 static void OOB_mutex_lock(struct re_softc *);
275 static void OOB_mutex_unlock(struct re_softc *);
276 
277 #ifdef __DragonFly__
278 u_int16_t MP_ReadMcuAccessRegWord(struct re_softc *, u_int16_t);
279 void MP_WriteMcuAccessRegWord(struct re_softc *, u_int16_t, u_int16_t);
280 
281 u_int16_t MP_ReadPhyOcpRegWord(struct re_softc *, u_int16_t, u_int8_t);
282 void MP_WritePhyOcpRegWord(struct re_softc *, u_int16_t, u_int8_t, u_int16_t);
283 
284 void MP_WritePhyUshort(struct re_softc *, u_int8_t, u_int16_t);
285 u_int16_t MP_ReadPhyUshort(struct re_softc *, u_int8_t);
286 
287 u_int32_t MP_ReadPciEConfigSpace(struct re_softc *, u_int16_t);
288 void MP_WritePciEConfigSpace(struct re_softc *, u_int16_t, u_int32_t);
289 u_int32_t MP_ReadOtherFunPciEConfigSpace(struct re_softc *, u_int8_t,
290     u_int16_t);
291 void MP_WriteOtherFunPciEConfigSpace(struct re_softc *, u_int8_t, u_int16_t,
292     u_int32_t);
293 
294 u_int16_t MP_ReadEPhyUshort(struct re_softc *, u_int8_t);
295 void MP_WriteEPhyUshort(struct re_softc *, u_int8_t, u_int16_t);
296 
297 u_int8_t MP_ReadEfuse(struct re_softc *, u_int16_t);
298 
299 void re_driver_start(struct re_softc *);
300 void re_driver_stop(struct re_softc *);
301 #endif	/* __DragonFly__ */
302 
303 /* Tunables. */
304 static int msi_disable = 1;
305 TUNABLE_INT("hw.re.msi_disable", &msi_disable);
306 static int msix_disable = 0;
307 TUNABLE_INT("hw.re.msix_disable", &msix_disable);
308 static int prefer_iomap = 0;
309 TUNABLE_INT("hw.re.prefer_iomap", &prefer_iomap);
310 static int eee_enable = 0;
311 TUNABLE_INT("hw.re.eee_enable", &eee_enable);
312 static int phy_power_saving = 1;
313 TUNABLE_INT("hw.re.phy_power_saving", &phy_power_saving);
314 static int phy_mdix_mode = RE_ETH_PHY_AUTO_MDI_MDIX;
315 TUNABLE_INT("hw.re.phy_mdix_mode", &phy_mdix_mode);
316 
317 #define RE_CSUM_FEATURES    (CSUM_IP | CSUM_TCP | CSUM_UDP)
318 
319 #ifndef __DragonFly__
320 static device_method_t re_methods[] = {
321         /* Device interface */
322         DEVMETHOD(device_probe, re_probe),
323         DEVMETHOD(device_attach, re_attach),
324         DEVMETHOD(device_detach, re_detach),
325         DEVMETHOD(device_suspend, re_suspend),
326         DEVMETHOD(device_resume, re_resume),
327         DEVMETHOD(device_shutdown, re_shutdown),
328         { 0, 0 }
329 };
330 
331 static driver_t re_driver = {
332         "re",
333         re_methods,
334         sizeof(struct re_softc)
335 };
336 
337 static devclass_t re_devclass;
338 
339 DRIVER_MODULE(if_re, pci, re_driver, re_devclass, 0, 0);
340 #endif	/* !__DragonFly__ */
341 
342 static int re_is_ups_resume(struct re_softc *sc)
343 {
344         return (MP_ReadMcuAccessRegWord(sc, 0xD408) & BIT_0);
345 }
346 
347 static void re_clear_ups_resume_bit(struct re_softc *sc)
348 {
349         MP_WriteMcuAccessRegWord(sc, 0xD408, MP_ReadMcuAccessRegWord(sc, 0xD408) & ~(BIT_0));
350 }
351 
352 static void re_wait_phy_ups_resume(struct re_softc *sc, u_int16_t PhyState)
353 {
354         u_int16_t TmpPhyState;
355         int i=0;
356 
357         do {
358                 TmpPhyState = MP_ReadPhyOcpRegWord(sc, 0x0A42, 0x10);
359                 TmpPhyState &= 0x7;
360                 DELAY(1000);
361                 i++;
362         } while ((i < 100) && (TmpPhyState != 2));
363 }
364 
365 static void re_phy_power_up(device_t dev)
366 {
367         struct re_softc		*sc;
368         u_int8_t Data8;
369 
370         sc = device_get_softc(dev);
371 
372         if ((sc->re_if_flags & RL_FLAG_PHYWAKE_PM) != 0)
373                 CSR_WRITE_1(sc, RE_PMCH, CSR_READ_1(sc, RE_PMCH) | (BIT_6|BIT_7));
374 
375         MP_WritePhyUshort(sc, 0x1F, 0x0000);
376 
377         switch (sc->re_type) {
378         case MACFG_4:
379         case MACFG_5:
380         case MACFG_6:
381         case MACFG_21:
382         case MACFG_22:
383         case MACFG_23:
384         case MACFG_24:
385         case MACFG_25:
386         case MACFG_26:
387         case MACFG_27:
388         case MACFG_28:
389         case MACFG_31:
390         case MACFG_32:
391         case MACFG_33:
392         case MACFG_63:
393         case MACFG_64:
394         case MACFG_65:
395         case MACFG_66:
396                 MP_WritePhyUshort(sc, 0x0e, 0x0000);
397                 break;
398         case MACFG_56:
399         case MACFG_57:
400         case MACFG_58:
401         case MACFG_61:
402                 Data8 = re_eri_read(sc, 0x1AB, 1, ERIAR_ExGMAC);
403                 Data8 |= (BIT_2 | BIT_3 | BIT_4 | BIT_5 | BIT_6 | BIT_7);
404                 re_eri_write(sc, 0x1AB, 1, Data8, ERIAR_ExGMAC);
405                 break;
406         default:
407                 break;
408         };
409 
410 
411         MP_WritePhyUshort(sc, MII_BMCR, BMCR_AUTOEN);
412 
413         //wait mdc/mdio ready
414         switch(sc->re_type) {
415         case MACFG_61:
416         case MACFG_62:
417         case MACFG_67:
418                 DELAY(10000);
419                 break;
420         }
421 
422         //wait ups resume (phy state 3)
423         switch(sc->re_type) {
424         case MACFG_68:
425         case MACFG_69:
426         case MACFG_70:
427         case MACFG_71:
428                 re_wait_phy_ups_resume(sc, 3);
429                 break;
430         };
431 }
432 
433 static void re_phy_power_down(device_t dev)
434 {
435         struct re_softc		*sc;
436         u_int8_t Data8;
437 
438         sc = device_get_softc(dev);
439 
440         if (sc->re_dash) {
441                 re_set_wol_linkspeed(sc);
442                 return;
443         }
444 
445         MP_WritePhyUshort(sc, 0x1F, 0x0000);
446 
447         switch (sc->re_type) {
448         case MACFG_21:
449         case MACFG_22:
450         case MACFG_23:
451         case MACFG_24:
452         case MACFG_25:
453         case MACFG_26:
454         case MACFG_27:
455         case MACFG_28:
456         case MACFG_31:
457         case MACFG_32:
458         case MACFG_33:
459         case MACFG_63:
460         case MACFG_64:
461         case MACFG_65:
462         case MACFG_66:
463                 MP_WritePhyUshort(sc, 0x0e, 0x0200);
464                 MP_WritePhyUshort(sc, MII_BMCR, (BMCR_AUTOEN|BMCR_PDOWN));
465                 break;
466         case MACFG_56:
467         case MACFG_57:
468         case MACFG_58:
469         case MACFG_61:
470                 Data8 = re_eri_read(sc, 0x1AB, 1, ERIAR_ExGMAC);
471                 Data8 &= ~(BIT_2 | BIT_3 | BIT_4 | BIT_5 | BIT_6 | BIT_7);
472                 re_eri_write(sc, 0x1AB, 1, Data8, ERIAR_ExGMAC);
473 
474                 MP_WritePhyUshort(sc, MII_BMCR, (BMCR_AUTOEN|BMCR_PDOWN));
475                 break;
476         default:
477                 MP_WritePhyUshort(sc, MII_BMCR, (BMCR_AUTOEN|BMCR_PDOWN));
478                 break;
479         }
480 
481         switch (sc->re_type) {
482         case MACFG_56:
483         case MACFG_57:
484                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) & ~BIT_6);
485                 break;
486         }
487 
488         switch (sc->re_type) {
489         case MACFG_68:
490         case MACFG_69:
491                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) & ~BIT_6);
492                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) & ~BIT_6);
493                 break;
494         }
495 
496         if ((sc->re_if_flags & RL_FLAG_PHYWAKE_PM) != 0)
497                 CSR_WRITE_1(sc, RE_PMCH, CSR_READ_1(sc, RE_PMCH) & ~(BIT_6|BIT_7));
498 }
499 
500 #ifndef __DragonFly__
501 static void re_tx_dma_map_buf(void *arg, bus_dma_segment_t *segs, int nseg, int error)
502 {
503         union TxDesc *txptr = arg;
504 
505         if (error) {
506                 txptr->ul[0] &= ~htole32(RL_TDESC_CMD_BUFLEN);
507                 txptr->so1.TxBuffL = 0;
508                 txptr->so1.TxBuffH = 0;
509                 return;
510         }
511 
512         txptr->so1.TxBuffL = htole32(RL_ADDR_LO(segs->ds_addr));
513         txptr->so1.TxBuffH = htole32(RL_ADDR_HI(segs->ds_addr));
514 }
515 
516 static void re_rx_dma_map_buf(void *arg, bus_dma_segment_t *segs, int nseg, int error)
517 {
518         union RxDesc *rxptr = arg;
519 
520         if (error) {
521                 rxptr->ul[0] &= ~htole32(RL_RDESC_CMD_BUFLEN);
522                 rxptr->so0.RxBuffL = 0;
523                 rxptr->so0.RxBuffH = 0;
524                 return;
525         }
526 
527         rxptr->so0.RxBuffL = htole32(RL_ADDR_LO(segs->ds_addr));
528         rxptr->so0.RxBuffH = htole32(RL_ADDR_HI(segs->ds_addr));
529 }
530 
531 static void re_dma_map_rxdesc(void *arg, bus_dma_segment_t *segs, int nseg, int error)
532 {
533         struct re_softc *sc = arg;
534 
535 
536         if (error)
537                 return;
538 
539         CSR_WRITE_4(sc, 0xe4, RL_ADDR_LO(segs->ds_addr));
540         CSR_WRITE_4(sc, 0xe8, RL_ADDR_HI(segs->ds_addr));
541 }
542 
543 static void re_dma_map_txdesc(void *arg, bus_dma_segment_t *segs, int nseg, int error)
544 {
545         struct re_softc *sc = arg;
546 
547 
548         if (error)
549                 return;
550 
551         CSR_WRITE_4(sc, 0x20, RL_ADDR_LO(segs->ds_addr));
552         CSR_WRITE_4(sc, 0x24, RL_ADDR_HI(segs->ds_addr));
553 }
554 
555 /*
556  * Probe for a RealTek 8129/8139 chip. Check the PCI vendor and device
557  * IDs against our list and return a device name if we find a match.
558  */
559 static int re_probe(dev)	/* Search for Realtek NIC chip */
560 device_t		dev;
561 {
562         struct re_type		*t;
563         t = re_devs;
564         while (t->re_name != NULL) {
565                 if ((pci_get_vendor(dev) == t->re_vid) &&
566                     (pci_get_device(dev) == t->re_did)) {
567                         device_set_desc(dev, t->re_name);
568                         return(0);
569                 }
570                 t++;
571         }
572 
573         return(ENXIO);
574 }
575 #endif	/* !__DragonFly__ */
576 
577 
578 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)
579 {
580         int i, val_shift, shift = 0;
581         u_int32_t value1 = 0, value2 = 0, mask;
582         const u_int32_t transformed_base_address = ((base_address & 0x00FFF000) << 6) | (base_address & 0x000FFF);
583 
584         if (len > 4 || len <= 0)
585                 return -1;
586 
587         while (len > 0) {
588                 val_shift = addr % ERIAR_Addr_Align;
589                 addr = addr & ~0x3;
590 
591                 CSR_WRITE_4(sc,RE_ERIAR,
592                             ERIAR_Read |
593                             transformed_base_address |
594                             type << ERIAR_Type_shift |
595                             ERIAR_ByteEn << ERIAR_ByteEn_shift |
596                             addr);
597 
598                 for (i = 0; i < 10; i++) {
599                         DELAY(100);
600 
601                         /* Check if the RTL8168 has completed ERI read */
602                         if (CSR_READ_4(sc,RE_ERIAR) & ERIAR_Flag)
603                                 break;
604                 }
605 
606                 if (len == 1)		mask = (0xFF << (val_shift * 8)) & 0xFFFFFFFF;
607                 else if (len == 2)	mask = (0xFFFF << (val_shift * 8)) & 0xFFFFFFFF;
608                 else if (len == 3)	mask = (0xFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
609                 else			mask = (0xFFFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
610 
611                 value1 = CSR_READ_4(sc,RE_ERIDR) & mask;
612                 value2 |= (value1 >> val_shift * 8) << shift * 8;
613 
614                 if (len <= 4 - val_shift)
615                         len = 0;
616                 else {
617                         len -= (4 - val_shift);
618                         shift = 4 - val_shift;
619                         addr += 4;
620                 }
621         }
622 
623         return value2;
624 }
625 
626 static u_int32_t re_eri_read(struct re_softc *sc, int addr, int len, int type)
627 {
628         return re_eri_read_with_oob_base_address(sc, addr, len, type, 0);
629 }
630 
631 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)
632 {
633 
634         int i, val_shift, shift = 0;
635         u_int32_t value1 = 0, mask;
636         const u_int32_t transformed_base_address = ((base_address & 0x00FFF000) << 6) | (base_address & 0x000FFF);
637 
638         if (len > 4 || len <= 0)
639                 return -1;
640 
641         while (len > 0) {
642                 val_shift = addr % ERIAR_Addr_Align;
643                 addr = addr & ~0x3;
644 
645                 if (len == 1)		mask = (0xFF << (val_shift * 8)) & 0xFFFFFFFF;
646                 else if (len == 2)	mask = (0xFFFF << (val_shift * 8)) & 0xFFFFFFFF;
647                 else if (len == 3)	mask = (0xFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
648                 else			mask = (0xFFFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
649 
650                 value1 = re_eri_read_with_oob_base_address(sc, addr, 4, type, base_address) & ~mask;
651                 value1 |= ((value << val_shift * 8) >> shift * 8);
652 
653                 CSR_WRITE_4(sc,RE_ERIDR, value1);
654                 CSR_WRITE_4(sc,RE_ERIAR,
655                             ERIAR_Write |
656                             transformed_base_address |
657                             type << ERIAR_Type_shift |
658                             ERIAR_ByteEn << ERIAR_ByteEn_shift |
659                             addr);
660 
661                 for (i = 0; i < 10; i++) {
662                         DELAY(100);
663 
664                         /* Check if the RTL8168 has completed ERI write */
665                         if (!(CSR_READ_4(sc,RE_ERIAR) & ERIAR_Flag))
666                                 break;
667                 }
668 
669                 if (len <= 4 - val_shift)
670                         len = 0;
671                 else {
672                         len -= (4 - val_shift);
673                         shift = 4 - val_shift;
674                         addr += 4;
675                 }
676         }
677 
678         return 0;
679 }
680 
681 static int re_eri_write(struct re_softc *sc, int addr, int len, u_int32_t value, int type)
682 {
683         return re_eri_write_with_oob_base_address(sc, addr, len, value, type, 0);
684 }
685 
686 static void
687 ClearAndSetEthPhyBit(
688         struct re_softc *sc,
689         u_int8_t   addr,
690         u_int16_t   clearmask,
691         u_int16_t   setmask
692 )
693 {
694         u_int16_t PhyRegValue;
695 
696 
697         PhyRegValue = MP_ReadPhyUshort(sc, addr);
698         PhyRegValue &= ~clearmask;
699         PhyRegValue |= setmask;
700         MP_WritePhyUshort(sc, addr, PhyRegValue);
701 }
702 
703 static void
704 ClearEthPhyBit(
705         struct re_softc *sc,
706         u_int8_t   addr,
707         u_int16_t   mask
708 )
709 {
710         ClearAndSetEthPhyBit(sc,
711                              addr,
712                              mask,
713                              0
714                             );
715 }
716 
717 static void
718 SetEthPhyBit(
719         struct re_softc *sc,
720         u_int8_t   addr,
721         u_int16_t   mask
722 )
723 {
724         ClearAndSetEthPhyBit(sc,
725                              addr,
726                              0,
727                              mask
728                             );
729 }
730 
731 #ifndef __DragonFly__
732 static void re_release_rx_buf(struct re_softc *sc)
733 {
734         struct ifnet		*ifp;
735         int i;
736         ifp = RE_GET_IFNET(sc);
737 
738         if (sc->re_desc.re_rx_mtag) {
739                 for (i = 0; i < RE_RX_BUF_NUM; i++) {
740                         if (sc->re_desc.rx_buf[i]!=NULL) {
741                                 bus_dmamap_sync(sc->re_desc.re_rx_mtag,
742                                                 sc->re_desc.re_rx_dmamap[i],
743                                                 BUS_DMASYNC_POSTREAD);
744                                 bus_dmamap_unload(sc->re_desc.re_rx_mtag,
745                                                   sc->re_desc.re_rx_dmamap[i]);
746                                 bus_dmamap_destroy(sc->re_desc.re_rx_mtag,
747                                                    sc->re_desc.re_rx_dmamap[i]);
748                                 m_freem(sc->re_desc.rx_buf[i]);
749                                 sc->re_desc.rx_buf[i] =NULL;
750                         }
751                 }
752                 bus_dma_tag_destroy(sc->re_desc.re_rx_mtag);
753                 sc->re_desc.re_rx_mtag =0;
754         }
755 
756 }
757 static void re_release_tx_buf(struct re_softc *sc)
758 {
759         struct ifnet		*ifp;
760         int i;
761         ifp = RE_GET_IFNET(sc);
762 
763         if (sc->re_desc.re_tx_mtag) {
764                 for (i = 0; i < RE_TX_BUF_NUM; i++) {
765 
766                         bus_dmamap_destroy(sc->re_desc.re_tx_mtag,
767                                            sc->re_desc.re_tx_dmamap[i]);
768                         m_freem(sc->re_desc.tx_buf[i]);
769 
770                 }
771                 bus_dma_tag_destroy(sc->re_desc.re_tx_mtag);
772                 sc->re_desc.re_tx_mtag = 0;
773         }
774 
775 
776 }
777 static void re_release_buf(struct re_softc *sc)
778 {
779         re_release_rx_buf(sc);
780         re_release_tx_buf(sc);
781 }
782 
783 
784 
785 static int re_alloc_buf(struct re_softc *sc)
786 {
787         int error =0;
788         int i,size;
789 
790         error = bus_dma_tag_create(sc->re_parent_tag, 1, 0,
791                                    BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL,
792                                    NULL, MCLBYTES* RE_NTXSEGS, RE_NTXSEGS, 4096, 0,
793                                    NULL, NULL, &sc->re_desc.re_tx_mtag);
794 
795         if (error) {
796                 //device_printf(dev,"re_tx_mtag fail\n");
797                 //goto fail;
798                 return error;
799         }
800 
801         error = bus_dma_tag_create(
802                         sc->re_parent_tag,
803                         RE_RX_BUFFER_ALIGN, 0,		/* alignment, boundary */
804                         BUS_SPACE_MAXADDR,		/* lowaddr */
805                         BUS_SPACE_MAXADDR,		/* highaddr */
806                         NULL, NULL,			/* filter, filterarg */
807                         sc->re_rx_desc_buf_sz, 1,			/* maxsize,nsegments */
808                         sc->re_rx_desc_buf_sz,			/* maxsegsize */
809                         0,				/* flags */
810                         NULL, NULL,			/* lockfunc, lockarg */
811                         &sc->re_desc.re_rx_mtag);
812         if (error) {
813                 //device_printf(dev,"re_rx_mtag fail\n");
814                 //goto fail;
815                 return error;
816         }
817 
818         if (sc->re_rx_mbuf_sz <= MCLBYTES)
819                 size = MCLBYTES;
820         else if (sc->re_rx_mbuf_sz <=  MJUMPAGESIZE)
821                 size = MJUMPAGESIZE;
822         else
823                 size =MJUM9BYTES;
824         for (i = 0; i < RE_RX_BUF_NUM; i++) {
825                 sc->re_desc.rx_buf[i] = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, size);
826                 if (!sc->re_desc.rx_buf[i]) {
827                         //device_printf(dev, "m_getcl fail!!!\n");
828                         error = ENXIO;
829                         //goto fail;
830                         return error;
831                 }
832 
833                 sc->re_desc.rx_buf[i]->m_len = sc->re_desc.rx_buf[i]->m_pkthdr.len = size;
834 #ifdef RE_FIXUP_RX
835                 /*
836                  * This is part of an evil trick to deal with non-x86 platforms.
837                  * The RealTek chip requires RX buffers to be aligned on 64-bit
838                  * boundaries, but that will hose non-x86 machines. To get around
839                  * this, we leave some empty space at the start of each buffer
840                  * and for non-x86 hosts, we copy the buffer back six bytes
841                  * to achieve word alignment. This is slightly more efficient
842                  * than allocating a new buffer, copying the contents, and
843                  * discarding the old buffer.
844                  */
845                 m_adj(sc->re_desc.rx_buf[i], RE_ETHER_ALIGN);
846 #endif
847 
848                 error = bus_dmamap_create(sc->re_desc.re_rx_mtag, BUS_DMA_NOWAIT, &sc->re_desc.re_rx_dmamap[i]);
849                 if (error) {
850                         //device_printf(dev, "bus_dmamap_create fail!!!\n");
851                         //goto fail;
852                         return error;
853                 }
854         }
855 
856         for (i = 0; i < RE_TX_BUF_NUM; i++) {
857                 error = bus_dmamap_create(sc->re_desc.re_tx_mtag, BUS_DMA_NOWAIT, &sc->re_desc.re_tx_dmamap[i]);
858                 if (error) {
859                         //device_printf(dev, "bus_dmamap_create fail!!!\n");
860                         //goto fail;
861                         return error;
862                 }
863         }
864 
865         return 0;
866 }
867 
868 static void set_rxbufsize(struct re_softc *sc)
869 {
870 
871         //printf("set size\n");
872 
873         struct ifnet		*ifp;
874         ifp = RE_GET_IFNET(sc);
875         sc->re_rx_desc_buf_sz = (ifp->if_mtu > ETHERMTU) ? ifp->if_mtu: ETHERMTU;
876         sc->re_rx_desc_buf_sz += (ETHER_VLAN_ENCAP_LEN + ETHER_HDR_LEN + ETHER_CRC_LEN + 1);
877         CSR_WRITE_2(sc, RE_RxMaxSize, sc->re_rx_desc_buf_sz);
878 }
879 #endif	/* !__DragonFly__ */
880 
881 static void re_enable_cfg9346_write(struct re_softc *sc)
882 {
883         EE_SET(RE_EEMODE_WRITECFG);
884 }
885 
886 static void re_disable_cfg9346_write(struct re_softc *sc)
887 {
888         EE_CLR(RE_EEMODE_WRITECFG);
889 }
890 
891 static void DisableMcuBPs(struct re_softc *sc)
892 {
893         switch(sc->re_type) {
894         case MACFG_68:
895         case MACFG_69:
896         case MACFG_70:
897         case MACFG_71:
898                 MP_WriteMcuAccessRegWord(sc, 0xFC38, 0x0000);
899                 break;
900         }
901 
902         switch(sc->re_type) {
903         case MACFG_56:
904         case MACFG_57:
905         case MACFG_58:
906         case MACFG_59:
907         case MACFG_60:
908         case MACFG_61:
909         case MACFG_62:
910         case MACFG_67:
911         case MACFG_68:
912         case MACFG_69:
913         case MACFG_70:
914         case MACFG_71:
915                 re_enable_cfg9346_write(sc);
916                 CSR_WRITE_1(sc, RE_CFG5, CSR_READ_1(sc, RE_CFG5) & ~BIT_0);
917                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) & ~BIT_7);
918                 re_disable_cfg9346_write(sc);
919 
920                 MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x0000);
921                 MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x0000);
922                 MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x0000);
923                 MP_WriteMcuAccessRegWord(sc, 0xFC2E, 0x0000);
924                 MP_WriteMcuAccessRegWord(sc, 0xFC30, 0x0000);
925                 MP_WriteMcuAccessRegWord(sc, 0xFC32, 0x0000);
926                 MP_WriteMcuAccessRegWord(sc, 0xFC34, 0x0000);
927                 MP_WriteMcuAccessRegWord(sc, 0xFC36, 0x0000);
928 
929                 DELAY(3000);
930 
931                 MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x0000);
932                 break;
933         }
934 }
935 
936 static void re_set_mac_mcu_8168g_1(struct re_softc *sc)
937 {
938         MP_WriteMcuAccessRegWord(sc, 0xE43C, 0x0000);
939         MP_WriteMcuAccessRegWord(sc, 0xE43E, 0x0000);
940 
941         MP_WriteMcuAccessRegWord(sc, 0xE434, 0x0004);
942         MP_WriteMcuAccessRegWord(sc, 0xE43C, 0x0004);
943 
944         DisableMcuBPs(sc);
945 
946         MP_WriteMcuAccessRegWord(sc, 0xF800, 0xE008);
947         MP_WriteMcuAccessRegWord(sc, 0xF802, 0xE01B);
948         MP_WriteMcuAccessRegWord(sc, 0xF804, 0xE022);
949         MP_WriteMcuAccessRegWord(sc, 0xF806, 0xE094);
950         MP_WriteMcuAccessRegWord(sc, 0xF808, 0xE097);
951         MP_WriteMcuAccessRegWord(sc, 0xF80A, 0xE09A);
952         MP_WriteMcuAccessRegWord(sc, 0xF80C, 0xE0B3);
953         MP_WriteMcuAccessRegWord(sc, 0xF80E, 0xE0BA);
954         MP_WriteMcuAccessRegWord(sc, 0xF810, 0x49D2);
955         MP_WriteMcuAccessRegWord(sc, 0xF812, 0xF10D);
956         MP_WriteMcuAccessRegWord(sc, 0xF814, 0x766C);
957         MP_WriteMcuAccessRegWord(sc, 0xF816, 0x49E2);
958         MP_WriteMcuAccessRegWord(sc, 0xF818, 0xF00A);
959         MP_WriteMcuAccessRegWord(sc, 0xF81A, 0x1EC0);
960         MP_WriteMcuAccessRegWord(sc, 0xF81C, 0x8EE1);
961         MP_WriteMcuAccessRegWord(sc, 0xF81E, 0xC60A);
962         MP_WriteMcuAccessRegWord(sc, 0xF820, 0x77C0);
963         MP_WriteMcuAccessRegWord(sc, 0xF822, 0x4870);
964         MP_WriteMcuAccessRegWord(sc, 0xF824, 0x9FC0);
965         MP_WriteMcuAccessRegWord(sc, 0xF826, 0x1EA0);
966         MP_WriteMcuAccessRegWord(sc, 0xF828, 0xC707);
967         MP_WriteMcuAccessRegWord(sc, 0xF82A, 0x8EE1);
968         MP_WriteMcuAccessRegWord(sc, 0xF82C, 0x9D6C);
969         MP_WriteMcuAccessRegWord(sc, 0xF82E, 0xC603);
970         MP_WriteMcuAccessRegWord(sc, 0xF830, 0xBE00);
971         MP_WriteMcuAccessRegWord(sc, 0xF832, 0xB416);
972         MP_WriteMcuAccessRegWord(sc, 0xF834, 0x0076);
973         MP_WriteMcuAccessRegWord(sc, 0xF836, 0xE86C);
974         MP_WriteMcuAccessRegWord(sc, 0xF838, 0xC406);
975         MP_WriteMcuAccessRegWord(sc, 0xF83A, 0x7580);
976         MP_WriteMcuAccessRegWord(sc, 0xF83C, 0x4852);
977         MP_WriteMcuAccessRegWord(sc, 0xF83E, 0x8D80);
978         MP_WriteMcuAccessRegWord(sc, 0xF840, 0xC403);
979         MP_WriteMcuAccessRegWord(sc, 0xF842, 0xBC00);
980         MP_WriteMcuAccessRegWord(sc, 0xF844, 0xD3E0);
981         MP_WriteMcuAccessRegWord(sc, 0xF846, 0x02C8);
982         MP_WriteMcuAccessRegWord(sc, 0xF848, 0x8918);
983         MP_WriteMcuAccessRegWord(sc, 0xF84A, 0xE815);
984         MP_WriteMcuAccessRegWord(sc, 0xF84C, 0x1100);
985         MP_WriteMcuAccessRegWord(sc, 0xF84E, 0xF011);
986         MP_WriteMcuAccessRegWord(sc, 0xF850, 0xE812);
987         MP_WriteMcuAccessRegWord(sc, 0xF852, 0x4990);
988         MP_WriteMcuAccessRegWord(sc, 0xF854, 0xF002);
989         MP_WriteMcuAccessRegWord(sc, 0xF856, 0xE817);
990         MP_WriteMcuAccessRegWord(sc, 0xF858, 0xE80E);
991         MP_WriteMcuAccessRegWord(sc, 0xF85A, 0x4992);
992         MP_WriteMcuAccessRegWord(sc, 0xF85C, 0xF002);
993         MP_WriteMcuAccessRegWord(sc, 0xF85E, 0xE80E);
994         MP_WriteMcuAccessRegWord(sc, 0xF860, 0xE80A);
995         MP_WriteMcuAccessRegWord(sc, 0xF862, 0x4993);
996         MP_WriteMcuAccessRegWord(sc, 0xF864, 0xF002);
997         MP_WriteMcuAccessRegWord(sc, 0xF866, 0xE818);
998         MP_WriteMcuAccessRegWord(sc, 0xF868, 0xE806);
999         MP_WriteMcuAccessRegWord(sc, 0xF86A, 0x4991);
1000         MP_WriteMcuAccessRegWord(sc, 0xF86C, 0xF002);
1001         MP_WriteMcuAccessRegWord(sc, 0xF86E, 0xE838);
1002         MP_WriteMcuAccessRegWord(sc, 0xF870, 0xC25E);
1003         MP_WriteMcuAccessRegWord(sc, 0xF872, 0xBA00);
1004         MP_WriteMcuAccessRegWord(sc, 0xF874, 0xC056);
1005         MP_WriteMcuAccessRegWord(sc, 0xF876, 0x7100);
1006         MP_WriteMcuAccessRegWord(sc, 0xF878, 0xFF80);
1007         MP_WriteMcuAccessRegWord(sc, 0xF87A, 0x7100);
1008         MP_WriteMcuAccessRegWord(sc, 0xF87C, 0x4892);
1009         MP_WriteMcuAccessRegWord(sc, 0xF87E, 0x4813);
1010         MP_WriteMcuAccessRegWord(sc, 0xF880, 0x8900);
1011         MP_WriteMcuAccessRegWord(sc, 0xF882, 0xE00A);
1012         MP_WriteMcuAccessRegWord(sc, 0xF884, 0x7100);
1013         MP_WriteMcuAccessRegWord(sc, 0xF886, 0x4890);
1014         MP_WriteMcuAccessRegWord(sc, 0xF888, 0x4813);
1015         MP_WriteMcuAccessRegWord(sc, 0xF88A, 0x8900);
1016         MP_WriteMcuAccessRegWord(sc, 0xF88C, 0xC74B);
1017         MP_WriteMcuAccessRegWord(sc, 0xF88E, 0x74F8);
1018         MP_WriteMcuAccessRegWord(sc, 0xF890, 0x48C2);
1019         MP_WriteMcuAccessRegWord(sc, 0xF892, 0x4841);
1020         MP_WriteMcuAccessRegWord(sc, 0xF894, 0x8CF8);
1021         MP_WriteMcuAccessRegWord(sc, 0xF896, 0xC746);
1022         MP_WriteMcuAccessRegWord(sc, 0xF898, 0x74FC);
1023         MP_WriteMcuAccessRegWord(sc, 0xF89A, 0x49C0);
1024         MP_WriteMcuAccessRegWord(sc, 0xF89C, 0xF120);
1025         MP_WriteMcuAccessRegWord(sc, 0xF89E, 0x49C1);
1026         MP_WriteMcuAccessRegWord(sc, 0xF8A0, 0xF11E);
1027         MP_WriteMcuAccessRegWord(sc, 0xF8A2, 0x74F8);
1028         MP_WriteMcuAccessRegWord(sc, 0xF8A4, 0x49C0);
1029         MP_WriteMcuAccessRegWord(sc, 0xF8A6, 0xF01B);
1030         MP_WriteMcuAccessRegWord(sc, 0xF8A8, 0x49C6);
1031         MP_WriteMcuAccessRegWord(sc, 0xF8AA, 0xF119);
1032         MP_WriteMcuAccessRegWord(sc, 0xF8AC, 0x74F8);
1033         MP_WriteMcuAccessRegWord(sc, 0xF8AE, 0x49C4);
1034         MP_WriteMcuAccessRegWord(sc, 0xF8B0, 0xF013);
1035         MP_WriteMcuAccessRegWord(sc, 0xF8B2, 0xC536);
1036         MP_WriteMcuAccessRegWord(sc, 0xF8B4, 0x74B0);
1037         MP_WriteMcuAccessRegWord(sc, 0xF8B6, 0x49C1);
1038         MP_WriteMcuAccessRegWord(sc, 0xF8B8, 0xF1FD);
1039         MP_WriteMcuAccessRegWord(sc, 0xF8BA, 0xC537);
1040         MP_WriteMcuAccessRegWord(sc, 0xF8BC, 0xC434);
1041         MP_WriteMcuAccessRegWord(sc, 0xF8BE, 0x9CA0);
1042         MP_WriteMcuAccessRegWord(sc, 0xF8C0, 0xC435);
1043         MP_WriteMcuAccessRegWord(sc, 0xF8C2, 0x1C13);
1044         MP_WriteMcuAccessRegWord(sc, 0xF8C4, 0x484F);
1045         MP_WriteMcuAccessRegWord(sc, 0xF8C6, 0x9CA2);
1046         MP_WriteMcuAccessRegWord(sc, 0xF8C8, 0xC52B);
1047         MP_WriteMcuAccessRegWord(sc, 0xF8CA, 0x74B0);
1048         MP_WriteMcuAccessRegWord(sc, 0xF8CC, 0x49C1);
1049         MP_WriteMcuAccessRegWord(sc, 0xF8CE, 0xF1FD);
1050         MP_WriteMcuAccessRegWord(sc, 0xF8D0, 0x74F8);
1051         MP_WriteMcuAccessRegWord(sc, 0xF8D2, 0x48C4);
1052         MP_WriteMcuAccessRegWord(sc, 0xF8D4, 0x8CF8);
1053         MP_WriteMcuAccessRegWord(sc, 0xF8D6, 0x7100);
1054         MP_WriteMcuAccessRegWord(sc, 0xF8D8, 0x4893);
1055         MP_WriteMcuAccessRegWord(sc, 0xF8DA, 0x8900);
1056         MP_WriteMcuAccessRegWord(sc, 0xF8DC, 0xFF80);
1057         MP_WriteMcuAccessRegWord(sc, 0xF8DE, 0xC520);
1058         MP_WriteMcuAccessRegWord(sc, 0xF8E0, 0x74B0);
1059         MP_WriteMcuAccessRegWord(sc, 0xF8E2, 0x49C1);
1060         MP_WriteMcuAccessRegWord(sc, 0xF8E4, 0xF11C);
1061         MP_WriteMcuAccessRegWord(sc, 0xF8E6, 0xC71E);
1062         MP_WriteMcuAccessRegWord(sc, 0xF8E8, 0x74FC);
1063         MP_WriteMcuAccessRegWord(sc, 0xF8EA, 0x49C1);
1064         MP_WriteMcuAccessRegWord(sc, 0xF8EC, 0xF118);
1065         MP_WriteMcuAccessRegWord(sc, 0xF8EE, 0x49C0);
1066         MP_WriteMcuAccessRegWord(sc, 0xF8F0, 0xF116);
1067         MP_WriteMcuAccessRegWord(sc, 0xF8F2, 0x74F8);
1068         MP_WriteMcuAccessRegWord(sc, 0xF8F4, 0x49C0);
1069         MP_WriteMcuAccessRegWord(sc, 0xF8F6, 0xF013);
1070         MP_WriteMcuAccessRegWord(sc, 0xF8F8, 0x48C3);
1071         MP_WriteMcuAccessRegWord(sc, 0xF8FA, 0x8CF8);
1072         MP_WriteMcuAccessRegWord(sc, 0xF8FC, 0xC516);
1073         MP_WriteMcuAccessRegWord(sc, 0xF8FE, 0x74A2);
1074         MP_WriteMcuAccessRegWord(sc, 0xF900, 0x49CE);
1075         MP_WriteMcuAccessRegWord(sc, 0xF902, 0xF1FE);
1076         MP_WriteMcuAccessRegWord(sc, 0xF904, 0xC411);
1077         MP_WriteMcuAccessRegWord(sc, 0xF906, 0x9CA0);
1078         MP_WriteMcuAccessRegWord(sc, 0xF908, 0xC411);
1079         MP_WriteMcuAccessRegWord(sc, 0xF90A, 0x1C13);
1080         MP_WriteMcuAccessRegWord(sc, 0xF90C, 0x484F);
1081         MP_WriteMcuAccessRegWord(sc, 0xF90E, 0x9CA2);
1082         MP_WriteMcuAccessRegWord(sc, 0xF910, 0x74A2);
1083         MP_WriteMcuAccessRegWord(sc, 0xF912, 0x49CF);
1084         MP_WriteMcuAccessRegWord(sc, 0xF914, 0xF1FE);
1085         MP_WriteMcuAccessRegWord(sc, 0xF916, 0x7100);
1086         MP_WriteMcuAccessRegWord(sc, 0xF918, 0x4891);
1087         MP_WriteMcuAccessRegWord(sc, 0xF91A, 0x8900);
1088         MP_WriteMcuAccessRegWord(sc, 0xF91C, 0xFF80);
1089         MP_WriteMcuAccessRegWord(sc, 0xF91E, 0xE400);
1090         MP_WriteMcuAccessRegWord(sc, 0xF920, 0xD3E0);
1091         MP_WriteMcuAccessRegWord(sc, 0xF922, 0xE000);
1092         MP_WriteMcuAccessRegWord(sc, 0xF924, 0x0481);
1093         MP_WriteMcuAccessRegWord(sc, 0xF926, 0x0C81);
1094         MP_WriteMcuAccessRegWord(sc, 0xF928, 0xDE20);
1095         MP_WriteMcuAccessRegWord(sc, 0xF92A, 0x0000);
1096         MP_WriteMcuAccessRegWord(sc, 0xF92C, 0x0992);
1097         MP_WriteMcuAccessRegWord(sc, 0xF92E, 0x1B76);
1098         MP_WriteMcuAccessRegWord(sc, 0xF930, 0xC602);
1099         MP_WriteMcuAccessRegWord(sc, 0xF932, 0xBE00);
1100         MP_WriteMcuAccessRegWord(sc, 0xF934, 0x059C);
1101         MP_WriteMcuAccessRegWord(sc, 0xF936, 0x1B76);
1102         MP_WriteMcuAccessRegWord(sc, 0xF938, 0xC602);
1103         MP_WriteMcuAccessRegWord(sc, 0xF93A, 0xBE00);
1104         MP_WriteMcuAccessRegWord(sc, 0xF93C, 0x065A);
1105         MP_WriteMcuAccessRegWord(sc, 0xF93E, 0xB400);
1106         MP_WriteMcuAccessRegWord(sc, 0xF940, 0x18DE);
1107         MP_WriteMcuAccessRegWord(sc, 0xF942, 0x2008);
1108         MP_WriteMcuAccessRegWord(sc, 0xF944, 0x4001);
1109         MP_WriteMcuAccessRegWord(sc, 0xF946, 0xF10F);
1110         MP_WriteMcuAccessRegWord(sc, 0xF948, 0x7342);
1111         MP_WriteMcuAccessRegWord(sc, 0xF94A, 0x1880);
1112         MP_WriteMcuAccessRegWord(sc, 0xF94C, 0x2008);
1113         MP_WriteMcuAccessRegWord(sc, 0xF94E, 0x0009);
1114         MP_WriteMcuAccessRegWord(sc, 0xF950, 0x4018);
1115         MP_WriteMcuAccessRegWord(sc, 0xF952, 0xF109);
1116         MP_WriteMcuAccessRegWord(sc, 0xF954, 0x7340);
1117         MP_WriteMcuAccessRegWord(sc, 0xF956, 0x25BC);
1118         MP_WriteMcuAccessRegWord(sc, 0xF958, 0x130F);
1119         MP_WriteMcuAccessRegWord(sc, 0xF95A, 0xF105);
1120         MP_WriteMcuAccessRegWord(sc, 0xF95C, 0xC00A);
1121         MP_WriteMcuAccessRegWord(sc, 0xF95E, 0x7300);
1122         MP_WriteMcuAccessRegWord(sc, 0xF960, 0x4831);
1123         MP_WriteMcuAccessRegWord(sc, 0xF962, 0x9B00);
1124         MP_WriteMcuAccessRegWord(sc, 0xF964, 0xB000);
1125         MP_WriteMcuAccessRegWord(sc, 0xF966, 0x7340);
1126         MP_WriteMcuAccessRegWord(sc, 0xF968, 0x8320);
1127         MP_WriteMcuAccessRegWord(sc, 0xF96A, 0xC302);
1128         MP_WriteMcuAccessRegWord(sc, 0xF96C, 0xBB00);
1129         MP_WriteMcuAccessRegWord(sc, 0xF96E, 0x0C12);
1130         MP_WriteMcuAccessRegWord(sc, 0xF970, 0xE860);
1131         MP_WriteMcuAccessRegWord(sc, 0xF972, 0xC406);
1132         MP_WriteMcuAccessRegWord(sc, 0xF974, 0x7580);
1133         MP_WriteMcuAccessRegWord(sc, 0xF976, 0x4851);
1134         MP_WriteMcuAccessRegWord(sc, 0xF978, 0x8D80);
1135         MP_WriteMcuAccessRegWord(sc, 0xF97A, 0xC403);
1136         MP_WriteMcuAccessRegWord(sc, 0xF97C, 0xBC00);
1137         MP_WriteMcuAccessRegWord(sc, 0xF97E, 0xD3E0);
1138         MP_WriteMcuAccessRegWord(sc, 0xF980, 0x02C8);
1139         MP_WriteMcuAccessRegWord(sc, 0xF982, 0xC406);
1140         MP_WriteMcuAccessRegWord(sc, 0xF984, 0x7580);
1141         MP_WriteMcuAccessRegWord(sc, 0xF986, 0x4850);
1142         MP_WriteMcuAccessRegWord(sc, 0xF988, 0x8D80);
1143         MP_WriteMcuAccessRegWord(sc, 0xF98A, 0xC403);
1144         MP_WriteMcuAccessRegWord(sc, 0xF98C, 0xBC00);
1145         MP_WriteMcuAccessRegWord(sc, 0xF98E, 0xD3E0);
1146         MP_WriteMcuAccessRegWord(sc, 0xF990, 0x0298);
1147 
1148         MP_WriteMcuAccessRegWord(sc, 0xDE30, 0x0080);
1149 
1150         MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
1151 
1152         MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x0075);
1153         MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x02B1);
1154         MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x0991);
1155         MP_WriteMcuAccessRegWord(sc, 0xFC2E, 0x059B);
1156         MP_WriteMcuAccessRegWord(sc, 0xFC30, 0x0659);
1157         MP_WriteMcuAccessRegWord(sc, 0xFC32, 0x0000);
1158         MP_WriteMcuAccessRegWord(sc, 0xFC34, 0x02BB);
1159         MP_WriteMcuAccessRegWord(sc, 0xFC36, 0x0279);
1160 }
1161 
1162 static void re_set_mac_mcu_8168gu_1(struct re_softc *sc)
1163 {
1164         DisableMcuBPs(sc);
1165 
1166         MP_WriteMcuAccessRegWord(sc, 0xF800, 0xE008);
1167         MP_WriteMcuAccessRegWord(sc, 0xF802, 0xE011);
1168         MP_WriteMcuAccessRegWord(sc, 0xF804, 0xE015);
1169         MP_WriteMcuAccessRegWord(sc, 0xF806, 0xE018);
1170         MP_WriteMcuAccessRegWord(sc, 0xF808, 0xE01B);
1171         MP_WriteMcuAccessRegWord(sc, 0xF80A, 0xE027);
1172         MP_WriteMcuAccessRegWord(sc, 0xF80C, 0xE043);
1173         MP_WriteMcuAccessRegWord(sc, 0xF80E, 0xE065);
1174         MP_WriteMcuAccessRegWord(sc, 0xF810, 0x49E2);
1175         MP_WriteMcuAccessRegWord(sc, 0xF812, 0xF005);
1176         MP_WriteMcuAccessRegWord(sc, 0xF814, 0x49EA);
1177         MP_WriteMcuAccessRegWord(sc, 0xF816, 0xF003);
1178         MP_WriteMcuAccessRegWord(sc, 0xF818, 0xC404);
1179         MP_WriteMcuAccessRegWord(sc, 0xF81A, 0xBC00);
1180         MP_WriteMcuAccessRegWord(sc, 0xF81C, 0xC403);
1181         MP_WriteMcuAccessRegWord(sc, 0xF81E, 0xBC00);
1182         MP_WriteMcuAccessRegWord(sc, 0xF820, 0x0496);
1183         MP_WriteMcuAccessRegWord(sc, 0xF822, 0x051A);
1184         MP_WriteMcuAccessRegWord(sc, 0xF824, 0x1D01);
1185         MP_WriteMcuAccessRegWord(sc, 0xF826, 0x8DE8);
1186         MP_WriteMcuAccessRegWord(sc, 0xF828, 0xC602);
1187         MP_WriteMcuAccessRegWord(sc, 0xF82A, 0xBE00);
1188         MP_WriteMcuAccessRegWord(sc, 0xF82C, 0x0206);
1189         MP_WriteMcuAccessRegWord(sc, 0xF82E, 0x1B76);
1190         MP_WriteMcuAccessRegWord(sc, 0xF830, 0xC202);
1191         MP_WriteMcuAccessRegWord(sc, 0xF832, 0xBA00);
1192         MP_WriteMcuAccessRegWord(sc, 0xF834, 0x058A);
1193         MP_WriteMcuAccessRegWord(sc, 0xF836, 0x1B76);
1194         MP_WriteMcuAccessRegWord(sc, 0xF838, 0xC602);
1195         MP_WriteMcuAccessRegWord(sc, 0xF83A, 0xBE00);
1196         MP_WriteMcuAccessRegWord(sc, 0xF83C, 0x0648);
1197         MP_WriteMcuAccessRegWord(sc, 0xF83E, 0x74E6);
1198         MP_WriteMcuAccessRegWord(sc, 0xF840, 0x1B78);
1199         MP_WriteMcuAccessRegWord(sc, 0xF842, 0x46DC);
1200         MP_WriteMcuAccessRegWord(sc, 0xF844, 0x1300);
1201         MP_WriteMcuAccessRegWord(sc, 0xF846, 0xF005);
1202         MP_WriteMcuAccessRegWord(sc, 0xF848, 0x74F8);
1203         MP_WriteMcuAccessRegWord(sc, 0xF84A, 0x48C3);
1204         MP_WriteMcuAccessRegWord(sc, 0xF84C, 0x48C4);
1205         MP_WriteMcuAccessRegWord(sc, 0xF84E, 0x8CF8);
1206         MP_WriteMcuAccessRegWord(sc, 0xF850, 0x64E7);
1207         MP_WriteMcuAccessRegWord(sc, 0xF852, 0xC302);
1208         MP_WriteMcuAccessRegWord(sc, 0xF854, 0xBB00);
1209         MP_WriteMcuAccessRegWord(sc, 0xF856, 0x068E);
1210         MP_WriteMcuAccessRegWord(sc, 0xF858, 0x74E4);
1211         MP_WriteMcuAccessRegWord(sc, 0xF85A, 0x49C5);
1212         MP_WriteMcuAccessRegWord(sc, 0xF85C, 0xF106);
1213         MP_WriteMcuAccessRegWord(sc, 0xF85E, 0x49C6);
1214         MP_WriteMcuAccessRegWord(sc, 0xF860, 0xF107);
1215         MP_WriteMcuAccessRegWord(sc, 0xF862, 0x48C8);
1216         MP_WriteMcuAccessRegWord(sc, 0xF864, 0x48C9);
1217         MP_WriteMcuAccessRegWord(sc, 0xF866, 0xE011);
1218         MP_WriteMcuAccessRegWord(sc, 0xF868, 0x48C9);
1219         MP_WriteMcuAccessRegWord(sc, 0xF86A, 0x4848);
1220         MP_WriteMcuAccessRegWord(sc, 0xF86C, 0xE00E);
1221         MP_WriteMcuAccessRegWord(sc, 0xF86E, 0x4848);
1222         MP_WriteMcuAccessRegWord(sc, 0xF870, 0x49C7);
1223         MP_WriteMcuAccessRegWord(sc, 0xF872, 0xF00A);
1224         MP_WriteMcuAccessRegWord(sc, 0xF874, 0x48C9);
1225         MP_WriteMcuAccessRegWord(sc, 0xF876, 0xC60D);
1226         MP_WriteMcuAccessRegWord(sc, 0xF878, 0x1D1F);
1227         MP_WriteMcuAccessRegWord(sc, 0xF87A, 0x8DC2);
1228         MP_WriteMcuAccessRegWord(sc, 0xF87C, 0x1D00);
1229         MP_WriteMcuAccessRegWord(sc, 0xF87E, 0x8DC3);
1230         MP_WriteMcuAccessRegWord(sc, 0xF880, 0x1D11);
1231         MP_WriteMcuAccessRegWord(sc, 0xF882, 0x8DC0);
1232         MP_WriteMcuAccessRegWord(sc, 0xF884, 0xE002);
1233         MP_WriteMcuAccessRegWord(sc, 0xF886, 0x4849);
1234         MP_WriteMcuAccessRegWord(sc, 0xF888, 0x94E5);
1235         MP_WriteMcuAccessRegWord(sc, 0xF88A, 0xC602);
1236         MP_WriteMcuAccessRegWord(sc, 0xF88C, 0xBE00);
1237         MP_WriteMcuAccessRegWord(sc, 0xF88E, 0x0238);
1238         MP_WriteMcuAccessRegWord(sc, 0xF890, 0xE434);
1239         MP_WriteMcuAccessRegWord(sc, 0xF892, 0x49D9);
1240         MP_WriteMcuAccessRegWord(sc, 0xF894, 0xF01B);
1241         MP_WriteMcuAccessRegWord(sc, 0xF896, 0xC31E);
1242         MP_WriteMcuAccessRegWord(sc, 0xF898, 0x7464);
1243         MP_WriteMcuAccessRegWord(sc, 0xF89A, 0x49C4);
1244         MP_WriteMcuAccessRegWord(sc, 0xF89C, 0xF114);
1245         MP_WriteMcuAccessRegWord(sc, 0xF89E, 0xC31B);
1246         MP_WriteMcuAccessRegWord(sc, 0xF8A0, 0x6460);
1247         MP_WriteMcuAccessRegWord(sc, 0xF8A2, 0x14FA);
1248         MP_WriteMcuAccessRegWord(sc, 0xF8A4, 0xFA02);
1249         MP_WriteMcuAccessRegWord(sc, 0xF8A6, 0xE00F);
1250         MP_WriteMcuAccessRegWord(sc, 0xF8A8, 0xC317);
1251         MP_WriteMcuAccessRegWord(sc, 0xF8AA, 0x7460);
1252         MP_WriteMcuAccessRegWord(sc, 0xF8AC, 0x49C0);
1253         MP_WriteMcuAccessRegWord(sc, 0xF8AE, 0xF10B);
1254         MP_WriteMcuAccessRegWord(sc, 0xF8B0, 0xC311);
1255         MP_WriteMcuAccessRegWord(sc, 0xF8B2, 0x7462);
1256         MP_WriteMcuAccessRegWord(sc, 0xF8B4, 0x48C1);
1257         MP_WriteMcuAccessRegWord(sc, 0xF8B6, 0x9C62);
1258         MP_WriteMcuAccessRegWord(sc, 0xF8B8, 0x4841);
1259         MP_WriteMcuAccessRegWord(sc, 0xF8BA, 0x9C62);
1260         MP_WriteMcuAccessRegWord(sc, 0xF8BC, 0xC30A);
1261         MP_WriteMcuAccessRegWord(sc, 0xF8BE, 0x1C04);
1262         MP_WriteMcuAccessRegWord(sc, 0xF8C0, 0x8C60);
1263         MP_WriteMcuAccessRegWord(sc, 0xF8C2, 0xE004);
1264         MP_WriteMcuAccessRegWord(sc, 0xF8C4, 0x1C15);
1265         MP_WriteMcuAccessRegWord(sc, 0xF8C6, 0xC305);
1266         MP_WriteMcuAccessRegWord(sc, 0xF8C8, 0x8C60);
1267         MP_WriteMcuAccessRegWord(sc, 0xF8CA, 0xC602);
1268         MP_WriteMcuAccessRegWord(sc, 0xF8CC, 0xBE00);
1269         MP_WriteMcuAccessRegWord(sc, 0xF8CE, 0x0374);
1270         MP_WriteMcuAccessRegWord(sc, 0xF8D0, 0xE434);
1271         MP_WriteMcuAccessRegWord(sc, 0xF8D2, 0xE030);
1272         MP_WriteMcuAccessRegWord(sc, 0xF8D4, 0xE61C);
1273         MP_WriteMcuAccessRegWord(sc, 0xF8D6, 0xE906);
1274         MP_WriteMcuAccessRegWord(sc, 0xF8D8, 0xC602);
1275         MP_WriteMcuAccessRegWord(sc, 0xF8DA, 0xBE00);
1276         MP_WriteMcuAccessRegWord(sc, 0xF8DC, 0x0000);
1277 
1278         MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
1279 
1280         MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x0493);
1281         MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x0205);
1282         MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x0589);
1283         MP_WriteMcuAccessRegWord(sc, 0xFC2E, 0x0647);
1284         MP_WriteMcuAccessRegWord(sc, 0xFC30, 0x0000);
1285         MP_WriteMcuAccessRegWord(sc, 0xFC32, 0x0215);
1286         MP_WriteMcuAccessRegWord(sc, 0xFC34, 0x0285);
1287 }
1288 
1289 static void re_set_mac_mcu_8168gu_2(struct re_softc *sc)
1290 {
1291         DisableMcuBPs(sc);
1292 
1293         MP_WriteMcuAccessRegWord(sc, 0xF800, 0xE008);
1294         MP_WriteMcuAccessRegWord(sc, 0xF802, 0xE00A);
1295         MP_WriteMcuAccessRegWord(sc, 0xF804, 0xE00D);
1296         MP_WriteMcuAccessRegWord(sc, 0xF806, 0xE02F);
1297         MP_WriteMcuAccessRegWord(sc, 0xF808, 0xE031);
1298         MP_WriteMcuAccessRegWord(sc, 0xF80A, 0xE038);
1299         MP_WriteMcuAccessRegWord(sc, 0xF80C, 0xE03A);
1300         MP_WriteMcuAccessRegWord(sc, 0xF80E, 0xE051);
1301         MP_WriteMcuAccessRegWord(sc, 0xF810, 0xC202);
1302         MP_WriteMcuAccessRegWord(sc, 0xF812, 0xBA00);
1303         MP_WriteMcuAccessRegWord(sc, 0xF814, 0x0DFC);
1304         MP_WriteMcuAccessRegWord(sc, 0xF816, 0x7444);
1305         MP_WriteMcuAccessRegWord(sc, 0xF818, 0xC502);
1306         MP_WriteMcuAccessRegWord(sc, 0xF81A, 0xBD00);
1307         MP_WriteMcuAccessRegWord(sc, 0xF81C, 0x0A30);
1308         MP_WriteMcuAccessRegWord(sc, 0xF81E, 0x49D9);
1309         MP_WriteMcuAccessRegWord(sc, 0xF820, 0xF019);
1310         MP_WriteMcuAccessRegWord(sc, 0xF822, 0xC520);
1311         MP_WriteMcuAccessRegWord(sc, 0xF824, 0x64A5);
1312         MP_WriteMcuAccessRegWord(sc, 0xF826, 0x1400);
1313         MP_WriteMcuAccessRegWord(sc, 0xF828, 0xF007);
1314         MP_WriteMcuAccessRegWord(sc, 0xF82A, 0x0C01);
1315         MP_WriteMcuAccessRegWord(sc, 0xF82C, 0x8CA5);
1316         MP_WriteMcuAccessRegWord(sc, 0xF82E, 0x1C15);
1317         MP_WriteMcuAccessRegWord(sc, 0xF830, 0xC515);
1318         MP_WriteMcuAccessRegWord(sc, 0xF832, 0x9CA0);
1319         MP_WriteMcuAccessRegWord(sc, 0xF834, 0xE00F);
1320         MP_WriteMcuAccessRegWord(sc, 0xF836, 0xC513);
1321         MP_WriteMcuAccessRegWord(sc, 0xF838, 0x74A0);
1322         MP_WriteMcuAccessRegWord(sc, 0xF83A, 0x48C8);
1323         MP_WriteMcuAccessRegWord(sc, 0xF83C, 0x48CA);
1324         MP_WriteMcuAccessRegWord(sc, 0xF83E, 0x9CA0);
1325         MP_WriteMcuAccessRegWord(sc, 0xF840, 0xC510);
1326         MP_WriteMcuAccessRegWord(sc, 0xF842, 0x1B00);
1327         MP_WriteMcuAccessRegWord(sc, 0xF844, 0x9BA0);
1328         MP_WriteMcuAccessRegWord(sc, 0xF846, 0x1B1C);
1329         MP_WriteMcuAccessRegWord(sc, 0xF848, 0x483F);
1330         MP_WriteMcuAccessRegWord(sc, 0xF84A, 0x9BA2);
1331         MP_WriteMcuAccessRegWord(sc, 0xF84C, 0x1B04);
1332         MP_WriteMcuAccessRegWord(sc, 0xF84E, 0xC506);
1333         MP_WriteMcuAccessRegWord(sc, 0xF850, 0x9BA0);
1334         MP_WriteMcuAccessRegWord(sc, 0xF852, 0xC603);
1335         MP_WriteMcuAccessRegWord(sc, 0xF854, 0xBE00);
1336         MP_WriteMcuAccessRegWord(sc, 0xF856, 0x0298);
1337         MP_WriteMcuAccessRegWord(sc, 0xF858, 0x03DE);
1338         MP_WriteMcuAccessRegWord(sc, 0xF85A, 0xE434);
1339         MP_WriteMcuAccessRegWord(sc, 0xF85C, 0xE096);
1340         MP_WriteMcuAccessRegWord(sc, 0xF85E, 0xE860);
1341         MP_WriteMcuAccessRegWord(sc, 0xF860, 0xDE20);
1342         MP_WriteMcuAccessRegWord(sc, 0xF862, 0xD3C0);
1343         MP_WriteMcuAccessRegWord(sc, 0xF864, 0xC602);
1344         MP_WriteMcuAccessRegWord(sc, 0xF866, 0xBE00);
1345         MP_WriteMcuAccessRegWord(sc, 0xF868, 0x0A64);
1346         MP_WriteMcuAccessRegWord(sc, 0xF86A, 0xC707);
1347         MP_WriteMcuAccessRegWord(sc, 0xF86C, 0x1D00);
1348         MP_WriteMcuAccessRegWord(sc, 0xF86E, 0x8DE2);
1349         MP_WriteMcuAccessRegWord(sc, 0xF870, 0x48C1);
1350         MP_WriteMcuAccessRegWord(sc, 0xF872, 0xC502);
1351         MP_WriteMcuAccessRegWord(sc, 0xF874, 0xBD00);
1352         MP_WriteMcuAccessRegWord(sc, 0xF876, 0x00AA);
1353         MP_WriteMcuAccessRegWord(sc, 0xF878, 0xE0C0);
1354         MP_WriteMcuAccessRegWord(sc, 0xF87A, 0xC502);
1355         MP_WriteMcuAccessRegWord(sc, 0xF87C, 0xBD00);
1356         MP_WriteMcuAccessRegWord(sc, 0xF87E, 0x0132);
1357         MP_WriteMcuAccessRegWord(sc, 0xF880, 0xC50C);
1358         MP_WriteMcuAccessRegWord(sc, 0xF882, 0x74A2);
1359         MP_WriteMcuAccessRegWord(sc, 0xF884, 0x49CE);
1360         MP_WriteMcuAccessRegWord(sc, 0xF886, 0xF1FE);
1361         MP_WriteMcuAccessRegWord(sc, 0xF888, 0x1C00);
1362         MP_WriteMcuAccessRegWord(sc, 0xF88A, 0x9EA0);
1363         MP_WriteMcuAccessRegWord(sc, 0xF88C, 0x1C1C);
1364         MP_WriteMcuAccessRegWord(sc, 0xF88E, 0x484F);
1365         MP_WriteMcuAccessRegWord(sc, 0xF890, 0x9CA2);
1366         MP_WriteMcuAccessRegWord(sc, 0xF892, 0xC402);
1367         MP_WriteMcuAccessRegWord(sc, 0xF894, 0xBC00);
1368         MP_WriteMcuAccessRegWord(sc, 0xF896, 0x0AFA);
1369         MP_WriteMcuAccessRegWord(sc, 0xF898, 0xDE20);
1370         MP_WriteMcuAccessRegWord(sc, 0xF89A, 0xE000);
1371         MP_WriteMcuAccessRegWord(sc, 0xF89C, 0xE092);
1372         MP_WriteMcuAccessRegWord(sc, 0xF89E, 0xE430);
1373         MP_WriteMcuAccessRegWord(sc, 0xF8A0, 0xDE20);
1374         MP_WriteMcuAccessRegWord(sc, 0xF8A2, 0xE0C0);
1375         MP_WriteMcuAccessRegWord(sc, 0xF8A4, 0xE860);
1376         MP_WriteMcuAccessRegWord(sc, 0xF8A6, 0xE84C);
1377         MP_WriteMcuAccessRegWord(sc, 0xF8A8, 0xB400);
1378         MP_WriteMcuAccessRegWord(sc, 0xF8AA, 0xB430);
1379         MP_WriteMcuAccessRegWord(sc, 0xF8AC, 0xE410);
1380         MP_WriteMcuAccessRegWord(sc, 0xF8AE, 0xC0AE);
1381         MP_WriteMcuAccessRegWord(sc, 0xF8B0, 0xB407);
1382         MP_WriteMcuAccessRegWord(sc, 0xF8B2, 0xB406);
1383         MP_WriteMcuAccessRegWord(sc, 0xF8B4, 0xB405);
1384         MP_WriteMcuAccessRegWord(sc, 0xF8B6, 0xB404);
1385         MP_WriteMcuAccessRegWord(sc, 0xF8B8, 0xB403);
1386         MP_WriteMcuAccessRegWord(sc, 0xF8BA, 0xB402);
1387         MP_WriteMcuAccessRegWord(sc, 0xF8BC, 0xB401);
1388         MP_WriteMcuAccessRegWord(sc, 0xF8BE, 0xC7EE);
1389         MP_WriteMcuAccessRegWord(sc, 0xF8C0, 0x76F4);
1390         MP_WriteMcuAccessRegWord(sc, 0xF8C2, 0xC2ED);
1391         MP_WriteMcuAccessRegWord(sc, 0xF8C4, 0xC3ED);
1392         MP_WriteMcuAccessRegWord(sc, 0xF8C6, 0xC1EF);
1393         MP_WriteMcuAccessRegWord(sc, 0xF8C8, 0xC5F3);
1394         MP_WriteMcuAccessRegWord(sc, 0xF8CA, 0x74A0);
1395         MP_WriteMcuAccessRegWord(sc, 0xF8CC, 0x49CD);
1396         MP_WriteMcuAccessRegWord(sc, 0xF8CE, 0xF001);
1397         MP_WriteMcuAccessRegWord(sc, 0xF8D0, 0xC5EE);
1398         MP_WriteMcuAccessRegWord(sc, 0xF8D2, 0x74A0);
1399         MP_WriteMcuAccessRegWord(sc, 0xF8D4, 0x49C1);
1400         MP_WriteMcuAccessRegWord(sc, 0xF8D6, 0xF105);
1401         MP_WriteMcuAccessRegWord(sc, 0xF8D8, 0xC5E4);
1402         MP_WriteMcuAccessRegWord(sc, 0xF8DA, 0x74A2);
1403         MP_WriteMcuAccessRegWord(sc, 0xF8DC, 0x49CE);
1404         MP_WriteMcuAccessRegWord(sc, 0xF8DE, 0xF00B);
1405         MP_WriteMcuAccessRegWord(sc, 0xF8E0, 0x7444);
1406         MP_WriteMcuAccessRegWord(sc, 0xF8E2, 0x484B);
1407         MP_WriteMcuAccessRegWord(sc, 0xF8E4, 0x9C44);
1408         MP_WriteMcuAccessRegWord(sc, 0xF8E6, 0x1C10);
1409         MP_WriteMcuAccessRegWord(sc, 0xF8E8, 0x9C62);
1410         MP_WriteMcuAccessRegWord(sc, 0xF8EA, 0x1C11);
1411         MP_WriteMcuAccessRegWord(sc, 0xF8EC, 0x8C60);
1412         MP_WriteMcuAccessRegWord(sc, 0xF8EE, 0x1C00);
1413         MP_WriteMcuAccessRegWord(sc, 0xF8F0, 0x9CF6);
1414         MP_WriteMcuAccessRegWord(sc, 0xF8F2, 0xE0EC);
1415         MP_WriteMcuAccessRegWord(sc, 0xF8F4, 0x49E7);
1416         MP_WriteMcuAccessRegWord(sc, 0xF8F6, 0xF016);
1417         MP_WriteMcuAccessRegWord(sc, 0xF8F8, 0x1D80);
1418         MP_WriteMcuAccessRegWord(sc, 0xF8FA, 0x8DF4);
1419         MP_WriteMcuAccessRegWord(sc, 0xF8FC, 0x74F8);
1420         MP_WriteMcuAccessRegWord(sc, 0xF8FE, 0x4843);
1421         MP_WriteMcuAccessRegWord(sc, 0xF900, 0x8CF8);
1422         MP_WriteMcuAccessRegWord(sc, 0xF902, 0x74F8);
1423         MP_WriteMcuAccessRegWord(sc, 0xF904, 0x74F8);
1424         MP_WriteMcuAccessRegWord(sc, 0xF906, 0x7444);
1425         MP_WriteMcuAccessRegWord(sc, 0xF908, 0x48C8);
1426         MP_WriteMcuAccessRegWord(sc, 0xF90A, 0x48C9);
1427         MP_WriteMcuAccessRegWord(sc, 0xF90C, 0x48CA);
1428         MP_WriteMcuAccessRegWord(sc, 0xF90E, 0x9C44);
1429         MP_WriteMcuAccessRegWord(sc, 0xF910, 0x74F8);
1430         MP_WriteMcuAccessRegWord(sc, 0xF912, 0x4844);
1431         MP_WriteMcuAccessRegWord(sc, 0xF914, 0x8CF8);
1432         MP_WriteMcuAccessRegWord(sc, 0xF916, 0x1E01);
1433         MP_WriteMcuAccessRegWord(sc, 0xF918, 0xE8DB);
1434         MP_WriteMcuAccessRegWord(sc, 0xF91A, 0x7420);
1435         MP_WriteMcuAccessRegWord(sc, 0xF91C, 0x48C1);
1436         MP_WriteMcuAccessRegWord(sc, 0xF91E, 0x9C20);
1437         MP_WriteMcuAccessRegWord(sc, 0xF920, 0xE0D5);
1438         MP_WriteMcuAccessRegWord(sc, 0xF922, 0x49E6);
1439         MP_WriteMcuAccessRegWord(sc, 0xF924, 0xF02A);
1440         MP_WriteMcuAccessRegWord(sc, 0xF926, 0x1D40);
1441         MP_WriteMcuAccessRegWord(sc, 0xF928, 0x8DF4);
1442         MP_WriteMcuAccessRegWord(sc, 0xF92A, 0x74FC);
1443         MP_WriteMcuAccessRegWord(sc, 0xF92C, 0x49C0);
1444         MP_WriteMcuAccessRegWord(sc, 0xF92E, 0xF124);
1445         MP_WriteMcuAccessRegWord(sc, 0xF930, 0x49C1);
1446         MP_WriteMcuAccessRegWord(sc, 0xF932, 0xF122);
1447         MP_WriteMcuAccessRegWord(sc, 0xF934, 0x74F8);
1448         MP_WriteMcuAccessRegWord(sc, 0xF936, 0x49C0);
1449         MP_WriteMcuAccessRegWord(sc, 0xF938, 0xF01F);
1450         MP_WriteMcuAccessRegWord(sc, 0xF93A, 0xE8D3);
1451         MP_WriteMcuAccessRegWord(sc, 0xF93C, 0x48C4);
1452         MP_WriteMcuAccessRegWord(sc, 0xF93E, 0x8CF8);
1453         MP_WriteMcuAccessRegWord(sc, 0xF940, 0x1E00);
1454         MP_WriteMcuAccessRegWord(sc, 0xF942, 0xE8C6);
1455         MP_WriteMcuAccessRegWord(sc, 0xF944, 0xC5B1);
1456         MP_WriteMcuAccessRegWord(sc, 0xF946, 0x74A0);
1457         MP_WriteMcuAccessRegWord(sc, 0xF948, 0x49C3);
1458         MP_WriteMcuAccessRegWord(sc, 0xF94A, 0xF016);
1459         MP_WriteMcuAccessRegWord(sc, 0xF94C, 0xC5AF);
1460         MP_WriteMcuAccessRegWord(sc, 0xF94E, 0x74A4);
1461         MP_WriteMcuAccessRegWord(sc, 0xF950, 0x49C2);
1462         MP_WriteMcuAccessRegWord(sc, 0xF952, 0xF005);
1463         MP_WriteMcuAccessRegWord(sc, 0xF954, 0xC5AA);
1464         MP_WriteMcuAccessRegWord(sc, 0xF956, 0x74B2);
1465         MP_WriteMcuAccessRegWord(sc, 0xF958, 0x49C9);
1466         MP_WriteMcuAccessRegWord(sc, 0xF95A, 0xF10E);
1467         MP_WriteMcuAccessRegWord(sc, 0xF95C, 0xC5A6);
1468         MP_WriteMcuAccessRegWord(sc, 0xF95E, 0x74A8);
1469         MP_WriteMcuAccessRegWord(sc, 0xF960, 0x4845);
1470         MP_WriteMcuAccessRegWord(sc, 0xF962, 0x4846);
1471         MP_WriteMcuAccessRegWord(sc, 0xF964, 0x4847);
1472         MP_WriteMcuAccessRegWord(sc, 0xF966, 0x4848);
1473         MP_WriteMcuAccessRegWord(sc, 0xF968, 0x9CA8);
1474         MP_WriteMcuAccessRegWord(sc, 0xF96A, 0x74B2);
1475         MP_WriteMcuAccessRegWord(sc, 0xF96C, 0x4849);
1476         MP_WriteMcuAccessRegWord(sc, 0xF96E, 0x9CB2);
1477         MP_WriteMcuAccessRegWord(sc, 0xF970, 0x74A0);
1478         MP_WriteMcuAccessRegWord(sc, 0xF972, 0x484F);
1479         MP_WriteMcuAccessRegWord(sc, 0xF974, 0x9CA0);
1480         MP_WriteMcuAccessRegWord(sc, 0xF976, 0xE0AA);
1481         MP_WriteMcuAccessRegWord(sc, 0xF978, 0x49E4);
1482         MP_WriteMcuAccessRegWord(sc, 0xF97A, 0xF018);
1483         MP_WriteMcuAccessRegWord(sc, 0xF97C, 0x1D10);
1484         MP_WriteMcuAccessRegWord(sc, 0xF97E, 0x8DF4);
1485         MP_WriteMcuAccessRegWord(sc, 0xF980, 0x74F8);
1486         MP_WriteMcuAccessRegWord(sc, 0xF982, 0x74F8);
1487         MP_WriteMcuAccessRegWord(sc, 0xF984, 0x74F8);
1488         MP_WriteMcuAccessRegWord(sc, 0xF986, 0x4843);
1489         MP_WriteMcuAccessRegWord(sc, 0xF988, 0x8CF8);
1490         MP_WriteMcuAccessRegWord(sc, 0xF98A, 0x74F8);
1491         MP_WriteMcuAccessRegWord(sc, 0xF98C, 0x74F8);
1492         MP_WriteMcuAccessRegWord(sc, 0xF98E, 0x74F8);
1493         MP_WriteMcuAccessRegWord(sc, 0xF990, 0x4844);
1494         MP_WriteMcuAccessRegWord(sc, 0xF992, 0x4842);
1495         MP_WriteMcuAccessRegWord(sc, 0xF994, 0x4841);
1496         MP_WriteMcuAccessRegWord(sc, 0xF996, 0x8CF8);
1497         MP_WriteMcuAccessRegWord(sc, 0xF998, 0x1E01);
1498         MP_WriteMcuAccessRegWord(sc, 0xF99A, 0xE89A);
1499         MP_WriteMcuAccessRegWord(sc, 0xF99C, 0x7420);
1500         MP_WriteMcuAccessRegWord(sc, 0xF99E, 0x4841);
1501         MP_WriteMcuAccessRegWord(sc, 0xF9A0, 0x9C20);
1502         MP_WriteMcuAccessRegWord(sc, 0xF9A2, 0x7444);
1503         MP_WriteMcuAccessRegWord(sc, 0xF9A4, 0x4848);
1504         MP_WriteMcuAccessRegWord(sc, 0xF9A6, 0x9C44);
1505         MP_WriteMcuAccessRegWord(sc, 0xF9A8, 0xE091);
1506         MP_WriteMcuAccessRegWord(sc, 0xF9AA, 0x49E5);
1507         MP_WriteMcuAccessRegWord(sc, 0xF9AC, 0xF03E);
1508         MP_WriteMcuAccessRegWord(sc, 0xF9AE, 0x1D20);
1509         MP_WriteMcuAccessRegWord(sc, 0xF9B0, 0x8DF4);
1510         MP_WriteMcuAccessRegWord(sc, 0xF9B2, 0x74F8);
1511         MP_WriteMcuAccessRegWord(sc, 0xF9B4, 0x48C2);
1512         MP_WriteMcuAccessRegWord(sc, 0xF9B6, 0x4841);
1513         MP_WriteMcuAccessRegWord(sc, 0xF9B8, 0x8CF8);
1514         MP_WriteMcuAccessRegWord(sc, 0xF9BA, 0x1E01);
1515         MP_WriteMcuAccessRegWord(sc, 0xF9BC, 0x7444);
1516         MP_WriteMcuAccessRegWord(sc, 0xF9BE, 0x49CA);
1517         MP_WriteMcuAccessRegWord(sc, 0xF9C0, 0xF103);
1518         MP_WriteMcuAccessRegWord(sc, 0xF9C2, 0x49C2);
1519         MP_WriteMcuAccessRegWord(sc, 0xF9C4, 0xF00C);
1520         MP_WriteMcuAccessRegWord(sc, 0xF9C6, 0x49C1);
1521         MP_WriteMcuAccessRegWord(sc, 0xF9C8, 0xF004);
1522         MP_WriteMcuAccessRegWord(sc, 0xF9CA, 0x6447);
1523         MP_WriteMcuAccessRegWord(sc, 0xF9CC, 0x2244);
1524         MP_WriteMcuAccessRegWord(sc, 0xF9CE, 0xE002);
1525         MP_WriteMcuAccessRegWord(sc, 0xF9D0, 0x1C01);
1526         MP_WriteMcuAccessRegWord(sc, 0xF9D2, 0x9C62);
1527         MP_WriteMcuAccessRegWord(sc, 0xF9D4, 0x1C11);
1528         MP_WriteMcuAccessRegWord(sc, 0xF9D6, 0x8C60);
1529         MP_WriteMcuAccessRegWord(sc, 0xF9D8, 0x1C00);
1530         MP_WriteMcuAccessRegWord(sc, 0xF9DA, 0x9CF6);
1531         MP_WriteMcuAccessRegWord(sc, 0xF9DC, 0x7444);
1532         MP_WriteMcuAccessRegWord(sc, 0xF9DE, 0x49C8);
1533         MP_WriteMcuAccessRegWord(sc, 0xF9E0, 0xF01D);
1534         MP_WriteMcuAccessRegWord(sc, 0xF9E2, 0x74FC);
1535         MP_WriteMcuAccessRegWord(sc, 0xF9E4, 0x49C0);
1536         MP_WriteMcuAccessRegWord(sc, 0xF9E6, 0xF11A);
1537         MP_WriteMcuAccessRegWord(sc, 0xF9E8, 0x49C1);
1538         MP_WriteMcuAccessRegWord(sc, 0xF9EA, 0xF118);
1539         MP_WriteMcuAccessRegWord(sc, 0xF9EC, 0x74F8);
1540         MP_WriteMcuAccessRegWord(sc, 0xF9EE, 0x49C0);
1541         MP_WriteMcuAccessRegWord(sc, 0xF9F0, 0xF015);
1542         MP_WriteMcuAccessRegWord(sc, 0xF9F2, 0x49C6);
1543         MP_WriteMcuAccessRegWord(sc, 0xF9F4, 0xF113);
1544         MP_WriteMcuAccessRegWord(sc, 0xF9F6, 0xE875);
1545         MP_WriteMcuAccessRegWord(sc, 0xF9F8, 0x48C4);
1546         MP_WriteMcuAccessRegWord(sc, 0xF9FA, 0x8CF8);
1547         MP_WriteMcuAccessRegWord(sc, 0xF9FC, 0x7420);
1548         MP_WriteMcuAccessRegWord(sc, 0xF9FE, 0x48C1);
1549         MP_WriteMcuAccessRegWord(sc, 0xFA00, 0x9C20);
1550         MP_WriteMcuAccessRegWord(sc, 0xFA02, 0xC50A);
1551         MP_WriteMcuAccessRegWord(sc, 0xFA04, 0x74A2);
1552         MP_WriteMcuAccessRegWord(sc, 0xFA06, 0x8CA5);
1553         MP_WriteMcuAccessRegWord(sc, 0xFA08, 0x74A0);
1554         MP_WriteMcuAccessRegWord(sc, 0xFA0A, 0xC505);
1555         MP_WriteMcuAccessRegWord(sc, 0xFA0C, 0x9CA2);
1556         MP_WriteMcuAccessRegWord(sc, 0xFA0E, 0x1C11);
1557         MP_WriteMcuAccessRegWord(sc, 0xFA10, 0x9CA0);
1558         MP_WriteMcuAccessRegWord(sc, 0xFA12, 0xE00A);
1559         MP_WriteMcuAccessRegWord(sc, 0xFA14, 0xE434);
1560         MP_WriteMcuAccessRegWord(sc, 0xFA16, 0xD3C0);
1561         MP_WriteMcuAccessRegWord(sc, 0xFA18, 0xDC00);
1562         MP_WriteMcuAccessRegWord(sc, 0xFA1A, 0x7444);
1563         MP_WriteMcuAccessRegWord(sc, 0xFA1C, 0x49CA);
1564         MP_WriteMcuAccessRegWord(sc, 0xFA1E, 0xF004);
1565         MP_WriteMcuAccessRegWord(sc, 0xFA20, 0x48CA);
1566         MP_WriteMcuAccessRegWord(sc, 0xFA22, 0x9C44);
1567         MP_WriteMcuAccessRegWord(sc, 0xFA24, 0xE855);
1568         MP_WriteMcuAccessRegWord(sc, 0xFA26, 0xE052);
1569         MP_WriteMcuAccessRegWord(sc, 0xFA28, 0x49E8);
1570         MP_WriteMcuAccessRegWord(sc, 0xFA2A, 0xF024);
1571         MP_WriteMcuAccessRegWord(sc, 0xFA2C, 0x1D01);
1572         MP_WriteMcuAccessRegWord(sc, 0xFA2E, 0x8DF5);
1573         MP_WriteMcuAccessRegWord(sc, 0xFA30, 0x7440);
1574         MP_WriteMcuAccessRegWord(sc, 0xFA32, 0x49C0);
1575         MP_WriteMcuAccessRegWord(sc, 0xFA34, 0xF11E);
1576         MP_WriteMcuAccessRegWord(sc, 0xFA36, 0x7444);
1577         MP_WriteMcuAccessRegWord(sc, 0xFA38, 0x49C8);
1578         MP_WriteMcuAccessRegWord(sc, 0xFA3A, 0xF01B);
1579         MP_WriteMcuAccessRegWord(sc, 0xFA3C, 0x49CA);
1580         MP_WriteMcuAccessRegWord(sc, 0xFA3E, 0xF119);
1581         MP_WriteMcuAccessRegWord(sc, 0xFA40, 0xC5EC);
1582         MP_WriteMcuAccessRegWord(sc, 0xFA42, 0x76A4);
1583         MP_WriteMcuAccessRegWord(sc, 0xFA44, 0x49E3);
1584         MP_WriteMcuAccessRegWord(sc, 0xFA46, 0xF015);
1585         MP_WriteMcuAccessRegWord(sc, 0xFA48, 0x49C0);
1586         MP_WriteMcuAccessRegWord(sc, 0xFA4A, 0xF103);
1587         MP_WriteMcuAccessRegWord(sc, 0xFA4C, 0x49C1);
1588         MP_WriteMcuAccessRegWord(sc, 0xFA4E, 0xF011);
1589         MP_WriteMcuAccessRegWord(sc, 0xFA50, 0x4849);
1590         MP_WriteMcuAccessRegWord(sc, 0xFA52, 0x9C44);
1591         MP_WriteMcuAccessRegWord(sc, 0xFA54, 0x1C00);
1592         MP_WriteMcuAccessRegWord(sc, 0xFA56, 0x9CF6);
1593         MP_WriteMcuAccessRegWord(sc, 0xFA58, 0x7444);
1594         MP_WriteMcuAccessRegWord(sc, 0xFA5A, 0x49C1);
1595         MP_WriteMcuAccessRegWord(sc, 0xFA5C, 0xF004);
1596         MP_WriteMcuAccessRegWord(sc, 0xFA5E, 0x6446);
1597         MP_WriteMcuAccessRegWord(sc, 0xFA60, 0x1E07);
1598         MP_WriteMcuAccessRegWord(sc, 0xFA62, 0xE003);
1599         MP_WriteMcuAccessRegWord(sc, 0xFA64, 0x1C01);
1600         MP_WriteMcuAccessRegWord(sc, 0xFA66, 0x1E03);
1601         MP_WriteMcuAccessRegWord(sc, 0xFA68, 0x9C62);
1602         MP_WriteMcuAccessRegWord(sc, 0xFA6A, 0x1C11);
1603         MP_WriteMcuAccessRegWord(sc, 0xFA6C, 0x8C60);
1604         MP_WriteMcuAccessRegWord(sc, 0xFA6E, 0xE830);
1605         MP_WriteMcuAccessRegWord(sc, 0xFA70, 0xE02D);
1606         MP_WriteMcuAccessRegWord(sc, 0xFA72, 0x49E9);
1607         MP_WriteMcuAccessRegWord(sc, 0xFA74, 0xF004);
1608         MP_WriteMcuAccessRegWord(sc, 0xFA76, 0x1D02);
1609         MP_WriteMcuAccessRegWord(sc, 0xFA78, 0x8DF5);
1610         MP_WriteMcuAccessRegWord(sc, 0xFA7A, 0xE79C);
1611         MP_WriteMcuAccessRegWord(sc, 0xFA7C, 0x49E3);
1612         MP_WriteMcuAccessRegWord(sc, 0xFA7E, 0xF006);
1613         MP_WriteMcuAccessRegWord(sc, 0xFA80, 0x1D08);
1614         MP_WriteMcuAccessRegWord(sc, 0xFA82, 0x8DF4);
1615         MP_WriteMcuAccessRegWord(sc, 0xFA84, 0x74F8);
1616         MP_WriteMcuAccessRegWord(sc, 0xFA86, 0x74F8);
1617         MP_WriteMcuAccessRegWord(sc, 0xFA88, 0xE73A);
1618         MP_WriteMcuAccessRegWord(sc, 0xFA8A, 0x49E1);
1619         MP_WriteMcuAccessRegWord(sc, 0xFA8C, 0xF007);
1620         MP_WriteMcuAccessRegWord(sc, 0xFA8E, 0x1D02);
1621         MP_WriteMcuAccessRegWord(sc, 0xFA90, 0x8DF4);
1622         MP_WriteMcuAccessRegWord(sc, 0xFA92, 0x1E01);
1623         MP_WriteMcuAccessRegWord(sc, 0xFA94, 0xE7A7);
1624         MP_WriteMcuAccessRegWord(sc, 0xFA96, 0xDE20);
1625         MP_WriteMcuAccessRegWord(sc, 0xFA98, 0xE410);
1626         MP_WriteMcuAccessRegWord(sc, 0xFA9A, 0x49E0);
1627         MP_WriteMcuAccessRegWord(sc, 0xFA9C, 0xF017);
1628         MP_WriteMcuAccessRegWord(sc, 0xFA9E, 0x1D01);
1629         MP_WriteMcuAccessRegWord(sc, 0xFAA0, 0x8DF4);
1630         MP_WriteMcuAccessRegWord(sc, 0xFAA2, 0xC5FA);
1631         MP_WriteMcuAccessRegWord(sc, 0xFAA4, 0x1C00);
1632         MP_WriteMcuAccessRegWord(sc, 0xFAA6, 0x8CA0);
1633         MP_WriteMcuAccessRegWord(sc, 0xFAA8, 0x1C1B);
1634         MP_WriteMcuAccessRegWord(sc, 0xFAAA, 0x9CA2);
1635         MP_WriteMcuAccessRegWord(sc, 0xFAAC, 0x74A2);
1636         MP_WriteMcuAccessRegWord(sc, 0xFAAE, 0x49CF);
1637         MP_WriteMcuAccessRegWord(sc, 0xFAB0, 0xF0FE);
1638         MP_WriteMcuAccessRegWord(sc, 0xFAB2, 0xC5F3);
1639         MP_WriteMcuAccessRegWord(sc, 0xFAB4, 0x74A0);
1640         MP_WriteMcuAccessRegWord(sc, 0xFAB6, 0x4849);
1641         MP_WriteMcuAccessRegWord(sc, 0xFAB8, 0x9CA0);
1642         MP_WriteMcuAccessRegWord(sc, 0xFABA, 0x74F8);
1643         MP_WriteMcuAccessRegWord(sc, 0xFABC, 0x49C0);
1644         MP_WriteMcuAccessRegWord(sc, 0xFABE, 0xF006);
1645         MP_WriteMcuAccessRegWord(sc, 0xFAC0, 0x48C3);
1646         MP_WriteMcuAccessRegWord(sc, 0xFAC2, 0x8CF8);
1647         MP_WriteMcuAccessRegWord(sc, 0xFAC4, 0xE820);
1648         MP_WriteMcuAccessRegWord(sc, 0xFAC6, 0x74F8);
1649         MP_WriteMcuAccessRegWord(sc, 0xFAC8, 0x74F8);
1650         MP_WriteMcuAccessRegWord(sc, 0xFACA, 0xC432);
1651         MP_WriteMcuAccessRegWord(sc, 0xFACC, 0xBC00);
1652         MP_WriteMcuAccessRegWord(sc, 0xFACE, 0xC5E4);
1653         MP_WriteMcuAccessRegWord(sc, 0xFAD0, 0x74A2);
1654         MP_WriteMcuAccessRegWord(sc, 0xFAD2, 0x49CE);
1655         MP_WriteMcuAccessRegWord(sc, 0xFAD4, 0xF1FE);
1656         MP_WriteMcuAccessRegWord(sc, 0xFAD6, 0x9EA0);
1657         MP_WriteMcuAccessRegWord(sc, 0xFAD8, 0x1C1C);
1658         MP_WriteMcuAccessRegWord(sc, 0xFADA, 0x484F);
1659         MP_WriteMcuAccessRegWord(sc, 0xFADC, 0x9CA2);
1660         MP_WriteMcuAccessRegWord(sc, 0xFADE, 0xFF80);
1661         MP_WriteMcuAccessRegWord(sc, 0xFAE0, 0xB404);
1662         MP_WriteMcuAccessRegWord(sc, 0xFAE2, 0xB405);
1663         MP_WriteMcuAccessRegWord(sc, 0xFAE4, 0xC5D9);
1664         MP_WriteMcuAccessRegWord(sc, 0xFAE6, 0x74A2);
1665         MP_WriteMcuAccessRegWord(sc, 0xFAE8, 0x49CE);
1666         MP_WriteMcuAccessRegWord(sc, 0xFAEA, 0xF1FE);
1667         MP_WriteMcuAccessRegWord(sc, 0xFAEC, 0xC41F);
1668         MP_WriteMcuAccessRegWord(sc, 0xFAEE, 0x9CA0);
1669         MP_WriteMcuAccessRegWord(sc, 0xFAF0, 0xC41C);
1670         MP_WriteMcuAccessRegWord(sc, 0xFAF2, 0x1C13);
1671         MP_WriteMcuAccessRegWord(sc, 0xFAF4, 0x484F);
1672         MP_WriteMcuAccessRegWord(sc, 0xFAF6, 0x9CA2);
1673         MP_WriteMcuAccessRegWord(sc, 0xFAF8, 0x74A2);
1674         MP_WriteMcuAccessRegWord(sc, 0xFAFA, 0x49CF);
1675         MP_WriteMcuAccessRegWord(sc, 0xFAFC, 0xF1FE);
1676         MP_WriteMcuAccessRegWord(sc, 0xFAFE, 0xB005);
1677         MP_WriteMcuAccessRegWord(sc, 0xFB00, 0xB004);
1678         MP_WriteMcuAccessRegWord(sc, 0xFB02, 0xFF80);
1679         MP_WriteMcuAccessRegWord(sc, 0xFB04, 0xB404);
1680         MP_WriteMcuAccessRegWord(sc, 0xFB06, 0xB405);
1681         MP_WriteMcuAccessRegWord(sc, 0xFB08, 0xC5C7);
1682         MP_WriteMcuAccessRegWord(sc, 0xFB0A, 0x74A2);
1683         MP_WriteMcuAccessRegWord(sc, 0xFB0C, 0x49CE);
1684         MP_WriteMcuAccessRegWord(sc, 0xFB0E, 0xF1FE);
1685         MP_WriteMcuAccessRegWord(sc, 0xFB10, 0xC40E);
1686         MP_WriteMcuAccessRegWord(sc, 0xFB12, 0x9CA0);
1687         MP_WriteMcuAccessRegWord(sc, 0xFB14, 0xC40A);
1688         MP_WriteMcuAccessRegWord(sc, 0xFB16, 0x1C13);
1689         MP_WriteMcuAccessRegWord(sc, 0xFB18, 0x484F);
1690         MP_WriteMcuAccessRegWord(sc, 0xFB1A, 0x9CA2);
1691         MP_WriteMcuAccessRegWord(sc, 0xFB1C, 0x74A2);
1692         MP_WriteMcuAccessRegWord(sc, 0xFB1E, 0x49CF);
1693         MP_WriteMcuAccessRegWord(sc, 0xFB20, 0xF1FE);
1694         MP_WriteMcuAccessRegWord(sc, 0xFB22, 0xB005);
1695         MP_WriteMcuAccessRegWord(sc, 0xFB24, 0xB004);
1696         MP_WriteMcuAccessRegWord(sc, 0xFB26, 0xFF80);
1697         MP_WriteMcuAccessRegWord(sc, 0xFB28, 0x0000);
1698         MP_WriteMcuAccessRegWord(sc, 0xFB2A, 0x0481);
1699         MP_WriteMcuAccessRegWord(sc, 0xFB2C, 0x0C81);
1700         MP_WriteMcuAccessRegWord(sc, 0xFB2E, 0x0AE0);
1701 
1702         MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
1703 
1704         MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x0000);
1705         MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x0000);
1706         MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x0297);
1707         MP_WriteMcuAccessRegWord(sc, 0xFC2E, 0x0000);
1708         MP_WriteMcuAccessRegWord(sc, 0xFC30, 0x00A9);
1709         MP_WriteMcuAccessRegWord(sc, 0xFC32, 0x012D);
1710         MP_WriteMcuAccessRegWord(sc, 0xFC34, 0x0000);
1711         MP_WriteMcuAccessRegWord(sc, 0xFC36, 0x08DF);
1712 }
1713 
1714 static void re_set_mac_mcu_8411b_1(struct re_softc *sc)
1715 {
1716         DisableMcuBPs(sc);
1717 
1718         MP_WriteMcuAccessRegWord(sc, 0xF800, 0xE008);
1719         MP_WriteMcuAccessRegWord(sc, 0xF802, 0xE00A);
1720         MP_WriteMcuAccessRegWord(sc, 0xF804, 0xE00C);
1721         MP_WriteMcuAccessRegWord(sc, 0xF806, 0xE00E);
1722         MP_WriteMcuAccessRegWord(sc, 0xF808, 0xE027);
1723         MP_WriteMcuAccessRegWord(sc, 0xF80A, 0xE04F);
1724         MP_WriteMcuAccessRegWord(sc, 0xF80C, 0xE05E);
1725         MP_WriteMcuAccessRegWord(sc, 0xF80E, 0xE065);
1726         MP_WriteMcuAccessRegWord(sc, 0xF810, 0xC602);
1727         MP_WriteMcuAccessRegWord(sc, 0xF812, 0xBE00);
1728         MP_WriteMcuAccessRegWord(sc, 0xF814, 0x0000);
1729         MP_WriteMcuAccessRegWord(sc, 0xF816, 0xC502);
1730         MP_WriteMcuAccessRegWord(sc, 0xF818, 0xBD00);
1731         MP_WriteMcuAccessRegWord(sc, 0xF81A, 0x074C);
1732         MP_WriteMcuAccessRegWord(sc, 0xF81C, 0xC302);
1733         MP_WriteMcuAccessRegWord(sc, 0xF81E, 0xBB00);
1734         MP_WriteMcuAccessRegWord(sc, 0xF820, 0x080A);
1735         MP_WriteMcuAccessRegWord(sc, 0xF822, 0x6420);
1736         MP_WriteMcuAccessRegWord(sc, 0xF824, 0x48C2);
1737         MP_WriteMcuAccessRegWord(sc, 0xF826, 0x8C20);
1738         MP_WriteMcuAccessRegWord(sc, 0xF828, 0xC516);
1739         MP_WriteMcuAccessRegWord(sc, 0xF82A, 0x64A4);
1740         MP_WriteMcuAccessRegWord(sc, 0xF82C, 0x49C0);
1741         MP_WriteMcuAccessRegWord(sc, 0xF82E, 0xF009);
1742         MP_WriteMcuAccessRegWord(sc, 0xF830, 0x74A2);
1743         MP_WriteMcuAccessRegWord(sc, 0xF832, 0x8CA5);
1744         MP_WriteMcuAccessRegWord(sc, 0xF834, 0x74A0);
1745         MP_WriteMcuAccessRegWord(sc, 0xF836, 0xC50E);
1746         MP_WriteMcuAccessRegWord(sc, 0xF838, 0x9CA2);
1747         MP_WriteMcuAccessRegWord(sc, 0xF83A, 0x1C11);
1748         MP_WriteMcuAccessRegWord(sc, 0xF83C, 0x9CA0);
1749         MP_WriteMcuAccessRegWord(sc, 0xF83E, 0xE006);
1750         MP_WriteMcuAccessRegWord(sc, 0xF840, 0x74F8);
1751         MP_WriteMcuAccessRegWord(sc, 0xF842, 0x48C4);
1752         MP_WriteMcuAccessRegWord(sc, 0xF844, 0x8CF8);
1753         MP_WriteMcuAccessRegWord(sc, 0xF846, 0xC404);
1754         MP_WriteMcuAccessRegWord(sc, 0xF848, 0xBC00);
1755         MP_WriteMcuAccessRegWord(sc, 0xF84A, 0xC403);
1756         MP_WriteMcuAccessRegWord(sc, 0xF84C, 0xBC00);
1757         MP_WriteMcuAccessRegWord(sc, 0xF84E, 0x0BF2);
1758         MP_WriteMcuAccessRegWord(sc, 0xF850, 0x0C0A);
1759         MP_WriteMcuAccessRegWord(sc, 0xF852, 0xE434);
1760         MP_WriteMcuAccessRegWord(sc, 0xF854, 0xD3C0);
1761         MP_WriteMcuAccessRegWord(sc, 0xF856, 0x49D9);
1762         MP_WriteMcuAccessRegWord(sc, 0xF858, 0xF01F);
1763         MP_WriteMcuAccessRegWord(sc, 0xF85A, 0xC526);
1764         MP_WriteMcuAccessRegWord(sc, 0xF85C, 0x64A5);
1765         MP_WriteMcuAccessRegWord(sc, 0xF85E, 0x1400);
1766         MP_WriteMcuAccessRegWord(sc, 0xF860, 0xF007);
1767         MP_WriteMcuAccessRegWord(sc, 0xF862, 0x0C01);
1768         MP_WriteMcuAccessRegWord(sc, 0xF864, 0x8CA5);
1769         MP_WriteMcuAccessRegWord(sc, 0xF866, 0x1C15);
1770         MP_WriteMcuAccessRegWord(sc, 0xF868, 0xC51B);
1771         MP_WriteMcuAccessRegWord(sc, 0xF86A, 0x9CA0);
1772         MP_WriteMcuAccessRegWord(sc, 0xF86C, 0xE013);
1773         MP_WriteMcuAccessRegWord(sc, 0xF86E, 0xC519);
1774         MP_WriteMcuAccessRegWord(sc, 0xF870, 0x74A0);
1775         MP_WriteMcuAccessRegWord(sc, 0xF872, 0x48C4);
1776         MP_WriteMcuAccessRegWord(sc, 0xF874, 0x8CA0);
1777         MP_WriteMcuAccessRegWord(sc, 0xF876, 0xC516);
1778         MP_WriteMcuAccessRegWord(sc, 0xF878, 0x74A4);
1779         MP_WriteMcuAccessRegWord(sc, 0xF87A, 0x48C8);
1780         MP_WriteMcuAccessRegWord(sc, 0xF87C, 0x48CA);
1781         MP_WriteMcuAccessRegWord(sc, 0xF87E, 0x9CA4);
1782         MP_WriteMcuAccessRegWord(sc, 0xF880, 0xC512);
1783         MP_WriteMcuAccessRegWord(sc, 0xF882, 0x1B00);
1784         MP_WriteMcuAccessRegWord(sc, 0xF884, 0x9BA0);
1785         MP_WriteMcuAccessRegWord(sc, 0xF886, 0x1B1C);
1786         MP_WriteMcuAccessRegWord(sc, 0xF888, 0x483F);
1787         MP_WriteMcuAccessRegWord(sc, 0xF88A, 0x9BA2);
1788         MP_WriteMcuAccessRegWord(sc, 0xF88C, 0x1B04);
1789         MP_WriteMcuAccessRegWord(sc, 0xF88E, 0xC508);
1790         MP_WriteMcuAccessRegWord(sc, 0xF890, 0x9BA0);
1791         MP_WriteMcuAccessRegWord(sc, 0xF892, 0xC505);
1792         MP_WriteMcuAccessRegWord(sc, 0xF894, 0xBD00);
1793         MP_WriteMcuAccessRegWord(sc, 0xF896, 0xC502);
1794         MP_WriteMcuAccessRegWord(sc, 0xF898, 0xBD00);
1795         MP_WriteMcuAccessRegWord(sc, 0xF89A, 0x0300);
1796         MP_WriteMcuAccessRegWord(sc, 0xF89C, 0x051E);
1797         MP_WriteMcuAccessRegWord(sc, 0xF89E, 0xE434);
1798         MP_WriteMcuAccessRegWord(sc, 0xF8A0, 0xE018);
1799         MP_WriteMcuAccessRegWord(sc, 0xF8A2, 0xE092);
1800         MP_WriteMcuAccessRegWord(sc, 0xF8A4, 0xDE20);
1801         MP_WriteMcuAccessRegWord(sc, 0xF8A6, 0xD3C0);
1802         MP_WriteMcuAccessRegWord(sc, 0xF8A8, 0xC50F);
1803         MP_WriteMcuAccessRegWord(sc, 0xF8AA, 0x76A4);
1804         MP_WriteMcuAccessRegWord(sc, 0xF8AC, 0x49E3);
1805         MP_WriteMcuAccessRegWord(sc, 0xF8AE, 0xF007);
1806         MP_WriteMcuAccessRegWord(sc, 0xF8B0, 0x49C0);
1807         MP_WriteMcuAccessRegWord(sc, 0xF8B2, 0xF103);
1808         MP_WriteMcuAccessRegWord(sc, 0xF8B4, 0xC607);
1809         MP_WriteMcuAccessRegWord(sc, 0xF8B6, 0xBE00);
1810         MP_WriteMcuAccessRegWord(sc, 0xF8B8, 0xC606);
1811         MP_WriteMcuAccessRegWord(sc, 0xF8BA, 0xBE00);
1812         MP_WriteMcuAccessRegWord(sc, 0xF8BC, 0xC602);
1813         MP_WriteMcuAccessRegWord(sc, 0xF8BE, 0xBE00);
1814         MP_WriteMcuAccessRegWord(sc, 0xF8C0, 0x0C4C);
1815         MP_WriteMcuAccessRegWord(sc, 0xF8C2, 0x0C28);
1816         MP_WriteMcuAccessRegWord(sc, 0xF8C4, 0x0C2C);
1817         MP_WriteMcuAccessRegWord(sc, 0xF8C6, 0xDC00);
1818         MP_WriteMcuAccessRegWord(sc, 0xF8C8, 0xC707);
1819         MP_WriteMcuAccessRegWord(sc, 0xF8CA, 0x1D00);
1820         MP_WriteMcuAccessRegWord(sc, 0xF8CC, 0x8DE2);
1821         MP_WriteMcuAccessRegWord(sc, 0xF8CE, 0x48C1);
1822         MP_WriteMcuAccessRegWord(sc, 0xF8D0, 0xC502);
1823         MP_WriteMcuAccessRegWord(sc, 0xF8D2, 0xBD00);
1824         MP_WriteMcuAccessRegWord(sc, 0xF8D4, 0x00AA);
1825         MP_WriteMcuAccessRegWord(sc, 0xF8D6, 0xE0C0);
1826         MP_WriteMcuAccessRegWord(sc, 0xF8D8, 0xC502);
1827         MP_WriteMcuAccessRegWord(sc, 0xF8DA, 0xBD00);
1828         MP_WriteMcuAccessRegWord(sc, 0xF8DC, 0x0132);
1829 
1830         MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
1831 
1832         MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x0743);
1833         MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x0801);
1834         MP_WriteMcuAccessRegWord(sc, 0xFC2E, 0x0BE9);
1835         MP_WriteMcuAccessRegWord(sc, 0xFC30, 0x02FD);
1836         MP_WriteMcuAccessRegWord(sc, 0xFC32, 0x0C25);
1837         MP_WriteMcuAccessRegWord(sc, 0xFC34, 0x00A9);
1838         MP_WriteMcuAccessRegWord(sc, 0xFC36, 0x012D);
1839 }
1840 
1841 static void re_set_mac_mcu_8168ep_1(struct re_softc *sc)
1842 {
1843         DisableMcuBPs(sc);
1844 
1845         MP_WriteMcuAccessRegWord(sc, 0xF800, 0xE008);
1846         MP_WriteMcuAccessRegWord(sc, 0xF802, 0xE0D3);
1847         MP_WriteMcuAccessRegWord(sc, 0xF804, 0xE0D6);
1848         MP_WriteMcuAccessRegWord(sc, 0xF806, 0xE0D9);
1849         MP_WriteMcuAccessRegWord(sc, 0xF808, 0xE0DB);
1850         MP_WriteMcuAccessRegWord(sc, 0xF80A, 0xE0DD);
1851         MP_WriteMcuAccessRegWord(sc, 0xF80C, 0xE0DF);
1852         MP_WriteMcuAccessRegWord(sc, 0xF80E, 0xE0E1);
1853         MP_WriteMcuAccessRegWord(sc, 0xF810, 0xC251);
1854         MP_WriteMcuAccessRegWord(sc, 0xF812, 0x7340);
1855         MP_WriteMcuAccessRegWord(sc, 0xF814, 0x49B1);
1856         MP_WriteMcuAccessRegWord(sc, 0xF816, 0xF010);
1857         MP_WriteMcuAccessRegWord(sc, 0xF818, 0x1D02);
1858         MP_WriteMcuAccessRegWord(sc, 0xF81A, 0x8D40);
1859         MP_WriteMcuAccessRegWord(sc, 0xF81C, 0xC202);
1860         MP_WriteMcuAccessRegWord(sc, 0xF81E, 0xBA00);
1861         MP_WriteMcuAccessRegWord(sc, 0xF820, 0x2C3A);
1862         MP_WriteMcuAccessRegWord(sc, 0xF822, 0xC0F0);
1863         MP_WriteMcuAccessRegWord(sc, 0xF824, 0xE8DE);
1864         MP_WriteMcuAccessRegWord(sc, 0xF826, 0x2000);
1865         MP_WriteMcuAccessRegWord(sc, 0xF828, 0x8000);
1866         MP_WriteMcuAccessRegWord(sc, 0xF82A, 0xC0B6);
1867         MP_WriteMcuAccessRegWord(sc, 0xF82C, 0x268C);
1868         MP_WriteMcuAccessRegWord(sc, 0xF82E, 0x752C);
1869         MP_WriteMcuAccessRegWord(sc, 0xF830, 0x49D4);
1870         MP_WriteMcuAccessRegWord(sc, 0xF832, 0xF112);
1871         MP_WriteMcuAccessRegWord(sc, 0xF834, 0xE025);
1872         MP_WriteMcuAccessRegWord(sc, 0xF836, 0xC2F6);
1873         MP_WriteMcuAccessRegWord(sc, 0xF838, 0x7146);
1874         MP_WriteMcuAccessRegWord(sc, 0xF83A, 0xC2F5);
1875         MP_WriteMcuAccessRegWord(sc, 0xF83C, 0x7340);
1876         MP_WriteMcuAccessRegWord(sc, 0xF83E, 0x49BE);
1877         MP_WriteMcuAccessRegWord(sc, 0xF840, 0xF103);
1878         MP_WriteMcuAccessRegWord(sc, 0xF842, 0xC7F2);
1879         MP_WriteMcuAccessRegWord(sc, 0xF844, 0xE002);
1880         MP_WriteMcuAccessRegWord(sc, 0xF846, 0xC7F1);
1881         MP_WriteMcuAccessRegWord(sc, 0xF848, 0x304F);
1882         MP_WriteMcuAccessRegWord(sc, 0xF84A, 0x6226);
1883         MP_WriteMcuAccessRegWord(sc, 0xF84C, 0x49A1);
1884         MP_WriteMcuAccessRegWord(sc, 0xF84E, 0xF1F0);
1885         MP_WriteMcuAccessRegWord(sc, 0xF850, 0x7222);
1886         MP_WriteMcuAccessRegWord(sc, 0xF852, 0x49A0);
1887         MP_WriteMcuAccessRegWord(sc, 0xF854, 0xF1ED);
1888         MP_WriteMcuAccessRegWord(sc, 0xF856, 0x2525);
1889         MP_WriteMcuAccessRegWord(sc, 0xF858, 0x1F28);
1890         MP_WriteMcuAccessRegWord(sc, 0xF85A, 0x3097);
1891         MP_WriteMcuAccessRegWord(sc, 0xF85C, 0x3091);
1892         MP_WriteMcuAccessRegWord(sc, 0xF85E, 0x9A36);
1893         MP_WriteMcuAccessRegWord(sc, 0xF860, 0x752C);
1894         MP_WriteMcuAccessRegWord(sc, 0xF862, 0x21DC);
1895         MP_WriteMcuAccessRegWord(sc, 0xF864, 0x25BC);
1896         MP_WriteMcuAccessRegWord(sc, 0xF866, 0xC6E2);
1897         MP_WriteMcuAccessRegWord(sc, 0xF868, 0x77C0);
1898         MP_WriteMcuAccessRegWord(sc, 0xF86A, 0x1304);
1899         MP_WriteMcuAccessRegWord(sc, 0xF86C, 0xF014);
1900         MP_WriteMcuAccessRegWord(sc, 0xF86E, 0x1303);
1901         MP_WriteMcuAccessRegWord(sc, 0xF870, 0xF014);
1902         MP_WriteMcuAccessRegWord(sc, 0xF872, 0x1302);
1903         MP_WriteMcuAccessRegWord(sc, 0xF874, 0xF014);
1904         MP_WriteMcuAccessRegWord(sc, 0xF876, 0x1301);
1905         MP_WriteMcuAccessRegWord(sc, 0xF878, 0xF014);
1906         MP_WriteMcuAccessRegWord(sc, 0xF87A, 0x49D4);
1907         MP_WriteMcuAccessRegWord(sc, 0xF87C, 0xF103);
1908         MP_WriteMcuAccessRegWord(sc, 0xF87E, 0xC3D7);
1909         MP_WriteMcuAccessRegWord(sc, 0xF880, 0xBB00);
1910         MP_WriteMcuAccessRegWord(sc, 0xF882, 0xC618);
1911         MP_WriteMcuAccessRegWord(sc, 0xF884, 0x67C6);
1912         MP_WriteMcuAccessRegWord(sc, 0xF886, 0x752E);
1913         MP_WriteMcuAccessRegWord(sc, 0xF888, 0x22D7);
1914         MP_WriteMcuAccessRegWord(sc, 0xF88A, 0x26DD);
1915         MP_WriteMcuAccessRegWord(sc, 0xF88C, 0x1505);
1916         MP_WriteMcuAccessRegWord(sc, 0xF88E, 0xF013);
1917         MP_WriteMcuAccessRegWord(sc, 0xF890, 0xC60A);
1918         MP_WriteMcuAccessRegWord(sc, 0xF892, 0xBE00);
1919         MP_WriteMcuAccessRegWord(sc, 0xF894, 0xC309);
1920         MP_WriteMcuAccessRegWord(sc, 0xF896, 0xBB00);
1921         MP_WriteMcuAccessRegWord(sc, 0xF898, 0xC308);
1922         MP_WriteMcuAccessRegWord(sc, 0xF89A, 0xBB00);
1923         MP_WriteMcuAccessRegWord(sc, 0xF89C, 0xC307);
1924         MP_WriteMcuAccessRegWord(sc, 0xF89E, 0xBB00);
1925         MP_WriteMcuAccessRegWord(sc, 0xF8A0, 0xC306);
1926         MP_WriteMcuAccessRegWord(sc, 0xF8A2, 0xBB00);
1927         MP_WriteMcuAccessRegWord(sc, 0xF8A4, 0x25C8);
1928         MP_WriteMcuAccessRegWord(sc, 0xF8A6, 0x25A6);
1929         MP_WriteMcuAccessRegWord(sc, 0xF8A8, 0x25AC);
1930         MP_WriteMcuAccessRegWord(sc, 0xF8AA, 0x25B2);
1931         MP_WriteMcuAccessRegWord(sc, 0xF8AC, 0x25B8);
1932         MP_WriteMcuAccessRegWord(sc, 0xF8AE, 0xCD08);
1933         MP_WriteMcuAccessRegWord(sc, 0xF8B0, 0x0000);
1934         MP_WriteMcuAccessRegWord(sc, 0xF8B2, 0xC0BC);
1935         MP_WriteMcuAccessRegWord(sc, 0xF8B4, 0xC2FF);
1936         MP_WriteMcuAccessRegWord(sc, 0xF8B6, 0x7340);
1937         MP_WriteMcuAccessRegWord(sc, 0xF8B8, 0x49B0);
1938         MP_WriteMcuAccessRegWord(sc, 0xF8BA, 0xF04E);
1939         MP_WriteMcuAccessRegWord(sc, 0xF8BC, 0x1F46);
1940         MP_WriteMcuAccessRegWord(sc, 0xF8BE, 0x308F);
1941         MP_WriteMcuAccessRegWord(sc, 0xF8C0, 0xC3F7);
1942         MP_WriteMcuAccessRegWord(sc, 0xF8C2, 0x1C04);
1943         MP_WriteMcuAccessRegWord(sc, 0xF8C4, 0xE84D);
1944         MP_WriteMcuAccessRegWord(sc, 0xF8C6, 0x1401);
1945         MP_WriteMcuAccessRegWord(sc, 0xF8C8, 0xF147);
1946         MP_WriteMcuAccessRegWord(sc, 0xF8CA, 0x7226);
1947         MP_WriteMcuAccessRegWord(sc, 0xF8CC, 0x49A7);
1948         MP_WriteMcuAccessRegWord(sc, 0xF8CE, 0xF044);
1949         MP_WriteMcuAccessRegWord(sc, 0xF8D0, 0x7222);
1950         MP_WriteMcuAccessRegWord(sc, 0xF8D2, 0x2525);
1951         MP_WriteMcuAccessRegWord(sc, 0xF8D4, 0x1F30);
1952         MP_WriteMcuAccessRegWord(sc, 0xF8D6, 0x3097);
1953         MP_WriteMcuAccessRegWord(sc, 0xF8D8, 0x3091);
1954         MP_WriteMcuAccessRegWord(sc, 0xF8DA, 0x7340);
1955         MP_WriteMcuAccessRegWord(sc, 0xF8DC, 0xC4EA);
1956         MP_WriteMcuAccessRegWord(sc, 0xF8DE, 0x401C);
1957         MP_WriteMcuAccessRegWord(sc, 0xF8E0, 0xF006);
1958         MP_WriteMcuAccessRegWord(sc, 0xF8E2, 0xC6E8);
1959         MP_WriteMcuAccessRegWord(sc, 0xF8E4, 0x75C0);
1960         MP_WriteMcuAccessRegWord(sc, 0xF8E6, 0x49D7);
1961         MP_WriteMcuAccessRegWord(sc, 0xF8E8, 0xF105);
1962         MP_WriteMcuAccessRegWord(sc, 0xF8EA, 0xE036);
1963         MP_WriteMcuAccessRegWord(sc, 0xF8EC, 0x1D08);
1964         MP_WriteMcuAccessRegWord(sc, 0xF8EE, 0x8DC1);
1965         MP_WriteMcuAccessRegWord(sc, 0xF8F0, 0x0208);
1966         MP_WriteMcuAccessRegWord(sc, 0xF8F2, 0x6640);
1967         MP_WriteMcuAccessRegWord(sc, 0xF8F4, 0x2764);
1968         MP_WriteMcuAccessRegWord(sc, 0xF8F6, 0x1606);
1969         MP_WriteMcuAccessRegWord(sc, 0xF8F8, 0xF12F);
1970         MP_WriteMcuAccessRegWord(sc, 0xF8FA, 0x6346);
1971         MP_WriteMcuAccessRegWord(sc, 0xF8FC, 0x133B);
1972         MP_WriteMcuAccessRegWord(sc, 0xF8FE, 0xF12C);
1973         MP_WriteMcuAccessRegWord(sc, 0xF900, 0x9B34);
1974         MP_WriteMcuAccessRegWord(sc, 0xF902, 0x1B18);
1975         MP_WriteMcuAccessRegWord(sc, 0xF904, 0x3093);
1976         MP_WriteMcuAccessRegWord(sc, 0xF906, 0xC32A);
1977         MP_WriteMcuAccessRegWord(sc, 0xF908, 0x1C10);
1978         MP_WriteMcuAccessRegWord(sc, 0xF90A, 0xE82A);
1979         MP_WriteMcuAccessRegWord(sc, 0xF90C, 0x1401);
1980         MP_WriteMcuAccessRegWord(sc, 0xF90E, 0xF124);
1981         MP_WriteMcuAccessRegWord(sc, 0xF910, 0x1A36);
1982         MP_WriteMcuAccessRegWord(sc, 0xF912, 0x308A);
1983         MP_WriteMcuAccessRegWord(sc, 0xF914, 0x7322);
1984         MP_WriteMcuAccessRegWord(sc, 0xF916, 0x25B5);
1985         MP_WriteMcuAccessRegWord(sc, 0xF918, 0x0B0E);
1986         MP_WriteMcuAccessRegWord(sc, 0xF91A, 0x1C00);
1987         MP_WriteMcuAccessRegWord(sc, 0xF91C, 0xE82C);
1988         MP_WriteMcuAccessRegWord(sc, 0xF91E, 0xC71F);
1989         MP_WriteMcuAccessRegWord(sc, 0xF920, 0x4027);
1990         MP_WriteMcuAccessRegWord(sc, 0xF922, 0xF11A);
1991         MP_WriteMcuAccessRegWord(sc, 0xF924, 0xE838);
1992         MP_WriteMcuAccessRegWord(sc, 0xF926, 0x1F42);
1993         MP_WriteMcuAccessRegWord(sc, 0xF928, 0x308F);
1994         MP_WriteMcuAccessRegWord(sc, 0xF92A, 0x1B08);
1995         MP_WriteMcuAccessRegWord(sc, 0xF92C, 0xE824);
1996         MP_WriteMcuAccessRegWord(sc, 0xF92E, 0x7236);
1997         MP_WriteMcuAccessRegWord(sc, 0xF930, 0x7746);
1998         MP_WriteMcuAccessRegWord(sc, 0xF932, 0x1700);
1999         MP_WriteMcuAccessRegWord(sc, 0xF934, 0xF00D);
2000         MP_WriteMcuAccessRegWord(sc, 0xF936, 0xC313);
2001         MP_WriteMcuAccessRegWord(sc, 0xF938, 0x401F);
2002         MP_WriteMcuAccessRegWord(sc, 0xF93A, 0xF103);
2003         MP_WriteMcuAccessRegWord(sc, 0xF93C, 0x1F00);
2004         MP_WriteMcuAccessRegWord(sc, 0xF93E, 0x9F46);
2005         MP_WriteMcuAccessRegWord(sc, 0xF940, 0x7744);
2006         MP_WriteMcuAccessRegWord(sc, 0xF942, 0x449F);
2007         MP_WriteMcuAccessRegWord(sc, 0xF944, 0x445F);
2008         MP_WriteMcuAccessRegWord(sc, 0xF946, 0xE817);
2009         MP_WriteMcuAccessRegWord(sc, 0xF948, 0xC70A);
2010         MP_WriteMcuAccessRegWord(sc, 0xF94A, 0x4027);
2011         MP_WriteMcuAccessRegWord(sc, 0xF94C, 0xF105);
2012         MP_WriteMcuAccessRegWord(sc, 0xF94E, 0xC302);
2013         MP_WriteMcuAccessRegWord(sc, 0xF950, 0xBB00);
2014         MP_WriteMcuAccessRegWord(sc, 0xF952, 0x2E08);
2015         MP_WriteMcuAccessRegWord(sc, 0xF954, 0x2DC2);
2016         MP_WriteMcuAccessRegWord(sc, 0xF956, 0xC7FF);
2017         MP_WriteMcuAccessRegWord(sc, 0xF958, 0xBF00);
2018         MP_WriteMcuAccessRegWord(sc, 0xF95A, 0xCDB8);
2019         MP_WriteMcuAccessRegWord(sc, 0xF95C, 0xFFFF);
2020         MP_WriteMcuAccessRegWord(sc, 0xF95E, 0x0C02);
2021         MP_WriteMcuAccessRegWord(sc, 0xF960, 0xA554);
2022         MP_WriteMcuAccessRegWord(sc, 0xF962, 0xA5DC);
2023         MP_WriteMcuAccessRegWord(sc, 0xF964, 0x402F);
2024         MP_WriteMcuAccessRegWord(sc, 0xF966, 0xF105);
2025         MP_WriteMcuAccessRegWord(sc, 0xF968, 0x1400);
2026         MP_WriteMcuAccessRegWord(sc, 0xF96A, 0xF1FA);
2027         MP_WriteMcuAccessRegWord(sc, 0xF96C, 0x1C01);
2028         MP_WriteMcuAccessRegWord(sc, 0xF96E, 0xE002);
2029         MP_WriteMcuAccessRegWord(sc, 0xF970, 0x1C00);
2030         MP_WriteMcuAccessRegWord(sc, 0xF972, 0xFF80);
2031         MP_WriteMcuAccessRegWord(sc, 0xF974, 0x49B0);
2032         MP_WriteMcuAccessRegWord(sc, 0xF976, 0xF004);
2033         MP_WriteMcuAccessRegWord(sc, 0xF978, 0x0B01);
2034         MP_WriteMcuAccessRegWord(sc, 0xF97A, 0xA1D3);
2035         MP_WriteMcuAccessRegWord(sc, 0xF97C, 0xE003);
2036         MP_WriteMcuAccessRegWord(sc, 0xF97E, 0x0B02);
2037         MP_WriteMcuAccessRegWord(sc, 0xF980, 0xA5D3);
2038         MP_WriteMcuAccessRegWord(sc, 0xF982, 0x3127);
2039         MP_WriteMcuAccessRegWord(sc, 0xF984, 0x3720);
2040         MP_WriteMcuAccessRegWord(sc, 0xF986, 0x0B02);
2041         MP_WriteMcuAccessRegWord(sc, 0xF988, 0xA5D3);
2042         MP_WriteMcuAccessRegWord(sc, 0xF98A, 0x3127);
2043         MP_WriteMcuAccessRegWord(sc, 0xF98C, 0x3720);
2044         MP_WriteMcuAccessRegWord(sc, 0xF98E, 0x1300);
2045         MP_WriteMcuAccessRegWord(sc, 0xF990, 0xF1FB);
2046         MP_WriteMcuAccessRegWord(sc, 0xF992, 0xFF80);
2047         MP_WriteMcuAccessRegWord(sc, 0xF994, 0x7322);
2048         MP_WriteMcuAccessRegWord(sc, 0xF996, 0x25B5);
2049         MP_WriteMcuAccessRegWord(sc, 0xF998, 0x1E28);
2050         MP_WriteMcuAccessRegWord(sc, 0xF99A, 0x30DE);
2051         MP_WriteMcuAccessRegWord(sc, 0xF99C, 0x30D9);
2052         MP_WriteMcuAccessRegWord(sc, 0xF99E, 0x7264);
2053         MP_WriteMcuAccessRegWord(sc, 0xF9A0, 0x1E11);
2054         MP_WriteMcuAccessRegWord(sc, 0xF9A2, 0x2368);
2055         MP_WriteMcuAccessRegWord(sc, 0xF9A4, 0x3116);
2056         MP_WriteMcuAccessRegWord(sc, 0xF9A6, 0xFF80);
2057         MP_WriteMcuAccessRegWord(sc, 0xF9A8, 0x1B7E);
2058         MP_WriteMcuAccessRegWord(sc, 0xF9AA, 0xC602);
2059         MP_WriteMcuAccessRegWord(sc, 0xF9AC, 0xBE00);
2060         MP_WriteMcuAccessRegWord(sc, 0xF9AE, 0x06A6);
2061         MP_WriteMcuAccessRegWord(sc, 0xF9B0, 0x1B7E);
2062         MP_WriteMcuAccessRegWord(sc, 0xF9B2, 0xC602);
2063         MP_WriteMcuAccessRegWord(sc, 0xF9B4, 0xBE00);
2064         MP_WriteMcuAccessRegWord(sc, 0xF9B6, 0x0764);
2065         MP_WriteMcuAccessRegWord(sc, 0xF9B8, 0xC602);
2066         MP_WriteMcuAccessRegWord(sc, 0xF9BA, 0xBE00);
2067         MP_WriteMcuAccessRegWord(sc, 0xF9BC, 0x0000);
2068         MP_WriteMcuAccessRegWord(sc, 0xF9BE, 0xC602);
2069         MP_WriteMcuAccessRegWord(sc, 0xF9C0, 0xBE00);
2070         MP_WriteMcuAccessRegWord(sc, 0xF9C2, 0x0000);
2071         MP_WriteMcuAccessRegWord(sc, 0xF9C4, 0xC602);
2072         MP_WriteMcuAccessRegWord(sc, 0xF9C6, 0xBE00);
2073         MP_WriteMcuAccessRegWord(sc, 0xF9C8, 0x0000);
2074         MP_WriteMcuAccessRegWord(sc, 0xF9CA, 0xC602);
2075         MP_WriteMcuAccessRegWord(sc, 0xF9CC, 0xBE00);
2076         MP_WriteMcuAccessRegWord(sc, 0xF9CE, 0x0000);
2077         MP_WriteMcuAccessRegWord(sc, 0xF9D0, 0xC602);
2078         MP_WriteMcuAccessRegWord(sc, 0xF9D2, 0xBE00);
2079         MP_WriteMcuAccessRegWord(sc, 0xF9D4, 0x0000);
2080 
2081         MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
2082 
2083         MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x2549);
2084         MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x06A5);
2085         MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x0763);
2086 }
2087 
2088 static void re_set_mac_mcu_8168ep_2(struct re_softc *sc)
2089 {
2090         DisableMcuBPs(sc);
2091 
2092         MP_WriteMcuAccessRegWord(sc, 0xF800, 0xE008);
2093         MP_WriteMcuAccessRegWord(sc, 0xF802, 0xE017);
2094         MP_WriteMcuAccessRegWord(sc, 0xF804, 0xE019);
2095         MP_WriteMcuAccessRegWord(sc, 0xF806, 0xE01B);
2096         MP_WriteMcuAccessRegWord(sc, 0xF808, 0xE01D);
2097         MP_WriteMcuAccessRegWord(sc, 0xF80A, 0xE01F);
2098         MP_WriteMcuAccessRegWord(sc, 0xF80C, 0xE021);
2099         MP_WriteMcuAccessRegWord(sc, 0xF80E, 0xE023);
2100         MP_WriteMcuAccessRegWord(sc, 0xF810, 0xC50F);
2101         MP_WriteMcuAccessRegWord(sc, 0xF812, 0x76A4);
2102         MP_WriteMcuAccessRegWord(sc, 0xF814, 0x49E3);
2103         MP_WriteMcuAccessRegWord(sc, 0xF816, 0xF007);
2104         MP_WriteMcuAccessRegWord(sc, 0xF818, 0x49C0);
2105         MP_WriteMcuAccessRegWord(sc, 0xF81A, 0xF103);
2106         MP_WriteMcuAccessRegWord(sc, 0xF81C, 0xC607);
2107         MP_WriteMcuAccessRegWord(sc, 0xF81E, 0xBE00);
2108         MP_WriteMcuAccessRegWord(sc, 0xF820, 0xC606);
2109         MP_WriteMcuAccessRegWord(sc, 0xF822, 0xBE00);
2110         MP_WriteMcuAccessRegWord(sc, 0xF824, 0xC602);
2111         MP_WriteMcuAccessRegWord(sc, 0xF826, 0xBE00);
2112         MP_WriteMcuAccessRegWord(sc, 0xF828, 0x0BDA);
2113         MP_WriteMcuAccessRegWord(sc, 0xF82A, 0x0BB0);
2114         MP_WriteMcuAccessRegWord(sc, 0xF82C, 0x0BBA);
2115         MP_WriteMcuAccessRegWord(sc, 0xF82E, 0xDC00);
2116         MP_WriteMcuAccessRegWord(sc, 0xF830, 0xC602);
2117         MP_WriteMcuAccessRegWord(sc, 0xF832, 0xBE00);
2118         MP_WriteMcuAccessRegWord(sc, 0xF834, 0x0000);
2119         MP_WriteMcuAccessRegWord(sc, 0xF836, 0xC602);
2120         MP_WriteMcuAccessRegWord(sc, 0xF838, 0xBE00);
2121         MP_WriteMcuAccessRegWord(sc, 0xF83A, 0x0000);
2122         MP_WriteMcuAccessRegWord(sc, 0xF83C, 0xC602);
2123         MP_WriteMcuAccessRegWord(sc, 0xF83E, 0xBE00);
2124         MP_WriteMcuAccessRegWord(sc, 0xF840, 0x0000);
2125         MP_WriteMcuAccessRegWord(sc, 0xF842, 0xC602);
2126         MP_WriteMcuAccessRegWord(sc, 0xF844, 0xBE00);
2127         MP_WriteMcuAccessRegWord(sc, 0xF846, 0x0000);
2128         MP_WriteMcuAccessRegWord(sc, 0xF848, 0xC602);
2129         MP_WriteMcuAccessRegWord(sc, 0xF84A, 0xBE00);
2130         MP_WriteMcuAccessRegWord(sc, 0xF84C, 0x0000);
2131         MP_WriteMcuAccessRegWord(sc, 0xF84E, 0xC602);
2132         MP_WriteMcuAccessRegWord(sc, 0xF850, 0xBE00);
2133         MP_WriteMcuAccessRegWord(sc, 0xF852, 0x0000);
2134         MP_WriteMcuAccessRegWord(sc, 0xF854, 0xC602);
2135         MP_WriteMcuAccessRegWord(sc, 0xF856, 0xBE00);
2136         MP_WriteMcuAccessRegWord(sc, 0xF858, 0x0000);
2137 
2138         MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
2139 
2140         MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x0BB3);
2141 }
2142 
2143 static void re_set_mac_mcu_8168h_1(struct re_softc *sc)
2144 {
2145         DisableMcuBPs(sc);
2146 
2147         MP_WriteMcuAccessRegWord(sc, 0xF800, 0xE008);
2148         MP_WriteMcuAccessRegWord(sc, 0xF802, 0xE00F);
2149         MP_WriteMcuAccessRegWord(sc, 0xF804, 0xE011);
2150         MP_WriteMcuAccessRegWord(sc, 0xF806, 0xE047);
2151         MP_WriteMcuAccessRegWord(sc, 0xF808, 0xE049);
2152         MP_WriteMcuAccessRegWord(sc, 0xF80A, 0xE073);
2153         MP_WriteMcuAccessRegWord(sc, 0xF80C, 0xE075);
2154         MP_WriteMcuAccessRegWord(sc, 0xF80E, 0xE077);
2155         MP_WriteMcuAccessRegWord(sc, 0xF810, 0xC707);
2156         MP_WriteMcuAccessRegWord(sc, 0xF812, 0x1D00);
2157         MP_WriteMcuAccessRegWord(sc, 0xF814, 0x8DE2);
2158         MP_WriteMcuAccessRegWord(sc, 0xF816, 0x48C1);
2159         MP_WriteMcuAccessRegWord(sc, 0xF818, 0xC502);
2160         MP_WriteMcuAccessRegWord(sc, 0xF81A, 0xBD00);
2161         MP_WriteMcuAccessRegWord(sc, 0xF81C, 0x00E4);
2162         MP_WriteMcuAccessRegWord(sc, 0xF81E, 0xE0C0);
2163         MP_WriteMcuAccessRegWord(sc, 0xF820, 0xC502);
2164         MP_WriteMcuAccessRegWord(sc, 0xF822, 0xBD00);
2165         MP_WriteMcuAccessRegWord(sc, 0xF824, 0x0216);
2166         MP_WriteMcuAccessRegWord(sc, 0xF826, 0xC634);
2167         MP_WriteMcuAccessRegWord(sc, 0xF828, 0x75C0);
2168         MP_WriteMcuAccessRegWord(sc, 0xF82A, 0x49D3);
2169         MP_WriteMcuAccessRegWord(sc, 0xF82C, 0xF027);
2170         MP_WriteMcuAccessRegWord(sc, 0xF82E, 0xC631);
2171         MP_WriteMcuAccessRegWord(sc, 0xF830, 0x75C0);
2172         MP_WriteMcuAccessRegWord(sc, 0xF832, 0x49D3);
2173         MP_WriteMcuAccessRegWord(sc, 0xF834, 0xF123);
2174         MP_WriteMcuAccessRegWord(sc, 0xF836, 0xC627);
2175         MP_WriteMcuAccessRegWord(sc, 0xF838, 0x75C0);
2176         MP_WriteMcuAccessRegWord(sc, 0xF83A, 0xB405);
2177         MP_WriteMcuAccessRegWord(sc, 0xF83C, 0xC525);
2178         MP_WriteMcuAccessRegWord(sc, 0xF83E, 0x9DC0);
2179         MP_WriteMcuAccessRegWord(sc, 0xF840, 0xC621);
2180         MP_WriteMcuAccessRegWord(sc, 0xF842, 0x75C8);
2181         MP_WriteMcuAccessRegWord(sc, 0xF844, 0x49D5);
2182         MP_WriteMcuAccessRegWord(sc, 0xF846, 0xF00A);
2183         MP_WriteMcuAccessRegWord(sc, 0xF848, 0x49D6);
2184         MP_WriteMcuAccessRegWord(sc, 0xF84A, 0xF008);
2185         MP_WriteMcuAccessRegWord(sc, 0xF84C, 0x49D7);
2186         MP_WriteMcuAccessRegWord(sc, 0xF84E, 0xF006);
2187         MP_WriteMcuAccessRegWord(sc, 0xF850, 0x49D8);
2188         MP_WriteMcuAccessRegWord(sc, 0xF852, 0xF004);
2189         MP_WriteMcuAccessRegWord(sc, 0xF854, 0x75D2);
2190         MP_WriteMcuAccessRegWord(sc, 0xF856, 0x49D9);
2191         MP_WriteMcuAccessRegWord(sc, 0xF858, 0xF111);
2192         MP_WriteMcuAccessRegWord(sc, 0xF85A, 0xC517);
2193         MP_WriteMcuAccessRegWord(sc, 0xF85C, 0x9DC8);
2194         MP_WriteMcuAccessRegWord(sc, 0xF85E, 0xC516);
2195         MP_WriteMcuAccessRegWord(sc, 0xF860, 0x9DD2);
2196         MP_WriteMcuAccessRegWord(sc, 0xF862, 0xC618);
2197         MP_WriteMcuAccessRegWord(sc, 0xF864, 0x75C0);
2198         MP_WriteMcuAccessRegWord(sc, 0xF866, 0x49D4);
2199         MP_WriteMcuAccessRegWord(sc, 0xF868, 0xF003);
2200         MP_WriteMcuAccessRegWord(sc, 0xF86A, 0x49D0);
2201         MP_WriteMcuAccessRegWord(sc, 0xF86C, 0xF104);
2202         MP_WriteMcuAccessRegWord(sc, 0xF86E, 0xC60A);
2203         MP_WriteMcuAccessRegWord(sc, 0xF870, 0xC50E);
2204         MP_WriteMcuAccessRegWord(sc, 0xF872, 0x9DC0);
2205         MP_WriteMcuAccessRegWord(sc, 0xF874, 0xB005);
2206         MP_WriteMcuAccessRegWord(sc, 0xF876, 0xC607);
2207         MP_WriteMcuAccessRegWord(sc, 0xF878, 0x9DC0);
2208         MP_WriteMcuAccessRegWord(sc, 0xF87A, 0xB007);
2209         MP_WriteMcuAccessRegWord(sc, 0xF87C, 0xC602);
2210         MP_WriteMcuAccessRegWord(sc, 0xF87E, 0xBE00);
2211         MP_WriteMcuAccessRegWord(sc, 0xF880, 0x1A06);
2212         MP_WriteMcuAccessRegWord(sc, 0xF882, 0xB400);
2213         MP_WriteMcuAccessRegWord(sc, 0xF884, 0xE86C);
2214         MP_WriteMcuAccessRegWord(sc, 0xF886, 0xA000);
2215         MP_WriteMcuAccessRegWord(sc, 0xF888, 0x01E1);
2216         MP_WriteMcuAccessRegWord(sc, 0xF88A, 0x0200);
2217         MP_WriteMcuAccessRegWord(sc, 0xF88C, 0x9200);
2218         MP_WriteMcuAccessRegWord(sc, 0xF88E, 0xE84C);
2219         MP_WriteMcuAccessRegWord(sc, 0xF890, 0xE004);
2220         MP_WriteMcuAccessRegWord(sc, 0xF892, 0xE908);
2221         MP_WriteMcuAccessRegWord(sc, 0xF894, 0xC502);
2222         MP_WriteMcuAccessRegWord(sc, 0xF896, 0xBD00);
2223         MP_WriteMcuAccessRegWord(sc, 0xF898, 0x0B58);
2224         MP_WriteMcuAccessRegWord(sc, 0xF89A, 0xB407);
2225         MP_WriteMcuAccessRegWord(sc, 0xF89C, 0xB404);
2226         MP_WriteMcuAccessRegWord(sc, 0xF89E, 0x2195);
2227         MP_WriteMcuAccessRegWord(sc, 0xF8A0, 0x25BD);
2228         MP_WriteMcuAccessRegWord(sc, 0xF8A2, 0x9BE0);
2229         MP_WriteMcuAccessRegWord(sc, 0xF8A4, 0x1C1C);
2230         MP_WriteMcuAccessRegWord(sc, 0xF8A6, 0x484F);
2231         MP_WriteMcuAccessRegWord(sc, 0xF8A8, 0x9CE2);
2232         MP_WriteMcuAccessRegWord(sc, 0xF8AA, 0x72E2);
2233         MP_WriteMcuAccessRegWord(sc, 0xF8AC, 0x49AE);
2234         MP_WriteMcuAccessRegWord(sc, 0xF8AE, 0xF1FE);
2235         MP_WriteMcuAccessRegWord(sc, 0xF8B0, 0x0B00);
2236         MP_WriteMcuAccessRegWord(sc, 0xF8B2, 0xF116);
2237         MP_WriteMcuAccessRegWord(sc, 0xF8B4, 0xC71C);
2238         MP_WriteMcuAccessRegWord(sc, 0xF8B6, 0xC419);
2239         MP_WriteMcuAccessRegWord(sc, 0xF8B8, 0x9CE0);
2240         MP_WriteMcuAccessRegWord(sc, 0xF8BA, 0x1C13);
2241         MP_WriteMcuAccessRegWord(sc, 0xF8BC, 0x484F);
2242         MP_WriteMcuAccessRegWord(sc, 0xF8BE, 0x9CE2);
2243         MP_WriteMcuAccessRegWord(sc, 0xF8C0, 0x74E2);
2244         MP_WriteMcuAccessRegWord(sc, 0xF8C2, 0x49CE);
2245         MP_WriteMcuAccessRegWord(sc, 0xF8C4, 0xF1FE);
2246         MP_WriteMcuAccessRegWord(sc, 0xF8C6, 0xC412);
2247         MP_WriteMcuAccessRegWord(sc, 0xF8C8, 0x9CE0);
2248         MP_WriteMcuAccessRegWord(sc, 0xF8CA, 0x1C13);
2249         MP_WriteMcuAccessRegWord(sc, 0xF8CC, 0x484F);
2250         MP_WriteMcuAccessRegWord(sc, 0xF8CE, 0x9CE2);
2251         MP_WriteMcuAccessRegWord(sc, 0xF8D0, 0x74E2);
2252         MP_WriteMcuAccessRegWord(sc, 0xF8D2, 0x49CE);
2253         MP_WriteMcuAccessRegWord(sc, 0xF8D4, 0xF1FE);
2254         MP_WriteMcuAccessRegWord(sc, 0xF8D6, 0xC70C);
2255         MP_WriteMcuAccessRegWord(sc, 0xF8D8, 0x74F8);
2256         MP_WriteMcuAccessRegWord(sc, 0xF8DA, 0x48C3);
2257         MP_WriteMcuAccessRegWord(sc, 0xF8DC, 0x8CF8);
2258         MP_WriteMcuAccessRegWord(sc, 0xF8DE, 0xB004);
2259         MP_WriteMcuAccessRegWord(sc, 0xF8E0, 0xB007);
2260         MP_WriteMcuAccessRegWord(sc, 0xF8E2, 0xC502);
2261         MP_WriteMcuAccessRegWord(sc, 0xF8E4, 0xBD00);
2262         MP_WriteMcuAccessRegWord(sc, 0xF8E6, 0x0F24);
2263         MP_WriteMcuAccessRegWord(sc, 0xF8E8, 0x0481);
2264         MP_WriteMcuAccessRegWord(sc, 0xF8EA, 0x0C81);
2265         MP_WriteMcuAccessRegWord(sc, 0xF8EC, 0xDE24);
2266         MP_WriteMcuAccessRegWord(sc, 0xF8EE, 0xE000);
2267         MP_WriteMcuAccessRegWord(sc, 0xF8F0, 0xC602);
2268         MP_WriteMcuAccessRegWord(sc, 0xF8F2, 0xBE00);
2269         MP_WriteMcuAccessRegWord(sc, 0xF8F4, 0x0CA4);
2270         MP_WriteMcuAccessRegWord(sc, 0xF8F6, 0xC502);
2271         MP_WriteMcuAccessRegWord(sc, 0xF8F8, 0xBD00);
2272         MP_WriteMcuAccessRegWord(sc, 0xF8FA, 0x0000);
2273         MP_WriteMcuAccessRegWord(sc, 0xF8FC, 0xC602);
2274         MP_WriteMcuAccessRegWord(sc, 0xF8FE, 0xBE00);
2275         MP_WriteMcuAccessRegWord(sc, 0xF900, 0x0000);
2276 
2277         MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
2278 
2279         MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x00E2);
2280         MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x0210);
2281         MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x1A04);
2282         MP_WriteMcuAccessRegWord(sc, 0xFC2E, 0x0B26);
2283         MP_WriteMcuAccessRegWord(sc, 0xFC30, 0x0F02);
2284         MP_WriteMcuAccessRegWord(sc, 0xFC32, 0x0CA0);
2285 
2286         if (sc->re_device_id == RT_DEVICEID_8136)
2287                 MP_WriteMcuAccessRegWord(sc, 0xFC38, 0x0033);
2288         else
2289                 MP_WriteMcuAccessRegWord(sc, 0xFC38, 0x003F);
2290 }
2291 
2292 static void re_set_mac_mcu_8168fp_1(struct re_softc *sc)
2293 {
2294         DisableMcuBPs(sc);
2295 
2296         MP_WriteMcuAccessRegWord(sc, 0xF800, 0xE00A);
2297         MP_WriteMcuAccessRegWord(sc, 0xF802, 0xE0C1);
2298         MP_WriteMcuAccessRegWord(sc, 0xF804, 0xE104);
2299         MP_WriteMcuAccessRegWord(sc, 0xF806, 0xE108);
2300         MP_WriteMcuAccessRegWord(sc, 0xF808, 0xE10D);
2301         MP_WriteMcuAccessRegWord(sc, 0xF80A, 0xE112);
2302         MP_WriteMcuAccessRegWord(sc, 0xF80C, 0xE11C);
2303         MP_WriteMcuAccessRegWord(sc, 0xF80E, 0xE121);
2304         MP_WriteMcuAccessRegWord(sc, 0xF810, 0xE000);
2305         MP_WriteMcuAccessRegWord(sc, 0xF812, 0xE0C8);
2306         MP_WriteMcuAccessRegWord(sc, 0xF814, 0xB400);
2307         MP_WriteMcuAccessRegWord(sc, 0xF816, 0xC1FE);
2308         MP_WriteMcuAccessRegWord(sc, 0xF818, 0x49E2);
2309         MP_WriteMcuAccessRegWord(sc, 0xF81A, 0xF04C);
2310         MP_WriteMcuAccessRegWord(sc, 0xF81C, 0x49EA);
2311         MP_WriteMcuAccessRegWord(sc, 0xF81E, 0xF04A);
2312         MP_WriteMcuAccessRegWord(sc, 0xF820, 0x74E6);
2313         MP_WriteMcuAccessRegWord(sc, 0xF822, 0xC246);
2314         MP_WriteMcuAccessRegWord(sc, 0xF824, 0x7542);
2315         MP_WriteMcuAccessRegWord(sc, 0xF826, 0x73EC);
2316         MP_WriteMcuAccessRegWord(sc, 0xF828, 0x1800);
2317         MP_WriteMcuAccessRegWord(sc, 0xF82A, 0x49C0);
2318         MP_WriteMcuAccessRegWord(sc, 0xF82C, 0xF10D);
2319         MP_WriteMcuAccessRegWord(sc, 0xF82E, 0x49C1);
2320         MP_WriteMcuAccessRegWord(sc, 0xF830, 0xF10B);
2321         MP_WriteMcuAccessRegWord(sc, 0xF832, 0x49C2);
2322         MP_WriteMcuAccessRegWord(sc, 0xF834, 0xF109);
2323         MP_WriteMcuAccessRegWord(sc, 0xF836, 0x49B0);
2324         MP_WriteMcuAccessRegWord(sc, 0xF838, 0xF107);
2325         MP_WriteMcuAccessRegWord(sc, 0xF83A, 0x49B1);
2326         MP_WriteMcuAccessRegWord(sc, 0xF83C, 0xF105);
2327         MP_WriteMcuAccessRegWord(sc, 0xF83E, 0x7220);
2328         MP_WriteMcuAccessRegWord(sc, 0xF840, 0x49A2);
2329         MP_WriteMcuAccessRegWord(sc, 0xF842, 0xF102);
2330         MP_WriteMcuAccessRegWord(sc, 0xF844, 0xE002);
2331         MP_WriteMcuAccessRegWord(sc, 0xF846, 0x4800);
2332         MP_WriteMcuAccessRegWord(sc, 0xF848, 0x49D0);
2333         MP_WriteMcuAccessRegWord(sc, 0xF84A, 0xF10A);
2334         MP_WriteMcuAccessRegWord(sc, 0xF84C, 0x49D1);
2335         MP_WriteMcuAccessRegWord(sc, 0xF84E, 0xF108);
2336         MP_WriteMcuAccessRegWord(sc, 0xF850, 0x49D2);
2337         MP_WriteMcuAccessRegWord(sc, 0xF852, 0xF106);
2338         MP_WriteMcuAccessRegWord(sc, 0xF854, 0x49D3);
2339         MP_WriteMcuAccessRegWord(sc, 0xF856, 0xF104);
2340         MP_WriteMcuAccessRegWord(sc, 0xF858, 0x49DF);
2341         MP_WriteMcuAccessRegWord(sc, 0xF85A, 0xF102);
2342         MP_WriteMcuAccessRegWord(sc, 0xF85C, 0xE00C);
2343         MP_WriteMcuAccessRegWord(sc, 0xF85E, 0x4801);
2344         MP_WriteMcuAccessRegWord(sc, 0xF860, 0x72E4);
2345         MP_WriteMcuAccessRegWord(sc, 0xF862, 0x49AD);
2346         MP_WriteMcuAccessRegWord(sc, 0xF864, 0xF108);
2347         MP_WriteMcuAccessRegWord(sc, 0xF866, 0xC225);
2348         MP_WriteMcuAccessRegWord(sc, 0xF868, 0x6741);
2349         MP_WriteMcuAccessRegWord(sc, 0xF86A, 0x48F0);
2350         MP_WriteMcuAccessRegWord(sc, 0xF86C, 0x8F41);
2351         MP_WriteMcuAccessRegWord(sc, 0xF86E, 0x4870);
2352         MP_WriteMcuAccessRegWord(sc, 0xF870, 0x8F41);
2353         MP_WriteMcuAccessRegWord(sc, 0xF872, 0xC7CF);
2354         MP_WriteMcuAccessRegWord(sc, 0xF874, 0x49B5);
2355         MP_WriteMcuAccessRegWord(sc, 0xF876, 0xF01F);
2356         MP_WriteMcuAccessRegWord(sc, 0xF878, 0x49B2);
2357         MP_WriteMcuAccessRegWord(sc, 0xF87A, 0xF00B);
2358         MP_WriteMcuAccessRegWord(sc, 0xF87C, 0x4980);
2359         MP_WriteMcuAccessRegWord(sc, 0xF87E, 0xF003);
2360         MP_WriteMcuAccessRegWord(sc, 0xF880, 0x484E);
2361         MP_WriteMcuAccessRegWord(sc, 0xF882, 0x94E7);
2362         MP_WriteMcuAccessRegWord(sc, 0xF884, 0x4981);
2363         MP_WriteMcuAccessRegWord(sc, 0xF886, 0xF004);
2364         MP_WriteMcuAccessRegWord(sc, 0xF888, 0x485E);
2365         MP_WriteMcuAccessRegWord(sc, 0xF88A, 0xC212);
2366         MP_WriteMcuAccessRegWord(sc, 0xF88C, 0x9543);
2367         MP_WriteMcuAccessRegWord(sc, 0xF88E, 0xE071);
2368         MP_WriteMcuAccessRegWord(sc, 0xF890, 0x49B6);
2369         MP_WriteMcuAccessRegWord(sc, 0xF892, 0xF003);
2370         MP_WriteMcuAccessRegWord(sc, 0xF894, 0x49B3);
2371         MP_WriteMcuAccessRegWord(sc, 0xF896, 0xF10F);
2372         MP_WriteMcuAccessRegWord(sc, 0xF898, 0x4980);
2373         MP_WriteMcuAccessRegWord(sc, 0xF89A, 0xF003);
2374         MP_WriteMcuAccessRegWord(sc, 0xF89C, 0x484E);
2375         MP_WriteMcuAccessRegWord(sc, 0xF89E, 0x94E7);
2376         MP_WriteMcuAccessRegWord(sc, 0xF8A0, 0x4981);
2377         MP_WriteMcuAccessRegWord(sc, 0xF8A2, 0xF004);
2378         MP_WriteMcuAccessRegWord(sc, 0xF8A4, 0x485E);
2379         MP_WriteMcuAccessRegWord(sc, 0xF8A6, 0xC204);
2380         MP_WriteMcuAccessRegWord(sc, 0xF8A8, 0x9543);
2381         MP_WriteMcuAccessRegWord(sc, 0xF8AA, 0xE005);
2382         MP_WriteMcuAccessRegWord(sc, 0xF8AC, 0xE000);
2383         MP_WriteMcuAccessRegWord(sc, 0xF8AE, 0xE0FC);
2384         MP_WriteMcuAccessRegWord(sc, 0xF8B0, 0xE0FA);
2385         MP_WriteMcuAccessRegWord(sc, 0xF8B2, 0xE065);
2386         MP_WriteMcuAccessRegWord(sc, 0xF8B4, 0x49B7);
2387         MP_WriteMcuAccessRegWord(sc, 0xF8B6, 0xF007);
2388         MP_WriteMcuAccessRegWord(sc, 0xF8B8, 0x4980);
2389         MP_WriteMcuAccessRegWord(sc, 0xF8BA, 0xF005);
2390         MP_WriteMcuAccessRegWord(sc, 0xF8BC, 0x1A38);
2391         MP_WriteMcuAccessRegWord(sc, 0xF8BE, 0x46D4);
2392         MP_WriteMcuAccessRegWord(sc, 0xF8C0, 0x1200);
2393         MP_WriteMcuAccessRegWord(sc, 0xF8C2, 0xF109);
2394         MP_WriteMcuAccessRegWord(sc, 0xF8C4, 0x4981);
2395         MP_WriteMcuAccessRegWord(sc, 0xF8C6, 0xF055);
2396         MP_WriteMcuAccessRegWord(sc, 0xF8C8, 0x49C3);
2397         MP_WriteMcuAccessRegWord(sc, 0xF8CA, 0xF105);
2398         MP_WriteMcuAccessRegWord(sc, 0xF8CC, 0x1A30);
2399         MP_WriteMcuAccessRegWord(sc, 0xF8CE, 0x46D5);
2400         MP_WriteMcuAccessRegWord(sc, 0xF8D0, 0x1200);
2401         MP_WriteMcuAccessRegWord(sc, 0xF8D2, 0xF04F);
2402         MP_WriteMcuAccessRegWord(sc, 0xF8D4, 0x7220);
2403         MP_WriteMcuAccessRegWord(sc, 0xF8D6, 0x49A2);
2404         MP_WriteMcuAccessRegWord(sc, 0xF8D8, 0xF130);
2405         MP_WriteMcuAccessRegWord(sc, 0xF8DA, 0x49C1);
2406         MP_WriteMcuAccessRegWord(sc, 0xF8DC, 0xF12E);
2407         MP_WriteMcuAccessRegWord(sc, 0xF8DE, 0x49B0);
2408         MP_WriteMcuAccessRegWord(sc, 0xF8E0, 0xF12C);
2409         MP_WriteMcuAccessRegWord(sc, 0xF8E2, 0xC2E6);
2410         MP_WriteMcuAccessRegWord(sc, 0xF8E4, 0x7240);
2411         MP_WriteMcuAccessRegWord(sc, 0xF8E6, 0x49A8);
2412         MP_WriteMcuAccessRegWord(sc, 0xF8E8, 0xF003);
2413         MP_WriteMcuAccessRegWord(sc, 0xF8EA, 0x49D0);
2414         MP_WriteMcuAccessRegWord(sc, 0xF8EC, 0xF126);
2415         MP_WriteMcuAccessRegWord(sc, 0xF8EE, 0x49A9);
2416         MP_WriteMcuAccessRegWord(sc, 0xF8F0, 0xF003);
2417         MP_WriteMcuAccessRegWord(sc, 0xF8F2, 0x49D1);
2418         MP_WriteMcuAccessRegWord(sc, 0xF8F4, 0xF122);
2419         MP_WriteMcuAccessRegWord(sc, 0xF8F6, 0x49AA);
2420         MP_WriteMcuAccessRegWord(sc, 0xF8F8, 0xF003);
2421         MP_WriteMcuAccessRegWord(sc, 0xF8FA, 0x49D2);
2422         MP_WriteMcuAccessRegWord(sc, 0xF8FC, 0xF11E);
2423         MP_WriteMcuAccessRegWord(sc, 0xF8FE, 0x49AB);
2424         MP_WriteMcuAccessRegWord(sc, 0xF900, 0xF003);
2425         MP_WriteMcuAccessRegWord(sc, 0xF902, 0x49DF);
2426         MP_WriteMcuAccessRegWord(sc, 0xF904, 0xF11A);
2427         MP_WriteMcuAccessRegWord(sc, 0xF906, 0x49AC);
2428         MP_WriteMcuAccessRegWord(sc, 0xF908, 0xF003);
2429         MP_WriteMcuAccessRegWord(sc, 0xF90A, 0x49D3);
2430         MP_WriteMcuAccessRegWord(sc, 0xF90C, 0xF116);
2431         MP_WriteMcuAccessRegWord(sc, 0xF90E, 0x4980);
2432         MP_WriteMcuAccessRegWord(sc, 0xF910, 0xF003);
2433         MP_WriteMcuAccessRegWord(sc, 0xF912, 0x49C7);
2434         MP_WriteMcuAccessRegWord(sc, 0xF914, 0xF105);
2435         MP_WriteMcuAccessRegWord(sc, 0xF916, 0x4981);
2436         MP_WriteMcuAccessRegWord(sc, 0xF918, 0xF02C);
2437         MP_WriteMcuAccessRegWord(sc, 0xF91A, 0x49D7);
2438         MP_WriteMcuAccessRegWord(sc, 0xF91C, 0xF02A);
2439         MP_WriteMcuAccessRegWord(sc, 0xF91E, 0x49C0);
2440         MP_WriteMcuAccessRegWord(sc, 0xF920, 0xF00C);
2441         MP_WriteMcuAccessRegWord(sc, 0xF922, 0xC721);
2442         MP_WriteMcuAccessRegWord(sc, 0xF924, 0x62F4);
2443         MP_WriteMcuAccessRegWord(sc, 0xF926, 0x49A0);
2444         MP_WriteMcuAccessRegWord(sc, 0xF928, 0xF008);
2445         MP_WriteMcuAccessRegWord(sc, 0xF92A, 0x49A4);
2446         MP_WriteMcuAccessRegWord(sc, 0xF92C, 0xF106);
2447         MP_WriteMcuAccessRegWord(sc, 0xF92E, 0x4824);
2448         MP_WriteMcuAccessRegWord(sc, 0xF930, 0x8AF4);
2449         MP_WriteMcuAccessRegWord(sc, 0xF932, 0xC71A);
2450         MP_WriteMcuAccessRegWord(sc, 0xF934, 0x1A40);
2451         MP_WriteMcuAccessRegWord(sc, 0xF936, 0x9AE0);
2452         MP_WriteMcuAccessRegWord(sc, 0xF938, 0x49B6);
2453         MP_WriteMcuAccessRegWord(sc, 0xF93A, 0xF017);
2454         MP_WriteMcuAccessRegWord(sc, 0xF93C, 0x200E);
2455         MP_WriteMcuAccessRegWord(sc, 0xF93E, 0xC7B8);
2456         MP_WriteMcuAccessRegWord(sc, 0xF940, 0x72E0);
2457         MP_WriteMcuAccessRegWord(sc, 0xF942, 0x4710);
2458         MP_WriteMcuAccessRegWord(sc, 0xF944, 0x92E1);
2459         MP_WriteMcuAccessRegWord(sc, 0xF946, 0xC70E);
2460         MP_WriteMcuAccessRegWord(sc, 0xF948, 0x77E0);
2461         MP_WriteMcuAccessRegWord(sc, 0xF94A, 0x49F0);
2462         MP_WriteMcuAccessRegWord(sc, 0xF94C, 0xF112);
2463         MP_WriteMcuAccessRegWord(sc, 0xF94E, 0xC70B);
2464         MP_WriteMcuAccessRegWord(sc, 0xF950, 0x77E0);
2465         MP_WriteMcuAccessRegWord(sc, 0xF952, 0x27FE);
2466         MP_WriteMcuAccessRegWord(sc, 0xF954, 0x1AFA);
2467         MP_WriteMcuAccessRegWord(sc, 0xF956, 0x4317);
2468         MP_WriteMcuAccessRegWord(sc, 0xF958, 0xC705);
2469         MP_WriteMcuAccessRegWord(sc, 0xF95A, 0x9AE2);
2470         MP_WriteMcuAccessRegWord(sc, 0xF95C, 0x1A11);
2471         MP_WriteMcuAccessRegWord(sc, 0xF95E, 0x8AE0);
2472         MP_WriteMcuAccessRegWord(sc, 0xF960, 0xE008);
2473         MP_WriteMcuAccessRegWord(sc, 0xF962, 0xE41C);
2474         MP_WriteMcuAccessRegWord(sc, 0xF964, 0xC0AE);
2475         MP_WriteMcuAccessRegWord(sc, 0xF966, 0xD23A);
2476         MP_WriteMcuAccessRegWord(sc, 0xF968, 0xC7A2);
2477         MP_WriteMcuAccessRegWord(sc, 0xF96A, 0x74E6);
2478         MP_WriteMcuAccessRegWord(sc, 0xF96C, 0x484F);
2479         MP_WriteMcuAccessRegWord(sc, 0xF96E, 0x94E7);
2480         MP_WriteMcuAccessRegWord(sc, 0xF970, 0xC79E);
2481         MP_WriteMcuAccessRegWord(sc, 0xF972, 0x8CE6);
2482         MP_WriteMcuAccessRegWord(sc, 0xF974, 0x8BEC);
2483         MP_WriteMcuAccessRegWord(sc, 0xF976, 0xC29C);
2484         MP_WriteMcuAccessRegWord(sc, 0xF978, 0x8D42);
2485         MP_WriteMcuAccessRegWord(sc, 0xF97A, 0x7220);
2486         MP_WriteMcuAccessRegWord(sc, 0xF97C, 0xB000);
2487         MP_WriteMcuAccessRegWord(sc, 0xF97E, 0xC502);
2488         MP_WriteMcuAccessRegWord(sc, 0xF980, 0xBD00);
2489         MP_WriteMcuAccessRegWord(sc, 0xF982, 0x0932);
2490         MP_WriteMcuAccessRegWord(sc, 0xF984, 0xB400);
2491         MP_WriteMcuAccessRegWord(sc, 0xF986, 0xC240);
2492         MP_WriteMcuAccessRegWord(sc, 0xF988, 0xC340);
2493         MP_WriteMcuAccessRegWord(sc, 0xF98A, 0x7060);
2494         MP_WriteMcuAccessRegWord(sc, 0xF98C, 0x498F);
2495         MP_WriteMcuAccessRegWord(sc, 0xF98E, 0xF014);
2496         MP_WriteMcuAccessRegWord(sc, 0xF990, 0x488F);
2497         MP_WriteMcuAccessRegWord(sc, 0xF992, 0x9061);
2498         MP_WriteMcuAccessRegWord(sc, 0xF994, 0x744C);
2499         MP_WriteMcuAccessRegWord(sc, 0xF996, 0x49C3);
2500         MP_WriteMcuAccessRegWord(sc, 0xF998, 0xF004);
2501         MP_WriteMcuAccessRegWord(sc, 0xF99A, 0x7562);
2502         MP_WriteMcuAccessRegWord(sc, 0xF99C, 0x485E);
2503         MP_WriteMcuAccessRegWord(sc, 0xF99E, 0x9563);
2504         MP_WriteMcuAccessRegWord(sc, 0xF9A0, 0x7446);
2505         MP_WriteMcuAccessRegWord(sc, 0xF9A2, 0x49C3);
2506         MP_WriteMcuAccessRegWord(sc, 0xF9A4, 0xF106);
2507         MP_WriteMcuAccessRegWord(sc, 0xF9A6, 0x7562);
2508         MP_WriteMcuAccessRegWord(sc, 0xF9A8, 0x1C30);
2509         MP_WriteMcuAccessRegWord(sc, 0xF9AA, 0x46E5);
2510         MP_WriteMcuAccessRegWord(sc, 0xF9AC, 0x1200);
2511         MP_WriteMcuAccessRegWord(sc, 0xF9AE, 0xF004);
2512         MP_WriteMcuAccessRegWord(sc, 0xF9B0, 0x7446);
2513         MP_WriteMcuAccessRegWord(sc, 0xF9B2, 0x484F);
2514         MP_WriteMcuAccessRegWord(sc, 0xF9B4, 0x9447);
2515         MP_WriteMcuAccessRegWord(sc, 0xF9B6, 0xC32A);
2516         MP_WriteMcuAccessRegWord(sc, 0xF9B8, 0x7466);
2517         MP_WriteMcuAccessRegWord(sc, 0xF9BA, 0x49C0);
2518         MP_WriteMcuAccessRegWord(sc, 0xF9BC, 0xF00F);
2519         MP_WriteMcuAccessRegWord(sc, 0xF9BE, 0x48C0);
2520         MP_WriteMcuAccessRegWord(sc, 0xF9C0, 0x9C66);
2521         MP_WriteMcuAccessRegWord(sc, 0xF9C2, 0x7446);
2522         MP_WriteMcuAccessRegWord(sc, 0xF9C4, 0x4840);
2523         MP_WriteMcuAccessRegWord(sc, 0xF9C6, 0x4841);
2524         MP_WriteMcuAccessRegWord(sc, 0xF9C8, 0x4842);
2525         MP_WriteMcuAccessRegWord(sc, 0xF9CA, 0x9C46);
2526         MP_WriteMcuAccessRegWord(sc, 0xF9CC, 0x744C);
2527         MP_WriteMcuAccessRegWord(sc, 0xF9CE, 0x4840);
2528         MP_WriteMcuAccessRegWord(sc, 0xF9D0, 0x9C4C);
2529         MP_WriteMcuAccessRegWord(sc, 0xF9D2, 0x744A);
2530         MP_WriteMcuAccessRegWord(sc, 0xF9D4, 0x484A);
2531         MP_WriteMcuAccessRegWord(sc, 0xF9D6, 0x9C4A);
2532         MP_WriteMcuAccessRegWord(sc, 0xF9D8, 0xE013);
2533         MP_WriteMcuAccessRegWord(sc, 0xF9DA, 0x498E);
2534         MP_WriteMcuAccessRegWord(sc, 0xF9DC, 0xF011);
2535         MP_WriteMcuAccessRegWord(sc, 0xF9DE, 0x488E);
2536         MP_WriteMcuAccessRegWord(sc, 0xF9E0, 0x9061);
2537         MP_WriteMcuAccessRegWord(sc, 0xF9E2, 0x744C);
2538         MP_WriteMcuAccessRegWord(sc, 0xF9E4, 0x49C3);
2539         MP_WriteMcuAccessRegWord(sc, 0xF9E6, 0xF004);
2540         MP_WriteMcuAccessRegWord(sc, 0xF9E8, 0x7446);
2541         MP_WriteMcuAccessRegWord(sc, 0xF9EA, 0x484E);
2542         MP_WriteMcuAccessRegWord(sc, 0xF9EC, 0x9447);
2543         MP_WriteMcuAccessRegWord(sc, 0xF9EE, 0x7446);
2544         MP_WriteMcuAccessRegWord(sc, 0xF9F0, 0x1D38);
2545         MP_WriteMcuAccessRegWord(sc, 0xF9F2, 0x46EC);
2546         MP_WriteMcuAccessRegWord(sc, 0xF9F4, 0x1500);
2547         MP_WriteMcuAccessRegWord(sc, 0xF9F6, 0xF004);
2548         MP_WriteMcuAccessRegWord(sc, 0xF9F8, 0x7446);
2549         MP_WriteMcuAccessRegWord(sc, 0xF9FA, 0x484F);
2550         MP_WriteMcuAccessRegWord(sc, 0xF9FC, 0x9447);
2551         MP_WriteMcuAccessRegWord(sc, 0xF9FE, 0xB000);
2552         MP_WriteMcuAccessRegWord(sc, 0xFA00, 0xC502);
2553         MP_WriteMcuAccessRegWord(sc, 0xFA02, 0xBD00);
2554         MP_WriteMcuAccessRegWord(sc, 0xFA04, 0x074C);
2555         MP_WriteMcuAccessRegWord(sc, 0xFA06, 0xE000);
2556         MP_WriteMcuAccessRegWord(sc, 0xFA08, 0xE0FC);
2557         MP_WriteMcuAccessRegWord(sc, 0xFA0A, 0xE0C0);
2558         MP_WriteMcuAccessRegWord(sc, 0xFA0C, 0x4830);
2559         MP_WriteMcuAccessRegWord(sc, 0xFA0E, 0x4837);
2560         MP_WriteMcuAccessRegWord(sc, 0xFA10, 0xC502);
2561         MP_WriteMcuAccessRegWord(sc, 0xFA12, 0xBD00);
2562         MP_WriteMcuAccessRegWord(sc, 0xFA14, 0x0978);
2563         MP_WriteMcuAccessRegWord(sc, 0xFA16, 0x63E2);
2564         MP_WriteMcuAccessRegWord(sc, 0xFA18, 0x4830);
2565         MP_WriteMcuAccessRegWord(sc, 0xFA1A, 0x4837);
2566         MP_WriteMcuAccessRegWord(sc, 0xFA1C, 0xC502);
2567         MP_WriteMcuAccessRegWord(sc, 0xFA1E, 0xBD00);
2568         MP_WriteMcuAccessRegWord(sc, 0xFA20, 0x09FE);
2569         MP_WriteMcuAccessRegWord(sc, 0xFA22, 0x73E2);
2570         MP_WriteMcuAccessRegWord(sc, 0xFA24, 0x4830);
2571         MP_WriteMcuAccessRegWord(sc, 0xFA26, 0x8BE2);
2572         MP_WriteMcuAccessRegWord(sc, 0xFA28, 0xC302);
2573         MP_WriteMcuAccessRegWord(sc, 0xFA2A, 0xBB00);
2574         MP_WriteMcuAccessRegWord(sc, 0xFA2C, 0x0A12);
2575         MP_WriteMcuAccessRegWord(sc, 0xFA2E, 0x73E2);
2576         MP_WriteMcuAccessRegWord(sc, 0xFA30, 0x48B0);
2577         MP_WriteMcuAccessRegWord(sc, 0xFA32, 0x48B3);
2578         MP_WriteMcuAccessRegWord(sc, 0xFA34, 0x48B4);
2579         MP_WriteMcuAccessRegWord(sc, 0xFA36, 0x48B5);
2580         MP_WriteMcuAccessRegWord(sc, 0xFA38, 0x48B6);
2581         MP_WriteMcuAccessRegWord(sc, 0xFA3A, 0x48B7);
2582         MP_WriteMcuAccessRegWord(sc, 0xFA3C, 0x8BE2);
2583         MP_WriteMcuAccessRegWord(sc, 0xFA3E, 0xC302);
2584         MP_WriteMcuAccessRegWord(sc, 0xFA40, 0xBB00);
2585         MP_WriteMcuAccessRegWord(sc, 0xFA42, 0x0A5A);
2586         MP_WriteMcuAccessRegWord(sc, 0xFA44, 0x73E2);
2587         MP_WriteMcuAccessRegWord(sc, 0xFA46, 0x4830);
2588         MP_WriteMcuAccessRegWord(sc, 0xFA48, 0x8BE2);
2589         MP_WriteMcuAccessRegWord(sc, 0xFA4A, 0xC302);
2590         MP_WriteMcuAccessRegWord(sc, 0xFA4C, 0xBB00);
2591         MP_WriteMcuAccessRegWord(sc, 0xFA4E, 0x0A6C);
2592         MP_WriteMcuAccessRegWord(sc, 0xFA50, 0x73E2);
2593         MP_WriteMcuAccessRegWord(sc, 0xFA52, 0x4830);
2594         MP_WriteMcuAccessRegWord(sc, 0xFA54, 0x4837);
2595         MP_WriteMcuAccessRegWord(sc, 0xFA56, 0xC502);
2596         MP_WriteMcuAccessRegWord(sc, 0xFA58, 0xBD00);
2597         MP_WriteMcuAccessRegWord(sc, 0xFA5A, 0x0A86);
2598 
2599         MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
2600 
2601         MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x0890);
2602         MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x0712);
2603         MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x0974);
2604         MP_WriteMcuAccessRegWord(sc, 0xFC2E, 0x09FC);
2605         MP_WriteMcuAccessRegWord(sc, 0xFC30, 0x0A0E);
2606         MP_WriteMcuAccessRegWord(sc, 0xFC32, 0x0A56);
2607         MP_WriteMcuAccessRegWord(sc, 0xFC34, 0x0A68);
2608         MP_WriteMcuAccessRegWord(sc, 0xFC36, 0x0A84);
2609 
2610         if (sc->HwPkgDet == 0x0)
2611                 MP_WriteMcuAccessRegWord(sc, 0xFC38, 0x00FC);
2612         else if(sc->HwPkgDet == 0xF)
2613                 MP_WriteMcuAccessRegWord(sc, 0xFC38, 0x00FF);
2614 }
2615 
2616 static void re_set_mac_mcu_8168fp_2(struct re_softc *sc)
2617 {
2618         DisableMcuBPs(sc);
2619 
2620         MP_WriteMcuAccessRegWord(sc, 0xF800, 0xE008);
2621         MP_WriteMcuAccessRegWord(sc, 0xF802, 0xE00A);
2622         MP_WriteMcuAccessRegWord(sc, 0xF804, 0xE031);
2623         MP_WriteMcuAccessRegWord(sc, 0xF806, 0xE033);
2624         MP_WriteMcuAccessRegWord(sc, 0xF808, 0xE035);
2625         MP_WriteMcuAccessRegWord(sc, 0xF80A, 0xE144);
2626         MP_WriteMcuAccessRegWord(sc, 0xF80C, 0xE166);
2627         MP_WriteMcuAccessRegWord(sc, 0xF80E, 0xE168);
2628         MP_WriteMcuAccessRegWord(sc, 0xF810, 0xC502);
2629         MP_WriteMcuAccessRegWord(sc, 0xF812, 0xBD00);
2630         MP_WriteMcuAccessRegWord(sc, 0xF814, 0x0000);
2631         MP_WriteMcuAccessRegWord(sc, 0xF816, 0xC725);
2632         MP_WriteMcuAccessRegWord(sc, 0xF818, 0x75E0);
2633         MP_WriteMcuAccessRegWord(sc, 0xF81A, 0x48D0);
2634         MP_WriteMcuAccessRegWord(sc, 0xF81C, 0x9DE0);
2635         MP_WriteMcuAccessRegWord(sc, 0xF81E, 0xC722);
2636         MP_WriteMcuAccessRegWord(sc, 0xF820, 0x75E0);
2637         MP_WriteMcuAccessRegWord(sc, 0xF822, 0x1C78);
2638         MP_WriteMcuAccessRegWord(sc, 0xF824, 0x416C);
2639         MP_WriteMcuAccessRegWord(sc, 0xF826, 0x1530);
2640         MP_WriteMcuAccessRegWord(sc, 0xF828, 0xF111);
2641         MP_WriteMcuAccessRegWord(sc, 0xF82A, 0xC71D);
2642         MP_WriteMcuAccessRegWord(sc, 0xF82C, 0x75F6);
2643         MP_WriteMcuAccessRegWord(sc, 0xF82E, 0x49D1);
2644         MP_WriteMcuAccessRegWord(sc, 0xF830, 0xF00D);
2645         MP_WriteMcuAccessRegWord(sc, 0xF832, 0x75E0);
2646         MP_WriteMcuAccessRegWord(sc, 0xF834, 0x1C1F);
2647         MP_WriteMcuAccessRegWord(sc, 0xF836, 0x416C);
2648         MP_WriteMcuAccessRegWord(sc, 0xF838, 0x1502);
2649         MP_WriteMcuAccessRegWord(sc, 0xF83A, 0xF108);
2650         MP_WriteMcuAccessRegWord(sc, 0xF83C, 0x75FA);
2651         MP_WriteMcuAccessRegWord(sc, 0xF83E, 0x49D3);
2652         MP_WriteMcuAccessRegWord(sc, 0xF840, 0xF005);
2653         MP_WriteMcuAccessRegWord(sc, 0xF842, 0x75EC);
2654         MP_WriteMcuAccessRegWord(sc, 0xF844, 0x9DE4);
2655         MP_WriteMcuAccessRegWord(sc, 0xF846, 0x4853);
2656         MP_WriteMcuAccessRegWord(sc, 0xF848, 0x9DFA);
2657         MP_WriteMcuAccessRegWord(sc, 0xF84A, 0xC70B);
2658         MP_WriteMcuAccessRegWord(sc, 0xF84C, 0x75E0);
2659         MP_WriteMcuAccessRegWord(sc, 0xF84E, 0x4852);
2660         MP_WriteMcuAccessRegWord(sc, 0xF850, 0x4850);
2661         MP_WriteMcuAccessRegWord(sc, 0xF852, 0x9DE0);
2662         MP_WriteMcuAccessRegWord(sc, 0xF854, 0xC602);
2663         MP_WriteMcuAccessRegWord(sc, 0xF856, 0xBE00);
2664         MP_WriteMcuAccessRegWord(sc, 0xF858, 0x04B8);
2665         MP_WriteMcuAccessRegWord(sc, 0xF85A, 0xE420);
2666         MP_WriteMcuAccessRegWord(sc, 0xF85C, 0xE000);
2667         MP_WriteMcuAccessRegWord(sc, 0xF85E, 0xE0FC);
2668         MP_WriteMcuAccessRegWord(sc, 0xF860, 0xE43C);
2669         MP_WriteMcuAccessRegWord(sc, 0xF862, 0xDC00);
2670         MP_WriteMcuAccessRegWord(sc, 0xF864, 0xEB00);
2671         MP_WriteMcuAccessRegWord(sc, 0xF866, 0xC202);
2672         MP_WriteMcuAccessRegWord(sc, 0xF868, 0xBA00);
2673         MP_WriteMcuAccessRegWord(sc, 0xF86A, 0x0000);
2674         MP_WriteMcuAccessRegWord(sc, 0xF86C, 0xC002);
2675         MP_WriteMcuAccessRegWord(sc, 0xF86E, 0xB800);
2676         MP_WriteMcuAccessRegWord(sc, 0xF870, 0x0000);
2677         MP_WriteMcuAccessRegWord(sc, 0xF872, 0xB401);
2678         MP_WriteMcuAccessRegWord(sc, 0xF874, 0xB402);
2679         MP_WriteMcuAccessRegWord(sc, 0xF876, 0xB403);
2680         MP_WriteMcuAccessRegWord(sc, 0xF878, 0xB404);
2681         MP_WriteMcuAccessRegWord(sc, 0xF87A, 0xB405);
2682         MP_WriteMcuAccessRegWord(sc, 0xF87C, 0xB406);
2683         MP_WriteMcuAccessRegWord(sc, 0xF87E, 0xC44D);
2684         MP_WriteMcuAccessRegWord(sc, 0xF880, 0xC54D);
2685         MP_WriteMcuAccessRegWord(sc, 0xF882, 0x1867);
2686         MP_WriteMcuAccessRegWord(sc, 0xF884, 0xE8A2);
2687         MP_WriteMcuAccessRegWord(sc, 0xF886, 0x2318);
2688         MP_WriteMcuAccessRegWord(sc, 0xF888, 0x276E);
2689         MP_WriteMcuAccessRegWord(sc, 0xF88A, 0x1601);
2690         MP_WriteMcuAccessRegWord(sc, 0xF88C, 0xF106);
2691         MP_WriteMcuAccessRegWord(sc, 0xF88E, 0x1A07);
2692         MP_WriteMcuAccessRegWord(sc, 0xF890, 0xE861);
2693         MP_WriteMcuAccessRegWord(sc, 0xF892, 0xE86B);
2694         MP_WriteMcuAccessRegWord(sc, 0xF894, 0xE873);
2695         MP_WriteMcuAccessRegWord(sc, 0xF896, 0xE037);
2696         MP_WriteMcuAccessRegWord(sc, 0xF898, 0x231E);
2697         MP_WriteMcuAccessRegWord(sc, 0xF89A, 0x276E);
2698         MP_WriteMcuAccessRegWord(sc, 0xF89C, 0x1602);
2699         MP_WriteMcuAccessRegWord(sc, 0xF89E, 0xF10B);
2700         MP_WriteMcuAccessRegWord(sc, 0xF8A0, 0x1A07);
2701         MP_WriteMcuAccessRegWord(sc, 0xF8A2, 0xE858);
2702         MP_WriteMcuAccessRegWord(sc, 0xF8A4, 0xE862);
2703         MP_WriteMcuAccessRegWord(sc, 0xF8A6, 0xC247);
2704         MP_WriteMcuAccessRegWord(sc, 0xF8A8, 0xC344);
2705         MP_WriteMcuAccessRegWord(sc, 0xF8AA, 0xE8E3);
2706         MP_WriteMcuAccessRegWord(sc, 0xF8AC, 0xC73B);
2707         MP_WriteMcuAccessRegWord(sc, 0xF8AE, 0x66E0);
2708         MP_WriteMcuAccessRegWord(sc, 0xF8B0, 0xE8B5);
2709         MP_WriteMcuAccessRegWord(sc, 0xF8B2, 0xE029);
2710         MP_WriteMcuAccessRegWord(sc, 0xF8B4, 0x231A);
2711         MP_WriteMcuAccessRegWord(sc, 0xF8B6, 0x276C);
2712         MP_WriteMcuAccessRegWord(sc, 0xF8B8, 0xC733);
2713         MP_WriteMcuAccessRegWord(sc, 0xF8BA, 0x9EE0);
2714         MP_WriteMcuAccessRegWord(sc, 0xF8BC, 0x1866);
2715         MP_WriteMcuAccessRegWord(sc, 0xF8BE, 0xE885);
2716         MP_WriteMcuAccessRegWord(sc, 0xF8C0, 0x251C);
2717         MP_WriteMcuAccessRegWord(sc, 0xF8C2, 0x120F);
2718         MP_WriteMcuAccessRegWord(sc, 0xF8C4, 0xF011);
2719         MP_WriteMcuAccessRegWord(sc, 0xF8C6, 0x1209);
2720         MP_WriteMcuAccessRegWord(sc, 0xF8C8, 0xF011);
2721         MP_WriteMcuAccessRegWord(sc, 0xF8CA, 0x2014);
2722         MP_WriteMcuAccessRegWord(sc, 0xF8CC, 0x240E);
2723         MP_WriteMcuAccessRegWord(sc, 0xF8CE, 0x1000);
2724         MP_WriteMcuAccessRegWord(sc, 0xF8D0, 0xF007);
2725         MP_WriteMcuAccessRegWord(sc, 0xF8D2, 0x120C);
2726         MP_WriteMcuAccessRegWord(sc, 0xF8D4, 0xF00D);
2727         MP_WriteMcuAccessRegWord(sc, 0xF8D6, 0x1203);
2728         MP_WriteMcuAccessRegWord(sc, 0xF8D8, 0xF00D);
2729         MP_WriteMcuAccessRegWord(sc, 0xF8DA, 0x1200);
2730         MP_WriteMcuAccessRegWord(sc, 0xF8DC, 0xF00D);
2731         MP_WriteMcuAccessRegWord(sc, 0xF8DE, 0x120C);
2732         MP_WriteMcuAccessRegWord(sc, 0xF8E0, 0xF00D);
2733         MP_WriteMcuAccessRegWord(sc, 0xF8E2, 0x1203);
2734         MP_WriteMcuAccessRegWord(sc, 0xF8E4, 0xF00D);
2735         MP_WriteMcuAccessRegWord(sc, 0xF8E6, 0x1A03);
2736         MP_WriteMcuAccessRegWord(sc, 0xF8E8, 0xE00C);
2737         MP_WriteMcuAccessRegWord(sc, 0xF8EA, 0x1A07);
2738         MP_WriteMcuAccessRegWord(sc, 0xF8EC, 0xE00A);
2739         MP_WriteMcuAccessRegWord(sc, 0xF8EE, 0x1A00);
2740         MP_WriteMcuAccessRegWord(sc, 0xF8F0, 0xE008);
2741         MP_WriteMcuAccessRegWord(sc, 0xF8F2, 0x1A01);
2742         MP_WriteMcuAccessRegWord(sc, 0xF8F4, 0xE006);
2743         MP_WriteMcuAccessRegWord(sc, 0xF8F6, 0x1A02);
2744         MP_WriteMcuAccessRegWord(sc, 0xF8F8, 0xE004);
2745         MP_WriteMcuAccessRegWord(sc, 0xF8FA, 0x1A04);
2746         MP_WriteMcuAccessRegWord(sc, 0xF8FC, 0xE002);
2747         MP_WriteMcuAccessRegWord(sc, 0xF8FE, 0x1A05);
2748         MP_WriteMcuAccessRegWord(sc, 0xF900, 0xE829);
2749         MP_WriteMcuAccessRegWord(sc, 0xF902, 0xE833);
2750         MP_WriteMcuAccessRegWord(sc, 0xF904, 0xB006);
2751         MP_WriteMcuAccessRegWord(sc, 0xF906, 0xB005);
2752         MP_WriteMcuAccessRegWord(sc, 0xF908, 0xB004);
2753         MP_WriteMcuAccessRegWord(sc, 0xF90A, 0xB003);
2754         MP_WriteMcuAccessRegWord(sc, 0xF90C, 0xB002);
2755         MP_WriteMcuAccessRegWord(sc, 0xF90E, 0xB001);
2756         MP_WriteMcuAccessRegWord(sc, 0xF910, 0x60C4);
2757         MP_WriteMcuAccessRegWord(sc, 0xF912, 0xC702);
2758         MP_WriteMcuAccessRegWord(sc, 0xF914, 0xBF00);
2759         MP_WriteMcuAccessRegWord(sc, 0xF916, 0x2786);
2760         MP_WriteMcuAccessRegWord(sc, 0xF918, 0xDD00);
2761         MP_WriteMcuAccessRegWord(sc, 0xF91A, 0xD030);
2762         MP_WriteMcuAccessRegWord(sc, 0xF91C, 0xE0C4);
2763         MP_WriteMcuAccessRegWord(sc, 0xF91E, 0xE0F8);
2764         MP_WriteMcuAccessRegWord(sc, 0xF920, 0xDC42);
2765         MP_WriteMcuAccessRegWord(sc, 0xF922, 0xD3F0);
2766         MP_WriteMcuAccessRegWord(sc, 0xF924, 0x0000);
2767         MP_WriteMcuAccessRegWord(sc, 0xF926, 0x0004);
2768         MP_WriteMcuAccessRegWord(sc, 0xF928, 0x0007);
2769         MP_WriteMcuAccessRegWord(sc, 0xF92A, 0x0014);
2770         MP_WriteMcuAccessRegWord(sc, 0xF92C, 0x0090);
2771         MP_WriteMcuAccessRegWord(sc, 0xF92E, 0x1000);
2772         MP_WriteMcuAccessRegWord(sc, 0xF930, 0x0F00);
2773         MP_WriteMcuAccessRegWord(sc, 0xF932, 0x1004);
2774         MP_WriteMcuAccessRegWord(sc, 0xF934, 0x1008);
2775         MP_WriteMcuAccessRegWord(sc, 0xF936, 0x3000);
2776         MP_WriteMcuAccessRegWord(sc, 0xF938, 0x3004);
2777         MP_WriteMcuAccessRegWord(sc, 0xF93A, 0x3008);
2778         MP_WriteMcuAccessRegWord(sc, 0xF93C, 0x4000);
2779         MP_WriteMcuAccessRegWord(sc, 0xF93E, 0x7777);
2780         MP_WriteMcuAccessRegWord(sc, 0xF940, 0x8000);
2781         MP_WriteMcuAccessRegWord(sc, 0xF942, 0x8001);
2782         MP_WriteMcuAccessRegWord(sc, 0xF944, 0x8008);
2783         MP_WriteMcuAccessRegWord(sc, 0xF946, 0x8003);
2784         MP_WriteMcuAccessRegWord(sc, 0xF948, 0x8004);
2785         MP_WriteMcuAccessRegWord(sc, 0xF94A, 0xC000);
2786         MP_WriteMcuAccessRegWord(sc, 0xF94C, 0xC004);
2787         MP_WriteMcuAccessRegWord(sc, 0xF94E, 0xF004);
2788         MP_WriteMcuAccessRegWord(sc, 0xF950, 0xFFFF);
2789         MP_WriteMcuAccessRegWord(sc, 0xF952, 0xB406);
2790         MP_WriteMcuAccessRegWord(sc, 0xF954, 0xB407);
2791         MP_WriteMcuAccessRegWord(sc, 0xF956, 0xC6E5);
2792         MP_WriteMcuAccessRegWord(sc, 0xF958, 0x77C0);
2793         MP_WriteMcuAccessRegWord(sc, 0xF95A, 0x27F3);
2794         MP_WriteMcuAccessRegWord(sc, 0xF95C, 0x23F3);
2795         MP_WriteMcuAccessRegWord(sc, 0xF95E, 0x47FA);
2796         MP_WriteMcuAccessRegWord(sc, 0xF960, 0x9FC0);
2797         MP_WriteMcuAccessRegWord(sc, 0xF962, 0xB007);
2798         MP_WriteMcuAccessRegWord(sc, 0xF964, 0xB006);
2799         MP_WriteMcuAccessRegWord(sc, 0xF966, 0xFF80);
2800         MP_WriteMcuAccessRegWord(sc, 0xF968, 0xB405);
2801         MP_WriteMcuAccessRegWord(sc, 0xF96A, 0xB407);
2802         MP_WriteMcuAccessRegWord(sc, 0xF96C, 0xC7D8);
2803         MP_WriteMcuAccessRegWord(sc, 0xF96E, 0x75E0);
2804         MP_WriteMcuAccessRegWord(sc, 0xF970, 0x48D0);
2805         MP_WriteMcuAccessRegWord(sc, 0xF972, 0x9DE0);
2806         MP_WriteMcuAccessRegWord(sc, 0xF974, 0xB007);
2807         MP_WriteMcuAccessRegWord(sc, 0xF976, 0xB005);
2808         MP_WriteMcuAccessRegWord(sc, 0xF978, 0xFF80);
2809         MP_WriteMcuAccessRegWord(sc, 0xF97A, 0xB401);
2810         MP_WriteMcuAccessRegWord(sc, 0xF97C, 0xC0EA);
2811         MP_WriteMcuAccessRegWord(sc, 0xF97E, 0xC2DC);
2812         MP_WriteMcuAccessRegWord(sc, 0xF980, 0xC3D8);
2813         MP_WriteMcuAccessRegWord(sc, 0xF982, 0xE865);
2814         MP_WriteMcuAccessRegWord(sc, 0xF984, 0xC0D3);
2815         MP_WriteMcuAccessRegWord(sc, 0xF986, 0xC1E0);
2816         MP_WriteMcuAccessRegWord(sc, 0xF988, 0xC2E3);
2817         MP_WriteMcuAccessRegWord(sc, 0xF98A, 0xE861);
2818         MP_WriteMcuAccessRegWord(sc, 0xF98C, 0xE817);
2819         MP_WriteMcuAccessRegWord(sc, 0xF98E, 0xC0CD);
2820         MP_WriteMcuAccessRegWord(sc, 0xF990, 0xC2CF);
2821         MP_WriteMcuAccessRegWord(sc, 0xF992, 0xE85D);
2822         MP_WriteMcuAccessRegWord(sc, 0xF994, 0xC0C9);
2823         MP_WriteMcuAccessRegWord(sc, 0xF996, 0xC1D6);
2824         MP_WriteMcuAccessRegWord(sc, 0xF998, 0xC2DB);
2825         MP_WriteMcuAccessRegWord(sc, 0xF99A, 0xE859);
2826         MP_WriteMcuAccessRegWord(sc, 0xF99C, 0xE80F);
2827         MP_WriteMcuAccessRegWord(sc, 0xF99E, 0xC1C7);
2828         MP_WriteMcuAccessRegWord(sc, 0xF9A0, 0xC2CE);
2829         MP_WriteMcuAccessRegWord(sc, 0xF9A2, 0xE855);
2830         MP_WriteMcuAccessRegWord(sc, 0xF9A4, 0xC0C0);
2831         MP_WriteMcuAccessRegWord(sc, 0xF9A6, 0xC1D1);
2832         MP_WriteMcuAccessRegWord(sc, 0xF9A8, 0xC2D3);
2833         MP_WriteMcuAccessRegWord(sc, 0xF9AA, 0xE851);
2834         MP_WriteMcuAccessRegWord(sc, 0xF9AC, 0xE807);
2835         MP_WriteMcuAccessRegWord(sc, 0xF9AE, 0xC0BE);
2836         MP_WriteMcuAccessRegWord(sc, 0xF9B0, 0xC2C2);
2837         MP_WriteMcuAccessRegWord(sc, 0xF9B2, 0xE84D);
2838         MP_WriteMcuAccessRegWord(sc, 0xF9B4, 0xE803);
2839         MP_WriteMcuAccessRegWord(sc, 0xF9B6, 0xB001);
2840         MP_WriteMcuAccessRegWord(sc, 0xF9B8, 0xFF80);
2841         MP_WriteMcuAccessRegWord(sc, 0xF9BA, 0xB402);
2842         MP_WriteMcuAccessRegWord(sc, 0xF9BC, 0xC2C6);
2843         MP_WriteMcuAccessRegWord(sc, 0xF9BE, 0xE859);
2844         MP_WriteMcuAccessRegWord(sc, 0xF9C0, 0x499F);
2845         MP_WriteMcuAccessRegWord(sc, 0xF9C2, 0xF1FE);
2846         MP_WriteMcuAccessRegWord(sc, 0xF9C4, 0xB002);
2847         MP_WriteMcuAccessRegWord(sc, 0xF9C6, 0xFF80);
2848         MP_WriteMcuAccessRegWord(sc, 0xF9C8, 0xB402);
2849         MP_WriteMcuAccessRegWord(sc, 0xF9CA, 0xB403);
2850         MP_WriteMcuAccessRegWord(sc, 0xF9CC, 0xB407);
2851         MP_WriteMcuAccessRegWord(sc, 0xF9CE, 0xE821);
2852         MP_WriteMcuAccessRegWord(sc, 0xF9D0, 0x8882);
2853         MP_WriteMcuAccessRegWord(sc, 0xF9D2, 0x1980);
2854         MP_WriteMcuAccessRegWord(sc, 0xF9D4, 0x8983);
2855         MP_WriteMcuAccessRegWord(sc, 0xF9D6, 0xE81D);
2856         MP_WriteMcuAccessRegWord(sc, 0xF9D8, 0x7180);
2857         MP_WriteMcuAccessRegWord(sc, 0xF9DA, 0x218B);
2858         MP_WriteMcuAccessRegWord(sc, 0xF9DC, 0x25BB);
2859         MP_WriteMcuAccessRegWord(sc, 0xF9DE, 0x1310);
2860         MP_WriteMcuAccessRegWord(sc, 0xF9E0, 0xF014);
2861         MP_WriteMcuAccessRegWord(sc, 0xF9E2, 0x1310);
2862         MP_WriteMcuAccessRegWord(sc, 0xF9E4, 0xFB03);
2863         MP_WriteMcuAccessRegWord(sc, 0xF9E6, 0x1F20);
2864         MP_WriteMcuAccessRegWord(sc, 0xF9E8, 0x38FB);
2865         MP_WriteMcuAccessRegWord(sc, 0xF9EA, 0x3288);
2866         MP_WriteMcuAccessRegWord(sc, 0xF9EC, 0x434B);
2867         MP_WriteMcuAccessRegWord(sc, 0xF9EE, 0x2491);
2868         MP_WriteMcuAccessRegWord(sc, 0xF9F0, 0x430B);
2869         MP_WriteMcuAccessRegWord(sc, 0xF9F2, 0x1F0F);
2870         MP_WriteMcuAccessRegWord(sc, 0xF9F4, 0x38FB);
2871         MP_WriteMcuAccessRegWord(sc, 0xF9F6, 0x4313);
2872         MP_WriteMcuAccessRegWord(sc, 0xF9F8, 0x2121);
2873         MP_WriteMcuAccessRegWord(sc, 0xF9FA, 0x4353);
2874         MP_WriteMcuAccessRegWord(sc, 0xF9FC, 0x2521);
2875         MP_WriteMcuAccessRegWord(sc, 0xF9FE, 0x418A);
2876         MP_WriteMcuAccessRegWord(sc, 0xFA00, 0x6282);
2877         MP_WriteMcuAccessRegWord(sc, 0xFA02, 0x2527);
2878         MP_WriteMcuAccessRegWord(sc, 0xFA04, 0x212F);
2879         MP_WriteMcuAccessRegWord(sc, 0xFA06, 0x418A);
2880         MP_WriteMcuAccessRegWord(sc, 0xFA08, 0xB007);
2881         MP_WriteMcuAccessRegWord(sc, 0xFA0A, 0xB003);
2882         MP_WriteMcuAccessRegWord(sc, 0xFA0C, 0xB002);
2883         MP_WriteMcuAccessRegWord(sc, 0xFA0E, 0xFF80);
2884         MP_WriteMcuAccessRegWord(sc, 0xFA10, 0x6183);
2885         MP_WriteMcuAccessRegWord(sc, 0xFA12, 0x2496);
2886         MP_WriteMcuAccessRegWord(sc, 0xFA14, 0x1100);
2887         MP_WriteMcuAccessRegWord(sc, 0xFA16, 0xF1FD);
2888         MP_WriteMcuAccessRegWord(sc, 0xFA18, 0xFF80);
2889         MP_WriteMcuAccessRegWord(sc, 0xFA1A, 0x4800);
2890         MP_WriteMcuAccessRegWord(sc, 0xFA1C, 0x4801);
2891         MP_WriteMcuAccessRegWord(sc, 0xFA1E, 0xC213);
2892         MP_WriteMcuAccessRegWord(sc, 0xFA20, 0xC313);
2893         MP_WriteMcuAccessRegWord(sc, 0xFA22, 0xE815);
2894         MP_WriteMcuAccessRegWord(sc, 0xFA24, 0x4860);
2895         MP_WriteMcuAccessRegWord(sc, 0xFA26, 0x8EE0);
2896         MP_WriteMcuAccessRegWord(sc, 0xFA28, 0xC210);
2897         MP_WriteMcuAccessRegWord(sc, 0xFA2A, 0xC310);
2898         MP_WriteMcuAccessRegWord(sc, 0xFA2C, 0xE822);
2899         MP_WriteMcuAccessRegWord(sc, 0xFA2E, 0x481E);
2900         MP_WriteMcuAccessRegWord(sc, 0xFA30, 0xC20C);
2901         MP_WriteMcuAccessRegWord(sc, 0xFA32, 0xC30C);
2902         MP_WriteMcuAccessRegWord(sc, 0xFA34, 0xE80C);
2903         MP_WriteMcuAccessRegWord(sc, 0xFA36, 0xC206);
2904         MP_WriteMcuAccessRegWord(sc, 0xFA38, 0x7358);
2905         MP_WriteMcuAccessRegWord(sc, 0xFA3A, 0x483A);
2906         MP_WriteMcuAccessRegWord(sc, 0xFA3C, 0x9B58);
2907         MP_WriteMcuAccessRegWord(sc, 0xFA3E, 0xFF80);
2908         MP_WriteMcuAccessRegWord(sc, 0xFA40, 0xE8E0);
2909         MP_WriteMcuAccessRegWord(sc, 0xFA42, 0xE000);
2910         MP_WriteMcuAccessRegWord(sc, 0xFA44, 0x1008);
2911         MP_WriteMcuAccessRegWord(sc, 0xFA46, 0x0F00);
2912         MP_WriteMcuAccessRegWord(sc, 0xFA48, 0x800C);
2913         MP_WriteMcuAccessRegWord(sc, 0xFA4A, 0x0F00);
2914         MP_WriteMcuAccessRegWord(sc, 0xFA4C, 0xB407);
2915         MP_WriteMcuAccessRegWord(sc, 0xFA4E, 0xB406);
2916         MP_WriteMcuAccessRegWord(sc, 0xFA50, 0xB403);
2917         MP_WriteMcuAccessRegWord(sc, 0xFA52, 0xC7F7);
2918         MP_WriteMcuAccessRegWord(sc, 0xFA54, 0x98E0);
2919         MP_WriteMcuAccessRegWord(sc, 0xFA56, 0x99E2);
2920         MP_WriteMcuAccessRegWord(sc, 0xFA58, 0x9AE4);
2921         MP_WriteMcuAccessRegWord(sc, 0xFA5A, 0x21B2);
2922         MP_WriteMcuAccessRegWord(sc, 0xFA5C, 0x4831);
2923         MP_WriteMcuAccessRegWord(sc, 0xFA5E, 0x483F);
2924         MP_WriteMcuAccessRegWord(sc, 0xFA60, 0x9BE6);
2925         MP_WriteMcuAccessRegWord(sc, 0xFA62, 0x66E7);
2926         MP_WriteMcuAccessRegWord(sc, 0xFA64, 0x49E6);
2927         MP_WriteMcuAccessRegWord(sc, 0xFA66, 0xF1FE);
2928         MP_WriteMcuAccessRegWord(sc, 0xFA68, 0xB003);
2929         MP_WriteMcuAccessRegWord(sc, 0xFA6A, 0xB006);
2930         MP_WriteMcuAccessRegWord(sc, 0xFA6C, 0xB007);
2931         MP_WriteMcuAccessRegWord(sc, 0xFA6E, 0xFF80);
2932         MP_WriteMcuAccessRegWord(sc, 0xFA70, 0xB407);
2933         MP_WriteMcuAccessRegWord(sc, 0xFA72, 0xB406);
2934         MP_WriteMcuAccessRegWord(sc, 0xFA74, 0xB403);
2935         MP_WriteMcuAccessRegWord(sc, 0xFA76, 0xC7E5);
2936         MP_WriteMcuAccessRegWord(sc, 0xFA78, 0x9AE4);
2937         MP_WriteMcuAccessRegWord(sc, 0xFA7A, 0x21B2);
2938         MP_WriteMcuAccessRegWord(sc, 0xFA7C, 0x4831);
2939         MP_WriteMcuAccessRegWord(sc, 0xFA7E, 0x9BE6);
2940         MP_WriteMcuAccessRegWord(sc, 0xFA80, 0x66E7);
2941         MP_WriteMcuAccessRegWord(sc, 0xFA82, 0x49E6);
2942         MP_WriteMcuAccessRegWord(sc, 0xFA84, 0xF1FE);
2943         MP_WriteMcuAccessRegWord(sc, 0xFA86, 0x70E0);
2944         MP_WriteMcuAccessRegWord(sc, 0xFA88, 0x71E2);
2945         MP_WriteMcuAccessRegWord(sc, 0xFA8A, 0xB003);
2946         MP_WriteMcuAccessRegWord(sc, 0xFA8C, 0xB006);
2947         MP_WriteMcuAccessRegWord(sc, 0xFA8E, 0xB007);
2948         MP_WriteMcuAccessRegWord(sc, 0xFA90, 0xFF80);
2949         MP_WriteMcuAccessRegWord(sc, 0xFA92, 0x4882);
2950         MP_WriteMcuAccessRegWord(sc, 0xFA94, 0xB406);
2951         MP_WriteMcuAccessRegWord(sc, 0xFA96, 0xB405);
2952         MP_WriteMcuAccessRegWord(sc, 0xFA98, 0xC71E);
2953         MP_WriteMcuAccessRegWord(sc, 0xFA9A, 0x76E0);
2954         MP_WriteMcuAccessRegWord(sc, 0xFA9C, 0x1D78);
2955         MP_WriteMcuAccessRegWord(sc, 0xFA9E, 0x4175);
2956         MP_WriteMcuAccessRegWord(sc, 0xFAA0, 0x1630);
2957         MP_WriteMcuAccessRegWord(sc, 0xFAA2, 0xF10C);
2958         MP_WriteMcuAccessRegWord(sc, 0xFAA4, 0xC715);
2959         MP_WriteMcuAccessRegWord(sc, 0xFAA6, 0x76E0);
2960         MP_WriteMcuAccessRegWord(sc, 0xFAA8, 0x4861);
2961         MP_WriteMcuAccessRegWord(sc, 0xFAAA, 0x9EE0);
2962         MP_WriteMcuAccessRegWord(sc, 0xFAAC, 0xC713);
2963         MP_WriteMcuAccessRegWord(sc, 0xFAAE, 0x1EFF);
2964         MP_WriteMcuAccessRegWord(sc, 0xFAB0, 0x9EE2);
2965         MP_WriteMcuAccessRegWord(sc, 0xFAB2, 0x75E0);
2966         MP_WriteMcuAccessRegWord(sc, 0xFAB4, 0x4850);
2967         MP_WriteMcuAccessRegWord(sc, 0xFAB6, 0x9DE0);
2968         MP_WriteMcuAccessRegWord(sc, 0xFAB8, 0xE005);
2969         MP_WriteMcuAccessRegWord(sc, 0xFABA, 0xC70B);
2970         MP_WriteMcuAccessRegWord(sc, 0xFABC, 0x76E0);
2971         MP_WriteMcuAccessRegWord(sc, 0xFABE, 0x4865);
2972         MP_WriteMcuAccessRegWord(sc, 0xFAC0, 0x9EE0);
2973         MP_WriteMcuAccessRegWord(sc, 0xFAC2, 0xB005);
2974         MP_WriteMcuAccessRegWord(sc, 0xFAC4, 0xB006);
2975         MP_WriteMcuAccessRegWord(sc, 0xFAC6, 0xC708);
2976         MP_WriteMcuAccessRegWord(sc, 0xFAC8, 0xC102);
2977         MP_WriteMcuAccessRegWord(sc, 0xFACA, 0xB900);
2978         MP_WriteMcuAccessRegWord(sc, 0xFACC, 0x279E);
2979         MP_WriteMcuAccessRegWord(sc, 0xFACE, 0xEB16);
2980         MP_WriteMcuAccessRegWord(sc, 0xFAD0, 0xEB00);
2981         MP_WriteMcuAccessRegWord(sc, 0xFAD2, 0xE43C);
2982         MP_WriteMcuAccessRegWord(sc, 0xFAD4, 0xDC00);
2983         MP_WriteMcuAccessRegWord(sc, 0xFAD6, 0xD3EC);
2984         MP_WriteMcuAccessRegWord(sc, 0xFAD8, 0xC602);
2985         MP_WriteMcuAccessRegWord(sc, 0xFADA, 0xBE00);
2986         MP_WriteMcuAccessRegWord(sc, 0xFADC, 0x0000);
2987         MP_WriteMcuAccessRegWord(sc, 0xFADE, 0xC602);
2988         MP_WriteMcuAccessRegWord(sc, 0xFAE0, 0xBE00);
2989         MP_WriteMcuAccessRegWord(sc, 0xFAE2, 0x0000);
2990 
2991         MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
2992 
2993         MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x0000);
2994         MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x04B4);
2995         MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x0000);
2996         MP_WriteMcuAccessRegWord(sc, 0xFC2E, 0x0000);
2997         MP_WriteMcuAccessRegWord(sc, 0xFC30, 0x0000);
2998         MP_WriteMcuAccessRegWord(sc, 0xFC32, 0x279C);
2999         MP_WriteMcuAccessRegWord(sc, 0xFC34, 0x0000);
3000         MP_WriteMcuAccessRegWord(sc, 0xFC36, 0x0000);
3001 
3002         MP_WriteMcuAccessRegWord(sc, 0xFC38, 0x0022);
3003 }
3004 
3005 static void re_hw_mac_mcu_config(struct re_softc *sc)
3006 {
3007         switch(sc->re_type) {
3008         case MACFG_56:
3009                 re_set_mac_mcu_8168g_1(sc);
3010                 break;
3011         case MACFG_58:
3012                 re_set_mac_mcu_8168gu_1(sc);
3013                 break;
3014         case MACFG_59:
3015                 re_set_mac_mcu_8168gu_2(sc);
3016                 break;
3017         case MACFG_60:
3018                 re_set_mac_mcu_8411b_1(sc);
3019                 break;
3020         case MACFG_62:
3021                 re_set_mac_mcu_8168ep_1(sc);
3022                 break;
3023         case MACFG_67:
3024                 re_set_mac_mcu_8168ep_2(sc);
3025                 break;
3026         case MACFG_68:
3027         case MACFG_69:
3028                 re_set_mac_mcu_8168h_1(sc);
3029                 break;
3030         case MACFG_70:
3031                 if (sc->HwPkgDet == 0x00 || sc->HwPkgDet == 0x0F)
3032                         re_set_mac_mcu_8168fp_1(sc);
3033                 else if (sc->HwPkgDet == 0x06)
3034                         re_set_mac_mcu_8168fp_2(sc);
3035                 break;
3036         case MACFG_71:
3037                 DisableMcuBPs(sc);
3038                 break;
3039         }
3040 }
3041 
3042 #define ISRIMR_DASH_TYPE2_TX_DISABLE_IDLE BIT_5
3043 static void Dash2DisableTx(struct re_softc *sc)
3044 {
3045         //if (!sc->re_dash) return;
3046 
3047         if (HW_DASH_SUPPORT_TYPE_2(sc) || HW_DASH_SUPPORT_TYPE_3(sc)) {
3048                 u_int16_t WaitCnt;
3049                 u_int8_t TmpUchar;
3050 
3051                 //Disable oob Tx
3052                 RE_CMAC_WRITE_1(sc, RE_CMAC_IBCR2, RE_CMAC_READ_1(sc, RE_CMAC_IBCR2) & ~(BIT_0));
3053                 WaitCnt = 0;
3054 
3055                 //wait oob tx disable
3056                 do {
3057                         TmpUchar = RE_CMAC_READ_1(sc, RE_CMAC_IBISR0);
3058 
3059                         if (TmpUchar & ISRIMR_DASH_TYPE2_TX_DISABLE_IDLE) {
3060                                 break;
3061                         }
3062 
3063                         DELAY(50);
3064                         WaitCnt++;
3065                 } while(WaitCnt < 2000);
3066 
3067                 //Clear ISRIMR_DASH_TYPE2_TX_DISABLE_IDLE
3068                 RE_CMAC_WRITE_1(sc, RE_CMAC_IBISR0, RE_CMAC_READ_1(sc, RE_CMAC_IBISR0) | ISRIMR_DASH_TYPE2_TX_DISABLE_IDLE);
3069         }
3070 }
3071 
3072 static void Dash2DisableRx(struct re_softc *sc)
3073 {
3074         //if (!sc->re_dash) return;
3075 
3076         if (HW_DASH_SUPPORT_TYPE_2(sc) || HW_DASH_SUPPORT_TYPE_3(sc)) {
3077                 RE_CMAC_WRITE_1(sc, RE_CMAC_IBCR0, RE_CMAC_READ_1(sc, RE_CMAC_IBCR0) & ~(BIT_0));
3078         }
3079 }
3080 
3081 static void Dash2DisableTxRx(struct re_softc *sc)
3082 {
3083         if (HW_DASH_SUPPORT_TYPE_2(sc) || HW_DASH_SUPPORT_TYPE_3(sc)) {
3084                 Dash2DisableTx(sc);
3085                 Dash2DisableRx(sc);
3086         }
3087 }
3088 
3089 static inline bool
3090 is_zero_ether_addr(const u_int8_t * addr)
3091 {
3092         return ((addr[0] + addr[1] + addr[2] + addr[3] + addr[4] + addr[5]) == 0x00);
3093 }
3094 
3095 static inline bool
3096 is_multicast_ether_addr(const u_int8_t * addr)
3097 {
3098         return (0x01 & addr[0]);
3099 }
3100 
3101 /*
3102 static inline bool
3103 is_broadcast_ether_addr(const u_int8_t * addr)
3104 {
3105         return ((addr[0] + addr[1] + addr[2] + addr[3] + addr[4] + addr[5]) == (6 * 0xff));
3106 }
3107 */
3108 
3109 static inline bool
3110 is_valid_ether_addr(const u_int8_t * addr)
3111 {
3112         return !is_multicast_ether_addr(addr) && !is_zero_ether_addr(addr);
3113 }
3114 
3115 static inline void
3116 random_ether_addr(u_int8_t * dst)
3117 {
3118 #ifndef __DragonFly__
3119         if (read_random(dst, 6) == 0)
3120                 arc4rand(dst, 6, 0);
3121 #else
3122 	karc4rand(dst, 6);
3123 #endif
3124 
3125         dst[0] &= 0xfe;
3126         dst[0] |= 0x02;
3127 }
3128 
3129 static void re_disable_now_is_oob(struct re_softc *sc)
3130 {
3131         if (sc->re_hw_supp_now_is_oob_ver == 1)
3132                 CSR_WRITE_1(sc, RE_MCU_CMD, CSR_READ_1(sc, RE_MCU_CMD) & ~RE_NOW_IS_OOB);
3133 }
3134 
3135 static void re_exit_oob(struct re_softc *sc)
3136 {
3137         u_int16_t data16;
3138         int i;
3139 
3140         re_disable_cfg9346_write(sc);
3141 
3142         switch(sc->re_type) {
3143         case MACFG_61:
3144         case MACFG_62:
3145         case MACFG_67:
3146         case MACFG_70:
3147         case MACFG_71:
3148                 Dash2DisableTxRx(sc);
3149                 break;
3150         }
3151 
3152         if (sc->re_dash)
3153                 re_driver_start(sc);
3154 
3155         switch(sc->re_type) {
3156         case MACFG_56:
3157         case MACFG_57:
3158         case MACFG_58:
3159         case MACFG_59:
3160         case MACFG_60:
3161         case MACFG_61:
3162         case MACFG_62:
3163         case MACFG_67:
3164         case MACFG_68:
3165         case MACFG_69:
3166         case MACFG_70:
3167         case MACFG_71:
3168                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | BIT_3);
3169                 DELAY(2000);
3170 
3171                 for (i = 0; i < 10; i++) {
3172                         DELAY(100);
3173                         if (CSR_READ_4(sc, RE_TXCFG) & BIT_11)
3174                                 break;
3175                 }
3176 
3177                 if (CSR_READ_1(sc, RE_COMMAND) & (RE_CMD_TX_ENB | RE_CMD_RX_ENB)) {
3178                         DELAY(100);
3179                         CSR_WRITE_1(sc, RE_COMMAND, CSR_READ_1(sc, RE_COMMAND) & ~(RE_CMD_TX_ENB | RE_CMD_RX_ENB));
3180                 }
3181 
3182                 for (i = 0; i < 10; i++) {
3183                         DELAY(100);
3184                         if ((CSR_READ_1(sc, RE_MCU_CMD) & (RE_TXFIFO_EMPTY | RE_RXFIFO_EMPTY)) == (RE_TXFIFO_EMPTY | RE_RXFIFO_EMPTY))
3185                                 break;
3186 
3187                 }
3188                 break;
3189         }
3190 
3191         //Disable realwow function
3192         switch (sc->re_type) {
3193         case MACFG_50:
3194         case MACFG_51:
3195                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xE5A90000);
3196                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xF2100010);
3197                 break;
3198         case MACFG_52:
3199                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xE5A90000);
3200                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xE4640000);
3201                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xF2100010);
3202                 break;
3203         case MACFG_56:
3204         case MACFG_57:
3205                 CSR_WRITE_4(sc, RE_MCUACCESS, 0x605E0000);
3206                 CSR_WRITE_4(sc, RE_MCUACCESS, (0xE05E << 16) | (CSR_READ_4(sc, RE_MCUACCESS) & 0xFFFE));
3207                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xE9720000);
3208                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xF2140010);
3209                 break;
3210         case MACFG_60:
3211                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xE05E00FF);
3212                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xE9720000);
3213                 MP_WriteMcuAccessRegWord(sc, 0xE428, 0x0010);
3214                 break;
3215         }
3216 
3217         if (sc->re_hw_supp_now_is_oob_ver >0)
3218                 re_disable_now_is_oob(sc);
3219 
3220         switch(sc->re_type) {
3221         case MACFG_52:
3222                 for (i = 0; i < 10; i++) {
3223                         DELAY(100);
3224                         if (CSR_READ_2(sc, 0xD2) & BIT_9)
3225                                 break;
3226                 }
3227 
3228                 data16 = MP_ReadMcuAccessRegWord(sc, 0xD4DE) | BIT_15;
3229                 MP_WriteMcuAccessRegWord(sc, 0xD4DE, data16);
3230 
3231                 for (i = 0; i < 10; i++) {
3232                         DELAY(100);
3233                         if (CSR_READ_2(sc, 0xD2) & BIT_9)
3234                                 break;
3235                 }
3236                 break;
3237         case MACFG_56:
3238         case MACFG_57:
3239         case MACFG_58:
3240         case MACFG_59:
3241         case MACFG_60:
3242         case MACFG_61:
3243         case MACFG_62:
3244         case MACFG_67:
3245         case MACFG_68:
3246         case MACFG_69:
3247         case MACFG_70:
3248         case MACFG_71:
3249                 data16 = MP_ReadMcuAccessRegWord(sc, 0xE8DE) & ~BIT_14;
3250                 MP_WriteMcuAccessRegWord(sc, 0xE8DE, data16);
3251                 for (i = 0; i < 10; i++) {
3252                         DELAY(100);
3253                         if (CSR_READ_2(sc, 0xD2) & BIT_9)
3254                                 break;
3255                 }
3256 
3257                 data16 = MP_ReadMcuAccessRegWord(sc, 0xE8DE) | BIT_15;
3258                 MP_WriteMcuAccessRegWord(sc, 0xE8DE, data16);
3259 
3260                 for (i = 0; i < 10; i++) {
3261                         DELAY(100);
3262                         if (CSR_READ_2(sc, 0xD2) & BIT_9)
3263                                 break;
3264                 }
3265                 break;
3266         }
3267 
3268         //wait ups resume (phy state 2)
3269         switch(sc->re_type) {
3270         case MACFG_68:
3271         case MACFG_69:
3272         case MACFG_70:
3273         case MACFG_71:
3274                 if (re_is_ups_resume(sc)) {
3275                         re_wait_phy_ups_resume(sc, 2);
3276                         re_clear_ups_resume_bit(sc);
3277                 }
3278                 break;
3279         };
3280 
3281         /*
3282         * Config MAC MCU
3283         */
3284         re_hw_mac_mcu_config(sc);
3285 }
3286 
3287 static void re_hw_init(struct re_softc *sc)
3288 {
3289         /*
3290         * disable EDT.
3291         */
3292         switch(sc->re_type) {
3293         case MACFG_16:
3294         case MACFG_17:
3295         case MACFG_18:
3296         case MACFG_19:
3297         case MACFG_41:
3298                 CSR_WRITE_1(sc, 0xF4, CSR_READ_1(sc, 0xF4) & ~(BIT_0|BIT_1));
3299                 break;
3300         case MACFG_36:
3301         case MACFG_37:
3302         case MACFG_38:
3303         case MACFG_39:
3304         case MACFG_42:
3305         case MACFG_43:
3306         case MACFG_50:
3307         case MACFG_51:
3308         case MACFG_54:
3309         case MACFG_55:
3310                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) & ~(BIT_0|BIT_1|BIT_2));
3311                 break;
3312         }
3313 
3314         switch(sc->re_type) {
3315         case MACFG_5:
3316                 if (CSR_READ_1(sc, RE_CFG2) & 1) {
3317                         CSR_WRITE_4(sc, 0x7C, 0x000FFFFF);
3318                 } else {
3319                         CSR_WRITE_4(sc, 0x7C, 0x000FFF00);
3320                 }
3321                 break;
3322         case MACFG_6:
3323                 if (CSR_READ_1(sc, RE_CFG2) & 1) {
3324                         CSR_WRITE_4(sc, 0x7C, 0x003FFFFF);
3325                 } else {
3326                         CSR_WRITE_4(sc, 0x7C, 0x003FFF00);
3327                 }
3328                 break;
3329         }
3330 
3331         switch(sc->re_type) {
3332         case MACFG_33:
3333         case MACFG_36:
3334         case MACFG_37:
3335                 CSR_WRITE_1(sc, 0xF3, CSR_READ_1(sc, 0xF3) | BIT_2);
3336                 break;
3337         }
3338 
3339         switch(sc->re_type) {
3340         case MACFG_36:
3341         case MACFG_37:
3342         case MACFG_38:
3343         case MACFG_39:
3344         case MACFG_42:
3345         case MACFG_43:
3346         case MACFG_50:
3347         case MACFG_51:
3348         case MACFG_52:
3349         case MACFG_53:
3350         case MACFG_54:
3351         case MACFG_55:
3352         case MACFG_56:
3353         case MACFG_57:
3354         case MACFG_58:
3355         case MACFG_59:
3356         case MACFG_60:
3357         case MACFG_61:
3358         case MACFG_62:
3359         case MACFG_67:
3360         case MACFG_68:
3361         case MACFG_69:
3362         case MACFG_70:
3363         case MACFG_71:
3364                 re_enable_cfg9346_write(sc);
3365                 CSR_WRITE_1(sc, RE_CFG5, CSR_READ_1(sc, RE_CFG5) & ~BIT_0);
3366                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) & ~BIT_7);
3367                 CSR_WRITE_1(sc, 0xF1, CSR_READ_1(sc, 0xF1) & ~ BIT_7);
3368                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) | BIT_5);
3369                 re_disable_cfg9346_write(sc);
3370                 break;
3371         }
3372 
3373         if (sc->re_if_flags & RL_FLAG_PCIE) {
3374                 uint32_t Data32;
3375                 //Set PCIE uncorrectable error status mask pcie 0x108
3376                 Data32 = MP_ReadPciEConfigSpace(sc, 0xF108);
3377                 Data32 |= BIT_20;
3378                 MP_WritePciEConfigSpace(sc, 0xF108, Data32);
3379         }
3380 }
3381 
3382 static void re_rar_set(struct re_softc *sc, u_int8_t *eaddr)
3383 {
3384         re_enable_cfg9346_write(sc);
3385 
3386         CSR_WRITE_4(sc, RE_IDR0,
3387                     htole32(*(u_int32_t *)(&eaddr[0])));
3388         CSR_WRITE_2(sc, RE_IDR4,
3389                     htole16(*(u_int32_t *)(&eaddr[4])));
3390 
3391         switch (sc->re_type) {
3392         case MACFG_36:
3393         case MACFG_37:
3394         case MACFG_42:
3395         case MACFG_43:
3396         case MACFG_54:
3397         case MACFG_55:
3398                 CSR_WRITE_4(sc, RE_SecMAC0,
3399                             htole32(*(u_int32_t *)(&eaddr[0])));
3400                 CSR_WRITE_2(sc, RE_SecMAC4,
3401                             htole16(*(u_int16_t *)(&eaddr[4])));
3402                 break;
3403         }
3404 
3405         switch (sc->re_type) {
3406         case MACFG_38:
3407         case MACFG_39:
3408                 re_eri_write(sc, 0xF0, 4, *(u_int16_t *)(&eaddr[0])<<16, ERIAR_ExGMAC);
3409                 re_eri_write(sc, 0xF4, 4, *(u_int32_t *)(&eaddr[2]), ERIAR_ExGMAC);
3410                 break;
3411         }
3412 
3413         re_disable_cfg9346_write(sc);
3414 }
3415 
3416 static void re_get_hw_mac_address(struct re_softc *sc, u_int8_t *eaddr)
3417 {
3418         device_t dev = sc->dev;
3419         u_int16_t re_eeid = 0;
3420         int i;
3421 
3422         for (i = 0; i < ETHER_ADDR_LEN; i++)
3423                 eaddr[i] = CSR_READ_1(sc, RE_IDR0 + i);
3424 
3425         switch(sc->re_type) {
3426         case MACFG_50:
3427         case MACFG_51:
3428         case MACFG_52:
3429         case MACFG_53:
3430         case MACFG_56:
3431         case MACFG_57:
3432         case MACFG_58:
3433         case MACFG_59:
3434         case MACFG_60:
3435         case MACFG_61:
3436         case MACFG_62:
3437         case MACFG_67:
3438         case MACFG_68:
3439         case MACFG_69:
3440         case MACFG_70:
3441         case MACFG_71:
3442                 *(u_int32_t *)&eaddr[0] = re_eri_read(sc, 0xE0, 4, ERIAR_ExGMAC);
3443                 *(u_int16_t *)&eaddr[4] = (u_int16_t)re_eri_read(sc, 0xE4, 4, ERIAR_ExGMAC);
3444                 break;
3445         case MACFG_63:
3446         case MACFG_64:
3447         case MACFG_65:
3448         case MACFG_66:
3449                 break;
3450         default:
3451                 re_read_eeprom(sc, (caddr_t)&re_eeid, RE_EE_ID, 1, 0);
3452                 if (re_eeid == 0x8129)
3453                         re_read_eeprom(sc, (caddr_t)&eaddr[0], RE_EE_EADDR, 3, 0);
3454                 break;
3455         }
3456 
3457         if (!is_valid_ether_addr(eaddr)) {
3458 #ifndef __DragonFly__
3459                 device_printf(dev,"Invalid ether addr: %6D\n", eaddr, ":");
3460 #else
3461 		device_printf(dev, "Invalid ether addr: "
3462 		    "%02x:%02x:%02x:%02x:%02x:%02x\n",
3463 		    eaddr[0], eaddr[1], eaddr[2], eaddr[3], eaddr[4], eaddr[5]);
3464 #endif
3465                 random_ether_addr(eaddr);
3466 #ifndef __DragonFly__
3467                 device_printf(dev,"Random ether addr: %6D\n", eaddr, ":");
3468 #else
3469 		device_printf(dev, "Random ether addr: "
3470 		    "%02x:%02x:%02x:%02x:%02x:%02x\n",
3471 		    eaddr[0], eaddr[1], eaddr[2], eaddr[3], eaddr[4], eaddr[5]);
3472 #endif
3473         }
3474 
3475         re_rar_set(sc, eaddr);
3476 }
3477 
3478 static int re_check_mac_version(struct re_softc *sc)
3479 {
3480         device_t dev = sc->dev;
3481         int error = 0;
3482 
3483         switch(CSR_READ_4(sc, RE_TXCFG) & 0xFCF00000) {
3484         case 0x00800000:
3485         case 0x04000000:
3486                 sc->re_type = MACFG_3;
3487                 sc->max_jumbo_frame_size = Jumbo_Frame_7k;
3488                 CSR_WRITE_4(sc, RE_RXCFG, 0xFF00);
3489                 break;
3490         case 0x10000000:
3491                 sc->re_type = MACFG_4;
3492                 sc->max_jumbo_frame_size = Jumbo_Frame_7k;
3493                 CSR_WRITE_4(sc, RE_RXCFG, 0xFF00);
3494                 break;
3495         case 0x18000000:
3496                 sc->re_type = MACFG_5;
3497                 sc->max_jumbo_frame_size = Jumbo_Frame_7k;
3498                 CSR_WRITE_4(sc, RE_RXCFG, 0xFF00);
3499                 break;
3500         case 0x98000000:
3501                 sc->re_type = MACFG_6;
3502                 sc->max_jumbo_frame_size = Jumbo_Frame_7k;
3503                 CSR_WRITE_4(sc, RE_RXCFG, 0xFF00);
3504                 break;
3505         case 0x34000000:
3506         case 0xB4000000:
3507                 sc->re_type = MACFG_11;
3508                 sc->max_jumbo_frame_size = ETHERMTU;
3509                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
3510                 break;
3511         case 0x34200000:
3512         case 0xB4200000:
3513                 sc->re_type = MACFG_12;
3514                 sc->max_jumbo_frame_size = ETHERMTU;
3515                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
3516                 break;
3517         case 0x34300000:
3518         case 0xB4300000:
3519                 sc->re_type = MACFG_13;
3520                 sc->max_jumbo_frame_size = ETHERMTU;
3521                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
3522                 break;
3523         case 0x34900000:
3524         case 0x24900000:
3525                 sc->re_type = MACFG_14;
3526                 sc->max_jumbo_frame_size = ETHERMTU;
3527                 sc->re_if_flags |= RL_FLAG_DESCV2;
3528                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
3529                 break;
3530         case 0x34A00000:
3531         case 0x24A00000:
3532                 sc->re_type = MACFG_15;
3533                 sc->max_jumbo_frame_size = ETHERMTU;
3534                 sc->re_if_flags |= RL_FLAG_DESCV2;
3535                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
3536                 break;
3537         case 0x34B00000:
3538         case 0x24B00000:
3539                 sc->re_type = MACFG_16;
3540                 sc->max_jumbo_frame_size = ETHERMTU;
3541                 sc->re_if_flags |= RL_FLAG_DESCV2;
3542                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
3543                 break;
3544         case 0x34C00000:
3545         case 0x24C00000:
3546                 sc->re_type = MACFG_17;
3547                 sc->max_jumbo_frame_size = ETHERMTU;
3548                 sc->re_if_flags |= RL_FLAG_DESCV2;
3549                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
3550                 break;
3551         case 0x34D00000:
3552         case 0x24D00000:
3553                 sc->re_type = MACFG_18;
3554                 sc->max_jumbo_frame_size = ETHERMTU;
3555                 sc->re_if_flags |= RL_FLAG_DESCV2;
3556                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
3557                 break;
3558         case 0x34E00000:
3559         case 0x24E00000:
3560                 sc->re_type = MACFG_19;
3561                 sc->max_jumbo_frame_size = ETHERMTU;
3562                 sc->re_if_flags |= RL_FLAG_DESCV2;
3563                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
3564                 break;
3565         case 0x30000000:
3566                 sc->re_type = MACFG_21;
3567                 sc->max_jumbo_frame_size = Jumbo_Frame_4k;
3568                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
3569                 break;
3570         case 0x38000000:
3571                 sc->re_type = MACFG_22;
3572                 sc->max_jumbo_frame_size = Jumbo_Frame_4k;
3573                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
3574                 break;
3575         case 0x38500000:
3576         case 0xB8500000:
3577         case 0x38700000:
3578         case 0xB8700000:
3579                 sc->re_type = MACFG_23;
3580                 sc->max_jumbo_frame_size = Jumbo_Frame_4k;
3581                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
3582                 break;
3583         case 0x3C000000:
3584                 sc->re_type = MACFG_24;
3585                 sc->max_jumbo_frame_size = Jumbo_Frame_6k;
3586                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
3587                 CSR_WRITE_4(sc, RE_RXCFG, 0xC700);
3588                 break;
3589         case 0x3C200000:
3590                 sc->re_type = MACFG_25;
3591                 sc->max_jumbo_frame_size = Jumbo_Frame_6k;
3592                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
3593                 CSR_WRITE_4(sc, RE_RXCFG, 0xC700);
3594                 break;
3595         case 0x3C400000:
3596                 sc->re_type = MACFG_26;
3597                 sc->max_jumbo_frame_size = Jumbo_Frame_6k;
3598                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
3599                 CSR_WRITE_4(sc, RE_RXCFG, 0xC700);
3600                 break;
3601         case 0x3C900000:
3602                 sc->re_type = MACFG_27;
3603                 sc->max_jumbo_frame_size = Jumbo_Frame_6k;
3604                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
3605                 CSR_WRITE_4(sc, RE_RXCFG, 0xC700);
3606                 break;
3607         case 0x3CB00000:
3608                 sc->re_type = MACFG_28;
3609                 sc->max_jumbo_frame_size = Jumbo_Frame_6k;
3610                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
3611                 CSR_WRITE_4(sc, RE_RXCFG, 0xC700);
3612                 break;
3613         case 0x28100000:
3614                 sc->re_type = MACFG_31;
3615                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
3616                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
3617                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
3618                 break;
3619         case 0x28200000:
3620                 sc->re_type = MACFG_32;
3621                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
3622                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
3623                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
3624                 break;
3625         case 0x28300000:
3626                 sc->re_type = MACFG_33;
3627                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
3628                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
3629                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
3630                 break;
3631         case 0x2C100000:
3632                 sc->re_type = MACFG_36;
3633                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
3634                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
3635                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
3636                 break;
3637         case 0x2C200000:
3638                 sc->re_type = MACFG_37;
3639                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
3640                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
3641                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
3642                 break;
3643         case 0x2C800000:
3644                 sc->re_type = MACFG_38;
3645                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
3646                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
3647                 CSR_WRITE_4(sc, RE_RXCFG, 0xBF00);
3648                 break;
3649         case 0x2C900000:
3650                 sc->re_type = MACFG_39;
3651                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
3652                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
3653                 CSR_WRITE_4(sc, RE_RXCFG, 0xBF00);
3654                 break;
3655         case 0x24000000:
3656                 sc->re_type = MACFG_41;
3657                 sc->max_jumbo_frame_size = ETHERMTU;
3658                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
3659                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
3660                 break;
3661         case 0x40900000:
3662                 sc->re_type = MACFG_42;
3663                 sc->max_jumbo_frame_size = ETHERMTU;
3664                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
3665                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
3666                 break;
3667         case 0x40A00000:
3668         case 0x40B00000:
3669         case 0x40C00000:
3670                 sc->re_type = MACFG_43;
3671                 sc->max_jumbo_frame_size = ETHERMTU;
3672                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
3673                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
3674                 break;
3675         case 0x48000000:
3676                 sc->re_type = MACFG_50;
3677                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
3678                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
3679                 CSR_WRITE_4(sc, RE_RXCFG, 0xBF00);
3680                 break;
3681         case 0x48100000:
3682                 sc->re_type = MACFG_51;
3683                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
3684                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
3685                 CSR_WRITE_4(sc, RE_RXCFG, 0xBF00);
3686                 break;
3687         case 0x48800000:
3688                 sc->re_type = MACFG_52;
3689                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
3690                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
3691                 CSR_WRITE_4(sc, RE_RXCFG, 0xBF00);
3692                 break;
3693         case 0x44000000:
3694                 sc->re_type = MACFG_53;
3695                 sc->max_jumbo_frame_size = ETHERMTU;
3696                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
3697                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
3698                 break;
3699         case 0x44800000:
3700                 sc->re_type = MACFG_54;
3701                 sc->max_jumbo_frame_size = ETHERMTU;
3702                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
3703                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
3704                 break;
3705         case 0x44900000:
3706                 sc->re_type = MACFG_55;
3707                 sc->max_jumbo_frame_size = ETHERMTU;
3708                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
3709                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
3710                 break;
3711         case 0x4C000000:
3712                 sc->re_type = MACFG_56;
3713                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
3714                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
3715                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
3716                 break;
3717         case 0x4C100000:
3718                 sc->re_type = MACFG_57;
3719                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
3720                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
3721                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
3722                 break;
3723         case 0x50800000:
3724                 sc->re_type = MACFG_58;
3725                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
3726                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
3727                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
3728                 break;
3729         case 0x50900000:
3730                 sc->re_type = MACFG_59;
3731                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
3732                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
3733                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
3734                 break;
3735         case 0x5C800000:
3736                 sc->re_type = MACFG_60;
3737                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
3738                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
3739                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
3740                 break;
3741         case 0x50000000:
3742                 sc->re_type = MACFG_61;
3743                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
3744                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
3745                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
3746                 break;
3747         case 0x50100000:
3748                 sc->re_type = MACFG_62;
3749                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
3750                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
3751                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
3752                 break;
3753         case 0x50200000:
3754                 sc->re_type = MACFG_67;
3755                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
3756                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
3757                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
3758                 break;
3759         case 0x28800000:
3760                 sc->re_type = MACFG_63;
3761                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
3762                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
3763                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
3764                 break;
3765         case 0x28900000:
3766                 sc->re_type = MACFG_64;
3767                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
3768                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
3769                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
3770                 break;
3771         case 0x28A00000:
3772                 sc->re_type = MACFG_65;
3773                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
3774                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
3775                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
3776                 break;
3777         case 0x28B00000:
3778                 sc->re_type = MACFG_66;
3779                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
3780                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
3781                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
3782                 break;
3783         case 0x54000000:
3784                 sc->re_type = MACFG_68;
3785                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
3786                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
3787                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
3788                 break;
3789         case 0x54100000:
3790                 sc->re_type = MACFG_69;
3791                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
3792                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
3793                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
3794                 break;
3795         case 0x54900000:
3796                 sc->re_type = MACFG_70;
3797                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
3798                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
3799                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
3800                 break;
3801         case 0x54A00000:
3802                 sc->re_type = MACFG_71;
3803                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
3804                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
3805                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
3806                 break;
3807         default:
3808                 device_printf(dev,"unknown device\n");
3809                 sc->re_type = MACFG_FF;
3810                 error = ENXIO;
3811                 break;
3812         }
3813 
3814         switch(sc->re_device_id) {
3815         case RT_DEVICEID_8169:
3816         case RT_DEVICEID_8169SC:
3817         case RT_DEVICEID_8168:
3818         case RT_DEVICEID_8161:
3819                 //do nothing
3820                 break;
3821         default:
3822                 sc->max_jumbo_frame_size = ETHERMTU;
3823                 break;
3824         }
3825 
3826         return error;
3827 }
3828 
3829 static void re_init_software_variable(struct re_softc *sc)
3830 {
3831         switch(sc->re_device_id) {
3832         case RT_DEVICEID_8168:
3833         case RT_DEVICEID_8161:
3834         case RT_DEVICEID_8136:
3835                 sc->re_if_flags |= RL_FLAG_PCIE;
3836                 break;
3837         }
3838 
3839         sc->re_rx_mbuf_sz = sc->max_jumbo_frame_size + ETHER_VLAN_ENCAP_LEN + ETHER_HDR_LEN + ETHER_CRC_LEN + RE_ETHER_ALIGN + 1;
3840 
3841         if (sc->re_rx_mbuf_sz > MJUM9BYTES) {
3842                 sc->max_jumbo_frame_size -= (sc->re_rx_mbuf_sz - MJUM9BYTES);
3843                 sc->re_rx_mbuf_sz = MJUM9BYTES;
3844         }
3845 
3846         switch(sc->re_type) {
3847         case MACFG_63:
3848         case MACFG_64:
3849         case MACFG_65:
3850         case MACFG_66:
3851                 sc->HwSuppDashVer = 1;
3852                 break;
3853         case MACFG_61:
3854         case MACFG_62:
3855         case MACFG_67:
3856                 sc->HwSuppDashVer = 2;
3857                 break;
3858         case MACFG_70:
3859         case MACFG_71:
3860                 sc->HwSuppDashVer = 3;
3861                 break;
3862         default:
3863                 sc->HwSuppDashVer = 0;
3864                 break;
3865         }
3866 
3867         switch(sc->re_type) {
3868         case MACFG_70:
3869         case MACFG_71:
3870                 sc->HwPkgDet = MP_ReadMcuAccessRegWord(sc, 0xDC00);
3871                 sc->HwPkgDet = (sc->HwPkgDet >> 3) & 0x0F;
3872                 //printf("Realtek PCIe GBE Family Controller HwPkgDet = 0x%02X\n",
3873                 //       sc->HwPkgDet);
3874                 break;
3875         }
3876 
3877         if (HW_DASH_SUPPORT_TYPE_3(sc) && sc->HwPkgDet == 0x06)
3878                 eee_enable = 0;
3879 
3880         if (HW_DASH_SUPPORT_DASH(sc))
3881                 sc->re_dash = re_check_dash(sc);
3882 
3883         if (sc->re_dash) {
3884                 if (HW_DASH_SUPPORT_TYPE_3(sc)) {
3885                         u_int64_t CmacMemPhysAddress;
3886                         bus_space_handle_t cmac_ioaddr;
3887 
3888                         CmacMemPhysAddress = MP_ReadOtherFunPciEConfigSpace(sc, 0, 0xf018);
3889                         if (!(CmacMemPhysAddress & BIT_0)) {
3890                                 if (CmacMemPhysAddress & BIT_2)
3891                                         CmacMemPhysAddress |=  MP_ReadOtherFunPciEConfigSpace(sc, 0, 0xf01c) << 16;
3892 
3893                                 CmacMemPhysAddress &=  0xFFFFFFF0;
3894                                 /* ioremap MMIO region */
3895 #ifndef __DragonFly__
3896                                 sc->re_mapped_cmac_tag = X86_BUS_SPACE_MEM;
3897 #else
3898 				sc->re_mapped_cmac_tag = X86_64_BUS_SPACE_MEM;
3899 #endif
3900                                 if (bus_space_map(sc->re_mapped_cmac_tag, CmacMemPhysAddress, RE_REGS_SIZE, 0,
3901                                                   &cmac_ioaddr))
3902                                         sc->re_dash = 0;
3903                                 else
3904                                         sc->re_mapped_cmac_handle = cmac_ioaddr;
3905                         }
3906                 }
3907         }
3908 
3909         switch(sc->re_type) {
3910         case MACFG_61:
3911         case MACFG_62:
3912         case MACFG_67:
3913                 sc->re_cmac_handle = sc->re_bhandle;
3914                 sc->re_cmac_tag = sc->re_btag;
3915                 break;
3916         case MACFG_70:
3917         case MACFG_71:
3918                 sc->re_cmac_handle = sc->re_mapped_cmac_handle;
3919                 sc->re_cmac_tag = sc->re_mapped_cmac_tag;
3920                 break;
3921         }
3922 
3923         switch(sc->re_type) {
3924         case MACFG_14:
3925         case MACFG_15:
3926         case MACFG_16:
3927         case MACFG_17:
3928         case MACFG_18:
3929         case MACFG_19:
3930         case MACFG_31:
3931         case MACFG_32:
3932         case MACFG_33:
3933         case MACFG_41:
3934         case MACFG_63:
3935         case MACFG_64:
3936         case MACFG_65:
3937         case MACFG_66:
3938                 sc->re_efuse_ver = EFUSE_SUPPORT_V1;
3939                 break;
3940         case MACFG_36:
3941         case MACFG_37:
3942         case MACFG_42:
3943         case MACFG_43:
3944         case MACFG_54:
3945         case MACFG_55:
3946                 sc->re_efuse_ver = EFUSE_SUPPORT_V2;
3947                 break;
3948         case MACFG_38:
3949         case MACFG_39:
3950         case MACFG_50:
3951         case MACFG_51:
3952         case MACFG_52:
3953         case MACFG_53:
3954         case MACFG_56:
3955         case MACFG_57:
3956         case MACFG_58:
3957         case MACFG_59:
3958         case MACFG_60:
3959         case MACFG_61:
3960         case MACFG_62:
3961         case MACFG_67:
3962         case MACFG_68:
3963         case MACFG_69:
3964         case MACFG_70:
3965         case MACFG_71:
3966                 sc->re_efuse_ver = EFUSE_SUPPORT_V3;
3967                 break;
3968         default:
3969                 sc->re_efuse_ver = EFUSE_NOT_SUPPORT;
3970                 break;
3971         }
3972 
3973         switch(sc->re_type) {
3974         case MACFG_69: {
3975                 u_int16_t ioffset_p3, ioffset_p2, ioffset_p1, ioffset_p0;
3976                 u_int16_t TmpUshort;
3977 
3978                 MP_WriteMcuAccessRegWord(sc, 0xDD02, 0x807D);
3979 
3980                 TmpUshort = MP_ReadMcuAccessRegWord(sc, 0xDD02);
3981                 ioffset_p3 = ((TmpUshort & BIT_7) >>7);
3982                 ioffset_p3 <<= 3;
3983                 TmpUshort = MP_ReadMcuAccessRegWord(sc, 0xDD00);
3984 
3985                 ioffset_p3 |= ((TmpUshort & (BIT_15 | BIT_14 | BIT_13))>>13);
3986 
3987                 ioffset_p2 = ((TmpUshort & (BIT_12|BIT_11|BIT_10|BIT_9))>>9);
3988                 ioffset_p1 = ((TmpUshort & (BIT_8|BIT_7|BIT_6|BIT_5))>>5);
3989 
3990                 ioffset_p0 = ((TmpUshort & BIT_4) >>4);
3991                 ioffset_p0 <<= 3;
3992                 ioffset_p0 |= (TmpUshort & (BIT_2| BIT_1 | BIT_0));
3993 
3994                 if ((ioffset_p3 == 0x0F) && (ioffset_p2 == 0x0F) && (ioffset_p1 == 0x0F) && (ioffset_p0 == 0x0F)) {
3995                         sc->RequireAdcBiasPatch = FALSE;
3996                 } else {
3997                         sc->RequireAdcBiasPatch = TRUE;
3998                         sc->AdcBiasPatchIoffset = (ioffset_p3<<12)|(ioffset_p2<<8)|(ioffset_p1<<4)|(ioffset_p0);
3999                 }
4000         }
4001         break;
4002         }
4003 
4004         switch(sc->re_type) {
4005         case MACFG_68:
4006         case MACFG_69:
4007         case MACFG_70:
4008         case MACFG_71: {
4009                 u_int16_t rg_saw_cnt;
4010 
4011                 MP_WritePhyUshort(sc, 0x1F, 0x0C42);
4012                 rg_saw_cnt = MP_ReadPhyUshort(sc, 0x13);
4013                 rg_saw_cnt &= ~(BIT_15|BIT_14);
4014                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
4015 
4016                 if (rg_saw_cnt > 0) {
4017                         sc->SwrCnt1msIni = 16000000/rg_saw_cnt;
4018                         sc->SwrCnt1msIni &= 0x0FFF;
4019 
4020                         sc->RequireAdjustUpsTxLinkPulseTiming = TRUE;
4021                 }
4022         }
4023         break;
4024         }
4025 
4026         switch(sc->re_type) {
4027         case MACFG_31:
4028         case MACFG_32:
4029         case MACFG_33:
4030         case MACFG_36:
4031         case MACFG_37:
4032         case MACFG_38:
4033         case MACFG_39:
4034         case MACFG_42:
4035         case MACFG_43:
4036         case MACFG_50:
4037         case MACFG_51:
4038         case MACFG_52:
4039         case MACFG_53:
4040         case MACFG_54:
4041         case MACFG_55:
4042         case MACFG_56:
4043         case MACFG_57:
4044         case MACFG_58:
4045         case MACFG_59:
4046         case MACFG_60:
4047         case MACFG_61:
4048         case MACFG_62:
4049         case MACFG_63:
4050         case MACFG_64:
4051         case MACFG_65:
4052         case MACFG_66:
4053         case MACFG_67:
4054         case MACFG_68:
4055         case MACFG_69:
4056         case MACFG_70:
4057         case MACFG_71:
4058                 sc->re_hw_enable_msi_msix = TRUE;
4059                 break;
4060         }
4061 
4062         switch(sc->re_type) {
4063         case MACFG_3:
4064         case MACFG_4:
4065         case MACFG_5:
4066         case MACFG_6:
4067         case MACFG_11:
4068         case MACFG_12:
4069         case MACFG_13:
4070         case MACFG_21:
4071         case MACFG_22:
4072         case MACFG_23:
4073         case MACFG_24:
4074         case MACFG_25:
4075         case MACFG_26:
4076         case MACFG_27:
4077         case MACFG_28:
4078         case MACFG_41:
4079         case MACFG_42:
4080         case MACFG_43:
4081         case MACFG_54:
4082         case MACFG_55:
4083                 sc->re_coalesce_tx_pkt = TRUE;
4084                 break;
4085         }
4086 
4087         switch(sc->re_type) {
4088         case MACFG_36:
4089         case MACFG_37:
4090         case MACFG_38:
4091         case MACFG_39:
4092         case MACFG_42:
4093         case MACFG_43:
4094         case MACFG_50:
4095         case MACFG_51:
4096         case MACFG_52:
4097         case MACFG_53:
4098         case MACFG_54:
4099         case MACFG_55:
4100         case MACFG_56:
4101         case MACFG_57:
4102         case MACFG_58:
4103         case MACFG_59:
4104         case MACFG_60:
4105         case MACFG_61:
4106         case MACFG_62:
4107         case MACFG_67:
4108         case MACFG_68:
4109         case MACFG_69:
4110         case MACFG_70:
4111         case MACFG_71:
4112                 sc->re_hw_supp_now_is_oob_ver = 1;
4113                 break;
4114         }
4115 
4116         switch (sc->re_type) {
4117         case MACFG_36:
4118         case MACFG_37:
4119                 sc->re_sw_ram_code_ver = NIC_RAMCODE_VERSION_8168E;
4120                 break;
4121         case MACFG_38:
4122         case MACFG_39:
4123                 sc->re_sw_ram_code_ver = NIC_RAMCODE_VERSION_8168EVL;
4124                 break;
4125         case MACFG_50:
4126         case MACFG_51:
4127                 sc->re_sw_ram_code_ver = NIC_RAMCODE_VERSION_8168F;
4128                 break;
4129         case MACFG_52:
4130                 sc->re_sw_ram_code_ver = NIC_RAMCODE_VERSION_8411;
4131                 break;
4132         case MACFG_56:
4133         case MACFG_57:
4134                 sc->re_sw_ram_code_ver = NIC_RAMCODE_VERSION_8168G;
4135                 break;
4136         case MACFG_58:
4137         case MACFG_59:
4138                 sc->re_sw_ram_code_ver = NIC_RAMCODE_VERSION_8168GU;
4139                 break;
4140         case MACFG_60:
4141                 sc->re_sw_ram_code_ver = NIC_RAMCODE_VERSION_8411B;
4142                 break;
4143         case MACFG_61:
4144         case MACFG_62:
4145         case MACFG_67:
4146                 sc->re_sw_ram_code_ver = NIC_RAMCODE_VERSION_8168EP;
4147                 break;
4148         case MACFG_68:
4149         case MACFG_69:
4150                 sc->re_sw_ram_code_ver = NIC_RAMCODE_VERSION_8168H;
4151                 break;
4152         case MACFG_70:
4153         case MACFG_71:
4154                 sc->re_sw_ram_code_ver = NIC_RAMCODE_VERSION_8168FP;
4155                 break;
4156         }
4157 
4158         sc->re_8169_MacVersion=(CSR_READ_4(sc, RE_TXCFG)&0x7c800000)>>25;		/* Get bit 26~30 	*/
4159         sc->re_8169_MacVersion|=((CSR_READ_4(sc, RE_TXCFG)&0x00800000)!=0 ? 1:0);	/* Get bit 23 		*/
4160         DBGPRINT1(sc->re_unit,"8169 Mac Version %d",sc->re_8169_MacVersion);
4161 
4162         /* Rtl8169s single chip detected */
4163         if (sc->re_type == MACFG_3) {
4164                 RE_LOCK(sc);
4165                 sc->re_8169_PhyVersion=(MP_ReadPhyUshort(sc, 0x03)&0x000f);
4166                 DBGPRINT1(sc->re_unit,"8169 Phy Version %d",sc->re_8169_PhyVersion);
4167                 RE_UNLOCK(sc);
4168         }
4169 
4170 #ifndef __DragonFly__
4171         sc->link_state = LINK_STATE_UNKNOWN;
4172 #endif
4173 }
4174 
4175 static void re_hw_d3_para(struct re_softc *sc)
4176 {
4177         if (sc->re_type == MACFG_59 || sc->re_type == MACFG_60 ||
4178             sc->re_type == MACFG_62 || sc->re_type == MACFG_67 ||
4179             sc->re_type == MACFG_68 || sc->re_type == MACFG_69 ||
4180             sc->re_type == MACFG_70 || sc->re_type == MACFG_71) {
4181                 MP_WritePhyOcpRegWord(sc, 0x0C41, 0x13, 0x0000);
4182                 MP_WritePhyOcpRegWord(sc, 0x0C41, 0x13, 0x0500);
4183         }
4184 }
4185 
4186 #ifndef __DragonFly__
4187 /*
4188 * Attach the interface. Allocate softc structures, do ifmedia
4189 * setup and ethernet/BPF attach.
4190 */
4191 static int re_attach(device_t dev)
4192 {
4193         /*int			s;*/
4194         u_char			eaddr[ETHER_ADDR_LEN];
4195         u_int32_t		command;
4196         struct re_softc		*sc;
4197         struct ifnet		*ifp;
4198         int			unit, error = 0, rid, i;
4199 //	int			mac_version;
4200 //	int			mode;
4201 //	u_int8_t		data8;
4202         int     reg;
4203         int		msic=0, msixc=0;
4204 
4205         /*s = splimp();*/
4206 
4207         sc = device_get_softc(dev);
4208         unit = device_get_unit(dev);
4209         bzero(sc, sizeof(struct re_softc));
4210         RE_LOCK_INIT(sc,device_get_nameunit(dev));
4211         sc->dev = dev;
4212 
4213         sc->driver_detach = 0;
4214 
4215         sc->re_device_id = pci_get_device(dev);
4216         sc->re_revid = pci_get_revid(dev);
4217         pci_enable_busmaster(dev);
4218 
4219         /*
4220          * Map control/status registers.
4221          */
4222         command = pci_read_config(dev, PCIR_COMMAND, 4);
4223         command |= (PCIM_CMD_PORTEN|PCIM_CMD_MEMEN|PCIM_CMD_BUSMASTEREN);
4224         pci_write_config(dev, PCIR_COMMAND, command, 4);
4225         command = pci_read_config(dev, PCIR_COMMAND, 4);
4226 
4227         if (prefer_iomap == 0) {
4228                 sc->re_res_id = PCIR_BAR(1);
4229                 sc->re_res_type = SYS_RES_MEMORY;
4230                 /* PCIE NIC use different BARs. */
4231                 if (sc->re_device_id == RT_DEVICEID_8168 || sc->re_device_id == RT_DEVICEID_8161 ||
4232                     sc->re_device_id == RT_DEVICEID_8136)
4233                         sc->re_res_id = PCIR_BAR(2);
4234         } else {
4235                 sc->re_res_id = PCIR_BAR(0);
4236                 sc->re_res_type = SYS_RES_IOPORT;
4237         }
4238         sc->re_res = bus_alloc_resource(dev, sc->re_res_type, &sc->re_res_id,
4239                                         0, ~0, 1, RF_ACTIVE);
4240         if (sc->re_res == NULL && prefer_iomap == 0) {
4241                 sc->re_res_id = PCIR_BAR(0);
4242                 sc->re_res_type = SYS_RES_IOPORT;
4243                 sc->re_res = bus_alloc_resource(dev, sc->re_res_type, &sc->re_res_id,
4244                                                 0, ~0, 1, RF_ACTIVE);
4245         }
4246 
4247         if (sc->re_res == NULL) {
4248                 device_printf(dev,"couldn't map ports/memory\n");
4249                 error = ENXIO;
4250                 goto fail;
4251         }
4252 
4253         if (sc->re_res_type == SYS_RES_IOPORT)
4254                 device_printf(dev, "Using I/O Ports\n");
4255         else
4256                 device_printf(dev, "Using Memory Mapping!\n");
4257 
4258         sc->re_btag = rman_get_bustag(sc->re_res);
4259         sc->re_bhandle = rman_get_bushandle(sc->re_res);
4260 
4261         error = re_check_mac_version(sc);
4262 
4263         if (error) {
4264                 goto fail;
4265         }
4266 
4267         re_init_software_variable(sc);
4268 
4269 #if OS_VER >= VERSION(7,0)
4270         msic = pci_msi_count(dev);
4271         msixc = pci_msix_count(dev);
4272         if (pci_find_cap(dev, PCIY_EXPRESS, &reg) == 0) {
4273                 sc->re_if_flags |= RL_FLAG_PCIE;
4274                 sc->re_expcap = reg;
4275         } else {
4276                 sc->re_if_flags &= ~RL_FLAG_PCIE;
4277                 sc->re_expcap = 0;
4278         }
4279 
4280         //device_printf(dev, "MSI count : %d\n", msic);
4281         //device_printf(dev, "MSI-X count : %d\n", msixc);
4282         if (sc->re_hw_enable_msi_msix == FALSE) {
4283                 msixc = 0;
4284                 msic = 0;
4285         }
4286         if (msix_disable > 0)
4287                 msixc = 0;
4288         if (msi_disable > 0)
4289                 msic = 0;
4290 
4291         /* Prefer MSI-X to MSI. */
4292         if (msixc > 0) {
4293                 rid = PCIR_BAR(4);
4294                 msixc = RL_MSI_MESSAGES;
4295                 sc->re_res_pba = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
4296                                                         &rid, RF_ACTIVE);
4297                 if (sc->re_res_pba == NULL) {
4298                         device_printf(dev,
4299                                       "could not allocate MSI-X PBA resource\n");
4300                 }
4301                 if (sc->re_res_pba != NULL &&
4302                     pci_alloc_msix(dev, &msixc) == 0) {
4303                         if (msixc == RL_MSI_MESSAGES) {
4304                                 device_printf(dev, "Using %d MSI-X message\n",
4305                                               msixc);
4306                                 sc->re_if_flags |= RL_FLAG_MSIX;
4307                         } else
4308                                 pci_release_msi(dev);
4309                 }
4310                 if ((sc->re_if_flags & RL_FLAG_MSIX) == 0) {
4311                         if (sc->re_res_pba != NULL)
4312                                 bus_release_resource(dev, SYS_RES_MEMORY, rid,
4313                                                      sc->re_res_pba);
4314                         sc->re_res_pba = NULL;
4315                         msixc = 0;
4316                 }
4317         }
4318 
4319         /* Prefer MSI to INTx. */
4320         if (msixc == 0 && msic > 0) {
4321                 msic = RL_MSI_MESSAGES;
4322                 if (pci_alloc_msi(dev, &msic) == 0) {
4323                         if (msic == RL_MSI_MESSAGES) {
4324                                 device_printf(dev, "Using %d MSI message\n",
4325                                               msic);
4326                                 sc->re_if_flags |= RL_FLAG_MSI;
4327                         } else
4328                                 pci_release_msi(dev);
4329                 }
4330                 if ((sc->re_if_flags & RL_FLAG_MSI) == 0)
4331                         msic = 0;
4332         }
4333 #endif //OS_VER >= VERSION(7,0)
4334 
4335         if ((sc->re_if_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) == 0) {
4336                 rid = 0;
4337                 sc->re_irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0, 1,
4338                                                 RF_SHAREABLE | RF_ACTIVE);
4339 
4340                 if (sc->re_irq == NULL) {
4341                         device_printf(dev,"couldn't map interrupt\n");
4342                         error = ENXIO;
4343                         goto fail;
4344                 }
4345                 device_printf(dev, "Using line-based interrupt\n");
4346         } else {
4347                 rid = 1;
4348                 sc->re_irq = bus_alloc_resource_any(dev,
4349                                                     SYS_RES_IRQ, &rid, RF_ACTIVE);
4350                 if (sc->re_irq == NULL) {
4351                         device_printf(dev,
4352                                       "couldn't allocate IRQ resources for "
4353                                       "message %d\n", rid);
4354                         error = ENXIO;
4355                         goto fail;
4356                 }
4357         }
4358 
4359 #if OS_VER >= VERSION(7,3)
4360         /* Disable ASPM L0S/L1 and Clock Request. */
4361         if (sc->re_expcap != 0) {
4362                 u_int32_t		cap, ctl;
4363                 cap = pci_read_config(dev, sc->re_expcap +
4364                                       RE_PCIER_LINK_CAP, 2);
4365                 if ((cap & RE_PCIEM_LINK_CAP_ASPM) != 0) {
4366                         ctl = pci_read_config(dev, sc->re_expcap +
4367                                               RE_PCIER_LINK_CTL, 2);
4368                         if ((ctl & 0x0103) != 0) {
4369                                 ctl &= ~0x0103;
4370                                 pci_write_config(dev, sc->re_expcap +
4371                                                  RE_PCIER_LINK_CTL, ctl, 2);
4372                                 device_printf(dev, "ASPM disabled\n");
4373                         }
4374                 } else
4375                         device_printf(dev, "no ASPM capability\n");
4376         }
4377 #endif //OS_VER >= VERSION(7,3)
4378 
4379         re_init_timer(sc);
4380 
4381         RE_LOCK(sc);
4382         re_exit_oob(sc);
4383         re_hw_init(sc);
4384         RE_UNLOCK(sc);
4385 
4386         /*
4387          * Reset the adapter. Only take the lock here as it's needed in
4388          * order to call re_reset().
4389          */
4390         RE_LOCK(sc);
4391         re_reset(sc);
4392         RE_UNLOCK(sc);
4393 
4394         /* Get station address. */
4395         RE_LOCK(sc);
4396         re_get_hw_mac_address(sc, eaddr);
4397         RE_UNLOCK(sc);
4398 
4399         /*
4400          * A RealTek chip was detected. Inform the world.
4401          */
4402         device_printf(dev,"version:1.94.01\n");
4403         device_printf(dev,"Ethernet address: %6D\n", eaddr, ":");
4404         printf("\nThis product is covered by one or more of the following patents: \
4405            \nUS6,570,884, US6,115,776, and US6,327,625.\n");
4406 
4407         sc->re_unit = unit;
4408 
4409 #if OS_VER < VERSION(6,0)
4410         bcopy(eaddr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN);
4411 #endif
4412 
4413         if (sc->re_type == MACFG_3) {	/* Change PCI Latency time*/
4414                 pci_write_config(dev, RE_PCI_LATENCY_TIMER, 0x40, 1);
4415         }
4416 
4417         error = bus_dma_tag_create(
4418 #if OS_VER < VERSION(7,0)
4419                         NULL,
4420 #else
4421                         bus_get_dma_tag(dev),		/* parent */
4422 #endif
4423                         1, 0,		/* alignment, boundary */
4424                         BUS_SPACE_MAXADDR,		/* lowaddr */
4425                         BUS_SPACE_MAXADDR,		/* highaddr */
4426                         NULL, NULL,			/* filter, filterarg */
4427                         BUS_SPACE_MAXSIZE_32BIT,	/* maxsize */
4428                         0,				/* nsegments */
4429                         BUS_SPACE_MAXSIZE_32BIT,	/* maxsegsize */
4430                         0,				/* flags */
4431                         NULL, NULL,			/* lockfunc, lockarg */
4432                         &sc->re_parent_tag);
4433 
4434         i = roundup2(sizeof(union RxDesc)*RE_RX_BUF_NUM, RE_DESC_ALIGN);
4435         error = bus_dma_tag_create(
4436                         sc->re_parent_tag,
4437                         RE_DESC_ALIGN, 0,		/* alignment, boundary */
4438                         BUS_SPACE_MAXADDR,		/* lowaddr */
4439                         BUS_SPACE_MAXADDR,		/* highaddr */
4440                         NULL, NULL,			/* filter, filterarg */
4441                         i,				/* maxsize */
4442                         1,				/* nsegments */
4443                         i,				/* maxsegsize */
4444                         0,				/* flags */
4445                         NULL, NULL,			/* lockfunc, lockarg */
4446                         &sc->re_desc.rx_desc_tag);
4447         if (error) {
4448                 device_printf(dev,"bus_dma_tag_create fail\n");
4449                 goto fail;
4450         }
4451 
4452         error = bus_dmamem_alloc(sc->re_desc.rx_desc_tag,
4453                                  (void**) &sc->re_desc.rx_desc,
4454                                  BUS_DMA_WAITOK|BUS_DMA_COHERENT|BUS_DMA_ZERO,
4455                                  &sc->re_desc.rx_desc_dmamap);
4456         if (error) {
4457                 device_printf(dev,"bus_dmamem_alloc fail\n");
4458                 goto fail;
4459         }
4460 
4461         i = roundup2(sizeof(union TxDesc)*RE_TX_BUF_NUM, RE_DESC_ALIGN);
4462         error = bus_dma_tag_create(
4463                         sc->re_parent_tag,
4464                         RE_DESC_ALIGN, 0,		/* alignment, boundary */
4465                         BUS_SPACE_MAXADDR,		/* lowaddr */
4466                         BUS_SPACE_MAXADDR,		/* highaddr */
4467                         NULL, NULL,			/* filter, filterarg */
4468                         i,				/* maxsize */
4469                         1,				/* nsegments */
4470                         i,				/* maxsegsize */
4471                         0,				/* flags */
4472                         NULL, NULL,			/* lockfunc, lockarg */
4473                         &sc->re_desc.tx_desc_tag);
4474         if (error) {
4475                 device_printf(dev,"bus_dma_tag_create fail\n");
4476                 goto fail;
4477         }
4478 
4479         error = bus_dmamem_alloc(sc->re_desc.tx_desc_tag,
4480                                  (void**) &sc->re_desc.tx_desc,
4481                                  BUS_DMA_WAITOK|BUS_DMA_COHERENT|BUS_DMA_ZERO,
4482                                  &sc->re_desc.tx_desc_dmamap);
4483 
4484         if (error) {
4485                 device_printf(dev,"bus_dmamem_alloc fail\n");
4486                 goto fail;
4487         }
4488 
4489         RE_LOCK(sc);
4490         re_phy_power_up(dev);
4491         re_hw_phy_config(sc);
4492         re_clrwol(sc);
4493         RE_UNLOCK(sc);
4494 
4495         sc->re_tx_cstag =1;
4496         sc->re_rx_cstag =1;
4497 
4498 #if OS_VER < VERSION(6,0)
4499         ifp = &sc->arpcom.ac_if;
4500 #else
4501         ifp = sc->re_ifp = if_alloc(IFT_ETHER);
4502         if (ifp == NULL) {
4503                 device_printf(dev, "can not if_alloc()\n");
4504                 error = ENOSPC;
4505                 goto fail;
4506         }
4507 #endif
4508         ifp->if_softc = sc;
4509 #if OS_VER < VERSION(5,3)
4510         ifp->if_unit = unit;
4511         ifp->if_name = "re";
4512 #else
4513         if_initname(ifp, device_get_name(dev), device_get_unit(dev));
4514 #endif
4515         ifp->if_mtu = ETHERMTU;
4516         ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
4517         ifp->if_ioctl = re_ioctl;
4518         ifp->if_output = ether_output;
4519         ifp->if_start = re_start;
4520 #if OS_VER < VERSION(7,0)
4521         ifp->if_watchdog = re_watchdog;
4522 #endif
4523         if ((sc->re_type == MACFG_24) || (sc->re_type == MACFG_25) || (sc->re_type == MACFG_26))
4524                 ifp->if_hwassist |= CSUM_TCP | CSUM_UDP;
4525         else
4526                 ifp->if_hwassist |= RE_CSUM_FEATURES;
4527 
4528         ifp->if_capabilities = IFCAP_HWCSUM;
4529         ifp->if_capenable = ifp->if_capabilities;
4530         CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) |RL_RxChkSum);
4531         ifp->if_init = re_init;
4532         /* VLAN capability setup */
4533         ifp->if_capabilities |= IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING;
4534         ifp->if_capenable = ifp->if_capabilities;
4535 
4536         /* Enable WOL if PM is supported. */
4537         if (pci_find_cap(sc->dev, PCIY_PMG, &reg) == 0)
4538                 ifp->if_capabilities |= IFCAP_WOL;
4539         ifp->if_capenable = ifp->if_capabilities;
4540         ifp->if_capenable &= ~(IFCAP_WOL_UCAST | IFCAP_WOL_MCAST);
4541 
4542         RE_LOCK(sc);
4543         set_rxbufsize(sc);
4544         error =re_alloc_buf(sc);
4545 
4546         if (error) {
4547                 RE_UNLOCK(sc);
4548                 goto fail;
4549         }
4550         /* Init descriptors. */
4551         re_var_init(sc);
4552 
4553         RE_UNLOCK(sc);
4554 
4555         switch(sc->re_device_id) {
4556         case RT_DEVICEID_8169:
4557         case RT_DEVICEID_8169SC:
4558         case RT_DEVICEID_8168:
4559         case RT_DEVICEID_8161:
4560                 ifp->if_baudrate = 1000000000;
4561                 break;
4562 
4563         default:
4564                 ifp->if_baudrate = 100000000;
4565                 break;
4566         }
4567         IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN);
4568         ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN;
4569         IFQ_SET_READY(&ifp->if_snd);
4570 
4571 #if OS_VER>=VERSION(7,0)
4572         TASK_INIT(&sc->re_inttask, 0, re_int_task, sc);
4573 #endif
4574 
4575         /*
4576          * Call MI attach routine.
4577          */
4578         /*#if OS_VER < VERSION(5, 1)*/
4579 #if OS_VER < VERSION(4,9)
4580         ether_ifattach(ifp, ETHER_BPF_SUPPORTED);
4581 #else
4582         ether_ifattach(ifp, eaddr);
4583 #endif
4584 
4585 #if OS_VER < VERSION(7,0)
4586         error = bus_setup_intr(dev, sc->re_irq, INTR_TYPE_NET,
4587                                re_intr, sc, &sc->re_intrhand);
4588 #else
4589         error = bus_setup_intr(dev, sc->re_irq, INTR_TYPE_NET|INTR_MPSAFE,
4590                                re_intr, NULL, sc, &sc->re_intrhand);
4591 #endif
4592 
4593         if (error) {
4594 #if OS_VER < VERSION(4,9)
4595                 ether_ifdetach(ifp, ETHER_BPF_SUPPORTED);
4596 #else
4597                 ether_ifdetach(ifp);
4598 #endif
4599                 device_printf(dev,"couldn't set up irq\n");
4600                 goto fail;
4601         }
4602 
4603         /*
4604          * Specify the media types supported by this adapter and register
4605          * callbacks to update media and link information
4606          */
4607         ifmedia_init(&sc->media, IFM_IMASK, re_ifmedia_upd, re_ifmedia_sts);
4608         ifmedia_add(&sc->media, IFM_ETHER | IFM_10_T, 0, NULL);
4609         ifmedia_add(&sc->media, IFM_ETHER | IFM_10_T | IFM_FDX, 0, NULL);
4610         ifmedia_add(&sc->media, IFM_ETHER | IFM_100_TX, 0, NULL);
4611         ifmedia_add(&sc->media, IFM_ETHER | IFM_100_TX | IFM_FDX, 0, NULL);
4612         switch(sc->re_device_id) {
4613         case RT_DEVICEID_8169:
4614         case RT_DEVICEID_8169SC:
4615         case RT_DEVICEID_8168:
4616         case RT_DEVICEID_8161:
4617                 ifmedia_add(&sc->media, IFM_ETHER | IFM_1000_T | IFM_FDX, 0, NULL);
4618                 ifmedia_add(&sc->media, IFM_ETHER | IFM_1000_T, 0, NULL);
4619                 break;
4620 
4621         default:
4622                 break;
4623         }
4624         ifmedia_add(&sc->media, IFM_ETHER | IFM_AUTO, 0, NULL);
4625         ifmedia_set(&sc->media, IFM_ETHER | IFM_AUTO);
4626         sc->media.ifm_media = IFM_ETHER | IFM_AUTO;
4627         re_ifmedia_upd(ifp);
4628 
4629 fail:
4630         if (error)
4631                 re_detach(dev);
4632 
4633         return(error);
4634 }
4635 
4636 static int re_detach(device_t dev)
4637 {
4638         struct re_softc		*sc;
4639         struct ifnet		*ifp;
4640         /*int			s;*/
4641         int			i;
4642         int			rid;
4643 
4644         /*s = splimp();*/
4645 
4646         sc = device_get_softc(dev);
4647 
4648         ifp = RE_GET_IFNET(sc);
4649 
4650         /* These should only be active if attach succeeded */
4651         if (device_is_attached(dev)) {
4652                 RE_LOCK(sc);
4653                 re_stop(sc);
4654                 RE_UNLOCK(sc);
4655 #if OS_VER>=VERSION(7,0)
4656                 taskqueue_drain(taskqueue_fast, &sc->re_inttask);
4657 #endif
4658 #if OS_VER < VERSION(4,9)
4659                 ether_ifdetach(ifp, ETHER_BPF_SUPPORTED);
4660 #else
4661                 ether_ifdetach(ifp);
4662 #endif
4663         }
4664 
4665         bus_generic_detach(dev);
4666 
4667         sc->driver_detach = 1;
4668 
4669         if (sc->re_intrhand)
4670                 bus_teardown_intr(dev, sc->re_irq, sc->re_intrhand);
4671 
4672 #if OS_VER>=VERSION(6,0)
4673         if (ifp)
4674                 if_free(ifp);
4675 #endif
4676 
4677         if ((sc->re_if_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) == 0)
4678                 rid = 0;
4679         else
4680                 rid = 1;
4681         if (sc->re_irq) {
4682                 bus_release_resource(dev, SYS_RES_IRQ, rid, sc->re_irq);
4683                 sc->re_irq = NULL;
4684         }
4685         if ((sc->re_if_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) != 0)
4686                 pci_release_msi(dev);
4687         if (sc->re_res_pba) {
4688                 rid = PCIR_BAR(4);
4689                 bus_release_resource(dev, SYS_RES_MEMORY, rid, sc->re_res_pba);
4690         }
4691         if (sc->re_res)
4692                 bus_release_resource(dev, sc->re_res_type, sc->re_res_id, sc->re_res);
4693 
4694         if (HW_DASH_SUPPORT_TYPE_3(sc) && sc->re_dash)
4695                 bus_space_unmap(sc->re_cmac_tag, sc->re_mapped_cmac_handle, RE_REGS_SIZE);
4696 
4697         if (sc->re_desc.re_rx_mtag) {
4698                 for (i = 0; i < RE_RX_BUF_NUM; i++) {
4699                         if (sc->re_desc.rx_buf[i]!=NULL) {
4700                                 bus_dmamap_sync(sc->re_desc.re_rx_mtag,
4701                                                 sc->re_desc.re_rx_dmamap[i],
4702                                                 BUS_DMASYNC_POSTREAD);
4703                                 bus_dmamap_unload(sc->re_desc.re_rx_mtag,
4704                                                   sc->re_desc.re_rx_dmamap[i]);
4705                                 bus_dmamap_destroy(sc->re_desc.re_rx_mtag,
4706                                                    sc->re_desc.re_rx_dmamap[i]);
4707                                 m_freem(sc->re_desc.rx_buf[i]);
4708                                 sc->re_desc.rx_buf[i] =NULL;
4709                         }
4710                 }
4711                 bus_dma_tag_destroy(sc->re_desc.re_rx_mtag);
4712                 sc->re_desc.re_rx_mtag =0;
4713         }
4714 
4715         if (sc->re_desc.re_tx_mtag) {
4716                 for (i = 0; i < RE_TX_BUF_NUM; i++) {
4717                         bus_dmamap_destroy(sc->re_desc.re_tx_mtag,
4718                                            sc->re_desc.re_tx_dmamap[i]);
4719                 }
4720                 bus_dma_tag_destroy(sc->re_desc.re_tx_mtag);
4721                 sc->re_desc.re_tx_mtag =0;
4722         }
4723 
4724         if (sc->re_desc.rx_desc_tag) {
4725                 bus_dmamap_sync(sc->re_desc.rx_desc_tag,
4726                                 sc->re_desc.rx_desc_dmamap,
4727                                 BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
4728                 bus_dmamap_unload(sc->re_desc.rx_desc_tag,
4729                                   sc->re_desc.rx_desc_dmamap);
4730                 bus_dmamem_free(sc->re_desc.rx_desc_tag,
4731                                 sc->re_desc.rx_desc,
4732                                 sc->re_desc.rx_desc_dmamap);
4733                 bus_dma_tag_destroy(sc->re_desc.rx_desc_tag);
4734         }
4735 
4736         if (sc->re_desc.tx_desc_tag) {
4737                 bus_dmamap_sync(sc->re_desc.tx_desc_tag,
4738                                 sc->re_desc.tx_desc_dmamap,
4739                                 BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
4740                 bus_dmamap_unload(sc->re_desc.tx_desc_tag,
4741                                   sc->re_desc.tx_desc_dmamap);
4742                 bus_dmamem_free(sc->re_desc.tx_desc_tag,
4743                                 sc->re_desc.tx_desc,
4744                                 sc->re_desc.tx_desc_dmamap);
4745                 bus_dma_tag_destroy(sc->re_desc.tx_desc_tag);
4746         }
4747 
4748         if (sc->re_parent_tag) {
4749                 bus_dma_tag_destroy(sc->re_parent_tag);
4750         }
4751 
4752         /*splx(s);*/
4753         RE_LOCK_DESTROY(sc);
4754 
4755         return(0);
4756 }
4757 #endif	/* !__DragonFly__ */
4758 
4759 #ifndef __DragonFly__
4760 static void
4761 re_link_state_change(struct ifnet *ifp, int link_state)
4762 {
4763 #if OS_VER>=VERSION(6,0)
4764         if_link_state_change(ifp, link_state);
4765 #else
4766         ifp->if_link_state = link_state
4767 #endif
4768 }
4769 
4770 /*
4771   * Device suspend routine.  Stop the interface and save some PCI
4772   * settings in case the BIOS doesn't restore them properly on
4773   * resume.
4774   */
4775 static int
4776 re_suspend(device_t dev)
4777 {
4778         struct re_softc         *sc;
4779         struct ifnet            *ifp;
4780 
4781         sc = device_get_softc(dev);
4782         RE_LOCK(sc);
4783         ifp = RE_GET_IFNET(sc);
4784         sc->re_link_chg_det = 0;
4785         re_stop(sc);
4786         re_hw_d3_para(sc);
4787         re_setwol(sc);
4788         sc->suspended = 1;
4789         sc->link_state = LINK_STATE_UNKNOWN;
4790         re_link_state_change(ifp, sc->link_state);
4791         sc->prohibit_access_reg = 1;
4792         RE_UNLOCK(sc);
4793 
4794         return (0);
4795 }
4796 
4797 /*
4798  * Device resume routine.  Restore some PCI settings in case the BIOS
4799  * doesn't, re-enable busmastering, and restart the interface if
4800  * appropriate.
4801  */
4802 static int
4803 re_resume(device_t dev)
4804 {
4805         struct re_softc         *sc;
4806         struct ifnet            *ifp;
4807 
4808         sc = device_get_softc(dev);
4809 
4810         RE_LOCK(sc);
4811 
4812         ifp = RE_GET_IFNET(sc);
4813 
4814         sc->prohibit_access_reg = 0;
4815 
4816         re_exit_oob(sc);
4817 
4818         re_hw_init(sc);
4819 
4820         re_reset(sc);
4821 
4822         re_phy_power_up(dev);
4823 
4824         re_hw_phy_config(sc);
4825 
4826         /*
4827          * Clear WOL matching such that normal Rx filtering
4828          * wouldn't interfere with WOL patterns.
4829          */
4830         re_clrwol(sc);
4831 
4832         RE_UNLOCK(sc);
4833 
4834         RE_LOCK(sc);
4835         re_ifmedia_upd(ifp);
4836         sc->suspended = 0;
4837         if (ifp->if_flags & IFF_UP) {
4838                 sc->re_link_chg_det = 1;
4839                 re_start_timer(sc);
4840         }
4841         RE_UNLOCK(sc);
4842 
4843         return (0);
4844 }
4845 #endif	/* !__DragonFly__ */
4846 
4847 
4848 static void
4849 ClearAndSetPCIePhyBit(
4850         struct re_softc *sc,
4851         u_int8_t   addr,
4852         u_int16_t   clearmask,
4853         u_int16_t   setmask
4854 )
4855 {
4856         u_int16_t EphyValue;
4857 
4858         EphyValue = MP_ReadEPhyUshort(sc, addr);
4859         EphyValue &= ~clearmask;
4860         EphyValue |= setmask;
4861         MP_WriteEPhyUshort(sc, addr, EphyValue);
4862 }
4863 
4864 static void
4865 ClearPCIePhyBit(
4866         struct re_softc *sc,
4867         u_int8_t   addr,
4868         u_int16_t   mask
4869 )
4870 {
4871         ClearAndSetPCIePhyBit(sc,
4872                               addr,
4873                               mask,
4874                               0
4875                              );
4876 }
4877 
4878 static void
4879 SetPCIePhyBit(
4880         struct re_softc *sc,
4881         u_int8_t   addr,
4882         u_int16_t   mask
4883 )
4884 {
4885         ClearAndSetPCIePhyBit(sc,
4886                               addr,
4887                               0,
4888                               mask
4889                              );
4890 }
4891 
4892 #ifndef __DragonFly__
4893 /*
4894  * Stop all chip I/O so that the kernel's probe routines don't
4895  * get confused by errant DMAs when rebooting.
4896  */
4897 static int re_shutdown(dev)	/* The same with re_stop(sc) */
4898 device_t		dev;
4899 {
4900         struct re_softc		*sc;
4901 
4902         sc = device_get_softc(dev);
4903 
4904         if (sc->re_dash)
4905                 re_driver_stop(sc);
4906 
4907         RE_LOCK(sc);
4908         sc->re_link_chg_det = 0;
4909         re_stop(sc);
4910         RE_UNLOCK(sc);
4911 
4912         RE_LOCK(sc);
4913         re_hw_d3_para(sc);
4914         re_phy_power_down(dev);
4915         RE_UNLOCK(sc);
4916 
4917         return 0;
4918 }
4919 #endif	/* !__DragonFly__ */
4920 
4921 static void re_hw_start_unlock(struct re_softc *sc)
4922 {
4923         struct ifnet		*ifp;
4924         u_int32_t		macver;
4925         u_int8_t		data8;
4926         u_int16_t		data16 = 0;
4927         u_int32_t		Data32;
4928 
4929         ifp = RE_GET_IFNET(sc);
4930 
4931 #ifndef __DragonFly__
4932         /* Init descriptors. */
4933         re_var_init(sc);
4934 #endif
4935 
4936         re_enable_cfg9346_write(sc);
4937 
4938         switch(sc->re_type) {
4939         case MACFG_36:
4940         case MACFG_37:
4941         case MACFG_38:
4942         case MACFG_39:
4943         case MACFG_42:
4944         case MACFG_43:
4945         case MACFG_50:
4946         case MACFG_51:
4947         case MACFG_52:
4948         case MACFG_53:
4949         case MACFG_54:
4950         case MACFG_55:
4951         case MACFG_56:
4952         case MACFG_57:
4953         case MACFG_58:
4954         case MACFG_59:
4955         case MACFG_60:
4956         case MACFG_61:
4957         case MACFG_62:
4958         case MACFG_67:
4959         case MACFG_68:
4960         case MACFG_69:
4961         case MACFG_70:
4962         case MACFG_71:
4963                 CSR_WRITE_1(sc, RE_CFG5, CSR_READ_1(sc, RE_CFG5) & ~BIT_0);
4964                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) & ~BIT_7);
4965                 CSR_WRITE_1(sc, 0xF1, CSR_READ_1(sc, 0xF1) & ~ BIT_7);
4966                 break;
4967         }
4968 
4969         /*disable Link Down Power Saving(non-LDPS)*/
4970         /*CSR_WRITE_1(sc, RE_LDPS, 0x05);*/
4971         /*ldps= CSR_READ_1(sc, RE_LDPS);*/
4972 
4973         CSR_WRITE_2(sc, RE_CPCR, 0x2060);
4974 
4975         CSR_WRITE_2(sc, RE_IM, 0x5151);
4976 
4977         CSR_WRITE_1(sc, RE_MTPS, 0x3f);
4978 
4979         if (sc->re_device_id == RT_DEVICEID_8169 || sc->re_device_id == RT_DEVICEID_8169SC) {
4980                 //do nothing
4981         } else {
4982                 /* Set the initial TX configuration.*/
4983                 CSR_WRITE_4(sc, RE_TXCFG, RE_TXCFG_CONFIG);
4984         }
4985 
4986         macver = CSR_READ_4(sc, RE_TXCFG) & 0xFC800000;
4987         if (macver == 0x00800000 || macver == 0x04000000 || macver == 0x10000000) {
4988                 CSR_WRITE_2(sc, RE_CPlusCmd, 0x0063| ((sc->re_type == MACFG_3 && sc->re_8169_MacVersion==1) ? 0x4008:0));
4989         } else if (macver == 0x18000000 || macver == 0x98000000) {
4990                 CSR_WRITE_2(sc, RE_CPlusCmd, 0x0068);
4991                 CSR_WRITE_2(sc, 0xe2, 0x0000);
4992         } else if (macver == 0x30000000) {
4993                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
4994                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
4995 
4996                 if (ifp->if_mtu > ETHERMTU) {
4997                         data8 = pci_read_config(sc->dev, 0x69, 1);
4998                         data8 &= ~0x70;
4999                         data8 |= 0x28;
5000                         pci_write_config(sc->dev, 0x69, data8, 1);
5001                 } else {
5002                         data8 = pci_read_config(sc->dev, 0x69, 1);
5003                         data8 &= ~0x70;
5004                         data8 |= 0x58;
5005                         pci_write_config(sc->dev, 0x69, data8, 1);
5006                 }
5007         } else if (macver == 0x38000000) {
5008                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
5009                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
5010 
5011                 if (ifp->if_mtu > ETHERMTU) {
5012                         data8 = pci_read_config(sc->dev, 0x69, 1);
5013                         data8 &= ~0x70;
5014                         data8 |= 0x28;
5015                         pci_write_config(sc->dev, 0x69, data8, 1);
5016                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | BIT_0);
5017                 } else {
5018                         data8 = pci_read_config(sc->dev, 0x69, 1);
5019                         data8 &= ~0x70;
5020                         data8 |= 0x58;
5021                         pci_write_config(sc->dev, 0x69, data8, 1);
5022                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) & ~ BIT_0);
5023                 }
5024         } else if (macver == 0x34000000 || macver == 0xB4000000) {
5025                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
5026         } else if (macver == 0x34800000 || macver == 0x24800000) {
5027                 if (pci_read_config(sc->dev, 0x81, 1) == 1) {
5028                         CSR_WRITE_1(sc, RE_DBG_reg, 0x98);
5029                         CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) | 0x80);
5030                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | 0x04);
5031                         pci_write_config(sc->dev, 0x81, 1, 1);
5032                 }
5033 
5034                 data8 = pci_read_config(sc->dev, 0x79, 1);
5035                 data8 &= ~0x70;
5036                 data8 |= 0x50;
5037                 pci_write_config(sc->dev, 0x79, data8, 1);
5038 
5039                 /*set configuration space offset 0x70f to 0x3f*/
5040                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
5041                 Data32 &=0xC0FFFFFF;
5042                 Data32 |= (0x3F << 24);
5043                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
5044 
5045                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
5046 
5047                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
5048                 if (sc->re_type == MACFG_14) {
5049                         CSR_WRITE_1(sc,RE_CFG1, 0x0f);
5050 
5051                         MP_WriteEPhyUshort(sc, 0x03, 0xC2F9);
5052                 } else if (sc->re_type == MACFG_15) {
5053                         CSR_WRITE_1(sc,RE_CFG1, 0x0f);
5054 
5055                         MP_WriteEPhyUshort(sc, 0x01, 0x6FE5);
5056                         MP_WriteEPhyUshort(sc, 0x03, 0x07D9);
5057                 } else if (sc->re_type == MACFG_17) {
5058                         MP_WriteEPhyUshort(sc, 0x06, 0xAF35);
5059                 } else if (sc->re_type == MACFG_18) {
5060                         CSR_WRITE_1(sc, 0xF5, CSR_READ_1(sc, 0xF5)|0x04);
5061                         MP_WriteEPhyUshort(sc, 0x19, 0xEC90);
5062                         MP_WriteEPhyUshort(sc, 0x01, 0x6FE5);
5063                         MP_WriteEPhyUshort(sc, 0x03, 0x05D9);
5064                         MP_WriteEPhyUshort(sc, 0x06, 0xAF35);
5065                 } else if (sc->re_type == MACFG_19) {
5066                         if (pci_read_config(sc->dev, 0x80, 1)&3) {
5067                                 MP_WriteEPhyUshort(sc, 0x02, 0x011F);
5068                         }
5069                         CSR_WRITE_1(sc, 0xF4, CSR_READ_1(sc, 0xF4)|0x08);
5070                         CSR_WRITE_1(sc, 0xF5, CSR_READ_1(sc, 0xF5)|0x04);
5071                         MP_WriteEPhyUshort(sc, 0x19, 0xEC90);
5072                         MP_WriteEPhyUshort(sc, 0x01, 0x6FE5);
5073                         MP_WriteEPhyUshort(sc, 0x03, 0x05D9);
5074                         MP_WriteEPhyUshort(sc, 0x06, 0xAF35);
5075                 }
5076         } else if (macver == 0x3C000000) {
5077                 //disable clock request.
5078                 pci_write_config(sc->dev, 0x81, 0, 1);
5079 
5080                 /*set configuration space offset 0x70f to 0x27*/
5081                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
5082                 Data32 &=0xC0FFFFFF;
5083                 Data32 |= (0x27 << 24);
5084                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
5085 
5086                 CSR_WRITE_1(sc, RE_CFG1, CSR_READ_1(sc, RE_CFG1)|0x10);
5087                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
5088 
5089                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
5090                 if (sc->re_type == MACFG_24) {
5091                         /*set mac register offset 0xd1 to 0xf8*/
5092                         CSR_WRITE_1(sc, RE_DBG_reg, 0xF8);
5093 
5094                         data16 = MP_ReadEPhyUshort(sc, 0x02) & ~0x1800;
5095                         data16 |= 0x1000;
5096                         MP_WriteEPhyUshort(sc, 0x02, data16);
5097 
5098                         data16 = MP_ReadEPhyUshort(sc, 0x03) | 0x0002;
5099                         MP_WriteEPhyUshort(sc, 0x03, data16);
5100 
5101                         data16 = MP_ReadEPhyUshort(sc, 0x06) & ~0x0080;
5102                         MP_WriteEPhyUshort(sc, 0x06, data16);
5103 
5104                         if (ifp->if_mtu > ETHERMTU) {
5105                                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) | BIT_2); //Jumbo_en0
5106                                 CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | (1 << 1)); //Jumbo_en1
5107 
5108                                 data8 = pci_read_config(sc->dev, 0x79, 1);
5109                                 data8 &= ~0x70;
5110                                 data8 |= 0x20;
5111                                 pci_write_config(sc->dev, 0x79, data8, 1);
5112                                 ifp->if_capenable &= ~IFCAP_HWCSUM;
5113                                 CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) & ~RL_RxChkSum);
5114                                 ifp->if_hwassist &= ~RE_CSUM_FEATURES;
5115 
5116                         } else {
5117                                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_2); //Jumbo_en0
5118                                 CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) & ~(1 << 1)); //Jumbo_en1
5119                                 data8 = pci_read_config(sc->dev, 0x79, 1);
5120                                 data8 &= ~0x70;
5121                                 data8 |= 0x50;
5122                                 pci_write_config(sc->dev, 0x79, data8, 1);
5123                                 if (sc->re_tx_cstag) {
5124                                         ifp->if_capenable |= IFCAP_TXCSUM;
5125                                         if ((sc->re_type == MACFG_24) || (sc->re_type == MACFG_25) || (sc->re_type == MACFG_26))
5126                                                 ifp->if_hwassist |= CSUM_TCP | CSUM_UDP;
5127                                         else
5128                                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
5129                                 }
5130                                 if (sc->re_rx_cstag) {
5131                                         ifp->if_capenable |= IFCAP_RXCSUM;
5132                                         CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) |RL_RxChkSum);
5133                                 }
5134                         }
5135                 } else if (sc->re_type == MACFG_25) {
5136                         data16 = MP_ReadEPhyUshort(sc, 0x01) | 0x0001;
5137                         MP_WriteEPhyUshort(sc, 0x01, data16);
5138 
5139                         data16 = MP_ReadEPhyUshort(sc, 0x03) & ~0x0620;
5140                         data16 |= 0x0220;
5141                         MP_WriteEPhyUshort(sc, 0x03, data16);
5142 
5143                         if (ifp->if_mtu > ETHERMTU) {
5144                                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) | BIT_2); //Jumbo_en0
5145                                 CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | (1<<1)); //Jumbo_en1
5146 
5147                                 data8 = pci_read_config(sc->dev, 0x79, 1);
5148                                 data8 &= ~0x70;
5149                                 data8 |= 0x20;
5150                                 pci_write_config(sc->dev, 0x79, data8, 1);
5151                                 ifp->if_capenable &= ~IFCAP_HWCSUM;
5152                                 CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) & ~RL_RxChkSum);
5153                                 ifp->if_hwassist &= ~RE_CSUM_FEATURES;
5154 
5155                         } else {
5156                                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_2); //Jumbo_en0
5157                                 CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) & ~(1<<1)); //Jumbo_en1
5158                                 data8 = pci_read_config(sc->dev, 0x79, 1);
5159                                 data8 &= ~0x70;
5160                                 data8 |= 0x50;
5161                                 pci_write_config(sc->dev, 0x79, data8, 1);
5162                                 if (sc->re_tx_cstag) {
5163                                         ifp->if_capenable |= IFCAP_TXCSUM;
5164                                         if ((sc->re_type == MACFG_24) || (sc->re_type == MACFG_25) || (sc->re_type == MACFG_26))
5165                                                 ifp->if_hwassist |= CSUM_TCP | CSUM_UDP;
5166                                         else
5167                                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
5168                                 }
5169                                 if (sc->re_rx_cstag) {
5170                                         ifp->if_capenable |= IFCAP_RXCSUM;
5171                                         CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) |RL_RxChkSum);
5172                                 }
5173 
5174 
5175                         }
5176                 } else if (sc->re_type == MACFG_26) {
5177                         if (ifp->if_mtu > ETHERMTU) {
5178                                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) | BIT_2); //Jumbo_en0
5179                                 CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | (1<<1)); //Jumbo_en1
5180 
5181                                 data8 = pci_read_config(sc->dev, 0x79, 1);
5182                                 data8 &= ~0x70;
5183                                 data8 |= 0x20;
5184                                 pci_write_config(sc->dev, 0x79, data8, 1);
5185                                 ifp->if_capenable &= ~IFCAP_HWCSUM;
5186                                 CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) & ~RL_RxChkSum);
5187                                 ifp->if_hwassist &= ~RE_CSUM_FEATURES;
5188                         } else {
5189                                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_2); //Jumbo_en0
5190                                 CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) & ~(1<<1)); //Jumbo_en1
5191                                 data8 = pci_read_config(sc->dev, 0x79, 1);
5192                                 data8 &= ~0x70;
5193                                 data8 |= 0x50;
5194                                 pci_write_config(sc->dev, 0x79, data8, 1);
5195                                 if (sc->re_tx_cstag) {
5196                                         ifp->if_capenable |= IFCAP_TXCSUM;
5197                                         if ((sc->re_type == MACFG_24) || (sc->re_type == MACFG_25) || (sc->re_type == MACFG_26))
5198                                                 ifp->if_hwassist |= CSUM_TCP | CSUM_UDP;
5199                                         else
5200                                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
5201                                 }
5202                                 if (sc->re_rx_cstag) {
5203                                         ifp->if_capenable |= IFCAP_RXCSUM;
5204                                         CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) |RL_RxChkSum);
5205                                 }
5206                         }
5207                 }
5208         } else if (macver == 0x3C800000) {
5209                 //disable clock request.
5210                 pci_write_config(sc->dev, 0x81, 0x00, 1);
5211 
5212                 /*set configuration space offset 0x70f to 0x27*/
5213                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
5214                 Data32 &=0xC0FFFFFF;
5215                 Data32 |= (0x27 << 24);
5216                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
5217 
5218                 re_eri_write(sc, 0x1EC, 1, 0x07, ERIAR_ASF);
5219 
5220                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
5221                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
5222                 if (sc->re_type == MACFG_28)
5223                         CSR_WRITE_1(sc, 0xD1, 0x20);
5224 
5225                 if (ifp->if_mtu > ETHERMTU) {
5226                         CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) | BIT_2); //Jumbo_en0
5227                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | (1<<1)); //Jumbo_en1
5228 
5229                         data8 = pci_read_config(sc->dev, 0x79, 1);
5230                         data8 &= ~0x70;
5231                         data8 |= 0x20;
5232                         pci_write_config(sc->dev, 0x79, data8, 1);
5233                         ifp->if_capenable &= ~IFCAP_HWCSUM;
5234                         CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) & ~RL_RxChkSum);
5235                         ifp->if_hwassist &= ~RE_CSUM_FEATURES;
5236                 } else {
5237                         CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_2); //Jumbo_en0
5238                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) & ~(1<<1)); //Jumbo_en1
5239                         data8 = pci_read_config(sc->dev, 0x79, 1);
5240                         data8 &= ~0x70;
5241                         data8 |= 0x50;
5242                         pci_write_config(sc->dev, 0x79, data8, 1);
5243                         if (sc->re_tx_cstag) {
5244                                 ifp->if_capenable |= IFCAP_TXCSUM;
5245                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
5246                         }
5247                         if (sc->re_rx_cstag) {
5248                                 ifp->if_capenable |= IFCAP_RXCSUM;
5249                                 CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) |RL_RxChkSum);
5250                         }
5251                 }
5252         } else if (macver == 0x28000000) {
5253                 //disable clock request.
5254                 pci_write_config(sc->dev, 0x81, 0x00, 1);
5255 
5256                 /*set configuration space offset 0x70f to 0x13*/
5257                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
5258                 Data32 &=0xC0FFFFFF;
5259                 Data32 |= (0x27 << 24);
5260                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
5261 
5262                 CSR_WRITE_1(sc, RE_TDFNR, 0x8);
5263 
5264                 CSR_WRITE_1(sc, 0xD1, CSR_READ_1(sc, 0xD1) | 0x02);
5265 
5266                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
5267                 CSR_WRITE_1(sc, RE_DBG_reg, CSR_READ_1(sc, RE_DBG_reg)|0x82);
5268 
5269                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
5270 
5271                 if (ifp->if_mtu > ETHERMTU) {
5272                         CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) | BIT_2); //Jumbo_en0
5273                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | (1<<1)); //Jumbo_en1
5274 
5275                         data8 = pci_read_config(sc->dev, 0x79, 1);
5276                         data8 &= ~0x70;
5277                         data8 |= 0x20;
5278                         pci_write_config(sc->dev, 0x79, data8, 1);
5279                         ifp->if_capenable &= ~IFCAP_HWCSUM;
5280                         CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) & ~RL_RxChkSum);
5281                         ifp->if_hwassist &= ~RE_CSUM_FEATURES;
5282 
5283                 } else {
5284                         CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_2); //Jumbo_en0
5285                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) & ~(1<<1)); //Jumbo_en1
5286                         data8 = pci_read_config(sc->dev, 0x79, 1);
5287                         data8 &= ~0x70;
5288                         data8 |= 0x50;
5289                         pci_write_config(sc->dev, 0x79, data8, 1);
5290                         if (sc->re_tx_cstag) {
5291                                 ifp->if_capenable |= IFCAP_TXCSUM;
5292                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
5293                         }
5294                         if (sc->re_rx_cstag) {
5295                                 ifp->if_capenable |= IFCAP_RXCSUM;
5296                                 CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) |RL_RxChkSum);
5297                         }
5298                 }
5299 
5300                 if (sc->re_type == MACFG_31) {
5301                         CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~(1<<4));
5302 
5303                         MP_WriteEPhyUshort(sc, 0x01, 0x7C7F);
5304                         MP_WriteEPhyUshort(sc, 0x02, 0x011F);
5305                         MP_WriteEPhyUshort(sc, 0x06, 0xB271);
5306                         MP_WriteEPhyUshort(sc, 0x07, 0xCE00);
5307                 } else if (sc->re_type == MACFG_32) {
5308                         MP_WriteEPhyUshort(sc, 0x01, 0x7C7D);
5309                         MP_WriteEPhyUshort(sc, 0x02, 0x091F);
5310                         MP_WriteEPhyUshort(sc, 0x03, 0xC5BA);
5311                         MP_WriteEPhyUshort(sc, 0x06, 0xB279);
5312                         MP_WriteEPhyUshort(sc, 0x07, 0xAF00);
5313                         MP_WriteEPhyUshort(sc, 0x1E, 0xB8EB);
5314                 } else if (sc->re_type == MACFG_33) {
5315                         CSR_WRITE_1(sc, RE_CFG1, CSR_READ_1(sc, RE_CFG1)|0x10);
5316 
5317                         MP_WriteEPhyUshort(sc, 0x01, 0x6C7F);
5318                         MP_WriteEPhyUshort(sc, 0x02, 0x011F);
5319                         ClearAndSetPCIePhyBit(sc,
5320                                               0x03,
5321                                               0xFFF0,
5322                                               0x01B0
5323                                              );
5324                         MP_WriteEPhyUshort(sc, 0x1A, 0x0546);
5325                         MP_WriteEPhyUshort(sc, 0x1C, 0x80C4);
5326                         MP_WriteEPhyUshort(sc, 0x1D, 0x78E5);
5327                         MP_WriteEPhyUshort(sc, 0x0A, 0x8100);
5328                 }
5329         } else if (macver == 0x28800000) {
5330                 /* disable clock request. */
5331                 pci_write_config(sc->dev, 0x81, 0x00, 1);
5332 
5333                 /*set configuration space offset 0x70f to 0x17*/
5334                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
5335                 Data32 &=0xC0FFFFFF;
5336                 Data32 |= (0x27 << 24);
5337                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
5338 
5339                 CSR_WRITE_1(sc, RE_TDFNR, 0x8);
5340                 if (sc->re_dash &&
5341                     (sc->re_type == MACFG_63 || sc->re_type == MACFG_64))
5342                         CSR_WRITE_1(sc, RE_TDFNR, 0x1);
5343 
5344                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
5345                 CSR_WRITE_1(sc, RE_DBG_reg, CSR_READ_1(sc, RE_DBG_reg)|0x82);
5346 
5347                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
5348 
5349                 if (ifp->if_mtu > ETHERMTU) {
5350                         CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) | BIT_2); //Jumbo_en0
5351                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | (1<<1)); //Jumbo_en1
5352 
5353                         data8 = pci_read_config(sc->dev, 0x79, 1);
5354                         data8 &= ~0x70;
5355                         data8 |= 0x20;
5356                         pci_write_config(sc->dev, 0x79, data8, 1);
5357                         ifp->if_capenable &= ~IFCAP_HWCSUM;
5358                         CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) & ~RL_RxChkSum);
5359                         ifp->if_hwassist &= ~RE_CSUM_FEATURES;
5360 
5361                 } else {
5362                         CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_2); //Jumbo_en0
5363                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) & ~(1<<1)); //Jumbo_en1
5364                         data8 = pci_read_config(sc->dev, 0x79, 1);
5365                         data8 &= ~0x70;
5366                         data8 |= 0x50;
5367                         pci_write_config(sc->dev, 0x79, data8, 1);
5368                         if (sc->re_tx_cstag) {
5369                                 ifp->if_capenable |= IFCAP_TXCSUM;
5370                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
5371                         }
5372                         if (sc->re_rx_cstag) {
5373                                 ifp->if_capenable |= IFCAP_RXCSUM;
5374                                 CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) |RL_RxChkSum);
5375                         }
5376                 }
5377 
5378                 if (sc->re_type == MACFG_65 || sc->re_type == MACFG_66) {
5379                         SetPCIePhyBit(sc, 0x0B, (BIT_3 | BIT_6));
5380 
5381                         ClearAndSetPCIePhyBit(sc,
5382                                               0x19,
5383                                               BIT_5,
5384                                               (BIT_4 | BIT_6)
5385                                              );
5386 
5387                         ClearAndSetPCIePhyBit(sc,
5388                                               0x0C,
5389                                               BIT_8,
5390                                               BIT_5
5391                                              );
5392 
5393                         ClearPCIePhyBit(sc, 0x10, (BIT_2));
5394                 }
5395         } else if (macver == 0x2C000000) {
5396                 /* disable clock request. */
5397                 pci_write_config(sc->dev, 0x81, 0x00, 1);
5398 
5399                 /*set configuration space offset 0x70f to 0x20*/
5400                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
5401                 Data32 &=0xC0FFFFFF;
5402                 Data32 |= (0x27 << 24);
5403                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
5404 
5405                 CSR_WRITE_1(sc, 0xF3, CSR_READ_1(sc, 0xF3)|0x20);
5406                 CSR_WRITE_1(sc, 0xF3, CSR_READ_1(sc, 0xF3)& ~0x20);
5407 
5408                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0)|0xC0);
5409                 CSR_WRITE_1(sc, 0xF1, CSR_READ_1(sc, 0xF1)|0x73);
5410                 CSR_WRITE_1(sc, RE_CFG5, (CSR_READ_1(sc, RE_CFG5)& ~0x08));
5411                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
5412 
5413                 CSR_WRITE_1(sc, RE_TDFNR, 0x8);
5414 
5415                 if (sc->re_type == MACFG_36 || sc->re_type == MACFG_37) {
5416                         /* set EPHY registers */
5417                         data16 = MP_ReadEPhyUshort(sc, 0x00) & ~0x0200;
5418                         data16 |= 0x0100;
5419                         MP_WriteEPhyUshort(sc, 0x00, data16);
5420 
5421                         data16 = MP_ReadEPhyUshort(sc, 0x00);
5422                         data16 |= 0x0004;
5423                         MP_WriteEPhyUshort(sc, 0x00, data16);
5424 
5425                         data16 = MP_ReadEPhyUshort(sc, 0x06) & ~0x0002;
5426                         data16 |= 0x0001;
5427                         MP_WriteEPhyUshort(sc, 0x06, data16);
5428 
5429                         data16 = MP_ReadEPhyUshort(sc, 0x06);
5430                         data16 |= 0x0030;
5431                         MP_WriteEPhyUshort(sc, 0x06, data16);
5432 
5433                         data16 = MP_ReadEPhyUshort(sc, 0x07);
5434                         data16 |= 0x2000;
5435                         MP_WriteEPhyUshort(sc, 0x07, data16);
5436 
5437                         data16 = MP_ReadEPhyUshort(sc, 0x00);
5438                         data16 |= 0x0020;
5439                         MP_WriteEPhyUshort(sc, 0x00, data16);
5440 
5441                         data16 = MP_ReadEPhyUshort(sc, 0x03) & ~0x5800;
5442                         data16 |= 0x2000;
5443                         MP_WriteEPhyUshort(sc, 0x03, data16);
5444 
5445                         data16 = MP_ReadEPhyUshort(sc, 0x03);
5446                         data16 |= 0x0001;
5447                         MP_WriteEPhyUshort(sc, 0x03, data16);
5448 
5449                         data16 = MP_ReadEPhyUshort(sc, 0x01) & ~0x0800;
5450                         data16 |= 0x1000;
5451                         MP_WriteEPhyUshort(sc, 0x01, data16);
5452 
5453                         data16 = MP_ReadEPhyUshort(sc, 0x07);
5454                         data16 |= 0x4000;
5455                         MP_WriteEPhyUshort(sc, 0x07, data16);
5456 
5457                         data16 = MP_ReadEPhyUshort(sc, 0x1E);
5458                         data16 |= 0x2000;
5459                         MP_WriteEPhyUshort(sc, 0x1E, data16);
5460 
5461                         MP_WriteEPhyUshort(sc, 0x19, 0xFE6C);
5462 
5463                         data16 = MP_ReadEPhyUshort(sc, 0x0A);
5464                         data16 |= 0x0040;
5465                         MP_WriteEPhyUshort(sc, 0x0A, data16);
5466 
5467                         if (ifp->if_mtu > ETHERMTU) {
5468                                 CSR_WRITE_1 (sc, RE_MTPS, 0x24);
5469                                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) | BIT_2);
5470                                 CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) |0x01);
5471                                 data8 = pci_read_config(sc->dev, 0x79, 1);
5472                                 data8 &= ~0x70;
5473                                 data8 |= 0x20;
5474                                 pci_write_config(sc->dev, 0x79, data8, 1);
5475                                 ifp->if_capenable &= ~IFCAP_HWCSUM;
5476                                 CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) & ~RL_RxChkSum);
5477                                 ifp->if_hwassist &= ~RE_CSUM_FEATURES;
5478                         } else {
5479                                 CSR_WRITE_1 (sc, RE_MTPS, 0x0c);
5480                                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_2);
5481                                 CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) & ~0x01);
5482                                 data8 = pci_read_config(sc->dev, 0x79, 1);
5483                                 data8 &= ~0x70;
5484                                 data8 |= 0x50;
5485                                 pci_write_config(sc->dev, 0x79, data8, 1);
5486 
5487                                 if (sc->re_tx_cstag) {
5488                                         ifp->if_capenable |= IFCAP_TXCSUM;
5489                                         ifp->if_hwassist |= RE_CSUM_FEATURES;
5490                                 }
5491                                 if (sc->re_rx_cstag) {
5492                                         ifp->if_capenable |= IFCAP_RXCSUM;
5493                                         CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) |RL_RxChkSum);
5494                                 }
5495                         }
5496                 }
5497         } else if (macver == 0x2C800000) {
5498                 /* disable clock request. */
5499                 pci_write_config(sc->dev, 0x81, 0x00, 1);
5500 
5501                 /*set configuration space offset 0x70f to 0x27*/
5502                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
5503                 Data32 &=0xC0FFFFFF;
5504                 Data32 |= (0x27 << 24);
5505                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
5506 
5507                 data8 = pci_read_config(sc->dev, 0x79, 1);
5508                 data8 &= ~0x70;
5509                 data8 |= 0x50;
5510                 pci_write_config(sc->dev, 0x79, data8, 1);
5511 
5512                 CSR_WRITE_1(sc, RE_TDFNR, 0x8);
5513 
5514                 re_eri_write(sc, 0xC0, 2, 0x0000, ERIAR_ExGMAC);
5515                 re_eri_write(sc, 0xB8, 4, 0x00000000, ERIAR_ExGMAC);
5516                 re_eri_write(sc, 0xC8, 4, 0x00100002, ERIAR_ExGMAC);
5517                 re_eri_write(sc, 0xE8, 4, 0x00100006, ERIAR_ExGMAC);
5518                 Data32 = re_eri_read(sc, 0xdc, 4, ERIAR_ExGMAC);
5519                 Data32 &= ~BIT_0;
5520                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
5521                 Data32 |= BIT_0;
5522                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
5523 
5524                 Data32 = re_eri_read(sc, 0xD4, 4, ERIAR_ExGMAC);
5525                 Data32 |= BIT_11 | BIT_10;
5526                 re_eri_write(sc, 0xD4, 4, Data32, ERIAR_ExGMAC);
5527                 if (sc ->re_type == MACFG_39) {
5528                         Data32 = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
5529                         Data32 |= BIT_4;
5530                         re_eri_write(sc, 0x1B0, 4, Data32, ERIAR_ExGMAC);
5531                         re_eri_write(sc, 0xCC, 4, 0x00000050, ERIAR_ExGMAC);
5532                         re_eri_write(sc, 0xD0, 4, 0x07ff0060, ERIAR_ExGMAC);
5533                 }
5534 
5535                 CSR_WRITE_4(sc, RE_TXCFG, CSR_READ_4(sc, RE_TXCFG) |BIT_7);
5536                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) & ~BIT_7);
5537                 CSR_WRITE_1(sc, 0x1B, CSR_READ_1(sc, 0x1B) & ~0x07);
5538 
5539                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
5540 
5541                 if (sc ->re_type == MACFG_38) {
5542                         CSR_WRITE_4(sc, 0xB0, 0xEE480010);
5543                         CSR_WRITE_1(sc, 0x1A, CSR_READ_1(sc, 0x1A) & ~(BIT_2 |BIT_3));
5544                         re_eri_write(sc, 0x1DC, 1, 0x64, ERIAR_ExGMAC);
5545 
5546                         MP_WriteEPhyUshort(sc, 0x06, 0xF020);
5547                         MP_WriteEPhyUshort(sc, 0x07, 0x01FF);
5548                         MP_WriteEPhyUshort(sc, 0x00, 0x5027);
5549                         MP_WriteEPhyUshort(sc, 0x01, 0x0003);
5550                         MP_WriteEPhyUshort(sc, 0x02, 0x2D16);
5551                         MP_WriteEPhyUshort(sc, 0x03, 0x6D49);
5552                         MP_WriteEPhyUshort(sc, 0x08, 0x0006);
5553                         MP_WriteEPhyUshort(sc, 0x0A, 0x00C8);
5554                 }
5555 
5556                 data16 = MP_ReadEPhyUshort(sc, 0x09);
5557                 data16 |= BIT_7;
5558                 MP_WriteEPhyUshort(sc, 0x09, data16);
5559 
5560                 data16 = MP_ReadEPhyUshort(sc, 0x19);
5561                 data16 |= (BIT_2 | BIT_5 | BIT_9);
5562                 MP_WriteEPhyUshort(sc, 0x19, data16);
5563 
5564                 SetPCIePhyBit(sc, 0x00, BIT_3);
5565                 ClearAndSetPCIePhyBit(sc,
5566                                       0x0C,
5567                                       (BIT_13|BIT_12|BIT_11|BIT_10|BIT_8|BIT_7|BIT_6|BIT_5|BIT_4),
5568                                       BIT_9
5569                                      );
5570 
5571                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) | BIT_5);
5572                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
5573 
5574                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | BIT_6);
5575                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | BIT_6);
5576 
5577                 CSR_WRITE_1 (sc, RE_MTPS, 0x27);
5578                 ifp->if_capenable &= ~IFCAP_HWCSUM;
5579                 ifp->if_hwassist &= ~RE_CSUM_FEATURES;
5580         } else if (macver == 0x24000000) {
5581                 if (pci_read_config(sc->dev, 0x81, 1)==1) {
5582                         CSR_WRITE_1(sc, RE_DBG_reg, 0x98);
5583                         CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) | 0x80);
5584                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | 0x04);
5585                         pci_write_config(sc->dev, 0x81, 1, 1);
5586                 }
5587                 data8 = pci_read_config(sc->dev, 0x79, 1);
5588                 data8 &= ~0x70;
5589                 data8 |= 0x50;
5590                 pci_write_config(sc->dev, 0x79, data8, 1);
5591 
5592                 /*set configuration space offset 0x70f to 0x3F*/
5593                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
5594                 Data32 &=0xC0FFFFFF;
5595                 Data32 |= (0x3F << 24);
5596                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
5597 
5598                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
5599 
5600                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
5601 
5602                 MP_WriteEPhyUshort(sc, 0x06, 0xAF25);
5603                 MP_WriteEPhyUshort(sc, 0x07, 0x8E68);
5604         } else if (macver == 0x40800000) {
5605                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | 0x80);
5606                 CSR_WRITE_1(sc, 0xF1, CSR_READ_1(sc, 0xF1) | 0x28);
5607                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) | 0x0C);
5608                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) & ~BIT_7);
5609                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | 0x40);
5610                 CSR_WRITE_2(sc, 0xE0, CSR_READ_2(sc, 0xE0) & ~0xDF9C);
5611                 CSR_WRITE_1(sc, 0xD1, CSR_READ_1(sc, 0xD1) | 0x02);
5612 
5613                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
5614 
5615                 if (sc->re_type == MACFG_42) {
5616                         /* set EPHY registers */
5617                         SetPCIePhyBit(sc, 0x07, BIT_14);
5618                         SetPCIePhyBit(sc, 0x19, BIT_9);
5619                         SetPCIePhyBit(sc, 0x19, BIT_5);
5620                         SetPCIePhyBit(sc, 0x1E, BIT_13);
5621                         SetPCIePhyBit(sc, 0x03, BIT_0);
5622                         SetPCIePhyBit(sc, 0x19, BIT_8);
5623                         SetPCIePhyBit(sc, 0x19, BIT_2);
5624                         SetPCIePhyBit(sc, 0x0A, BIT_5);
5625                         SetPCIePhyBit(sc, 0x05, BIT_13);
5626                 }
5627                 if (sc->re_type == MACFG_43) {
5628                         SetPCIePhyBit(sc, 0x07, BIT_14);
5629                         SetPCIePhyBit(sc, 0x19, BIT_9);
5630                         SetPCIePhyBit(sc, 0x19, BIT_5);
5631                         SetPCIePhyBit(sc, 0x1E, BIT_13);
5632                         SetPCIePhyBit(sc, 0x03, BIT_0);
5633                         SetPCIePhyBit(sc, 0x19, BIT_8);
5634                         SetPCIePhyBit(sc, 0x19, BIT_2);
5635                         SetPCIePhyBit(sc, 0x0A, BIT_5);
5636                         SetPCIePhyBit(sc, 0x1E, BIT_15);
5637                         SetPCIePhyBit(sc, 0x05, BIT_13);
5638                 }
5639         } else if (macver == 0x44000000) {
5640 
5641                 CSR_WRITE_2(sc, 0xE0, CSR_READ_2(sc, 0xE0) & ~0xDF9C);
5642 
5643                 re_eri_write(sc, 0xC8, 4, 0x00000002, ERIAR_ExGMAC);
5644                 re_eri_write(sc, 0xE8, 4, 0x00000006, ERIAR_ExGMAC);
5645 
5646                 Data32 = re_eri_read(sc, 0xD4, 4, ERIAR_ExGMAC);
5647                 Data32 |= BIT_11 | BIT_10;
5648                 re_eri_write(sc, 0xD4, 4, Data32, ERIAR_ExGMAC);
5649 
5650                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
5651 
5652                 /* set EPHY registers */
5653                 MP_WriteEPhyUshort(sc, 0x19, 0xFF64);
5654 
5655                 CSR_WRITE_1 (sc, RE_MTPS, 0x27);
5656         } else if (macver == 0x48000000) {
5657                 /*set configuration space offset 0x70f to 0x27*/
5658                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
5659                 Data32 &=0xC0FFFFFF;
5660                 Data32 |= (0x27 << 24);
5661                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
5662 
5663                 data8 = pci_read_config(sc->dev, 0x79, 1);
5664                 data8 &= ~0x70;
5665                 data8 |= 0x50;
5666                 pci_write_config(sc->dev, 0x79, data8, 1);
5667 
5668                 CSR_WRITE_1(sc, RE_TDFNR, 0x8);
5669 
5670                 Data32 = re_eri_read(sc, 0xD4, 4, ERIAR_ExGMAC);
5671                 Data32 |= BIT_11 | BIT_10;
5672                 re_eri_write(sc, 0xD4, 4, Data32, ERIAR_ExGMAC);
5673                 re_eri_write(sc, 0xC0, 2, 0x0000, ERIAR_ExGMAC);
5674                 re_eri_write(sc, 0xB8, 4, 0x00000000, ERIAR_ExGMAC);
5675                 re_eri_write(sc, 0xC8, 4, 0x00100002, ERIAR_ExGMAC);
5676                 re_eri_write(sc, 0xE8, 4, 0x00100006, ERIAR_ExGMAC);
5677                 Data32 = re_eri_read(sc, 0xdc, 4, ERIAR_ExGMAC);
5678                 Data32 &= ~BIT_0;
5679                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
5680                 Data32 |= BIT_0;
5681                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
5682                 Data32 = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
5683                 Data32 |= BIT_4;
5684                 re_eri_write(sc, 0x1B0, 4, Data32, ERIAR_ExGMAC);
5685                 re_eri_write(sc, 0xCC, 4, 0x00000050, ERIAR_ExGMAC);
5686                 re_eri_write(sc, 0xD0, 4, 0x00000060, ERIAR_ExGMAC);
5687                 Data32 = re_eri_read(sc, 0x1D0, 4, ERIAR_ExGMAC);
5688                 Data32 |= BIT_4;
5689                 re_eri_write(sc, 0x1D0, 4, Data32, ERIAR_ExGMAC);
5690 
5691                 CSR_WRITE_4(sc, RE_TXCFG, CSR_READ_4(sc, RE_TXCFG) | BIT_7);
5692                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) & ~BIT_7);
5693                 CSR_WRITE_1(sc, 0x1B, CSR_READ_1(sc, 0x1B) & ~0x07);
5694 
5695                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
5696 
5697                 if (sc->re_type == MACFG_50) {
5698                         data16 = MP_ReadEPhyUshort(sc, 0x06);
5699                         data16 &= ~(BIT_7 | BIT_6);
5700                         data16 |= BIT_5;
5701                         MP_WriteEPhyUshort(sc, 0x06, data16);
5702 
5703                         data16 = MP_ReadEPhyUshort(sc, 0x08);
5704                         data16 &= ~BIT_0;
5705                         data16 |= BIT_1;
5706                         MP_WriteEPhyUshort(sc, 0x08, data16);
5707                 }
5708 
5709                 data16 = MP_ReadEPhyUshort(sc, 0x09);
5710                 data16 |= BIT_7;
5711                 MP_WriteEPhyUshort(sc, 0x09, data16);
5712 
5713                 data16 = MP_ReadEPhyUshort(sc, 0x19);
5714                 data16 |= (BIT_2 | BIT_5 | BIT_9);
5715                 MP_WriteEPhyUshort(sc, 0x19, data16);
5716 
5717                 SetPCIePhyBit(sc, 0x00, BIT_3);
5718                 ClearAndSetPCIePhyBit(sc,
5719                                       0x0C,
5720                                       (BIT_13|BIT_12|BIT_11|BIT_10|BIT_8|BIT_7|BIT_6|BIT_5|BIT_4),
5721                                       BIT_9
5722                                      );
5723 
5724                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
5725 
5726                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | BIT_6);
5727                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | BIT_6);
5728 
5729                 CSR_WRITE_1 (sc, RE_MTPS, 0x27);
5730 
5731                 if (ifp->if_mtu > ETHERMTU) {
5732                         ifp->if_capenable &= ~IFCAP_HWCSUM;
5733                         ifp->if_hwassist &= ~RE_CSUM_FEATURES;
5734                 } else {
5735                         if (sc->re_tx_cstag) {
5736                                 ifp->if_capenable |= IFCAP_TXCSUM;
5737                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
5738                         }
5739                         if (sc->re_rx_cstag) {
5740                                 ifp->if_capenable |= IFCAP_RXCSUM;
5741                         }
5742                 }
5743         } else if (macver == 0x48800000) {
5744                 /*set configuration space offset 0x70f to 0x27*/
5745                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
5746                 Data32 &=0xC0FFFFFF;
5747                 Data32 |= (0x27 << 24);
5748                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
5749 
5750                 data8 = pci_read_config(sc->dev, 0x79, 1);
5751                 data8 &= ~0x70;
5752                 data8 |= 0x50;
5753                 pci_write_config(sc->dev, 0x79, data8, 1);
5754 
5755                 CSR_WRITE_1(sc, RE_TDFNR, 0x8);
5756 
5757                 Data32 = re_eri_read(sc, 0xD4, 4, ERIAR_ExGMAC);
5758                 Data32 |= BIT_11 | BIT_10;
5759                 re_eri_write(sc, 0xD4, 4, Data32, ERIAR_ExGMAC);
5760                 re_eri_write(sc, 0xC0, 2, 0x0000, ERIAR_ExGMAC);
5761                 re_eri_write(sc, 0xB8, 4, 0x00000000, ERIAR_ExGMAC);
5762                 re_eri_write(sc, 0xC8, 4, 0x00100002, ERIAR_ExGMAC);
5763                 re_eri_write(sc, 0xE8, 4, 0x00100006, ERIAR_ExGMAC);
5764                 Data32 = re_eri_read(sc, 0xdc, 4, ERIAR_ExGMAC);
5765                 Data32 &= ~BIT_0;
5766                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
5767                 Data32 |= BIT_0;
5768                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
5769                 Data32 = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
5770                 Data32 |= BIT_4;
5771                 re_eri_write(sc, 0x1B0, 4, Data32, ERIAR_ExGMAC);
5772                 re_eri_write(sc, 0xCC, 4, 0x00000050, ERIAR_ExGMAC);
5773                 re_eri_write(sc, 0xD0, 4, 0x00000060, ERIAR_ExGMAC);
5774                 Data32 = re_eri_read(sc, 0x1D0, 4, ERIAR_ExGMAC);
5775                 Data32 |= BIT_4;
5776                 re_eri_write(sc, 0x1D0, 4, Data32, ERIAR_ExGMAC);
5777 
5778                 CSR_WRITE_4(sc, RE_TXCFG, CSR_READ_4(sc, RE_TXCFG) | BIT_7);
5779                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) & ~BIT_7);
5780 //		CSR_WRITE_1(sc, 0x1B, CSR_READ_1(sc, 0x1B) & ~0x07);
5781 
5782                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
5783 
5784                 data16 = MP_ReadEPhyUshort(sc, 0x06);
5785                 data16 &= ~(BIT_7 | BIT_6);
5786                 data16 |= BIT_5;
5787                 MP_WriteEPhyUshort(sc, 0x06, data16);
5788 
5789                 MP_WriteEPhyUshort(sc, 0x0f, 0x5200);
5790 
5791                 data16 = MP_ReadEPhyUshort(sc, 0x1e);
5792                 data16 |= BIT_14;
5793                 MP_WriteEPhyUshort(sc, 0x1e, data16);
5794 
5795                 data16 = MP_ReadEPhyUshort(sc, 0x19);
5796                 data16 |= (BIT_2 | BIT_5 | BIT_9);
5797                 MP_WriteEPhyUshort(sc, 0x19, data16);
5798 
5799                 SetPCIePhyBit(sc, 0x00, BIT_3);
5800                 ClearAndSetPCIePhyBit(sc,
5801                                       0x0C,
5802                                       (BIT_13|BIT_12|BIT_11|BIT_10|BIT_8|BIT_7|BIT_6|BIT_5|BIT_4),
5803                                       BIT_9
5804                                      );
5805 
5806                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
5807 
5808                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | BIT_6);
5809                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | BIT_6);
5810 
5811                 CSR_WRITE_1 (sc, RE_MTPS, 0x27);
5812 
5813                 if (ifp->if_mtu > ETHERMTU) {
5814                         ifp->if_capenable &= ~IFCAP_HWCSUM;
5815                         ifp->if_hwassist &= ~RE_CSUM_FEATURES;
5816                 } else {
5817                         if (sc->re_tx_cstag) {
5818                                 ifp->if_capenable |= IFCAP_TXCSUM;
5819                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
5820                         }
5821                         if (sc->re_rx_cstag) {
5822                                 ifp->if_capenable |= IFCAP_RXCSUM;
5823                         }
5824                 }
5825         } else if (macver == 0x44800000) {
5826                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | 0x80);
5827                 CSR_WRITE_1(sc, 0xF1, CSR_READ_1(sc, 0xF1) | 0x28);
5828                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) | 0x0C);
5829                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) & ~BIT_7);
5830                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | 0x40);
5831                 CSR_WRITE_2(sc, 0xE0, CSR_READ_2(sc, 0xE0) & ~0xDF9C);
5832 
5833                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
5834         } else if (macver == 0x4C000000 || macver == 0x50800000 ||
5835                    macver == 0x5C800000 || macver == 0x54000000) {
5836                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) | BIT_5);
5837 
5838                 if (sc->re_type == MACFG_59) {
5839                         MP_WriteMcuAccessRegWord(sc, 0xD3C0, 0x03F8);
5840                         MP_WriteMcuAccessRegWord(sc, 0xD3C2, 0x0000);
5841                 }
5842 
5843                 if (sc->re_type == MACFG_68 || sc->re_type == MACFG_69) {
5844                         MP_WriteMcuAccessRegWord(sc, 0xD400, MP_ReadMcuAccessRegWord(sc, 0xD400) & ~(BIT_0));
5845 
5846                         data16 = MP_ReadMcuAccessRegWord(sc, 0xE63E);
5847                         data16 &= ~(BIT_3 | BIT_2 | BIT_1);
5848                         MP_WriteMcuAccessRegWord(sc, 0xE63E, data16);
5849                         data16 |= (BIT_0);
5850                         MP_WriteMcuAccessRegWord(sc, 0xE63E, data16);
5851                         data16 &= ~(BIT_0);
5852                         MP_WriteMcuAccessRegWord(sc, 0xE63E, data16);
5853                         MP_WriteMcuAccessRegWord(sc, 0xC094, 0x0);
5854                         MP_WriteMcuAccessRegWord(sc, 0xC09E, 0x0);
5855 
5856                         MP_WriteMcuAccessRegWord(sc, 0xE098, 0x0AA2);
5857                 }
5858 
5859                 /*set configuration space offset 0x70f to 0x17*/
5860                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
5861                 Data32 &=0xC0FFFFFF;
5862                 Data32 |= (0x27 << 24);
5863                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
5864 
5865                 data8 = pci_read_config(sc->dev, 0x79, 1);
5866                 data8 &= ~0x70;
5867                 data8 |= 0x50;
5868                 pci_write_config(sc->dev, 0x79, data8, 1);
5869 
5870                 CSR_WRITE_1(sc, RE_TDFNR, 0x4);
5871 
5872                 if (sc->re_type == MACFG_56 || sc->re_type == MACFG_57) {
5873                         Data32 = MP_ReadPciEConfigSpace(sc, 0x2710);
5874                         Data32 &=0xFFFF0FFF;
5875                         Data32 |= (0x04 << 12);
5876                         MP_WritePciEConfigSpace(sc, 0x2710, Data32);
5877                 }
5878 
5879                 if (sc->re_type == MACFG_68 || sc->re_type == MACFG_69) {
5880                         Data32 = re_eri_read(sc, 0xD4, 4, ERIAR_ExGMAC);
5881                         Data32 |= (BIT_8 | BIT_9 | BIT_10 | BIT_11 | BIT_12);
5882                         re_eri_write(sc, 0xD4, 4, Data32, ERIAR_ExGMAC);
5883 
5884                         Data32 = re_eri_read(sc, 0xDC, 4, ERIAR_ExGMAC);
5885                         Data32 |= (BIT_2| BIT_3 | BIT_4);
5886                         re_eri_write(sc, 0xDC, 4, Data32, ERIAR_ExGMAC);
5887                 } else {
5888                         Data32 = re_eri_read(sc, 0xD4, 4, ERIAR_ExGMAC);
5889                         Data32 |= (BIT_7 | BIT_8 | BIT_9 | BIT_10 | BIT_11 | BIT_12);
5890                         re_eri_write(sc, 0xD4, 4, Data32, ERIAR_ExGMAC);
5891                 }
5892 
5893                 re_eri_write(sc, 0xC8, 4, 0x00080002, ERIAR_ExGMAC);
5894                 re_eri_write(sc, 0xCC, 1, 0x38, ERIAR_ExGMAC);
5895                 re_eri_write(sc, 0xD0, 1, 0x48, ERIAR_ExGMAC);
5896                 re_eri_write(sc, 0xE8, 4, 0x00100006, ERIAR_ExGMAC);
5897 
5898                 if (sc->re_type == MACFG_68 || sc->re_type == MACFG_69)
5899                         MP_WriteMcuAccessRegWord(sc, 0xE054, 0xFC01);
5900 
5901                 re_eri_write(sc, 0x5F0, 4, 0x4F87, ERIAR_ExGMAC);
5902 
5903                 Data32 = re_eri_read(sc, 0xdc, 4, ERIAR_ExGMAC);
5904                 Data32 &= ~BIT_0;
5905                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
5906                 Data32 |= BIT_0;
5907                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
5908 
5909                 Data32 = re_eri_read(sc, 0x2FC, 4, ERIAR_ExGMAC);
5910                 Data32 &= ~(BIT_0 | BIT_1 | BIT_2);
5911                 Data32 |= (BIT_0);
5912                 re_eri_write(sc, 0x2FC, 4, Data32, ERIAR_ExGMAC);
5913 
5914                 Data32 = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
5915                 Data32 &= ~BIT_12;
5916                 re_eri_write(sc, 0x1B0, 4, Data32, ERIAR_ExGMAC);
5917 
5918                 CSR_WRITE_4(sc, RE_TXCFG, CSR_READ_4(sc, RE_TXCFG) | BIT_7);
5919                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) & ~BIT_7);
5920                 CSR_WRITE_1(sc, 0x1B, CSR_READ_1(sc, 0x1B) & ~0x07);
5921 
5922                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
5923 
5924                 if (sc->re_type == MACFG_56 || sc->re_type == MACFG_57) {
5925                         ClearPCIePhyBit(sc, 0x00, BIT_3);
5926                         ClearAndSetPCIePhyBit(sc,
5927                                               0x0C,
5928                                               (BIT_13|BIT_12|BIT_10|BIT_9|BIT_8|BIT_7|BIT_6|BIT_4),
5929                                               (BIT_11|BIT_5)
5930                                              );
5931                         SetPCIePhyBit(sc, 0x1E, BIT_0);
5932                         ClearPCIePhyBit(sc, 0x19, BIT_15);
5933                 }  else if (sc->re_type == MACFG_58) {
5934                         SetPCIePhyBit(sc, 0x00, (BIT_3));
5935                         ClearAndSetPCIePhyBit(sc,
5936                                               0x0C,
5937                                               (BIT_13 | BIT_12 | BIT_11 | BIT_10 | BIT_8 | BIT_7 | BIT_6 | BIT_5 | BIT_4),
5938                                               BIT_9
5939                                              );
5940                 }  else if (sc->re_type == MACFG_59) {
5941                         ClearPCIePhyBit(sc, 0x00, BIT_3);
5942                         ClearAndSetPCIePhyBit(sc,
5943                                               0x0C,
5944                                               (BIT_13 | BIT_12 | BIT_10 | BIT_9 | BIT_8 | BIT_7 | BIT_6 | BIT_4),
5945                                               (BIT_5 | BIT_11)
5946                                              );
5947 
5948                         SetPCIePhyBit(sc, 0x1E, BIT_0);
5949                         ClearPCIePhyBit(sc, 0x19, BIT_15);
5950                         MP_WriteEPhyUshort(sc, 0x19, 0x7C00);
5951                         MP_WriteEPhyUshort(sc, 0x1E, 0x20EB);
5952                         MP_WriteEPhyUshort(sc, 0x0D, 0x1666);
5953                         MP_WriteEPhyUshort(sc, 0x00, 0x10A3);
5954 
5955                         MP_WriteEPhyUshort(sc, 0x06, 0xF050);
5956 
5957                         SetPCIePhyBit(sc, 0x04, BIT_4);
5958                         ClearPCIePhyBit(sc, 0x1D, BIT_14);
5959                 } else if (sc->re_type == MACFG_60) {
5960                         ClearPCIePhyBit(sc, 0x00, BIT_3);
5961                         ClearAndSetPCIePhyBit(sc,
5962                                               0x0C,
5963                                               (BIT_13 | BIT_12 | BIT_10 | BIT_9 | BIT_8 | BIT_7 | BIT_6 | BIT_4),
5964                                               (BIT_5 | BIT_11)
5965                                              );
5966                         SetPCIePhyBit(sc, 0x1E, BIT_0);
5967                         ClearPCIePhyBit(sc, 0x19, BIT_15);
5968 
5969                         ClearPCIePhyBit(sc, 0x19, (BIT_5 | BIT_0));
5970 
5971                         SetPCIePhyBit(sc, 0x1E, BIT_13);
5972                         ClearPCIePhyBit(sc, 0x0D, BIT_8);
5973                         SetPCIePhyBit(sc, 0x0D, BIT_9);
5974                         SetPCIePhyBit(sc, 0x00, BIT_7);
5975 
5976                         SetPCIePhyBit(sc, 0x06, BIT_4);
5977 
5978                         SetPCIePhyBit(sc, 0x04, BIT_4);
5979                         SetPCIePhyBit(sc, 0x1D, BIT_14);
5980                 } else if (sc->re_type == MACFG_68 || sc->re_type == MACFG_69) {
5981                         ClearPCIePhyBit(sc, 0x1E, BIT_11);
5982 
5983                         SetPCIePhyBit(sc, 0x1E, BIT_0);
5984                         SetPCIePhyBit(sc, 0x1D, BIT_11);
5985 
5986                         MP_WriteEPhyUshort(sc, 0x05, 0x2089);
5987                         MP_WriteEPhyUshort(sc, 0x06, 0x5881);
5988 
5989                         MP_WriteEPhyUshort(sc, 0x04, 0x854A);
5990                         MP_WriteEPhyUshort(sc, 0x01, 0x068B);
5991                 }
5992 
5993                 if (sc->re_type == MACFG_60) {
5994                         data16 = MP_ReadMcuAccessRegWord(sc, 0xD3C0);
5995                         data16 &= 0xF000;
5996                         data16 |= 0x3A9;
5997                         MP_WriteMcuAccessRegWord(sc, 0xD3C0, data16);
5998 
5999                         data16 = MP_ReadMcuAccessRegWord(sc, 0xD3C2);
6000                         data16 &= 0xFF00;
6001                         MP_WriteMcuAccessRegWord(sc, 0xD3C2, data16);
6002 
6003                         data16 = MP_ReadMcuAccessRegWord(sc, 0xD3C4);
6004                         data16 |= (BIT_0);
6005                         MP_WriteMcuAccessRegWord(sc, 0xD3C4, data16);
6006                 } else if (sc->re_type == MACFG_68 || sc->re_type == MACFG_69) {
6007                         if (sc->RequireAdjustUpsTxLinkPulseTiming) {
6008                                 data16 = MP_ReadMcuAccessRegWord(sc, 0xD412);
6009                                 data16 &= ~(0x0FFF);
6010                                 data16 |= sc->SwrCnt1msIni;
6011                                 MP_WriteMcuAccessRegWord(sc, 0xD412, data16);
6012                         }
6013 
6014                         data16 = MP_ReadMcuAccessRegWord(sc, 0xE056);
6015                         data16 &= ~(BIT_7 | BIT_6 | BIT_5 | BIT_4);
6016                         data16 |= (BIT_6 | BIT_5 | BIT_4);
6017                         MP_WriteMcuAccessRegWord(sc, 0xE056, data16);
6018 
6019                         data16 = MP_ReadMcuAccessRegWord(sc, 0xE052);
6020                         data16 &= ~(BIT_14 | BIT_13);
6021                         data16 |= BIT_15;
6022                         data16 |= BIT_3;
6023                         MP_WriteMcuAccessRegWord(sc, 0xE052, data16);
6024 
6025                         data16 = MP_ReadMcuAccessRegWord(sc, 0xD420);
6026                         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);
6027                         data16 |= 0x47F;
6028                         MP_WriteMcuAccessRegWord(sc, 0xD420, data16);
6029 
6030                         data16 = MP_ReadMcuAccessRegWord(sc, 0xE0D6);
6031                         data16 &= ~(BIT_8 | BIT_7 | BIT_6 | BIT_5 | BIT_4 | BIT_3 | BIT_2 | BIT_1 | BIT_0);
6032                         data16 |= 0x17F;
6033                         MP_WriteMcuAccessRegWord(sc, 0xE0D6, data16);
6034                 }
6035 
6036                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
6037 
6038                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | BIT_6);
6039                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | BIT_6);
6040 
6041                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) & ~BIT_3);
6042 
6043                 CSR_WRITE_1 (sc, RE_MTPS, 0x27);
6044 
6045                 if (sc->re_type == MACFG_56 || sc->re_type == MACFG_57 ||
6046                     sc->re_type == MACFG_58 || sc->re_type == MACFG_59) {
6047                         MP_WriteMcuAccessRegWord(sc, 0xC140, 0xFFFF);
6048                 } else if (sc->re_type == MACFG_68 || sc->re_type == MACFG_69) {
6049                         MP_WriteMcuAccessRegWord(sc, 0xC140, 0xFFFF);
6050                         MP_WriteMcuAccessRegWord(sc, 0xC142, 0xFFFF);
6051                 }
6052 
6053                 if (ifp->if_mtu > ETHERMTU) {
6054                         ifp->if_capenable &= ~IFCAP_HWCSUM;
6055                         ifp->if_hwassist &= ~RE_CSUM_FEATURES;
6056                 } else {
6057                         if (sc->re_tx_cstag) {
6058                                 ifp->if_capenable |= IFCAP_TXCSUM;
6059                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
6060                         }
6061                         if (sc->re_rx_cstag) {
6062                                 ifp->if_capenable |= IFCAP_RXCSUM;
6063                         }
6064                 }
6065         } else if (macver == 0x50000000) {
6066                 /*set configuration space offset 0x70f to 0x17*/
6067                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
6068                 Data32 &=0xC0FFFFFF;
6069                 Data32 |= (0x27 << 24);
6070                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
6071 
6072                 data8 = pci_read_config(sc->dev, 0x79, 1);
6073                 data8 &= ~0x70;
6074                 data8 |= 0x50;
6075                 pci_write_config(sc->dev, 0x79, data8, 1);
6076 
6077                 Data32 = re_eri_read(sc, 0xD4, 4, ERIAR_ExGMAC);
6078                 Data32 |= BIT_7 | BIT_8 | BIT_9 | BIT_10 | BIT_11 | BIT_12;
6079                 re_eri_write(sc, 0xD4, 4, Data32, ERIAR_ExGMAC);
6080 
6081                 re_eri_write(sc, 0xC8, 4, 0x00080002, ERIAR_ExGMAC);
6082                 re_eri_write(sc, 0xCC, 1, 0x2F, ERIAR_ExGMAC);
6083                 re_eri_write(sc, 0xD0, 1, 0x5F, ERIAR_ExGMAC);
6084                 re_eri_write(sc, 0xE8, 4, 0x00100006, ERIAR_ExGMAC);
6085 
6086                 if (sc->re_type == MACFG_62 || sc->re_type == MACFG_67) {
6087                         OOB_mutex_lock(sc);
6088                         re_eri_write(sc, 0x5F0, 4, 0x4F87, ERIAR_ExGMAC);
6089                         OOB_mutex_unlock(sc);
6090                 }
6091 
6092                 Data32 = re_eri_read(sc, 0xdc, 4, ERIAR_ExGMAC);
6093                 Data32 &= ~BIT_0;
6094                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
6095                 Data32 |= BIT_0;
6096                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
6097 
6098                 Data32 = re_eri_read(sc, 0x2FC, 4, ERIAR_ExGMAC);
6099                 Data32 &= ~(BIT_0 | BIT_1 | BIT_2);
6100                 Data32 |= (BIT_0);
6101                 re_eri_write(sc, 0x2FC, 4, Data32, ERIAR_ExGMAC);
6102 
6103                 Data32 = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
6104                 Data32 &= ~BIT_12;
6105                 re_eri_write(sc, 0x1B0, 4, Data32, ERIAR_ExGMAC);
6106 
6107                 CSR_WRITE_4(sc, RE_TXCFG, CSR_READ_4(sc, RE_TXCFG) | BIT_7);
6108                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) & ~BIT_7);
6109                 CSR_WRITE_1(sc, 0x1B, CSR_READ_1(sc, 0x1B) & ~0x07);
6110 
6111                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
6112 
6113                 if (sc->re_type == MACFG_61) {
6114                         MP_WriteEPhyUshort(sc, 0x00, 0x10AB);
6115                         MP_WriteEPhyUshort(sc, 0x06, 0xF030);
6116                         MP_WriteEPhyUshort(sc, 0x08, 0x2006);
6117                         MP_WriteEPhyUshort(sc, 0x0D, 0x1666);
6118                         ClearPCIePhyBit(sc, 0x0C, (BIT_13 | BIT_12 | BIT_11 | BIT_10 | BIT_9 | BIT_8 | BIT_7 | BIT_6 | BIT_5 | BIT_4));
6119                 }  else if (sc->re_type == MACFG_62) {
6120                         MP_WriteEPhyUshort(sc, 0x00, 0x10A3);
6121                         MP_WriteEPhyUshort(sc, 0x19, 0xFC00);
6122                         MP_WriteEPhyUshort(sc, 0x1E, 0x20EA);
6123                 } else if (sc->re_type == MACFG_67) {
6124                         SetPCIePhyBit(sc, 0x00, BIT_7);
6125                         ClearAndSetPCIePhyBit(sc,
6126                                               0x0D,
6127                                               BIT_8,
6128                                               BIT_9
6129                                              );
6130                         ClearPCIePhyBit(sc, 0x19, (BIT_15 | BIT_5 | BIT_0));
6131                         SetPCIePhyBit(sc, 0x1E, BIT_13);
6132                 }
6133 
6134                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
6135 
6136                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | BIT_6);
6137                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | BIT_6);
6138 
6139                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) & ~BIT_3);
6140 
6141                 CSR_WRITE_1 (sc, RE_MTPS, 0x27);
6142 
6143                 if (sc->re_type == MACFG_67) {
6144                         data16 = MP_ReadMcuAccessRegWord(sc, 0xD3E2);
6145                         data16 &= 0xF000;
6146                         data16 |= 0x3A9;
6147                         MP_WriteMcuAccessRegWord(sc, 0xD3E2, data16);
6148 
6149                         data16 = MP_ReadMcuAccessRegWord(sc, 0xD3E4);
6150                         data16 &= 0xFF00;
6151                         MP_WriteMcuAccessRegWord(sc, 0xD3E4, data16);
6152 
6153                         data16 = MP_ReadMcuAccessRegWord(sc, 0xE860);
6154                         data16 |= BIT_7;
6155                         MP_WriteMcuAccessRegWord(sc, 0xE860, data16);
6156                 }
6157 
6158                 MP_WriteMcuAccessRegWord(sc, 0xC140, 0xFFFF);
6159                 MP_WriteMcuAccessRegWord(sc, 0xC142, 0xFFFF);
6160 
6161                 if (ifp->if_mtu > ETHERMTU) {
6162                         ifp->if_capenable &= ~IFCAP_HWCSUM;
6163                         ifp->if_hwassist &= ~RE_CSUM_FEATURES;
6164                 } else {
6165                         if (sc->re_tx_cstag) {
6166                                 ifp->if_capenable |= IFCAP_TXCSUM;
6167                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
6168                         }
6169                         if (sc->re_rx_cstag) {
6170                                 ifp->if_capenable |= IFCAP_RXCSUM;
6171                         }
6172                 }
6173         } else if (macver == 0x54800000) {
6174                 MP_WriteMcuAccessRegWord(sc, 0xD400, MP_ReadMcuAccessRegWord(sc, 0xD400) & ~(BIT_0));
6175 
6176                 if (sc->RequireAdjustUpsTxLinkPulseTiming) {
6177                         data16 = MP_ReadMcuAccessRegWord(sc, 0xD412);
6178                         data16 &= ~(0x0FFF);
6179                         data16 |= sc->SwrCnt1msIni;
6180                         MP_WriteMcuAccessRegWord(sc, 0xD412, data16);
6181                 }
6182 
6183                 data16 = MP_ReadMcuAccessRegWord(sc, 0xE056);
6184                 data16 &= ~(BIT_7 | BIT_6 | BIT_5 | BIT_4);
6185                 data16 |= (BIT_6 | BIT_5 | BIT_4);
6186                 MP_WriteMcuAccessRegWord(sc, 0xE056, data16);
6187 
6188                 OOB_mutex_lock(sc);
6189                 data16 = MP_ReadMcuAccessRegWord(sc, 0xE052);
6190                 if (sc->re_type == MACFG_71)
6191                         data16 |= BIT_3;
6192                 else
6193                         data16 &= ~BIT_3;
6194                 MP_WriteMcuAccessRegWord(sc, 0xE052, data16);
6195                 OOB_mutex_unlock(sc);
6196 
6197                 data16 = MP_ReadMcuAccessRegWord(sc, 0xD420);
6198                 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);
6199                 data16 |= 0x47F;
6200                 MP_WriteMcuAccessRegWord(sc, 0xD420, data16);
6201 
6202                 CSR_WRITE_1(sc, RE_TDFNR, 0x4);
6203 
6204                 data16 = MP_ReadMcuAccessRegWord(sc, 0xE63E);
6205                 data16 &= ~(BIT_3 | BIT_2 | BIT_1);
6206                 MP_WriteMcuAccessRegWord(sc, 0xE63E, data16);
6207                 data16 |= (BIT_0);
6208                 MP_WriteMcuAccessRegWord(sc, 0xE63E, data16);
6209                 data16 &= ~(BIT_0);
6210                 MP_WriteMcuAccessRegWord(sc, 0xE63E, data16);
6211                 MP_WriteMcuAccessRegWord(sc, 0xC094, 0x0);
6212                 MP_WriteMcuAccessRegWord(sc, 0xC09E, 0x0);
6213 
6214                 /*set configuration space offset 0x70f to 0x27*/
6215                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
6216                 Data32 &=0xC0FFFFFF;
6217                 Data32 |= (0x27 << 24);
6218                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
6219 
6220                 data8 = pci_read_config(sc->dev, 0x79, 1);
6221                 data8 &= ~0x70;
6222                 data8 |= 0x50;
6223                 pci_write_config(sc->dev, 0x79, data8, 1);
6224 
6225                 Data32 = re_eri_read(sc, 0xD4, 4, ERIAR_ExGMAC);
6226                 Data32 |= BIT_7 | BIT_8 | BIT_9 | BIT_10 | BIT_11 | BIT_12;
6227                 re_eri_write(sc, 0xD4, 4, Data32, ERIAR_ExGMAC);
6228 
6229                 re_eri_write(sc, 0xC8, 4, 0x00080002, ERIAR_ExGMAC);
6230                 re_eri_write(sc, 0xCC, 1, 0x2F, ERIAR_ExGMAC);
6231                 re_eri_write(sc, 0xD0, 1, 0x5F, ERIAR_ExGMAC);
6232                 re_eri_write(sc, 0xE8, 4, 0x00100006, ERIAR_ExGMAC);
6233 
6234                 MP_WriteMcuAccessRegWord(sc, 0xE054, 0xFC01);
6235 
6236                 OOB_mutex_lock(sc);
6237                 Data32 = re_eri_read(sc, 0x5F0, 4, ERIAR_ExGMAC);
6238                 Data32 |= (BIT_8 | BIT_9 | BIT_10 | BIT_11);
6239                 re_eri_write(sc, 0x5F0, 4, Data32, ERIAR_ExGMAC);
6240                 OOB_mutex_unlock(sc);
6241 
6242                 Data32 = re_eri_read(sc, 0xdc, 4, ERIAR_ExGMAC);
6243                 Data32 &= ~BIT_0;
6244                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
6245                 Data32 |= BIT_0;
6246                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
6247 
6248                 Data32 = re_eri_read(sc, 0x2FC, 4, ERIAR_ExGMAC);
6249                 Data32 &= ~(BIT_0 | BIT_1 | BIT_2);
6250                 Data32 |= (BIT_0);
6251                 re_eri_write(sc, 0x2FC, 4, Data32, ERIAR_ExGMAC);
6252 
6253                 Data32 = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
6254                 Data32 &= ~BIT_12;
6255                 re_eri_write(sc, 0x1B0, 4, Data32, ERIAR_ExGMAC);
6256 
6257                 Data32 = re_eri_read(sc, 0x1D0, 1, ERIAR_ExGMAC);
6258                 Data32 &= ~BIT_1;
6259                 re_eri_write(sc, 0x1D0, 1, Data32, ERIAR_ExGMAC);
6260 
6261                 re_eri_write(sc, 0xC0, 2, 0x0000, ERIAR_ExGMAC);
6262                 re_eri_write(sc, 0xB8, 4, 0x00000000, ERIAR_ExGMAC);
6263 
6264                 CSR_WRITE_4(sc, RE_TXCFG, CSR_READ_4(sc, RE_TXCFG) | BIT_7);
6265                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) & ~BIT_7);
6266                 CSR_WRITE_1(sc, 0x1B, CSR_READ_1(sc, 0x1B) & ~0x07);
6267 
6268                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
6269 
6270                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
6271 
6272                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | BIT_6);
6273                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | BIT_6);
6274 
6275                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | BIT_7);
6276 
6277                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) & ~BIT_3);
6278 
6279                 if (ifp->if_mtu > ETHERMTU)
6280                         CSR_WRITE_1 (sc, RE_MTPS, 0x27);
6281 
6282                 data16 = MP_ReadMcuAccessRegWord(sc, 0xD3E2);
6283                 data16 &= 0xF000;
6284                 data16 |= 0x3A9;
6285                 MP_WriteMcuAccessRegWord(sc, 0xD3E2, data16);
6286 
6287                 data16 = MP_ReadMcuAccessRegWord(sc, 0xD3E4);
6288                 data16 &= 0xFF00;
6289                 MP_WriteMcuAccessRegWord(sc, 0xD3E4, data16);
6290 
6291                 data16 = MP_ReadMcuAccessRegWord(sc, 0xE860);
6292                 data16 |= BIT_7;
6293                 MP_WriteMcuAccessRegWord(sc, 0xE860, data16);
6294 
6295                 MP_WriteMcuAccessRegWord(sc, 0xC140, 0xFFFF);
6296                 MP_WriteMcuAccessRegWord(sc, 0xC142, 0xFFFF);
6297 
6298                 if (ifp->if_mtu > ETHERMTU) {
6299                         ifp->if_capenable &= ~IFCAP_HWCSUM;
6300                         ifp->if_hwassist &= ~RE_CSUM_FEATURES;
6301                 } else {
6302                         if (sc->re_tx_cstag) {
6303                                 ifp->if_capenable |= IFCAP_TXCSUM;
6304                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
6305                         }
6306                         if (sc->re_rx_cstag) {
6307                                 ifp->if_capenable |= IFCAP_RXCSUM;
6308                         }
6309                 }
6310         }
6311 
6312         //clear io_rdy_l23
6313         switch (sc->re_type) {
6314         case MACFG_42:
6315         case MACFG_43:
6316         case MACFG_52:
6317         case MACFG_53:
6318         case MACFG_54:
6319         case MACFG_55:
6320         case MACFG_56:
6321         case MACFG_57:
6322         case MACFG_58:
6323         case MACFG_59:
6324         case MACFG_60:
6325         case MACFG_61:
6326         case MACFG_62:
6327         case MACFG_67:
6328         case MACFG_68:
6329         case MACFG_69:
6330         case MACFG_70:
6331         case MACFG_71:
6332                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_1);
6333                 break;
6334         }
6335 
6336         switch(sc->re_type) {
6337         case MACFG_36:
6338         case MACFG_37:
6339         case MACFG_38:
6340         case MACFG_39:
6341         case MACFG_42:
6342         case MACFG_43:
6343         case MACFG_50:
6344         case MACFG_51:
6345         case MACFG_52:
6346         case MACFG_53:
6347         case MACFG_54:
6348         case MACFG_55:
6349         case MACFG_56:
6350         case MACFG_57:
6351         case MACFG_58:
6352         case MACFG_59:
6353         case MACFG_60:
6354         case MACFG_61:
6355         case MACFG_62:
6356         case MACFG_67:
6357         case MACFG_68:
6358         case MACFG_69:
6359         case MACFG_70:
6360         case MACFG_71:
6361                 CSR_WRITE_1(sc, RE_CFG5, CSR_READ_1(sc, RE_CFG5) | BIT_0);
6362                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) | BIT_7);
6363                 CSR_WRITE_1(sc, 0xF1, CSR_READ_1(sc, 0xF1) | BIT_7);
6364                 break;
6365         }
6366 
6367         //clear wol
6368         re_clrwol(sc);
6369 
6370         data16 = CSR_READ_2(sc, RE_CPlusCmd);
6371         if ((ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0)
6372                 data16 |= RL_CPLUSCMD_VLANSTRIP;
6373         else
6374                 data16 &= ~RL_CPLUSCMD_VLANSTRIP;
6375 
6376         if ((ifp->if_capenable & IFCAP_RXCSUM) != 0)
6377                 data16 |= RL_RxChkSum;
6378         else
6379                 data16 &= ~RL_RxChkSum;
6380         CSR_WRITE_2 (sc, RE_CPlusCmd, data16);
6381 
6382         re_disable_cfg9346_write(sc);
6383         //CSR_WRITE_1(sc, 0xec, 0x3f);
6384 
6385         if (sc->re_device_id == RT_DEVICEID_8169 || sc->re_device_id == RT_DEVICEID_8169SC) {
6386                 /* Enable transmit and receive.*/
6387                 CSR_WRITE_1(sc, RE_COMMAND, RE_CMD_TX_ENB | RE_CMD_RX_ENB);
6388 
6389                 /* Set the initial TX configuration.*/
6390                 CSR_WRITE_4(sc, RE_TXCFG, RE_TXCFG_CONFIG);
6391 
6392                 /* Set the initial RX configuration.*/
6393                 /*
6394                  * Program the multicast filter, if necessary.
6395                  */
6396                 re_set_rx_packet_filter(sc);
6397         } else {
6398                 /* Set the initial RX configuration.*/
6399                 /*
6400                  * Program the multicast filter, if necessary.
6401                  */
6402                 re_set_rx_packet_filter(sc);
6403 
6404                 /* Enable transmit and receive.*/
6405                 CSR_WRITE_1(sc, RE_COMMAND, RE_CMD_TX_ENB | RE_CMD_RX_ENB);
6406         }
6407 
6408 #ifndef __DragonFly__
6409         ifp->if_drv_flags |= IFF_DRV_RUNNING;
6410         ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
6411 
6412         /*
6413         * Enable interrupts.
6414         */
6415         CSR_WRITE_2(sc, RE_IMR, RE_INTRS);
6416 #endif
6417 }
6418 
6419 static void re_init_unlock(void *xsc)  	/* Software & Hardware Initialize */
6420 {
6421         struct re_softc		*sc = xsc;
6422         struct ifnet		*ifp;
6423 #ifndef __DragonFly__
6424 #if OS_VER < VERSION(6,0)
6425         int			i;
6426 #endif
6427 #endif	/* !__DragonFly__ */
6428         union {
6429                 uint32_t align_dummy;
6430                 u_char eaddr[ETHER_ADDR_LEN];
6431         } eaddr;
6432 
6433         ifp = RE_GET_IFNET(sc);
6434 
6435 #ifndef __DragonFly__
6436         /*
6437          * Cancel pending I/O and free all RX/TX buffers.
6438          */
6439         re_stop(sc);
6440 #endif	/* !__DragonFly__ */
6441 
6442         /* Copy MAC address on stack to align. */
6443 #ifndef __DragonFly__
6444 #if OS_VER < VERSION(6,0)
6445         bcopy((char *)&sc->arpcom.ac_enaddr, eaddr.eaddr, ETHER_ADDR_LEN);
6446 #elif OS_VER < VERSION(7,0)
6447         bcopy(IFP2ENADDR(ifp), eaddr.eaddr, ETHER_ADDR_LEN);
6448 #else
6449         bcopy(IF_LLADDR(ifp), eaddr.eaddr, ETHER_ADDR_LEN);
6450 #endif
6451 #else	/* __DragonFly__ */
6452         bcopy(IF_LLADDR(ifp), eaddr.eaddr, ETHER_ADDR_LEN);
6453 #endif	/* !__DragonFly__ */
6454 
6455         /* Init our MAC address */
6456         re_rar_set(sc, eaddr.eaddr);
6457 
6458 #ifndef __DragonFly__
6459         re_hw_start_unlock(sc);
6460 #endif
6461 
6462         return;
6463 }
6464 
6465 #ifndef __DragonFly__
6466 static void re_init(void *xsc)  	/* Software & Hardware Initialize */
6467 {
6468         struct re_softc		*sc = xsc;
6469         struct ifnet		*ifp;
6470 
6471         RE_LOCK(sc);
6472         ifp = RE_GET_IFNET(sc);
6473 
6474         if (re_link_ok(sc)) {
6475                 sc->link_state = LINK_STATE_UP;
6476                 re_link_state_change(ifp, sc->link_state);
6477                 re_link_on_patch(sc);
6478         }
6479 
6480         sc->re_link_chg_det = 1;
6481         re_start_timer(sc);
6482 
6483         RE_UNLOCK(sc);
6484 }
6485 
6486 /*
6487  * Initialize the transmit descriptors.
6488  */
6489 static int re_var_init(struct re_softc *sc)
6490 {
6491         int			i;
6492         union RxDesc *rxptr;
6493         union TxDesc *txptr;
6494 
6495         sc->re_desc.rx_cur_index = 0;
6496         sc->re_desc.rx_last_index = 0;
6497         rxptr = sc->re_desc.rx_desc;
6498         for (i = 0; i < RE_RX_BUF_NUM; i++) {
6499                 memset(&rxptr[i], 0, sizeof(union RxDesc));
6500 
6501                 /* Init the RX buffer pointer register. */
6502                 bus_dmamap_load(sc->re_desc.re_rx_mtag,
6503                                 sc->re_desc.re_rx_dmamap[i],
6504                                 sc->re_desc.rx_buf[i]->m_data, sc->re_rx_desc_buf_sz,
6505                                 re_rx_dma_map_buf,
6506                                 &rxptr[i],
6507                                 0);
6508                 bus_dmamap_sync(sc->re_desc.re_rx_mtag,
6509                                 sc->re_desc.re_rx_dmamap[i],
6510                                 BUS_DMASYNC_PREREAD);
6511 
6512                 rxptr[i].ul[0] = htole32(sc->re_rx_desc_buf_sz);
6513                 if (i == (RE_RX_BUF_NUM - 1))
6514                         rxptr[i].ul[0] |= htole32(RL_RDESC_CMD_EOR);
6515                 rxptr[i].ul[0] |= htole32(RL_RDESC_CMD_OWN);
6516         }
6517 
6518         bus_dmamap_load(sc->re_desc.rx_desc_tag,
6519                         sc->re_desc.rx_desc_dmamap,
6520                         sc->re_desc.rx_desc,
6521                         sizeof(union RxDesc)*RE_RX_BUF_NUM,
6522                         re_dma_map_rxdesc,
6523                         sc,
6524                         0);
6525         bus_dmamap_sync(sc->re_desc.rx_desc_tag,
6526                         sc->re_desc.rx_desc_dmamap,
6527                         BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
6528 
6529         sc->re_desc.tx_cur_index = 0;
6530         sc->re_desc.tx_last_index = 0;
6531         txptr = sc->re_desc.tx_desc;
6532         for (i = 0; i < RE_TX_BUF_NUM; i++) {
6533                 memset(&txptr[i], 0, sizeof(union TxDesc));
6534                 if (i == (RE_TX_BUF_NUM - 1))
6535                         txptr[i].ul[0] = htole32(RL_TDESC_CMD_EOR);
6536         }
6537 
6538         bus_dmamap_load(sc->re_desc.tx_desc_tag,
6539                         sc->re_desc.tx_desc_dmamap,
6540                         sc->re_desc.tx_desc,
6541                         sizeof(union RxDesc) * RE_TX_BUF_NUM,
6542                         re_dma_map_txdesc,
6543                         sc,
6544                         0);
6545         bus_dmamap_sync(sc->re_desc.tx_desc_tag,
6546                         sc->re_desc.tx_desc_dmamap,
6547                         BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
6548 
6549         return 0;
6550 }
6551 #endif	/* !__DragonFly__ */
6552 
6553 static void re_reset(struct re_softc *sc)
6554 {
6555         register int		i;
6556 
6557         CSR_WRITE_4(sc, RE_RXCFG, CSR_READ_4(sc, RE_RXCFG)& ~0x3F);
6558 
6559         switch (sc->re_type) {
6560         case MACFG_3:
6561         case MACFG_4:
6562         case MACFG_5:
6563         case MACFG_6:
6564                 DELAY(10000);
6565                 break;
6566         case MACFG_11:
6567         case MACFG_12:
6568         case MACFG_13:
6569         case MACFG_14:
6570         case MACFG_15:
6571         case MACFG_16:
6572         case MACFG_17:
6573         case MACFG_18:
6574         case MACFG_19:
6575         case MACFG_21:
6576         case MACFG_22:
6577         case MACFG_23:
6578         case MACFG_24:
6579         case MACFG_25:
6580         case MACFG_26:
6581         case MACFG_27:
6582         case MACFG_28:
6583         case MACFG_31:
6584         case MACFG_32:
6585         case MACFG_33:
6586         case MACFG_36:
6587         case MACFG_37:
6588         case MACFG_41:
6589         case MACFG_42:
6590         case MACFG_43:
6591         case MACFG_54:
6592         case MACFG_55:
6593         case MACFG_63:
6594         case MACFG_64:
6595         case MACFG_65:
6596         case MACFG_66:
6597                 CSR_WRITE_1(sc, RE_COMMAND, 0x8C);
6598                 break;
6599         case MACFG_38:
6600         case MACFG_39:
6601         case MACFG_50:
6602         case MACFG_51:
6603         case MACFG_52:
6604         case MACFG_53:
6605                 CSR_WRITE_1(sc, RE_COMMAND, 0x8C);
6606                 while (!(CSR_READ_4(sc,RE_TXCFG) & BIT_11)) DELAY(100);
6607                 break;
6608         case MACFG_56:
6609         case MACFG_57:
6610         case MACFG_58:
6611         case MACFG_59:
6612         case MACFG_60:
6613         case MACFG_61:
6614         case MACFG_62:
6615         case MACFG_67:
6616         case MACFG_68:
6617         case MACFG_69:
6618         case MACFG_70:
6619         case MACFG_71:
6620                 DELAY(2000);
6621                 break;
6622         default:
6623                 DELAY(10000);
6624                 break;
6625         }
6626         DELAY(200);
6627         CSR_WRITE_1(sc, RE_COMMAND, RE_CMD_RESET);
6628 
6629         for (i = 0; i < RE_TIMEOUT; i++) {
6630                 DELAY(10);
6631                 if (!(CSR_READ_1(sc, RE_COMMAND) & RE_CMD_RESET))
6632                         break;
6633         }
6634 
6635         if (i == RE_TIMEOUT)
6636                 device_printf(sc->dev,"reset never completed!\n");
6637 
6638         return;
6639 }
6640 
6641 static u_int8_t re_link_ok(struct re_softc *sc)
6642 {
6643         u_int8_t	retval;
6644 
6645         retval = (CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_LINK_STS) ? 1 : 0;
6646 
6647         return retval;
6648 }
6649 
6650 static void
6651 re_set_wol_linkspeed(struct re_softc *sc)
6652 {
6653         u_int8_t wol_link_speed;
6654         u_int16_t anar;
6655 
6656         MP_WritePhyUshort(sc, 0x1F, 0x0000);
6657 
6658         wol_link_speed = RE_WOL_LINK_SPEED_100M_FIRST;
6659         if (!sc->re_dash) {
6660                 if (re_link_ok(sc)) {
6661                         u_int16_t anlpar;
6662 
6663                         anlpar = MP_ReadPhyUshort(sc,MII_ANLPAR);
6664                         if ((anlpar & ANLPAR_10_FD) || (anlpar & ANLPAR_10)) {
6665                                 wol_link_speed = RE_WOL_LINK_SPEED_10M_FIRST;
6666                         } else {
6667                                 wol_link_speed = RE_WOL_LINK_SPEED_100M_FIRST;
6668                         }
6669                 }
6670         }
6671 
6672         anar = MP_ReadPhyUshort(sc,MII_ANAR);
6673 
6674         if (wol_link_speed == RE_WOL_LINK_SPEED_10M_FIRST)
6675                 anar &= ~(ANAR_TX_FD | ANAR_TX);
6676 
6677         if (sc->re_device_id==RT_DEVICEID_8169 || sc->re_device_id==RT_DEVICEID_8169SC ||
6678             sc->re_device_id==RT_DEVICEID_8168 || sc->re_device_id==RT_DEVICEID_8161) {
6679                 u_int16_t gbcr;
6680 
6681                 gbcr = MP_ReadPhyUshort(sc,MII_100T2CR);
6682                 gbcr &= ~(GTCR_ADV_1000TFDX|GTCR_ADV_1000THDX);
6683                 MP_WritePhyUshort(sc, MII_100T2CR, gbcr);
6684                 MP_WritePhyUshort(sc, MII_ANAR, anar);
6685                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_RESET | BMCR_AUTOEN | BMCR_STARTNEG);
6686         } else if (sc->re_type == MACFG_36) {
6687                 MP_WritePhyUshort(sc, MII_ANAR, anar);
6688                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_RESET | BMCR_AUTOEN | BMCR_STARTNEG);
6689         } else {
6690                 MP_WritePhyUshort(sc, MII_ANAR, anar);
6691                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_AUTOEN | BMCR_STARTNEG);
6692         }
6693 }
6694 
6695 #ifndef __DragonFly__
6696 static void
6697 re_setwol(struct re_softc *sc)
6698 {
6699         struct ifnet            *ifp;
6700         int                     pmc;
6701         uint16_t                pmstat;
6702         uint8_t                 v;
6703 
6704         RE_LOCK_ASSERT(sc);
6705 
6706         ifp = RE_GET_IFNET(sc);
6707 
6708         if ((ifp->if_capenable & IFCAP_WOL) == 0) {
6709                 re_phy_power_down(sc->dev);
6710                 return;
6711         }
6712 
6713         if (pci_find_cap(sc->dev, PCIY_PMG, &pmc) != 0)
6714                 return;
6715 
6716         /* Enable config register write. */
6717         re_enable_cfg9346_write(sc);
6718 
6719         /* Enable PME. */
6720         if (sc->re_device_id==RT_DEVICEID_8169 || sc->re_device_id==RT_DEVICEID_8169SC) {
6721                 v = CSR_READ_1(sc, RE_CFG1);
6722                 v &= ~RE_CFG1_PME;
6723                 if ((ifp->if_capenable & IFCAP_WOL) != 0)
6724                         v |= RE_CFG1_PME;
6725                 CSR_WRITE_1(sc, RE_CFG1, v);
6726         }
6727 
6728         if (sc->re_if_flags & RL_FLAG_MAGIC_PACKET_V2) {
6729                 uint32_t                Data32;
6730 
6731                 Data32 = re_eri_read(sc, 0xDC, 4, ERIAR_ExGMAC);
6732                 Data32 &= ~(BIT_16);
6733                 if ((ifp->if_capenable & IFCAP_WOL_MAGIC) != 0)
6734                         Data32 |= BIT_16;
6735                 re_eri_write(sc, 0xDC, 4, Data32, ERIAR_ExGMAC);
6736         } else {
6737                 v = CSR_READ_1(sc, RE_CFG3);
6738                 v &= ~(RL_CFG3_WOL_MAGIC);
6739                 if ((ifp->if_capenable & IFCAP_WOL_MAGIC) != 0)
6740                         v |= RL_CFG3_WOL_MAGIC;
6741                 CSR_WRITE_1(sc, RE_CFG3, v);
6742         }
6743 
6744         v = CSR_READ_1(sc, RE_CFG5);
6745         v &= ~(RL_CFG5_WOL_BCAST | RL_CFG5_WOL_MCAST | RL_CFG5_WOL_UCAST |
6746                RL_CFG5_WOL_LANWAKE);
6747 
6748         if ((ifp->if_capenable & IFCAP_WOL_UCAST) != 0)
6749                 v |= RL_CFG5_WOL_UCAST;
6750         if ((ifp->if_capenable & IFCAP_WOL_MCAST) != 0)
6751                 v |= RL_CFG5_WOL_MCAST | RL_CFG5_WOL_BCAST;
6752         if ((ifp->if_capenable & IFCAP_WOL) != 0)
6753                 v |= RL_CFG5_WOL_LANWAKE;
6754         CSR_WRITE_1(sc, RE_CFG5, v);
6755 
6756         /* Config register write done. */
6757         re_disable_cfg9346_write(sc);
6758 
6759         /*
6760          * It seems that hardware resets its link speed to 100Mbps in
6761          * power down mode so switching to 100Mbps in driver is not
6762          * needed.
6763          */
6764 
6765         /* Request PME if WOL is requested. */
6766         pmstat = pci_read_config(sc->dev, pmc + PCIR_POWER_STATUS, 2);
6767         pmstat &= ~(PCIM_PSTAT_PMEENABLE);
6768         if ((ifp->if_capenable & IFCAP_WOL) != 0)
6769                 pmstat |= PCIM_PSTAT_PMEENABLE;
6770         pci_write_config(sc->dev, pmc + PCIR_POWER_STATUS, pmstat, 2);
6771 
6772         /* Put controller into sleep mode. */
6773         if ((ifp->if_capenable & IFCAP_WOL) != 0) {
6774                 re_set_rx_packet_filter_in_sleep_state(sc);
6775                 re_set_wol_linkspeed(sc);
6776                 if (sc->re_type == MACFG_21 || sc->re_type == MACFG_22)
6777                         CSR_WRITE_1(sc, RE_COMMAND, RE_CMD_RX_ENB);
6778         }
6779 }
6780 #endif	/* !__DragonFly__ */
6781 
6782 static void
6783 re_clrwol(struct re_softc *sc)
6784 {
6785         int                     pmc;
6786         uint16_t                pmstat;
6787         uint8_t                 v;
6788 
6789         RE_LOCK_ASSERT(sc);
6790 
6791 #ifndef __DragonFly__
6792         if (pci_find_cap(sc->dev, PCIY_PMG, &pmc) != 0)
6793                 return;
6794 #else
6795 	if (pci_find_extcap(sc->dev, PCIY_PMG, &pmc) != 0)
6796                 return;
6797 #endif
6798 
6799         /* Disable PME and clear PME status. */
6800         pmstat = pci_read_config(sc->dev, pmc + PCIR_POWER_STATUS, 2);
6801         pmstat &= ~PCIM_PSTAT_PMEENABLE;
6802         pci_write_config(sc->dev, pmc + PCIR_POWER_STATUS, pmstat, 2);
6803 
6804         /* Enable config register write. */
6805         re_enable_cfg9346_write(sc);
6806 
6807         if (sc->re_device_id==RT_DEVICEID_8169 || sc->re_device_id==RT_DEVICEID_8169SC) {
6808                 v = CSR_READ_1(sc, RE_CFG1);
6809                 v &= ~RE_CFG1_PME;
6810                 CSR_WRITE_1(sc, RE_CFG1, v);
6811         }
6812 
6813         v = CSR_READ_1(sc, RE_CFG3);
6814         v &= ~(RL_CFG3_WOL_LINK);
6815         CSR_WRITE_1(sc, RE_CFG3, v);
6816 
6817         if (sc->re_if_flags & RL_FLAG_MAGIC_PACKET_V2) {
6818                 uint32_t                Data32;
6819 
6820                 Data32 = re_eri_read(sc, 0xDC, 4, ERIAR_ExGMAC);
6821                 Data32 &= ~(BIT_16);
6822                 re_eri_write(sc, 0xDC, 4, Data32, ERIAR_ExGMAC);
6823         } else {
6824                 v = CSR_READ_1(sc, RE_CFG3);
6825                 v &= ~(RL_CFG3_WOL_MAGIC);
6826                 CSR_WRITE_1(sc, RE_CFG3, v);
6827         }
6828 
6829         v = CSR_READ_1(sc, RE_CFG5);
6830         v &= ~(RL_CFG5_WOL_BCAST | RL_CFG5_WOL_MCAST | RL_CFG5_WOL_UCAST);
6831         v &= ~RL_CFG5_WOL_LANWAKE;
6832         CSR_WRITE_1(sc, RE_CFG5, v);
6833 
6834         /* Config register write done. */
6835         re_disable_cfg9346_write(sc);
6836 }
6837 
6838 /*
6839  * Stop the adapter and free any mbufs allocated to the
6840  * RX and TX lists.
6841  */
6842 #ifndef __DragonFly__
6843 static void re_stop(struct re_softc *sc)  	/* Stop Driver */
6844 #else	/* __DragonFly__ */
6845 static void
6846 re_stop_rtl(struct re_softc *sc)
6847 #endif	/* !__DragonFly__ */
6848 {
6849 #ifndef __DragonFly__
6850         struct ifnet		*ifp;
6851 
6852         /*	RE_LOCK_ASSERT(sc);*/
6853 
6854         ifp = RE_GET_IFNET(sc);
6855 #if OS_VER < VERSION(9,0)
6856         ifp->if_timer = 0;
6857 #endif
6858 
6859         re_stop_timer(sc);
6860 #endif	/* !__DragonFly__ */
6861 
6862         /*
6863          * Disable accepting frames to put RX MAC into idle state.
6864          * Otherwise it's possible to get frames while stop command
6865          * execution is in progress and controller can DMA the frame
6866          * to already freed RX buffer during that period.
6867          */
6868         CSR_WRITE_4(sc, RE_RXCFG, CSR_READ_4(sc, RE_RXCFG) &
6869                     ~(RE_RXCFG_RX_ALLPHYS | RE_RXCFG_RX_INDIV | RE_RXCFG_RX_MULTI |
6870                       RE_RXCFG_RX_BROAD | RE_RXCFG_RX_RUNT | RE_RXCFG_RX_ERRPKT));
6871 
6872         CSR_WRITE_2(sc, RE_IMR, 0x0000);
6873         CSR_WRITE_2(sc, RE_ISR, 0xffff);
6874         if (sc->re_type == MACFG_50 || sc->re_type == MACFG_51 || sc->re_type == MACFG_52) {
6875                 re_eri_write(sc, 0x1bc, 4, 0x0000001f, ERIAR_ExGMAC);
6876                 re_eri_write(sc, 0x1dc, 4, 0x0000002d, ERIAR_ExGMAC);
6877         } else if (sc->re_type == MACFG_38) {
6878                 re_eri_write(sc, 0x1bc, 4, 0x0000001f, ERIAR_ExGMAC);
6879                 re_eri_write(sc, 0x1dc, 4, 0x0000003f, ERIAR_ExGMAC);
6880         }
6881         re_reset(sc);
6882 
6883 #ifndef __DragonFly__
6884         /*
6885          * Free the TX list buffers.
6886          */
6887         while (sc->re_desc.tx_last_index!=sc->re_desc.tx_cur_index) {
6888                 if (sc->re_desc.re_tx_mtag) {
6889                         bus_dmamap_sync(sc->re_desc.re_tx_mtag,
6890                                         sc->re_desc.re_tx_dmamap[sc->re_desc.tx_last_index],
6891                                         BUS_DMASYNC_POSTWRITE);
6892                         bus_dmamap_unload(sc->re_desc.re_tx_mtag,
6893                                           sc->re_desc.re_tx_dmamap[sc->re_desc.tx_last_index]);
6894                 }
6895 
6896                 if (sc->re_desc.tx_buf[sc->re_desc.tx_last_index]!=NULL) {
6897                         m_freem(sc->re_desc.tx_buf[sc->re_desc.tx_last_index]);
6898                         sc->re_desc.tx_buf[sc->re_desc.tx_last_index] = NULL;
6899                 }
6900                 sc->re_desc.tx_last_index = (sc->re_desc.tx_last_index+1)%RE_TX_BUF_NUM;
6901         }
6902 
6903         ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
6904 
6905         return;
6906 #endif	/* !__DragonFly__ */
6907 }
6908 
6909 #ifndef __DragonFly__
6910 /*
6911  * Main transmit routine.
6912  */
6913 static void re_start(struct ifnet *ifp)  	/* Transmit Packet*/
6914 {
6915         struct re_softc		*sc;
6916         struct mbuf		*m_head = NULL;
6917 
6918         sc = ifp->if_softc;	/* Paste to ifp in function re_attach(dev) */
6919 
6920         RE_LOCK(sc);
6921 
6922         /*	RE_LOCK_ASSERT(sc);*/
6923 
6924         if ((sc->driver_detach == 1) || (sc->rx_fifo_overflow != 0)) {
6925                 RE_UNLOCK(sc);
6926                 return;
6927         }
6928 
6929         while (1) {
6930                 int fs = 1, ls = 0, TxLen = 0, PktLen;
6931                 struct mbuf *ptr;
6932                 uint32_t  opts1 =0;
6933                 uint32_t  opts2 =0;
6934                 IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head);	/* Remove(get) data from system transmit queue */
6935                 if (m_head == NULL) {
6936                         break;
6937                 }
6938 
6939                 if (sc->re_coalesce_tx_pkt) {
6940                         if (re_encap(sc, m_head)) {
6941                                 IFQ_DRV_PREPEND(&ifp->if_snd, m_head);
6942                                 ifp->if_drv_flags |= IFF_DRV_OACTIVE;
6943                                 break;
6944                         }
6945 
6946                         m_head = sc->re_desc.tx_buf[sc->re_desc.tx_cur_index];
6947                 }
6948 
6949                 if (CountMbufNum(m_head) > CountFreeTxDescNum(sc->re_desc)) {	/* No enough descriptor */
6950                         IFQ_DRV_PREPEND(&ifp->if_snd, m_head);
6951                         ifp->if_drv_flags |= IFF_DRV_OACTIVE;
6952                         break;
6953                 }
6954 
6955                 if (ifp->if_bpf) {		/* If there's a BPF listener, bounce a copy of this frame to him. */
6956                         //printf("If there's a BPF listener, bounce a copy of this frame to him. \n");
6957 
6958                         /*#if OS_VER < VERSION(5, 1)*/
6959 #if OS_VER < VERSION(4,9)
6960                         bpf_mtap(ifp, m_head);
6961 #else
6962                         bpf_mtap(ifp->if_bpf, m_head);
6963 #endif
6964                 }
6965 
6966                 //hw checksum
6967                 if (ifp->if_capenable & IFCAP_TXCSUM) {
6968                         if ((m_head->m_pkthdr.csum_flags & RE_CSUM_FEATURES) !=0) 	{
6969                                 if (!(sc->re_if_flags & RL_FLAG_DESCV2)) {
6970                                         opts1 |= RL_IPV4CS1;
6971                                         if ((m_head->m_pkthdr.csum_flags & CSUM_TCP)!=0)
6972                                                 opts1 |=RL_TCPCS1;
6973                                         if ((m_head->m_pkthdr.csum_flags & CSUM_UDP)!=0)
6974                                                 opts1 |=RL_UDPCS1;
6975                                 } else {
6976                                         opts2 |=  RL_IPV4CS;
6977                                         if ((m_head->m_pkthdr.csum_flags & CSUM_TCP)!=0)
6978                                                 opts2 |= RL_TCPCS;
6979                                         else if ((m_head->m_pkthdr.csum_flags & CSUM_UDP)!=0)
6980                                                 opts2 |= RL_UDPCS;
6981                                 }
6982                         }
6983                 }
6984 
6985                 //vlan
6986                 if (m_head->m_flags & M_VLANTAG)
6987                         opts2 |= bswap16(m_head->m_pkthdr.ether_vtag) | RL_TDESC_VLANCTL_TAG;
6988                 ptr = m_head;
6989                 PktLen = ptr->m_pkthdr.len;
6990 #ifdef _DEBUG_
6991                 printf("PktLen=%d",PktLen);
6992 #endif
6993                 while (ptr!=NULL) {
6994                         if (ptr->m_len >0) {
6995 #ifdef _DEBUG_
6996                                 printf(", len=%d T=%d F=%d",ptr->m_len,ptr->m_type,ptr->m_flags);
6997 #endif
6998                                 TxLen += ptr->m_len;
6999                                 if (TxLen >= PktLen) {
7000                                         ls=1;
7001                                         sc->re_desc.tx_buf[sc->re_desc.tx_cur_index] = m_head;
7002                                 } else
7003                                         sc->re_desc.tx_buf[sc->re_desc.tx_cur_index] = NULL;
7004 
7005                                 //vlan
7006                                 WritePacket(sc,ptr->m_data,ptr->m_len,fs,ls,opts2,opts1);
7007 
7008                                 fs=0;
7009                         }
7010                         ptr = ptr->m_next;
7011                 }
7012 #ifdef _DEBUG_
7013                 printf("\n");
7014 #endif
7015         }
7016 #if OS_VER < VERSION(9,0)
7017         ifp->if_timer = 5;
7018 #endif
7019 
7020         RE_UNLOCK(sc);
7021 
7022         return;
7023 }
7024 
7025 /*
7026  * Encapsulate an mbuf chain in a descriptor by coupling the mbuf data
7027  * pointers to the fragment pointers.
7028  */
7029 static int re_encap(struct re_softc *sc,struct mbuf *m_head)
7030 {
7031         struct mbuf		*m_new = NULL;
7032 
7033         m_new = m_defrag(m_head, M_DONTWAIT);
7034 
7035         if (m_new == NULL) {
7036                 printf("re%d: no memory for tx list", sc->re_unit);
7037                 return (1);
7038         }
7039         m_head = m_new;
7040 
7041         /* Pad frames to at least 60 bytes. */
7042         if (m_head->m_pkthdr.len < RE_MIN_FRAMELEN) {	/* Case length < 60 bytes */
7043                 /*
7044                  * Make security concious people happy: zero out the
7045                  * bytes in the pad area, since we don't know what
7046                  * this mbuf cluster buffer's previous user might
7047                  * have left in it.
7048                  */
7049                 bzero(mtod(m_head, char *) + m_head->m_pkthdr.len,
7050                       RE_MIN_FRAMELEN - m_head->m_pkthdr.len);
7051                 m_head->m_pkthdr.len = RE_MIN_FRAMELEN;
7052                 m_head->m_len = m_head->m_pkthdr.len;
7053         }
7054 
7055         sc->re_desc.tx_buf[sc->re_desc.tx_cur_index] = m_head;
7056 
7057         return(0);
7058 }
7059 
7060 static void WritePacket(struct re_softc	*sc, caddr_t addr, int len,int fs_flag,int ls_flag, uint32_t opts2,uint32_t opts1)
7061 {
7062         union TxDesc *txptr;
7063 
7064         txptr=&(sc->re_desc.tx_desc[sc->re_desc.tx_cur_index]);
7065 
7066         txptr->ul[0] &= htole32(0x40000000);
7067         txptr->ul[0] |= htole32(opts1);
7068         txptr->ul[1] = htole32(opts2);
7069 
7070         if (fs_flag)
7071                 txptr->ul[0] |= htole32(RL_TDESC_CMD_SOF);
7072         if (ls_flag)
7073                 txptr->ul[0] |= htole32(RL_TDESC_CMD_EOF);
7074         txptr->ul[0] |= htole32(len);
7075         bus_dmamap_load(sc->re_desc.re_tx_mtag,
7076                         sc->re_desc.re_tx_dmamap[sc->re_desc.tx_cur_index],
7077                         addr,
7078                         len,
7079                         re_tx_dma_map_buf, txptr,
7080                         0);
7081         bus_dmamap_sync(sc->re_desc.re_tx_mtag,
7082                         sc->re_desc.re_tx_dmamap[sc->re_desc.tx_cur_index],
7083                         BUS_DMASYNC_PREWRITE);
7084         txptr->ul[0] |= htole32(RL_TDESC_CMD_OWN);
7085 
7086         bus_dmamap_sync(sc->re_desc.tx_desc_tag,
7087                         sc->re_desc.tx_desc_dmamap,
7088                         BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
7089 
7090         if (ls_flag) {
7091                 CSR_WRITE_1(sc, RE_TPPOLL, RE_NPQ);
7092                 CSR_WRITE_1(sc, RE_TPPOLL, RE_NPQ);
7093         }
7094 
7095         sc->re_desc.tx_cur_index = (sc->re_desc.tx_cur_index+1)%RE_TX_BUF_NUM;
7096 }
7097 
7098 static int CountFreeTxDescNum(struct re_descriptor desc)
7099 {
7100         int ret=desc.tx_last_index-desc.tx_cur_index;
7101         if (ret<=0)
7102                 ret+=RE_TX_BUF_NUM;
7103         ret--;
7104         return ret;
7105 }
7106 
7107 static int CountMbufNum(struct mbuf *m_head)
7108 {
7109         int ret=0;
7110         struct mbuf *ptr = m_head;
7111 
7112         while (ptr!=NULL) {
7113                 if (ptr->m_len >0)
7114                         ret++;
7115                 ptr=ptr->m_next;
7116         }
7117 
7118         return ret;
7119 }
7120 
7121 #ifdef RE_FIXUP_RX
7122 static __inline void re_fixup_rx(struct mbuf *m)
7123 {
7124         int                     i;
7125         uint16_t                *src, *dst;
7126 
7127         src = mtod(m, uint16_t *);
7128         dst = src - (RE_ETHER_ALIGN - ETHER_ALIGN) / sizeof *src;
7129 
7130         for (i = 0; i < (m->m_len / sizeof(uint16_t) + 1); i++)
7131                 *dst++ = *src++;
7132 
7133         m->m_data -= RE_ETHER_ALIGN - ETHER_ALIGN;
7134 }
7135 #endif
7136 
7137 /*
7138  * A frame was downloaded to the chip. It's safe for us to clean up
7139  * the list buffers.
7140  */
7141 static void re_txeof(struct re_softc *sc)  	/* Transmit OK/ERR handler */
7142 {
7143         union TxDesc *txptr;
7144         struct ifnet		*ifp;
7145         u_int32_t           txstat;
7146 
7147         /*	printf("X");*/
7148 
7149         ifp = RE_GET_IFNET(sc);
7150 
7151 #if OS_VER < VERSION(9,0)
7152         /* Clear the timeout timer. */
7153         ifp->if_timer = 0;
7154 #endif
7155 
7156         bus_dmamap_sync(sc->re_desc.tx_desc_tag,
7157                         sc->re_desc.tx_desc_dmamap,
7158                         BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
7159 
7160         while (sc->re_desc.tx_last_index!=sc->re_desc.tx_cur_index) {
7161                 txptr=&(sc->re_desc.tx_desc[sc->re_desc.tx_last_index]);
7162                 txstat = le32toh(txptr->ul[0]);
7163                 if (txstat & RL_TDESC_STAT_OWN)
7164                         break;
7165 #ifdef _DEBUG_
7166                 printf("**** Tx OK  ****\n");
7167 #endif
7168                 bus_dmamap_sync(sc->re_desc.re_tx_mtag,
7169                                 sc->re_desc.re_tx_dmamap[sc->re_desc.tx_last_index],
7170                                 BUS_DMASYNC_POSTWRITE);
7171                 bus_dmamap_unload(sc->re_desc.re_tx_mtag,
7172                                   sc->re_desc.re_tx_dmamap[sc->re_desc.tx_last_index]);
7173 
7174                 if (sc->re_desc.tx_buf[sc->re_desc.tx_last_index]!=NULL) {
7175                         m_freem(sc->re_desc.tx_buf[sc->re_desc.tx_last_index]);	/* Free Current MBuf in a Mbuf list*/
7176                         sc->re_desc.tx_buf[sc->re_desc.tx_last_index] = NULL;
7177                 }
7178 
7179                 sc->re_desc.tx_last_index = (sc->re_desc.tx_last_index+1)%RE_TX_BUF_NUM;
7180 #if OS_VER < VERSION(11,0)
7181                 if (txstat & (RL_TDESC_STAT_EXCESSCOL|
7182                               RL_TDESC_STAT_COLCNT))
7183                         ifp->if_collisions++;
7184                 if (txstat & RL_TDESC_STAT_TXERRSUM)
7185                         ifp->if_oerrors++;
7186                 else
7187                         ifp->if_opackets++;
7188 #else
7189                 if (txstat & (RL_TDESC_STAT_EXCESSCOL|
7190                               RL_TDESC_STAT_COLCNT))
7191                         if_inc_counter(ifp, IFCOUNTER_COLLISIONS, 1);
7192                 if (txstat & RL_TDESC_STAT_TXERRSUM)
7193                         if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
7194                 else
7195                         if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
7196 #endif
7197                 ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
7198         }
7199 
7200         return;
7201 }
7202 
7203 /*
7204  * A frame has been uploaded: pass the resulting mbuf chain up to
7205  * the higher level protocols.
7206  *
7207  * You know there's something wrong with a PCI bus-master chip design
7208  * when you have to use m_devget().
7209  *
7210  * The receive operation is badly documented in the datasheet, so I'll
7211  * attempt to document it here. The driver provides a buffer area and
7212  * places its base address in the RX buffer start address register.
7213  * The chip then begins copying frames into the RX buffer. Each frame
7214  * is preceeded by a 32-bit RX status word which specifies the length
7215  * of the frame and certain other status bits. Each frame (starting with
7216  * the status word) is also 32-bit aligned. The frame length is in the
7217  * first 16 bits of the status word; the lower 15 bits correspond with
7218  * the 'rx status register' mentioned in the datasheet.
7219  *
7220  * Note: to make the Alpha happy, the frame payload needs to be aligned
7221  * on a 32-bit boundary. To achieve this, we cheat a bit by copying from
7222  * the ring buffer starting at an address two bytes before the actual
7223  * data location. We can then shave off the first two bytes using m_adj().
7224  * The reason we do this is because m_devget() doesn't let us specify an
7225  * offset into the mbuf storage space, so we have to artificially create
7226  * one. The ring is allocated in such a way that there are a few unused
7227  * bytes of space preceecing it so that it will be safe for us to do the
7228  * 2-byte backstep even if reading from the ring at offset 0.
7229  */
7230 static void re_rxeof(sc)	/* Receive Data OK/ERR handler */
7231 struct re_softc		*sc;
7232 {
7233         struct ether_header	*eh;
7234         struct mbuf		*m;
7235         struct ifnet		*ifp;
7236         union RxDesc *rxptr;
7237         int bError;
7238         struct mbuf *buf;
7239         int size;
7240         int maxpkt = RE_RX_BUF_NUM;
7241 
7242         u_int32_t opts2,opts1;
7243 
7244         /*		RE_LOCK_ASSERT(sc);*/
7245 
7246         ifp = RE_GET_IFNET(sc);
7247 
7248         bus_dmamap_sync(sc->re_desc.rx_desc_tag,
7249                         sc->re_desc.rx_desc_dmamap,
7250                         BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
7251 
7252         rxptr=&(sc->re_desc.rx_desc[sc->re_desc.rx_cur_index]);
7253         while ((rxptr->ul[0]&htole32(RL_RDESC_STAT_OWN))==0) {	/* Receive OK */
7254                 bError = 0;
7255 
7256                 opts1 = le32toh(rxptr->ul[0]);
7257 
7258                 /* Check if this packet is received correctly*/
7259                 if (opts1&0x200000) {	/*Check RES bit*/
7260                         bError=1;
7261 #if OS_VER < VERSION(11,0)
7262                         ifp->if_ierrors++;
7263 #else
7264                         if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
7265 #endif
7266                         goto update_desc;
7267                 }
7268                 opts2 = le32toh(rxptr->ul[1]);
7269 
7270                 //buf = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); /* Alloc a new mbuf */
7271 
7272                 if (sc->re_rx_mbuf_sz <= MCLBYTES)
7273                         size = MCLBYTES;
7274                 else if (sc->re_rx_mbuf_sz <= MJUMPAGESIZE)
7275                         size = MJUMPAGESIZE;
7276                 else
7277                         size = MJUM9BYTES;
7278 
7279                 buf = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, size);
7280                 if (buf==NULL) {
7281                         bError=1;
7282 #if OS_VER < VERSION(11,0)
7283                         ifp->if_iqdrops++;
7284 #else
7285                         if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1);
7286 #endif
7287                         goto update_desc;
7288                 }
7289 
7290                 buf->m_len = buf->m_pkthdr.len = size;
7291 #ifdef RE_FIXUP_RX
7292                 /*
7293                  * This is part of an evil trick to deal with non-x86 platforms.
7294                  * The RealTek chip requires RX buffers to be aligned on 64-bit
7295                  * boundaries, but that will hose non-x86 machines. To get around
7296                  * this, we leave some empty space at the start of each buffer
7297                  * and for non-x86 hosts, we copy the buffer back six bytes
7298                  * to achieve word alignment. This is slightly more efficient
7299                  * than allocating a new buffer, copying the contents, and
7300                  * discarding the old buffer.
7301                  */
7302                 m_adj(buf, RE_ETHER_ALIGN);
7303 #endif
7304 
7305                 bus_dmamap_sync(sc->re_desc.re_rx_mtag,
7306                                 sc->re_desc.re_rx_dmamap[sc->re_desc.rx_cur_index],
7307                                 BUS_DMASYNC_POSTREAD);
7308                 bus_dmamap_unload(sc->re_desc.re_rx_mtag,
7309                                   sc->re_desc.re_rx_dmamap[sc->re_desc.rx_cur_index]);
7310 
7311                 m = sc->re_desc.rx_buf[sc->re_desc.rx_cur_index];
7312                 sc->re_desc.rx_buf[sc->re_desc.rx_cur_index] = buf;
7313                 m->m_pkthdr.len = m->m_len = (opts1&RL_RDESC_STAT_GFRAGLEN)-ETHER_CRC_LEN;
7314                 m->m_pkthdr.rcvif = ifp;
7315 
7316 #ifdef RE_FIXUP_RX
7317                 re_fixup_rx(m);
7318 #endif
7319 
7320                 //vlan
7321                 if (opts2 & RL_RDESC_VLANCTL_TAG) {
7322                         m->m_pkthdr.ether_vtag =
7323                                 bswap16((opts2 & RL_RDESC_VLANCTL_DATA));
7324                         m->m_flags |= M_VLANTAG;
7325                 }
7326                 if (ifp->if_capenable & IFCAP_RXCSUM) {
7327                         if (!(sc->re_if_flags & RL_FLAG_DESCV2)) {
7328                                 if (opts1 & RL_ProtoIP)
7329                                         m->m_pkthdr.csum_flags |=  CSUM_IP_CHECKED;
7330                                 if (!(opts1 & RL_IPF))
7331                                         m->m_pkthdr.csum_flags |= CSUM_IP_VALID;
7332                                 if ((((opts1 & RL_ProtoIP)==(1<<17)) && !(opts1 & RL_TCPF))   || (((opts1 & RL_ProtoIP)==(1<<18)) && !(opts1 & RL_UDPF))) {
7333                                         m->m_pkthdr.csum_flags |= CSUM_DATA_VALID|CSUM_PSEUDO_HDR;
7334                                         m->m_pkthdr.csum_data = 0xffff;
7335                                 }
7336                         } else {
7337                                 if ((opts1 & RL_ProtoIP) && (opts2 & RL_V4F))
7338                                         m->m_pkthdr.csum_flags |=  CSUM_IP_CHECKED;
7339                                 if (!(opts1 & RL_IPF) && (opts2 & RL_V4F))
7340                                         m->m_pkthdr.csum_flags |= CSUM_IP_VALID;
7341                                 if (((opts1 & RL_TCPT) && !(opts2 & RL_TCPF)) || ((opts1 & RL_UDPT) && !(opts2 & RL_UDPF))) {
7342                                         m->m_pkthdr.csum_flags |= CSUM_DATA_VALID|CSUM_PSEUDO_HDR;
7343                                         m->m_pkthdr.csum_data = 0xffff;
7344                                 }
7345                         }
7346                 }
7347 
7348                 eh = mtod(m, struct ether_header *);
7349 #if OS_VER < VERSION(11,0)
7350                 ifp->if_ipackets++;
7351 #else
7352                 if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1);
7353 #endif
7354 #ifdef _DEBUG_
7355                 printf("Rcv Packet, Len=%d \n", m->m_len);
7356 #endif
7357 
7358                 RE_UNLOCK(sc);
7359 
7360                 /*#if OS_VER < VERSION(5, 1)*/
7361 #if OS_VER < VERSION(4,9)
7362                 /* Remove header from mbuf and pass it on. */
7363                 m_adj(m, sizeof(struct ether_header));
7364                 ether_input(ifp, eh, m);
7365 #else
7366                 (*ifp->if_input)(ifp, m);
7367 #endif
7368                 RE_LOCK(sc);
7369 
7370 update_desc:
7371                 rxptr->ul[0]&=htole32(0x40000000);	/* keep EOR bit */
7372                 rxptr->ul[1]=0;
7373 
7374                 rxptr->ul[0] |= htole32(sc->re_rx_desc_buf_sz);
7375                 if (!bError) {
7376                         bus_dmamap_load(sc->re_desc.re_rx_mtag,
7377                                         sc->re_desc.re_rx_dmamap[sc->re_desc.rx_cur_index],
7378                                         sc->re_desc.rx_buf[sc->re_desc.rx_cur_index]->m_data,
7379                                         sc->re_rx_desc_buf_sz,
7380                                         re_rx_dma_map_buf, rxptr,
7381                                         0);
7382                         bus_dmamap_sync(sc->re_desc.re_rx_mtag,
7383                                         sc->re_desc.re_rx_dmamap[sc->re_desc.rx_cur_index],
7384                                         BUS_DMASYNC_PREREAD);
7385                 }
7386                 rxptr->ul[0] |= htole32(RL_RDESC_CMD_OWN);
7387                 sc->re_desc.rx_cur_index = (sc->re_desc.rx_cur_index+1)%RE_RX_BUF_NUM;
7388                 rxptr=&sc->re_desc.rx_desc[sc->re_desc.rx_cur_index];
7389 
7390                 maxpkt--;
7391                 if (maxpkt==0)
7392                         break;
7393         }
7394 
7395         bus_dmamap_sync(sc->re_desc.rx_desc_tag,
7396                         sc->re_desc.rx_desc_dmamap,
7397                         BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
7398 
7399         return;
7400 }
7401 
7402 #if OS_VER < VERSION(7,0)
7403 static void re_intr(void *arg)  	/* Interrupt Handler */
7404 #else
7405 static int re_intr(void *arg)  	/* Interrupt Handler */
7406 #endif //OS_VER < VERSION(7,0)
7407 {
7408         struct re_softc		*sc;
7409 
7410         sc = arg;
7411 
7412         if ((sc->re_if_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) == 0) {
7413                 if ((CSR_READ_2(sc, RE_ISR) & RE_INTRS) == 0) {
7414 #if OS_VER < VERSION(7,0)
7415                         return;
7416 #else
7417                         return (FILTER_STRAY);
7418 #endif
7419                 }
7420         }
7421 
7422         /* Disable interrupts. */
7423         CSR_WRITE_2(sc, RE_IMR, 0x0000);
7424 
7425 #if OS_VER < VERSION(7,0)
7426         re_int_task(arg, 0);
7427 #else //OS_VER < VERSION(7,0)
7428 #if OS_VER < VERSION(11,0)
7429         taskqueue_enqueue_fast(taskqueue_fast, &sc->re_inttask);
7430 #else ////OS_VER < VERSION(11,0)
7431         taskqueue_enqueue(taskqueue_fast, &sc->re_inttask);
7432 #endif //OS_VER < VERSION(11,0)
7433         return (FILTER_HANDLED);
7434 #endif //OS_VER < VERSION(7,0)
7435 }
7436 
7437 static void re_int_task(void *arg, int npending)
7438 {
7439         struct re_softc		*sc;
7440         struct ifnet		*ifp;
7441         u_int16_t		status;
7442 
7443         sc = arg;
7444 
7445         RE_LOCK(sc);
7446 
7447         ifp = RE_GET_IFNET(sc);
7448 
7449         status = CSR_READ_2(sc, RE_ISR);
7450 
7451         if (status) {
7452                 CSR_WRITE_2(sc, RE_ISR, status & 0xffbf);
7453         }
7454 
7455         if (sc->suspended ||
7456             (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) {
7457                 RE_UNLOCK(sc);
7458                 return;
7459         }
7460 
7461         re_rxeof(sc);
7462 
7463         if (sc->re_type == MACFG_21) {
7464                 if (status & RE_ISR_FIFO_OFLOW) {
7465                         sc->rx_fifo_overflow = 1;
7466                         CSR_WRITE_2(sc, 0x00e2, 0x0000);
7467                         CSR_WRITE_4(sc, 0x0048, 0x4000);
7468                         CSR_WRITE_4(sc, 0x0058, 0x4000);
7469                 } else {
7470                         sc->rx_fifo_overflow = 0;
7471                         CSR_WRITE_4(sc,RE_CPCR, 0x51512082);
7472                 }
7473 
7474                 if (status & RE_ISR_PCS_TIMEOUT) {
7475                         if ((status & RE_ISR_FIFO_OFLOW) &&
7476                             (!(status & (RE_ISR_RX_OK | RE_ISR_TX_OK | RE_ISR_RX_OVERRUN)))) {
7477                                 re_reset(sc);
7478                                 re_init(sc);
7479                                 sc->rx_fifo_overflow = 0;
7480                                 CSR_WRITE_2(sc, RE_ISR, RE_ISR_FIFO_OFLOW);
7481                         }
7482                 }
7483         }
7484 
7485         re_txeof(sc);
7486 
7487         if (status & RE_ISR_SYSTEM_ERR) {
7488                 re_reset(sc);
7489                 re_init(sc);
7490         }
7491 
7492         switch(sc->re_type) {
7493         case MACFG_21:
7494         case MACFG_22:
7495         case MACFG_23:
7496         case MACFG_24:
7497                 CSR_WRITE_1(sc, RE_TPPOLL, RE_NPQ);
7498                 break;
7499 
7500         default:
7501                 break;
7502         }
7503 
7504         RE_UNLOCK(sc);
7505 
7506         if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
7507                 re_start(ifp);
7508 
7509 #if OS_VER>=VERSION(7,0)
7510         if (CSR_READ_2(sc, RE_ISR) & RE_INTRS) {
7511 #if OS_VER < VERSION(11,0)
7512                 taskqueue_enqueue_fast(taskqueue_fast, &sc->re_inttask);
7513 #else ////OS_VER < VERSION(11,0)
7514                 taskqueue_enqueue(taskqueue_fast, &sc->re_inttask);
7515 #endif //OS_VER < VERSION(11,0)
7516                 return;
7517         }
7518 #endif //OS_VER>=VERSION(7,0)
7519 
7520         /* Re-enable interrupts. */
7521         CSR_WRITE_2(sc, RE_IMR, RE_INTRS);
7522 }
7523 #endif	/* !__DragonFly__ */
7524 
7525 static void re_set_multicast_reg(struct re_softc *sc, u_int32_t mask0, u_int32_t mask4)
7526 {
7527         u_int8_t  enable_cfg_reg_write = 0;
7528 
7529         if (sc->re_type == MACFG_5 || sc->re_type == MACFG_6)
7530                 enable_cfg_reg_write = 1;
7531 
7532         if (enable_cfg_reg_write)
7533                 re_enable_cfg9346_write(sc);
7534         CSR_WRITE_4(sc, RE_MAR0, mask0);
7535         CSR_WRITE_4(sc, RE_MAR4, mask4);
7536         if (enable_cfg_reg_write)
7537                 re_disable_cfg9346_write(sc);
7538 
7539         return;
7540 }
7541 
7542 #ifndef __DragonFly__
7543 static void re_set_rx_packet_filter_in_sleep_state(struct re_softc *sc)
7544 {
7545         struct ifnet		*ifp;
7546         u_int32_t		rxfilt;
7547 
7548         ifp = RE_GET_IFNET(sc);
7549 
7550         rxfilt = CSR_READ_4(sc, RE_RXCFG);
7551 
7552         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);
7553         rxfilt |= (RE_RXCFG_RX_INDIV | RE_RXCFG_RX_MULTI | RE_RXCFG_RX_BROAD);
7554 
7555         CSR_WRITE_4(sc, RE_RXCFG, rxfilt);
7556 
7557         re_set_multicast_reg(sc, 0xFFFFFFFF, 0xFFFFFFFF);
7558 
7559         return;
7560 }
7561 #endif	/* !__DragonFly__ */
7562 
7563 static void re_set_rx_packet_filter(struct re_softc *sc)
7564 {
7565         struct ifnet		*ifp;
7566         u_int32_t		rxfilt;
7567 
7568         ifp = RE_GET_IFNET(sc);
7569 
7570         rxfilt = CSR_READ_4(sc, RE_RXCFG);
7571 
7572         rxfilt |= RE_RXCFG_RX_INDIV;
7573 
7574         if (ifp->if_flags & (IFF_MULTICAST | IFF_ALLMULTI | IFF_PROMISC)) {
7575                 rxfilt |= (RE_RXCFG_RX_ALLPHYS | RE_RXCFG_RX_MULTI);
7576         } else {
7577                 rxfilt &= ~(RE_RXCFG_RX_MULTI);
7578         }
7579 
7580         if (ifp->if_flags & IFF_PROMISC) {
7581                 rxfilt |= (RE_RXCFG_RX_ALLPHYS | RE_RXCFG_RX_RUNT | RE_RXCFG_RX_ERRPKT);
7582         } else {
7583                 rxfilt &= ~(RE_RXCFG_RX_ALLPHYS | RE_RXCFG_RX_RUNT | RE_RXCFG_RX_ERRPKT);
7584         }
7585 
7586         if (ifp->if_flags & (IFF_BROADCAST | IFF_PROMISC)) {
7587                 rxfilt |= RE_RXCFG_RX_BROAD;
7588         } else {
7589                 rxfilt &= ~RE_RXCFG_RX_BROAD;
7590         }
7591 
7592         CSR_WRITE_4(sc, RE_RXCFG, rxfilt);
7593 
7594         re_setmulti(sc);
7595 
7596         return;
7597 }
7598 
7599 /*
7600  * Program the 64-bit multicast hash filter.
7601  */
7602 static void re_setmulti(struct re_softc *sc)
7603 {
7604         struct ifnet		*ifp;
7605         int			h = 0;
7606         u_int32_t		hashes[2] = { 0, 0 };
7607         struct ifmultiaddr	*ifma;
7608         u_int32_t		rxfilt;
7609         int			mcnt = 0;
7610 
7611         ifp = RE_GET_IFNET(sc);
7612 
7613         rxfilt = CSR_READ_4(sc, RE_RXCFG);
7614 
7615         if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) {
7616                 rxfilt |= RE_RXCFG_RX_MULTI;
7617                 CSR_WRITE_4(sc, RE_RXCFG, rxfilt);
7618                 re_set_multicast_reg(sc, 0xFFFFFFFF, 0xFFFFFFFF);
7619 
7620                 return;
7621         }
7622 
7623 #ifndef __DragonFly__
7624         /* now program new ones */
7625 #if OS_VER > VERSION(6,0)
7626         IF_ADDR_LOCK(ifp);
7627 #endif
7628 #if OS_VER < VERSION(4,9)
7629         for (ifma = ifp->if_multiaddrs.lh_first; ifma != NULL;
7630              ifma = ifma->ifma_link.le_next)
7631 #else
7632         TAILQ_FOREACH(ifma,&ifp->if_multiaddrs,ifma_link)
7633 #endif
7634 #else	/* __DragonFly__ */
7635 	TAILQ_FOREACH(ifma,&ifp->if_multiaddrs,ifma_link)
7636 #endif	/* !__DragonFly__ */
7637         {
7638                 if (ifma->ifma_addr->sa_family != AF_LINK)
7639                         continue;
7640                 h = ether_crc32_be(LLADDR((struct sockaddr_dl *)
7641                                           ifma->ifma_addr), ETHER_ADDR_LEN) >> 26;
7642                 if (h < 32)
7643                         hashes[0] |= (1 << h);
7644                 else
7645                         hashes[1] |= (1 << (h - 32));
7646                 mcnt++;
7647         }
7648 #ifndef __DragonFly__
7649 #if OS_VER > VERSION(6,0)
7650         IF_ADDR_UNLOCK(ifp);
7651 #endif
7652 #endif	/* !__DragonFly__ */
7653 
7654         if (mcnt) {
7655                 if ((sc->re_if_flags & RL_FLAG_PCIE) != 0) {
7656                         h = bswap32(hashes[0]);
7657                         hashes[0] = bswap32(hashes[1]);
7658                         hashes[1] = h;
7659                 }
7660                 rxfilt |= RE_RXCFG_RX_MULTI;
7661         } else
7662                 rxfilt &= ~RE_RXCFG_RX_MULTI;
7663 
7664         CSR_WRITE_4(sc, RE_RXCFG, rxfilt);
7665         re_set_multicast_reg(sc, hashes[0], hashes[1]);
7666 
7667         return;
7668 }
7669 
7670 #ifndef __DragonFly__
7671 static int re_ioctl(ifp, command, data)
7672 struct ifnet		*ifp;
7673 u_long			command;
7674 caddr_t			data;
7675 {
7676         struct re_softc		*sc = ifp->if_softc;
7677         struct ifreq		*ifr = (struct ifreq *) data;
7678         /*int			s;*/
7679         int			error = 0;
7680         int mask, reinit;
7681         /*s = splimp();*/
7682 
7683         switch(command) {
7684         case SIOCSIFADDR:
7685         case SIOCGIFADDR:
7686                 error = ether_ioctl(ifp, command, data);
7687 
7688                 break;
7689         case SIOCSIFMTU:
7690 
7691                 //printf("before mtu =%d\n",(int)ifp->if_mtu);
7692                 if (ifr->ifr_mtu > sc->max_jumbo_frame_size)
7693                         error = EINVAL;
7694                 else {
7695                         ifp->if_mtu = ifr->ifr_mtu;
7696 
7697                         //if running
7698                         if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
7699                                 //printf("set mtu when running\n");
7700 
7701                                 RE_LOCK(sc);
7702                                 re_stop(sc);
7703 
7704                                 re_release_buf(sc);
7705                                 set_rxbufsize(sc);
7706                                 error =re_alloc_buf(sc);
7707 
7708                                 if (error == 0) {
7709                                         re_init(sc);
7710                                 }
7711                                 RE_UNLOCK(sc);
7712 
7713                         } else {
7714                                 //if not running
7715                                 RE_LOCK(sc);
7716                                 re_release_buf(sc);
7717                                 set_rxbufsize(sc);
7718                                 error =re_alloc_buf(sc);
7719                                 if (error == 0) {
7720                                         /* Init descriptors. */
7721                                         re_var_init(sc);
7722                                 }
7723                                 RE_UNLOCK(sc);
7724                         }
7725 
7726                 }
7727                 //	printf("after mtu =%d\n",(int)ifp->if_mtu);
7728                 break;
7729         case SIOCSIFFLAGS:
7730                 RE_LOCK(sc);
7731                 if (ifp->if_flags & IFF_UP) {
7732                         re_init(sc);
7733                 } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
7734                         re_stop(sc);
7735                 }
7736                 error = 0;
7737                 RE_UNLOCK(sc);
7738                 break;
7739         case SIOCADDMULTI:
7740         case SIOCDELMULTI:
7741                 RE_LOCK(sc);
7742                 re_set_rx_packet_filter(sc);
7743                 RE_UNLOCK(sc);
7744                 error = 0;
7745                 break;
7746         case SIOCGIFMEDIA:
7747         case SIOCSIFMEDIA:
7748                 error = ifmedia_ioctl(ifp, ifr, &sc->media, command);
7749                 break;
7750         case SIOCSIFCAP:
7751 
7752 
7753                 mask = ifr->ifr_reqcap ^ ifp->if_capenable;
7754                 reinit = 0;
7755 
7756                 if ((mask & IFCAP_TXCSUM) != 0 && (ifp->if_capabilities & IFCAP_TXCSUM) != 0) {
7757                         ifp->if_capenable ^= IFCAP_TXCSUM;
7758                         if ((ifp->if_capenable & IFCAP_TXCSUM) != 0)  {
7759                                 if ((sc->re_type == MACFG_24) || (sc->re_type == MACFG_24) || (sc->re_type == MACFG_26))
7760                                         ifp->if_hwassist |= CSUM_TCP | CSUM_UDP;
7761                                 else
7762                                         ifp->if_hwassist |= RE_CSUM_FEATURES;
7763                         } else
7764                                 ifp->if_hwassist &= ~RE_CSUM_FEATURES;
7765                         reinit = 1;
7766                 }
7767 
7768                 if ((mask & IFCAP_RXCSUM) != 0 &&
7769                     (ifp->if_capabilities & IFCAP_RXCSUM) != 0) {
7770                         ifp->if_capenable ^= IFCAP_RXCSUM;
7771                         reinit = 1;
7772                 }
7773 
7774                 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))) {
7775                         if (ifp->if_capenable & IFCAP_TXCSUM)
7776                                 sc->re_tx_cstag = 1;
7777                         else
7778                                 sc->re_tx_cstag = 0;
7779 
7780                         if (ifp->if_capenable & IFCAP_RXCSUM)
7781                                 sc->re_rx_cstag = 1;
7782                         else
7783                                 sc->re_rx_cstag = 0;
7784                 }
7785                 if ((mask & IFCAP_VLAN_HWTAGGING) != 0 &&
7786                     (ifp->if_capabilities & IFCAP_VLAN_HWTAGGING) != 0) {
7787                         ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING;
7788                         /* TSO over VLAN requires VLAN hardware tagging. */
7789                         //if ((ifp->if_capenable & IFCAP_VLAN_HWTAGGING) == 0)
7790                         //	ifp->if_capenable &= ~IFCAP_VLAN_HWTSO;
7791                         reinit = 1;
7792                 }
7793 
7794                 if ((mask & IFCAP_WOL) != 0 &&
7795                     (ifp->if_capabilities & IFCAP_WOL) != 0) {
7796                         if ((mask & IFCAP_WOL_UCAST) != 0)
7797                                 ifp->if_capenable ^= IFCAP_WOL_UCAST;
7798                         if ((mask & IFCAP_WOL_MCAST) != 0)
7799                                 ifp->if_capenable ^= IFCAP_WOL_MCAST;
7800                         if ((mask & IFCAP_WOL_MAGIC) != 0)
7801                                 ifp->if_capenable ^= IFCAP_WOL_MAGIC;
7802                 }
7803                 if (reinit && ifp->if_drv_flags & IFF_DRV_RUNNING) {
7804                         ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
7805                         re_init(sc);
7806                 }
7807                 VLAN_CAPABILITIES(ifp);
7808                 break;
7809         default:
7810                 error = EINVAL;
7811                 break;
7812         }
7813 
7814         /*(void)splx(s);*/
7815 
7816         return(error);
7817 }
7818 #endif	/* !__DragonFly__ */
7819 
7820 static void re_link_on_patch(struct re_softc *sc)
7821 {
7822         struct ifnet		*ifp;
7823 
7824         ifp = RE_GET_IFNET(sc);
7825 
7826         if (sc->re_type == MACFG_50 || sc->re_type == MACFG_51 || sc->re_type == MACFG_52) {
7827                 if (CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_1000MF) {
7828                         re_eri_write(sc, 0x1bc, 4, 0x00000011, ERIAR_ExGMAC);
7829                         re_eri_write(sc, 0x1dc, 4, 0x0000001f, ERIAR_ExGMAC);
7830                 } else if (CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_100M) {
7831                         re_eri_write(sc, 0x1bc, 4, 0x0000001f, ERIAR_ExGMAC);
7832                         re_eri_write(sc, 0x1dc, 4, 0x0000001f, ERIAR_ExGMAC);
7833                 } else {
7834                         re_eri_write(sc, 0x1bc, 4, 0x0000001f, ERIAR_ExGMAC);
7835                         re_eri_write(sc, 0x1dc, 4, 0x0000002d, ERIAR_ExGMAC);
7836                 }
7837         } else if ((sc->re_type == MACFG_38 || sc->re_type == MACFG_39) && (ifp->if_flags & IFF_UP)) {
7838                 if (sc->re_type == MACFG_38 && (CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_10M)) {
7839                         CSR_WRITE_4(sc, RE_RXCFG, CSR_READ_4(sc, RE_RXCFG) | RE_RXCFG_RX_ALLPHYS);
7840                 } else if (sc->re_type == MACFG_39) {
7841                         if (CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_1000MF) {
7842                                 re_eri_write(sc, 0x1bc, 4, 0x00000011, ERIAR_ExGMAC);
7843                                 re_eri_write(sc, 0x1dc, 4, 0x00000005, ERIAR_ExGMAC);
7844                         } else if (CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_100M) {
7845                                 re_eri_write(sc, 0x1bc, 4, 0x0000001f, ERIAR_ExGMAC);
7846                                 re_eri_write(sc, 0x1dc, 4, 0x00000005, ERIAR_ExGMAC);
7847                         } else {
7848                                 re_eri_write(sc, 0x1bc, 4, 0x0000001f, ERIAR_ExGMAC);
7849                                 re_eri_write(sc, 0x1dc, 4, 0x0000003f, ERIAR_ExGMAC);
7850                         }
7851                 }
7852         } else if ((sc->re_type == MACFG_36 || sc->re_type == MACFG_37) && eee_enable ==1) {
7853                 /*Full -Duplex  mode*/
7854                 if (CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_FULL_DUP) {
7855                         MP_WritePhyUshort(sc, 0x1F, 0x0006);
7856                         MP_WritePhyUshort(sc, 0x00, 0x5a30);
7857                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
7858                         if (CSR_READ_1(sc, RE_PHY_STATUS) & (RL_PHY_STATUS_10M | RL_PHY_STATUS_100M))
7859                                 CSR_WRITE_4(sc, RE_TXCFG, (CSR_READ_4(sc, RE_TXCFG) & ~BIT_19) | BIT_25);
7860 
7861                 } else {
7862                         MP_WritePhyUshort(sc, 0x1F, 0x0006);
7863                         MP_WritePhyUshort(sc, 0x00, 0x5a00);
7864                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
7865                         if (CSR_READ_1(sc, RE_PHY_STATUS) & (RL_PHY_STATUS_10M | RL_PHY_STATUS_100M))
7866                                 CSR_WRITE_4(sc, RE_TXCFG, (CSR_READ_4(sc, RE_TXCFG) & ~BIT_19) | RE_TXCFG_IFG);
7867                 }
7868         } else if ((sc->re_type == MACFG_56 || sc->re_type == MACFG_57 ||
7869                     sc->re_type == MACFG_58 || sc->re_type == MACFG_59 ||
7870                     sc->re_type == MACFG_60 || sc->re_type == MACFG_61 ||
7871                     sc->re_type == MACFG_62 || sc->re_type == MACFG_67 ||
7872                     sc->re_type == MACFG_68 || sc->re_type == MACFG_69 ||
7873                     sc->re_type == MACFG_70 || sc->re_type == MACFG_71) &&
7874                    (ifp->if_flags & IFF_UP)) {
7875                 if (CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_FULL_DUP)
7876                         CSR_WRITE_4(sc, RE_TXCFG, (CSR_READ_4(sc, RE_TXCFG) | (BIT_24 | BIT_25)) & ~BIT_19);
7877                 else
7878                         CSR_WRITE_4(sc, RE_TXCFG, (CSR_READ_4(sc, RE_TXCFG) | BIT_25) & ~(BIT_19 | BIT_24));
7879         }
7880 
7881         if (sc->re_type == MACFG_56 || sc->re_type == MACFG_57 ||
7882             sc->re_type == MACFG_61 || sc->re_type == MACFG_62) {
7883                 /*half mode*/
7884                 if (!(CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_FULL_DUP)) {
7885                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
7886                         MP_WritePhyUshort(sc, MII_ANAR, MP_ReadPhyUshort(sc, MII_ANAR)&~(ANAR_PAUSE_SYM |ANAR_PAUSE_ASYM));
7887                 }
7888         }
7889 
7890         if ((sc->re_type == MACFG_70 || sc->re_type == MACFG_71) &&
7891             (CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_10M)) {
7892                 uint32_t Data32;
7893 
7894                 Data32 = re_eri_read(sc, 0x1D0, 1, ERIAR_ExGMAC);
7895                 Data32 |= BIT_1;
7896                 re_eri_write(sc, 0x1D0, 1, Data32, ERIAR_ExGMAC);
7897         }
7898 
7899 #ifndef __DragonFly__
7900         re_init_unlock(sc);
7901 #endif
7902 }
7903 
7904 #ifndef __DragonFly__
7905 static void re_link_down_patch(struct re_softc *sc)
7906 {
7907         struct ifnet		*ifp;
7908 
7909         ifp = RE_GET_IFNET(sc);
7910 
7911         re_txeof(sc);
7912         re_rxeof(sc);
7913         re_stop(sc);
7914 
7915         re_ifmedia_upd(ifp);
7916 }
7917 
7918 /*
7919  * Check Link Status.
7920  */
7921 static void re_check_link_status(struct re_softc *sc)
7922 {
7923         u_int8_t	link_state;
7924         struct ifnet		*ifp;
7925 
7926         ifp = RE_GET_IFNET(sc);
7927 
7928         if (re_link_ok(sc)) {
7929                 link_state = LINK_STATE_UP;
7930         } else {
7931                 link_state = LINK_STATE_DOWN;
7932         }
7933 
7934         if (link_state != sc->link_state) {
7935                 sc->link_state = link_state;
7936                 if (link_state == LINK_STATE_UP) {
7937                         re_link_on_patch(sc);
7938                         re_link_state_change(ifp, LINK_STATE_UP);
7939                 } else {
7940                         re_link_state_change(ifp, LINK_STATE_DOWN);
7941                         re_link_down_patch(sc);
7942                 }
7943         }
7944 }
7945 
7946 static void re_init_timer(struct re_softc *sc)
7947 {
7948 #ifdef RE_USE_NEW_CALLOUT_FUN
7949         callout_init(&sc->re_stat_ch, CALLOUT_MPSAFE);
7950 #else
7951         callout_handle_init(&sc->re_stat_ch);
7952 #endif
7953 }
7954 
7955 static void re_stop_timer(struct re_softc *sc)
7956 {
7957 #ifdef RE_USE_NEW_CALLOUT_FUN
7958         callout_stop(&sc->re_stat_ch);
7959 #else
7960         untimeout(re_tick, sc, sc->re_stat_ch);
7961 #endif
7962 }
7963 
7964 static void re_start_timer(struct re_softc *sc)
7965 {
7966 #ifdef RE_USE_NEW_CALLOUT_FUN
7967         callout_reset(&sc->re_stat_ch, hz, re_tick, sc);
7968 #else
7969         re_stop_timer(sc);
7970         sc->re_stat_ch = timeout(re_tick, sc, hz);
7971 #endif
7972 }
7973 
7974 static void re_tick(xsc)
7975 void			*xsc;
7976 {
7977         /*called per second*/
7978         struct re_softc		*sc;
7979         int			s;
7980 
7981         s = splimp();
7982 
7983         sc = xsc;
7984         /*mii = device_get_softc(sc->re_miibus);
7985 
7986         mii_tick(mii);*/
7987 
7988         splx(s);
7989 
7990         RE_LOCK(sc);
7991 
7992         if (sc->re_link_chg_det == 1) {
7993                 re_check_link_status(sc);
7994                 re_start_timer(sc);
7995         }
7996 
7997         RE_UNLOCK(sc);
7998 
7999         return;
8000 }
8001 
8002 #if OS_VER < VERSION(7,0)
8003 static void re_watchdog(ifp)
8004 struct ifnet		*ifp;
8005 {
8006         struct re_softc		*sc;
8007 
8008         sc = ifp->if_softc;
8009 
8010         printf("re%d: watchdog timeout\n", sc->re_unit);
8011 #if OS_VER < VERSION(11,0)
8012         ifp->if_oerrors++;
8013 #else
8014         if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
8015 #endif
8016 
8017         re_txeof(sc);
8018         re_rxeof(sc);
8019         re_init(sc);
8020 
8021         return;
8022 }
8023 #endif
8024 #endif	/* !__DragonFly__ */
8025 
8026 /*
8027  * Set media options.
8028  */
8029 static int re_ifmedia_upd(struct ifnet *ifp)
8030 {
8031         struct re_softc	*sc = ifp->if_softc;
8032         struct ifmedia	*ifm = &sc->media;
8033         int anar;
8034         int gbcr;
8035 
8036         if (IFM_TYPE(ifm->ifm_media) != IFM_ETHER)
8037                 return(EINVAL);
8038 
8039         if (sc->re_type == MACFG_68 || sc->re_type == MACFG_69 ||
8040             sc->re_type == MACFG_70 || sc->re_type == MACFG_71) {
8041                 //Disable Giga Lite
8042                 MP_WritePhyUshort(sc, 0x1F, 0x0A42);
8043                 ClearEthPhyBit(sc, 0x14, BIT_9);
8044                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
8045                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8046         }
8047 
8048 
8049         switch (IFM_SUBTYPE(ifm->ifm_media)) {
8050         case IFM_AUTO:
8051                 anar = ANAR_TX_FD |
8052                        ANAR_TX |
8053                        ANAR_10_FD |
8054                        ANAR_10;
8055                 gbcr = GTCR_ADV_1000TFDX |
8056                        GTCR_ADV_1000THDX;
8057                 break;
8058         case IFM_1000_SX:
8059 #ifndef __DragonFly__
8060 #if OS_VER < 500000
8061         case IFM_1000_TX:
8062 #else
8063         case IFM_1000_T:
8064 #endif
8065 #else	/* __DragonFly__ */
8066 	case IFM_1000_T:
8067 #endif	/* !__DragonFly__ */
8068                 anar = ANAR_TX_FD |
8069                        ANAR_TX |
8070                        ANAR_10_FD |
8071                        ANAR_10;
8072                 gbcr = GTCR_ADV_1000TFDX |
8073                        GTCR_ADV_1000THDX;
8074                 break;
8075         case IFM_100_TX:
8076                 gbcr = MP_ReadPhyUshort(sc, MII_100T2CR) &
8077                        ~(GTCR_ADV_1000TFDX | GTCR_ADV_1000THDX);
8078                 if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) {
8079                         anar = ANAR_TX_FD |
8080                                ANAR_TX |
8081                                ANAR_10_FD |
8082                                ANAR_10;
8083                 } else {
8084                         anar = ANAR_TX |
8085                                ANAR_10_FD |
8086                                ANAR_10;
8087                 }
8088                 break;
8089         case IFM_10_T:
8090                 gbcr = MP_ReadPhyUshort(sc, MII_100T2CR) &
8091                        ~(GTCR_ADV_1000TFDX | GTCR_ADV_1000THDX);
8092                 if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) {
8093                         anar = ANAR_10_FD |
8094                                ANAR_10;
8095                 } else {
8096                         anar = ANAR_10;
8097                 }
8098 
8099                 if (sc->re_type == MACFG_13) {
8100                         MP_WritePhyUshort(sc, MII_BMCR, 0x8000);
8101                 }
8102 
8103                 break;
8104         default:
8105 #ifndef __DragonFly__
8106                 printf("re%d: Unsupported media type\n", sc->re_unit);
8107                 return(0);
8108 #else
8109 		if_printf(ifp, "Unsupported media type\n");
8110 		return (EOPNOTSUPP);
8111 #endif
8112         }
8113 
8114         MP_WritePhyUshort(sc, 0x1F, 0x0000);
8115         if (sc->re_device_id==RT_DEVICEID_8169 || sc->re_device_id==RT_DEVICEID_8169SC ||
8116             sc->re_device_id==RT_DEVICEID_8168 || sc->re_device_id==RT_DEVICEID_8161) {
8117                 MP_WritePhyUshort(sc, MII_ANAR, anar | 0x0800 | ANAR_FC);
8118                 MP_WritePhyUshort(sc, MII_100T2CR, gbcr);
8119                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_RESET | BMCR_AUTOEN | BMCR_STARTNEG);
8120         } else if (sc->re_type == MACFG_36) {
8121                 MP_WritePhyUshort(sc, MII_ANAR, anar | 0x0800 | ANAR_FC);
8122                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_RESET | BMCR_AUTOEN | BMCR_STARTNEG);
8123         } else {
8124                 MP_WritePhyUshort(sc, MII_ANAR, anar | 1);
8125                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_AUTOEN | BMCR_STARTNEG);
8126         }
8127 
8128         return(0);
8129 }
8130 
8131 /*
8132  * Report current media status.
8133  */
8134 static void re_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr)
8135 {
8136         struct re_softc		*sc;
8137 
8138         sc = ifp->if_softc;
8139 
8140         RE_LOCK(sc);
8141 
8142         ifmr->ifm_status = IFM_AVALID;
8143         ifmr->ifm_active = IFM_ETHER;
8144 
8145         if (re_link_ok(sc)) {
8146                 unsigned char msr;
8147 
8148                 ifmr->ifm_status |= IFM_ACTIVE;
8149 
8150                 msr = CSR_READ_1(sc, RE_PHY_STATUS);
8151                 if (msr & RL_PHY_STATUS_FULL_DUP)
8152                         ifmr->ifm_active |= IFM_FDX;
8153                 else
8154                         ifmr->ifm_active |= IFM_HDX;
8155 
8156                 if (msr & RL_PHY_STATUS_10M)
8157                         ifmr->ifm_active |= IFM_10_T;
8158                 else if (msr & RL_PHY_STATUS_100M)
8159                         ifmr->ifm_active |= IFM_100_TX;
8160                 else if (msr & RL_PHY_STATUS_1000MF)
8161                         ifmr->ifm_active |= IFM_1000_T;
8162 #ifdef __DragonFly__
8163         } else {
8164 		if (IFM_SUBTYPE(sc->media.ifm_media) == IFM_AUTO)
8165 			ifmr->ifm_active |= IFM_NONE;
8166 		else
8167 			ifmr->ifm_active |= sc->media.ifm_media;
8168 #endif
8169         }
8170 
8171         RE_UNLOCK(sc);
8172 
8173         return;
8174 }
8175 
8176 static int re_enable_EEE(struct re_softc *sc)
8177 {
8178         int ret;
8179         u_int16_t data;
8180         u_int16_t PhyRegValue;
8181         u_int32_t WaitCnt;
8182 
8183         ret = 0;
8184         switch (sc->re_type) {
8185         case MACFG_42:
8186         case MACFG_43:
8187                 re_eri_write(sc, 0x1B0, 2, 0xED03, ERIAR_ExGMAC);
8188                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
8189                 if (CSR_READ_1(sc, 0xEF) & 0x02) {
8190                         MP_WritePhyUshort(sc, 0x10, 0x731F);
8191                         MP_WritePhyUshort(sc, 0x19, 0x7630);
8192                 } else {
8193                         MP_WritePhyUshort(sc, 0x10, 0x711F);
8194                         MP_WritePhyUshort(sc, 0x19, 0x7030);
8195                 }
8196                 MP_WritePhyUshort(sc, 0x1A, 0x1506);
8197                 MP_WritePhyUshort(sc, 0x1B, 0x0551);
8198                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8199                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
8200                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
8201                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
8202                 MP_WritePhyUshort(sc, 0x0E, 0x0002);
8203                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
8204 
8205                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8206                 MP_WritePhyUshort(sc, 0x0D, 0x0003);
8207                 MP_WritePhyUshort(sc, 0x0E, 0x0015);
8208                 MP_WritePhyUshort(sc, 0x0D, 0x4003);
8209                 MP_WritePhyUshort(sc, 0x0E, 0x0002);
8210                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
8211 
8212                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_AUTOEN | BMCR_STARTNEG);
8213                 break;
8214 
8215         case MACFG_53:
8216         case MACFG_54:
8217         case MACFG_55:
8218                 re_eri_write(sc, 0x1B0, 2, 0xED03, ERIAR_ExGMAC);
8219                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
8220                 MP_WritePhyUshort(sc, 0x10, 0x731F);
8221                 MP_WritePhyUshort(sc, 0x19, 0x7630);
8222                 MP_WritePhyUshort(sc, 0x1A, 0x1506);
8223                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8224                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
8225                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
8226                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
8227                 MP_WritePhyUshort(sc, 0x0E, 0x0002);
8228                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
8229 
8230                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_AUTOEN | BMCR_STARTNEG);
8231                 break;
8232 
8233         case MACFG_36:
8234         case MACFG_37:
8235                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
8236                 MP_WritePhyUshort(sc, 0x1E, 0x0020);
8237                 data = MP_ReadPhyUshort(sc, 0x15) | 0x0100;
8238                 MP_WritePhyUshort(sc, 0x15, data);
8239                 MP_WritePhyUshort(sc, 0x1F, 0x0006);
8240                 MP_WritePhyUshort(sc, 0x00, 0x5A30);
8241                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8242                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
8243                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
8244                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
8245                 MP_WritePhyUshort(sc, 0x0E, 0x0006);
8246                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
8247                 if ((CSR_READ_1(sc, RE_CFG4)&RL_CFG4_CUSTOMIZED_LED) && (CSR_READ_1(sc, RE_MACDBG) & BIT_7)) {
8248                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
8249                         MP_WritePhyUshort(sc, 0x05, 0x8AC8);
8250                         MP_WritePhyUshort(sc, 0x06, CSR_READ_1(sc, RE_CUSTOM_LED));
8251                         MP_WritePhyUshort(sc, 0x05, 0x8B82);
8252                         data = MP_ReadPhyUshort(sc, 0x06) | 0x0010;
8253                         MP_WritePhyUshort(sc, 0x05, 0x8B82);
8254                         MP_WritePhyUshort(sc, 0x06, data);
8255                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
8256                 }
8257                 break;
8258 
8259         case MACFG_50:
8260         case MACFG_51:
8261         case MACFG_52:
8262                 data = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC) | 0x0003;
8263                 re_eri_write(sc, 0x1B0, 4, data, ERIAR_ExGMAC);
8264                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
8265                 MP_WritePhyUshort(sc, 0x1E, 0x0020);
8266                 data = MP_ReadPhyUshort(sc, 0x15)|0x0100;
8267                 MP_WritePhyUshort(sc, 0x15, data);
8268                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
8269                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
8270                 data = MP_ReadPhyUshort(sc, 0x06)|0x2000;
8271                 MP_WritePhyUshort(sc, 0x06, data);
8272                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8273                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
8274                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
8275                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
8276                 MP_WritePhyUshort(sc, 0x0E, 0x0006);
8277                 MP_WritePhyUshort(sc, 0x1D, 0x0000);
8278                 break;
8279 
8280         case MACFG_38:
8281         case MACFG_39:
8282                 data = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
8283                 data |= BIT_1 | BIT_0;
8284                 re_eri_write(sc, 0x1B0, 4, data, ERIAR_ExGMAC);
8285                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
8286                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
8287                 MP_WritePhyUshort(sc, 0x1e, 0x0020);
8288                 data = MP_ReadPhyUshort(sc, 0x15);
8289                 data |= BIT_8;
8290                 MP_WritePhyUshort(sc, 0x15, data);
8291                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
8292                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
8293                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
8294                 data = MP_ReadPhyUshort(sc, 0x06);
8295                 data |= BIT_13;
8296                 MP_WritePhyUshort(sc, 0x06, data);
8297                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8298                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
8299                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
8300                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
8301                 MP_WritePhyUshort(sc, 0x0E, 0x0006);
8302                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
8303                 break;
8304 
8305         case MACFG_56:
8306         case MACFG_57:
8307         case MACFG_58:
8308         case MACFG_59:
8309         case MACFG_60:
8310         case MACFG_61:
8311         case MACFG_62:
8312         case MACFG_67:
8313         case MACFG_68:
8314         case MACFG_69:
8315         case MACFG_70:
8316         case MACFG_71:
8317                 data = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
8318                 data |= BIT_1 | BIT_0;
8319                 re_eri_write(sc, 0x1B0, 4, data, ERIAR_ExGMAC);
8320                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
8321                 data = MP_ReadPhyUshort(sc, 0x11);
8322                 MP_WritePhyUshort(sc, 0x11, data | BIT_4);
8323                 MP_WritePhyUshort(sc, 0x1F, 0x0A5D);
8324                 MP_WritePhyUshort(sc, 0x10, 0x0006);
8325                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8326                 break;
8327 
8328         default:
8329                 ret = -EOPNOTSUPP;
8330                 break;
8331         }
8332 
8333         switch (sc->re_type) {
8334         case MACFG_68:
8335         case MACFG_69:
8336                 MP_WritePhyUshort(sc, 0x1F, 0x0A4A);
8337                 SetEthPhyBit(sc, 0x11, BIT_9);
8338                 MP_WritePhyUshort(sc, 0x1F, 0x0A42);
8339                 SetEthPhyBit(sc, 0x14, BIT_7);
8340                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8341                 break;
8342         }
8343 
8344         /*Advanced EEE*/
8345         switch (sc->re_type) {
8346         case MACFG_58:
8347         case MACFG_59:
8348         case MACFG_60:
8349         case MACFG_68:
8350         case MACFG_69:
8351                 MP_WritePhyUshort(sc, 0x1F, 0x0B82);
8352                 SetEthPhyBit(sc, 0x10, BIT_4);
8353                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8354 
8355                 MP_WritePhyUshort(sc, 0x1F, 0x0B80);
8356                 WaitCnt = 0;
8357                 do {
8358                         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
8359                         PhyRegValue &= 0x0040;
8360                         DELAY(50);
8361                         DELAY(50);
8362                         WaitCnt++;
8363                 } while(PhyRegValue != 0x0040 && WaitCnt <1000);
8364 
8365                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8366                 break;
8367         }
8368 
8369         switch (sc->re_type) {
8370         case MACFG_59:
8371                 re_eri_write(sc, 0x1EA, 1, 0xFA, ERIAR_ExGMAC);
8372 
8373                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
8374                 data = MP_ReadPhyUshort(sc, 0x10);
8375                 if (data & BIT_10) {
8376                         MP_WritePhyUshort(sc, 0x1F, 0x0A42);
8377                         data = MP_ReadPhyUshort(sc, 0x16);
8378                         data &= ~(BIT_1);
8379                         MP_WritePhyUshort(sc, 0x16, data);
8380                 } else {
8381                         MP_WritePhyUshort(sc, 0x1F, 0x0A42);
8382                         data = MP_ReadPhyUshort(sc, 0x16);
8383                         data |= BIT_1;
8384                         MP_WritePhyUshort(sc, 0x16, data);
8385                 }
8386                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8387                 break;
8388         case MACFG_60:
8389                 data = MP_ReadMcuAccessRegWord(sc, 0xE052);
8390                 data |= BIT_0;
8391                 MP_WriteMcuAccessRegWord(sc, 0xE052, data);
8392                 data = MP_ReadMcuAccessRegWord(sc, 0xE056);
8393                 data &= 0xFF0F;
8394                 data |= (BIT_4 | BIT_5 | BIT_6);
8395                 MP_WriteMcuAccessRegWord(sc, 0xE056, data);
8396 
8397                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
8398                 data = MP_ReadPhyUshort(sc, 0x10);
8399                 if (data & BIT_10) {
8400                         MP_WritePhyUshort(sc, 0x1F, 0x0A42);
8401                         data = MP_ReadPhyUshort(sc, 0x16);
8402                         data &= ~(BIT_1);
8403                         MP_WritePhyUshort(sc, 0x16, data);
8404                 } else {
8405                         MP_WritePhyUshort(sc, 0x1F, 0x0A42);
8406                         data = MP_ReadPhyUshort(sc, 0x16);
8407                         data |= BIT_1;
8408                         MP_WritePhyUshort(sc, 0x16, data);
8409                 }
8410                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8411                 break;
8412         case MACFG_61:
8413         case MACFG_62:
8414         case MACFG_67:
8415                 OOB_mutex_lock(sc);
8416                 data = MP_ReadMcuAccessRegWord(sc, 0xE052);
8417                 data &= ~BIT_0;
8418                 MP_WriteMcuAccessRegWord(sc, 0xE052, data);
8419                 OOB_mutex_unlock(sc);
8420                 data = MP_ReadMcuAccessRegWord(sc, 0xE056);
8421                 data &= 0xFF0F;
8422                 data |= (BIT_4 | BIT_5 | BIT_6);
8423                 MP_WriteMcuAccessRegWord(sc, 0xE056, data);
8424                 break;
8425         case MACFG_70:
8426         case MACFG_71:
8427                 OOB_mutex_lock(sc);
8428                 data = MP_ReadMcuAccessRegWord(sc, 0xE052);
8429                 data &= ~BIT_0;
8430                 MP_WriteMcuAccessRegWord(sc, 0xE052, data);
8431                 OOB_mutex_unlock(sc);
8432                 data = MP_ReadMcuAccessRegWord(sc, 0xE056);
8433                 data &= 0xFF0F;
8434                 data |= (BIT_4 | BIT_5 | BIT_6);
8435                 MP_WriteMcuAccessRegWord(sc, 0xE056, data);
8436                 MP_WriteMcuAccessRegWord(sc, 0xEA80, 0x0003);
8437                 break;
8438         case MACFG_68:
8439         case MACFG_69:
8440                 data = MP_ReadMcuAccessRegWord(sc, 0xE052);
8441                 data |= BIT_0;
8442                 MP_WriteMcuAccessRegWord(sc, 0xE052, data);
8443 
8444                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
8445                 data = MP_ReadPhyUshort(sc, 0x10) | BIT_15;
8446                 MP_WritePhyUshort(sc, 0x10, data);
8447 
8448                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
8449                 data = MP_ReadPhyUshort(sc, 0x11) | BIT_13 | BIT_14;
8450                 data &= ~(BIT_12);
8451                 MP_WritePhyUshort(sc, 0x11, data);
8452                 break;
8453         }
8454 
8455         switch (sc->re_type) {
8456         case MACFG_58:
8457         case MACFG_59:
8458         case MACFG_60:
8459         case MACFG_68:
8460         case MACFG_69:
8461                 MP_WritePhyUshort(sc, 0x1F, 0x0B82);
8462                 ClearEthPhyBit(sc, 0x10, BIT_4);
8463                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8464                 break;
8465         }
8466 
8467         return ret;
8468 }
8469 
8470 static int re_disable_EEE(struct re_softc *sc)
8471 {
8472         int ret;
8473         u_int16_t data;
8474         u_int16_t PhyRegValue;
8475         u_int32_t WaitCnt;
8476 
8477         ret = 0;
8478         switch (sc->re_type) {
8479         case MACFG_42:
8480         case MACFG_43:
8481                 re_eri_write(sc, 0x1B0, 2, 0, ERIAR_ExGMAC);
8482                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
8483                 MP_WritePhyUshort(sc, 0x10, 0x401F);
8484                 MP_WritePhyUshort(sc, 0x19, 0x7030);
8485 
8486                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8487                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
8488                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
8489                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
8490                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
8491                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
8492 
8493                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8494                 MP_WritePhyUshort(sc, 0x0D, 0x0003);
8495                 MP_WritePhyUshort(sc, 0x0E, 0x0015);
8496                 MP_WritePhyUshort(sc, 0x0D, 0x4003);
8497                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
8498                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
8499 
8500                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_AUTOEN | BMCR_STARTNEG);
8501                 break;
8502 
8503         case MACFG_53:
8504                 re_eri_write(sc, 0x1B0, 2, 0, ERIAR_ExGMAC);
8505                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
8506                 MP_WritePhyUshort(sc, 0x10, 0x401F);
8507                 MP_WritePhyUshort(sc, 0x19, 0x7030);
8508 
8509                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8510                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
8511                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
8512                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
8513                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
8514                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
8515 
8516                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_AUTOEN | BMCR_STARTNEG);
8517                 break;
8518 
8519         case MACFG_54:
8520         case MACFG_55:
8521                 re_eri_write(sc, 0x1B0, 2, 0, ERIAR_ExGMAC);
8522                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
8523                 MP_WritePhyUshort(sc, 0x10, 0xC07F);
8524                 MP_WritePhyUshort(sc, 0x19, 0x7030);
8525                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8526 
8527                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8528                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
8529                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
8530                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
8531                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
8532                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
8533 
8534                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_AUTOEN | BMCR_STARTNEG);
8535                 break;
8536 
8537         case MACFG_36:
8538         case MACFG_37:
8539                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
8540                 MP_WritePhyUshort(sc, 0x1E, 0x0020);
8541                 data = MP_ReadPhyUshort(sc, 0x15) & ~0x0100;
8542                 MP_WritePhyUshort(sc, 0x15, data);
8543                 MP_WritePhyUshort(sc, 0x1F, 0x0006);
8544                 MP_WritePhyUshort(sc, 0x00, 0x5A00);
8545                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8546                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
8547                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
8548                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
8549                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
8550                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
8551                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8552                 if (CSR_READ_1(sc, RE_CFG4) & RL_CFG4_CUSTOMIZED_LED) {
8553                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
8554                         MP_WritePhyUshort(sc, 0x05, 0x8B82);
8555                         data = MP_ReadPhyUshort(sc, 0x06) & ~0x0010;
8556                         MP_WritePhyUshort(sc, 0x05, 0x8B82);
8557                         MP_WritePhyUshort(sc, 0x06, data);
8558                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
8559                 }
8560                 break;
8561 
8562         case MACFG_50:
8563         case MACFG_51:
8564         case MACFG_52:
8565                 data = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC)& ~0x0003;
8566                 re_eri_write(sc, 0x1B0, 4, data, ERIAR_ExGMAC);
8567                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
8568                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
8569                 data = MP_ReadPhyUshort(sc, 0x06) & ~0x2000;
8570                 MP_WritePhyUshort(sc, 0x06, data);
8571                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
8572                 MP_WritePhyUshort(sc, 0x1E, 0x0020);
8573                 data = MP_ReadPhyUshort(sc, 0x15) & ~0x0100;
8574                 MP_WritePhyUshort(sc, 0x15, data);
8575                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8576                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
8577                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
8578                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
8579                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
8580                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
8581                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8582                 break;
8583 
8584         case MACFG_38:
8585         case MACFG_39:
8586                 data = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
8587                 data &= ~(BIT_1 | BIT_0);
8588                 re_eri_write(sc, 0x1B0, 4, data, ERIAR_ExGMAC);
8589                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
8590                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
8591                 data = MP_ReadPhyUshort(sc, 0x06);
8592                 data &= ~BIT_13;
8593                 MP_WritePhyUshort(sc, 0x06, data);
8594                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
8595                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
8596                 MP_WritePhyUshort(sc, 0x1e, 0x0020);
8597                 data = MP_ReadPhyUshort(sc, 0x15);
8598                 data &= ~BIT_8;
8599                 MP_WritePhyUshort(sc, 0x15, data);
8600                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
8601                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8602                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
8603                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
8604                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
8605                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
8606                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
8607                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8608                 break;
8609 
8610         case MACFG_56:
8611         case MACFG_57:
8612         case MACFG_58:
8613         case MACFG_59:
8614         case MACFG_60:
8615         case MACFG_61:
8616         case MACFG_62:
8617         case MACFG_67:
8618         case MACFG_68:
8619         case MACFG_69:
8620         case MACFG_70:
8621         case MACFG_71:
8622                 data = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
8623                 data &= ~(BIT_1 | BIT_0);
8624                 re_eri_write(sc, 0x1B0, 4, data, ERIAR_ExGMAC);
8625                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
8626                 data = MP_ReadPhyUshort(sc, 0x11);
8627                 MP_WritePhyUshort(sc, 0x11, data & ~BIT_4);
8628                 MP_WritePhyUshort(sc, 0x1F, 0x0A5D);
8629                 MP_WritePhyUshort(sc, 0x10, 0x0000);
8630                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8631                 break;
8632 
8633         default:
8634                 ret = -EOPNOTSUPP;
8635                 break;
8636         }
8637 
8638         switch (sc->re_type) {
8639         case MACFG_68:
8640         case MACFG_69:
8641                 MP_WritePhyUshort(sc, 0x1F, 0x0A42);
8642                 ClearEthPhyBit(sc, 0x14, BIT_7);
8643                 MP_WritePhyUshort(sc, 0x1F, 0x0A4A);
8644                 ClearEthPhyBit(sc, 0x11, BIT_9);
8645                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8646                 break;
8647         }
8648 
8649         /*Advanced EEE*/
8650         switch (sc->re_type) {
8651         case MACFG_58:
8652         case MACFG_59:
8653         case MACFG_60:
8654         case MACFG_68:
8655         case MACFG_69:
8656                 MP_WritePhyUshort(sc, 0x1F, 0x0B82);
8657                 SetEthPhyBit(sc, 0x10, BIT_4);
8658                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8659 
8660                 MP_WritePhyUshort(sc, 0x1F, 0x0B80);
8661                 WaitCnt = 0;
8662                 do {
8663                         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
8664                         PhyRegValue &= 0x0040;
8665                         DELAY(50);
8666                         DELAY(50);
8667                         WaitCnt++;
8668                 } while(PhyRegValue != 0x0040 && WaitCnt <1000);
8669 
8670                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8671                 break;
8672         }
8673 
8674         switch (sc->re_type) {
8675         case MACFG_59:
8676                 re_eri_write(sc, 0x1EA, 1, 0x00, ERIAR_ExGMAC);
8677 
8678                 MP_WritePhyUshort(sc, 0x1F, 0x0A42);
8679                 data = MP_ReadPhyUshort(sc, 0x16);
8680                 data &= ~(BIT_1);
8681                 MP_WritePhyUshort(sc, 0x16, data);
8682                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8683                 break;
8684         case MACFG_60:
8685                 data = MP_ReadMcuAccessRegWord(sc, 0xE052);
8686                 data &= ~(BIT_0);
8687                 MP_WriteMcuAccessRegWord(sc, 0xE052, data);
8688 
8689                 MP_WritePhyUshort(sc, 0x1F, 0x0A42);
8690                 data = MP_ReadPhyUshort(sc, 0x16);
8691                 data &= ~(BIT_1);
8692                 MP_WritePhyUshort(sc, 0x16, data);
8693                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8694                 break;
8695         case MACFG_61:
8696         case MACFG_62:
8697         case MACFG_67:
8698         case MACFG_70:
8699         case MACFG_71:
8700                 data = MP_ReadMcuAccessRegWord(sc, 0xE052);
8701                 data &= ~(BIT_0);
8702                 MP_WriteMcuAccessRegWord(sc, 0xE052, data);
8703                 break;
8704         case MACFG_68:
8705         case MACFG_69:
8706                 data = MP_ReadMcuAccessRegWord(sc, 0xE052);
8707                 data &= ~(BIT_0);
8708                 MP_WriteMcuAccessRegWord(sc, 0xE052, data);
8709 
8710                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
8711                 data = MP_ReadPhyUshort(sc, 0x10) & ~(BIT_15);
8712                 MP_WritePhyUshort(sc, 0x10, data);
8713 
8714                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
8715                 data = MP_ReadPhyUshort(sc, 0x11) & ~(BIT_12 | BIT_13 | BIT_14);
8716                 MP_WritePhyUshort(sc, 0x11, data);
8717                 break;
8718         }
8719 
8720         switch (sc->re_type) {
8721         case MACFG_58:
8722         case MACFG_59:
8723         case MACFG_60:
8724         case MACFG_68:
8725         case MACFG_69:
8726                 MP_WritePhyUshort(sc, 0x1F, 0x0B82);
8727                 ClearEthPhyBit(sc, 0x10, BIT_4);
8728                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8729                 break;
8730         }
8731 
8732         return ret;
8733 }
8734 
8735 static int re_phy_ram_code_check(struct re_softc *sc)
8736 {
8737         u_int16_t PhyRegValue;
8738         u_int32_t WaitCnt;
8739         int retval = TRUE;
8740 
8741         switch(sc->re_type) {
8742         case MACFG_56:
8743                 MP_WritePhyUshort(sc, 0x1f, 0x0A40);
8744                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
8745                 PhyRegValue &= ~(BIT_11);
8746                 MP_WritePhyUshort(sc, 0x10, PhyRegValue);
8747 
8748 
8749                 MP_WritePhyUshort(sc, 0x1f, 0x0A00);
8750                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
8751                 PhyRegValue &= ~(BIT_12 | BIT_13 | BIT_14 | BIT_15);
8752                 MP_WritePhyUshort(sc, 0x10, PhyRegValue);
8753 
8754                 MP_WritePhyUshort(sc, 0x1f, 0x0A43);
8755                 MP_WritePhyUshort(sc, 0x13, 0x8010);
8756                 PhyRegValue = MP_ReadPhyUshort(sc, 0x14);
8757                 PhyRegValue &= ~(BIT_11);
8758                 MP_WritePhyUshort(sc, 0x14, PhyRegValue);
8759 
8760                 MP_WritePhyUshort(sc, 0x1f, 0x0B82);
8761                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
8762                 PhyRegValue |= BIT_4;
8763                 MP_WritePhyUshort(sc, 0x10, PhyRegValue);
8764 
8765                 MP_WritePhyUshort(sc, 0x1f, 0x0B80);
8766                 WaitCnt = 0;
8767                 do {
8768                         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
8769                         PhyRegValue &= 0x0040;
8770                         DELAY(50);
8771                         DELAY(50);
8772                         WaitCnt++;
8773                 } while(PhyRegValue != 0x0040 && WaitCnt <1000);
8774 
8775                 if (WaitCnt == 1000) {
8776                         retval = FALSE;
8777                 }
8778 
8779                 MP_WritePhyUshort(sc, 0x1f, 0x0A40);
8780                 MP_WritePhyUshort(sc, 0x10, 0x0140);
8781 
8782                 MP_WritePhyUshort(sc, 0x1f, 0x0A4A);
8783                 PhyRegValue = MP_ReadPhyUshort(sc, 0x13);
8784                 PhyRegValue &= ~(BIT_6);
8785                 PhyRegValue |= (BIT_7);
8786                 MP_WritePhyUshort(sc, 0x13, PhyRegValue);
8787 
8788                 MP_WritePhyUshort(sc, 0x1f, 0x0A44);
8789                 PhyRegValue = MP_ReadPhyUshort(sc, 0x14);
8790                 PhyRegValue |= (BIT_2);
8791                 MP_WritePhyUshort(sc, 0x14, PhyRegValue);
8792 
8793                 MP_WritePhyUshort(sc, 0x1f, 0x0A50);
8794                 PhyRegValue = MP_ReadPhyUshort(sc, 0x11);
8795                 PhyRegValue |= (BIT_11|BIT_12);
8796                 MP_WritePhyUshort(sc, 0x11, PhyRegValue);
8797 
8798                 MP_WritePhyUshort(sc, 0x1f, 0x0B82);
8799                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
8800                 PhyRegValue &= ~(BIT_4);
8801                 MP_WritePhyUshort(sc, 0x10, PhyRegValue);
8802 
8803                 MP_WritePhyUshort(sc, 0x1f, 0x0A22);
8804                 WaitCnt = 0;
8805                 do {
8806                         PhyRegValue = MP_ReadPhyUshort(sc, 0x12);
8807                         PhyRegValue &= 0x0010;
8808                         DELAY(50);
8809                         DELAY(50);
8810                         WaitCnt++;
8811                 } while(PhyRegValue != 0x0010 && WaitCnt <1000);
8812 
8813                 if (WaitCnt == 1000) {
8814                         retval = FALSE;
8815                 }
8816 
8817                 MP_WritePhyUshort(sc, 0x1f, 0x0A40);
8818                 MP_WritePhyUshort(sc, 0x10, 0x1040);
8819 
8820                 MP_WritePhyUshort(sc, 0x1f, 0x0A4A);
8821                 PhyRegValue = MP_ReadPhyUshort(sc, 0x13);
8822                 PhyRegValue &= ~(BIT_6|BIT_7);
8823                 MP_WritePhyUshort(sc, 0x13, PhyRegValue);
8824 
8825                 MP_WritePhyUshort(sc, 0x1f, 0x0A44);
8826                 PhyRegValue = MP_ReadPhyUshort(sc, 0x14);
8827                 PhyRegValue &= ~(BIT_2);
8828                 MP_WritePhyUshort(sc, 0x14, PhyRegValue);
8829 
8830                 MP_WritePhyUshort(sc, 0x1f, 0x0A50);
8831                 PhyRegValue = MP_ReadPhyUshort(sc, 0x11);
8832                 PhyRegValue &= ~(BIT_11|BIT_12);
8833                 MP_WritePhyUshort(sc, 0x11, PhyRegValue);
8834 
8835                 MP_WritePhyUshort(sc, 0x1f, 0x0A43);
8836                 MP_WritePhyUshort(sc, 0x13, 0x8010);
8837                 PhyRegValue = MP_ReadPhyUshort(sc, 0x14);
8838                 PhyRegValue |= (BIT_11);
8839                 MP_WritePhyUshort(sc, 0x14, PhyRegValue);
8840 
8841                 MP_WritePhyUshort(sc, 0x1f, 0x0B82);
8842                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
8843                 PhyRegValue |= BIT_4;
8844                 MP_WritePhyUshort(sc, 0x10, PhyRegValue);
8845 
8846                 MP_WritePhyUshort(sc, 0x1f, 0x0B80);
8847                 WaitCnt = 0;
8848                 do {
8849                         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
8850                         PhyRegValue &= 0x0040;
8851                         DELAY(50);
8852                         DELAY(50);
8853                         WaitCnt++;
8854                 } while(PhyRegValue != 0x0040 && WaitCnt <1000);
8855 
8856                 if (WaitCnt == 1000) {
8857                         retval = FALSE;
8858                 }
8859 
8860                 MP_WritePhyUshort(sc, 0x1f, 0x0A20);
8861                 PhyRegValue = MP_ReadPhyUshort(sc, 0x13);
8862                 if (PhyRegValue & BIT_11) {
8863                         if (PhyRegValue & BIT_10) {
8864                                 retval = FALSE;
8865                         }
8866                 }
8867 
8868                 MP_WritePhyUshort(sc, 0x1f, 0x0B82);
8869                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
8870                 PhyRegValue &= ~(BIT_4);
8871                 MP_WritePhyUshort(sc, 0x10, PhyRegValue);
8872 
8873                 //delay 2ms
8874                 DELAY(2000);
8875                 break;
8876         default:
8877                 break;
8878         }
8879 
8880         MP_WritePhyUshort(sc, 0x1F, 0x0000);
8881 
8882         return retval;
8883 }
8884 
8885 static void re_set_phy_ram_code_check_fail_flag(struct re_softc *sc)
8886 {
8887         u_int16_t TmpUshort;
8888 
8889         switch(sc->re_type) {
8890         case MACFG_56:
8891                 TmpUshort = MP_ReadMcuAccessRegWord(sc, 0xD3C0);
8892                 TmpUshort |= BIT_0;
8893                 MP_WriteMcuAccessRegWord(sc, 0xD3C0, TmpUshort);
8894                 break;
8895         }
8896 }
8897 
8898 static int re_hw_phy_mcu_code_ver_matched(struct re_softc *sc)
8899 {
8900         int ram_code_ver_match = 0;
8901 
8902         switch (sc->re_type) {
8903         case MACFG_36:
8904         case MACFG_37:
8905                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
8906                 MP_WritePhyUshort(sc, 0x05, 0x8B60);
8907                 sc->re_hw_ram_code_ver = MP_ReadPhyUshort(sc, 0x06);
8908                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8909                 break;
8910         case MACFG_38:
8911         case MACFG_39:
8912         case MACFG_50:
8913         case MACFG_51:
8914         case MACFG_52:
8915                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
8916                 MP_WritePhyUshort(sc, 0x05, 0x8B30);
8917                 sc->re_hw_ram_code_ver = MP_ReadPhyUshort(sc, 0x06);
8918                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8919                 break;
8920         case MACFG_56:
8921         case MACFG_57:
8922         case MACFG_58:
8923         case MACFG_59:
8924         case MACFG_60:
8925         case MACFG_61:
8926         case MACFG_62:
8927         case MACFG_67:
8928         case MACFG_68:
8929         case MACFG_69:
8930         case MACFG_70:
8931         case MACFG_71:
8932                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
8933                 MP_WritePhyUshort(sc, 0x13, 0x801E);
8934                 sc->re_hw_ram_code_ver = MP_ReadPhyUshort(sc, 0x14);
8935                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8936                 break;
8937         default:
8938                 sc->re_hw_ram_code_ver = ~0;
8939                 break;
8940         }
8941 
8942         if (sc->re_hw_ram_code_ver == sc->re_sw_ram_code_ver)
8943                 ram_code_ver_match = 1;
8944 
8945         return ram_code_ver_match;
8946 }
8947 
8948 static void re_write_hw_phy_mcu_code_ver(struct re_softc *sc)
8949 {
8950         switch (sc->re_type) {
8951         case MACFG_36:
8952         case MACFG_37:
8953                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
8954                 MP_WritePhyUshort(sc, 0x05, 0x8B60);
8955                 MP_WritePhyUshort(sc, 0x06, sc->re_sw_ram_code_ver);
8956                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8957                 sc->re_hw_ram_code_ver = sc->re_sw_ram_code_ver;
8958                 break;
8959         case MACFG_38:
8960         case MACFG_39:
8961         case MACFG_50:
8962         case MACFG_51:
8963         case MACFG_52:
8964                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
8965                 MP_WritePhyUshort(sc, 0x05, 0x8B30);
8966                 MP_WritePhyUshort(sc, 0x06, sc->re_sw_ram_code_ver);
8967                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8968                 sc->re_hw_ram_code_ver = sc->re_sw_ram_code_ver;
8969                 break;
8970         case MACFG_56:
8971         case MACFG_57:
8972         case MACFG_58:
8973         case MACFG_59:
8974         case MACFG_60:
8975         case MACFG_61:
8976         case MACFG_62:
8977         case MACFG_67:
8978         case MACFG_68:
8979         case MACFG_69:
8980         case MACFG_70:
8981         case MACFG_71:
8982                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
8983                 MP_WritePhyUshort(sc, 0x13, 0x801E);
8984                 MP_WritePhyUshort(sc, 0x14, sc->re_sw_ram_code_ver);
8985                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8986                 sc->re_hw_ram_code_ver = sc->re_sw_ram_code_ver;
8987                 break;
8988         }
8989 }
8990 
8991 static void re_set_phy_mcu_8168e_1(struct re_softc *sc)
8992 {
8993         u_int16_t PhyRegValue;
8994         int i;
8995 
8996         MP_WritePhyUshort(sc, 0x1f, 0x0000);
8997         MP_WritePhyUshort(sc, 0x00, 0x1800);
8998         MP_WritePhyUshort(sc, 0x1f, 0x0007);
8999         MP_WritePhyUshort(sc, 0x1e, 0x0023);
9000         MP_WritePhyUshort(sc, 0x17, 0x0117);
9001         MP_WritePhyUshort(sc, 0x1f, 0x0007);
9002         MP_WritePhyUshort(sc, 0x1E, 0x002C);
9003         MP_WritePhyUshort(sc, 0x1B, 0x5000);
9004         MP_WritePhyUshort(sc, 0x1f, 0x0000);
9005         MP_WritePhyUshort(sc, 0x16, 0x4104);
9006         for (i=0; i<200; i++) {
9007                 DELAY(100);
9008                 PhyRegValue = MP_ReadPhyUshort(sc, 0x1E);
9009                 PhyRegValue &= 0x03FF;
9010                 if (PhyRegValue== 0x000C)
9011                         break;
9012         }
9013         MP_WritePhyUshort(sc, 0x1f, 0x0005);
9014         for (i=0; i<200; i++) {
9015                 DELAY(100);
9016                 PhyRegValue = MP_ReadPhyUshort(sc, 0x07);
9017                 if ((PhyRegValue&0x0020)==0)
9018                         break;
9019         }
9020         PhyRegValue = MP_ReadPhyUshort(sc, 0x07);
9021         if (PhyRegValue & 0x0020) {
9022                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
9023                 MP_WritePhyUshort(sc, 0x1e, 0x00a1);
9024                 MP_WritePhyUshort(sc, 0x17, 0x1000);
9025                 MP_WritePhyUshort(sc, 0x17, 0x0000);
9026                 MP_WritePhyUshort(sc, 0x17, 0x2000);
9027                 MP_WritePhyUshort(sc, 0x1e, 0x002f);
9028                 MP_WritePhyUshort(sc, 0x18, 0x9bfb);
9029                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
9030                 MP_WritePhyUshort(sc, 0x07, 0x0000);
9031                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
9032         }
9033 
9034         MP_WritePhyUshort(sc, 0x1f, 0x0005);
9035         MP_WritePhyUshort(sc, 0x05, 0xfff6);
9036         MP_WritePhyUshort(sc, 0x06, 0x0080);
9037         PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
9038         PhyRegValue &= ~(BIT_7);
9039         MP_WritePhyUshort(sc, 0x00, PhyRegValue);
9040         MP_WritePhyUshort(sc, 0x1f, 0x0002);
9041         PhyRegValue = MP_ReadPhyUshort(sc, 0x08);
9042         PhyRegValue &= ~(BIT_7);
9043         MP_WritePhyUshort(sc, 0x08, PhyRegValue);
9044         MP_WritePhyUshort(sc, 0x1f, 0x0000);
9045         MP_WritePhyUshort(sc, 0x1f, 0x0007);
9046         MP_WritePhyUshort(sc, 0x1e, 0x0023);
9047         MP_WritePhyUshort(sc, 0x16, 0x0306);
9048         MP_WritePhyUshort(sc, 0x16, 0x0307);
9049         MP_WritePhyUshort(sc, 0x15, 0x000e);
9050         MP_WritePhyUshort(sc, 0x19, 0x000a);
9051         MP_WritePhyUshort(sc, 0x15, 0x0010);
9052         MP_WritePhyUshort(sc, 0x19, 0x0008);
9053         MP_WritePhyUshort(sc, 0x15, 0x0018);
9054         MP_WritePhyUshort(sc, 0x19, 0x4801);
9055         MP_WritePhyUshort(sc, 0x15, 0x0019);
9056         MP_WritePhyUshort(sc, 0x19, 0x6801);
9057         MP_WritePhyUshort(sc, 0x15, 0x001a);
9058         MP_WritePhyUshort(sc, 0x19, 0x66a1);
9059         MP_WritePhyUshort(sc, 0x15, 0x001f);
9060         MP_WritePhyUshort(sc, 0x19, 0x0000);
9061         MP_WritePhyUshort(sc, 0x15, 0x0020);
9062         MP_WritePhyUshort(sc, 0x19, 0x0000);
9063         MP_WritePhyUshort(sc, 0x15, 0x0021);
9064         MP_WritePhyUshort(sc, 0x19, 0x0000);
9065         MP_WritePhyUshort(sc, 0x15, 0x0022);
9066         MP_WritePhyUshort(sc, 0x19, 0x0000);
9067         MP_WritePhyUshort(sc, 0x15, 0x0023);
9068         MP_WritePhyUshort(sc, 0x19, 0x0000);
9069         MP_WritePhyUshort(sc, 0x15, 0x0024);
9070         MP_WritePhyUshort(sc, 0x19, 0x0000);
9071         MP_WritePhyUshort(sc, 0x15, 0x0025);
9072         MP_WritePhyUshort(sc, 0x19, 0x64a1);
9073         MP_WritePhyUshort(sc, 0x15, 0x0026);
9074         MP_WritePhyUshort(sc, 0x19, 0x40ea);
9075         MP_WritePhyUshort(sc, 0x15, 0x0027);
9076         MP_WritePhyUshort(sc, 0x19, 0x4503);
9077         MP_WritePhyUshort(sc, 0x15, 0x0028);
9078         MP_WritePhyUshort(sc, 0x19, 0x9f00);
9079         MP_WritePhyUshort(sc, 0x15, 0x0029);
9080         MP_WritePhyUshort(sc, 0x19, 0xa631);
9081         MP_WritePhyUshort(sc, 0x15, 0x002a);
9082         MP_WritePhyUshort(sc, 0x19, 0x9717);
9083         MP_WritePhyUshort(sc, 0x15, 0x002b);
9084         MP_WritePhyUshort(sc, 0x19, 0x302c);
9085         MP_WritePhyUshort(sc, 0x15, 0x002c);
9086         MP_WritePhyUshort(sc, 0x19, 0x4802);
9087         MP_WritePhyUshort(sc, 0x15, 0x002d);
9088         MP_WritePhyUshort(sc, 0x19, 0x58da);
9089         MP_WritePhyUshort(sc, 0x15, 0x002e);
9090         MP_WritePhyUshort(sc, 0x19, 0x400d);
9091         MP_WritePhyUshort(sc, 0x15, 0x002f);
9092         MP_WritePhyUshort(sc, 0x19, 0x4488);
9093         MP_WritePhyUshort(sc, 0x15, 0x0030);
9094         MP_WritePhyUshort(sc, 0x19, 0x9e00);
9095         MP_WritePhyUshort(sc, 0x15, 0x0031);
9096         MP_WritePhyUshort(sc, 0x19, 0x63c8);
9097         MP_WritePhyUshort(sc, 0x15, 0x0032);
9098         MP_WritePhyUshort(sc, 0x19, 0x6481);
9099         MP_WritePhyUshort(sc, 0x15, 0x0033);
9100         MP_WritePhyUshort(sc, 0x19, 0x0000);
9101         MP_WritePhyUshort(sc, 0x15, 0x0034);
9102         MP_WritePhyUshort(sc, 0x19, 0x0000);
9103         MP_WritePhyUshort(sc, 0x15, 0x0035);
9104         MP_WritePhyUshort(sc, 0x19, 0x0000);
9105         MP_WritePhyUshort(sc, 0x15, 0x0036);
9106         MP_WritePhyUshort(sc, 0x19, 0x0000);
9107         MP_WritePhyUshort(sc, 0x15, 0x0037);
9108         MP_WritePhyUshort(sc, 0x19, 0x0000);
9109         MP_WritePhyUshort(sc, 0x15, 0x0038);
9110         MP_WritePhyUshort(sc, 0x19, 0x0000);
9111         MP_WritePhyUshort(sc, 0x15, 0x0039);
9112         MP_WritePhyUshort(sc, 0x19, 0x0000);
9113         MP_WritePhyUshort(sc, 0x15, 0x003a);
9114         MP_WritePhyUshort(sc, 0x19, 0x0000);
9115         MP_WritePhyUshort(sc, 0x15, 0x003b);
9116         MP_WritePhyUshort(sc, 0x19, 0x63e8);
9117         MP_WritePhyUshort(sc, 0x15, 0x003c);
9118         MP_WritePhyUshort(sc, 0x19, 0x7d00);
9119         MP_WritePhyUshort(sc, 0x15, 0x003d);
9120         MP_WritePhyUshort(sc, 0x19, 0x59d4);
9121         MP_WritePhyUshort(sc, 0x15, 0x003e);
9122         MP_WritePhyUshort(sc, 0x19, 0x63f8);
9123         MP_WritePhyUshort(sc, 0x15, 0x0040);
9124         MP_WritePhyUshort(sc, 0x19, 0x64a1);
9125         MP_WritePhyUshort(sc, 0x15, 0x0041);
9126         MP_WritePhyUshort(sc, 0x19, 0x30de);
9127         MP_WritePhyUshort(sc, 0x15, 0x0044);
9128         MP_WritePhyUshort(sc, 0x19, 0x480f);
9129         MP_WritePhyUshort(sc, 0x15, 0x0045);
9130         MP_WritePhyUshort(sc, 0x19, 0x6800);
9131         MP_WritePhyUshort(sc, 0x15, 0x0046);
9132         MP_WritePhyUshort(sc, 0x19, 0x6680);
9133         MP_WritePhyUshort(sc, 0x15, 0x0047);
9134         MP_WritePhyUshort(sc, 0x19, 0x7c10);
9135         MP_WritePhyUshort(sc, 0x15, 0x0048);
9136         MP_WritePhyUshort(sc, 0x19, 0x63c8);
9137         MP_WritePhyUshort(sc, 0x15, 0x0049);
9138         MP_WritePhyUshort(sc, 0x19, 0x0000);
9139         MP_WritePhyUshort(sc, 0x15, 0x004a);
9140         MP_WritePhyUshort(sc, 0x19, 0x0000);
9141         MP_WritePhyUshort(sc, 0x15, 0x004b);
9142         MP_WritePhyUshort(sc, 0x19, 0x0000);
9143         MP_WritePhyUshort(sc, 0x15, 0x004c);
9144         MP_WritePhyUshort(sc, 0x19, 0x0000);
9145         MP_WritePhyUshort(sc, 0x15, 0x004d);
9146         MP_WritePhyUshort(sc, 0x19, 0x0000);
9147         MP_WritePhyUshort(sc, 0x15, 0x004e);
9148         MP_WritePhyUshort(sc, 0x19, 0x0000);
9149         MP_WritePhyUshort(sc, 0x15, 0x004f);
9150         MP_WritePhyUshort(sc, 0x19, 0x40ea);
9151         MP_WritePhyUshort(sc, 0x15, 0x0050);
9152         MP_WritePhyUshort(sc, 0x19, 0x4503);
9153         MP_WritePhyUshort(sc, 0x15, 0x0051);
9154         MP_WritePhyUshort(sc, 0x19, 0x58ca);
9155         MP_WritePhyUshort(sc, 0x15, 0x0052);
9156         MP_WritePhyUshort(sc, 0x19, 0x63c8);
9157         MP_WritePhyUshort(sc, 0x15, 0x0053);
9158         MP_WritePhyUshort(sc, 0x19, 0x63d8);
9159         MP_WritePhyUshort(sc, 0x15, 0x0054);
9160         MP_WritePhyUshort(sc, 0x19, 0x66a0);
9161         MP_WritePhyUshort(sc, 0x15, 0x0055);
9162         MP_WritePhyUshort(sc, 0x19, 0x9f00);
9163         MP_WritePhyUshort(sc, 0x15, 0x0056);
9164         MP_WritePhyUshort(sc, 0x19, 0x3000);
9165         MP_WritePhyUshort(sc, 0x15, 0x006E);
9166         MP_WritePhyUshort(sc, 0x19, 0x9afa);
9167         MP_WritePhyUshort(sc, 0x15, 0x00a1);
9168         MP_WritePhyUshort(sc, 0x19, 0x3044);
9169         MP_WritePhyUshort(sc, 0x15, 0x00ab);
9170         MP_WritePhyUshort(sc, 0x19, 0x5820);
9171         MP_WritePhyUshort(sc, 0x15, 0x00ac);
9172         MP_WritePhyUshort(sc, 0x19, 0x5e04);
9173         MP_WritePhyUshort(sc, 0x15, 0x00ad);
9174         MP_WritePhyUshort(sc, 0x19, 0xb60c);
9175         MP_WritePhyUshort(sc, 0x15, 0x00af);
9176         MP_WritePhyUshort(sc, 0x19, 0x000a);
9177         MP_WritePhyUshort(sc, 0x15, 0x00b2);
9178         MP_WritePhyUshort(sc, 0x19, 0x30b9);
9179         MP_WritePhyUshort(sc, 0x15, 0x00b9);
9180         MP_WritePhyUshort(sc, 0x19, 0x4408);
9181         MP_WritePhyUshort(sc, 0x15, 0x00ba);
9182         MP_WritePhyUshort(sc, 0x19, 0x480b);
9183         MP_WritePhyUshort(sc, 0x15, 0x00bb);
9184         MP_WritePhyUshort(sc, 0x19, 0x5e00);
9185         MP_WritePhyUshort(sc, 0x15, 0x00bc);
9186         MP_WritePhyUshort(sc, 0x19, 0x405f);
9187         MP_WritePhyUshort(sc, 0x15, 0x00bd);
9188         MP_WritePhyUshort(sc, 0x19, 0x4448);
9189         MP_WritePhyUshort(sc, 0x15, 0x00be);
9190         MP_WritePhyUshort(sc, 0x19, 0x4020);
9191         MP_WritePhyUshort(sc, 0x15, 0x00bf);
9192         MP_WritePhyUshort(sc, 0x19, 0x4468);
9193         MP_WritePhyUshort(sc, 0x15, 0x00c0);
9194         MP_WritePhyUshort(sc, 0x19, 0x9c02);
9195         MP_WritePhyUshort(sc, 0x15, 0x00c1);
9196         MP_WritePhyUshort(sc, 0x19, 0x58a0);
9197         MP_WritePhyUshort(sc, 0x15, 0x00c2);
9198         MP_WritePhyUshort(sc, 0x19, 0xb605);
9199         MP_WritePhyUshort(sc, 0x15, 0x00c3);
9200         MP_WritePhyUshort(sc, 0x19, 0xc0d3);
9201         MP_WritePhyUshort(sc, 0x15, 0x00c4);
9202         MP_WritePhyUshort(sc, 0x19, 0x00e6);
9203         MP_WritePhyUshort(sc, 0x15, 0x00c5);
9204         MP_WritePhyUshort(sc, 0x19, 0xdaec);
9205         MP_WritePhyUshort(sc, 0x15, 0x00c6);
9206         MP_WritePhyUshort(sc, 0x19, 0x00fa);
9207         MP_WritePhyUshort(sc, 0x15, 0x00c7);
9208         MP_WritePhyUshort(sc, 0x19, 0x9df9);
9209         MP_WritePhyUshort(sc, 0x15, 0x00c8);
9210         MP_WritePhyUshort(sc, 0x19, 0x307a);
9211         MP_WritePhyUshort(sc, 0x15, 0x0112);
9212         MP_WritePhyUshort(sc, 0x19, 0x6421);
9213         MP_WritePhyUshort(sc, 0x15, 0x0113);
9214         MP_WritePhyUshort(sc, 0x19, 0x7c08);
9215         MP_WritePhyUshort(sc, 0x15, 0x0114);
9216         MP_WritePhyUshort(sc, 0x19, 0x63f0);
9217         MP_WritePhyUshort(sc, 0x15, 0x0115);
9218         MP_WritePhyUshort(sc, 0x19, 0x4003);
9219         MP_WritePhyUshort(sc, 0x15, 0x0116);
9220         MP_WritePhyUshort(sc, 0x19, 0x4418);
9221         MP_WritePhyUshort(sc, 0x15, 0x0117);
9222         MP_WritePhyUshort(sc, 0x19, 0x9b00);
9223         MP_WritePhyUshort(sc, 0x15, 0x0118);
9224         MP_WritePhyUshort(sc, 0x19, 0x6461);
9225         MP_WritePhyUshort(sc, 0x15, 0x0119);
9226         MP_WritePhyUshort(sc, 0x19, 0x64e1);
9227         MP_WritePhyUshort(sc, 0x15, 0x011a);
9228         MP_WritePhyUshort(sc, 0x19, 0x0000);
9229         MP_WritePhyUshort(sc, 0x15, 0x0150);
9230         MP_WritePhyUshort(sc, 0x19, 0x7c80);
9231         MP_WritePhyUshort(sc, 0x15, 0x0151);
9232         MP_WritePhyUshort(sc, 0x19, 0x6461);
9233         MP_WritePhyUshort(sc, 0x15, 0x0152);
9234         MP_WritePhyUshort(sc, 0x19, 0x4003);
9235         MP_WritePhyUshort(sc, 0x15, 0x0153);
9236         MP_WritePhyUshort(sc, 0x19, 0x4540);
9237         MP_WritePhyUshort(sc, 0x15, 0x0154);
9238         MP_WritePhyUshort(sc, 0x19, 0x9f00);
9239         MP_WritePhyUshort(sc, 0x15, 0x0155);
9240         MP_WritePhyUshort(sc, 0x19, 0x9d00);
9241         MP_WritePhyUshort(sc, 0x15, 0x0156);
9242         MP_WritePhyUshort(sc, 0x19, 0x7c40);
9243         MP_WritePhyUshort(sc, 0x15, 0x0157);
9244         MP_WritePhyUshort(sc, 0x19, 0x6421);
9245         MP_WritePhyUshort(sc, 0x15, 0x0158);
9246         MP_WritePhyUshort(sc, 0x19, 0x7c80);
9247         MP_WritePhyUshort(sc, 0x15, 0x0159);
9248         MP_WritePhyUshort(sc, 0x19, 0x64a1);
9249         MP_WritePhyUshort(sc, 0x15, 0x015a);
9250         MP_WritePhyUshort(sc, 0x19, 0x30fe);
9251         MP_WritePhyUshort(sc, 0x15, 0x021e);
9252         MP_WritePhyUshort(sc, 0x19, 0x5410);
9253         MP_WritePhyUshort(sc, 0x15, 0x0225);
9254         MP_WritePhyUshort(sc, 0x19, 0x5400);
9255         MP_WritePhyUshort(sc, 0x15, 0x023D);
9256         MP_WritePhyUshort(sc, 0x19, 0x4050);
9257         MP_WritePhyUshort(sc, 0x15, 0x0295);
9258         MP_WritePhyUshort(sc, 0x19, 0x6c08);
9259         MP_WritePhyUshort(sc, 0x15, 0x02bd);
9260         MP_WritePhyUshort(sc, 0x19, 0xa523);
9261         MP_WritePhyUshort(sc, 0x15, 0x02be);
9262         MP_WritePhyUshort(sc, 0x19, 0x32ca);
9263         MP_WritePhyUshort(sc, 0x15, 0x02ca);
9264         MP_WritePhyUshort(sc, 0x19, 0x48b3);
9265         MP_WritePhyUshort(sc, 0x15, 0x02cb);
9266         MP_WritePhyUshort(sc, 0x19, 0x4020);
9267         MP_WritePhyUshort(sc, 0x15, 0x02cc);
9268         MP_WritePhyUshort(sc, 0x19, 0x4823);
9269         MP_WritePhyUshort(sc, 0x15, 0x02cd);
9270         MP_WritePhyUshort(sc, 0x19, 0x4510);
9271         MP_WritePhyUshort(sc, 0x15, 0x02ce);
9272         MP_WritePhyUshort(sc, 0x19, 0xb63a);
9273         MP_WritePhyUshort(sc, 0x15, 0x02cf);
9274         MP_WritePhyUshort(sc, 0x19, 0x7dc8);
9275         MP_WritePhyUshort(sc, 0x15, 0x02d6);
9276         MP_WritePhyUshort(sc, 0x19, 0x9bf8);
9277         MP_WritePhyUshort(sc, 0x15, 0x02d8);
9278         MP_WritePhyUshort(sc, 0x19, 0x85f6);
9279         MP_WritePhyUshort(sc, 0x15, 0x02d9);
9280         MP_WritePhyUshort(sc, 0x19, 0x32e0);
9281         MP_WritePhyUshort(sc, 0x15, 0x02e0);
9282         MP_WritePhyUshort(sc, 0x19, 0x4834);
9283         MP_WritePhyUshort(sc, 0x15, 0x02e1);
9284         MP_WritePhyUshort(sc, 0x19, 0x6c08);
9285         MP_WritePhyUshort(sc, 0x15, 0x02e2);
9286         MP_WritePhyUshort(sc, 0x19, 0x4020);
9287         MP_WritePhyUshort(sc, 0x15, 0x02e3);
9288         MP_WritePhyUshort(sc, 0x19, 0x4824);
9289         MP_WritePhyUshort(sc, 0x15, 0x02e4);
9290         MP_WritePhyUshort(sc, 0x19, 0x4520);
9291         MP_WritePhyUshort(sc, 0x15, 0x02e5);
9292         MP_WritePhyUshort(sc, 0x19, 0x4008);
9293         MP_WritePhyUshort(sc, 0x15, 0x02e6);
9294         MP_WritePhyUshort(sc, 0x19, 0x4560);
9295         MP_WritePhyUshort(sc, 0x15, 0x02e7);
9296         MP_WritePhyUshort(sc, 0x19, 0x9d04);
9297         MP_WritePhyUshort(sc, 0x15, 0x02e8);
9298         MP_WritePhyUshort(sc, 0x19, 0x48c4);
9299         MP_WritePhyUshort(sc, 0x15, 0x02e9);
9300         MP_WritePhyUshort(sc, 0x19, 0x0000);
9301         MP_WritePhyUshort(sc, 0x15, 0x02ea);
9302         MP_WritePhyUshort(sc, 0x19, 0x4844);
9303         MP_WritePhyUshort(sc, 0x15, 0x02eb);
9304         MP_WritePhyUshort(sc, 0x19, 0x7dc8);
9305         MP_WritePhyUshort(sc, 0x15, 0x02f0);
9306         MP_WritePhyUshort(sc, 0x19, 0x9cf7);
9307         MP_WritePhyUshort(sc, 0x15, 0x02f1);
9308         MP_WritePhyUshort(sc, 0x19, 0xdf94);
9309         MP_WritePhyUshort(sc, 0x15, 0x02f2);
9310         MP_WritePhyUshort(sc, 0x19, 0x0002);
9311         MP_WritePhyUshort(sc, 0x15, 0x02f3);
9312         MP_WritePhyUshort(sc, 0x19, 0x6810);
9313         MP_WritePhyUshort(sc, 0x15, 0x02f4);
9314         MP_WritePhyUshort(sc, 0x19, 0xb614);
9315         MP_WritePhyUshort(sc, 0x15, 0x02f5);
9316         MP_WritePhyUshort(sc, 0x19, 0xc42b);
9317         MP_WritePhyUshort(sc, 0x15, 0x02f6);
9318         MP_WritePhyUshort(sc, 0x19, 0x00d4);
9319         MP_WritePhyUshort(sc, 0x15, 0x02f7);
9320         MP_WritePhyUshort(sc, 0x19, 0xc455);
9321         MP_WritePhyUshort(sc, 0x15, 0x02f8);
9322         MP_WritePhyUshort(sc, 0x19, 0x0093);
9323         MP_WritePhyUshort(sc, 0x15, 0x02f9);
9324         MP_WritePhyUshort(sc, 0x19, 0x92ee);
9325         MP_WritePhyUshort(sc, 0x15, 0x02fa);
9326         MP_WritePhyUshort(sc, 0x19, 0xefed);
9327         MP_WritePhyUshort(sc, 0x15, 0x02fb);
9328         MP_WritePhyUshort(sc, 0x19, 0x3312);
9329         MP_WritePhyUshort(sc, 0x15, 0x0312);
9330         MP_WritePhyUshort(sc, 0x19, 0x49b5);
9331         MP_WritePhyUshort(sc, 0x15, 0x0313);
9332         MP_WritePhyUshort(sc, 0x19, 0x7d00);
9333         MP_WritePhyUshort(sc, 0x15, 0x0314);
9334         MP_WritePhyUshort(sc, 0x19, 0x4d00);
9335         MP_WritePhyUshort(sc, 0x15, 0x0315);
9336         MP_WritePhyUshort(sc, 0x19, 0x6810);
9337         MP_WritePhyUshort(sc, 0x15, 0x031e);
9338         MP_WritePhyUshort(sc, 0x19, 0x404f);
9339         MP_WritePhyUshort(sc, 0x15, 0x031f);
9340         MP_WritePhyUshort(sc, 0x19, 0x44c8);
9341         MP_WritePhyUshort(sc, 0x15, 0x0320);
9342         MP_WritePhyUshort(sc, 0x19, 0xd64f);
9343         MP_WritePhyUshort(sc, 0x15, 0x0321);
9344         MP_WritePhyUshort(sc, 0x19, 0x00e7);
9345         MP_WritePhyUshort(sc, 0x15, 0x0322);
9346         MP_WritePhyUshort(sc, 0x19, 0x7c08);
9347         MP_WritePhyUshort(sc, 0x15, 0x0323);
9348         MP_WritePhyUshort(sc, 0x19, 0x8203);
9349         MP_WritePhyUshort(sc, 0x15, 0x0324);
9350         MP_WritePhyUshort(sc, 0x19, 0x4d48);
9351         MP_WritePhyUshort(sc, 0x15, 0x0325);
9352         MP_WritePhyUshort(sc, 0x19, 0x3327);
9353         MP_WritePhyUshort(sc, 0x15, 0x0326);
9354         MP_WritePhyUshort(sc, 0x19, 0x4d40);
9355         MP_WritePhyUshort(sc, 0x15, 0x0327);
9356         MP_WritePhyUshort(sc, 0x19, 0xc8d7);
9357         MP_WritePhyUshort(sc, 0x15, 0x0328);
9358         MP_WritePhyUshort(sc, 0x19, 0x0003);
9359         MP_WritePhyUshort(sc, 0x15, 0x0329);
9360         MP_WritePhyUshort(sc, 0x19, 0x7c20);
9361         MP_WritePhyUshort(sc, 0x15, 0x032a);
9362         MP_WritePhyUshort(sc, 0x19, 0x4c20);
9363         MP_WritePhyUshort(sc, 0x15, 0x032b);
9364         MP_WritePhyUshort(sc, 0x19, 0xc8ed);
9365         MP_WritePhyUshort(sc, 0x15, 0x032c);
9366         MP_WritePhyUshort(sc, 0x19, 0x00f4);
9367         MP_WritePhyUshort(sc, 0x15, 0x032d);
9368         MP_WritePhyUshort(sc, 0x19, 0x82b3);
9369         MP_WritePhyUshort(sc, 0x15, 0x032e);
9370         MP_WritePhyUshort(sc, 0x19, 0xd11d);
9371         MP_WritePhyUshort(sc, 0x15, 0x032f);
9372         MP_WritePhyUshort(sc, 0x19, 0x00b1);
9373         MP_WritePhyUshort(sc, 0x15, 0x0330);
9374         MP_WritePhyUshort(sc, 0x19, 0xde18);
9375         MP_WritePhyUshort(sc, 0x15, 0x0331);
9376         MP_WritePhyUshort(sc, 0x19, 0x0008);
9377         MP_WritePhyUshort(sc, 0x15, 0x0332);
9378         MP_WritePhyUshort(sc, 0x19, 0x91ee);
9379         MP_WritePhyUshort(sc, 0x15, 0x0333);
9380         MP_WritePhyUshort(sc, 0x19, 0x3339);
9381         MP_WritePhyUshort(sc, 0x15, 0x033a);
9382         MP_WritePhyUshort(sc, 0x19, 0x4064);
9383         MP_WritePhyUshort(sc, 0x15, 0x0340);
9384         MP_WritePhyUshort(sc, 0x19, 0x9e06);
9385         MP_WritePhyUshort(sc, 0x15, 0x0341);
9386         MP_WritePhyUshort(sc, 0x19, 0x7c08);
9387         MP_WritePhyUshort(sc, 0x15, 0x0342);
9388         MP_WritePhyUshort(sc, 0x19, 0x8203);
9389         MP_WritePhyUshort(sc, 0x15, 0x0343);
9390         MP_WritePhyUshort(sc, 0x19, 0x4d48);
9391         MP_WritePhyUshort(sc, 0x15, 0x0344);
9392         MP_WritePhyUshort(sc, 0x19, 0x3346);
9393         MP_WritePhyUshort(sc, 0x15, 0x0345);
9394         MP_WritePhyUshort(sc, 0x19, 0x4d40);
9395         MP_WritePhyUshort(sc, 0x15, 0x0346);
9396         MP_WritePhyUshort(sc, 0x19, 0xd11d);
9397         MP_WritePhyUshort(sc, 0x15, 0x0347);
9398         MP_WritePhyUshort(sc, 0x19, 0x0099);
9399         MP_WritePhyUshort(sc, 0x15, 0x0348);
9400         MP_WritePhyUshort(sc, 0x19, 0xbb17);
9401         MP_WritePhyUshort(sc, 0x15, 0x0349);
9402         MP_WritePhyUshort(sc, 0x19, 0x8102);
9403         MP_WritePhyUshort(sc, 0x15, 0x034a);
9404         MP_WritePhyUshort(sc, 0x19, 0x334d);
9405         MP_WritePhyUshort(sc, 0x15, 0x034b);
9406         MP_WritePhyUshort(sc, 0x19, 0xa22c);
9407         MP_WritePhyUshort(sc, 0x15, 0x034c);
9408         MP_WritePhyUshort(sc, 0x19, 0x3397);
9409         MP_WritePhyUshort(sc, 0x15, 0x034d);
9410         MP_WritePhyUshort(sc, 0x19, 0x91f2);
9411         MP_WritePhyUshort(sc, 0x15, 0x034e);
9412         MP_WritePhyUshort(sc, 0x19, 0xc218);
9413         MP_WritePhyUshort(sc, 0x15, 0x034f);
9414         MP_WritePhyUshort(sc, 0x19, 0x00f0);
9415         MP_WritePhyUshort(sc, 0x15, 0x0350);
9416         MP_WritePhyUshort(sc, 0x19, 0x3397);
9417         MP_WritePhyUshort(sc, 0x15, 0x0351);
9418         MP_WritePhyUshort(sc, 0x19, 0x0000);
9419         MP_WritePhyUshort(sc, 0x15, 0x0364);
9420         MP_WritePhyUshort(sc, 0x19, 0xbc05);
9421         MP_WritePhyUshort(sc, 0x15, 0x0367);
9422         MP_WritePhyUshort(sc, 0x19, 0xa1fc);
9423         MP_WritePhyUshort(sc, 0x15, 0x0368);
9424         MP_WritePhyUshort(sc, 0x19, 0x3377);
9425         MP_WritePhyUshort(sc, 0x15, 0x0369);
9426         MP_WritePhyUshort(sc, 0x19, 0x328b);
9427         MP_WritePhyUshort(sc, 0x15, 0x036a);
9428         MP_WritePhyUshort(sc, 0x19, 0x0000);
9429         MP_WritePhyUshort(sc, 0x15, 0x0377);
9430         MP_WritePhyUshort(sc, 0x19, 0x4b97);
9431         MP_WritePhyUshort(sc, 0x15, 0x0378);
9432         MP_WritePhyUshort(sc, 0x19, 0x6818);
9433         MP_WritePhyUshort(sc, 0x15, 0x0379);
9434         MP_WritePhyUshort(sc, 0x19, 0x4b07);
9435         MP_WritePhyUshort(sc, 0x15, 0x037a);
9436         MP_WritePhyUshort(sc, 0x19, 0x40ac);
9437         MP_WritePhyUshort(sc, 0x15, 0x037b);
9438         MP_WritePhyUshort(sc, 0x19, 0x4445);
9439         MP_WritePhyUshort(sc, 0x15, 0x037c);
9440         MP_WritePhyUshort(sc, 0x19, 0x404e);
9441         MP_WritePhyUshort(sc, 0x15, 0x037d);
9442         MP_WritePhyUshort(sc, 0x19, 0x4461);
9443         MP_WritePhyUshort(sc, 0x15, 0x037e);
9444         MP_WritePhyUshort(sc, 0x19, 0x9c09);
9445         MP_WritePhyUshort(sc, 0x15, 0x037f);
9446         MP_WritePhyUshort(sc, 0x19, 0x63da);
9447         MP_WritePhyUshort(sc, 0x15, 0x0380);
9448         MP_WritePhyUshort(sc, 0x19, 0x5440);
9449         MP_WritePhyUshort(sc, 0x15, 0x0381);
9450         MP_WritePhyUshort(sc, 0x19, 0x4b98);
9451         MP_WritePhyUshort(sc, 0x15, 0x0382);
9452         MP_WritePhyUshort(sc, 0x19, 0x7c60);
9453         MP_WritePhyUshort(sc, 0x15, 0x0383);
9454         MP_WritePhyUshort(sc, 0x19, 0x4c00);
9455         MP_WritePhyUshort(sc, 0x15, 0x0384);
9456         MP_WritePhyUshort(sc, 0x19, 0x4b08);
9457         MP_WritePhyUshort(sc, 0x15, 0x0385);
9458         MP_WritePhyUshort(sc, 0x19, 0x63d8);
9459         MP_WritePhyUshort(sc, 0x15, 0x0386);
9460         MP_WritePhyUshort(sc, 0x19, 0x338d);
9461         MP_WritePhyUshort(sc, 0x15, 0x0387);
9462         MP_WritePhyUshort(sc, 0x19, 0xd64f);
9463         MP_WritePhyUshort(sc, 0x15, 0x0388);
9464         MP_WritePhyUshort(sc, 0x19, 0x0080);
9465         MP_WritePhyUshort(sc, 0x15, 0x0389);
9466         MP_WritePhyUshort(sc, 0x19, 0x820c);
9467         MP_WritePhyUshort(sc, 0x15, 0x038a);
9468         MP_WritePhyUshort(sc, 0x19, 0xa10b);
9469         MP_WritePhyUshort(sc, 0x15, 0x038b);
9470         MP_WritePhyUshort(sc, 0x19, 0x9df3);
9471         MP_WritePhyUshort(sc, 0x15, 0x038c);
9472         MP_WritePhyUshort(sc, 0x19, 0x3395);
9473         MP_WritePhyUshort(sc, 0x15, 0x038d);
9474         MP_WritePhyUshort(sc, 0x19, 0xd64f);
9475         MP_WritePhyUshort(sc, 0x15, 0x038e);
9476         MP_WritePhyUshort(sc, 0x19, 0x00f9);
9477         MP_WritePhyUshort(sc, 0x15, 0x038f);
9478         MP_WritePhyUshort(sc, 0x19, 0xc017);
9479         MP_WritePhyUshort(sc, 0x15, 0x0390);
9480         MP_WritePhyUshort(sc, 0x19, 0x0005);
9481         MP_WritePhyUshort(sc, 0x15, 0x0391);
9482         MP_WritePhyUshort(sc, 0x19, 0x6c0b);
9483         MP_WritePhyUshort(sc, 0x15, 0x0392);
9484         MP_WritePhyUshort(sc, 0x19, 0xa103);
9485         MP_WritePhyUshort(sc, 0x15, 0x0393);
9486         MP_WritePhyUshort(sc, 0x19, 0x6c08);
9487         MP_WritePhyUshort(sc, 0x15, 0x0394);
9488         MP_WritePhyUshort(sc, 0x19, 0x9df9);
9489         MP_WritePhyUshort(sc, 0x15, 0x0395);
9490         MP_WritePhyUshort(sc, 0x19, 0x6c08);
9491         MP_WritePhyUshort(sc, 0x15, 0x0396);
9492         MP_WritePhyUshort(sc, 0x19, 0x3397);
9493         MP_WritePhyUshort(sc, 0x15, 0x0399);
9494         MP_WritePhyUshort(sc, 0x19, 0x6810);
9495         MP_WritePhyUshort(sc, 0x15, 0x03a4);
9496         MP_WritePhyUshort(sc, 0x19, 0x7c08);
9497         MP_WritePhyUshort(sc, 0x15, 0x03a5);
9498         MP_WritePhyUshort(sc, 0x19, 0x8203);
9499         MP_WritePhyUshort(sc, 0x15, 0x03a6);
9500         MP_WritePhyUshort(sc, 0x19, 0x4d08);
9501         MP_WritePhyUshort(sc, 0x15, 0x03a7);
9502         MP_WritePhyUshort(sc, 0x19, 0x33a9);
9503         MP_WritePhyUshort(sc, 0x15, 0x03a8);
9504         MP_WritePhyUshort(sc, 0x19, 0x4d00);
9505         MP_WritePhyUshort(sc, 0x15, 0x03a9);
9506         MP_WritePhyUshort(sc, 0x19, 0x9bfa);
9507         MP_WritePhyUshort(sc, 0x15, 0x03aa);
9508         MP_WritePhyUshort(sc, 0x19, 0x33b6);
9509         MP_WritePhyUshort(sc, 0x15, 0x03bb);
9510         MP_WritePhyUshort(sc, 0x19, 0x4056);
9511         MP_WritePhyUshort(sc, 0x15, 0x03bc);
9512         MP_WritePhyUshort(sc, 0x19, 0x44e9);
9513         MP_WritePhyUshort(sc, 0x15, 0x03bd);
9514         MP_WritePhyUshort(sc, 0x19, 0x405e);
9515         MP_WritePhyUshort(sc, 0x15, 0x03be);
9516         MP_WritePhyUshort(sc, 0x19, 0x44f8);
9517         MP_WritePhyUshort(sc, 0x15, 0x03bf);
9518         MP_WritePhyUshort(sc, 0x19, 0xd64f);
9519         MP_WritePhyUshort(sc, 0x15, 0x03c0);
9520         MP_WritePhyUshort(sc, 0x19, 0x0037);
9521         MP_WritePhyUshort(sc, 0x15, 0x03c1);
9522         MP_WritePhyUshort(sc, 0x19, 0xbd37);
9523         MP_WritePhyUshort(sc, 0x15, 0x03c2);
9524         MP_WritePhyUshort(sc, 0x19, 0x9cfd);
9525         MP_WritePhyUshort(sc, 0x15, 0x03c3);
9526         MP_WritePhyUshort(sc, 0x19, 0xc639);
9527         MP_WritePhyUshort(sc, 0x15, 0x03c4);
9528         MP_WritePhyUshort(sc, 0x19, 0x0011);
9529         MP_WritePhyUshort(sc, 0x15, 0x03c5);
9530         MP_WritePhyUshort(sc, 0x19, 0x9b03);
9531         MP_WritePhyUshort(sc, 0x15, 0x03c6);
9532         MP_WritePhyUshort(sc, 0x19, 0x7c01);
9533         MP_WritePhyUshort(sc, 0x15, 0x03c7);
9534         MP_WritePhyUshort(sc, 0x19, 0x4c01);
9535         MP_WritePhyUshort(sc, 0x15, 0x03c8);
9536         MP_WritePhyUshort(sc, 0x19, 0x9e03);
9537         MP_WritePhyUshort(sc, 0x15, 0x03c9);
9538         MP_WritePhyUshort(sc, 0x19, 0x7c20);
9539         MP_WritePhyUshort(sc, 0x15, 0x03ca);
9540         MP_WritePhyUshort(sc, 0x19, 0x4c20);
9541         MP_WritePhyUshort(sc, 0x15, 0x03cb);
9542         MP_WritePhyUshort(sc, 0x19, 0x9af4);
9543         MP_WritePhyUshort(sc, 0x15, 0x03cc);
9544         MP_WritePhyUshort(sc, 0x19, 0x7c12);
9545         MP_WritePhyUshort(sc, 0x15, 0x03cd);
9546         MP_WritePhyUshort(sc, 0x19, 0x4c52);
9547         MP_WritePhyUshort(sc, 0x15, 0x03ce);
9548         MP_WritePhyUshort(sc, 0x19, 0x4470);
9549         MP_WritePhyUshort(sc, 0x15, 0x03cf);
9550         MP_WritePhyUshort(sc, 0x19, 0x7c12);
9551         MP_WritePhyUshort(sc, 0x15, 0x03d0);
9552         MP_WritePhyUshort(sc, 0x19, 0x4c40);
9553         MP_WritePhyUshort(sc, 0x15, 0x03d1);
9554         MP_WritePhyUshort(sc, 0x19, 0x33bf);
9555         MP_WritePhyUshort(sc, 0x15, 0x03d6);
9556         MP_WritePhyUshort(sc, 0x19, 0x4047);
9557         MP_WritePhyUshort(sc, 0x15, 0x03d7);
9558         MP_WritePhyUshort(sc, 0x19, 0x4469);
9559         MP_WritePhyUshort(sc, 0x15, 0x03d8);
9560         MP_WritePhyUshort(sc, 0x19, 0x492b);
9561         MP_WritePhyUshort(sc, 0x15, 0x03d9);
9562         MP_WritePhyUshort(sc, 0x19, 0x4479);
9563         MP_WritePhyUshort(sc, 0x15, 0x03da);
9564         MP_WritePhyUshort(sc, 0x19, 0x7c09);
9565         MP_WritePhyUshort(sc, 0x15, 0x03db);
9566         MP_WritePhyUshort(sc, 0x19, 0x8203);
9567         MP_WritePhyUshort(sc, 0x15, 0x03dc);
9568         MP_WritePhyUshort(sc, 0x19, 0x4d48);
9569         MP_WritePhyUshort(sc, 0x15, 0x03dd);
9570         MP_WritePhyUshort(sc, 0x19, 0x33df);
9571         MP_WritePhyUshort(sc, 0x15, 0x03de);
9572         MP_WritePhyUshort(sc, 0x19, 0x4d40);
9573         MP_WritePhyUshort(sc, 0x15, 0x03df);
9574         MP_WritePhyUshort(sc, 0x19, 0xd64f);
9575         MP_WritePhyUshort(sc, 0x15, 0x03e0);
9576         MP_WritePhyUshort(sc, 0x19, 0x0017);
9577         MP_WritePhyUshort(sc, 0x15, 0x03e1);
9578         MP_WritePhyUshort(sc, 0x19, 0xbd17);
9579         MP_WritePhyUshort(sc, 0x15, 0x03e2);
9580         MP_WritePhyUshort(sc, 0x19, 0x9b03);
9581         MP_WritePhyUshort(sc, 0x15, 0x03e3);
9582         MP_WritePhyUshort(sc, 0x19, 0x7c20);
9583         MP_WritePhyUshort(sc, 0x15, 0x03e4);
9584         MP_WritePhyUshort(sc, 0x19, 0x4c20);
9585         MP_WritePhyUshort(sc, 0x15, 0x03e5);
9586         MP_WritePhyUshort(sc, 0x19, 0x88f5);
9587         MP_WritePhyUshort(sc, 0x15, 0x03e6);
9588         MP_WritePhyUshort(sc, 0x19, 0xc428);
9589         MP_WritePhyUshort(sc, 0x15, 0x03e7);
9590         MP_WritePhyUshort(sc, 0x19, 0x0008);
9591         MP_WritePhyUshort(sc, 0x15, 0x03e8);
9592         MP_WritePhyUshort(sc, 0x19, 0x9af2);
9593         MP_WritePhyUshort(sc, 0x15, 0x03e9);
9594         MP_WritePhyUshort(sc, 0x19, 0x7c12);
9595         MP_WritePhyUshort(sc, 0x15, 0x03ea);
9596         MP_WritePhyUshort(sc, 0x19, 0x4c52);
9597         MP_WritePhyUshort(sc, 0x15, 0x03eb);
9598         MP_WritePhyUshort(sc, 0x19, 0x4470);
9599         MP_WritePhyUshort(sc, 0x15, 0x03ec);
9600         MP_WritePhyUshort(sc, 0x19, 0x7c12);
9601         MP_WritePhyUshort(sc, 0x15, 0x03ed);
9602         MP_WritePhyUshort(sc, 0x19, 0x4c40);
9603         MP_WritePhyUshort(sc, 0x15, 0x03ee);
9604         MP_WritePhyUshort(sc, 0x19, 0x33da);
9605         MP_WritePhyUshort(sc, 0x15, 0x03ef);
9606         MP_WritePhyUshort(sc, 0x19, 0x3312);
9607         MP_WritePhyUshort(sc, 0x16, 0x0306);
9608         MP_WritePhyUshort(sc, 0x16, 0x0300);
9609         MP_WritePhyUshort(sc, 0x1f, 0x0000);
9610         MP_WritePhyUshort(sc, 0x17, 0x2179);
9611         MP_WritePhyUshort(sc, 0x1f, 0x0007);
9612         MP_WritePhyUshort(sc, 0x1e, 0x0040);
9613         MP_WritePhyUshort(sc, 0x18, 0x0645);
9614         MP_WritePhyUshort(sc, 0x19, 0xe200);
9615         MP_WritePhyUshort(sc, 0x18, 0x0655);
9616         MP_WritePhyUshort(sc, 0x19, 0x9000);
9617         MP_WritePhyUshort(sc, 0x18, 0x0d05);
9618         MP_WritePhyUshort(sc, 0x19, 0xbe00);
9619         MP_WritePhyUshort(sc, 0x18, 0x0d15);
9620         MP_WritePhyUshort(sc, 0x19, 0xd300);
9621         MP_WritePhyUshort(sc, 0x18, 0x0d25);
9622         MP_WritePhyUshort(sc, 0x19, 0xfe00);
9623         MP_WritePhyUshort(sc, 0x18, 0x0d35);
9624         MP_WritePhyUshort(sc, 0x19, 0x4000);
9625         MP_WritePhyUshort(sc, 0x18, 0x0d45);
9626         MP_WritePhyUshort(sc, 0x19, 0x7f00);
9627         MP_WritePhyUshort(sc, 0x18, 0x0d55);
9628         MP_WritePhyUshort(sc, 0x19, 0x1000);
9629         MP_WritePhyUshort(sc, 0x18, 0x0d65);
9630         MP_WritePhyUshort(sc, 0x19, 0x0000);
9631         MP_WritePhyUshort(sc, 0x18, 0x0d75);
9632         MP_WritePhyUshort(sc, 0x19, 0x8200);
9633         MP_WritePhyUshort(sc, 0x18, 0x0d85);
9634         MP_WritePhyUshort(sc, 0x19, 0x0000);
9635         MP_WritePhyUshort(sc, 0x18, 0x0d95);
9636         MP_WritePhyUshort(sc, 0x19, 0x7000);
9637         MP_WritePhyUshort(sc, 0x18, 0x0da5);
9638         MP_WritePhyUshort(sc, 0x19, 0x0f00);
9639         MP_WritePhyUshort(sc, 0x18, 0x0db5);
9640         MP_WritePhyUshort(sc, 0x19, 0x0100);
9641         MP_WritePhyUshort(sc, 0x18, 0x0dc5);
9642         MP_WritePhyUshort(sc, 0x19, 0x9b00);
9643         MP_WritePhyUshort(sc, 0x18, 0x0dd5);
9644         MP_WritePhyUshort(sc, 0x19, 0x7f00);
9645         MP_WritePhyUshort(sc, 0x18, 0x0de5);
9646         MP_WritePhyUshort(sc, 0x19, 0xe000);
9647         MP_WritePhyUshort(sc, 0x18, 0x0df5);
9648         MP_WritePhyUshort(sc, 0x19, 0xef00);
9649         MP_WritePhyUshort(sc, 0x18, 0x16d5);
9650         MP_WritePhyUshort(sc, 0x19, 0xe200);
9651         MP_WritePhyUshort(sc, 0x18, 0x16e5);
9652         MP_WritePhyUshort(sc, 0x19, 0xab00);
9653         MP_WritePhyUshort(sc, 0x18, 0x2904);
9654         MP_WritePhyUshort(sc, 0x19, 0x4000);
9655         MP_WritePhyUshort(sc, 0x18, 0x2914);
9656         MP_WritePhyUshort(sc, 0x19, 0x7f00);
9657         MP_WritePhyUshort(sc, 0x18, 0x2924);
9658         MP_WritePhyUshort(sc, 0x19, 0x0100);
9659         MP_WritePhyUshort(sc, 0x18, 0x2934);
9660         MP_WritePhyUshort(sc, 0x19, 0x2000);
9661         MP_WritePhyUshort(sc, 0x18, 0x2944);
9662         MP_WritePhyUshort(sc, 0x19, 0x0000);
9663         MP_WritePhyUshort(sc, 0x18, 0x2954);
9664         MP_WritePhyUshort(sc, 0x19, 0x4600);
9665         MP_WritePhyUshort(sc, 0x18, 0x2964);
9666         MP_WritePhyUshort(sc, 0x19, 0xfc00);
9667         MP_WritePhyUshort(sc, 0x18, 0x2974);
9668         MP_WritePhyUshort(sc, 0x19, 0x0000);
9669         MP_WritePhyUshort(sc, 0x18, 0x2984);
9670         MP_WritePhyUshort(sc, 0x19, 0x5000);
9671         MP_WritePhyUshort(sc, 0x18, 0x2994);
9672         MP_WritePhyUshort(sc, 0x19, 0x9d00);
9673         MP_WritePhyUshort(sc, 0x18, 0x29a4);
9674         MP_WritePhyUshort(sc, 0x19, 0xff00);
9675         MP_WritePhyUshort(sc, 0x18, 0x29b4);
9676         MP_WritePhyUshort(sc, 0x19, 0x4000);
9677         MP_WritePhyUshort(sc, 0x18, 0x29c4);
9678         MP_WritePhyUshort(sc, 0x19, 0x7f00);
9679         MP_WritePhyUshort(sc, 0x18, 0x29d4);
9680         MP_WritePhyUshort(sc, 0x19, 0x0000);
9681         MP_WritePhyUshort(sc, 0x18, 0x29e4);
9682         MP_WritePhyUshort(sc, 0x19, 0x2000);
9683         MP_WritePhyUshort(sc, 0x18, 0x29f4);
9684         MP_WritePhyUshort(sc, 0x19, 0x0000);
9685         MP_WritePhyUshort(sc, 0x18, 0x2a04);
9686         MP_WritePhyUshort(sc, 0x19, 0xe600);
9687         MP_WritePhyUshort(sc, 0x18, 0x2a14);
9688         MP_WritePhyUshort(sc, 0x19, 0xff00);
9689         MP_WritePhyUshort(sc, 0x18, 0x2a24);
9690         MP_WritePhyUshort(sc, 0x19, 0x0000);
9691         MP_WritePhyUshort(sc, 0x18, 0x2a34);
9692         MP_WritePhyUshort(sc, 0x19, 0x5000);
9693         MP_WritePhyUshort(sc, 0x18, 0x2a44);
9694         MP_WritePhyUshort(sc, 0x19, 0x8500);
9695         MP_WritePhyUshort(sc, 0x18, 0x2a54);
9696         MP_WritePhyUshort(sc, 0x19, 0x7f00);
9697         MP_WritePhyUshort(sc, 0x18, 0x2a64);
9698         MP_WritePhyUshort(sc, 0x19, 0xac00);
9699         MP_WritePhyUshort(sc, 0x18, 0x2a74);
9700         MP_WritePhyUshort(sc, 0x19, 0x0800);
9701         MP_WritePhyUshort(sc, 0x18, 0x2a84);
9702         MP_WritePhyUshort(sc, 0x19, 0xfc00);
9703         MP_WritePhyUshort(sc, 0x18, 0x2a94);
9704         MP_WritePhyUshort(sc, 0x19, 0xe000);
9705         MP_WritePhyUshort(sc, 0x18, 0x2aa4);
9706         MP_WritePhyUshort(sc, 0x19, 0x7400);
9707         MP_WritePhyUshort(sc, 0x18, 0x2ab4);
9708         MP_WritePhyUshort(sc, 0x19, 0x4000);
9709         MP_WritePhyUshort(sc, 0x18, 0x2ac4);
9710         MP_WritePhyUshort(sc, 0x19, 0x7f00);
9711         MP_WritePhyUshort(sc, 0x18, 0x2ad4);
9712         MP_WritePhyUshort(sc, 0x19, 0x0100);
9713         MP_WritePhyUshort(sc, 0x18, 0x2ae4);
9714         MP_WritePhyUshort(sc, 0x19, 0xff00);
9715         MP_WritePhyUshort(sc, 0x18, 0x2af4);
9716         MP_WritePhyUshort(sc, 0x19, 0x0000);
9717         MP_WritePhyUshort(sc, 0x18, 0x2b04);
9718         MP_WritePhyUshort(sc, 0x19, 0x4400);
9719         MP_WritePhyUshort(sc, 0x18, 0x2b14);
9720         MP_WritePhyUshort(sc, 0x19, 0xfc00);
9721         MP_WritePhyUshort(sc, 0x18, 0x2b24);
9722         MP_WritePhyUshort(sc, 0x19, 0x0000);
9723         MP_WritePhyUshort(sc, 0x18, 0x2b34);
9724         MP_WritePhyUshort(sc, 0x19, 0x4000);
9725         MP_WritePhyUshort(sc, 0x18, 0x2b44);
9726         MP_WritePhyUshort(sc, 0x19, 0x9d00);
9727         MP_WritePhyUshort(sc, 0x18, 0x2b54);
9728         MP_WritePhyUshort(sc, 0x19, 0xff00);
9729         MP_WritePhyUshort(sc, 0x18, 0x2b64);
9730         MP_WritePhyUshort(sc, 0x19, 0x4000);
9731         MP_WritePhyUshort(sc, 0x18, 0x2b74);
9732         MP_WritePhyUshort(sc, 0x19, 0x7f00);
9733         MP_WritePhyUshort(sc, 0x18, 0x2b84);
9734         MP_WritePhyUshort(sc, 0x19, 0x0000);
9735         MP_WritePhyUshort(sc, 0x18, 0x2b94);
9736         MP_WritePhyUshort(sc, 0x19, 0xff00);
9737         MP_WritePhyUshort(sc, 0x18, 0x2ba4);
9738         MP_WritePhyUshort(sc, 0x19, 0x0000);
9739         MP_WritePhyUshort(sc, 0x18, 0x2bb4);
9740         MP_WritePhyUshort(sc, 0x19, 0xfc00);
9741         MP_WritePhyUshort(sc, 0x18, 0x2bc4);
9742         MP_WritePhyUshort(sc, 0x19, 0xff00);
9743         MP_WritePhyUshort(sc, 0x18, 0x2bd4);
9744         MP_WritePhyUshort(sc, 0x19, 0x0000);
9745         MP_WritePhyUshort(sc, 0x18, 0x2be4);
9746         MP_WritePhyUshort(sc, 0x19, 0x4000);
9747         MP_WritePhyUshort(sc, 0x18, 0x2bf4);
9748         MP_WritePhyUshort(sc, 0x19, 0x8900);
9749         MP_WritePhyUshort(sc, 0x18, 0x2c04);
9750         MP_WritePhyUshort(sc, 0x19, 0x8300);
9751         MP_WritePhyUshort(sc, 0x18, 0x2c14);
9752         MP_WritePhyUshort(sc, 0x19, 0xe000);
9753         MP_WritePhyUshort(sc, 0x18, 0x2c24);
9754         MP_WritePhyUshort(sc, 0x19, 0x0000);
9755         MP_WritePhyUshort(sc, 0x18, 0x2c34);
9756         MP_WritePhyUshort(sc, 0x19, 0xac00);
9757         MP_WritePhyUshort(sc, 0x18, 0x2c44);
9758         MP_WritePhyUshort(sc, 0x19, 0x0800);
9759         MP_WritePhyUshort(sc, 0x18, 0x2c54);
9760         MP_WritePhyUshort(sc, 0x19, 0xfa00);
9761         MP_WritePhyUshort(sc, 0x18, 0x2c64);
9762         MP_WritePhyUshort(sc, 0x19, 0xe100);
9763         MP_WritePhyUshort(sc, 0x18, 0x2c74);
9764         MP_WritePhyUshort(sc, 0x19, 0x7f00);
9765         MP_WritePhyUshort(sc, 0x18, 0x0001);
9766         MP_WritePhyUshort(sc, 0x1f, 0x0000);
9767         MP_WritePhyUshort(sc, 0x17, 0x2100);
9768         MP_WritePhyUshort(sc, 0x1f, 0x0005);
9769         MP_WritePhyUshort(sc, 0x05, 0xfff6);
9770         MP_WritePhyUshort(sc, 0x06, 0x0080);
9771         MP_WritePhyUshort(sc, 0x05, 0x8b88);
9772         MP_WritePhyUshort(sc, 0x06, 0x0000);
9773         MP_WritePhyUshort(sc, 0x06, 0x0000);
9774         MP_WritePhyUshort(sc, 0x06, 0x0000);
9775         MP_WritePhyUshort(sc, 0x06, 0x0000);
9776         MP_WritePhyUshort(sc, 0x05, 0x8000);
9777         MP_WritePhyUshort(sc, 0x06, 0xd480);
9778         MP_WritePhyUshort(sc, 0x06, 0xc1e4);
9779         MP_WritePhyUshort(sc, 0x06, 0x8b9a);
9780         MP_WritePhyUshort(sc, 0x06, 0xe58b);
9781         MP_WritePhyUshort(sc, 0x06, 0x9bee);
9782         MP_WritePhyUshort(sc, 0x06, 0x8b83);
9783         MP_WritePhyUshort(sc, 0x06, 0x41bf);
9784         MP_WritePhyUshort(sc, 0x06, 0x8b88);
9785         MP_WritePhyUshort(sc, 0x06, 0xec00);
9786         MP_WritePhyUshort(sc, 0x06, 0x19a9);
9787         MP_WritePhyUshort(sc, 0x06, 0x8b90);
9788         MP_WritePhyUshort(sc, 0x06, 0xf9ee);
9789         MP_WritePhyUshort(sc, 0x06, 0xfff6);
9790         MP_WritePhyUshort(sc, 0x06, 0x00ee);
9791         MP_WritePhyUshort(sc, 0x06, 0xfff7);
9792         MP_WritePhyUshort(sc, 0x06, 0xffe0);
9793         MP_WritePhyUshort(sc, 0x06, 0xe140);
9794         MP_WritePhyUshort(sc, 0x06, 0xe1e1);
9795         MP_WritePhyUshort(sc, 0x06, 0x41f7);
9796         MP_WritePhyUshort(sc, 0x06, 0x2ff6);
9797         MP_WritePhyUshort(sc, 0x06, 0x28e4);
9798         MP_WritePhyUshort(sc, 0x06, 0xe140);
9799         MP_WritePhyUshort(sc, 0x06, 0xe5e1);
9800         MP_WritePhyUshort(sc, 0x06, 0x41f7);
9801         MP_WritePhyUshort(sc, 0x06, 0x0002);
9802         MP_WritePhyUshort(sc, 0x06, 0x020c);
9803         MP_WritePhyUshort(sc, 0x06, 0x0202);
9804         MP_WritePhyUshort(sc, 0x06, 0x1d02);
9805         MP_WritePhyUshort(sc, 0x06, 0x0230);
9806         MP_WritePhyUshort(sc, 0x06, 0x0202);
9807         MP_WritePhyUshort(sc, 0x06, 0x4002);
9808         MP_WritePhyUshort(sc, 0x06, 0x028b);
9809         MP_WritePhyUshort(sc, 0x06, 0x0280);
9810         MP_WritePhyUshort(sc, 0x06, 0x6c02);
9811         MP_WritePhyUshort(sc, 0x06, 0x8085);
9812         MP_WritePhyUshort(sc, 0x06, 0xe08b);
9813         MP_WritePhyUshort(sc, 0x06, 0x88e1);
9814         MP_WritePhyUshort(sc, 0x06, 0x8b89);
9815         MP_WritePhyUshort(sc, 0x06, 0x1e01);
9816         MP_WritePhyUshort(sc, 0x06, 0xe18b);
9817         MP_WritePhyUshort(sc, 0x06, 0x8a1e);
9818         MP_WritePhyUshort(sc, 0x06, 0x01e1);
9819         MP_WritePhyUshort(sc, 0x06, 0x8b8b);
9820         MP_WritePhyUshort(sc, 0x06, 0x1e01);
9821         MP_WritePhyUshort(sc, 0x06, 0xe18b);
9822         MP_WritePhyUshort(sc, 0x06, 0x8c1e);
9823         MP_WritePhyUshort(sc, 0x06, 0x01e1);
9824         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
9825         MP_WritePhyUshort(sc, 0x06, 0x1e01);
9826         MP_WritePhyUshort(sc, 0x06, 0xe18b);
9827         MP_WritePhyUshort(sc, 0x06, 0x8e1e);
9828         MP_WritePhyUshort(sc, 0x06, 0x01a0);
9829         MP_WritePhyUshort(sc, 0x06, 0x00c7);
9830         MP_WritePhyUshort(sc, 0x06, 0xaec3);
9831         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
9832         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
9833         MP_WritePhyUshort(sc, 0x06, 0xad20);
9834         MP_WritePhyUshort(sc, 0x06, 0x10ee);
9835         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
9836         MP_WritePhyUshort(sc, 0x06, 0x0002);
9837         MP_WritePhyUshort(sc, 0x06, 0x1310);
9838         MP_WritePhyUshort(sc, 0x06, 0x021f);
9839         MP_WritePhyUshort(sc, 0x06, 0x9d02);
9840         MP_WritePhyUshort(sc, 0x06, 0x1f0c);
9841         MP_WritePhyUshort(sc, 0x06, 0x0227);
9842         MP_WritePhyUshort(sc, 0x06, 0x49fc);
9843         MP_WritePhyUshort(sc, 0x06, 0x04f8);
9844         MP_WritePhyUshort(sc, 0x06, 0xe08b);
9845         MP_WritePhyUshort(sc, 0x06, 0x8ead);
9846         MP_WritePhyUshort(sc, 0x06, 0x200b);
9847         MP_WritePhyUshort(sc, 0x06, 0xf620);
9848         MP_WritePhyUshort(sc, 0x06, 0xe48b);
9849         MP_WritePhyUshort(sc, 0x06, 0x8e02);
9850         MP_WritePhyUshort(sc, 0x06, 0x830e);
9851         MP_WritePhyUshort(sc, 0x06, 0x021b);
9852         MP_WritePhyUshort(sc, 0x06, 0x67ad);
9853         MP_WritePhyUshort(sc, 0x06, 0x2211);
9854         MP_WritePhyUshort(sc, 0x06, 0xf622);
9855         MP_WritePhyUshort(sc, 0x06, 0xe48b);
9856         MP_WritePhyUshort(sc, 0x06, 0x8e02);
9857         MP_WritePhyUshort(sc, 0x06, 0x2ba5);
9858         MP_WritePhyUshort(sc, 0x06, 0x022a);
9859         MP_WritePhyUshort(sc, 0x06, 0x2402);
9860         MP_WritePhyUshort(sc, 0x06, 0x80c6);
9861         MP_WritePhyUshort(sc, 0x06, 0x022a);
9862         MP_WritePhyUshort(sc, 0x06, 0xf0ad);
9863         MP_WritePhyUshort(sc, 0x06, 0x2511);
9864         MP_WritePhyUshort(sc, 0x06, 0xf625);
9865         MP_WritePhyUshort(sc, 0x06, 0xe48b);
9866         MP_WritePhyUshort(sc, 0x06, 0x8e02);
9867         MP_WritePhyUshort(sc, 0x06, 0x8226);
9868         MP_WritePhyUshort(sc, 0x06, 0x0204);
9869         MP_WritePhyUshort(sc, 0x06, 0x0302);
9870         MP_WritePhyUshort(sc, 0x06, 0x19cc);
9871         MP_WritePhyUshort(sc, 0x06, 0x022b);
9872         MP_WritePhyUshort(sc, 0x06, 0x5bfc);
9873         MP_WritePhyUshort(sc, 0x06, 0x04ee);
9874         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
9875         MP_WritePhyUshort(sc, 0x06, 0x0105);
9876         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
9877         MP_WritePhyUshort(sc, 0x06, 0x8b83);
9878         MP_WritePhyUshort(sc, 0x06, 0xad24);
9879         MP_WritePhyUshort(sc, 0x06, 0x44e0);
9880         MP_WritePhyUshort(sc, 0x06, 0xe022);
9881         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
9882         MP_WritePhyUshort(sc, 0x06, 0x23ad);
9883         MP_WritePhyUshort(sc, 0x06, 0x223b);
9884         MP_WritePhyUshort(sc, 0x06, 0xe08a);
9885         MP_WritePhyUshort(sc, 0x06, 0xbea0);
9886         MP_WritePhyUshort(sc, 0x06, 0x0005);
9887         MP_WritePhyUshort(sc, 0x06, 0x0228);
9888         MP_WritePhyUshort(sc, 0x06, 0xdeae);
9889         MP_WritePhyUshort(sc, 0x06, 0x42a0);
9890         MP_WritePhyUshort(sc, 0x06, 0x0105);
9891         MP_WritePhyUshort(sc, 0x06, 0x0228);
9892         MP_WritePhyUshort(sc, 0x06, 0xf1ae);
9893         MP_WritePhyUshort(sc, 0x06, 0x3aa0);
9894         MP_WritePhyUshort(sc, 0x06, 0x0205);
9895         MP_WritePhyUshort(sc, 0x06, 0x0281);
9896         MP_WritePhyUshort(sc, 0x06, 0x25ae);
9897         MP_WritePhyUshort(sc, 0x06, 0x32a0);
9898         MP_WritePhyUshort(sc, 0x06, 0x0305);
9899         MP_WritePhyUshort(sc, 0x06, 0x0229);
9900         MP_WritePhyUshort(sc, 0x06, 0x9aae);
9901         MP_WritePhyUshort(sc, 0x06, 0x2aa0);
9902         MP_WritePhyUshort(sc, 0x06, 0x0405);
9903         MP_WritePhyUshort(sc, 0x06, 0x0229);
9904         MP_WritePhyUshort(sc, 0x06, 0xaeae);
9905         MP_WritePhyUshort(sc, 0x06, 0x22a0);
9906         MP_WritePhyUshort(sc, 0x06, 0x0505);
9907         MP_WritePhyUshort(sc, 0x06, 0x0229);
9908         MP_WritePhyUshort(sc, 0x06, 0xd7ae);
9909         MP_WritePhyUshort(sc, 0x06, 0x1aa0);
9910         MP_WritePhyUshort(sc, 0x06, 0x0605);
9911         MP_WritePhyUshort(sc, 0x06, 0x0229);
9912         MP_WritePhyUshort(sc, 0x06, 0xfeae);
9913         MP_WritePhyUshort(sc, 0x06, 0x12ee);
9914         MP_WritePhyUshort(sc, 0x06, 0x8ac0);
9915         MP_WritePhyUshort(sc, 0x06, 0x00ee);
9916         MP_WritePhyUshort(sc, 0x06, 0x8ac1);
9917         MP_WritePhyUshort(sc, 0x06, 0x00ee);
9918         MP_WritePhyUshort(sc, 0x06, 0x8ac6);
9919         MP_WritePhyUshort(sc, 0x06, 0x00ee);
9920         MP_WritePhyUshort(sc, 0x06, 0x8abe);
9921         MP_WritePhyUshort(sc, 0x06, 0x00ae);
9922         MP_WritePhyUshort(sc, 0x06, 0x00fc);
9923         MP_WritePhyUshort(sc, 0x06, 0x04f8);
9924         MP_WritePhyUshort(sc, 0x06, 0x022a);
9925         MP_WritePhyUshort(sc, 0x06, 0x67e0);
9926         MP_WritePhyUshort(sc, 0x06, 0xe022);
9927         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
9928         MP_WritePhyUshort(sc, 0x06, 0x230d);
9929         MP_WritePhyUshort(sc, 0x06, 0x0658);
9930         MP_WritePhyUshort(sc, 0x06, 0x03a0);
9931         MP_WritePhyUshort(sc, 0x06, 0x0202);
9932         MP_WritePhyUshort(sc, 0x06, 0xae2d);
9933         MP_WritePhyUshort(sc, 0x06, 0xa001);
9934         MP_WritePhyUshort(sc, 0x06, 0x02ae);
9935         MP_WritePhyUshort(sc, 0x06, 0x2da0);
9936         MP_WritePhyUshort(sc, 0x06, 0x004d);
9937         MP_WritePhyUshort(sc, 0x06, 0xe0e2);
9938         MP_WritePhyUshort(sc, 0x06, 0x00e1);
9939         MP_WritePhyUshort(sc, 0x06, 0xe201);
9940         MP_WritePhyUshort(sc, 0x06, 0xad24);
9941         MP_WritePhyUshort(sc, 0x06, 0x44e0);
9942         MP_WritePhyUshort(sc, 0x06, 0x8ac2);
9943         MP_WritePhyUshort(sc, 0x06, 0xe48a);
9944         MP_WritePhyUshort(sc, 0x06, 0xc4e0);
9945         MP_WritePhyUshort(sc, 0x06, 0x8ac3);
9946         MP_WritePhyUshort(sc, 0x06, 0xe48a);
9947         MP_WritePhyUshort(sc, 0x06, 0xc5ee);
9948         MP_WritePhyUshort(sc, 0x06, 0x8abe);
9949         MP_WritePhyUshort(sc, 0x06, 0x03e0);
9950         MP_WritePhyUshort(sc, 0x06, 0x8b83);
9951         MP_WritePhyUshort(sc, 0x06, 0xad25);
9952         MP_WritePhyUshort(sc, 0x06, 0x3aee);
9953         MP_WritePhyUshort(sc, 0x06, 0x8abe);
9954         MP_WritePhyUshort(sc, 0x06, 0x05ae);
9955         MP_WritePhyUshort(sc, 0x06, 0x34e0);
9956         MP_WritePhyUshort(sc, 0x06, 0x8ace);
9957         MP_WritePhyUshort(sc, 0x06, 0xae03);
9958         MP_WritePhyUshort(sc, 0x06, 0xe08a);
9959         MP_WritePhyUshort(sc, 0x06, 0xcfe1);
9960         MP_WritePhyUshort(sc, 0x06, 0x8ac2);
9961         MP_WritePhyUshort(sc, 0x06, 0x4905);
9962         MP_WritePhyUshort(sc, 0x06, 0xe58a);
9963         MP_WritePhyUshort(sc, 0x06, 0xc4e1);
9964         MP_WritePhyUshort(sc, 0x06, 0x8ac3);
9965         MP_WritePhyUshort(sc, 0x06, 0x4905);
9966         MP_WritePhyUshort(sc, 0x06, 0xe58a);
9967         MP_WritePhyUshort(sc, 0x06, 0xc5ee);
9968         MP_WritePhyUshort(sc, 0x06, 0x8abe);
9969         MP_WritePhyUshort(sc, 0x06, 0x0502);
9970         MP_WritePhyUshort(sc, 0x06, 0x2ab6);
9971         MP_WritePhyUshort(sc, 0x06, 0xac20);
9972         MP_WritePhyUshort(sc, 0x06, 0x1202);
9973         MP_WritePhyUshort(sc, 0x06, 0x819b);
9974         MP_WritePhyUshort(sc, 0x06, 0xac20);
9975         MP_WritePhyUshort(sc, 0x06, 0x0cee);
9976         MP_WritePhyUshort(sc, 0x06, 0x8ac1);
9977         MP_WritePhyUshort(sc, 0x06, 0x00ee);
9978         MP_WritePhyUshort(sc, 0x06, 0x8ac6);
9979         MP_WritePhyUshort(sc, 0x06, 0x00ee);
9980         MP_WritePhyUshort(sc, 0x06, 0x8abe);
9981         MP_WritePhyUshort(sc, 0x06, 0x02fc);
9982         MP_WritePhyUshort(sc, 0x06, 0x04d0);
9983         MP_WritePhyUshort(sc, 0x06, 0x0002);
9984         MP_WritePhyUshort(sc, 0x06, 0x81ad);
9985         MP_WritePhyUshort(sc, 0x06, 0x590f);
9986         MP_WritePhyUshort(sc, 0x06, 0x3902);
9987         MP_WritePhyUshort(sc, 0x06, 0xaa04);
9988         MP_WritePhyUshort(sc, 0x06, 0xd001);
9989         MP_WritePhyUshort(sc, 0x06, 0xae02);
9990         MP_WritePhyUshort(sc, 0x06, 0xd000);
9991         MP_WritePhyUshort(sc, 0x06, 0x04f9);
9992         MP_WritePhyUshort(sc, 0x06, 0xfae2);
9993         MP_WritePhyUshort(sc, 0x06, 0xe2d2);
9994         MP_WritePhyUshort(sc, 0x06, 0xe3e2);
9995         MP_WritePhyUshort(sc, 0x06, 0xd3f9);
9996         MP_WritePhyUshort(sc, 0x06, 0x5af7);
9997         MP_WritePhyUshort(sc, 0x06, 0xe6e2);
9998         MP_WritePhyUshort(sc, 0x06, 0xd2e7);
9999         MP_WritePhyUshort(sc, 0x06, 0xe2d3);
10000         MP_WritePhyUshort(sc, 0x06, 0xe2e0);
10001         MP_WritePhyUshort(sc, 0x06, 0x2ce3);
10002         MP_WritePhyUshort(sc, 0x06, 0xe02d);
10003         MP_WritePhyUshort(sc, 0x06, 0xf95b);
10004         MP_WritePhyUshort(sc, 0x06, 0xe01e);
10005         MP_WritePhyUshort(sc, 0x06, 0x30e6);
10006         MP_WritePhyUshort(sc, 0x06, 0xe02c);
10007         MP_WritePhyUshort(sc, 0x06, 0xe7e0);
10008         MP_WritePhyUshort(sc, 0x06, 0x2de2);
10009         MP_WritePhyUshort(sc, 0x06, 0xe2cc);
10010         MP_WritePhyUshort(sc, 0x06, 0xe3e2);
10011         MP_WritePhyUshort(sc, 0x06, 0xcdf9);
10012         MP_WritePhyUshort(sc, 0x06, 0x5a0f);
10013         MP_WritePhyUshort(sc, 0x06, 0x6a50);
10014         MP_WritePhyUshort(sc, 0x06, 0xe6e2);
10015         MP_WritePhyUshort(sc, 0x06, 0xcce7);
10016         MP_WritePhyUshort(sc, 0x06, 0xe2cd);
10017         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
10018         MP_WritePhyUshort(sc, 0x06, 0x3ce1);
10019         MP_WritePhyUshort(sc, 0x06, 0xe03d);
10020         MP_WritePhyUshort(sc, 0x06, 0xef64);
10021         MP_WritePhyUshort(sc, 0x06, 0xfde0);
10022         MP_WritePhyUshort(sc, 0x06, 0xe2cc);
10023         MP_WritePhyUshort(sc, 0x06, 0xe1e2);
10024         MP_WritePhyUshort(sc, 0x06, 0xcd58);
10025         MP_WritePhyUshort(sc, 0x06, 0x0f5a);
10026         MP_WritePhyUshort(sc, 0x06, 0xf01e);
10027         MP_WritePhyUshort(sc, 0x06, 0x02e4);
10028         MP_WritePhyUshort(sc, 0x06, 0xe2cc);
10029         MP_WritePhyUshort(sc, 0x06, 0xe5e2);
10030         MP_WritePhyUshort(sc, 0x06, 0xcdfd);
10031         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
10032         MP_WritePhyUshort(sc, 0x06, 0x2ce1);
10033         MP_WritePhyUshort(sc, 0x06, 0xe02d);
10034         MP_WritePhyUshort(sc, 0x06, 0x59e0);
10035         MP_WritePhyUshort(sc, 0x06, 0x5b1f);
10036         MP_WritePhyUshort(sc, 0x06, 0x1e13);
10037         MP_WritePhyUshort(sc, 0x06, 0xe4e0);
10038         MP_WritePhyUshort(sc, 0x06, 0x2ce5);
10039         MP_WritePhyUshort(sc, 0x06, 0xe02d);
10040         MP_WritePhyUshort(sc, 0x06, 0xfde0);
10041         MP_WritePhyUshort(sc, 0x06, 0xe2d2);
10042         MP_WritePhyUshort(sc, 0x06, 0xe1e2);
10043         MP_WritePhyUshort(sc, 0x06, 0xd358);
10044         MP_WritePhyUshort(sc, 0x06, 0xf75a);
10045         MP_WritePhyUshort(sc, 0x06, 0x081e);
10046         MP_WritePhyUshort(sc, 0x06, 0x02e4);
10047         MP_WritePhyUshort(sc, 0x06, 0xe2d2);
10048         MP_WritePhyUshort(sc, 0x06, 0xe5e2);
10049         MP_WritePhyUshort(sc, 0x06, 0xd3ef);
10050         MP_WritePhyUshort(sc, 0x06, 0x46fe);
10051         MP_WritePhyUshort(sc, 0x06, 0xfd04);
10052         MP_WritePhyUshort(sc, 0x06, 0xf8f9);
10053         MP_WritePhyUshort(sc, 0x06, 0xfaef);
10054         MP_WritePhyUshort(sc, 0x06, 0x69e0);
10055         MP_WritePhyUshort(sc, 0x06, 0xe022);
10056         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
10057         MP_WritePhyUshort(sc, 0x06, 0x2358);
10058         MP_WritePhyUshort(sc, 0x06, 0xc4e1);
10059         MP_WritePhyUshort(sc, 0x06, 0x8b6e);
10060         MP_WritePhyUshort(sc, 0x06, 0x1f10);
10061         MP_WritePhyUshort(sc, 0x06, 0x9e58);
10062         MP_WritePhyUshort(sc, 0x06, 0xe48b);
10063         MP_WritePhyUshort(sc, 0x06, 0x6ead);
10064         MP_WritePhyUshort(sc, 0x06, 0x2222);
10065         MP_WritePhyUshort(sc, 0x06, 0xac27);
10066         MP_WritePhyUshort(sc, 0x06, 0x55ac);
10067         MP_WritePhyUshort(sc, 0x06, 0x2602);
10068         MP_WritePhyUshort(sc, 0x06, 0xae1a);
10069         MP_WritePhyUshort(sc, 0x06, 0xd106);
10070         MP_WritePhyUshort(sc, 0x06, 0xbf3b);
10071         MP_WritePhyUshort(sc, 0x06, 0xba02);
10072         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
10073         MP_WritePhyUshort(sc, 0x06, 0xd107);
10074         MP_WritePhyUshort(sc, 0x06, 0xbf3b);
10075         MP_WritePhyUshort(sc, 0x06, 0xbd02);
10076         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
10077         MP_WritePhyUshort(sc, 0x06, 0xd107);
10078         MP_WritePhyUshort(sc, 0x06, 0xbf3b);
10079         MP_WritePhyUshort(sc, 0x06, 0xc002);
10080         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
10081         MP_WritePhyUshort(sc, 0x06, 0xae30);
10082         MP_WritePhyUshort(sc, 0x06, 0xd103);
10083         MP_WritePhyUshort(sc, 0x06, 0xbf3b);
10084         MP_WritePhyUshort(sc, 0x06, 0xc302);
10085         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
10086         MP_WritePhyUshort(sc, 0x06, 0xd100);
10087         MP_WritePhyUshort(sc, 0x06, 0xbf3b);
10088         MP_WritePhyUshort(sc, 0x06, 0xc602);
10089         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
10090         MP_WritePhyUshort(sc, 0x06, 0xd100);
10091         MP_WritePhyUshort(sc, 0x06, 0xbf82);
10092         MP_WritePhyUshort(sc, 0x06, 0xca02);
10093         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
10094         MP_WritePhyUshort(sc, 0x06, 0xd10f);
10095         MP_WritePhyUshort(sc, 0x06, 0xbf3b);
10096         MP_WritePhyUshort(sc, 0x06, 0xba02);
10097         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
10098         MP_WritePhyUshort(sc, 0x06, 0xd101);
10099         MP_WritePhyUshort(sc, 0x06, 0xbf3b);
10100         MP_WritePhyUshort(sc, 0x06, 0xbd02);
10101         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
10102         MP_WritePhyUshort(sc, 0x06, 0xd101);
10103         MP_WritePhyUshort(sc, 0x06, 0xbf3b);
10104         MP_WritePhyUshort(sc, 0x06, 0xc002);
10105         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
10106         MP_WritePhyUshort(sc, 0x06, 0xef96);
10107         MP_WritePhyUshort(sc, 0x06, 0xfefd);
10108         MP_WritePhyUshort(sc, 0x06, 0xfc04);
10109         MP_WritePhyUshort(sc, 0x06, 0xd100);
10110         MP_WritePhyUshort(sc, 0x06, 0xbf3b);
10111         MP_WritePhyUshort(sc, 0x06, 0xc302);
10112         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
10113         MP_WritePhyUshort(sc, 0x06, 0xd011);
10114         MP_WritePhyUshort(sc, 0x06, 0x022b);
10115         MP_WritePhyUshort(sc, 0x06, 0xfb59);
10116         MP_WritePhyUshort(sc, 0x06, 0x03ef);
10117         MP_WritePhyUshort(sc, 0x06, 0x01d1);
10118         MP_WritePhyUshort(sc, 0x06, 0x00a0);
10119         MP_WritePhyUshort(sc, 0x06, 0x0002);
10120         MP_WritePhyUshort(sc, 0x06, 0xd101);
10121         MP_WritePhyUshort(sc, 0x06, 0xbf3b);
10122         MP_WritePhyUshort(sc, 0x06, 0xc602);
10123         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
10124         MP_WritePhyUshort(sc, 0x06, 0xd111);
10125         MP_WritePhyUshort(sc, 0x06, 0xad20);
10126         MP_WritePhyUshort(sc, 0x06, 0x020c);
10127         MP_WritePhyUshort(sc, 0x06, 0x11ad);
10128         MP_WritePhyUshort(sc, 0x06, 0x2102);
10129         MP_WritePhyUshort(sc, 0x06, 0x0c12);
10130         MP_WritePhyUshort(sc, 0x06, 0xbf82);
10131         MP_WritePhyUshort(sc, 0x06, 0xca02);
10132         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
10133         MP_WritePhyUshort(sc, 0x06, 0xaec8);
10134         MP_WritePhyUshort(sc, 0x06, 0x70e4);
10135         MP_WritePhyUshort(sc, 0x06, 0x2602);
10136         MP_WritePhyUshort(sc, 0x06, 0x82d1);
10137         MP_WritePhyUshort(sc, 0x06, 0x05f8);
10138         MP_WritePhyUshort(sc, 0x06, 0xfaef);
10139         MP_WritePhyUshort(sc, 0x06, 0x69e0);
10140         MP_WritePhyUshort(sc, 0x06, 0xe2fe);
10141         MP_WritePhyUshort(sc, 0x06, 0xe1e2);
10142         MP_WritePhyUshort(sc, 0x06, 0xffad);
10143         MP_WritePhyUshort(sc, 0x06, 0x2d1a);
10144         MP_WritePhyUshort(sc, 0x06, 0xe0e1);
10145         MP_WritePhyUshort(sc, 0x06, 0x4ee1);
10146         MP_WritePhyUshort(sc, 0x06, 0xe14f);
10147         MP_WritePhyUshort(sc, 0x06, 0xac2d);
10148         MP_WritePhyUshort(sc, 0x06, 0x22f6);
10149         MP_WritePhyUshort(sc, 0x06, 0x0302);
10150         MP_WritePhyUshort(sc, 0x06, 0x033b);
10151         MP_WritePhyUshort(sc, 0x06, 0xf703);
10152         MP_WritePhyUshort(sc, 0x06, 0xf706);
10153         MP_WritePhyUshort(sc, 0x06, 0xbf84);
10154         MP_WritePhyUshort(sc, 0x06, 0x4402);
10155         MP_WritePhyUshort(sc, 0x06, 0x2d21);
10156         MP_WritePhyUshort(sc, 0x06, 0xae11);
10157         MP_WritePhyUshort(sc, 0x06, 0xe0e1);
10158         MP_WritePhyUshort(sc, 0x06, 0x4ee1);
10159         MP_WritePhyUshort(sc, 0x06, 0xe14f);
10160         MP_WritePhyUshort(sc, 0x06, 0xad2d);
10161         MP_WritePhyUshort(sc, 0x06, 0x08bf);
10162         MP_WritePhyUshort(sc, 0x06, 0x844f);
10163         MP_WritePhyUshort(sc, 0x06, 0x022d);
10164         MP_WritePhyUshort(sc, 0x06, 0x21f6);
10165         MP_WritePhyUshort(sc, 0x06, 0x06ef);
10166         MP_WritePhyUshort(sc, 0x06, 0x96fe);
10167         MP_WritePhyUshort(sc, 0x06, 0xfc04);
10168         MP_WritePhyUshort(sc, 0x06, 0xf8fa);
10169         MP_WritePhyUshort(sc, 0x06, 0xef69);
10170         MP_WritePhyUshort(sc, 0x06, 0x0283);
10171         MP_WritePhyUshort(sc, 0x06, 0x4502);
10172         MP_WritePhyUshort(sc, 0x06, 0x83a2);
10173         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
10174         MP_WritePhyUshort(sc, 0x06, 0x00e1);
10175         MP_WritePhyUshort(sc, 0x06, 0xe001);
10176         MP_WritePhyUshort(sc, 0x06, 0xad27);
10177         MP_WritePhyUshort(sc, 0x06, 0x1fd1);
10178         MP_WritePhyUshort(sc, 0x06, 0x01bf);
10179         MP_WritePhyUshort(sc, 0x06, 0x843b);
10180         MP_WritePhyUshort(sc, 0x06, 0x022d);
10181         MP_WritePhyUshort(sc, 0x06, 0xc1e0);
10182         MP_WritePhyUshort(sc, 0x06, 0xe020);
10183         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
10184         MP_WritePhyUshort(sc, 0x06, 0x21ad);
10185         MP_WritePhyUshort(sc, 0x06, 0x200e);
10186         MP_WritePhyUshort(sc, 0x06, 0xd100);
10187         MP_WritePhyUshort(sc, 0x06, 0xbf84);
10188         MP_WritePhyUshort(sc, 0x06, 0x3b02);
10189         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
10190         MP_WritePhyUshort(sc, 0x06, 0xbf3b);
10191         MP_WritePhyUshort(sc, 0x06, 0x9602);
10192         MP_WritePhyUshort(sc, 0x06, 0x2d21);
10193         MP_WritePhyUshort(sc, 0x06, 0xef96);
10194         MP_WritePhyUshort(sc, 0x06, 0xfefc);
10195         MP_WritePhyUshort(sc, 0x06, 0x04f8);
10196         MP_WritePhyUshort(sc, 0x06, 0xf9fa);
10197         MP_WritePhyUshort(sc, 0x06, 0xef69);
10198         MP_WritePhyUshort(sc, 0x06, 0xe08b);
10199         MP_WritePhyUshort(sc, 0x06, 0x87ad);
10200         MP_WritePhyUshort(sc, 0x06, 0x204c);
10201         MP_WritePhyUshort(sc, 0x06, 0xd200);
10202         MP_WritePhyUshort(sc, 0x06, 0xe0e2);
10203         MP_WritePhyUshort(sc, 0x06, 0x0058);
10204         MP_WritePhyUshort(sc, 0x06, 0x010c);
10205         MP_WritePhyUshort(sc, 0x06, 0x021e);
10206         MP_WritePhyUshort(sc, 0x06, 0x20e0);
10207         MP_WritePhyUshort(sc, 0x06, 0xe000);
10208         MP_WritePhyUshort(sc, 0x06, 0x5810);
10209         MP_WritePhyUshort(sc, 0x06, 0x1e20);
10210         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
10211         MP_WritePhyUshort(sc, 0x06, 0x3658);
10212         MP_WritePhyUshort(sc, 0x06, 0x031e);
10213         MP_WritePhyUshort(sc, 0x06, 0x20e0);
10214         MP_WritePhyUshort(sc, 0x06, 0xe022);
10215         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
10216         MP_WritePhyUshort(sc, 0x06, 0x2358);
10217         MP_WritePhyUshort(sc, 0x06, 0xe01e);
10218         MP_WritePhyUshort(sc, 0x06, 0x20e0);
10219         MP_WritePhyUshort(sc, 0x06, 0x8b64);
10220         MP_WritePhyUshort(sc, 0x06, 0x1f02);
10221         MP_WritePhyUshort(sc, 0x06, 0x9e22);
10222         MP_WritePhyUshort(sc, 0x06, 0xe68b);
10223         MP_WritePhyUshort(sc, 0x06, 0x64ad);
10224         MP_WritePhyUshort(sc, 0x06, 0x3214);
10225         MP_WritePhyUshort(sc, 0x06, 0xad34);
10226         MP_WritePhyUshort(sc, 0x06, 0x11ef);
10227         MP_WritePhyUshort(sc, 0x06, 0x0258);
10228         MP_WritePhyUshort(sc, 0x06, 0x039e);
10229         MP_WritePhyUshort(sc, 0x06, 0x07ad);
10230         MP_WritePhyUshort(sc, 0x06, 0x3508);
10231         MP_WritePhyUshort(sc, 0x06, 0x5ac0);
10232         MP_WritePhyUshort(sc, 0x06, 0x9f04);
10233         MP_WritePhyUshort(sc, 0x06, 0xd101);
10234         MP_WritePhyUshort(sc, 0x06, 0xae02);
10235         MP_WritePhyUshort(sc, 0x06, 0xd100);
10236         MP_WritePhyUshort(sc, 0x06, 0xbf84);
10237         MP_WritePhyUshort(sc, 0x06, 0x3e02);
10238         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
10239         MP_WritePhyUshort(sc, 0x06, 0xef96);
10240         MP_WritePhyUshort(sc, 0x06, 0xfefd);
10241         MP_WritePhyUshort(sc, 0x06, 0xfc04);
10242         MP_WritePhyUshort(sc, 0x06, 0xf8f9);
10243         MP_WritePhyUshort(sc, 0x06, 0xfbe0);
10244         MP_WritePhyUshort(sc, 0x06, 0x8b85);
10245         MP_WritePhyUshort(sc, 0x06, 0xad25);
10246         MP_WritePhyUshort(sc, 0x06, 0x22e0);
10247         MP_WritePhyUshort(sc, 0x06, 0xe022);
10248         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
10249         MP_WritePhyUshort(sc, 0x06, 0x23e2);
10250         MP_WritePhyUshort(sc, 0x06, 0xe036);
10251         MP_WritePhyUshort(sc, 0x06, 0xe3e0);
10252         MP_WritePhyUshort(sc, 0x06, 0x375a);
10253         MP_WritePhyUshort(sc, 0x06, 0xc40d);
10254         MP_WritePhyUshort(sc, 0x06, 0x0158);
10255         MP_WritePhyUshort(sc, 0x06, 0x021e);
10256         MP_WritePhyUshort(sc, 0x06, 0x20e3);
10257         MP_WritePhyUshort(sc, 0x06, 0x8ae7);
10258         MP_WritePhyUshort(sc, 0x06, 0xac31);
10259         MP_WritePhyUshort(sc, 0x06, 0x60ac);
10260         MP_WritePhyUshort(sc, 0x06, 0x3a08);
10261         MP_WritePhyUshort(sc, 0x06, 0xac3e);
10262         MP_WritePhyUshort(sc, 0x06, 0x26ae);
10263         MP_WritePhyUshort(sc, 0x06, 0x67af);
10264         MP_WritePhyUshort(sc, 0x06, 0x8437);
10265         MP_WritePhyUshort(sc, 0x06, 0xad37);
10266         MP_WritePhyUshort(sc, 0x06, 0x61e0);
10267         MP_WritePhyUshort(sc, 0x06, 0x8ae8);
10268         MP_WritePhyUshort(sc, 0x06, 0x10e4);
10269         MP_WritePhyUshort(sc, 0x06, 0x8ae8);
10270         MP_WritePhyUshort(sc, 0x06, 0xe18a);
10271         MP_WritePhyUshort(sc, 0x06, 0xe91b);
10272         MP_WritePhyUshort(sc, 0x06, 0x109e);
10273         MP_WritePhyUshort(sc, 0x06, 0x02ae);
10274         MP_WritePhyUshort(sc, 0x06, 0x51d1);
10275         MP_WritePhyUshort(sc, 0x06, 0x00bf);
10276         MP_WritePhyUshort(sc, 0x06, 0x8441);
10277         MP_WritePhyUshort(sc, 0x06, 0x022d);
10278         MP_WritePhyUshort(sc, 0x06, 0xc1ee);
10279         MP_WritePhyUshort(sc, 0x06, 0x8ae8);
10280         MP_WritePhyUshort(sc, 0x06, 0x00ae);
10281         MP_WritePhyUshort(sc, 0x06, 0x43ad);
10282         MP_WritePhyUshort(sc, 0x06, 0x3627);
10283         MP_WritePhyUshort(sc, 0x06, 0xe08a);
10284         MP_WritePhyUshort(sc, 0x06, 0xeee1);
10285         MP_WritePhyUshort(sc, 0x06, 0x8aef);
10286         MP_WritePhyUshort(sc, 0x06, 0xef74);
10287         MP_WritePhyUshort(sc, 0x06, 0xe08a);
10288         MP_WritePhyUshort(sc, 0x06, 0xeae1);
10289         MP_WritePhyUshort(sc, 0x06, 0x8aeb);
10290         MP_WritePhyUshort(sc, 0x06, 0x1b74);
10291         MP_WritePhyUshort(sc, 0x06, 0x9e2e);
10292         MP_WritePhyUshort(sc, 0x06, 0x14e4);
10293         MP_WritePhyUshort(sc, 0x06, 0x8aea);
10294         MP_WritePhyUshort(sc, 0x06, 0xe58a);
10295         MP_WritePhyUshort(sc, 0x06, 0xebef);
10296         MP_WritePhyUshort(sc, 0x06, 0x74e0);
10297         MP_WritePhyUshort(sc, 0x06, 0x8aee);
10298         MP_WritePhyUshort(sc, 0x06, 0xe18a);
10299         MP_WritePhyUshort(sc, 0x06, 0xef1b);
10300         MP_WritePhyUshort(sc, 0x06, 0x479e);
10301         MP_WritePhyUshort(sc, 0x06, 0x0fae);
10302         MP_WritePhyUshort(sc, 0x06, 0x19ee);
10303         MP_WritePhyUshort(sc, 0x06, 0x8aea);
10304         MP_WritePhyUshort(sc, 0x06, 0x00ee);
10305         MP_WritePhyUshort(sc, 0x06, 0x8aeb);
10306         MP_WritePhyUshort(sc, 0x06, 0x00ae);
10307         MP_WritePhyUshort(sc, 0x06, 0x0fac);
10308         MP_WritePhyUshort(sc, 0x06, 0x390c);
10309         MP_WritePhyUshort(sc, 0x06, 0xd101);
10310         MP_WritePhyUshort(sc, 0x06, 0xbf84);
10311         MP_WritePhyUshort(sc, 0x06, 0x4102);
10312         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
10313         MP_WritePhyUshort(sc, 0x06, 0xee8a);
10314         MP_WritePhyUshort(sc, 0x06, 0xe800);
10315         MP_WritePhyUshort(sc, 0x06, 0xe68a);
10316         MP_WritePhyUshort(sc, 0x06, 0xe7ff);
10317         MP_WritePhyUshort(sc, 0x06, 0xfdfc);
10318         MP_WritePhyUshort(sc, 0x06, 0x0400);
10319         MP_WritePhyUshort(sc, 0x06, 0xe234);
10320         MP_WritePhyUshort(sc, 0x06, 0xcce2);
10321         MP_WritePhyUshort(sc, 0x06, 0x0088);
10322         MP_WritePhyUshort(sc, 0x06, 0xe200);
10323         MP_WritePhyUshort(sc, 0x06, 0xa725);
10324         MP_WritePhyUshort(sc, 0x06, 0xe50a);
10325         MP_WritePhyUshort(sc, 0x06, 0x1de5);
10326         MP_WritePhyUshort(sc, 0x06, 0x0a2c);
10327         MP_WritePhyUshort(sc, 0x06, 0xe50a);
10328         MP_WritePhyUshort(sc, 0x06, 0x6de5);
10329         MP_WritePhyUshort(sc, 0x06, 0x0a1d);
10330         MP_WritePhyUshort(sc, 0x06, 0xe50a);
10331         MP_WritePhyUshort(sc, 0x06, 0x1ce5);
10332         MP_WritePhyUshort(sc, 0x06, 0x0a2d);
10333         MP_WritePhyUshort(sc, 0x06, 0xa755);
10334         MP_WritePhyUshort(sc, 0x05, 0x8b64);
10335         MP_WritePhyUshort(sc, 0x06, 0x0000);
10336         MP_WritePhyUshort(sc, 0x05, 0x8b94);
10337         MP_WritePhyUshort(sc, 0x06, 0x82cd);
10338         MP_WritePhyUshort(sc, 0x05, 0x8b85);
10339         MP_WritePhyUshort(sc, 0x06, 0x2000);
10340         MP_WritePhyUshort(sc, 0x05, 0x8aee);
10341         MP_WritePhyUshort(sc, 0x06, 0x03b8);
10342         MP_WritePhyUshort(sc, 0x05, 0x8ae8);
10343         MP_WritePhyUshort(sc, 0x06, 0x0002);
10344         PhyRegValue = MP_ReadPhyUshort(sc, 0x01);
10345         PhyRegValue |= BIT_0;
10346         MP_WritePhyUshort(sc, 0x01, PhyRegValue);
10347         PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
10348         PhyRegValue |= BIT_0;
10349         MP_WritePhyUshort(sc, 0x00, PhyRegValue);
10350         MP_WritePhyUshort(sc, 0x1f, 0x0);
10351         MP_WritePhyUshort(sc, 0x1f, 0x0005);
10352         for (i=0; i<200; i++) {
10353                 DELAY(100);
10354                 PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
10355                 if (PhyRegValue&0x0080)
10356                         break;
10357         }
10358         MP_WritePhyUshort(sc, 0x1f, 0x0007);
10359         MP_WritePhyUshort(sc, 0x1e, 0x0023);
10360         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
10361         PhyRegValue &= ~(BIT_0);
10362         if (sc->RequiredSecLanDonglePatch)
10363                 PhyRegValue &= ~(BIT_2);
10364         MP_WritePhyUshort(sc, 0x17, PhyRegValue);
10365         MP_WritePhyUshort(sc, 0x1f, 0x0007);
10366         MP_WritePhyUshort(sc, 0x1e, 0x0028);
10367         MP_WritePhyUshort(sc, 0x15, 0x0010);
10368         MP_WritePhyUshort(sc, 0x1f, 0x0007);
10369         MP_WritePhyUshort(sc, 0x1e, 0x0041);
10370         MP_WritePhyUshort(sc, 0x15, 0x0802);
10371         MP_WritePhyUshort(sc, 0x16, 0x2185);
10372         MP_WritePhyUshort(sc, 0x1f, 0x0000);
10373 }
10374 
10375 static void re_set_phy_mcu_8168e_2(struct re_softc *sc)
10376 {
10377         u_int16_t PhyRegValue;
10378         int	i;
10379 
10380         if (MP_ReadEfuse(sc, 0x22) == 0x0c) {
10381                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
10382                 MP_WritePhyUshort(sc, 0x00, 0x1800);
10383                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
10384                 MP_WritePhyUshort(sc, 0x1e, 0x0023);
10385                 MP_WritePhyUshort(sc, 0x17, 0x0117);
10386                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
10387                 MP_WritePhyUshort(sc, 0x1E, 0x002C);
10388                 MP_WritePhyUshort(sc, 0x1B, 0x5000);
10389                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
10390                 MP_WritePhyUshort(sc, 0x16, 0x4104);
10391                 for (i=0; i<200; i++) {
10392                         DELAY(100);
10393                         PhyRegValue = MP_ReadPhyUshort(sc, 0x1E);
10394                         PhyRegValue &= 0x03FF;
10395                         if (PhyRegValue== 0x000C)
10396                                 break;
10397                 }
10398                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
10399                 for (i=0; i<200; i++) {
10400                         DELAY(100);
10401                         PhyRegValue = MP_ReadPhyUshort(sc, 0x07);
10402                         if ((PhyRegValue&0x0020)==0)
10403                                 break;
10404                 }
10405                 PhyRegValue = MP_ReadPhyUshort(sc, 0x07);
10406                 if (PhyRegValue & 0x0020) {
10407                         MP_WritePhyUshort(sc, 0x1f, 0x0007);
10408                         MP_WritePhyUshort(sc, 0x1e, 0x00a1);
10409                         MP_WritePhyUshort(sc, 0x17, 0x1000);
10410                         MP_WritePhyUshort(sc, 0x17, 0x0000);
10411                         MP_WritePhyUshort(sc, 0x17, 0x2000);
10412                         MP_WritePhyUshort(sc, 0x1e, 0x002f);
10413                         MP_WritePhyUshort(sc, 0x18, 0x9bfb);
10414                         MP_WritePhyUshort(sc, 0x1f, 0x0005);
10415                         MP_WritePhyUshort(sc, 0x07, 0x0000);
10416                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
10417                 }
10418                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
10419                 MP_WritePhyUshort(sc, 0x05, 0xfff6);
10420                 MP_WritePhyUshort(sc, 0x06, 0x0080);
10421                 PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
10422                 PhyRegValue &= ~(BIT_7);
10423                 MP_WritePhyUshort(sc, 0x00, PhyRegValue);
10424                 MP_WritePhyUshort(sc, 0x1f, 0x0002);
10425                 PhyRegValue = MP_ReadPhyUshort(sc, 0x08);
10426                 PhyRegValue &= ~(BIT_7);
10427                 MP_WritePhyUshort(sc, 0x08, PhyRegValue);
10428                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
10429                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
10430                 MP_WritePhyUshort(sc, 0x1e, 0x0023);
10431                 MP_WritePhyUshort(sc, 0x16, 0x0306);
10432                 MP_WritePhyUshort(sc, 0x16, 0x0307);
10433                 MP_WritePhyUshort(sc, 0x15, 0x000e);
10434                 MP_WritePhyUshort(sc, 0x19, 0x000a);
10435                 MP_WritePhyUshort(sc, 0x15, 0x0010);
10436                 MP_WritePhyUshort(sc, 0x19, 0x0008);
10437                 MP_WritePhyUshort(sc, 0x15, 0x0018);
10438                 MP_WritePhyUshort(sc, 0x19, 0x4801);
10439                 MP_WritePhyUshort(sc, 0x15, 0x0019);
10440                 MP_WritePhyUshort(sc, 0x19, 0x6801);
10441                 MP_WritePhyUshort(sc, 0x15, 0x001a);
10442                 MP_WritePhyUshort(sc, 0x19, 0x66a1);
10443                 MP_WritePhyUshort(sc, 0x15, 0x001f);
10444                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10445                 MP_WritePhyUshort(sc, 0x15, 0x0020);
10446                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10447                 MP_WritePhyUshort(sc, 0x15, 0x0021);
10448                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10449                 MP_WritePhyUshort(sc, 0x15, 0x0022);
10450                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10451                 MP_WritePhyUshort(sc, 0x15, 0x0023);
10452                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10453                 MP_WritePhyUshort(sc, 0x15, 0x0024);
10454                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10455                 MP_WritePhyUshort(sc, 0x15, 0x0025);
10456                 MP_WritePhyUshort(sc, 0x19, 0x64a1);
10457                 MP_WritePhyUshort(sc, 0x15, 0x0026);
10458                 MP_WritePhyUshort(sc, 0x19, 0x40ea);
10459                 MP_WritePhyUshort(sc, 0x15, 0x0027);
10460                 MP_WritePhyUshort(sc, 0x19, 0x4503);
10461                 MP_WritePhyUshort(sc, 0x15, 0x0028);
10462                 MP_WritePhyUshort(sc, 0x19, 0x9f00);
10463                 MP_WritePhyUshort(sc, 0x15, 0x0029);
10464                 MP_WritePhyUshort(sc, 0x19, 0xa631);
10465                 MP_WritePhyUshort(sc, 0x15, 0x002a);
10466                 MP_WritePhyUshort(sc, 0x19, 0x9717);
10467                 MP_WritePhyUshort(sc, 0x15, 0x002b);
10468                 MP_WritePhyUshort(sc, 0x19, 0x302c);
10469                 MP_WritePhyUshort(sc, 0x15, 0x002c);
10470                 MP_WritePhyUshort(sc, 0x19, 0x4802);
10471                 MP_WritePhyUshort(sc, 0x15, 0x002d);
10472                 MP_WritePhyUshort(sc, 0x19, 0x58da);
10473                 MP_WritePhyUshort(sc, 0x15, 0x002e);
10474                 MP_WritePhyUshort(sc, 0x19, 0x400d);
10475                 MP_WritePhyUshort(sc, 0x15, 0x002f);
10476                 MP_WritePhyUshort(sc, 0x19, 0x4488);
10477                 MP_WritePhyUshort(sc, 0x15, 0x0030);
10478                 MP_WritePhyUshort(sc, 0x19, 0x9e00);
10479                 MP_WritePhyUshort(sc, 0x15, 0x0031);
10480                 MP_WritePhyUshort(sc, 0x19, 0x63c8);
10481                 MP_WritePhyUshort(sc, 0x15, 0x0032);
10482                 MP_WritePhyUshort(sc, 0x19, 0x6481);
10483                 MP_WritePhyUshort(sc, 0x15, 0x0033);
10484                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10485                 MP_WritePhyUshort(sc, 0x15, 0x0034);
10486                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10487                 MP_WritePhyUshort(sc, 0x15, 0x0035);
10488                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10489                 MP_WritePhyUshort(sc, 0x15, 0x0036);
10490                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10491                 MP_WritePhyUshort(sc, 0x15, 0x0037);
10492                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10493                 MP_WritePhyUshort(sc, 0x15, 0x0038);
10494                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10495                 MP_WritePhyUshort(sc, 0x15, 0x0039);
10496                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10497                 MP_WritePhyUshort(sc, 0x15, 0x003a);
10498                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10499                 MP_WritePhyUshort(sc, 0x15, 0x003b);
10500                 MP_WritePhyUshort(sc, 0x19, 0x63e8);
10501                 MP_WritePhyUshort(sc, 0x15, 0x003c);
10502                 MP_WritePhyUshort(sc, 0x19, 0x7d00);
10503                 MP_WritePhyUshort(sc, 0x15, 0x003d);
10504                 MP_WritePhyUshort(sc, 0x19, 0x59d4);
10505                 MP_WritePhyUshort(sc, 0x15, 0x003e);
10506                 MP_WritePhyUshort(sc, 0x19, 0x63f8);
10507                 MP_WritePhyUshort(sc, 0x15, 0x0040);
10508                 MP_WritePhyUshort(sc, 0x19, 0x64a1);
10509                 MP_WritePhyUshort(sc, 0x15, 0x0041);
10510                 MP_WritePhyUshort(sc, 0x19, 0x30de);
10511                 MP_WritePhyUshort(sc, 0x15, 0x0044);
10512                 MP_WritePhyUshort(sc, 0x19, 0x480f);
10513                 MP_WritePhyUshort(sc, 0x15, 0x0045);
10514                 MP_WritePhyUshort(sc, 0x19, 0x6800);
10515                 MP_WritePhyUshort(sc, 0x15, 0x0046);
10516                 MP_WritePhyUshort(sc, 0x19, 0x6680);
10517                 MP_WritePhyUshort(sc, 0x15, 0x0047);
10518                 MP_WritePhyUshort(sc, 0x19, 0x7c10);
10519                 MP_WritePhyUshort(sc, 0x15, 0x0048);
10520                 MP_WritePhyUshort(sc, 0x19, 0x63c8);
10521                 MP_WritePhyUshort(sc, 0x15, 0x0049);
10522                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10523                 MP_WritePhyUshort(sc, 0x15, 0x004a);
10524                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10525                 MP_WritePhyUshort(sc, 0x15, 0x004b);
10526                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10527                 MP_WritePhyUshort(sc, 0x15, 0x004c);
10528                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10529                 MP_WritePhyUshort(sc, 0x15, 0x004d);
10530                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10531                 MP_WritePhyUshort(sc, 0x15, 0x004e);
10532                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10533                 MP_WritePhyUshort(sc, 0x15, 0x004f);
10534                 MP_WritePhyUshort(sc, 0x19, 0x40ea);
10535                 MP_WritePhyUshort(sc, 0x15, 0x0050);
10536                 MP_WritePhyUshort(sc, 0x19, 0x4503);
10537                 MP_WritePhyUshort(sc, 0x15, 0x0051);
10538                 MP_WritePhyUshort(sc, 0x19, 0x58ca);
10539                 MP_WritePhyUshort(sc, 0x15, 0x0052);
10540                 MP_WritePhyUshort(sc, 0x19, 0x63c8);
10541                 MP_WritePhyUshort(sc, 0x15, 0x0053);
10542                 MP_WritePhyUshort(sc, 0x19, 0x63d8);
10543                 MP_WritePhyUshort(sc, 0x15, 0x0054);
10544                 MP_WritePhyUshort(sc, 0x19, 0x66a0);
10545                 MP_WritePhyUshort(sc, 0x15, 0x0055);
10546                 MP_WritePhyUshort(sc, 0x19, 0x9f00);
10547                 MP_WritePhyUshort(sc, 0x15, 0x0056);
10548                 MP_WritePhyUshort(sc, 0x19, 0x3000);
10549                 MP_WritePhyUshort(sc, 0x15, 0x00a1);
10550                 MP_WritePhyUshort(sc, 0x19, 0x3044);
10551                 MP_WritePhyUshort(sc, 0x15, 0x00ab);
10552                 MP_WritePhyUshort(sc, 0x19, 0x5820);
10553                 MP_WritePhyUshort(sc, 0x15, 0x00ac);
10554                 MP_WritePhyUshort(sc, 0x19, 0x5e04);
10555                 MP_WritePhyUshort(sc, 0x15, 0x00ad);
10556                 MP_WritePhyUshort(sc, 0x19, 0xb60c);
10557                 MP_WritePhyUshort(sc, 0x15, 0x00af);
10558                 MP_WritePhyUshort(sc, 0x19, 0x000a);
10559                 MP_WritePhyUshort(sc, 0x15, 0x00b2);
10560                 MP_WritePhyUshort(sc, 0x19, 0x30b9);
10561                 MP_WritePhyUshort(sc, 0x15, 0x00b9);
10562                 MP_WritePhyUshort(sc, 0x19, 0x4408);
10563                 MP_WritePhyUshort(sc, 0x15, 0x00ba);
10564                 MP_WritePhyUshort(sc, 0x19, 0x480b);
10565                 MP_WritePhyUshort(sc, 0x15, 0x00bb);
10566                 MP_WritePhyUshort(sc, 0x19, 0x5e00);
10567                 MP_WritePhyUshort(sc, 0x15, 0x00bc);
10568                 MP_WritePhyUshort(sc, 0x19, 0x405f);
10569                 MP_WritePhyUshort(sc, 0x15, 0x00bd);
10570                 MP_WritePhyUshort(sc, 0x19, 0x4448);
10571                 MP_WritePhyUshort(sc, 0x15, 0x00be);
10572                 MP_WritePhyUshort(sc, 0x19, 0x4020);
10573                 MP_WritePhyUshort(sc, 0x15, 0x00bf);
10574                 MP_WritePhyUshort(sc, 0x19, 0x4468);
10575                 MP_WritePhyUshort(sc, 0x15, 0x00c0);
10576                 MP_WritePhyUshort(sc, 0x19, 0x9c02);
10577                 MP_WritePhyUshort(sc, 0x15, 0x00c1);
10578                 MP_WritePhyUshort(sc, 0x19, 0x58a0);
10579                 MP_WritePhyUshort(sc, 0x15, 0x00c2);
10580                 MP_WritePhyUshort(sc, 0x19, 0xb605);
10581                 MP_WritePhyUshort(sc, 0x15, 0x00c3);
10582                 MP_WritePhyUshort(sc, 0x19, 0xc0d3);
10583                 MP_WritePhyUshort(sc, 0x15, 0x00c4);
10584                 MP_WritePhyUshort(sc, 0x19, 0x00e6);
10585                 MP_WritePhyUshort(sc, 0x15, 0x00c5);
10586                 MP_WritePhyUshort(sc, 0x19, 0xdaec);
10587                 MP_WritePhyUshort(sc, 0x15, 0x00c6);
10588                 MP_WritePhyUshort(sc, 0x19, 0x00fa);
10589                 MP_WritePhyUshort(sc, 0x15, 0x00c7);
10590                 MP_WritePhyUshort(sc, 0x19, 0x9df9);
10591                 MP_WritePhyUshort(sc, 0x15, 0x0112);
10592                 MP_WritePhyUshort(sc, 0x19, 0x6421);
10593                 MP_WritePhyUshort(sc, 0x15, 0x0113);
10594                 MP_WritePhyUshort(sc, 0x19, 0x7c08);
10595                 MP_WritePhyUshort(sc, 0x15, 0x0114);
10596                 MP_WritePhyUshort(sc, 0x19, 0x63f0);
10597                 MP_WritePhyUshort(sc, 0x15, 0x0115);
10598                 MP_WritePhyUshort(sc, 0x19, 0x4003);
10599                 MP_WritePhyUshort(sc, 0x15, 0x0116);
10600                 MP_WritePhyUshort(sc, 0x19, 0x4418);
10601                 MP_WritePhyUshort(sc, 0x15, 0x0117);
10602                 MP_WritePhyUshort(sc, 0x19, 0x9b00);
10603                 MP_WritePhyUshort(sc, 0x15, 0x0118);
10604                 MP_WritePhyUshort(sc, 0x19, 0x6461);
10605                 MP_WritePhyUshort(sc, 0x15, 0x0119);
10606                 MP_WritePhyUshort(sc, 0x19, 0x64e1);
10607                 MP_WritePhyUshort(sc, 0x15, 0x011a);
10608                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10609                 MP_WritePhyUshort(sc, 0x15, 0x0150);
10610                 MP_WritePhyUshort(sc, 0x19, 0x7c80);
10611                 MP_WritePhyUshort(sc, 0x15, 0x0151);
10612                 MP_WritePhyUshort(sc, 0x19, 0x6461);
10613                 MP_WritePhyUshort(sc, 0x15, 0x0152);
10614                 MP_WritePhyUshort(sc, 0x19, 0x4003);
10615                 MP_WritePhyUshort(sc, 0x15, 0x0153);
10616                 MP_WritePhyUshort(sc, 0x19, 0x4540);
10617                 MP_WritePhyUshort(sc, 0x15, 0x0154);
10618                 MP_WritePhyUshort(sc, 0x19, 0x9f00);
10619                 MP_WritePhyUshort(sc, 0x15, 0x0155);
10620                 MP_WritePhyUshort(sc, 0x19, 0x9d00);
10621                 MP_WritePhyUshort(sc, 0x15, 0x0156);
10622                 MP_WritePhyUshort(sc, 0x19, 0x7c40);
10623                 MP_WritePhyUshort(sc, 0x15, 0x0157);
10624                 MP_WritePhyUshort(sc, 0x19, 0x6421);
10625                 MP_WritePhyUshort(sc, 0x15, 0x0158);
10626                 MP_WritePhyUshort(sc, 0x19, 0x7c80);
10627                 MP_WritePhyUshort(sc, 0x15, 0x0159);
10628                 MP_WritePhyUshort(sc, 0x19, 0x64a1);
10629                 MP_WritePhyUshort(sc, 0x15, 0x015a);
10630                 MP_WritePhyUshort(sc, 0x19, 0x30fe);
10631                 MP_WritePhyUshort(sc, 0x15, 0x029c);
10632                 MP_WritePhyUshort(sc, 0x19, 0x0070);
10633                 MP_WritePhyUshort(sc, 0x15, 0x02b2);
10634                 MP_WritePhyUshort(sc, 0x19, 0x005a);
10635                 MP_WritePhyUshort(sc, 0x15, 0x02bd);
10636                 MP_WritePhyUshort(sc, 0x19, 0xa522);
10637                 MP_WritePhyUshort(sc, 0x15, 0x02ce);
10638                 MP_WritePhyUshort(sc, 0x19, 0xb63e);
10639                 MP_WritePhyUshort(sc, 0x15, 0x02d9);
10640                 MP_WritePhyUshort(sc, 0x19, 0x32df);
10641                 MP_WritePhyUshort(sc, 0x15, 0x02df);
10642                 MP_WritePhyUshort(sc, 0x19, 0x4500);
10643                 MP_WritePhyUshort(sc, 0x15, 0x02e7);
10644                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10645                 MP_WritePhyUshort(sc, 0x15, 0x02f4);
10646                 MP_WritePhyUshort(sc, 0x19, 0xb618);
10647                 MP_WritePhyUshort(sc, 0x15, 0x02fb);
10648                 MP_WritePhyUshort(sc, 0x19, 0xb900);
10649                 MP_WritePhyUshort(sc, 0x15, 0x02fc);
10650                 MP_WritePhyUshort(sc, 0x19, 0x49b5);
10651                 MP_WritePhyUshort(sc, 0x15, 0x02fd);
10652                 MP_WritePhyUshort(sc, 0x19, 0x6812);
10653                 MP_WritePhyUshort(sc, 0x15, 0x02fe);
10654                 MP_WritePhyUshort(sc, 0x19, 0x66a0);
10655                 MP_WritePhyUshort(sc, 0x15, 0x02ff);
10656                 MP_WritePhyUshort(sc, 0x19, 0x9900);
10657                 MP_WritePhyUshort(sc, 0x15, 0x0300);
10658                 MP_WritePhyUshort(sc, 0x19, 0x64a0);
10659                 MP_WritePhyUshort(sc, 0x15, 0x0301);
10660                 MP_WritePhyUshort(sc, 0x19, 0x3316);
10661                 MP_WritePhyUshort(sc, 0x15, 0x0308);
10662                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10663                 MP_WritePhyUshort(sc, 0x15, 0x030c);
10664                 MP_WritePhyUshort(sc, 0x19, 0x3000);
10665                 MP_WritePhyUshort(sc, 0x15, 0x0312);
10666                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10667                 MP_WritePhyUshort(sc, 0x15, 0x0313);
10668                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10669                 MP_WritePhyUshort(sc, 0x15, 0x0314);
10670                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10671                 MP_WritePhyUshort(sc, 0x15, 0x0315);
10672                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10673                 MP_WritePhyUshort(sc, 0x15, 0x0316);
10674                 MP_WritePhyUshort(sc, 0x19, 0x49b5);
10675                 MP_WritePhyUshort(sc, 0x15, 0x0317);
10676                 MP_WritePhyUshort(sc, 0x19, 0x7d00);
10677                 MP_WritePhyUshort(sc, 0x15, 0x0318);
10678                 MP_WritePhyUshort(sc, 0x19, 0x4d00);
10679                 MP_WritePhyUshort(sc, 0x15, 0x0319);
10680                 MP_WritePhyUshort(sc, 0x19, 0x6810);
10681                 MP_WritePhyUshort(sc, 0x15, 0x031a);
10682                 MP_WritePhyUshort(sc, 0x19, 0x6c08);
10683                 MP_WritePhyUshort(sc, 0x15, 0x031b);
10684                 MP_WritePhyUshort(sc, 0x19, 0x4925);
10685                 MP_WritePhyUshort(sc, 0x15, 0x031c);
10686                 MP_WritePhyUshort(sc, 0x19, 0x403b);
10687                 MP_WritePhyUshort(sc, 0x15, 0x031d);
10688                 MP_WritePhyUshort(sc, 0x19, 0xa602);
10689                 MP_WritePhyUshort(sc, 0x15, 0x031e);
10690                 MP_WritePhyUshort(sc, 0x19, 0x402f);
10691                 MP_WritePhyUshort(sc, 0x15, 0x031f);
10692                 MP_WritePhyUshort(sc, 0x19, 0x4484);
10693                 MP_WritePhyUshort(sc, 0x15, 0x0320);
10694                 MP_WritePhyUshort(sc, 0x19, 0x40c8);
10695                 MP_WritePhyUshort(sc, 0x15, 0x0321);
10696                 MP_WritePhyUshort(sc, 0x19, 0x44c4);
10697                 MP_WritePhyUshort(sc, 0x15, 0x0322);
10698                 MP_WritePhyUshort(sc, 0x19, 0x404f);
10699                 MP_WritePhyUshort(sc, 0x15, 0x0323);
10700                 MP_WritePhyUshort(sc, 0x19, 0x44c8);
10701                 MP_WritePhyUshort(sc, 0x15, 0x0324);
10702                 MP_WritePhyUshort(sc, 0x19, 0xd64f);
10703                 MP_WritePhyUshort(sc, 0x15, 0x0325);
10704                 MP_WritePhyUshort(sc, 0x19, 0x00e7);
10705                 MP_WritePhyUshort(sc, 0x15, 0x0326);
10706                 MP_WritePhyUshort(sc, 0x19, 0x7c08);
10707                 MP_WritePhyUshort(sc, 0x15, 0x0327);
10708                 MP_WritePhyUshort(sc, 0x19, 0x8203);
10709                 MP_WritePhyUshort(sc, 0x15, 0x0328);
10710                 MP_WritePhyUshort(sc, 0x19, 0x4d48);
10711                 MP_WritePhyUshort(sc, 0x15, 0x0329);
10712                 MP_WritePhyUshort(sc, 0x19, 0x332b);
10713                 MP_WritePhyUshort(sc, 0x15, 0x032a);
10714                 MP_WritePhyUshort(sc, 0x19, 0x4d40);
10715                 MP_WritePhyUshort(sc, 0x15, 0x032c);
10716                 MP_WritePhyUshort(sc, 0x19, 0x00f8);
10717                 MP_WritePhyUshort(sc, 0x15, 0x032d);
10718                 MP_WritePhyUshort(sc, 0x19, 0x82b2);
10719                 MP_WritePhyUshort(sc, 0x15, 0x032f);
10720                 MP_WritePhyUshort(sc, 0x19, 0x00b0);
10721                 MP_WritePhyUshort(sc, 0x15, 0x0332);
10722                 MP_WritePhyUshort(sc, 0x19, 0x91f2);
10723                 MP_WritePhyUshort(sc, 0x15, 0x033f);
10724                 MP_WritePhyUshort(sc, 0x19, 0xb6cd);
10725                 MP_WritePhyUshort(sc, 0x15, 0x0340);
10726                 MP_WritePhyUshort(sc, 0x19, 0x9e01);
10727                 MP_WritePhyUshort(sc, 0x15, 0x0341);
10728                 MP_WritePhyUshort(sc, 0x19, 0xd11d);
10729                 MP_WritePhyUshort(sc, 0x15, 0x0342);
10730                 MP_WritePhyUshort(sc, 0x19, 0x009d);
10731                 MP_WritePhyUshort(sc, 0x15, 0x0343);
10732                 MP_WritePhyUshort(sc, 0x19, 0xbb1c);
10733                 MP_WritePhyUshort(sc, 0x15, 0x0344);
10734                 MP_WritePhyUshort(sc, 0x19, 0x8102);
10735                 MP_WritePhyUshort(sc, 0x15, 0x0345);
10736                 MP_WritePhyUshort(sc, 0x19, 0x3348);
10737                 MP_WritePhyUshort(sc, 0x15, 0x0346);
10738                 MP_WritePhyUshort(sc, 0x19, 0xa231);
10739                 MP_WritePhyUshort(sc, 0x15, 0x0347);
10740                 MP_WritePhyUshort(sc, 0x19, 0x335b);
10741                 MP_WritePhyUshort(sc, 0x15, 0x0348);
10742                 MP_WritePhyUshort(sc, 0x19, 0x91f7);
10743                 MP_WritePhyUshort(sc, 0x15, 0x0349);
10744                 MP_WritePhyUshort(sc, 0x19, 0xc218);
10745                 MP_WritePhyUshort(sc, 0x15, 0x034a);
10746                 MP_WritePhyUshort(sc, 0x19, 0x00f5);
10747                 MP_WritePhyUshort(sc, 0x15, 0x034b);
10748                 MP_WritePhyUshort(sc, 0x19, 0x335b);
10749                 MP_WritePhyUshort(sc, 0x15, 0x034c);
10750                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10751                 MP_WritePhyUshort(sc, 0x15, 0x034d);
10752                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10753                 MP_WritePhyUshort(sc, 0x15, 0x034e);
10754                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10755                 MP_WritePhyUshort(sc, 0x15, 0x034f);
10756                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10757                 MP_WritePhyUshort(sc, 0x15, 0x0350);
10758                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10759                 MP_WritePhyUshort(sc, 0x15, 0x035b);
10760                 MP_WritePhyUshort(sc, 0x19, 0xa23c);
10761                 MP_WritePhyUshort(sc, 0x15, 0x035c);
10762                 MP_WritePhyUshort(sc, 0x19, 0x7c08);
10763                 MP_WritePhyUshort(sc, 0x15, 0x035d);
10764                 MP_WritePhyUshort(sc, 0x19, 0x4c00);
10765                 MP_WritePhyUshort(sc, 0x15, 0x035e);
10766                 MP_WritePhyUshort(sc, 0x19, 0x3397);
10767                 MP_WritePhyUshort(sc, 0x15, 0x0363);
10768                 MP_WritePhyUshort(sc, 0x19, 0xb6a9);
10769                 MP_WritePhyUshort(sc, 0x15, 0x0366);
10770                 MP_WritePhyUshort(sc, 0x19, 0x00f5);
10771                 MP_WritePhyUshort(sc, 0x15, 0x0382);
10772                 MP_WritePhyUshort(sc, 0x19, 0x7c40);
10773                 MP_WritePhyUshort(sc, 0x15, 0x0388);
10774                 MP_WritePhyUshort(sc, 0x19, 0x0084);
10775                 MP_WritePhyUshort(sc, 0x15, 0x0389);
10776                 MP_WritePhyUshort(sc, 0x19, 0xdd17);
10777                 MP_WritePhyUshort(sc, 0x15, 0x038a);
10778                 MP_WritePhyUshort(sc, 0x19, 0x000b);
10779                 MP_WritePhyUshort(sc, 0x15, 0x038b);
10780                 MP_WritePhyUshort(sc, 0x19, 0xa10a);
10781                 MP_WritePhyUshort(sc, 0x15, 0x038c);
10782                 MP_WritePhyUshort(sc, 0x19, 0x337e);
10783                 MP_WritePhyUshort(sc, 0x15, 0x038d);
10784                 MP_WritePhyUshort(sc, 0x19, 0x6c0b);
10785                 MP_WritePhyUshort(sc, 0x15, 0x038e);
10786                 MP_WritePhyUshort(sc, 0x19, 0xa107);
10787                 MP_WritePhyUshort(sc, 0x15, 0x038f);
10788                 MP_WritePhyUshort(sc, 0x19, 0x6c08);
10789                 MP_WritePhyUshort(sc, 0x15, 0x0390);
10790                 MP_WritePhyUshort(sc, 0x19, 0xc017);
10791                 MP_WritePhyUshort(sc, 0x15, 0x0391);
10792                 MP_WritePhyUshort(sc, 0x19, 0x0004);
10793                 MP_WritePhyUshort(sc, 0x15, 0x0392);
10794                 MP_WritePhyUshort(sc, 0x19, 0xd64f);
10795                 MP_WritePhyUshort(sc, 0x15, 0x0393);
10796                 MP_WritePhyUshort(sc, 0x19, 0x00f4);
10797                 MP_WritePhyUshort(sc, 0x15, 0x0397);
10798                 MP_WritePhyUshort(sc, 0x19, 0x4098);
10799                 MP_WritePhyUshort(sc, 0x15, 0x0398);
10800                 MP_WritePhyUshort(sc, 0x19, 0x4408);
10801                 MP_WritePhyUshort(sc, 0x15, 0x0399);
10802                 MP_WritePhyUshort(sc, 0x19, 0x55bf);
10803                 MP_WritePhyUshort(sc, 0x15, 0x039a);
10804                 MP_WritePhyUshort(sc, 0x19, 0x4bb9);
10805                 MP_WritePhyUshort(sc, 0x15, 0x039b);
10806                 MP_WritePhyUshort(sc, 0x19, 0x6810);
10807                 MP_WritePhyUshort(sc, 0x15, 0x039c);
10808                 MP_WritePhyUshort(sc, 0x19, 0x4b29);
10809                 MP_WritePhyUshort(sc, 0x15, 0x039d);
10810                 MP_WritePhyUshort(sc, 0x19, 0x4041);
10811                 MP_WritePhyUshort(sc, 0x15, 0x039e);
10812                 MP_WritePhyUshort(sc, 0x19, 0x442a);
10813                 MP_WritePhyUshort(sc, 0x15, 0x039f);
10814                 MP_WritePhyUshort(sc, 0x19, 0x4029);
10815                 MP_WritePhyUshort(sc, 0x15, 0x03aa);
10816                 MP_WritePhyUshort(sc, 0x19, 0x33b8);
10817                 MP_WritePhyUshort(sc, 0x15, 0x03b6);
10818                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10819                 MP_WritePhyUshort(sc, 0x15, 0x03b7);
10820                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10821                 MP_WritePhyUshort(sc, 0x15, 0x03b8);
10822                 MP_WritePhyUshort(sc, 0x19, 0x543f);
10823                 MP_WritePhyUshort(sc, 0x15, 0x03b9);
10824                 MP_WritePhyUshort(sc, 0x19, 0x499a);
10825                 MP_WritePhyUshort(sc, 0x15, 0x03ba);
10826                 MP_WritePhyUshort(sc, 0x19, 0x7c40);
10827                 MP_WritePhyUshort(sc, 0x15, 0x03bb);
10828                 MP_WritePhyUshort(sc, 0x19, 0x4c40);
10829                 MP_WritePhyUshort(sc, 0x15, 0x03bc);
10830                 MP_WritePhyUshort(sc, 0x19, 0x490a);
10831                 MP_WritePhyUshort(sc, 0x15, 0x03bd);
10832                 MP_WritePhyUshort(sc, 0x19, 0x405e);
10833                 MP_WritePhyUshort(sc, 0x15, 0x03c2);
10834                 MP_WritePhyUshort(sc, 0x19, 0x9a03);
10835                 MP_WritePhyUshort(sc, 0x15, 0x03c4);
10836                 MP_WritePhyUshort(sc, 0x19, 0x0015);
10837                 MP_WritePhyUshort(sc, 0x15, 0x03c5);
10838                 MP_WritePhyUshort(sc, 0x19, 0x9e03);
10839                 MP_WritePhyUshort(sc, 0x15, 0x03c8);
10840                 MP_WritePhyUshort(sc, 0x19, 0x9cf7);
10841                 MP_WritePhyUshort(sc, 0x15, 0x03c9);
10842                 MP_WritePhyUshort(sc, 0x19, 0x7c12);
10843                 MP_WritePhyUshort(sc, 0x15, 0x03ca);
10844                 MP_WritePhyUshort(sc, 0x19, 0x4c52);
10845                 MP_WritePhyUshort(sc, 0x15, 0x03cb);
10846                 MP_WritePhyUshort(sc, 0x19, 0x4458);
10847                 MP_WritePhyUshort(sc, 0x15, 0x03cd);
10848                 MP_WritePhyUshort(sc, 0x19, 0x4c40);
10849                 MP_WritePhyUshort(sc, 0x15, 0x03ce);
10850                 MP_WritePhyUshort(sc, 0x19, 0x33bf);
10851                 MP_WritePhyUshort(sc, 0x15, 0x03cf);
10852                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10853                 MP_WritePhyUshort(sc, 0x15, 0x03d0);
10854                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10855                 MP_WritePhyUshort(sc, 0x15, 0x03d1);
10856                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10857                 MP_WritePhyUshort(sc, 0x15, 0x03d5);
10858                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10859                 MP_WritePhyUshort(sc, 0x15, 0x03d6);
10860                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10861                 MP_WritePhyUshort(sc, 0x15, 0x03d7);
10862                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10863                 MP_WritePhyUshort(sc, 0x15, 0x03d8);
10864                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10865                 MP_WritePhyUshort(sc, 0x15, 0x03d9);
10866                 MP_WritePhyUshort(sc, 0x19, 0x49bb);
10867                 MP_WritePhyUshort(sc, 0x15, 0x03da);
10868                 MP_WritePhyUshort(sc, 0x19, 0x4478);
10869                 MP_WritePhyUshort(sc, 0x15, 0x03db);
10870                 MP_WritePhyUshort(sc, 0x19, 0x492b);
10871                 MP_WritePhyUshort(sc, 0x15, 0x03dc);
10872                 MP_WritePhyUshort(sc, 0x19, 0x7c01);
10873                 MP_WritePhyUshort(sc, 0x15, 0x03dd);
10874                 MP_WritePhyUshort(sc, 0x19, 0x4c00);
10875                 MP_WritePhyUshort(sc, 0x15, 0x03de);
10876                 MP_WritePhyUshort(sc, 0x19, 0xbd1a);
10877                 MP_WritePhyUshort(sc, 0x15, 0x03df);
10878                 MP_WritePhyUshort(sc, 0x19, 0xc428);
10879                 MP_WritePhyUshort(sc, 0x15, 0x03e0);
10880                 MP_WritePhyUshort(sc, 0x19, 0x0008);
10881                 MP_WritePhyUshort(sc, 0x15, 0x03e1);
10882                 MP_WritePhyUshort(sc, 0x19, 0x9cfd);
10883                 MP_WritePhyUshort(sc, 0x15, 0x03e2);
10884                 MP_WritePhyUshort(sc, 0x19, 0x7c12);
10885                 MP_WritePhyUshort(sc, 0x15, 0x03e3);
10886                 MP_WritePhyUshort(sc, 0x19, 0x4c52);
10887                 MP_WritePhyUshort(sc, 0x15, 0x03e4);
10888                 MP_WritePhyUshort(sc, 0x19, 0x4458);
10889                 MP_WritePhyUshort(sc, 0x15, 0x03e5);
10890                 MP_WritePhyUshort(sc, 0x19, 0x7c12);
10891                 MP_WritePhyUshort(sc, 0x15, 0x03e6);
10892                 MP_WritePhyUshort(sc, 0x19, 0x4c40);
10893                 MP_WritePhyUshort(sc, 0x15, 0x03e7);
10894                 MP_WritePhyUshort(sc, 0x19, 0x33de);
10895                 MP_WritePhyUshort(sc, 0x15, 0x03e8);
10896                 MP_WritePhyUshort(sc, 0x19, 0xc218);
10897                 MP_WritePhyUshort(sc, 0x15, 0x03e9);
10898                 MP_WritePhyUshort(sc, 0x19, 0x0002);
10899                 MP_WritePhyUshort(sc, 0x15, 0x03ea);
10900                 MP_WritePhyUshort(sc, 0x19, 0x32df);
10901                 MP_WritePhyUshort(sc, 0x15, 0x03eb);
10902                 MP_WritePhyUshort(sc, 0x19, 0x3316);
10903                 MP_WritePhyUshort(sc, 0x15, 0x03ec);
10904                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10905                 MP_WritePhyUshort(sc, 0x15, 0x03ed);
10906                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10907                 MP_WritePhyUshort(sc, 0x15, 0x03ee);
10908                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10909                 MP_WritePhyUshort(sc, 0x15, 0x03ef);
10910                 MP_WritePhyUshort(sc, 0x19, 0x0000);
10911                 MP_WritePhyUshort(sc, 0x15, 0x03f7);
10912                 MP_WritePhyUshort(sc, 0x19, 0x330c);
10913                 MP_WritePhyUshort(sc, 0x16, 0x0306);
10914                 MP_WritePhyUshort(sc, 0x16, 0x0300);
10915                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
10916                 MP_WritePhyUshort(sc, 0x05, 0xfff6);
10917                 MP_WritePhyUshort(sc, 0x06, 0x0080);
10918                 MP_WritePhyUshort(sc, 0x05, 0x8000);
10919                 MP_WritePhyUshort(sc, 0x06, 0x0280);
10920                 MP_WritePhyUshort(sc, 0x06, 0x48f7);
10921                 MP_WritePhyUshort(sc, 0x06, 0x00e0);
10922                 MP_WritePhyUshort(sc, 0x06, 0xfff7);
10923                 MP_WritePhyUshort(sc, 0x06, 0xa080);
10924                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
10925                 MP_WritePhyUshort(sc, 0x06, 0xf602);
10926                 MP_WritePhyUshort(sc, 0x06, 0x0200);
10927                 MP_WritePhyUshort(sc, 0x06, 0x0280);
10928                 MP_WritePhyUshort(sc, 0x06, 0x9002);
10929                 MP_WritePhyUshort(sc, 0x06, 0x0224);
10930                 MP_WritePhyUshort(sc, 0x06, 0x0202);
10931                 MP_WritePhyUshort(sc, 0x06, 0x3402);
10932                 MP_WritePhyUshort(sc, 0x06, 0x027f);
10933                 MP_WritePhyUshort(sc, 0x06, 0x0280);
10934                 MP_WritePhyUshort(sc, 0x06, 0xa602);
10935                 MP_WritePhyUshort(sc, 0x06, 0x80bf);
10936                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
10937                 MP_WritePhyUshort(sc, 0x06, 0x88e1);
10938                 MP_WritePhyUshort(sc, 0x06, 0x8b89);
10939                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
10940                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
10941                 MP_WritePhyUshort(sc, 0x06, 0x8a1e);
10942                 MP_WritePhyUshort(sc, 0x06, 0x01e1);
10943                 MP_WritePhyUshort(sc, 0x06, 0x8b8b);
10944                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
10945                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
10946                 MP_WritePhyUshort(sc, 0x06, 0x8c1e);
10947                 MP_WritePhyUshort(sc, 0x06, 0x01e1);
10948                 MP_WritePhyUshort(sc, 0x06, 0x8b8d);
10949                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
10950                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
10951                 MP_WritePhyUshort(sc, 0x06, 0x8e1e);
10952                 MP_WritePhyUshort(sc, 0x06, 0x01a0);
10953                 MP_WritePhyUshort(sc, 0x06, 0x00c7);
10954                 MP_WritePhyUshort(sc, 0x06, 0xaebb);
10955                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
10956                 MP_WritePhyUshort(sc, 0x06, 0xe600);
10957                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
10958                 MP_WritePhyUshort(sc, 0x06, 0xee03);
10959                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
10960                 MP_WritePhyUshort(sc, 0x06, 0xefb8);
10961                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
10962                 MP_WritePhyUshort(sc, 0x06, 0xe902);
10963                 MP_WritePhyUshort(sc, 0x06, 0xee8b);
10964                 MP_WritePhyUshort(sc, 0x06, 0x8285);
10965                 MP_WritePhyUshort(sc, 0x06, 0xee8b);
10966                 MP_WritePhyUshort(sc, 0x06, 0x8520);
10967                 MP_WritePhyUshort(sc, 0x06, 0xee8b);
10968                 MP_WritePhyUshort(sc, 0x06, 0x8701);
10969                 MP_WritePhyUshort(sc, 0x06, 0xd481);
10970                 MP_WritePhyUshort(sc, 0x06, 0x35e4);
10971                 MP_WritePhyUshort(sc, 0x06, 0x8b94);
10972                 MP_WritePhyUshort(sc, 0x06, 0xe58b);
10973                 MP_WritePhyUshort(sc, 0x06, 0x95bf);
10974                 MP_WritePhyUshort(sc, 0x06, 0x8b88);
10975                 MP_WritePhyUshort(sc, 0x06, 0xec00);
10976                 MP_WritePhyUshort(sc, 0x06, 0x19a9);
10977                 MP_WritePhyUshort(sc, 0x06, 0x8b90);
10978                 MP_WritePhyUshort(sc, 0x06, 0xf9ee);
10979                 MP_WritePhyUshort(sc, 0x06, 0xfff6);
10980                 MP_WritePhyUshort(sc, 0x06, 0x00ee);
10981                 MP_WritePhyUshort(sc, 0x06, 0xfff7);
10982                 MP_WritePhyUshort(sc, 0x06, 0xffe0);
10983                 MP_WritePhyUshort(sc, 0x06, 0xe140);
10984                 MP_WritePhyUshort(sc, 0x06, 0xe1e1);
10985                 MP_WritePhyUshort(sc, 0x06, 0x41f7);
10986                 MP_WritePhyUshort(sc, 0x06, 0x2ff6);
10987                 MP_WritePhyUshort(sc, 0x06, 0x28e4);
10988                 MP_WritePhyUshort(sc, 0x06, 0xe140);
10989                 MP_WritePhyUshort(sc, 0x06, 0xe5e1);
10990                 MP_WritePhyUshort(sc, 0x06, 0x4104);
10991                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
10992                 MP_WritePhyUshort(sc, 0x06, 0x8b89);
10993                 MP_WritePhyUshort(sc, 0x06, 0xad20);
10994                 MP_WritePhyUshort(sc, 0x06, 0x0dee);
10995                 MP_WritePhyUshort(sc, 0x06, 0x8b89);
10996                 MP_WritePhyUshort(sc, 0x06, 0x0002);
10997                 MP_WritePhyUshort(sc, 0x06, 0x82f4);
10998                 MP_WritePhyUshort(sc, 0x06, 0x021f);
10999                 MP_WritePhyUshort(sc, 0x06, 0x4102);
11000                 MP_WritePhyUshort(sc, 0x06, 0x2812);
11001                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
11002                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
11003                 MP_WritePhyUshort(sc, 0x06, 0x8b8d);
11004                 MP_WritePhyUshort(sc, 0x06, 0xad20);
11005                 MP_WritePhyUshort(sc, 0x06, 0x10ee);
11006                 MP_WritePhyUshort(sc, 0x06, 0x8b8d);
11007                 MP_WritePhyUshort(sc, 0x06, 0x0002);
11008                 MP_WritePhyUshort(sc, 0x06, 0x139d);
11009                 MP_WritePhyUshort(sc, 0x06, 0x0281);
11010                 MP_WritePhyUshort(sc, 0x06, 0xd602);
11011                 MP_WritePhyUshort(sc, 0x06, 0x1f99);
11012                 MP_WritePhyUshort(sc, 0x06, 0x0227);
11013                 MP_WritePhyUshort(sc, 0x06, 0xeafc);
11014                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
11015                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
11016                 MP_WritePhyUshort(sc, 0x06, 0x8ead);
11017                 MP_WritePhyUshort(sc, 0x06, 0x2014);
11018                 MP_WritePhyUshort(sc, 0x06, 0xf620);
11019                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
11020                 MP_WritePhyUshort(sc, 0x06, 0x8e02);
11021                 MP_WritePhyUshort(sc, 0x06, 0x8104);
11022                 MP_WritePhyUshort(sc, 0x06, 0x021b);
11023                 MP_WritePhyUshort(sc, 0x06, 0xf402);
11024                 MP_WritePhyUshort(sc, 0x06, 0x2c9c);
11025                 MP_WritePhyUshort(sc, 0x06, 0x0281);
11026                 MP_WritePhyUshort(sc, 0x06, 0x7902);
11027                 MP_WritePhyUshort(sc, 0x06, 0x8443);
11028                 MP_WritePhyUshort(sc, 0x06, 0xad22);
11029                 MP_WritePhyUshort(sc, 0x06, 0x11f6);
11030                 MP_WritePhyUshort(sc, 0x06, 0x22e4);
11031                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
11032                 MP_WritePhyUshort(sc, 0x06, 0x022c);
11033                 MP_WritePhyUshort(sc, 0x06, 0x4602);
11034                 MP_WritePhyUshort(sc, 0x06, 0x2ac5);
11035                 MP_WritePhyUshort(sc, 0x06, 0x0229);
11036                 MP_WritePhyUshort(sc, 0x06, 0x2002);
11037                 MP_WritePhyUshort(sc, 0x06, 0x2b91);
11038                 MP_WritePhyUshort(sc, 0x06, 0xad25);
11039                 MP_WritePhyUshort(sc, 0x06, 0x11f6);
11040                 MP_WritePhyUshort(sc, 0x06, 0x25e4);
11041                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
11042                 MP_WritePhyUshort(sc, 0x06, 0x0284);
11043                 MP_WritePhyUshort(sc, 0x06, 0xe202);
11044                 MP_WritePhyUshort(sc, 0x06, 0x043a);
11045                 MP_WritePhyUshort(sc, 0x06, 0x021a);
11046                 MP_WritePhyUshort(sc, 0x06, 0x5902);
11047                 MP_WritePhyUshort(sc, 0x06, 0x2bfc);
11048                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
11049                 MP_WritePhyUshort(sc, 0x06, 0xf8fa);
11050                 MP_WritePhyUshort(sc, 0x06, 0xef69);
11051                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
11052                 MP_WritePhyUshort(sc, 0x06, 0x00e1);
11053                 MP_WritePhyUshort(sc, 0x06, 0xe001);
11054                 MP_WritePhyUshort(sc, 0x06, 0xad27);
11055                 MP_WritePhyUshort(sc, 0x06, 0x1fd1);
11056                 MP_WritePhyUshort(sc, 0x06, 0x01bf);
11057                 MP_WritePhyUshort(sc, 0x06, 0x8638);
11058                 MP_WritePhyUshort(sc, 0x06, 0x022f);
11059                 MP_WritePhyUshort(sc, 0x06, 0x50e0);
11060                 MP_WritePhyUshort(sc, 0x06, 0xe020);
11061                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
11062                 MP_WritePhyUshort(sc, 0x06, 0x21ad);
11063                 MP_WritePhyUshort(sc, 0x06, 0x200e);
11064                 MP_WritePhyUshort(sc, 0x06, 0xd100);
11065                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
11066                 MP_WritePhyUshort(sc, 0x06, 0x3802);
11067                 MP_WritePhyUshort(sc, 0x06, 0x2f50);
11068                 MP_WritePhyUshort(sc, 0x06, 0xbf3d);
11069                 MP_WritePhyUshort(sc, 0x06, 0x3902);
11070                 MP_WritePhyUshort(sc, 0x06, 0x2eb0);
11071                 MP_WritePhyUshort(sc, 0x06, 0xef96);
11072                 MP_WritePhyUshort(sc, 0x06, 0xfefc);
11073                 MP_WritePhyUshort(sc, 0x06, 0x0402);
11074                 MP_WritePhyUshort(sc, 0x06, 0x8591);
11075                 MP_WritePhyUshort(sc, 0x06, 0x0281);
11076                 MP_WritePhyUshort(sc, 0x06, 0x3c05);
11077                 MP_WritePhyUshort(sc, 0x06, 0xf8fa);
11078                 MP_WritePhyUshort(sc, 0x06, 0xef69);
11079                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
11080                 MP_WritePhyUshort(sc, 0x06, 0xfee1);
11081                 MP_WritePhyUshort(sc, 0x06, 0xe2ff);
11082                 MP_WritePhyUshort(sc, 0x06, 0xad2d);
11083                 MP_WritePhyUshort(sc, 0x06, 0x1ae0);
11084                 MP_WritePhyUshort(sc, 0x06, 0xe14e);
11085                 MP_WritePhyUshort(sc, 0x06, 0xe1e1);
11086                 MP_WritePhyUshort(sc, 0x06, 0x4fac);
11087                 MP_WritePhyUshort(sc, 0x06, 0x2d22);
11088                 MP_WritePhyUshort(sc, 0x06, 0xf603);
11089                 MP_WritePhyUshort(sc, 0x06, 0x0203);
11090                 MP_WritePhyUshort(sc, 0x06, 0x36f7);
11091                 MP_WritePhyUshort(sc, 0x06, 0x03f7);
11092                 MP_WritePhyUshort(sc, 0x06, 0x06bf);
11093                 MP_WritePhyUshort(sc, 0x06, 0x8622);
11094                 MP_WritePhyUshort(sc, 0x06, 0x022e);
11095                 MP_WritePhyUshort(sc, 0x06, 0xb0ae);
11096                 MP_WritePhyUshort(sc, 0x06, 0x11e0);
11097                 MP_WritePhyUshort(sc, 0x06, 0xe14e);
11098                 MP_WritePhyUshort(sc, 0x06, 0xe1e1);
11099                 MP_WritePhyUshort(sc, 0x06, 0x4fad);
11100                 MP_WritePhyUshort(sc, 0x06, 0x2d08);
11101                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
11102                 MP_WritePhyUshort(sc, 0x06, 0x2d02);
11103                 MP_WritePhyUshort(sc, 0x06, 0x2eb0);
11104                 MP_WritePhyUshort(sc, 0x06, 0xf606);
11105                 MP_WritePhyUshort(sc, 0x06, 0xef96);
11106                 MP_WritePhyUshort(sc, 0x06, 0xfefc);
11107                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
11108                 MP_WritePhyUshort(sc, 0x06, 0xf9fa);
11109                 MP_WritePhyUshort(sc, 0x06, 0xef69);
11110                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
11111                 MP_WritePhyUshort(sc, 0x06, 0x87ad);
11112                 MP_WritePhyUshort(sc, 0x06, 0x204c);
11113                 MP_WritePhyUshort(sc, 0x06, 0xd200);
11114                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
11115                 MP_WritePhyUshort(sc, 0x06, 0x0058);
11116                 MP_WritePhyUshort(sc, 0x06, 0x010c);
11117                 MP_WritePhyUshort(sc, 0x06, 0x021e);
11118                 MP_WritePhyUshort(sc, 0x06, 0x20e0);
11119                 MP_WritePhyUshort(sc, 0x06, 0xe000);
11120                 MP_WritePhyUshort(sc, 0x06, 0x5810);
11121                 MP_WritePhyUshort(sc, 0x06, 0x1e20);
11122                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
11123                 MP_WritePhyUshort(sc, 0x06, 0x3658);
11124                 MP_WritePhyUshort(sc, 0x06, 0x031e);
11125                 MP_WritePhyUshort(sc, 0x06, 0x20e0);
11126                 MP_WritePhyUshort(sc, 0x06, 0xe022);
11127                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
11128                 MP_WritePhyUshort(sc, 0x06, 0x2358);
11129                 MP_WritePhyUshort(sc, 0x06, 0xe01e);
11130                 MP_WritePhyUshort(sc, 0x06, 0x20e0);
11131                 MP_WritePhyUshort(sc, 0x06, 0x8ae6);
11132                 MP_WritePhyUshort(sc, 0x06, 0x1f02);
11133                 MP_WritePhyUshort(sc, 0x06, 0x9e22);
11134                 MP_WritePhyUshort(sc, 0x06, 0xe68a);
11135                 MP_WritePhyUshort(sc, 0x06, 0xe6ad);
11136                 MP_WritePhyUshort(sc, 0x06, 0x3214);
11137                 MP_WritePhyUshort(sc, 0x06, 0xad34);
11138                 MP_WritePhyUshort(sc, 0x06, 0x11ef);
11139                 MP_WritePhyUshort(sc, 0x06, 0x0258);
11140                 MP_WritePhyUshort(sc, 0x06, 0x039e);
11141                 MP_WritePhyUshort(sc, 0x06, 0x07ad);
11142                 MP_WritePhyUshort(sc, 0x06, 0x3508);
11143                 MP_WritePhyUshort(sc, 0x06, 0x5ac0);
11144                 MP_WritePhyUshort(sc, 0x06, 0x9f04);
11145                 MP_WritePhyUshort(sc, 0x06, 0xd101);
11146                 MP_WritePhyUshort(sc, 0x06, 0xae02);
11147                 MP_WritePhyUshort(sc, 0x06, 0xd100);
11148                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
11149                 MP_WritePhyUshort(sc, 0x06, 0x3e02);
11150                 MP_WritePhyUshort(sc, 0x06, 0x2f50);
11151                 MP_WritePhyUshort(sc, 0x06, 0xef96);
11152                 MP_WritePhyUshort(sc, 0x06, 0xfefd);
11153                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
11154                 MP_WritePhyUshort(sc, 0x06, 0xf8f9);
11155                 MP_WritePhyUshort(sc, 0x06, 0xfae0);
11156                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
11157                 MP_WritePhyUshort(sc, 0x06, 0xac26);
11158                 MP_WritePhyUshort(sc, 0x06, 0x0ee0);
11159                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
11160                 MP_WritePhyUshort(sc, 0x06, 0xac21);
11161                 MP_WritePhyUshort(sc, 0x06, 0x08e0);
11162                 MP_WritePhyUshort(sc, 0x06, 0x8b87);
11163                 MP_WritePhyUshort(sc, 0x06, 0xac24);
11164                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
11165                 MP_WritePhyUshort(sc, 0x06, 0x6bee);
11166                 MP_WritePhyUshort(sc, 0x06, 0xe0ea);
11167                 MP_WritePhyUshort(sc, 0x06, 0x00ee);
11168                 MP_WritePhyUshort(sc, 0x06, 0xe0eb);
11169                 MP_WritePhyUshort(sc, 0x06, 0x00e2);
11170                 MP_WritePhyUshort(sc, 0x06, 0xe07c);
11171                 MP_WritePhyUshort(sc, 0x06, 0xe3e0);
11172                 MP_WritePhyUshort(sc, 0x06, 0x7da5);
11173                 MP_WritePhyUshort(sc, 0x06, 0x1111);
11174                 MP_WritePhyUshort(sc, 0x06, 0x15d2);
11175                 MP_WritePhyUshort(sc, 0x06, 0x60d6);
11176                 MP_WritePhyUshort(sc, 0x06, 0x6666);
11177                 MP_WritePhyUshort(sc, 0x06, 0x0207);
11178                 MP_WritePhyUshort(sc, 0x06, 0xf9d2);
11179                 MP_WritePhyUshort(sc, 0x06, 0xa0d6);
11180                 MP_WritePhyUshort(sc, 0x06, 0xaaaa);
11181                 MP_WritePhyUshort(sc, 0x06, 0x0207);
11182                 MP_WritePhyUshort(sc, 0x06, 0xf902);
11183                 MP_WritePhyUshort(sc, 0x06, 0x825c);
11184                 MP_WritePhyUshort(sc, 0x06, 0xae44);
11185                 MP_WritePhyUshort(sc, 0x06, 0xa566);
11186                 MP_WritePhyUshort(sc, 0x06, 0x6602);
11187                 MP_WritePhyUshort(sc, 0x06, 0xae38);
11188                 MP_WritePhyUshort(sc, 0x06, 0xa5aa);
11189                 MP_WritePhyUshort(sc, 0x06, 0xaa02);
11190                 MP_WritePhyUshort(sc, 0x06, 0xae32);
11191                 MP_WritePhyUshort(sc, 0x06, 0xeee0);
11192                 MP_WritePhyUshort(sc, 0x06, 0xea04);
11193                 MP_WritePhyUshort(sc, 0x06, 0xeee0);
11194                 MP_WritePhyUshort(sc, 0x06, 0xeb06);
11195                 MP_WritePhyUshort(sc, 0x06, 0xe2e0);
11196                 MP_WritePhyUshort(sc, 0x06, 0x7ce3);
11197                 MP_WritePhyUshort(sc, 0x06, 0xe07d);
11198                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
11199                 MP_WritePhyUshort(sc, 0x06, 0x38e1);
11200                 MP_WritePhyUshort(sc, 0x06, 0xe039);
11201                 MP_WritePhyUshort(sc, 0x06, 0xad2e);
11202                 MP_WritePhyUshort(sc, 0x06, 0x21ad);
11203                 MP_WritePhyUshort(sc, 0x06, 0x3f13);
11204                 MP_WritePhyUshort(sc, 0x06, 0xe0e4);
11205                 MP_WritePhyUshort(sc, 0x06, 0x14e1);
11206                 MP_WritePhyUshort(sc, 0x06, 0xe415);
11207                 MP_WritePhyUshort(sc, 0x06, 0x6880);
11208                 MP_WritePhyUshort(sc, 0x06, 0xe4e4);
11209                 MP_WritePhyUshort(sc, 0x06, 0x14e5);
11210                 MP_WritePhyUshort(sc, 0x06, 0xe415);
11211                 MP_WritePhyUshort(sc, 0x06, 0x0282);
11212                 MP_WritePhyUshort(sc, 0x06, 0x5cae);
11213                 MP_WritePhyUshort(sc, 0x06, 0x0bac);
11214                 MP_WritePhyUshort(sc, 0x06, 0x3e02);
11215                 MP_WritePhyUshort(sc, 0x06, 0xae06);
11216                 MP_WritePhyUshort(sc, 0x06, 0x0282);
11217                 MP_WritePhyUshort(sc, 0x06, 0x8602);
11218                 MP_WritePhyUshort(sc, 0x06, 0x82b0);
11219                 MP_WritePhyUshort(sc, 0x06, 0xfefd);
11220                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
11221                 MP_WritePhyUshort(sc, 0x06, 0xf8e1);
11222                 MP_WritePhyUshort(sc, 0x06, 0x8b2e);
11223                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
11224                 MP_WritePhyUshort(sc, 0x06, 0x81ad);
11225                 MP_WritePhyUshort(sc, 0x06, 0x2605);
11226                 MP_WritePhyUshort(sc, 0x06, 0x0221);
11227                 MP_WritePhyUshort(sc, 0x06, 0xf3f7);
11228                 MP_WritePhyUshort(sc, 0x06, 0x28e0);
11229                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
11230                 MP_WritePhyUshort(sc, 0x06, 0xad21);
11231                 MP_WritePhyUshort(sc, 0x06, 0x0502);
11232                 MP_WritePhyUshort(sc, 0x06, 0x22f8);
11233                 MP_WritePhyUshort(sc, 0x06, 0xf729);
11234                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
11235                 MP_WritePhyUshort(sc, 0x06, 0x87ad);
11236                 MP_WritePhyUshort(sc, 0x06, 0x2405);
11237                 MP_WritePhyUshort(sc, 0x06, 0x0282);
11238                 MP_WritePhyUshort(sc, 0x06, 0xebf7);
11239                 MP_WritePhyUshort(sc, 0x06, 0x2ae5);
11240                 MP_WritePhyUshort(sc, 0x06, 0x8b2e);
11241                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
11242                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
11243                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
11244                 MP_WritePhyUshort(sc, 0x06, 0xad26);
11245                 MP_WritePhyUshort(sc, 0x06, 0x0302);
11246                 MP_WritePhyUshort(sc, 0x06, 0x2134);
11247                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
11248                 MP_WritePhyUshort(sc, 0x06, 0x81ad);
11249                 MP_WritePhyUshort(sc, 0x06, 0x2109);
11250                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
11251                 MP_WritePhyUshort(sc, 0x06, 0x2eac);
11252                 MP_WritePhyUshort(sc, 0x06, 0x2003);
11253                 MP_WritePhyUshort(sc, 0x06, 0x0283);
11254                 MP_WritePhyUshort(sc, 0x06, 0x52e0);
11255                 MP_WritePhyUshort(sc, 0x06, 0x8b87);
11256                 MP_WritePhyUshort(sc, 0x06, 0xad24);
11257                 MP_WritePhyUshort(sc, 0x06, 0x09e0);
11258                 MP_WritePhyUshort(sc, 0x06, 0x8b2e);
11259                 MP_WritePhyUshort(sc, 0x06, 0xac21);
11260                 MP_WritePhyUshort(sc, 0x06, 0x0302);
11261                 MP_WritePhyUshort(sc, 0x06, 0x8337);
11262                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
11263                 MP_WritePhyUshort(sc, 0x06, 0xf8e1);
11264                 MP_WritePhyUshort(sc, 0x06, 0x8b2e);
11265                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
11266                 MP_WritePhyUshort(sc, 0x06, 0x81ad);
11267                 MP_WritePhyUshort(sc, 0x06, 0x2608);
11268                 MP_WritePhyUshort(sc, 0x06, 0xe085);
11269                 MP_WritePhyUshort(sc, 0x06, 0xd2ad);
11270                 MP_WritePhyUshort(sc, 0x06, 0x2502);
11271                 MP_WritePhyUshort(sc, 0x06, 0xf628);
11272                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
11273                 MP_WritePhyUshort(sc, 0x06, 0x81ad);
11274                 MP_WritePhyUshort(sc, 0x06, 0x210a);
11275                 MP_WritePhyUshort(sc, 0x06, 0xe086);
11276                 MP_WritePhyUshort(sc, 0x06, 0x0af6);
11277                 MP_WritePhyUshort(sc, 0x06, 0x27a0);
11278                 MP_WritePhyUshort(sc, 0x06, 0x0502);
11279                 MP_WritePhyUshort(sc, 0x06, 0xf629);
11280                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
11281                 MP_WritePhyUshort(sc, 0x06, 0x87ad);
11282                 MP_WritePhyUshort(sc, 0x06, 0x2408);
11283                 MP_WritePhyUshort(sc, 0x06, 0xe08a);
11284                 MP_WritePhyUshort(sc, 0x06, 0xedad);
11285                 MP_WritePhyUshort(sc, 0x06, 0x2002);
11286                 MP_WritePhyUshort(sc, 0x06, 0xf62a);
11287                 MP_WritePhyUshort(sc, 0x06, 0xe58b);
11288                 MP_WritePhyUshort(sc, 0x06, 0x2ea1);
11289                 MP_WritePhyUshort(sc, 0x06, 0x0003);
11290                 MP_WritePhyUshort(sc, 0x06, 0x0221);
11291                 MP_WritePhyUshort(sc, 0x06, 0x11fc);
11292                 MP_WritePhyUshort(sc, 0x06, 0x04ee);
11293                 MP_WritePhyUshort(sc, 0x06, 0x8aed);
11294                 MP_WritePhyUshort(sc, 0x06, 0x00ee);
11295                 MP_WritePhyUshort(sc, 0x06, 0x8aec);
11296                 MP_WritePhyUshort(sc, 0x06, 0x0004);
11297                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
11298                 MP_WritePhyUshort(sc, 0x06, 0x8b87);
11299                 MP_WritePhyUshort(sc, 0x06, 0xad24);
11300                 MP_WritePhyUshort(sc, 0x06, 0x3ae0);
11301                 MP_WritePhyUshort(sc, 0x06, 0xe0ea);
11302                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
11303                 MP_WritePhyUshort(sc, 0x06, 0xeb58);
11304                 MP_WritePhyUshort(sc, 0x06, 0xf8d1);
11305                 MP_WritePhyUshort(sc, 0x06, 0x01e4);
11306                 MP_WritePhyUshort(sc, 0x06, 0xe0ea);
11307                 MP_WritePhyUshort(sc, 0x06, 0xe5e0);
11308                 MP_WritePhyUshort(sc, 0x06, 0xebe0);
11309                 MP_WritePhyUshort(sc, 0x06, 0xe07c);
11310                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
11311                 MP_WritePhyUshort(sc, 0x06, 0x7d5c);
11312                 MP_WritePhyUshort(sc, 0x06, 0x00ff);
11313                 MP_WritePhyUshort(sc, 0x06, 0x3c00);
11314                 MP_WritePhyUshort(sc, 0x06, 0x1eab);
11315                 MP_WritePhyUshort(sc, 0x06, 0x1ce0);
11316                 MP_WritePhyUshort(sc, 0x06, 0xe04c);
11317                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
11318                 MP_WritePhyUshort(sc, 0x06, 0x4d58);
11319                 MP_WritePhyUshort(sc, 0x06, 0xc1e4);
11320                 MP_WritePhyUshort(sc, 0x06, 0xe04c);
11321                 MP_WritePhyUshort(sc, 0x06, 0xe5e0);
11322                 MP_WritePhyUshort(sc, 0x06, 0x4de0);
11323                 MP_WritePhyUshort(sc, 0x06, 0xe0ee);
11324                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
11325                 MP_WritePhyUshort(sc, 0x06, 0xef69);
11326                 MP_WritePhyUshort(sc, 0x06, 0x3ce4);
11327                 MP_WritePhyUshort(sc, 0x06, 0xe0ee);
11328                 MP_WritePhyUshort(sc, 0x06, 0xe5e0);
11329                 MP_WritePhyUshort(sc, 0x06, 0xeffc);
11330                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
11331                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
11332                 MP_WritePhyUshort(sc, 0x06, 0x87ad);
11333                 MP_WritePhyUshort(sc, 0x06, 0x2412);
11334                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
11335                 MP_WritePhyUshort(sc, 0x06, 0xeee1);
11336                 MP_WritePhyUshort(sc, 0x06, 0xe0ef);
11337                 MP_WritePhyUshort(sc, 0x06, 0x59c3);
11338                 MP_WritePhyUshort(sc, 0x06, 0xe4e0);
11339                 MP_WritePhyUshort(sc, 0x06, 0xeee5);
11340                 MP_WritePhyUshort(sc, 0x06, 0xe0ef);
11341                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
11342                 MP_WritePhyUshort(sc, 0x06, 0xed01);
11343                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
11344                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
11345                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
11346                 MP_WritePhyUshort(sc, 0x06, 0xac25);
11347                 MP_WritePhyUshort(sc, 0x06, 0x0502);
11348                 MP_WritePhyUshort(sc, 0x06, 0x8363);
11349                 MP_WritePhyUshort(sc, 0x06, 0xae03);
11350                 MP_WritePhyUshort(sc, 0x06, 0x0225);
11351                 MP_WritePhyUshort(sc, 0x06, 0x16fc);
11352                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
11353                 MP_WritePhyUshort(sc, 0x06, 0xf9fa);
11354                 MP_WritePhyUshort(sc, 0x06, 0xef69);
11355                 MP_WritePhyUshort(sc, 0x06, 0xfae0);
11356                 MP_WritePhyUshort(sc, 0x06, 0x860a);
11357                 MP_WritePhyUshort(sc, 0x06, 0xa000);
11358                 MP_WritePhyUshort(sc, 0x06, 0x19e0);
11359                 MP_WritePhyUshort(sc, 0x06, 0x860b);
11360                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
11361                 MP_WritePhyUshort(sc, 0x06, 0x331b);
11362                 MP_WritePhyUshort(sc, 0x06, 0x109e);
11363                 MP_WritePhyUshort(sc, 0x06, 0x04aa);
11364                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
11365                 MP_WritePhyUshort(sc, 0x06, 0x06ee);
11366                 MP_WritePhyUshort(sc, 0x06, 0x860a);
11367                 MP_WritePhyUshort(sc, 0x06, 0x01ae);
11368                 MP_WritePhyUshort(sc, 0x06, 0xe602);
11369                 MP_WritePhyUshort(sc, 0x06, 0x241e);
11370                 MP_WritePhyUshort(sc, 0x06, 0xae14);
11371                 MP_WritePhyUshort(sc, 0x06, 0xa001);
11372                 MP_WritePhyUshort(sc, 0x06, 0x1402);
11373                 MP_WritePhyUshort(sc, 0x06, 0x2426);
11374                 MP_WritePhyUshort(sc, 0x06, 0xbf26);
11375                 MP_WritePhyUshort(sc, 0x06, 0x6d02);
11376                 MP_WritePhyUshort(sc, 0x06, 0x2eb0);
11377                 MP_WritePhyUshort(sc, 0x06, 0xee86);
11378                 MP_WritePhyUshort(sc, 0x06, 0x0b00);
11379                 MP_WritePhyUshort(sc, 0x06, 0xee86);
11380                 MP_WritePhyUshort(sc, 0x06, 0x0a02);
11381                 MP_WritePhyUshort(sc, 0x06, 0xaf84);
11382                 MP_WritePhyUshort(sc, 0x06, 0x3ca0);
11383                 MP_WritePhyUshort(sc, 0x06, 0x0252);
11384                 MP_WritePhyUshort(sc, 0x06, 0xee86);
11385                 MP_WritePhyUshort(sc, 0x06, 0x0400);
11386                 MP_WritePhyUshort(sc, 0x06, 0xee86);
11387                 MP_WritePhyUshort(sc, 0x06, 0x0500);
11388                 MP_WritePhyUshort(sc, 0x06, 0xe086);
11389                 MP_WritePhyUshort(sc, 0x06, 0x0be1);
11390                 MP_WritePhyUshort(sc, 0x06, 0x8b32);
11391                 MP_WritePhyUshort(sc, 0x06, 0x1b10);
11392                 MP_WritePhyUshort(sc, 0x06, 0x9e04);
11393                 MP_WritePhyUshort(sc, 0x06, 0xaa02);
11394                 MP_WritePhyUshort(sc, 0x06, 0xaecb);
11395                 MP_WritePhyUshort(sc, 0x06, 0xee86);
11396                 MP_WritePhyUshort(sc, 0x06, 0x0b00);
11397                 MP_WritePhyUshort(sc, 0x06, 0x0224);
11398                 MP_WritePhyUshort(sc, 0x06, 0x3ae2);
11399                 MP_WritePhyUshort(sc, 0x06, 0x8604);
11400                 MP_WritePhyUshort(sc, 0x06, 0xe386);
11401                 MP_WritePhyUshort(sc, 0x06, 0x05ef);
11402                 MP_WritePhyUshort(sc, 0x06, 0x65e2);
11403                 MP_WritePhyUshort(sc, 0x06, 0x8606);
11404                 MP_WritePhyUshort(sc, 0x06, 0xe386);
11405                 MP_WritePhyUshort(sc, 0x06, 0x071b);
11406                 MP_WritePhyUshort(sc, 0x06, 0x56aa);
11407                 MP_WritePhyUshort(sc, 0x06, 0x0eef);
11408                 MP_WritePhyUshort(sc, 0x06, 0x56e6);
11409                 MP_WritePhyUshort(sc, 0x06, 0x8606);
11410                 MP_WritePhyUshort(sc, 0x06, 0xe786);
11411                 MP_WritePhyUshort(sc, 0x06, 0x07e2);
11412                 MP_WritePhyUshort(sc, 0x06, 0x8609);
11413                 MP_WritePhyUshort(sc, 0x06, 0xe686);
11414                 MP_WritePhyUshort(sc, 0x06, 0x08e0);
11415                 MP_WritePhyUshort(sc, 0x06, 0x8609);
11416                 MP_WritePhyUshort(sc, 0x06, 0xa000);
11417                 MP_WritePhyUshort(sc, 0x06, 0x07ee);
11418                 MP_WritePhyUshort(sc, 0x06, 0x860a);
11419                 MP_WritePhyUshort(sc, 0x06, 0x03af);
11420                 MP_WritePhyUshort(sc, 0x06, 0x8369);
11421                 MP_WritePhyUshort(sc, 0x06, 0x0224);
11422                 MP_WritePhyUshort(sc, 0x06, 0x8e02);
11423                 MP_WritePhyUshort(sc, 0x06, 0x2426);
11424                 MP_WritePhyUshort(sc, 0x06, 0xae48);
11425                 MP_WritePhyUshort(sc, 0x06, 0xa003);
11426                 MP_WritePhyUshort(sc, 0x06, 0x21e0);
11427                 MP_WritePhyUshort(sc, 0x06, 0x8608);
11428                 MP_WritePhyUshort(sc, 0x06, 0xe186);
11429                 MP_WritePhyUshort(sc, 0x06, 0x091b);
11430                 MP_WritePhyUshort(sc, 0x06, 0x019e);
11431                 MP_WritePhyUshort(sc, 0x06, 0x0caa);
11432                 MP_WritePhyUshort(sc, 0x06, 0x0502);
11433                 MP_WritePhyUshort(sc, 0x06, 0x249d);
11434                 MP_WritePhyUshort(sc, 0x06, 0xaee7);
11435                 MP_WritePhyUshort(sc, 0x06, 0x0224);
11436                 MP_WritePhyUshort(sc, 0x06, 0x8eae);
11437                 MP_WritePhyUshort(sc, 0x06, 0xe2ee);
11438                 MP_WritePhyUshort(sc, 0x06, 0x860a);
11439                 MP_WritePhyUshort(sc, 0x06, 0x04ee);
11440                 MP_WritePhyUshort(sc, 0x06, 0x860b);
11441                 MP_WritePhyUshort(sc, 0x06, 0x00af);
11442                 MP_WritePhyUshort(sc, 0x06, 0x8369);
11443                 MP_WritePhyUshort(sc, 0x06, 0xa004);
11444                 MP_WritePhyUshort(sc, 0x06, 0x15e0);
11445                 MP_WritePhyUshort(sc, 0x06, 0x860b);
11446                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
11447                 MP_WritePhyUshort(sc, 0x06, 0x341b);
11448                 MP_WritePhyUshort(sc, 0x06, 0x109e);
11449                 MP_WritePhyUshort(sc, 0x06, 0x05aa);
11450                 MP_WritePhyUshort(sc, 0x06, 0x03af);
11451                 MP_WritePhyUshort(sc, 0x06, 0x8383);
11452                 MP_WritePhyUshort(sc, 0x06, 0xee86);
11453                 MP_WritePhyUshort(sc, 0x06, 0x0a05);
11454                 MP_WritePhyUshort(sc, 0x06, 0xae0c);
11455                 MP_WritePhyUshort(sc, 0x06, 0xa005);
11456                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
11457                 MP_WritePhyUshort(sc, 0x06, 0x0702);
11458                 MP_WritePhyUshort(sc, 0x06, 0x2309);
11459                 MP_WritePhyUshort(sc, 0x06, 0xee86);
11460                 MP_WritePhyUshort(sc, 0x06, 0x0a00);
11461                 MP_WritePhyUshort(sc, 0x06, 0xfeef);
11462                 MP_WritePhyUshort(sc, 0x06, 0x96fe);
11463                 MP_WritePhyUshort(sc, 0x06, 0xfdfc);
11464                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
11465                 MP_WritePhyUshort(sc, 0x06, 0xf9fa);
11466                 MP_WritePhyUshort(sc, 0x06, 0xef69);
11467                 MP_WritePhyUshort(sc, 0x06, 0xfbe0);
11468                 MP_WritePhyUshort(sc, 0x06, 0x8b85);
11469                 MP_WritePhyUshort(sc, 0x06, 0xad25);
11470                 MP_WritePhyUshort(sc, 0x06, 0x22e0);
11471                 MP_WritePhyUshort(sc, 0x06, 0xe022);
11472                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
11473                 MP_WritePhyUshort(sc, 0x06, 0x23e2);
11474                 MP_WritePhyUshort(sc, 0x06, 0xe036);
11475                 MP_WritePhyUshort(sc, 0x06, 0xe3e0);
11476                 MP_WritePhyUshort(sc, 0x06, 0x375a);
11477                 MP_WritePhyUshort(sc, 0x06, 0xc40d);
11478                 MP_WritePhyUshort(sc, 0x06, 0x0158);
11479                 MP_WritePhyUshort(sc, 0x06, 0x021e);
11480                 MP_WritePhyUshort(sc, 0x06, 0x20e3);
11481                 MP_WritePhyUshort(sc, 0x06, 0x8ae7);
11482                 MP_WritePhyUshort(sc, 0x06, 0xac31);
11483                 MP_WritePhyUshort(sc, 0x06, 0x60ac);
11484                 MP_WritePhyUshort(sc, 0x06, 0x3a08);
11485                 MP_WritePhyUshort(sc, 0x06, 0xac3e);
11486                 MP_WritePhyUshort(sc, 0x06, 0x26ae);
11487                 MP_WritePhyUshort(sc, 0x06, 0x67af);
11488                 MP_WritePhyUshort(sc, 0x06, 0x84db);
11489                 MP_WritePhyUshort(sc, 0x06, 0xad37);
11490                 MP_WritePhyUshort(sc, 0x06, 0x61e0);
11491                 MP_WritePhyUshort(sc, 0x06, 0x8ae8);
11492                 MP_WritePhyUshort(sc, 0x06, 0x10e4);
11493                 MP_WritePhyUshort(sc, 0x06, 0x8ae8);
11494                 MP_WritePhyUshort(sc, 0x06, 0xe18a);
11495                 MP_WritePhyUshort(sc, 0x06, 0xe91b);
11496                 MP_WritePhyUshort(sc, 0x06, 0x109e);
11497                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
11498                 MP_WritePhyUshort(sc, 0x06, 0x51d1);
11499                 MP_WritePhyUshort(sc, 0x06, 0x00bf);
11500                 MP_WritePhyUshort(sc, 0x06, 0x863b);
11501                 MP_WritePhyUshort(sc, 0x06, 0x022f);
11502                 MP_WritePhyUshort(sc, 0x06, 0x50ee);
11503                 MP_WritePhyUshort(sc, 0x06, 0x8ae8);
11504                 MP_WritePhyUshort(sc, 0x06, 0x00ae);
11505                 MP_WritePhyUshort(sc, 0x06, 0x43ad);
11506                 MP_WritePhyUshort(sc, 0x06, 0x3627);
11507                 MP_WritePhyUshort(sc, 0x06, 0xe08a);
11508                 MP_WritePhyUshort(sc, 0x06, 0xeee1);
11509                 MP_WritePhyUshort(sc, 0x06, 0x8aef);
11510                 MP_WritePhyUshort(sc, 0x06, 0xef74);
11511                 MP_WritePhyUshort(sc, 0x06, 0xe08a);
11512                 MP_WritePhyUshort(sc, 0x06, 0xeae1);
11513                 MP_WritePhyUshort(sc, 0x06, 0x8aeb);
11514                 MP_WritePhyUshort(sc, 0x06, 0x1b74);
11515                 MP_WritePhyUshort(sc, 0x06, 0x9e2e);
11516                 MP_WritePhyUshort(sc, 0x06, 0x14e4);
11517                 MP_WritePhyUshort(sc, 0x06, 0x8aea);
11518                 MP_WritePhyUshort(sc, 0x06, 0xe58a);
11519                 MP_WritePhyUshort(sc, 0x06, 0xebef);
11520                 MP_WritePhyUshort(sc, 0x06, 0x74e0);
11521                 MP_WritePhyUshort(sc, 0x06, 0x8aee);
11522                 MP_WritePhyUshort(sc, 0x06, 0xe18a);
11523                 MP_WritePhyUshort(sc, 0x06, 0xef1b);
11524                 MP_WritePhyUshort(sc, 0x06, 0x479e);
11525                 MP_WritePhyUshort(sc, 0x06, 0x0fae);
11526                 MP_WritePhyUshort(sc, 0x06, 0x19ee);
11527                 MP_WritePhyUshort(sc, 0x06, 0x8aea);
11528                 MP_WritePhyUshort(sc, 0x06, 0x00ee);
11529                 MP_WritePhyUshort(sc, 0x06, 0x8aeb);
11530                 MP_WritePhyUshort(sc, 0x06, 0x00ae);
11531                 MP_WritePhyUshort(sc, 0x06, 0x0fac);
11532                 MP_WritePhyUshort(sc, 0x06, 0x390c);
11533                 MP_WritePhyUshort(sc, 0x06, 0xd101);
11534                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
11535                 MP_WritePhyUshort(sc, 0x06, 0x3b02);
11536                 MP_WritePhyUshort(sc, 0x06, 0x2f50);
11537                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
11538                 MP_WritePhyUshort(sc, 0x06, 0xe800);
11539                 MP_WritePhyUshort(sc, 0x06, 0xe68a);
11540                 MP_WritePhyUshort(sc, 0x06, 0xe7ff);
11541                 MP_WritePhyUshort(sc, 0x06, 0xef96);
11542                 MP_WritePhyUshort(sc, 0x06, 0xfefd);
11543                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
11544                 MP_WritePhyUshort(sc, 0x06, 0xf8f9);
11545                 MP_WritePhyUshort(sc, 0x06, 0xfaef);
11546                 MP_WritePhyUshort(sc, 0x06, 0x69e0);
11547                 MP_WritePhyUshort(sc, 0x06, 0xe022);
11548                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
11549                 MP_WritePhyUshort(sc, 0x06, 0x2358);
11550                 MP_WritePhyUshort(sc, 0x06, 0xc4e1);
11551                 MP_WritePhyUshort(sc, 0x06, 0x8b6e);
11552                 MP_WritePhyUshort(sc, 0x06, 0x1f10);
11553                 MP_WritePhyUshort(sc, 0x06, 0x9e24);
11554                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
11555                 MP_WritePhyUshort(sc, 0x06, 0x6ead);
11556                 MP_WritePhyUshort(sc, 0x06, 0x2218);
11557                 MP_WritePhyUshort(sc, 0x06, 0xac27);
11558                 MP_WritePhyUshort(sc, 0x06, 0x0dac);
11559                 MP_WritePhyUshort(sc, 0x06, 0x2605);
11560                 MP_WritePhyUshort(sc, 0x06, 0x0203);
11561                 MP_WritePhyUshort(sc, 0x06, 0x8fae);
11562                 MP_WritePhyUshort(sc, 0x06, 0x1302);
11563                 MP_WritePhyUshort(sc, 0x06, 0x03c8);
11564                 MP_WritePhyUshort(sc, 0x06, 0xae0e);
11565                 MP_WritePhyUshort(sc, 0x06, 0x0203);
11566                 MP_WritePhyUshort(sc, 0x06, 0xe102);
11567                 MP_WritePhyUshort(sc, 0x06, 0x8520);
11568                 MP_WritePhyUshort(sc, 0x06, 0xae06);
11569                 MP_WritePhyUshort(sc, 0x06, 0x0203);
11570                 MP_WritePhyUshort(sc, 0x06, 0x8f02);
11571                 MP_WritePhyUshort(sc, 0x06, 0x8566);
11572                 MP_WritePhyUshort(sc, 0x06, 0xef96);
11573                 MP_WritePhyUshort(sc, 0x06, 0xfefd);
11574                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
11575                 MP_WritePhyUshort(sc, 0x06, 0xf8fa);
11576                 MP_WritePhyUshort(sc, 0x06, 0xef69);
11577                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
11578                 MP_WritePhyUshort(sc, 0x06, 0x82ad);
11579                 MP_WritePhyUshort(sc, 0x06, 0x2737);
11580                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
11581                 MP_WritePhyUshort(sc, 0x06, 0x4402);
11582                 MP_WritePhyUshort(sc, 0x06, 0x2f23);
11583                 MP_WritePhyUshort(sc, 0x06, 0xac28);
11584                 MP_WritePhyUshort(sc, 0x06, 0x2ed1);
11585                 MP_WritePhyUshort(sc, 0x06, 0x01bf);
11586                 MP_WritePhyUshort(sc, 0x06, 0x8647);
11587                 MP_WritePhyUshort(sc, 0x06, 0x022f);
11588                 MP_WritePhyUshort(sc, 0x06, 0x50bf);
11589                 MP_WritePhyUshort(sc, 0x06, 0x8641);
11590                 MP_WritePhyUshort(sc, 0x06, 0x022f);
11591                 MP_WritePhyUshort(sc, 0x06, 0x23e5);
11592                 MP_WritePhyUshort(sc, 0x06, 0x8af0);
11593                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
11594                 MP_WritePhyUshort(sc, 0x06, 0x22e1);
11595                 MP_WritePhyUshort(sc, 0x06, 0xe023);
11596                 MP_WritePhyUshort(sc, 0x06, 0xac2e);
11597                 MP_WritePhyUshort(sc, 0x06, 0x04d1);
11598                 MP_WritePhyUshort(sc, 0x06, 0x01ae);
11599                 MP_WritePhyUshort(sc, 0x06, 0x02d1);
11600                 MP_WritePhyUshort(sc, 0x06, 0x00bf);
11601                 MP_WritePhyUshort(sc, 0x06, 0x8641);
11602                 MP_WritePhyUshort(sc, 0x06, 0x022f);
11603                 MP_WritePhyUshort(sc, 0x06, 0x50d1);
11604                 MP_WritePhyUshort(sc, 0x06, 0x01bf);
11605                 MP_WritePhyUshort(sc, 0x06, 0x8644);
11606                 MP_WritePhyUshort(sc, 0x06, 0x022f);
11607                 MP_WritePhyUshort(sc, 0x06, 0x50ef);
11608                 MP_WritePhyUshort(sc, 0x06, 0x96fe);
11609                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
11610                 MP_WritePhyUshort(sc, 0x06, 0xf8fa);
11611                 MP_WritePhyUshort(sc, 0x06, 0xef69);
11612                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
11613                 MP_WritePhyUshort(sc, 0x06, 0x4702);
11614                 MP_WritePhyUshort(sc, 0x06, 0x2f23);
11615                 MP_WritePhyUshort(sc, 0x06, 0xad28);
11616                 MP_WritePhyUshort(sc, 0x06, 0x19d1);
11617                 MP_WritePhyUshort(sc, 0x06, 0x00bf);
11618                 MP_WritePhyUshort(sc, 0x06, 0x8644);
11619                 MP_WritePhyUshort(sc, 0x06, 0x022f);
11620                 MP_WritePhyUshort(sc, 0x06, 0x50e1);
11621                 MP_WritePhyUshort(sc, 0x06, 0x8af0);
11622                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
11623                 MP_WritePhyUshort(sc, 0x06, 0x4102);
11624                 MP_WritePhyUshort(sc, 0x06, 0x2f50);
11625                 MP_WritePhyUshort(sc, 0x06, 0xd100);
11626                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
11627                 MP_WritePhyUshort(sc, 0x06, 0x4702);
11628                 MP_WritePhyUshort(sc, 0x06, 0x2f50);
11629                 MP_WritePhyUshort(sc, 0x06, 0xef96);
11630                 MP_WritePhyUshort(sc, 0x06, 0xfefc);
11631                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
11632                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
11633                 MP_WritePhyUshort(sc, 0x06, 0xfee1);
11634                 MP_WritePhyUshort(sc, 0x06, 0xe2ff);
11635                 MP_WritePhyUshort(sc, 0x06, 0xad2e);
11636                 MP_WritePhyUshort(sc, 0x06, 0x63e0);
11637                 MP_WritePhyUshort(sc, 0x06, 0xe038);
11638                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
11639                 MP_WritePhyUshort(sc, 0x06, 0x39ad);
11640                 MP_WritePhyUshort(sc, 0x06, 0x2f10);
11641                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
11642                 MP_WritePhyUshort(sc, 0x06, 0x34e1);
11643                 MP_WritePhyUshort(sc, 0x06, 0xe035);
11644                 MP_WritePhyUshort(sc, 0x06, 0xf726);
11645                 MP_WritePhyUshort(sc, 0x06, 0xe4e0);
11646                 MP_WritePhyUshort(sc, 0x06, 0x34e5);
11647                 MP_WritePhyUshort(sc, 0x06, 0xe035);
11648                 MP_WritePhyUshort(sc, 0x06, 0xae0e);
11649                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
11650                 MP_WritePhyUshort(sc, 0x06, 0xd6e1);
11651                 MP_WritePhyUshort(sc, 0x06, 0xe2d7);
11652                 MP_WritePhyUshort(sc, 0x06, 0xf728);
11653                 MP_WritePhyUshort(sc, 0x06, 0xe4e2);
11654                 MP_WritePhyUshort(sc, 0x06, 0xd6e5);
11655                 MP_WritePhyUshort(sc, 0x06, 0xe2d7);
11656                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
11657                 MP_WritePhyUshort(sc, 0x06, 0x34e1);
11658                 MP_WritePhyUshort(sc, 0x06, 0xe235);
11659                 MP_WritePhyUshort(sc, 0x06, 0xf72b);
11660                 MP_WritePhyUshort(sc, 0x06, 0xe4e2);
11661                 MP_WritePhyUshort(sc, 0x06, 0x34e5);
11662                 MP_WritePhyUshort(sc, 0x06, 0xe235);
11663                 MP_WritePhyUshort(sc, 0x06, 0xd07d);
11664                 MP_WritePhyUshort(sc, 0x06, 0xb0fe);
11665                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
11666                 MP_WritePhyUshort(sc, 0x06, 0x34e1);
11667                 MP_WritePhyUshort(sc, 0x06, 0xe235);
11668                 MP_WritePhyUshort(sc, 0x06, 0xf62b);
11669                 MP_WritePhyUshort(sc, 0x06, 0xe4e2);
11670                 MP_WritePhyUshort(sc, 0x06, 0x34e5);
11671                 MP_WritePhyUshort(sc, 0x06, 0xe235);
11672                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
11673                 MP_WritePhyUshort(sc, 0x06, 0x34e1);
11674                 MP_WritePhyUshort(sc, 0x06, 0xe035);
11675                 MP_WritePhyUshort(sc, 0x06, 0xf626);
11676                 MP_WritePhyUshort(sc, 0x06, 0xe4e0);
11677                 MP_WritePhyUshort(sc, 0x06, 0x34e5);
11678                 MP_WritePhyUshort(sc, 0x06, 0xe035);
11679                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
11680                 MP_WritePhyUshort(sc, 0x06, 0xd6e1);
11681                 MP_WritePhyUshort(sc, 0x06, 0xe2d7);
11682                 MP_WritePhyUshort(sc, 0x06, 0xf628);
11683                 MP_WritePhyUshort(sc, 0x06, 0xe4e2);
11684                 MP_WritePhyUshort(sc, 0x06, 0xd6e5);
11685                 MP_WritePhyUshort(sc, 0x06, 0xe2d7);
11686                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
11687                 MP_WritePhyUshort(sc, 0x06, 0xae20);
11688                 MP_WritePhyUshort(sc, 0x06, 0x0000);
11689                 MP_WritePhyUshort(sc, 0x06, 0x0000);
11690                 MP_WritePhyUshort(sc, 0x06, 0x0000);
11691                 MP_WritePhyUshort(sc, 0x06, 0x0000);
11692                 MP_WritePhyUshort(sc, 0x06, 0x0000);
11693                 MP_WritePhyUshort(sc, 0x06, 0x0000);
11694                 MP_WritePhyUshort(sc, 0x06, 0x0000);
11695                 MP_WritePhyUshort(sc, 0x06, 0x0000);
11696                 MP_WritePhyUshort(sc, 0x06, 0x0000);
11697                 MP_WritePhyUshort(sc, 0x06, 0x0000);
11698                 MP_WritePhyUshort(sc, 0x06, 0x0000);
11699                 MP_WritePhyUshort(sc, 0x06, 0x0000);
11700                 MP_WritePhyUshort(sc, 0x06, 0x0000);
11701                 MP_WritePhyUshort(sc, 0x06, 0x0000);
11702                 MP_WritePhyUshort(sc, 0x06, 0x0000);
11703                 MP_WritePhyUshort(sc, 0x06, 0x0000);
11704                 MP_WritePhyUshort(sc, 0x06, 0xa725);
11705                 MP_WritePhyUshort(sc, 0x06, 0xe50a);
11706                 MP_WritePhyUshort(sc, 0x06, 0x1de5);
11707                 MP_WritePhyUshort(sc, 0x06, 0x0a2c);
11708                 MP_WritePhyUshort(sc, 0x06, 0xe50a);
11709                 MP_WritePhyUshort(sc, 0x06, 0x6de5);
11710                 MP_WritePhyUshort(sc, 0x06, 0x0a1d);
11711                 MP_WritePhyUshort(sc, 0x06, 0xe50a);
11712                 MP_WritePhyUshort(sc, 0x06, 0x1ce5);
11713                 MP_WritePhyUshort(sc, 0x06, 0x0a2d);
11714                 MP_WritePhyUshort(sc, 0x06, 0xa755);
11715                 MP_WritePhyUshort(sc, 0x06, 0x00e2);
11716                 MP_WritePhyUshort(sc, 0x06, 0x3488);
11717                 MP_WritePhyUshort(sc, 0x06, 0xe200);
11718                 MP_WritePhyUshort(sc, 0x06, 0xcce2);
11719                 MP_WritePhyUshort(sc, 0x06, 0x0055);
11720                 MP_WritePhyUshort(sc, 0x06, 0xe020);
11721                 MP_WritePhyUshort(sc, 0x06, 0x55e2);
11722                 MP_WritePhyUshort(sc, 0x06, 0xd600);
11723                 MP_WritePhyUshort(sc, 0x06, 0xe24a);
11724                 PhyRegValue = MP_ReadPhyUshort(sc, 0x01);
11725                 PhyRegValue |= BIT_0;
11726                 MP_WritePhyUshort(sc, 0x01, PhyRegValue);
11727                 PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
11728                 PhyRegValue |= BIT_0;
11729                 MP_WritePhyUshort(sc, 0x00, PhyRegValue);
11730                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
11731                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
11732                 MP_WritePhyUshort(sc, 0x17, 0x2179);
11733                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
11734                 MP_WritePhyUshort(sc, 0x10, 0xf274);
11735                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
11736                 MP_WritePhyUshort(sc, 0x1e, 0x0042);
11737                 MP_WritePhyUshort(sc, 0x15, 0x0f00);
11738                 MP_WritePhyUshort(sc, 0x15, 0x0f00);
11739                 MP_WritePhyUshort(sc, 0x16, 0x7408);
11740                 MP_WritePhyUshort(sc, 0x15, 0x0e00);
11741                 MP_WritePhyUshort(sc, 0x15, 0x0f00);
11742                 MP_WritePhyUshort(sc, 0x15, 0x0f01);
11743                 MP_WritePhyUshort(sc, 0x16, 0x4000);
11744                 MP_WritePhyUshort(sc, 0x15, 0x0e01);
11745                 MP_WritePhyUshort(sc, 0x15, 0x0f01);
11746                 MP_WritePhyUshort(sc, 0x15, 0x0f02);
11747                 MP_WritePhyUshort(sc, 0x16, 0x9400);
11748                 MP_WritePhyUshort(sc, 0x15, 0x0e02);
11749                 MP_WritePhyUshort(sc, 0x15, 0x0f02);
11750                 MP_WritePhyUshort(sc, 0x15, 0x0f03);
11751                 MP_WritePhyUshort(sc, 0x16, 0x7408);
11752                 MP_WritePhyUshort(sc, 0x15, 0x0e03);
11753                 MP_WritePhyUshort(sc, 0x15, 0x0f03);
11754                 MP_WritePhyUshort(sc, 0x15, 0x0f04);
11755                 MP_WritePhyUshort(sc, 0x16, 0x4008);
11756                 MP_WritePhyUshort(sc, 0x15, 0x0e04);
11757                 MP_WritePhyUshort(sc, 0x15, 0x0f04);
11758                 MP_WritePhyUshort(sc, 0x15, 0x0f05);
11759                 MP_WritePhyUshort(sc, 0x16, 0x9400);
11760                 MP_WritePhyUshort(sc, 0x15, 0x0e05);
11761                 MP_WritePhyUshort(sc, 0x15, 0x0f05);
11762                 MP_WritePhyUshort(sc, 0x15, 0x0f06);
11763                 MP_WritePhyUshort(sc, 0x16, 0x0803);
11764                 MP_WritePhyUshort(sc, 0x15, 0x0e06);
11765                 MP_WritePhyUshort(sc, 0x15, 0x0f06);
11766                 MP_WritePhyUshort(sc, 0x15, 0x0d00);
11767                 MP_WritePhyUshort(sc, 0x15, 0x0100);
11768                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
11769                 MP_WritePhyUshort(sc, 0x10, 0xf074);
11770                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
11771                 MP_WritePhyUshort(sc, 0x17, 0x2149);
11772                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
11773                 for (i=0; i<200; i++) {
11774                         DELAY(100);
11775                         PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
11776                         if (PhyRegValue&0x0080)
11777                                 break;
11778                 }
11779                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
11780                 MP_WritePhyUshort(sc, 0x1e, 0x0023);
11781                 PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
11782                 PhyRegValue &= ~(BIT_0);
11783                 if (sc->RequiredSecLanDonglePatch)
11784                         PhyRegValue &= ~(BIT_2);
11785                 MP_WritePhyUshort(sc, 0x17, PhyRegValue);
11786                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
11787                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
11788                 MP_WritePhyUshort(sc, 0x1e, 0x0023);
11789                 PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
11790                 PhyRegValue |= BIT_14;
11791                 MP_WritePhyUshort(sc, 0x17, PhyRegValue);
11792                 MP_WritePhyUshort(sc, 0x1e, 0x0020);
11793                 PhyRegValue = MP_ReadPhyUshort(sc, 0x1b);
11794                 PhyRegValue |= BIT_7;
11795                 MP_WritePhyUshort(sc, 0x1b, PhyRegValue);
11796                 MP_WritePhyUshort(sc, 0x1e, 0x0041);
11797                 MP_WritePhyUshort(sc, 0x15, 0x0e02);
11798                 MP_WritePhyUshort(sc, 0x1e, 0x0028);
11799                 PhyRegValue = MP_ReadPhyUshort(sc, 0x19);
11800                 PhyRegValue |= BIT_15;
11801                 MP_WritePhyUshort(sc, 0x19, PhyRegValue);
11802                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
11803         } else {
11804                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
11805                 MP_WritePhyUshort(sc, 0x00, 0x1800);
11806                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
11807                 MP_WritePhyUshort(sc, 0x1e, 0x0023);
11808                 MP_WritePhyUshort(sc, 0x17, 0x0117);
11809                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
11810                 MP_WritePhyUshort(sc, 0x1E, 0x002C);
11811                 MP_WritePhyUshort(sc, 0x1B, 0x5000);
11812                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
11813                 MP_WritePhyUshort(sc, 0x16, 0x4104);
11814                 for (i = 0; i < 200; i++) {
11815                         DELAY(100);
11816                         PhyRegValue = MP_ReadPhyUshort(sc, 0x1E);
11817                         PhyRegValue &= 0x03FF;
11818                         if (PhyRegValue==0x000C)
11819                                 break;
11820                 }
11821                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
11822                 for (i = 0; i < 200; i++) {
11823                         DELAY(100);
11824                         PhyRegValue = MP_ReadPhyUshort(sc, 0x07);
11825                         if ((PhyRegValue & BIT_5) == 0)
11826                                 break;
11827                 }
11828                 PhyRegValue = MP_ReadPhyUshort(sc, 0x07);
11829                 if (PhyRegValue & BIT_5) {
11830                         MP_WritePhyUshort(sc, 0x1f, 0x0007);
11831                         MP_WritePhyUshort(sc, 0x1e, 0x00a1);
11832                         MP_WritePhyUshort(sc, 0x17, 0x1000);
11833                         MP_WritePhyUshort(sc, 0x17, 0x0000);
11834                         MP_WritePhyUshort(sc, 0x17, 0x2000);
11835                         MP_WritePhyUshort(sc, 0x1e, 0x002f);
11836                         MP_WritePhyUshort(sc, 0x18, 0x9bfb);
11837                         MP_WritePhyUshort(sc, 0x1f, 0x0005);
11838                         MP_WritePhyUshort(sc, 0x07, 0x0000);
11839                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
11840                 }
11841                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
11842                 MP_WritePhyUshort(sc, 0x05, 0xfff6);
11843                 MP_WritePhyUshort(sc, 0x06, 0x0080);
11844                 PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
11845                 PhyRegValue &= ~(BIT_7);
11846                 MP_WritePhyUshort(sc, 0x00, PhyRegValue);
11847                 MP_WritePhyUshort(sc, 0x1f, 0x0002);
11848                 PhyRegValue = MP_ReadPhyUshort(sc, 0x08);
11849                 PhyRegValue &= ~(BIT_7);
11850                 MP_WritePhyUshort(sc, 0x08, PhyRegValue);
11851                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
11852 
11853                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
11854                 MP_WritePhyUshort(sc, 0x1e, 0x0023);
11855                 MP_WritePhyUshort(sc, 0x16, 0x0306);
11856                 MP_WritePhyUshort(sc, 0x16, 0x0307);
11857                 MP_WritePhyUshort(sc, 0x15, 0x000e);
11858                 MP_WritePhyUshort(sc, 0x19, 0x000a);
11859                 MP_WritePhyUshort(sc, 0x15, 0x0010);
11860                 MP_WritePhyUshort(sc, 0x19, 0x0008);
11861                 MP_WritePhyUshort(sc, 0x15, 0x0018);
11862                 MP_WritePhyUshort(sc, 0x19, 0x4801);
11863                 MP_WritePhyUshort(sc, 0x15, 0x0019);
11864                 MP_WritePhyUshort(sc, 0x19, 0x6801);
11865                 MP_WritePhyUshort(sc, 0x15, 0x001a);
11866                 MP_WritePhyUshort(sc, 0x19, 0x66a1);
11867                 MP_WritePhyUshort(sc, 0x15, 0x001f);
11868                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11869                 MP_WritePhyUshort(sc, 0x15, 0x0020);
11870                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11871                 MP_WritePhyUshort(sc, 0x15, 0x0021);
11872                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11873                 MP_WritePhyUshort(sc, 0x15, 0x0022);
11874                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11875                 MP_WritePhyUshort(sc, 0x15, 0x0023);
11876                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11877                 MP_WritePhyUshort(sc, 0x15, 0x0024);
11878                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11879                 MP_WritePhyUshort(sc, 0x15, 0x0025);
11880                 MP_WritePhyUshort(sc, 0x19, 0x64a1);
11881                 MP_WritePhyUshort(sc, 0x15, 0x0026);
11882                 MP_WritePhyUshort(sc, 0x19, 0x40ea);
11883                 MP_WritePhyUshort(sc, 0x15, 0x0027);
11884                 MP_WritePhyUshort(sc, 0x19, 0x4503);
11885                 MP_WritePhyUshort(sc, 0x15, 0x0028);
11886                 MP_WritePhyUshort(sc, 0x19, 0x9f00);
11887                 MP_WritePhyUshort(sc, 0x15, 0x0029);
11888                 MP_WritePhyUshort(sc, 0x19, 0xa631);
11889                 MP_WritePhyUshort(sc, 0x15, 0x002a);
11890                 MP_WritePhyUshort(sc, 0x19, 0x9717);
11891                 MP_WritePhyUshort(sc, 0x15, 0x002b);
11892                 MP_WritePhyUshort(sc, 0x19, 0x302c);
11893                 MP_WritePhyUshort(sc, 0x15, 0x002c);
11894                 MP_WritePhyUshort(sc, 0x19, 0x4802);
11895                 MP_WritePhyUshort(sc, 0x15, 0x002d);
11896                 MP_WritePhyUshort(sc, 0x19, 0x58da);
11897                 MP_WritePhyUshort(sc, 0x15, 0x002e);
11898                 MP_WritePhyUshort(sc, 0x19, 0x400d);
11899                 MP_WritePhyUshort(sc, 0x15, 0x002f);
11900                 MP_WritePhyUshort(sc, 0x19, 0x4488);
11901                 MP_WritePhyUshort(sc, 0x15, 0x0030);
11902                 MP_WritePhyUshort(sc, 0x19, 0x9e00);
11903                 MP_WritePhyUshort(sc, 0x15, 0x0031);
11904                 MP_WritePhyUshort(sc, 0x19, 0x63c8);
11905                 MP_WritePhyUshort(sc, 0x15, 0x0032);
11906                 MP_WritePhyUshort(sc, 0x19, 0x6481);
11907                 MP_WritePhyUshort(sc, 0x15, 0x0033);
11908                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11909                 MP_WritePhyUshort(sc, 0x15, 0x0034);
11910                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11911                 MP_WritePhyUshort(sc, 0x15, 0x0035);
11912                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11913                 MP_WritePhyUshort(sc, 0x15, 0x0036);
11914                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11915                 MP_WritePhyUshort(sc, 0x15, 0x0037);
11916                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11917                 MP_WritePhyUshort(sc, 0x15, 0x0038);
11918                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11919                 MP_WritePhyUshort(sc, 0x15, 0x0039);
11920                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11921                 MP_WritePhyUshort(sc, 0x15, 0x003a);
11922                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11923                 MP_WritePhyUshort(sc, 0x15, 0x003b);
11924                 MP_WritePhyUshort(sc, 0x19, 0x63e8);
11925                 MP_WritePhyUshort(sc, 0x15, 0x003c);
11926                 MP_WritePhyUshort(sc, 0x19, 0x7d00);
11927                 MP_WritePhyUshort(sc, 0x15, 0x003d);
11928                 MP_WritePhyUshort(sc, 0x19, 0x59d4);
11929                 MP_WritePhyUshort(sc, 0x15, 0x003e);
11930                 MP_WritePhyUshort(sc, 0x19, 0x63f8);
11931                 MP_WritePhyUshort(sc, 0x15, 0x0040);
11932                 MP_WritePhyUshort(sc, 0x19, 0x64a1);
11933                 MP_WritePhyUshort(sc, 0x15, 0x0041);
11934                 MP_WritePhyUshort(sc, 0x19, 0x30de);
11935                 MP_WritePhyUshort(sc, 0x15, 0x0044);
11936                 MP_WritePhyUshort(sc, 0x19, 0x480f);
11937                 MP_WritePhyUshort(sc, 0x15, 0x0045);
11938                 MP_WritePhyUshort(sc, 0x19, 0x6800);
11939                 MP_WritePhyUshort(sc, 0x15, 0x0046);
11940                 MP_WritePhyUshort(sc, 0x19, 0x6680);
11941                 MP_WritePhyUshort(sc, 0x15, 0x0047);
11942                 MP_WritePhyUshort(sc, 0x19, 0x7c10);
11943                 MP_WritePhyUshort(sc, 0x15, 0x0048);
11944                 MP_WritePhyUshort(sc, 0x19, 0x63c8);
11945                 MP_WritePhyUshort(sc, 0x15, 0x0049);
11946                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11947                 MP_WritePhyUshort(sc, 0x15, 0x004a);
11948                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11949                 MP_WritePhyUshort(sc, 0x15, 0x004b);
11950                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11951                 MP_WritePhyUshort(sc, 0x15, 0x004c);
11952                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11953                 MP_WritePhyUshort(sc, 0x15, 0x004d);
11954                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11955                 MP_WritePhyUshort(sc, 0x15, 0x004e);
11956                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11957                 MP_WritePhyUshort(sc, 0x15, 0x004f);
11958                 MP_WritePhyUshort(sc, 0x19, 0x40ea);
11959                 MP_WritePhyUshort(sc, 0x15, 0x0050);
11960                 MP_WritePhyUshort(sc, 0x19, 0x4503);
11961                 MP_WritePhyUshort(sc, 0x15, 0x0051);
11962                 MP_WritePhyUshort(sc, 0x19, 0x58ca);
11963                 MP_WritePhyUshort(sc, 0x15, 0x0052);
11964                 MP_WritePhyUshort(sc, 0x19, 0x63c8);
11965                 MP_WritePhyUshort(sc, 0x15, 0x0053);
11966                 MP_WritePhyUshort(sc, 0x19, 0x63d8);
11967                 MP_WritePhyUshort(sc, 0x15, 0x0054);
11968                 MP_WritePhyUshort(sc, 0x19, 0x66a0);
11969                 MP_WritePhyUshort(sc, 0x15, 0x0055);
11970                 MP_WritePhyUshort(sc, 0x19, 0x9f00);
11971                 MP_WritePhyUshort(sc, 0x15, 0x0056);
11972                 MP_WritePhyUshort(sc, 0x19, 0x3000);
11973                 MP_WritePhyUshort(sc, 0x15, 0x00a1);
11974                 MP_WritePhyUshort(sc, 0x19, 0x3044);
11975                 MP_WritePhyUshort(sc, 0x15, 0x00ab);
11976                 MP_WritePhyUshort(sc, 0x19, 0x5820);
11977                 MP_WritePhyUshort(sc, 0x15, 0x00ac);
11978                 MP_WritePhyUshort(sc, 0x19, 0x5e04);
11979                 MP_WritePhyUshort(sc, 0x15, 0x00ad);
11980                 MP_WritePhyUshort(sc, 0x19, 0xb60c);
11981                 MP_WritePhyUshort(sc, 0x15, 0x00af);
11982                 MP_WritePhyUshort(sc, 0x19, 0x000a);
11983                 MP_WritePhyUshort(sc, 0x15, 0x00b2);
11984                 MP_WritePhyUshort(sc, 0x19, 0x30b9);
11985                 MP_WritePhyUshort(sc, 0x15, 0x00b9);
11986                 MP_WritePhyUshort(sc, 0x19, 0x4408);
11987                 MP_WritePhyUshort(sc, 0x15, 0x00ba);
11988                 MP_WritePhyUshort(sc, 0x19, 0x480b);
11989                 MP_WritePhyUshort(sc, 0x15, 0x00bb);
11990                 MP_WritePhyUshort(sc, 0x19, 0x5e00);
11991                 MP_WritePhyUshort(sc, 0x15, 0x00bc);
11992                 MP_WritePhyUshort(sc, 0x19, 0x405f);
11993                 MP_WritePhyUshort(sc, 0x15, 0x00bd);
11994                 MP_WritePhyUshort(sc, 0x19, 0x4448);
11995                 MP_WritePhyUshort(sc, 0x15, 0x00be);
11996                 MP_WritePhyUshort(sc, 0x19, 0x4020);
11997                 MP_WritePhyUshort(sc, 0x15, 0x00bf);
11998                 MP_WritePhyUshort(sc, 0x19, 0x4468);
11999                 MP_WritePhyUshort(sc, 0x15, 0x00c0);
12000                 MP_WritePhyUshort(sc, 0x19, 0x9c02);
12001                 MP_WritePhyUshort(sc, 0x15, 0x00c1);
12002                 MP_WritePhyUshort(sc, 0x19, 0x58a0);
12003                 MP_WritePhyUshort(sc, 0x15, 0x00c2);
12004                 MP_WritePhyUshort(sc, 0x19, 0xb605);
12005                 MP_WritePhyUshort(sc, 0x15, 0x00c3);
12006                 MP_WritePhyUshort(sc, 0x19, 0xc0d3);
12007                 MP_WritePhyUshort(sc, 0x15, 0x00c4);
12008                 MP_WritePhyUshort(sc, 0x19, 0x00e6);
12009                 MP_WritePhyUshort(sc, 0x15, 0x00c5);
12010                 MP_WritePhyUshort(sc, 0x19, 0xdaec);
12011                 MP_WritePhyUshort(sc, 0x15, 0x00c6);
12012                 MP_WritePhyUshort(sc, 0x19, 0x00fa);
12013                 MP_WritePhyUshort(sc, 0x15, 0x00c7);
12014                 MP_WritePhyUshort(sc, 0x19, 0x9df9);
12015                 MP_WritePhyUshort(sc, 0x15, 0x0112);
12016                 MP_WritePhyUshort(sc, 0x19, 0x6421);
12017                 MP_WritePhyUshort(sc, 0x15, 0x0113);
12018                 MP_WritePhyUshort(sc, 0x19, 0x7c08);
12019                 MP_WritePhyUshort(sc, 0x15, 0x0114);
12020                 MP_WritePhyUshort(sc, 0x19, 0x63f0);
12021                 MP_WritePhyUshort(sc, 0x15, 0x0115);
12022                 MP_WritePhyUshort(sc, 0x19, 0x4003);
12023                 MP_WritePhyUshort(sc, 0x15, 0x0116);
12024                 MP_WritePhyUshort(sc, 0x19, 0x4418);
12025                 MP_WritePhyUshort(sc, 0x15, 0x0117);
12026                 MP_WritePhyUshort(sc, 0x19, 0x9b00);
12027                 MP_WritePhyUshort(sc, 0x15, 0x0118);
12028                 MP_WritePhyUshort(sc, 0x19, 0x6461);
12029                 MP_WritePhyUshort(sc, 0x15, 0x0119);
12030                 MP_WritePhyUshort(sc, 0x19, 0x64e1);
12031                 MP_WritePhyUshort(sc, 0x15, 0x011a);
12032                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12033                 MP_WritePhyUshort(sc, 0x15, 0x0150);
12034                 MP_WritePhyUshort(sc, 0x19, 0x7c80);
12035                 MP_WritePhyUshort(sc, 0x15, 0x0151);
12036                 MP_WritePhyUshort(sc, 0x19, 0x6461);
12037                 MP_WritePhyUshort(sc, 0x15, 0x0152);
12038                 MP_WritePhyUshort(sc, 0x19, 0x4003);
12039                 MP_WritePhyUshort(sc, 0x15, 0x0153);
12040                 MP_WritePhyUshort(sc, 0x19, 0x4540);
12041                 MP_WritePhyUshort(sc, 0x15, 0x0154);
12042                 MP_WritePhyUshort(sc, 0x19, 0x9f00);
12043                 MP_WritePhyUshort(sc, 0x15, 0x0155);
12044                 MP_WritePhyUshort(sc, 0x19, 0x9d00);
12045                 MP_WritePhyUshort(sc, 0x15, 0x0156);
12046                 MP_WritePhyUshort(sc, 0x19, 0x7c40);
12047                 MP_WritePhyUshort(sc, 0x15, 0x0157);
12048                 MP_WritePhyUshort(sc, 0x19, 0x6421);
12049                 MP_WritePhyUshort(sc, 0x15, 0x0158);
12050                 MP_WritePhyUshort(sc, 0x19, 0x7c80);
12051                 MP_WritePhyUshort(sc, 0x15, 0x0159);
12052                 MP_WritePhyUshort(sc, 0x19, 0x64a1);
12053                 MP_WritePhyUshort(sc, 0x15, 0x015a);
12054                 MP_WritePhyUshort(sc, 0x19, 0x30fe);
12055                 MP_WritePhyUshort(sc, 0x15, 0x029c);
12056                 MP_WritePhyUshort(sc, 0x19, 0x0070);
12057                 MP_WritePhyUshort(sc, 0x15, 0x02b2);
12058                 MP_WritePhyUshort(sc, 0x19, 0x005a);
12059                 MP_WritePhyUshort(sc, 0x15, 0x02bd);
12060                 MP_WritePhyUshort(sc, 0x19, 0xa522);
12061                 MP_WritePhyUshort(sc, 0x15, 0x02ce);
12062                 MP_WritePhyUshort(sc, 0x19, 0xb63e);
12063                 MP_WritePhyUshort(sc, 0x15, 0x02d9);
12064                 MP_WritePhyUshort(sc, 0x19, 0x32df);
12065                 MP_WritePhyUshort(sc, 0x15, 0x02df);
12066                 MP_WritePhyUshort(sc, 0x19, 0x4500);
12067                 MP_WritePhyUshort(sc, 0x15, 0x02f4);
12068                 MP_WritePhyUshort(sc, 0x19, 0xb618);
12069                 MP_WritePhyUshort(sc, 0x15, 0x02fb);
12070                 MP_WritePhyUshort(sc, 0x19, 0xb900);
12071                 MP_WritePhyUshort(sc, 0x15, 0x02fc);
12072                 MP_WritePhyUshort(sc, 0x19, 0x49b5);
12073                 MP_WritePhyUshort(sc, 0x15, 0x02fd);
12074                 MP_WritePhyUshort(sc, 0x19, 0x6812);
12075                 MP_WritePhyUshort(sc, 0x15, 0x02fe);
12076                 MP_WritePhyUshort(sc, 0x19, 0x66a0);
12077                 MP_WritePhyUshort(sc, 0x15, 0x02ff);
12078                 MP_WritePhyUshort(sc, 0x19, 0x9900);
12079                 MP_WritePhyUshort(sc, 0x15, 0x0300);
12080                 MP_WritePhyUshort(sc, 0x19, 0x64a0);
12081                 MP_WritePhyUshort(sc, 0x15, 0x0301);
12082                 MP_WritePhyUshort(sc, 0x19, 0x3316);
12083                 MP_WritePhyUshort(sc, 0x15, 0x0308);
12084                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12085                 MP_WritePhyUshort(sc, 0x15, 0x030c);
12086                 MP_WritePhyUshort(sc, 0x19, 0x3000);
12087                 MP_WritePhyUshort(sc, 0x15, 0x0312);
12088                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12089                 MP_WritePhyUshort(sc, 0x15, 0x0313);
12090                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12091                 MP_WritePhyUshort(sc, 0x15, 0x0314);
12092                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12093                 MP_WritePhyUshort(sc, 0x15, 0x0315);
12094                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12095                 MP_WritePhyUshort(sc, 0x15, 0x0316);
12096                 MP_WritePhyUshort(sc, 0x19, 0x49b5);
12097                 MP_WritePhyUshort(sc, 0x15, 0x0317);
12098                 MP_WritePhyUshort(sc, 0x19, 0x7d00);
12099                 MP_WritePhyUshort(sc, 0x15, 0x0318);
12100                 MP_WritePhyUshort(sc, 0x19, 0x4d00);
12101                 MP_WritePhyUshort(sc, 0x15, 0x0319);
12102                 MP_WritePhyUshort(sc, 0x19, 0x6810);
12103                 MP_WritePhyUshort(sc, 0x15, 0x031a);
12104                 MP_WritePhyUshort(sc, 0x19, 0x6c08);
12105                 MP_WritePhyUshort(sc, 0x15, 0x031b);
12106                 MP_WritePhyUshort(sc, 0x19, 0x4925);
12107                 MP_WritePhyUshort(sc, 0x15, 0x031c);
12108                 MP_WritePhyUshort(sc, 0x19, 0x403b);
12109                 MP_WritePhyUshort(sc, 0x15, 0x031d);
12110                 MP_WritePhyUshort(sc, 0x19, 0xa602);
12111                 MP_WritePhyUshort(sc, 0x15, 0x031e);
12112                 MP_WritePhyUshort(sc, 0x19, 0x402f);
12113                 MP_WritePhyUshort(sc, 0x15, 0x031f);
12114                 MP_WritePhyUshort(sc, 0x19, 0x4484);
12115                 MP_WritePhyUshort(sc, 0x15, 0x0320);
12116                 MP_WritePhyUshort(sc, 0x19, 0x40c8);
12117                 MP_WritePhyUshort(sc, 0x15, 0x0321);
12118                 MP_WritePhyUshort(sc, 0x19, 0x44c4);
12119                 MP_WritePhyUshort(sc, 0x15, 0x0322);
12120                 MP_WritePhyUshort(sc, 0x19, 0x404f);
12121                 MP_WritePhyUshort(sc, 0x15, 0x0323);
12122                 MP_WritePhyUshort(sc, 0x19, 0x44c8);
12123                 MP_WritePhyUshort(sc, 0x15, 0x0324);
12124                 MP_WritePhyUshort(sc, 0x19, 0xd64f);
12125                 MP_WritePhyUshort(sc, 0x15, 0x0325);
12126                 MP_WritePhyUshort(sc, 0x19, 0x00e7);
12127                 MP_WritePhyUshort(sc, 0x15, 0x0326);
12128                 MP_WritePhyUshort(sc, 0x19, 0x7c08);
12129                 MP_WritePhyUshort(sc, 0x15, 0x0327);
12130                 MP_WritePhyUshort(sc, 0x19, 0x8203);
12131                 MP_WritePhyUshort(sc, 0x15, 0x0328);
12132                 MP_WritePhyUshort(sc, 0x19, 0x4d48);
12133                 MP_WritePhyUshort(sc, 0x15, 0x0329);
12134                 MP_WritePhyUshort(sc, 0x19, 0x332b);
12135                 MP_WritePhyUshort(sc, 0x15, 0x032a);
12136                 MP_WritePhyUshort(sc, 0x19, 0x4d40);
12137                 MP_WritePhyUshort(sc, 0x15, 0x032c);
12138                 MP_WritePhyUshort(sc, 0x19, 0x00f8);
12139                 MP_WritePhyUshort(sc, 0x15, 0x032d);
12140                 MP_WritePhyUshort(sc, 0x19, 0x82b2);
12141                 MP_WritePhyUshort(sc, 0x15, 0x032f);
12142                 MP_WritePhyUshort(sc, 0x19, 0x00b0);
12143                 MP_WritePhyUshort(sc, 0x15, 0x0332);
12144                 MP_WritePhyUshort(sc, 0x19, 0x91f2);
12145                 MP_WritePhyUshort(sc, 0x15, 0x033f);
12146                 MP_WritePhyUshort(sc, 0x19, 0xb6cd);
12147                 MP_WritePhyUshort(sc, 0x15, 0x0340);
12148                 MP_WritePhyUshort(sc, 0x19, 0x9e01);
12149                 MP_WritePhyUshort(sc, 0x15, 0x0341);
12150                 MP_WritePhyUshort(sc, 0x19, 0xd11d);
12151                 MP_WritePhyUshort(sc, 0x15, 0x0342);
12152                 MP_WritePhyUshort(sc, 0x19, 0x009d);
12153                 MP_WritePhyUshort(sc, 0x15, 0x0343);
12154                 MP_WritePhyUshort(sc, 0x19, 0xbb1c);
12155                 MP_WritePhyUshort(sc, 0x15, 0x0344);
12156                 MP_WritePhyUshort(sc, 0x19, 0x8102);
12157                 MP_WritePhyUshort(sc, 0x15, 0x0345);
12158                 MP_WritePhyUshort(sc, 0x19, 0x3348);
12159                 MP_WritePhyUshort(sc, 0x15, 0x0346);
12160                 MP_WritePhyUshort(sc, 0x19, 0xa231);
12161                 MP_WritePhyUshort(sc, 0x15, 0x0347);
12162                 MP_WritePhyUshort(sc, 0x19, 0x335b);
12163                 MP_WritePhyUshort(sc, 0x15, 0x0348);
12164                 MP_WritePhyUshort(sc, 0x19, 0x91f7);
12165                 MP_WritePhyUshort(sc, 0x15, 0x0349);
12166                 MP_WritePhyUshort(sc, 0x19, 0xc218);
12167                 MP_WritePhyUshort(sc, 0x15, 0x034a);
12168                 MP_WritePhyUshort(sc, 0x19, 0x00f5);
12169                 MP_WritePhyUshort(sc, 0x15, 0x034b);
12170                 MP_WritePhyUshort(sc, 0x19, 0x335b);
12171                 MP_WritePhyUshort(sc, 0x15, 0x034c);
12172                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12173                 MP_WritePhyUshort(sc, 0x15, 0x034d);
12174                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12175                 MP_WritePhyUshort(sc, 0x15, 0x034e);
12176                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12177                 MP_WritePhyUshort(sc, 0x15, 0x034f);
12178                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12179                 MP_WritePhyUshort(sc, 0x15, 0x0350);
12180                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12181                 MP_WritePhyUshort(sc, 0x15, 0x035b);
12182                 MP_WritePhyUshort(sc, 0x19, 0xa23c);
12183                 MP_WritePhyUshort(sc, 0x15, 0x035c);
12184                 MP_WritePhyUshort(sc, 0x19, 0x7c08);
12185                 MP_WritePhyUshort(sc, 0x15, 0x035d);
12186                 MP_WritePhyUshort(sc, 0x19, 0x4c00);
12187                 MP_WritePhyUshort(sc, 0x15, 0x035e);
12188                 MP_WritePhyUshort(sc, 0x19, 0x3397);
12189                 MP_WritePhyUshort(sc, 0x15, 0x0363);
12190                 MP_WritePhyUshort(sc, 0x19, 0xb6a9);
12191                 MP_WritePhyUshort(sc, 0x15, 0x0366);
12192                 MP_WritePhyUshort(sc, 0x19, 0x00f5);
12193                 MP_WritePhyUshort(sc, 0x15, 0x0382);
12194                 MP_WritePhyUshort(sc, 0x19, 0x7c40);
12195                 MP_WritePhyUshort(sc, 0x15, 0x0388);
12196                 MP_WritePhyUshort(sc, 0x19, 0x0084);
12197                 MP_WritePhyUshort(sc, 0x15, 0x0389);
12198                 MP_WritePhyUshort(sc, 0x19, 0xdd17);
12199                 MP_WritePhyUshort(sc, 0x15, 0x038a);
12200                 MP_WritePhyUshort(sc, 0x19, 0x000b);
12201                 MP_WritePhyUshort(sc, 0x15, 0x038b);
12202                 MP_WritePhyUshort(sc, 0x19, 0xa10a);
12203                 MP_WritePhyUshort(sc, 0x15, 0x038c);
12204                 MP_WritePhyUshort(sc, 0x19, 0x337e);
12205                 MP_WritePhyUshort(sc, 0x15, 0x038d);
12206                 MP_WritePhyUshort(sc, 0x19, 0x6c0b);
12207                 MP_WritePhyUshort(sc, 0x15, 0x038e);
12208                 MP_WritePhyUshort(sc, 0x19, 0xa107);
12209                 MP_WritePhyUshort(sc, 0x15, 0x038f);
12210                 MP_WritePhyUshort(sc, 0x19, 0x6c08);
12211                 MP_WritePhyUshort(sc, 0x15, 0x0390);
12212                 MP_WritePhyUshort(sc, 0x19, 0xc017);
12213                 MP_WritePhyUshort(sc, 0x15, 0x0391);
12214                 MP_WritePhyUshort(sc, 0x19, 0x0004);
12215                 MP_WritePhyUshort(sc, 0x15, 0x0392);
12216                 MP_WritePhyUshort(sc, 0x19, 0xd64f);
12217                 MP_WritePhyUshort(sc, 0x15, 0x0393);
12218                 MP_WritePhyUshort(sc, 0x19, 0x00f4);
12219                 MP_WritePhyUshort(sc, 0x15, 0x0397);
12220                 MP_WritePhyUshort(sc, 0x19, 0x4098);
12221                 MP_WritePhyUshort(sc, 0x15, 0x0398);
12222                 MP_WritePhyUshort(sc, 0x19, 0x4408);
12223                 MP_WritePhyUshort(sc, 0x15, 0x0399);
12224                 MP_WritePhyUshort(sc, 0x19, 0x55bf);
12225                 MP_WritePhyUshort(sc, 0x15, 0x039a);
12226                 MP_WritePhyUshort(sc, 0x19, 0x4bb9);
12227                 MP_WritePhyUshort(sc, 0x15, 0x039b);
12228                 MP_WritePhyUshort(sc, 0x19, 0x6810);
12229                 MP_WritePhyUshort(sc, 0x15, 0x039c);
12230                 MP_WritePhyUshort(sc, 0x19, 0x4b29);
12231                 MP_WritePhyUshort(sc, 0x15, 0x039d);
12232                 MP_WritePhyUshort(sc, 0x19, 0x4041);
12233                 MP_WritePhyUshort(sc, 0x15, 0x039e);
12234                 MP_WritePhyUshort(sc, 0x19, 0x442a);
12235                 MP_WritePhyUshort(sc, 0x15, 0x039f);
12236                 MP_WritePhyUshort(sc, 0x19, 0x4029);
12237                 MP_WritePhyUshort(sc, 0x15, 0x03aa);
12238                 MP_WritePhyUshort(sc, 0x19, 0x33b8);
12239                 MP_WritePhyUshort(sc, 0x15, 0x03b6);
12240                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12241                 MP_WritePhyUshort(sc, 0x15, 0x03b7);
12242                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12243                 MP_WritePhyUshort(sc, 0x15, 0x03b8);
12244                 MP_WritePhyUshort(sc, 0x19, 0x543f);
12245                 MP_WritePhyUshort(sc, 0x15, 0x03b9);
12246                 MP_WritePhyUshort(sc, 0x19, 0x499a);
12247                 MP_WritePhyUshort(sc, 0x15, 0x03ba);
12248                 MP_WritePhyUshort(sc, 0x19, 0x7c40);
12249                 MP_WritePhyUshort(sc, 0x15, 0x03bb);
12250                 MP_WritePhyUshort(sc, 0x19, 0x4c40);
12251                 MP_WritePhyUshort(sc, 0x15, 0x03bc);
12252                 MP_WritePhyUshort(sc, 0x19, 0x490a);
12253                 MP_WritePhyUshort(sc, 0x15, 0x03bd);
12254                 MP_WritePhyUshort(sc, 0x19, 0x405e);
12255                 MP_WritePhyUshort(sc, 0x15, 0x03c2);
12256                 MP_WritePhyUshort(sc, 0x19, 0x9a03);
12257                 MP_WritePhyUshort(sc, 0x15, 0x03c4);
12258                 MP_WritePhyUshort(sc, 0x19, 0x0015);
12259                 MP_WritePhyUshort(sc, 0x15, 0x03c5);
12260                 MP_WritePhyUshort(sc, 0x19, 0x9e03);
12261                 MP_WritePhyUshort(sc, 0x15, 0x03c8);
12262                 MP_WritePhyUshort(sc, 0x19, 0x9cf7);
12263                 MP_WritePhyUshort(sc, 0x15, 0x03c9);
12264                 MP_WritePhyUshort(sc, 0x19, 0x7c12);
12265                 MP_WritePhyUshort(sc, 0x15, 0x03ca);
12266                 MP_WritePhyUshort(sc, 0x19, 0x4c52);
12267                 MP_WritePhyUshort(sc, 0x15, 0x03cb);
12268                 MP_WritePhyUshort(sc, 0x19, 0x4458);
12269                 MP_WritePhyUshort(sc, 0x15, 0x03cd);
12270                 MP_WritePhyUshort(sc, 0x19, 0x4c40);
12271                 MP_WritePhyUshort(sc, 0x15, 0x03ce);
12272                 MP_WritePhyUshort(sc, 0x19, 0x33bf);
12273                 MP_WritePhyUshort(sc, 0x15, 0x03cf);
12274                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12275                 MP_WritePhyUshort(sc, 0x15, 0x03d0);
12276                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12277                 MP_WritePhyUshort(sc, 0x15, 0x03d1);
12278                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12279                 MP_WritePhyUshort(sc, 0x15, 0x03d5);
12280                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12281                 MP_WritePhyUshort(sc, 0x15, 0x03d6);
12282                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12283                 MP_WritePhyUshort(sc, 0x15, 0x03d7);
12284                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12285                 MP_WritePhyUshort(sc, 0x15, 0x03d8);
12286                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12287                 MP_WritePhyUshort(sc, 0x15, 0x03d9);
12288                 MP_WritePhyUshort(sc, 0x19, 0x49bb);
12289                 MP_WritePhyUshort(sc, 0x15, 0x03da);
12290                 MP_WritePhyUshort(sc, 0x19, 0x4478);
12291                 MP_WritePhyUshort(sc, 0x15, 0x03db);
12292                 MP_WritePhyUshort(sc, 0x19, 0x492b);
12293                 MP_WritePhyUshort(sc, 0x15, 0x03dc);
12294                 MP_WritePhyUshort(sc, 0x19, 0x7c01);
12295                 MP_WritePhyUshort(sc, 0x15, 0x03dd);
12296                 MP_WritePhyUshort(sc, 0x19, 0x4c00);
12297                 MP_WritePhyUshort(sc, 0x15, 0x03de);
12298                 MP_WritePhyUshort(sc, 0x19, 0xbd1a);
12299                 MP_WritePhyUshort(sc, 0x15, 0x03df);
12300                 MP_WritePhyUshort(sc, 0x19, 0xc428);
12301                 MP_WritePhyUshort(sc, 0x15, 0x03e0);
12302                 MP_WritePhyUshort(sc, 0x19, 0x0008);
12303                 MP_WritePhyUshort(sc, 0x15, 0x03e1);
12304                 MP_WritePhyUshort(sc, 0x19, 0x9cfd);
12305                 MP_WritePhyUshort(sc, 0x15, 0x03e2);
12306                 MP_WritePhyUshort(sc, 0x19, 0x7c12);
12307                 MP_WritePhyUshort(sc, 0x15, 0x03e3);
12308                 MP_WritePhyUshort(sc, 0x19, 0x4c52);
12309                 MP_WritePhyUshort(sc, 0x15, 0x03e4);
12310                 MP_WritePhyUshort(sc, 0x19, 0x4458);
12311                 MP_WritePhyUshort(sc, 0x15, 0x03e5);
12312                 MP_WritePhyUshort(sc, 0x19, 0x7c12);
12313                 MP_WritePhyUshort(sc, 0x15, 0x03e6);
12314                 MP_WritePhyUshort(sc, 0x19, 0x4c40);
12315                 MP_WritePhyUshort(sc, 0x15, 0x03e7);
12316                 MP_WritePhyUshort(sc, 0x19, 0x33de);
12317                 MP_WritePhyUshort(sc, 0x15, 0x03e8);
12318                 MP_WritePhyUshort(sc, 0x19, 0xc218);
12319                 MP_WritePhyUshort(sc, 0x15, 0x03e9);
12320                 MP_WritePhyUshort(sc, 0x19, 0x0002);
12321                 MP_WritePhyUshort(sc, 0x15, 0x03ea);
12322                 MP_WritePhyUshort(sc, 0x19, 0x32df);
12323                 MP_WritePhyUshort(sc, 0x15, 0x03eb);
12324                 MP_WritePhyUshort(sc, 0x19, 0x3316);
12325                 MP_WritePhyUshort(sc, 0x15, 0x03ec);
12326                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12327                 MP_WritePhyUshort(sc, 0x15, 0x03ed);
12328                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12329                 MP_WritePhyUshort(sc, 0x15, 0x03ee);
12330                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12331                 MP_WritePhyUshort(sc, 0x15, 0x03ef);
12332                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12333                 MP_WritePhyUshort(sc, 0x15, 0x03f7);
12334                 MP_WritePhyUshort(sc, 0x19, 0x330c);
12335                 MP_WritePhyUshort(sc, 0x16, 0x0306);
12336                 MP_WritePhyUshort(sc, 0x16, 0x0300);
12337 
12338                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
12339                 MP_WritePhyUshort(sc, 0x05, 0xfff6);
12340                 MP_WritePhyUshort(sc, 0x06, 0x0080);
12341                 MP_WritePhyUshort(sc, 0x05, 0x8000);
12342                 MP_WritePhyUshort(sc, 0x06, 0x0280);
12343                 MP_WritePhyUshort(sc, 0x06, 0x48f7);
12344                 MP_WritePhyUshort(sc, 0x06, 0x00e0);
12345                 MP_WritePhyUshort(sc, 0x06, 0xfff7);
12346                 MP_WritePhyUshort(sc, 0x06, 0xa080);
12347                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
12348                 MP_WritePhyUshort(sc, 0x06, 0xf602);
12349                 MP_WritePhyUshort(sc, 0x06, 0x0200);
12350                 MP_WritePhyUshort(sc, 0x06, 0x0280);
12351                 MP_WritePhyUshort(sc, 0x06, 0x9002);
12352                 MP_WritePhyUshort(sc, 0x06, 0x0224);
12353                 MP_WritePhyUshort(sc, 0x06, 0x0202);
12354                 MP_WritePhyUshort(sc, 0x06, 0x3402);
12355                 MP_WritePhyUshort(sc, 0x06, 0x027f);
12356                 MP_WritePhyUshort(sc, 0x06, 0x0280);
12357                 MP_WritePhyUshort(sc, 0x06, 0xa602);
12358                 MP_WritePhyUshort(sc, 0x06, 0x80bf);
12359                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
12360                 MP_WritePhyUshort(sc, 0x06, 0x88e1);
12361                 MP_WritePhyUshort(sc, 0x06, 0x8b89);
12362                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
12363                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
12364                 MP_WritePhyUshort(sc, 0x06, 0x8a1e);
12365                 MP_WritePhyUshort(sc, 0x06, 0x01e1);
12366                 MP_WritePhyUshort(sc, 0x06, 0x8b8b);
12367                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
12368                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
12369                 MP_WritePhyUshort(sc, 0x06, 0x8c1e);
12370                 MP_WritePhyUshort(sc, 0x06, 0x01e1);
12371                 MP_WritePhyUshort(sc, 0x06, 0x8b8d);
12372                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
12373                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
12374                 MP_WritePhyUshort(sc, 0x06, 0x8e1e);
12375                 MP_WritePhyUshort(sc, 0x06, 0x01a0);
12376                 MP_WritePhyUshort(sc, 0x06, 0x00c7);
12377                 MP_WritePhyUshort(sc, 0x06, 0xaebb);
12378                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
12379                 MP_WritePhyUshort(sc, 0x06, 0xe600);
12380                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
12381                 MP_WritePhyUshort(sc, 0x06, 0xee03);
12382                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
12383                 MP_WritePhyUshort(sc, 0x06, 0xefb8);
12384                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
12385                 MP_WritePhyUshort(sc, 0x06, 0xe902);
12386                 MP_WritePhyUshort(sc, 0x06, 0xee8b);
12387                 MP_WritePhyUshort(sc, 0x06, 0x8285);
12388                 MP_WritePhyUshort(sc, 0x06, 0xee8b);
12389                 MP_WritePhyUshort(sc, 0x06, 0x8520);
12390                 MP_WritePhyUshort(sc, 0x06, 0xee8b);
12391                 MP_WritePhyUshort(sc, 0x06, 0x8701);
12392                 MP_WritePhyUshort(sc, 0x06, 0xd481);
12393                 MP_WritePhyUshort(sc, 0x06, 0x35e4);
12394                 MP_WritePhyUshort(sc, 0x06, 0x8b94);
12395                 MP_WritePhyUshort(sc, 0x06, 0xe58b);
12396                 MP_WritePhyUshort(sc, 0x06, 0x95bf);
12397                 MP_WritePhyUshort(sc, 0x06, 0x8b88);
12398                 MP_WritePhyUshort(sc, 0x06, 0xec00);
12399                 MP_WritePhyUshort(sc, 0x06, 0x19a9);
12400                 MP_WritePhyUshort(sc, 0x06, 0x8b90);
12401                 MP_WritePhyUshort(sc, 0x06, 0xf9ee);
12402                 MP_WritePhyUshort(sc, 0x06, 0xfff6);
12403                 MP_WritePhyUshort(sc, 0x06, 0x00ee);
12404                 MP_WritePhyUshort(sc, 0x06, 0xfff7);
12405                 MP_WritePhyUshort(sc, 0x06, 0xffe0);
12406                 MP_WritePhyUshort(sc, 0x06, 0xe140);
12407                 MP_WritePhyUshort(sc, 0x06, 0xe1e1);
12408                 MP_WritePhyUshort(sc, 0x06, 0x41f7);
12409                 MP_WritePhyUshort(sc, 0x06, 0x2ff6);
12410                 MP_WritePhyUshort(sc, 0x06, 0x28e4);
12411                 MP_WritePhyUshort(sc, 0x06, 0xe140);
12412                 MP_WritePhyUshort(sc, 0x06, 0xe5e1);
12413                 MP_WritePhyUshort(sc, 0x06, 0x4104);
12414                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
12415                 MP_WritePhyUshort(sc, 0x06, 0x8b89);
12416                 MP_WritePhyUshort(sc, 0x06, 0xad20);
12417                 MP_WritePhyUshort(sc, 0x06, 0x0dee);
12418                 MP_WritePhyUshort(sc, 0x06, 0x8b89);
12419                 MP_WritePhyUshort(sc, 0x06, 0x0002);
12420                 MP_WritePhyUshort(sc, 0x06, 0x82f4);
12421                 MP_WritePhyUshort(sc, 0x06, 0x021f);
12422                 MP_WritePhyUshort(sc, 0x06, 0x4102);
12423                 MP_WritePhyUshort(sc, 0x06, 0x2812);
12424                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
12425                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
12426                 MP_WritePhyUshort(sc, 0x06, 0x8b8d);
12427                 MP_WritePhyUshort(sc, 0x06, 0xad20);
12428                 MP_WritePhyUshort(sc, 0x06, 0x10ee);
12429                 MP_WritePhyUshort(sc, 0x06, 0x8b8d);
12430                 MP_WritePhyUshort(sc, 0x06, 0x0002);
12431                 MP_WritePhyUshort(sc, 0x06, 0x139d);
12432                 MP_WritePhyUshort(sc, 0x06, 0x0281);
12433                 MP_WritePhyUshort(sc, 0x06, 0xd602);
12434                 MP_WritePhyUshort(sc, 0x06, 0x1f99);
12435                 MP_WritePhyUshort(sc, 0x06, 0x0227);
12436                 MP_WritePhyUshort(sc, 0x06, 0xeafc);
12437                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
12438                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
12439                 MP_WritePhyUshort(sc, 0x06, 0x8ead);
12440                 MP_WritePhyUshort(sc, 0x06, 0x2014);
12441                 MP_WritePhyUshort(sc, 0x06, 0xf620);
12442                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
12443                 MP_WritePhyUshort(sc, 0x06, 0x8e02);
12444                 MP_WritePhyUshort(sc, 0x06, 0x8104);
12445                 MP_WritePhyUshort(sc, 0x06, 0x021b);
12446                 MP_WritePhyUshort(sc, 0x06, 0xf402);
12447                 MP_WritePhyUshort(sc, 0x06, 0x2c9c);
12448                 MP_WritePhyUshort(sc, 0x06, 0x0281);
12449                 MP_WritePhyUshort(sc, 0x06, 0x7902);
12450                 MP_WritePhyUshort(sc, 0x06, 0x8443);
12451                 MP_WritePhyUshort(sc, 0x06, 0xad22);
12452                 MP_WritePhyUshort(sc, 0x06, 0x11f6);
12453                 MP_WritePhyUshort(sc, 0x06, 0x22e4);
12454                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
12455                 MP_WritePhyUshort(sc, 0x06, 0x022c);
12456                 MP_WritePhyUshort(sc, 0x06, 0x4602);
12457                 MP_WritePhyUshort(sc, 0x06, 0x2ac5);
12458                 MP_WritePhyUshort(sc, 0x06, 0x0229);
12459                 MP_WritePhyUshort(sc, 0x06, 0x2002);
12460                 MP_WritePhyUshort(sc, 0x06, 0x2b91);
12461                 MP_WritePhyUshort(sc, 0x06, 0xad25);
12462                 MP_WritePhyUshort(sc, 0x06, 0x11f6);
12463                 MP_WritePhyUshort(sc, 0x06, 0x25e4);
12464                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
12465                 MP_WritePhyUshort(sc, 0x06, 0x0284);
12466                 MP_WritePhyUshort(sc, 0x06, 0xe202);
12467                 MP_WritePhyUshort(sc, 0x06, 0x043a);
12468                 MP_WritePhyUshort(sc, 0x06, 0x021a);
12469                 MP_WritePhyUshort(sc, 0x06, 0x5902);
12470                 MP_WritePhyUshort(sc, 0x06, 0x2bfc);
12471                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
12472                 MP_WritePhyUshort(sc, 0x06, 0xf8fa);
12473                 MP_WritePhyUshort(sc, 0x06, 0xef69);
12474                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
12475                 MP_WritePhyUshort(sc, 0x06, 0x00e1);
12476                 MP_WritePhyUshort(sc, 0x06, 0xe001);
12477                 MP_WritePhyUshort(sc, 0x06, 0xad27);
12478                 MP_WritePhyUshort(sc, 0x06, 0x1fd1);
12479                 MP_WritePhyUshort(sc, 0x06, 0x01bf);
12480                 MP_WritePhyUshort(sc, 0x06, 0x8638);
12481                 MP_WritePhyUshort(sc, 0x06, 0x022f);
12482                 MP_WritePhyUshort(sc, 0x06, 0x50e0);
12483                 MP_WritePhyUshort(sc, 0x06, 0xe020);
12484                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
12485                 MP_WritePhyUshort(sc, 0x06, 0x21ad);
12486                 MP_WritePhyUshort(sc, 0x06, 0x200e);
12487                 MP_WritePhyUshort(sc, 0x06, 0xd100);
12488                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
12489                 MP_WritePhyUshort(sc, 0x06, 0x3802);
12490                 MP_WritePhyUshort(sc, 0x06, 0x2f50);
12491                 MP_WritePhyUshort(sc, 0x06, 0xbf3d);
12492                 MP_WritePhyUshort(sc, 0x06, 0x3902);
12493                 MP_WritePhyUshort(sc, 0x06, 0x2eb0);
12494                 MP_WritePhyUshort(sc, 0x06, 0xef96);
12495                 MP_WritePhyUshort(sc, 0x06, 0xfefc);
12496                 MP_WritePhyUshort(sc, 0x06, 0x0402);
12497                 MP_WritePhyUshort(sc, 0x06, 0x8591);
12498                 MP_WritePhyUshort(sc, 0x06, 0x0281);
12499                 MP_WritePhyUshort(sc, 0x06, 0x3c05);
12500                 MP_WritePhyUshort(sc, 0x06, 0xf8fa);
12501                 MP_WritePhyUshort(sc, 0x06, 0xef69);
12502                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
12503                 MP_WritePhyUshort(sc, 0x06, 0xfee1);
12504                 MP_WritePhyUshort(sc, 0x06, 0xe2ff);
12505                 MP_WritePhyUshort(sc, 0x06, 0xad2d);
12506                 MP_WritePhyUshort(sc, 0x06, 0x1ae0);
12507                 MP_WritePhyUshort(sc, 0x06, 0xe14e);
12508                 MP_WritePhyUshort(sc, 0x06, 0xe1e1);
12509                 MP_WritePhyUshort(sc, 0x06, 0x4fac);
12510                 MP_WritePhyUshort(sc, 0x06, 0x2d22);
12511                 MP_WritePhyUshort(sc, 0x06, 0xf603);
12512                 MP_WritePhyUshort(sc, 0x06, 0x0203);
12513                 MP_WritePhyUshort(sc, 0x06, 0x36f7);
12514                 MP_WritePhyUshort(sc, 0x06, 0x03f7);
12515                 MP_WritePhyUshort(sc, 0x06, 0x06bf);
12516                 MP_WritePhyUshort(sc, 0x06, 0x8622);
12517                 MP_WritePhyUshort(sc, 0x06, 0x022e);
12518                 MP_WritePhyUshort(sc, 0x06, 0xb0ae);
12519                 MP_WritePhyUshort(sc, 0x06, 0x11e0);
12520                 MP_WritePhyUshort(sc, 0x06, 0xe14e);
12521                 MP_WritePhyUshort(sc, 0x06, 0xe1e1);
12522                 MP_WritePhyUshort(sc, 0x06, 0x4fad);
12523                 MP_WritePhyUshort(sc, 0x06, 0x2d08);
12524                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
12525                 MP_WritePhyUshort(sc, 0x06, 0x2d02);
12526                 MP_WritePhyUshort(sc, 0x06, 0x2eb0);
12527                 MP_WritePhyUshort(sc, 0x06, 0xf606);
12528                 MP_WritePhyUshort(sc, 0x06, 0xef96);
12529                 MP_WritePhyUshort(sc, 0x06, 0xfefc);
12530                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
12531                 MP_WritePhyUshort(sc, 0x06, 0xf9fa);
12532                 MP_WritePhyUshort(sc, 0x06, 0xef69);
12533                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
12534                 MP_WritePhyUshort(sc, 0x06, 0x87ad);
12535                 MP_WritePhyUshort(sc, 0x06, 0x204c);
12536                 MP_WritePhyUshort(sc, 0x06, 0xd200);
12537                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
12538                 MP_WritePhyUshort(sc, 0x06, 0x0058);
12539                 MP_WritePhyUshort(sc, 0x06, 0x010c);
12540                 MP_WritePhyUshort(sc, 0x06, 0x021e);
12541                 MP_WritePhyUshort(sc, 0x06, 0x20e0);
12542                 MP_WritePhyUshort(sc, 0x06, 0xe000);
12543                 MP_WritePhyUshort(sc, 0x06, 0x5810);
12544                 MP_WritePhyUshort(sc, 0x06, 0x1e20);
12545                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
12546                 MP_WritePhyUshort(sc, 0x06, 0x3658);
12547                 MP_WritePhyUshort(sc, 0x06, 0x031e);
12548                 MP_WritePhyUshort(sc, 0x06, 0x20e0);
12549                 MP_WritePhyUshort(sc, 0x06, 0xe022);
12550                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
12551                 MP_WritePhyUshort(sc, 0x06, 0x2358);
12552                 MP_WritePhyUshort(sc, 0x06, 0xe01e);
12553                 MP_WritePhyUshort(sc, 0x06, 0x20e0);
12554                 MP_WritePhyUshort(sc, 0x06, 0x8ae6);
12555                 MP_WritePhyUshort(sc, 0x06, 0x1f02);
12556                 MP_WritePhyUshort(sc, 0x06, 0x9e22);
12557                 MP_WritePhyUshort(sc, 0x06, 0xe68a);
12558                 MP_WritePhyUshort(sc, 0x06, 0xe6ad);
12559                 MP_WritePhyUshort(sc, 0x06, 0x3214);
12560                 MP_WritePhyUshort(sc, 0x06, 0xad34);
12561                 MP_WritePhyUshort(sc, 0x06, 0x11ef);
12562                 MP_WritePhyUshort(sc, 0x06, 0x0258);
12563                 MP_WritePhyUshort(sc, 0x06, 0x039e);
12564                 MP_WritePhyUshort(sc, 0x06, 0x07ad);
12565                 MP_WritePhyUshort(sc, 0x06, 0x3508);
12566                 MP_WritePhyUshort(sc, 0x06, 0x5ac0);
12567                 MP_WritePhyUshort(sc, 0x06, 0x9f04);
12568                 MP_WritePhyUshort(sc, 0x06, 0xd101);
12569                 MP_WritePhyUshort(sc, 0x06, 0xae02);
12570                 MP_WritePhyUshort(sc, 0x06, 0xd100);
12571                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
12572                 MP_WritePhyUshort(sc, 0x06, 0x3e02);
12573                 MP_WritePhyUshort(sc, 0x06, 0x2f50);
12574                 MP_WritePhyUshort(sc, 0x06, 0xef96);
12575                 MP_WritePhyUshort(sc, 0x06, 0xfefd);
12576                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
12577                 MP_WritePhyUshort(sc, 0x06, 0xf8f9);
12578                 MP_WritePhyUshort(sc, 0x06, 0xfae0);
12579                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
12580                 MP_WritePhyUshort(sc, 0x06, 0xac26);
12581                 MP_WritePhyUshort(sc, 0x06, 0x0ee0);
12582                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
12583                 MP_WritePhyUshort(sc, 0x06, 0xac21);
12584                 MP_WritePhyUshort(sc, 0x06, 0x08e0);
12585                 MP_WritePhyUshort(sc, 0x06, 0x8b87);
12586                 MP_WritePhyUshort(sc, 0x06, 0xac24);
12587                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
12588                 MP_WritePhyUshort(sc, 0x06, 0x6bee);
12589                 MP_WritePhyUshort(sc, 0x06, 0xe0ea);
12590                 MP_WritePhyUshort(sc, 0x06, 0x00ee);
12591                 MP_WritePhyUshort(sc, 0x06, 0xe0eb);
12592                 MP_WritePhyUshort(sc, 0x06, 0x00e2);
12593                 MP_WritePhyUshort(sc, 0x06, 0xe07c);
12594                 MP_WritePhyUshort(sc, 0x06, 0xe3e0);
12595                 MP_WritePhyUshort(sc, 0x06, 0x7da5);
12596                 MP_WritePhyUshort(sc, 0x06, 0x1111);
12597                 MP_WritePhyUshort(sc, 0x06, 0x15d2);
12598                 MP_WritePhyUshort(sc, 0x06, 0x60d6);
12599                 MP_WritePhyUshort(sc, 0x06, 0x6666);
12600                 MP_WritePhyUshort(sc, 0x06, 0x0207);
12601                 MP_WritePhyUshort(sc, 0x06, 0xf9d2);
12602                 MP_WritePhyUshort(sc, 0x06, 0xa0d6);
12603                 MP_WritePhyUshort(sc, 0x06, 0xaaaa);
12604                 MP_WritePhyUshort(sc, 0x06, 0x0207);
12605                 MP_WritePhyUshort(sc, 0x06, 0xf902);
12606                 MP_WritePhyUshort(sc, 0x06, 0x825c);
12607                 MP_WritePhyUshort(sc, 0x06, 0xae44);
12608                 MP_WritePhyUshort(sc, 0x06, 0xa566);
12609                 MP_WritePhyUshort(sc, 0x06, 0x6602);
12610                 MP_WritePhyUshort(sc, 0x06, 0xae38);
12611                 MP_WritePhyUshort(sc, 0x06, 0xa5aa);
12612                 MP_WritePhyUshort(sc, 0x06, 0xaa02);
12613                 MP_WritePhyUshort(sc, 0x06, 0xae32);
12614                 MP_WritePhyUshort(sc, 0x06, 0xeee0);
12615                 MP_WritePhyUshort(sc, 0x06, 0xea04);
12616                 MP_WritePhyUshort(sc, 0x06, 0xeee0);
12617                 MP_WritePhyUshort(sc, 0x06, 0xeb06);
12618                 MP_WritePhyUshort(sc, 0x06, 0xe2e0);
12619                 MP_WritePhyUshort(sc, 0x06, 0x7ce3);
12620                 MP_WritePhyUshort(sc, 0x06, 0xe07d);
12621                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
12622                 MP_WritePhyUshort(sc, 0x06, 0x38e1);
12623                 MP_WritePhyUshort(sc, 0x06, 0xe039);
12624                 MP_WritePhyUshort(sc, 0x06, 0xad2e);
12625                 MP_WritePhyUshort(sc, 0x06, 0x21ad);
12626                 MP_WritePhyUshort(sc, 0x06, 0x3f13);
12627                 MP_WritePhyUshort(sc, 0x06, 0xe0e4);
12628                 MP_WritePhyUshort(sc, 0x06, 0x14e1);
12629                 MP_WritePhyUshort(sc, 0x06, 0xe415);
12630                 MP_WritePhyUshort(sc, 0x06, 0x6880);
12631                 MP_WritePhyUshort(sc, 0x06, 0xe4e4);
12632                 MP_WritePhyUshort(sc, 0x06, 0x14e5);
12633                 MP_WritePhyUshort(sc, 0x06, 0xe415);
12634                 MP_WritePhyUshort(sc, 0x06, 0x0282);
12635                 MP_WritePhyUshort(sc, 0x06, 0x5cae);
12636                 MP_WritePhyUshort(sc, 0x06, 0x0bac);
12637                 MP_WritePhyUshort(sc, 0x06, 0x3e02);
12638                 MP_WritePhyUshort(sc, 0x06, 0xae06);
12639                 MP_WritePhyUshort(sc, 0x06, 0x0282);
12640                 MP_WritePhyUshort(sc, 0x06, 0x8602);
12641                 MP_WritePhyUshort(sc, 0x06, 0x82b0);
12642                 MP_WritePhyUshort(sc, 0x06, 0xfefd);
12643                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
12644                 MP_WritePhyUshort(sc, 0x06, 0xf8e1);
12645                 MP_WritePhyUshort(sc, 0x06, 0x8b2e);
12646                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
12647                 MP_WritePhyUshort(sc, 0x06, 0x81ad);
12648                 MP_WritePhyUshort(sc, 0x06, 0x2605);
12649                 MP_WritePhyUshort(sc, 0x06, 0x0221);
12650                 MP_WritePhyUshort(sc, 0x06, 0xf3f7);
12651                 MP_WritePhyUshort(sc, 0x06, 0x28e0);
12652                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
12653                 MP_WritePhyUshort(sc, 0x06, 0xad21);
12654                 MP_WritePhyUshort(sc, 0x06, 0x0502);
12655                 MP_WritePhyUshort(sc, 0x06, 0x22f8);
12656                 MP_WritePhyUshort(sc, 0x06, 0xf729);
12657                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
12658                 MP_WritePhyUshort(sc, 0x06, 0x87ad);
12659                 MP_WritePhyUshort(sc, 0x06, 0x2405);
12660                 MP_WritePhyUshort(sc, 0x06, 0x0282);
12661                 MP_WritePhyUshort(sc, 0x06, 0xebf7);
12662                 MP_WritePhyUshort(sc, 0x06, 0x2ae5);
12663                 MP_WritePhyUshort(sc, 0x06, 0x8b2e);
12664                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
12665                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
12666                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
12667                 MP_WritePhyUshort(sc, 0x06, 0xad26);
12668                 MP_WritePhyUshort(sc, 0x06, 0x0302);
12669                 MP_WritePhyUshort(sc, 0x06, 0x2134);
12670                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
12671                 MP_WritePhyUshort(sc, 0x06, 0x81ad);
12672                 MP_WritePhyUshort(sc, 0x06, 0x2109);
12673                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
12674                 MP_WritePhyUshort(sc, 0x06, 0x2eac);
12675                 MP_WritePhyUshort(sc, 0x06, 0x2003);
12676                 MP_WritePhyUshort(sc, 0x06, 0x0283);
12677                 MP_WritePhyUshort(sc, 0x06, 0x52e0);
12678                 MP_WritePhyUshort(sc, 0x06, 0x8b87);
12679                 MP_WritePhyUshort(sc, 0x06, 0xad24);
12680                 MP_WritePhyUshort(sc, 0x06, 0x09e0);
12681                 MP_WritePhyUshort(sc, 0x06, 0x8b2e);
12682                 MP_WritePhyUshort(sc, 0x06, 0xac21);
12683                 MP_WritePhyUshort(sc, 0x06, 0x0302);
12684                 MP_WritePhyUshort(sc, 0x06, 0x8337);
12685                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
12686                 MP_WritePhyUshort(sc, 0x06, 0xf8e1);
12687                 MP_WritePhyUshort(sc, 0x06, 0x8b2e);
12688                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
12689                 MP_WritePhyUshort(sc, 0x06, 0x81ad);
12690                 MP_WritePhyUshort(sc, 0x06, 0x2608);
12691                 MP_WritePhyUshort(sc, 0x06, 0xe085);
12692                 MP_WritePhyUshort(sc, 0x06, 0xd2ad);
12693                 MP_WritePhyUshort(sc, 0x06, 0x2502);
12694                 MP_WritePhyUshort(sc, 0x06, 0xf628);
12695                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
12696                 MP_WritePhyUshort(sc, 0x06, 0x81ad);
12697                 MP_WritePhyUshort(sc, 0x06, 0x210a);
12698                 MP_WritePhyUshort(sc, 0x06, 0xe086);
12699                 MP_WritePhyUshort(sc, 0x06, 0x0af6);
12700                 MP_WritePhyUshort(sc, 0x06, 0x27a0);
12701                 MP_WritePhyUshort(sc, 0x06, 0x0502);
12702                 MP_WritePhyUshort(sc, 0x06, 0xf629);
12703                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
12704                 MP_WritePhyUshort(sc, 0x06, 0x87ad);
12705                 MP_WritePhyUshort(sc, 0x06, 0x2408);
12706                 MP_WritePhyUshort(sc, 0x06, 0xe08a);
12707                 MP_WritePhyUshort(sc, 0x06, 0xedad);
12708                 MP_WritePhyUshort(sc, 0x06, 0x2002);
12709                 MP_WritePhyUshort(sc, 0x06, 0xf62a);
12710                 MP_WritePhyUshort(sc, 0x06, 0xe58b);
12711                 MP_WritePhyUshort(sc, 0x06, 0x2ea1);
12712                 MP_WritePhyUshort(sc, 0x06, 0x0003);
12713                 MP_WritePhyUshort(sc, 0x06, 0x0221);
12714                 MP_WritePhyUshort(sc, 0x06, 0x11fc);
12715                 MP_WritePhyUshort(sc, 0x06, 0x04ee);
12716                 MP_WritePhyUshort(sc, 0x06, 0x8aed);
12717                 MP_WritePhyUshort(sc, 0x06, 0x00ee);
12718                 MP_WritePhyUshort(sc, 0x06, 0x8aec);
12719                 MP_WritePhyUshort(sc, 0x06, 0x0004);
12720                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
12721                 MP_WritePhyUshort(sc, 0x06, 0x8b87);
12722                 MP_WritePhyUshort(sc, 0x06, 0xad24);
12723                 MP_WritePhyUshort(sc, 0x06, 0x3ae0);
12724                 MP_WritePhyUshort(sc, 0x06, 0xe0ea);
12725                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
12726                 MP_WritePhyUshort(sc, 0x06, 0xeb58);
12727                 MP_WritePhyUshort(sc, 0x06, 0xf8d1);
12728                 MP_WritePhyUshort(sc, 0x06, 0x01e4);
12729                 MP_WritePhyUshort(sc, 0x06, 0xe0ea);
12730                 MP_WritePhyUshort(sc, 0x06, 0xe5e0);
12731                 MP_WritePhyUshort(sc, 0x06, 0xebe0);
12732                 MP_WritePhyUshort(sc, 0x06, 0xe07c);
12733                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
12734                 MP_WritePhyUshort(sc, 0x06, 0x7d5c);
12735                 MP_WritePhyUshort(sc, 0x06, 0x00ff);
12736                 MP_WritePhyUshort(sc, 0x06, 0x3c00);
12737                 MP_WritePhyUshort(sc, 0x06, 0x1eab);
12738                 MP_WritePhyUshort(sc, 0x06, 0x1ce0);
12739                 MP_WritePhyUshort(sc, 0x06, 0xe04c);
12740                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
12741                 MP_WritePhyUshort(sc, 0x06, 0x4d58);
12742                 MP_WritePhyUshort(sc, 0x06, 0xc1e4);
12743                 MP_WritePhyUshort(sc, 0x06, 0xe04c);
12744                 MP_WritePhyUshort(sc, 0x06, 0xe5e0);
12745                 MP_WritePhyUshort(sc, 0x06, 0x4de0);
12746                 MP_WritePhyUshort(sc, 0x06, 0xe0ee);
12747                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
12748                 MP_WritePhyUshort(sc, 0x06, 0xef69);
12749                 MP_WritePhyUshort(sc, 0x06, 0x3ce4);
12750                 MP_WritePhyUshort(sc, 0x06, 0xe0ee);
12751                 MP_WritePhyUshort(sc, 0x06, 0xe5e0);
12752                 MP_WritePhyUshort(sc, 0x06, 0xeffc);
12753                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
12754                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
12755                 MP_WritePhyUshort(sc, 0x06, 0x87ad);
12756                 MP_WritePhyUshort(sc, 0x06, 0x2412);
12757                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
12758                 MP_WritePhyUshort(sc, 0x06, 0xeee1);
12759                 MP_WritePhyUshort(sc, 0x06, 0xe0ef);
12760                 MP_WritePhyUshort(sc, 0x06, 0x59c3);
12761                 MP_WritePhyUshort(sc, 0x06, 0xe4e0);
12762                 MP_WritePhyUshort(sc, 0x06, 0xeee5);
12763                 MP_WritePhyUshort(sc, 0x06, 0xe0ef);
12764                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
12765                 MP_WritePhyUshort(sc, 0x06, 0xed01);
12766                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
12767                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
12768                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
12769                 MP_WritePhyUshort(sc, 0x06, 0xac25);
12770                 MP_WritePhyUshort(sc, 0x06, 0x0502);
12771                 MP_WritePhyUshort(sc, 0x06, 0x8363);
12772                 MP_WritePhyUshort(sc, 0x06, 0xae03);
12773                 MP_WritePhyUshort(sc, 0x06, 0x0225);
12774                 MP_WritePhyUshort(sc, 0x06, 0x16fc);
12775                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
12776                 MP_WritePhyUshort(sc, 0x06, 0xf9fa);
12777                 MP_WritePhyUshort(sc, 0x06, 0xef69);
12778                 MP_WritePhyUshort(sc, 0x06, 0xfae0);
12779                 MP_WritePhyUshort(sc, 0x06, 0x860a);
12780                 MP_WritePhyUshort(sc, 0x06, 0xa000);
12781                 MP_WritePhyUshort(sc, 0x06, 0x19e0);
12782                 MP_WritePhyUshort(sc, 0x06, 0x860b);
12783                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
12784                 MP_WritePhyUshort(sc, 0x06, 0x331b);
12785                 MP_WritePhyUshort(sc, 0x06, 0x109e);
12786                 MP_WritePhyUshort(sc, 0x06, 0x04aa);
12787                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
12788                 MP_WritePhyUshort(sc, 0x06, 0x06ee);
12789                 MP_WritePhyUshort(sc, 0x06, 0x860a);
12790                 MP_WritePhyUshort(sc, 0x06, 0x01ae);
12791                 MP_WritePhyUshort(sc, 0x06, 0xe602);
12792                 MP_WritePhyUshort(sc, 0x06, 0x241e);
12793                 MP_WritePhyUshort(sc, 0x06, 0xae14);
12794                 MP_WritePhyUshort(sc, 0x06, 0xa001);
12795                 MP_WritePhyUshort(sc, 0x06, 0x1402);
12796                 MP_WritePhyUshort(sc, 0x06, 0x2426);
12797                 MP_WritePhyUshort(sc, 0x06, 0xbf26);
12798                 MP_WritePhyUshort(sc, 0x06, 0x6d02);
12799                 MP_WritePhyUshort(sc, 0x06, 0x2eb0);
12800                 MP_WritePhyUshort(sc, 0x06, 0xee86);
12801                 MP_WritePhyUshort(sc, 0x06, 0x0b00);
12802                 MP_WritePhyUshort(sc, 0x06, 0xee86);
12803                 MP_WritePhyUshort(sc, 0x06, 0x0a02);
12804                 MP_WritePhyUshort(sc, 0x06, 0xaf84);
12805                 MP_WritePhyUshort(sc, 0x06, 0x3ca0);
12806                 MP_WritePhyUshort(sc, 0x06, 0x0252);
12807                 MP_WritePhyUshort(sc, 0x06, 0xee86);
12808                 MP_WritePhyUshort(sc, 0x06, 0x0400);
12809                 MP_WritePhyUshort(sc, 0x06, 0xee86);
12810                 MP_WritePhyUshort(sc, 0x06, 0x0500);
12811                 MP_WritePhyUshort(sc, 0x06, 0xe086);
12812                 MP_WritePhyUshort(sc, 0x06, 0x0be1);
12813                 MP_WritePhyUshort(sc, 0x06, 0x8b32);
12814                 MP_WritePhyUshort(sc, 0x06, 0x1b10);
12815                 MP_WritePhyUshort(sc, 0x06, 0x9e04);
12816                 MP_WritePhyUshort(sc, 0x06, 0xaa02);
12817                 MP_WritePhyUshort(sc, 0x06, 0xaecb);
12818                 MP_WritePhyUshort(sc, 0x06, 0xee86);
12819                 MP_WritePhyUshort(sc, 0x06, 0x0b00);
12820                 MP_WritePhyUshort(sc, 0x06, 0x0224);
12821                 MP_WritePhyUshort(sc, 0x06, 0x3ae2);
12822                 MP_WritePhyUshort(sc, 0x06, 0x8604);
12823                 MP_WritePhyUshort(sc, 0x06, 0xe386);
12824                 MP_WritePhyUshort(sc, 0x06, 0x05ef);
12825                 MP_WritePhyUshort(sc, 0x06, 0x65e2);
12826                 MP_WritePhyUshort(sc, 0x06, 0x8606);
12827                 MP_WritePhyUshort(sc, 0x06, 0xe386);
12828                 MP_WritePhyUshort(sc, 0x06, 0x071b);
12829                 MP_WritePhyUshort(sc, 0x06, 0x56aa);
12830                 MP_WritePhyUshort(sc, 0x06, 0x0eef);
12831                 MP_WritePhyUshort(sc, 0x06, 0x56e6);
12832                 MP_WritePhyUshort(sc, 0x06, 0x8606);
12833                 MP_WritePhyUshort(sc, 0x06, 0xe786);
12834                 MP_WritePhyUshort(sc, 0x06, 0x07e2);
12835                 MP_WritePhyUshort(sc, 0x06, 0x8609);
12836                 MP_WritePhyUshort(sc, 0x06, 0xe686);
12837                 MP_WritePhyUshort(sc, 0x06, 0x08e0);
12838                 MP_WritePhyUshort(sc, 0x06, 0x8609);
12839                 MP_WritePhyUshort(sc, 0x06, 0xa000);
12840                 MP_WritePhyUshort(sc, 0x06, 0x07ee);
12841                 MP_WritePhyUshort(sc, 0x06, 0x860a);
12842                 MP_WritePhyUshort(sc, 0x06, 0x03af);
12843                 MP_WritePhyUshort(sc, 0x06, 0x8369);
12844                 MP_WritePhyUshort(sc, 0x06, 0x0224);
12845                 MP_WritePhyUshort(sc, 0x06, 0x8e02);
12846                 MP_WritePhyUshort(sc, 0x06, 0x2426);
12847                 MP_WritePhyUshort(sc, 0x06, 0xae48);
12848                 MP_WritePhyUshort(sc, 0x06, 0xa003);
12849                 MP_WritePhyUshort(sc, 0x06, 0x21e0);
12850                 MP_WritePhyUshort(sc, 0x06, 0x8608);
12851                 MP_WritePhyUshort(sc, 0x06, 0xe186);
12852                 MP_WritePhyUshort(sc, 0x06, 0x091b);
12853                 MP_WritePhyUshort(sc, 0x06, 0x019e);
12854                 MP_WritePhyUshort(sc, 0x06, 0x0caa);
12855                 MP_WritePhyUshort(sc, 0x06, 0x0502);
12856                 MP_WritePhyUshort(sc, 0x06, 0x249d);
12857                 MP_WritePhyUshort(sc, 0x06, 0xaee7);
12858                 MP_WritePhyUshort(sc, 0x06, 0x0224);
12859                 MP_WritePhyUshort(sc, 0x06, 0x8eae);
12860                 MP_WritePhyUshort(sc, 0x06, 0xe2ee);
12861                 MP_WritePhyUshort(sc, 0x06, 0x860a);
12862                 MP_WritePhyUshort(sc, 0x06, 0x04ee);
12863                 MP_WritePhyUshort(sc, 0x06, 0x860b);
12864                 MP_WritePhyUshort(sc, 0x06, 0x00af);
12865                 MP_WritePhyUshort(sc, 0x06, 0x8369);
12866                 MP_WritePhyUshort(sc, 0x06, 0xa004);
12867                 MP_WritePhyUshort(sc, 0x06, 0x15e0);
12868                 MP_WritePhyUshort(sc, 0x06, 0x860b);
12869                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
12870                 MP_WritePhyUshort(sc, 0x06, 0x341b);
12871                 MP_WritePhyUshort(sc, 0x06, 0x109e);
12872                 MP_WritePhyUshort(sc, 0x06, 0x05aa);
12873                 MP_WritePhyUshort(sc, 0x06, 0x03af);
12874                 MP_WritePhyUshort(sc, 0x06, 0x8383);
12875                 MP_WritePhyUshort(sc, 0x06, 0xee86);
12876                 MP_WritePhyUshort(sc, 0x06, 0x0a05);
12877                 MP_WritePhyUshort(sc, 0x06, 0xae0c);
12878                 MP_WritePhyUshort(sc, 0x06, 0xa005);
12879                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
12880                 MP_WritePhyUshort(sc, 0x06, 0x0702);
12881                 MP_WritePhyUshort(sc, 0x06, 0x2309);
12882                 MP_WritePhyUshort(sc, 0x06, 0xee86);
12883                 MP_WritePhyUshort(sc, 0x06, 0x0a00);
12884                 MP_WritePhyUshort(sc, 0x06, 0xfeef);
12885                 MP_WritePhyUshort(sc, 0x06, 0x96fe);
12886                 MP_WritePhyUshort(sc, 0x06, 0xfdfc);
12887                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
12888                 MP_WritePhyUshort(sc, 0x06, 0xf9fa);
12889                 MP_WritePhyUshort(sc, 0x06, 0xef69);
12890                 MP_WritePhyUshort(sc, 0x06, 0xfbe0);
12891                 MP_WritePhyUshort(sc, 0x06, 0x8b85);
12892                 MP_WritePhyUshort(sc, 0x06, 0xad25);
12893                 MP_WritePhyUshort(sc, 0x06, 0x22e0);
12894                 MP_WritePhyUshort(sc, 0x06, 0xe022);
12895                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
12896                 MP_WritePhyUshort(sc, 0x06, 0x23e2);
12897                 MP_WritePhyUshort(sc, 0x06, 0xe036);
12898                 MP_WritePhyUshort(sc, 0x06, 0xe3e0);
12899                 MP_WritePhyUshort(sc, 0x06, 0x375a);
12900                 MP_WritePhyUshort(sc, 0x06, 0xc40d);
12901                 MP_WritePhyUshort(sc, 0x06, 0x0158);
12902                 MP_WritePhyUshort(sc, 0x06, 0x021e);
12903                 MP_WritePhyUshort(sc, 0x06, 0x20e3);
12904                 MP_WritePhyUshort(sc, 0x06, 0x8ae7);
12905                 MP_WritePhyUshort(sc, 0x06, 0xac31);
12906                 MP_WritePhyUshort(sc, 0x06, 0x60ac);
12907                 MP_WritePhyUshort(sc, 0x06, 0x3a08);
12908                 MP_WritePhyUshort(sc, 0x06, 0xac3e);
12909                 MP_WritePhyUshort(sc, 0x06, 0x26ae);
12910                 MP_WritePhyUshort(sc, 0x06, 0x67af);
12911                 MP_WritePhyUshort(sc, 0x06, 0x84db);
12912                 MP_WritePhyUshort(sc, 0x06, 0xad37);
12913                 MP_WritePhyUshort(sc, 0x06, 0x61e0);
12914                 MP_WritePhyUshort(sc, 0x06, 0x8ae8);
12915                 MP_WritePhyUshort(sc, 0x06, 0x10e4);
12916                 MP_WritePhyUshort(sc, 0x06, 0x8ae8);
12917                 MP_WritePhyUshort(sc, 0x06, 0xe18a);
12918                 MP_WritePhyUshort(sc, 0x06, 0xe91b);
12919                 MP_WritePhyUshort(sc, 0x06, 0x109e);
12920                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
12921                 MP_WritePhyUshort(sc, 0x06, 0x51d1);
12922                 MP_WritePhyUshort(sc, 0x06, 0x00bf);
12923                 MP_WritePhyUshort(sc, 0x06, 0x863b);
12924                 MP_WritePhyUshort(sc, 0x06, 0x022f);
12925                 MP_WritePhyUshort(sc, 0x06, 0x50ee);
12926                 MP_WritePhyUshort(sc, 0x06, 0x8ae8);
12927                 MP_WritePhyUshort(sc, 0x06, 0x00ae);
12928                 MP_WritePhyUshort(sc, 0x06, 0x43ad);
12929                 MP_WritePhyUshort(sc, 0x06, 0x3627);
12930                 MP_WritePhyUshort(sc, 0x06, 0xe08a);
12931                 MP_WritePhyUshort(sc, 0x06, 0xeee1);
12932                 MP_WritePhyUshort(sc, 0x06, 0x8aef);
12933                 MP_WritePhyUshort(sc, 0x06, 0xef74);
12934                 MP_WritePhyUshort(sc, 0x06, 0xe08a);
12935                 MP_WritePhyUshort(sc, 0x06, 0xeae1);
12936                 MP_WritePhyUshort(sc, 0x06, 0x8aeb);
12937                 MP_WritePhyUshort(sc, 0x06, 0x1b74);
12938                 MP_WritePhyUshort(sc, 0x06, 0x9e2e);
12939                 MP_WritePhyUshort(sc, 0x06, 0x14e4);
12940                 MP_WritePhyUshort(sc, 0x06, 0x8aea);
12941                 MP_WritePhyUshort(sc, 0x06, 0xe58a);
12942                 MP_WritePhyUshort(sc, 0x06, 0xebef);
12943                 MP_WritePhyUshort(sc, 0x06, 0x74e0);
12944                 MP_WritePhyUshort(sc, 0x06, 0x8aee);
12945                 MP_WritePhyUshort(sc, 0x06, 0xe18a);
12946                 MP_WritePhyUshort(sc, 0x06, 0xef1b);
12947                 MP_WritePhyUshort(sc, 0x06, 0x479e);
12948                 MP_WritePhyUshort(sc, 0x06, 0x0fae);
12949                 MP_WritePhyUshort(sc, 0x06, 0x19ee);
12950                 MP_WritePhyUshort(sc, 0x06, 0x8aea);
12951                 MP_WritePhyUshort(sc, 0x06, 0x00ee);
12952                 MP_WritePhyUshort(sc, 0x06, 0x8aeb);
12953                 MP_WritePhyUshort(sc, 0x06, 0x00ae);
12954                 MP_WritePhyUshort(sc, 0x06, 0x0fac);
12955                 MP_WritePhyUshort(sc, 0x06, 0x390c);
12956                 MP_WritePhyUshort(sc, 0x06, 0xd101);
12957                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
12958                 MP_WritePhyUshort(sc, 0x06, 0x3b02);
12959                 MP_WritePhyUshort(sc, 0x06, 0x2f50);
12960                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
12961                 MP_WritePhyUshort(sc, 0x06, 0xe800);
12962                 MP_WritePhyUshort(sc, 0x06, 0xe68a);
12963                 MP_WritePhyUshort(sc, 0x06, 0xe7ff);
12964                 MP_WritePhyUshort(sc, 0x06, 0xef96);
12965                 MP_WritePhyUshort(sc, 0x06, 0xfefd);
12966                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
12967                 MP_WritePhyUshort(sc, 0x06, 0xf8f9);
12968                 MP_WritePhyUshort(sc, 0x06, 0xfaef);
12969                 MP_WritePhyUshort(sc, 0x06, 0x69e0);
12970                 MP_WritePhyUshort(sc, 0x06, 0xe022);
12971                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
12972                 MP_WritePhyUshort(sc, 0x06, 0x2358);
12973                 MP_WritePhyUshort(sc, 0x06, 0xc4e1);
12974                 MP_WritePhyUshort(sc, 0x06, 0x8b6e);
12975                 MP_WritePhyUshort(sc, 0x06, 0x1f10);
12976                 MP_WritePhyUshort(sc, 0x06, 0x9e24);
12977                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
12978                 MP_WritePhyUshort(sc, 0x06, 0x6ead);
12979                 MP_WritePhyUshort(sc, 0x06, 0x2218);
12980                 MP_WritePhyUshort(sc, 0x06, 0xac27);
12981                 MP_WritePhyUshort(sc, 0x06, 0x0dac);
12982                 MP_WritePhyUshort(sc, 0x06, 0x2605);
12983                 MP_WritePhyUshort(sc, 0x06, 0x0203);
12984                 MP_WritePhyUshort(sc, 0x06, 0x8fae);
12985                 MP_WritePhyUshort(sc, 0x06, 0x1302);
12986                 MP_WritePhyUshort(sc, 0x06, 0x03c8);
12987                 MP_WritePhyUshort(sc, 0x06, 0xae0e);
12988                 MP_WritePhyUshort(sc, 0x06, 0x0203);
12989                 MP_WritePhyUshort(sc, 0x06, 0xe102);
12990                 MP_WritePhyUshort(sc, 0x06, 0x8520);
12991                 MP_WritePhyUshort(sc, 0x06, 0xae06);
12992                 MP_WritePhyUshort(sc, 0x06, 0x0203);
12993                 MP_WritePhyUshort(sc, 0x06, 0x8f02);
12994                 MP_WritePhyUshort(sc, 0x06, 0x8566);
12995                 MP_WritePhyUshort(sc, 0x06, 0xef96);
12996                 MP_WritePhyUshort(sc, 0x06, 0xfefd);
12997                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
12998                 MP_WritePhyUshort(sc, 0x06, 0xf8fa);
12999                 MP_WritePhyUshort(sc, 0x06, 0xef69);
13000                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
13001                 MP_WritePhyUshort(sc, 0x06, 0x82ad);
13002                 MP_WritePhyUshort(sc, 0x06, 0x2737);
13003                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
13004                 MP_WritePhyUshort(sc, 0x06, 0x4402);
13005                 MP_WritePhyUshort(sc, 0x06, 0x2f23);
13006                 MP_WritePhyUshort(sc, 0x06, 0xac28);
13007                 MP_WritePhyUshort(sc, 0x06, 0x2ed1);
13008                 MP_WritePhyUshort(sc, 0x06, 0x01bf);
13009                 MP_WritePhyUshort(sc, 0x06, 0x8647);
13010                 MP_WritePhyUshort(sc, 0x06, 0x022f);
13011                 MP_WritePhyUshort(sc, 0x06, 0x50bf);
13012                 MP_WritePhyUshort(sc, 0x06, 0x8641);
13013                 MP_WritePhyUshort(sc, 0x06, 0x022f);
13014                 MP_WritePhyUshort(sc, 0x06, 0x23e5);
13015                 MP_WritePhyUshort(sc, 0x06, 0x8af0);
13016                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
13017                 MP_WritePhyUshort(sc, 0x06, 0x22e1);
13018                 MP_WritePhyUshort(sc, 0x06, 0xe023);
13019                 MP_WritePhyUshort(sc, 0x06, 0xac2e);
13020                 MP_WritePhyUshort(sc, 0x06, 0x04d1);
13021                 MP_WritePhyUshort(sc, 0x06, 0x01ae);
13022                 MP_WritePhyUshort(sc, 0x06, 0x02d1);
13023                 MP_WritePhyUshort(sc, 0x06, 0x00bf);
13024                 MP_WritePhyUshort(sc, 0x06, 0x8641);
13025                 MP_WritePhyUshort(sc, 0x06, 0x022f);
13026                 MP_WritePhyUshort(sc, 0x06, 0x50d1);
13027                 MP_WritePhyUshort(sc, 0x06, 0x01bf);
13028                 MP_WritePhyUshort(sc, 0x06, 0x8644);
13029                 MP_WritePhyUshort(sc, 0x06, 0x022f);
13030                 MP_WritePhyUshort(sc, 0x06, 0x50ef);
13031                 MP_WritePhyUshort(sc, 0x06, 0x96fe);
13032                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
13033                 MP_WritePhyUshort(sc, 0x06, 0xf8fa);
13034                 MP_WritePhyUshort(sc, 0x06, 0xef69);
13035                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
13036                 MP_WritePhyUshort(sc, 0x06, 0x4702);
13037                 MP_WritePhyUshort(sc, 0x06, 0x2f23);
13038                 MP_WritePhyUshort(sc, 0x06, 0xad28);
13039                 MP_WritePhyUshort(sc, 0x06, 0x19d1);
13040                 MP_WritePhyUshort(sc, 0x06, 0x00bf);
13041                 MP_WritePhyUshort(sc, 0x06, 0x8644);
13042                 MP_WritePhyUshort(sc, 0x06, 0x022f);
13043                 MP_WritePhyUshort(sc, 0x06, 0x50e1);
13044                 MP_WritePhyUshort(sc, 0x06, 0x8af0);
13045                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
13046                 MP_WritePhyUshort(sc, 0x06, 0x4102);
13047                 MP_WritePhyUshort(sc, 0x06, 0x2f50);
13048                 MP_WritePhyUshort(sc, 0x06, 0xd100);
13049                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
13050                 MP_WritePhyUshort(sc, 0x06, 0x4702);
13051                 MP_WritePhyUshort(sc, 0x06, 0x2f50);
13052                 MP_WritePhyUshort(sc, 0x06, 0xef96);
13053                 MP_WritePhyUshort(sc, 0x06, 0xfefc);
13054                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
13055                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
13056                 MP_WritePhyUshort(sc, 0x06, 0xfee1);
13057                 MP_WritePhyUshort(sc, 0x06, 0xe2ff);
13058                 MP_WritePhyUshort(sc, 0x06, 0xad2e);
13059                 MP_WritePhyUshort(sc, 0x06, 0x63e0);
13060                 MP_WritePhyUshort(sc, 0x06, 0xe038);
13061                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
13062                 MP_WritePhyUshort(sc, 0x06, 0x39ad);
13063                 MP_WritePhyUshort(sc, 0x06, 0x2f10);
13064                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
13065                 MP_WritePhyUshort(sc, 0x06, 0x34e1);
13066                 MP_WritePhyUshort(sc, 0x06, 0xe035);
13067                 MP_WritePhyUshort(sc, 0x06, 0xf726);
13068                 MP_WritePhyUshort(sc, 0x06, 0xe4e0);
13069                 MP_WritePhyUshort(sc, 0x06, 0x34e5);
13070                 MP_WritePhyUshort(sc, 0x06, 0xe035);
13071                 MP_WritePhyUshort(sc, 0x06, 0xae0e);
13072                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
13073                 MP_WritePhyUshort(sc, 0x06, 0xd6e1);
13074                 MP_WritePhyUshort(sc, 0x06, 0xe2d7);
13075                 MP_WritePhyUshort(sc, 0x06, 0xf728);
13076                 MP_WritePhyUshort(sc, 0x06, 0xe4e2);
13077                 MP_WritePhyUshort(sc, 0x06, 0xd6e5);
13078                 MP_WritePhyUshort(sc, 0x06, 0xe2d7);
13079                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
13080                 MP_WritePhyUshort(sc, 0x06, 0x34e1);
13081                 MP_WritePhyUshort(sc, 0x06, 0xe235);
13082                 MP_WritePhyUshort(sc, 0x06, 0xf72b);
13083                 MP_WritePhyUshort(sc, 0x06, 0xe4e2);
13084                 MP_WritePhyUshort(sc, 0x06, 0x34e5);
13085                 MP_WritePhyUshort(sc, 0x06, 0xe235);
13086                 MP_WritePhyUshort(sc, 0x06, 0xd07d);
13087                 MP_WritePhyUshort(sc, 0x06, 0xb0fe);
13088                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
13089                 MP_WritePhyUshort(sc, 0x06, 0x34e1);
13090                 MP_WritePhyUshort(sc, 0x06, 0xe235);
13091                 MP_WritePhyUshort(sc, 0x06, 0xf62b);
13092                 MP_WritePhyUshort(sc, 0x06, 0xe4e2);
13093                 MP_WritePhyUshort(sc, 0x06, 0x34e5);
13094                 MP_WritePhyUshort(sc, 0x06, 0xe235);
13095                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
13096                 MP_WritePhyUshort(sc, 0x06, 0x34e1);
13097                 MP_WritePhyUshort(sc, 0x06, 0xe035);
13098                 MP_WritePhyUshort(sc, 0x06, 0xf626);
13099                 MP_WritePhyUshort(sc, 0x06, 0xe4e0);
13100                 MP_WritePhyUshort(sc, 0x06, 0x34e5);
13101                 MP_WritePhyUshort(sc, 0x06, 0xe035);
13102                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
13103                 MP_WritePhyUshort(sc, 0x06, 0xd6e1);
13104                 MP_WritePhyUshort(sc, 0x06, 0xe2d7);
13105                 MP_WritePhyUshort(sc, 0x06, 0xf628);
13106                 MP_WritePhyUshort(sc, 0x06, 0xe4e2);
13107                 MP_WritePhyUshort(sc, 0x06, 0xd6e5);
13108                 MP_WritePhyUshort(sc, 0x06, 0xe2d7);
13109                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
13110                 MP_WritePhyUshort(sc, 0x06, 0xae20);
13111                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13112                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13113                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13114                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13115                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13116                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13117                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13118                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13119                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13120                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13121                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13122                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13123                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13124                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13125                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13126                 MP_WritePhyUshort(sc, 0x06, 0x0000);
13127                 MP_WritePhyUshort(sc, 0x06, 0xa725);
13128                 MP_WritePhyUshort(sc, 0x06, 0xe50a);
13129                 MP_WritePhyUshort(sc, 0x06, 0x1de5);
13130                 MP_WritePhyUshort(sc, 0x06, 0x0a2c);
13131                 MP_WritePhyUshort(sc, 0x06, 0xe50a);
13132                 MP_WritePhyUshort(sc, 0x06, 0x6de5);
13133                 MP_WritePhyUshort(sc, 0x06, 0x0a1d);
13134                 MP_WritePhyUshort(sc, 0x06, 0xe50a);
13135                 MP_WritePhyUshort(sc, 0x06, 0x1ce5);
13136                 MP_WritePhyUshort(sc, 0x06, 0x0a2d);
13137                 MP_WritePhyUshort(sc, 0x06, 0xa755);
13138                 MP_WritePhyUshort(sc, 0x06, 0x00e2);
13139                 MP_WritePhyUshort(sc, 0x06, 0x3488);
13140                 MP_WritePhyUshort(sc, 0x06, 0xe200);
13141                 MP_WritePhyUshort(sc, 0x06, 0xcce2);
13142                 MP_WritePhyUshort(sc, 0x06, 0x0055);
13143                 MP_WritePhyUshort(sc, 0x06, 0xe020);
13144                 MP_WritePhyUshort(sc, 0x06, 0x55e2);
13145                 MP_WritePhyUshort(sc, 0x06, 0xd600);
13146                 MP_WritePhyUshort(sc, 0x06, 0xe24a);
13147                 PhyRegValue = MP_ReadPhyUshort(sc, 0x01);
13148                 PhyRegValue |= BIT_0;
13149                 MP_WritePhyUshort(sc, 0x01, PhyRegValue);
13150                 PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
13151                 PhyRegValue |= BIT_0;
13152                 MP_WritePhyUshort(sc, 0x00, PhyRegValue);
13153                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
13154 
13155                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
13156                 for (i = 0; i < 200; i++) {
13157                         DELAY(100);
13158                         PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
13159                         if (PhyRegValue & BIT_7)
13160                                 break;
13161                 }
13162                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
13163                 MP_WritePhyUshort(sc, 0x1e, 0x0023);
13164                 PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
13165                 PhyRegValue &= ~(BIT_0);
13166                 if (sc->RequiredSecLanDonglePatch)
13167                         PhyRegValue &= ~(BIT_2);
13168                 MP_WritePhyUshort(sc, 0x17, PhyRegValue);
13169                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
13170         }
13171 }
13172 
13173 static void re_set_phy_mcu_8168evl_1(struct re_softc *sc)
13174 {
13175         u_int16_t PhyRegValue;
13176         int i;
13177 
13178         MP_WritePhyUshort(sc, 0x1f, 0x0000);
13179         MP_WritePhyUshort(sc, 0x00, 0x1800);
13180         PhyRegValue= MP_ReadPhyUshort(sc, 0x15);
13181         PhyRegValue &= ~BIT_12;
13182         MP_WritePhyUshort(sc, 0x15, PhyRegValue);
13183         DELAY(200);
13184         DELAY(200);
13185         MP_WritePhyUshort(sc, 0x1f, 0x0004);
13186         MP_WritePhyUshort(sc, 0x1f, 0x0007);
13187         MP_WritePhyUshort(sc, 0x1e, 0x0023);
13188         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
13189         if ((PhyRegValue & BIT_11) == 0x0000) {
13190                 PhyRegValue |= BIT_0;
13191                 MP_WritePhyUshort(sc, 0x17, PhyRegValue);
13192                 for (i = 0; i < 200; i++) {
13193                         DELAY(100);
13194                         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
13195                         if (PhyRegValue & BIT_11)
13196                                 break;
13197                 }
13198         }
13199         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
13200         PhyRegValue |= BIT_11;
13201         MP_WritePhyUshort(sc, 0x17,PhyRegValue);
13202         MP_WritePhyUshort(sc, 0x1f, 0x0004);
13203         MP_WritePhyUshort(sc, 0x1f, 0x0007);
13204         MP_WritePhyUshort(sc, 0x1E, 0x002C);
13205         MP_WritePhyUshort(sc, 0x1B, 0x5000);
13206         MP_WritePhyUshort(sc, 0x1E, 0x002d);
13207         MP_WritePhyUshort(sc, 0x19, 0x0004);
13208         MP_WritePhyUshort(sc, 0x1f, 0x0002);
13209         MP_WritePhyUshort(sc, 0x1f, 0x0000);
13210         for (i = 0; i < 200; i++) {
13211                 DELAY(100);
13212                 PhyRegValue= MP_ReadPhyUshort(sc, 0x1E);
13213                 if ((PhyRegValue& 0x03FF) == 0x0014)
13214                         break;
13215         }
13216         MP_WritePhyUshort(sc, 0x1f, 0x0005);
13217         for (i = 0; i < 200; i++) {
13218                 DELAY(100);
13219                 PhyRegValue= MP_ReadPhyUshort(sc, 0x07);
13220                 if ((PhyRegValue& BIT_5) == 0)
13221                         break;
13222         }
13223         PhyRegValue = MP_ReadPhyUshort(sc, 0x07);
13224         if (PhyRegValue & BIT_5) {
13225                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
13226                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
13227                 MP_WritePhyUshort(sc, 0x1e, 0x00a1);
13228                 MP_WritePhyUshort(sc, 0x17, 0x1000);
13229                 MP_WritePhyUshort(sc, 0x17, 0x0000);
13230                 MP_WritePhyUshort(sc, 0x17, 0x2000);
13231                 MP_WritePhyUshort(sc, 0x1e, 0x002f);
13232                 MP_WritePhyUshort(sc, 0x18, 0x9bfb);
13233                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
13234                 MP_WritePhyUshort(sc, 0x07, 0x0000);
13235                 MP_WritePhyUshort(sc, 0x1f, 0x0002);
13236                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
13237         }
13238         MP_WritePhyUshort(sc, 0x1f, 0x0005);
13239         MP_WritePhyUshort(sc, 0x05, 0xfff6);
13240         MP_WritePhyUshort(sc, 0x06, 0x0080);
13241         PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
13242         PhyRegValue &= ~BIT_7;
13243         MP_WritePhyUshort(sc, 0x00, PhyRegValue);
13244         MP_WritePhyUshort(sc, 0x1f, 0x0004);
13245         MP_WritePhyUshort(sc, 0x1f, 0x0007);
13246         MP_WritePhyUshort(sc, 0x1e, 0x0023);
13247         MP_WritePhyUshort(sc, 0x16, 0x0306);
13248         MP_WritePhyUshort(sc, 0x16, 0x0307);
13249         MP_WritePhyUshort(sc, 0x15, 0x0000);
13250         MP_WritePhyUshort(sc, 0x19, 0x407d);
13251         MP_WritePhyUshort(sc, 0x15, 0x0001);
13252         MP_WritePhyUshort(sc, 0x19, 0x440f);
13253         MP_WritePhyUshort(sc, 0x15, 0x0002);
13254         MP_WritePhyUshort(sc, 0x19, 0x7c03);
13255         MP_WritePhyUshort(sc, 0x15, 0x0003);
13256         MP_WritePhyUshort(sc, 0x19, 0x6c03);
13257         MP_WritePhyUshort(sc, 0x15, 0x0004);
13258         MP_WritePhyUshort(sc, 0x19, 0xc4d5);
13259         MP_WritePhyUshort(sc, 0x15, 0x0005);
13260         MP_WritePhyUshort(sc, 0x19, 0x00ff);
13261         MP_WritePhyUshort(sc, 0x15, 0x0006);
13262         MP_WritePhyUshort(sc, 0x19, 0x74f0);
13263         MP_WritePhyUshort(sc, 0x15, 0x0007);
13264         MP_WritePhyUshort(sc, 0x19, 0x4880);
13265         MP_WritePhyUshort(sc, 0x15, 0x0008);
13266         MP_WritePhyUshort(sc, 0x19, 0x4c00);
13267         MP_WritePhyUshort(sc, 0x15, 0x0009);
13268         MP_WritePhyUshort(sc, 0x19, 0x4800);
13269         MP_WritePhyUshort(sc, 0x15, 0x000a);
13270         MP_WritePhyUshort(sc, 0x19, 0x5000);
13271         MP_WritePhyUshort(sc, 0x15, 0x000b);
13272         MP_WritePhyUshort(sc, 0x19, 0x4400);
13273         MP_WritePhyUshort(sc, 0x15, 0x000c);
13274         MP_WritePhyUshort(sc, 0x19, 0x7801);
13275         MP_WritePhyUshort(sc, 0x15, 0x000d);
13276         MP_WritePhyUshort(sc, 0x19, 0x4000);
13277         MP_WritePhyUshort(sc, 0x15, 0x000e);
13278         MP_WritePhyUshort(sc, 0x19, 0x7800);
13279         MP_WritePhyUshort(sc, 0x15, 0x000f);
13280         MP_WritePhyUshort(sc, 0x19, 0x7010);
13281         MP_WritePhyUshort(sc, 0x15, 0x0010);
13282         MP_WritePhyUshort(sc, 0x19, 0x6804);
13283         MP_WritePhyUshort(sc, 0x15, 0x0011);
13284         MP_WritePhyUshort(sc, 0x19, 0x64a0);
13285         MP_WritePhyUshort(sc, 0x15, 0x0012);
13286         MP_WritePhyUshort(sc, 0x19, 0x63da);
13287         MP_WritePhyUshort(sc, 0x15, 0x0013);
13288         MP_WritePhyUshort(sc, 0x19, 0x63d8);
13289         MP_WritePhyUshort(sc, 0x15, 0x0014);
13290         MP_WritePhyUshort(sc, 0x19, 0x6f05);
13291         MP_WritePhyUshort(sc, 0x15, 0x0015);
13292         MP_WritePhyUshort(sc, 0x19, 0x5420);
13293         MP_WritePhyUshort(sc, 0x15, 0x0016);
13294         MP_WritePhyUshort(sc, 0x19, 0x58ce);
13295         MP_WritePhyUshort(sc, 0x15, 0x0017);
13296         MP_WritePhyUshort(sc, 0x19, 0x5cf3);
13297         MP_WritePhyUshort(sc, 0x15, 0x0018);
13298         MP_WritePhyUshort(sc, 0x19, 0xb600);
13299         MP_WritePhyUshort(sc, 0x15, 0x0019);
13300         MP_WritePhyUshort(sc, 0x19, 0xc659);
13301         MP_WritePhyUshort(sc, 0x15, 0x001a);
13302         MP_WritePhyUshort(sc, 0x19, 0x0018);
13303         MP_WritePhyUshort(sc, 0x15, 0x001b);
13304         MP_WritePhyUshort(sc, 0x19, 0xc403);
13305         MP_WritePhyUshort(sc, 0x15, 0x001c);
13306         MP_WritePhyUshort(sc, 0x19, 0x0016);
13307         MP_WritePhyUshort(sc, 0x15, 0x001d);
13308         MP_WritePhyUshort(sc, 0x19, 0xaa05);
13309         MP_WritePhyUshort(sc, 0x15, 0x001e);
13310         MP_WritePhyUshort(sc, 0x19, 0xc503);
13311         MP_WritePhyUshort(sc, 0x15, 0x001f);
13312         MP_WritePhyUshort(sc, 0x19, 0x0003);
13313         MP_WritePhyUshort(sc, 0x15, 0x0020);
13314         MP_WritePhyUshort(sc, 0x19, 0x89f8);
13315         MP_WritePhyUshort(sc, 0x15, 0x0021);
13316         MP_WritePhyUshort(sc, 0x19, 0x32ae);
13317         MP_WritePhyUshort(sc, 0x15, 0x0022);
13318         MP_WritePhyUshort(sc, 0x19, 0x7c03);
13319         MP_WritePhyUshort(sc, 0x15, 0x0023);
13320         MP_WritePhyUshort(sc, 0x19, 0x6c03);
13321         MP_WritePhyUshort(sc, 0x15, 0x0024);
13322         MP_WritePhyUshort(sc, 0x19, 0x7c03);
13323         MP_WritePhyUshort(sc, 0x15, 0x0025);
13324         MP_WritePhyUshort(sc, 0x19, 0x6801);
13325         MP_WritePhyUshort(sc, 0x15, 0x0026);
13326         MP_WritePhyUshort(sc, 0x19, 0x66a0);
13327         MP_WritePhyUshort(sc, 0x15, 0x0027);
13328         MP_WritePhyUshort(sc, 0x19, 0xa300);
13329         MP_WritePhyUshort(sc, 0x15, 0x0028);
13330         MP_WritePhyUshort(sc, 0x19, 0x64a0);
13331         MP_WritePhyUshort(sc, 0x15, 0x0029);
13332         MP_WritePhyUshort(sc, 0x19, 0x76f0);
13333         MP_WritePhyUshort(sc, 0x15, 0x002a);
13334         MP_WritePhyUshort(sc, 0x19, 0x7670);
13335         MP_WritePhyUshort(sc, 0x15, 0x002b);
13336         MP_WritePhyUshort(sc, 0x19, 0x7630);
13337         MP_WritePhyUshort(sc, 0x15, 0x002c);
13338         MP_WritePhyUshort(sc, 0x19, 0x31a6);
13339         MP_WritePhyUshort(sc, 0x15, 0x002d);
13340         MP_WritePhyUshort(sc, 0x19, 0x0000);
13341         MP_WritePhyUshort(sc, 0x15, 0x002e);
13342         MP_WritePhyUshort(sc, 0x19, 0x0000);
13343         MP_WritePhyUshort(sc, 0x15, 0x002f);
13344         MP_WritePhyUshort(sc, 0x19, 0x0000);
13345         MP_WritePhyUshort(sc, 0x15, 0x0030);
13346         MP_WritePhyUshort(sc, 0x19, 0x0000);
13347         MP_WritePhyUshort(sc, 0x15, 0x0031);
13348         MP_WritePhyUshort(sc, 0x19, 0x0000);
13349         MP_WritePhyUshort(sc, 0x15, 0x0032);
13350         MP_WritePhyUshort(sc, 0x19, 0x4801);
13351         MP_WritePhyUshort(sc, 0x15, 0x0033);
13352         MP_WritePhyUshort(sc, 0x19, 0x6803);
13353         MP_WritePhyUshort(sc, 0x15, 0x0034);
13354         MP_WritePhyUshort(sc, 0x19, 0x66a1);
13355         MP_WritePhyUshort(sc, 0x15, 0x0035);
13356         MP_WritePhyUshort(sc, 0x19, 0x7c03);
13357         MP_WritePhyUshort(sc, 0x15, 0x0036);
13358         MP_WritePhyUshort(sc, 0x19, 0x6c03);
13359         MP_WritePhyUshort(sc, 0x15, 0x0037);
13360         MP_WritePhyUshort(sc, 0x19, 0xa300);
13361         MP_WritePhyUshort(sc, 0x15, 0x0038);
13362         MP_WritePhyUshort(sc, 0x19, 0x64a1);
13363         MP_WritePhyUshort(sc, 0x15, 0x0039);
13364         MP_WritePhyUshort(sc, 0x19, 0x7c08);
13365         MP_WritePhyUshort(sc, 0x15, 0x003a);
13366         MP_WritePhyUshort(sc, 0x19, 0x74f8);
13367         MP_WritePhyUshort(sc, 0x15, 0x003b);
13368         MP_WritePhyUshort(sc, 0x19, 0x63d0);
13369         MP_WritePhyUshort(sc, 0x15, 0x003c);
13370         MP_WritePhyUshort(sc, 0x19, 0x7ff0);
13371         MP_WritePhyUshort(sc, 0x15, 0x003d);
13372         MP_WritePhyUshort(sc, 0x19, 0x77f0);
13373         MP_WritePhyUshort(sc, 0x15, 0x003e);
13374         MP_WritePhyUshort(sc, 0x19, 0x7ff0);
13375         MP_WritePhyUshort(sc, 0x15, 0x003f);
13376         MP_WritePhyUshort(sc, 0x19, 0x7750);
13377         MP_WritePhyUshort(sc, 0x15, 0x0040);
13378         MP_WritePhyUshort(sc, 0x19, 0x63d8);
13379         MP_WritePhyUshort(sc, 0x15, 0x0041);
13380         MP_WritePhyUshort(sc, 0x19, 0x7cf0);
13381         MP_WritePhyUshort(sc, 0x15, 0x0042);
13382         MP_WritePhyUshort(sc, 0x19, 0x7708);
13383         MP_WritePhyUshort(sc, 0x15, 0x0043);
13384         MP_WritePhyUshort(sc, 0x19, 0xa654);
13385         MP_WritePhyUshort(sc, 0x15, 0x0044);
13386         MP_WritePhyUshort(sc, 0x19, 0x304a);
13387         MP_WritePhyUshort(sc, 0x15, 0x0045);
13388         MP_WritePhyUshort(sc, 0x19, 0x0000);
13389         MP_WritePhyUshort(sc, 0x15, 0x0046);
13390         MP_WritePhyUshort(sc, 0x19, 0x0000);
13391         MP_WritePhyUshort(sc, 0x15, 0x0047);
13392         MP_WritePhyUshort(sc, 0x19, 0x0000);
13393         MP_WritePhyUshort(sc, 0x15, 0x0048);
13394         MP_WritePhyUshort(sc, 0x19, 0x0000);
13395         MP_WritePhyUshort(sc, 0x15, 0x0049);
13396         MP_WritePhyUshort(sc, 0x19, 0x0000);
13397         MP_WritePhyUshort(sc, 0x15, 0x004a);
13398         MP_WritePhyUshort(sc, 0x19, 0x4802);
13399         MP_WritePhyUshort(sc, 0x15, 0x004b);
13400         MP_WritePhyUshort(sc, 0x19, 0x4003);
13401         MP_WritePhyUshort(sc, 0x15, 0x004c);
13402         MP_WritePhyUshort(sc, 0x19, 0x4440);
13403         MP_WritePhyUshort(sc, 0x15, 0x004d);
13404         MP_WritePhyUshort(sc, 0x19, 0x63c8);
13405         MP_WritePhyUshort(sc, 0x15, 0x004e);
13406         MP_WritePhyUshort(sc, 0x19, 0x6481);
13407         MP_WritePhyUshort(sc, 0x15, 0x004f);
13408         MP_WritePhyUshort(sc, 0x19, 0x9d00);
13409         MP_WritePhyUshort(sc, 0x15, 0x0050);
13410         MP_WritePhyUshort(sc, 0x19, 0x63e8);
13411         MP_WritePhyUshort(sc, 0x15, 0x0051);
13412         MP_WritePhyUshort(sc, 0x19, 0x7d00);
13413         MP_WritePhyUshort(sc, 0x15, 0x0052);
13414         MP_WritePhyUshort(sc, 0x19, 0x5900);
13415         MP_WritePhyUshort(sc, 0x15, 0x0053);
13416         MP_WritePhyUshort(sc, 0x19, 0x63f8);
13417         MP_WritePhyUshort(sc, 0x15, 0x0054);
13418         MP_WritePhyUshort(sc, 0x19, 0x64a1);
13419         MP_WritePhyUshort(sc, 0x15, 0x0055);
13420         MP_WritePhyUshort(sc, 0x19, 0x3116);
13421         MP_WritePhyUshort(sc, 0x15, 0x0056);
13422         MP_WritePhyUshort(sc, 0x19, 0x0000);
13423         MP_WritePhyUshort(sc, 0x15, 0x0057);
13424         MP_WritePhyUshort(sc, 0x19, 0x0000);
13425         MP_WritePhyUshort(sc, 0x15, 0x0058);
13426         MP_WritePhyUshort(sc, 0x19, 0x0000);
13427         MP_WritePhyUshort(sc, 0x15, 0x0059);
13428         MP_WritePhyUshort(sc, 0x19, 0x0000);
13429         MP_WritePhyUshort(sc, 0x15, 0x005a);
13430         MP_WritePhyUshort(sc, 0x19, 0x7c03);
13431         MP_WritePhyUshort(sc, 0x15, 0x005b);
13432         MP_WritePhyUshort(sc, 0x19, 0x6c03);
13433         MP_WritePhyUshort(sc, 0x15, 0x005c);
13434         MP_WritePhyUshort(sc, 0x19, 0x7c08);
13435         MP_WritePhyUshort(sc, 0x15, 0x005d);
13436         MP_WritePhyUshort(sc, 0x19, 0x6000);
13437         MP_WritePhyUshort(sc, 0x15, 0x005e);
13438         MP_WritePhyUshort(sc, 0x19, 0x59ce);
13439         MP_WritePhyUshort(sc, 0x15, 0x005f);
13440         MP_WritePhyUshort(sc, 0x19, 0x4400);
13441         MP_WritePhyUshort(sc, 0x15, 0x0060);
13442         MP_WritePhyUshort(sc, 0x19, 0x7d00);
13443         MP_WritePhyUshort(sc, 0x15, 0x0061);
13444         MP_WritePhyUshort(sc, 0x19, 0x72b0);
13445         MP_WritePhyUshort(sc, 0x15, 0x0062);
13446         MP_WritePhyUshort(sc, 0x19, 0x400e);
13447         MP_WritePhyUshort(sc, 0x15, 0x0063);
13448         MP_WritePhyUshort(sc, 0x19, 0x4440);
13449         MP_WritePhyUshort(sc, 0x15, 0x0064);
13450         MP_WritePhyUshort(sc, 0x19, 0x9d00);
13451         MP_WritePhyUshort(sc, 0x15, 0x0065);
13452         MP_WritePhyUshort(sc, 0x19, 0x7f00);
13453         MP_WritePhyUshort(sc, 0x15, 0x0066);
13454         MP_WritePhyUshort(sc, 0x19, 0x70b0);
13455         MP_WritePhyUshort(sc, 0x15, 0x0067);
13456         MP_WritePhyUshort(sc, 0x19, 0x7c08);
13457         MP_WritePhyUshort(sc, 0x15, 0x0068);
13458         MP_WritePhyUshort(sc, 0x19, 0x6008);
13459         MP_WritePhyUshort(sc, 0x15, 0x0069);
13460         MP_WritePhyUshort(sc, 0x19, 0x7cf0);
13461         MP_WritePhyUshort(sc, 0x15, 0x006a);
13462         MP_WritePhyUshort(sc, 0x19, 0x7750);
13463         MP_WritePhyUshort(sc, 0x15, 0x006b);
13464         MP_WritePhyUshort(sc, 0x19, 0x4007);
13465         MP_WritePhyUshort(sc, 0x15, 0x006c);
13466         MP_WritePhyUshort(sc, 0x19, 0x4500);
13467         MP_WritePhyUshort(sc, 0x15, 0x006d);
13468         MP_WritePhyUshort(sc, 0x19, 0x4023);
13469         MP_WritePhyUshort(sc, 0x15, 0x006e);
13470         MP_WritePhyUshort(sc, 0x19, 0x4580);
13471         MP_WritePhyUshort(sc, 0x15, 0x006f);
13472         MP_WritePhyUshort(sc, 0x19, 0x9f00);
13473         MP_WritePhyUshort(sc, 0x15, 0x0070);
13474         MP_WritePhyUshort(sc, 0x19, 0xcd78);
13475         MP_WritePhyUshort(sc, 0x15, 0x0071);
13476         MP_WritePhyUshort(sc, 0x19, 0x0003);
13477         MP_WritePhyUshort(sc, 0x15, 0x0072);
13478         MP_WritePhyUshort(sc, 0x19, 0xbe02);
13479         MP_WritePhyUshort(sc, 0x15, 0x0073);
13480         MP_WritePhyUshort(sc, 0x19, 0x3070);
13481         MP_WritePhyUshort(sc, 0x15, 0x0074);
13482         MP_WritePhyUshort(sc, 0x19, 0x7cf0);
13483         MP_WritePhyUshort(sc, 0x15, 0x0075);
13484         MP_WritePhyUshort(sc, 0x19, 0x77f0);
13485         MP_WritePhyUshort(sc, 0x15, 0x0076);
13486         MP_WritePhyUshort(sc, 0x19, 0x4400);
13487         MP_WritePhyUshort(sc, 0x15, 0x0077);
13488         MP_WritePhyUshort(sc, 0x19, 0x4007);
13489         MP_WritePhyUshort(sc, 0x15, 0x0078);
13490         MP_WritePhyUshort(sc, 0x19, 0x4500);
13491         MP_WritePhyUshort(sc, 0x15, 0x0079);
13492         MP_WritePhyUshort(sc, 0x19, 0x4023);
13493         MP_WritePhyUshort(sc, 0x15, 0x007a);
13494         MP_WritePhyUshort(sc, 0x19, 0x4580);
13495         MP_WritePhyUshort(sc, 0x15, 0x007b);
13496         MP_WritePhyUshort(sc, 0x19, 0x9f00);
13497         MP_WritePhyUshort(sc, 0x15, 0x007c);
13498         MP_WritePhyUshort(sc, 0x19, 0xce80);
13499         MP_WritePhyUshort(sc, 0x15, 0x007d);
13500         MP_WritePhyUshort(sc, 0x19, 0x0004);
13501         MP_WritePhyUshort(sc, 0x15, 0x007e);
13502         MP_WritePhyUshort(sc, 0x19, 0xce80);
13503         MP_WritePhyUshort(sc, 0x15, 0x007f);
13504         MP_WritePhyUshort(sc, 0x19, 0x0002);
13505         MP_WritePhyUshort(sc, 0x15, 0x0080);
13506         MP_WritePhyUshort(sc, 0x19, 0x307c);
13507         MP_WritePhyUshort(sc, 0x15, 0x0081);
13508         MP_WritePhyUshort(sc, 0x19, 0x4400);
13509         MP_WritePhyUshort(sc, 0x15, 0x0082);
13510         MP_WritePhyUshort(sc, 0x19, 0x480f);
13511         MP_WritePhyUshort(sc, 0x15, 0x0083);
13512         MP_WritePhyUshort(sc, 0x19, 0x6802);
13513         MP_WritePhyUshort(sc, 0x15, 0x0084);
13514         MP_WritePhyUshort(sc, 0x19, 0x6680);
13515         MP_WritePhyUshort(sc, 0x15, 0x0085);
13516         MP_WritePhyUshort(sc, 0x19, 0x7c10);
13517         MP_WritePhyUshort(sc, 0x15, 0x0086);
13518         MP_WritePhyUshort(sc, 0x19, 0x6010);
13519         MP_WritePhyUshort(sc, 0x15, 0x0087);
13520         MP_WritePhyUshort(sc, 0x19, 0x400a);
13521         MP_WritePhyUshort(sc, 0x15, 0x0088);
13522         MP_WritePhyUshort(sc, 0x19, 0x4580);
13523         MP_WritePhyUshort(sc, 0x15, 0x0089);
13524         MP_WritePhyUshort(sc, 0x19, 0x9e00);
13525         MP_WritePhyUshort(sc, 0x15, 0x008a);
13526         MP_WritePhyUshort(sc, 0x19, 0x7d00);
13527         MP_WritePhyUshort(sc, 0x15, 0x008b);
13528         MP_WritePhyUshort(sc, 0x19, 0x5800);
13529         MP_WritePhyUshort(sc, 0x15, 0x008c);
13530         MP_WritePhyUshort(sc, 0x19, 0x63c8);
13531         MP_WritePhyUshort(sc, 0x15, 0x008d);
13532         MP_WritePhyUshort(sc, 0x19, 0x63d8);
13533         MP_WritePhyUshort(sc, 0x15, 0x008e);
13534         MP_WritePhyUshort(sc, 0x19, 0x66a0);
13535         MP_WritePhyUshort(sc, 0x15, 0x008f);
13536         MP_WritePhyUshort(sc, 0x19, 0x8300);
13537         MP_WritePhyUshort(sc, 0x15, 0x0090);
13538         MP_WritePhyUshort(sc, 0x19, 0x7ff0);
13539         MP_WritePhyUshort(sc, 0x15, 0x0091);
13540         MP_WritePhyUshort(sc, 0x19, 0x74f0);
13541         MP_WritePhyUshort(sc, 0x15, 0x0092);
13542         MP_WritePhyUshort(sc, 0x19, 0x3006);
13543         MP_WritePhyUshort(sc, 0x15, 0x0093);
13544         MP_WritePhyUshort(sc, 0x19, 0x0000);
13545         MP_WritePhyUshort(sc, 0x15, 0x0094);
13546         MP_WritePhyUshort(sc, 0x19, 0x0000);
13547         MP_WritePhyUshort(sc, 0x15, 0x0095);
13548         MP_WritePhyUshort(sc, 0x19, 0x0000);
13549         MP_WritePhyUshort(sc, 0x15, 0x0096);
13550         MP_WritePhyUshort(sc, 0x19, 0x0000);
13551         MP_WritePhyUshort(sc, 0x15, 0x0097);
13552         MP_WritePhyUshort(sc, 0x19, 0x4803);
13553         MP_WritePhyUshort(sc, 0x15, 0x0098);
13554         MP_WritePhyUshort(sc, 0x19, 0x7c03);
13555         MP_WritePhyUshort(sc, 0x15, 0x0099);
13556         MP_WritePhyUshort(sc, 0x19, 0x6c03);
13557         MP_WritePhyUshort(sc, 0x15, 0x009a);
13558         MP_WritePhyUshort(sc, 0x19, 0xa203);
13559         MP_WritePhyUshort(sc, 0x15, 0x009b);
13560         MP_WritePhyUshort(sc, 0x19, 0x64b1);
13561         MP_WritePhyUshort(sc, 0x15, 0x009c);
13562         MP_WritePhyUshort(sc, 0x19, 0x309e);
13563         MP_WritePhyUshort(sc, 0x15, 0x009d);
13564         MP_WritePhyUshort(sc, 0x19, 0x64b3);
13565         MP_WritePhyUshort(sc, 0x15, 0x009e);
13566         MP_WritePhyUshort(sc, 0x19, 0x4030);
13567         MP_WritePhyUshort(sc, 0x15, 0x009f);
13568         MP_WritePhyUshort(sc, 0x19, 0x440e);
13569         MP_WritePhyUshort(sc, 0x15, 0x00a0);
13570         MP_WritePhyUshort(sc, 0x19, 0x4020);
13571         MP_WritePhyUshort(sc, 0x15, 0x00a1);
13572         MP_WritePhyUshort(sc, 0x19, 0x4419);
13573         MP_WritePhyUshort(sc, 0x15, 0x00a2);
13574         MP_WritePhyUshort(sc, 0x19, 0x7801);
13575         MP_WritePhyUshort(sc, 0x15, 0x00a3);
13576         MP_WritePhyUshort(sc, 0x19, 0xc520);
13577         MP_WritePhyUshort(sc, 0x15, 0x00a4);
13578         MP_WritePhyUshort(sc, 0x19, 0x000b);
13579         MP_WritePhyUshort(sc, 0x15, 0x00a5);
13580         MP_WritePhyUshort(sc, 0x19, 0x4020);
13581         MP_WritePhyUshort(sc, 0x15, 0x00a6);
13582         MP_WritePhyUshort(sc, 0x19, 0x7800);
13583         MP_WritePhyUshort(sc, 0x15, 0x00a7);
13584         MP_WritePhyUshort(sc, 0x19, 0x58a4);
13585         MP_WritePhyUshort(sc, 0x15, 0x00a8);
13586         MP_WritePhyUshort(sc, 0x19, 0x63da);
13587         MP_WritePhyUshort(sc, 0x15, 0x00a9);
13588         MP_WritePhyUshort(sc, 0x19, 0x5cb0);
13589         MP_WritePhyUshort(sc, 0x15, 0x00aa);
13590         MP_WritePhyUshort(sc, 0x19, 0x7d00);
13591         MP_WritePhyUshort(sc, 0x15, 0x00ab);
13592         MP_WritePhyUshort(sc, 0x19, 0x72b0);
13593         MP_WritePhyUshort(sc, 0x15, 0x00ac);
13594         MP_WritePhyUshort(sc, 0x19, 0x7f00);
13595         MP_WritePhyUshort(sc, 0x15, 0x00ad);
13596         MP_WritePhyUshort(sc, 0x19, 0x70b0);
13597         MP_WritePhyUshort(sc, 0x15, 0x00ae);
13598         MP_WritePhyUshort(sc, 0x19, 0x30b8);
13599         MP_WritePhyUshort(sc, 0x15, 0x00AF);
13600         MP_WritePhyUshort(sc, 0x19, 0x4060);
13601         MP_WritePhyUshort(sc, 0x15, 0x00B0);
13602         MP_WritePhyUshort(sc, 0x19, 0x7800);
13603         MP_WritePhyUshort(sc, 0x15, 0x00B1);
13604         MP_WritePhyUshort(sc, 0x19, 0x7e00);
13605         MP_WritePhyUshort(sc, 0x15, 0x00B2);
13606         MP_WritePhyUshort(sc, 0x19, 0x72B0);
13607         MP_WritePhyUshort(sc, 0x15, 0x00B3);
13608         MP_WritePhyUshort(sc, 0x19, 0x7F00);
13609         MP_WritePhyUshort(sc, 0x15, 0x00B4);
13610         MP_WritePhyUshort(sc, 0x19, 0x73B0);
13611         MP_WritePhyUshort(sc, 0x15, 0x00b5);
13612         MP_WritePhyUshort(sc, 0x19, 0x58a0);
13613         MP_WritePhyUshort(sc, 0x15, 0x00b6);
13614         MP_WritePhyUshort(sc, 0x19, 0x63d2);
13615         MP_WritePhyUshort(sc, 0x15, 0x00b7);
13616         MP_WritePhyUshort(sc, 0x19, 0x5c00);
13617         MP_WritePhyUshort(sc, 0x15, 0x00b8);
13618         MP_WritePhyUshort(sc, 0x19, 0x5780);
13619         MP_WritePhyUshort(sc, 0x15, 0x00b9);
13620         MP_WritePhyUshort(sc, 0x19, 0xb60d);
13621         MP_WritePhyUshort(sc, 0x15, 0x00ba);
13622         MP_WritePhyUshort(sc, 0x19, 0x9bff);
13623         MP_WritePhyUshort(sc, 0x15, 0x00bb);
13624         MP_WritePhyUshort(sc, 0x19, 0x7c03);
13625         MP_WritePhyUshort(sc, 0x15, 0x00bc);
13626         MP_WritePhyUshort(sc, 0x19, 0x6001);
13627         MP_WritePhyUshort(sc, 0x15, 0x00bd);
13628         MP_WritePhyUshort(sc, 0x19, 0xc020);
13629         MP_WritePhyUshort(sc, 0x15, 0x00be);
13630         MP_WritePhyUshort(sc, 0x19, 0x002b);
13631         MP_WritePhyUshort(sc, 0x15, 0x00bf);
13632         MP_WritePhyUshort(sc, 0x19, 0xc137);
13633         MP_WritePhyUshort(sc, 0x15, 0x00c0);
13634         MP_WritePhyUshort(sc, 0x19, 0x0006);
13635         MP_WritePhyUshort(sc, 0x15, 0x00c1);
13636         MP_WritePhyUshort(sc, 0x19, 0x9af8);
13637         MP_WritePhyUshort(sc, 0x15, 0x00c2);
13638         MP_WritePhyUshort(sc, 0x19, 0x30c6);
13639         MP_WritePhyUshort(sc, 0x15, 0x00c3);
13640         MP_WritePhyUshort(sc, 0x19, 0x0000);
13641         MP_WritePhyUshort(sc, 0x15, 0x00c4);
13642         MP_WritePhyUshort(sc, 0x19, 0x0000);
13643         MP_WritePhyUshort(sc, 0x15, 0x00c5);
13644         MP_WritePhyUshort(sc, 0x19, 0x0000);
13645         MP_WritePhyUshort(sc, 0x15, 0x00c6);
13646         MP_WritePhyUshort(sc, 0x19, 0x7d00);
13647         MP_WritePhyUshort(sc, 0x15, 0x00c7);
13648         MP_WritePhyUshort(sc, 0x19, 0x70b0);
13649         MP_WritePhyUshort(sc, 0x15, 0x00c8);
13650         MP_WritePhyUshort(sc, 0x19, 0x4400);
13651         MP_WritePhyUshort(sc, 0x15, 0x00c9);
13652         MP_WritePhyUshort(sc, 0x19, 0x4804);
13653         MP_WritePhyUshort(sc, 0x15, 0x00ca);
13654         MP_WritePhyUshort(sc, 0x19, 0x7c80);
13655         MP_WritePhyUshort(sc, 0x15, 0x00cb);
13656         MP_WritePhyUshort(sc, 0x19, 0x5c80);
13657         MP_WritePhyUshort(sc, 0x15, 0x00cc);
13658         MP_WritePhyUshort(sc, 0x19, 0x4010);
13659         MP_WritePhyUshort(sc, 0x15, 0x00cd);
13660         MP_WritePhyUshort(sc, 0x19, 0x4415);
13661         MP_WritePhyUshort(sc, 0x15, 0x00ce);
13662         MP_WritePhyUshort(sc, 0x19, 0x9b00);
13663         MP_WritePhyUshort(sc, 0x15, 0x00cf);
13664         MP_WritePhyUshort(sc, 0x19, 0x7f00);
13665         MP_WritePhyUshort(sc, 0x15, 0x00d0);
13666         MP_WritePhyUshort(sc, 0x19, 0x70b0);
13667         MP_WritePhyUshort(sc, 0x15, 0x00d1);
13668         MP_WritePhyUshort(sc, 0x19, 0x3177);
13669         MP_WritePhyUshort(sc, 0x15, 0x00d2);
13670         MP_WritePhyUshort(sc, 0x19, 0x0000);
13671         MP_WritePhyUshort(sc, 0x15, 0x00d3);
13672         MP_WritePhyUshort(sc, 0x19, 0x0000);
13673         MP_WritePhyUshort(sc, 0x15, 0x00d4);
13674         MP_WritePhyUshort(sc, 0x19, 0x0000);
13675         MP_WritePhyUshort(sc, 0x15, 0x00d5);
13676         MP_WritePhyUshort(sc, 0x19, 0x4808);
13677         MP_WritePhyUshort(sc, 0x15, 0x00d6);
13678         MP_WritePhyUshort(sc, 0x19, 0x4007);
13679         MP_WritePhyUshort(sc, 0x15, 0x00d7);
13680         MP_WritePhyUshort(sc, 0x19, 0x4420);
13681         MP_WritePhyUshort(sc, 0x15, 0x00d8);
13682         MP_WritePhyUshort(sc, 0x19, 0x63d8);
13683         MP_WritePhyUshort(sc, 0x15, 0x00d9);
13684         MP_WritePhyUshort(sc, 0x19, 0xb608);
13685         MP_WritePhyUshort(sc, 0x15, 0x00da);
13686         MP_WritePhyUshort(sc, 0x19, 0xbcbd);
13687         MP_WritePhyUshort(sc, 0x15, 0x00db);
13688         MP_WritePhyUshort(sc, 0x19, 0xc60b);
13689         MP_WritePhyUshort(sc, 0x15, 0x00dc);
13690         MP_WritePhyUshort(sc, 0x19, 0x00fd);
13691         MP_WritePhyUshort(sc, 0x15, 0x00dd);
13692         MP_WritePhyUshort(sc, 0x19, 0x30e1);
13693         MP_WritePhyUshort(sc, 0x15, 0x00de);
13694         MP_WritePhyUshort(sc, 0x19, 0x0000);
13695         MP_WritePhyUshort(sc, 0x15, 0x00df);
13696         MP_WritePhyUshort(sc, 0x19, 0x0000);
13697         MP_WritePhyUshort(sc, 0x15, 0x00e0);
13698         MP_WritePhyUshort(sc, 0x19, 0x0000);
13699         MP_WritePhyUshort(sc, 0x15, 0x00e1);
13700         MP_WritePhyUshort(sc, 0x19, 0x4809);
13701         MP_WritePhyUshort(sc, 0x15, 0x00e2);
13702         MP_WritePhyUshort(sc, 0x19, 0x7e40);
13703         MP_WritePhyUshort(sc, 0x15, 0x00e3);
13704         MP_WritePhyUshort(sc, 0x19, 0x5a40);
13705         MP_WritePhyUshort(sc, 0x15, 0x00e4);
13706         MP_WritePhyUshort(sc, 0x19, 0x305a);
13707         MP_WritePhyUshort(sc, 0x15, 0x00e5);
13708         MP_WritePhyUshort(sc, 0x19, 0x0000);
13709         MP_WritePhyUshort(sc, 0x15, 0x00e6);
13710         MP_WritePhyUshort(sc, 0x19, 0x0000);
13711         MP_WritePhyUshort(sc, 0x15, 0x00e7);
13712         MP_WritePhyUshort(sc, 0x19, 0x0000);
13713         MP_WritePhyUshort(sc, 0x15, 0x00e8);
13714         MP_WritePhyUshort(sc, 0x19, 0x0000);
13715         MP_WritePhyUshort(sc, 0x15, 0x00e9);
13716         MP_WritePhyUshort(sc, 0x19, 0x480a);
13717         MP_WritePhyUshort(sc, 0x15, 0x00ea);
13718         MP_WritePhyUshort(sc, 0x19, 0x5820);
13719         MP_WritePhyUshort(sc, 0x15, 0x00eb);
13720         MP_WritePhyUshort(sc, 0x19, 0x6c03);
13721         MP_WritePhyUshort(sc, 0x15, 0x00ec);
13722         MP_WritePhyUshort(sc, 0x19, 0xb60a);
13723         MP_WritePhyUshort(sc, 0x15, 0x00ed);
13724         MP_WritePhyUshort(sc, 0x19, 0xda07);
13725         MP_WritePhyUshort(sc, 0x15, 0x00ee);
13726         MP_WritePhyUshort(sc, 0x19, 0x0008);
13727         MP_WritePhyUshort(sc, 0x15, 0x00ef);
13728         MP_WritePhyUshort(sc, 0x19, 0xc60b);
13729         MP_WritePhyUshort(sc, 0x15, 0x00f0);
13730         MP_WritePhyUshort(sc, 0x19, 0x00fc);
13731         MP_WritePhyUshort(sc, 0x15, 0x00f1);
13732         MP_WritePhyUshort(sc, 0x19, 0x30f6);
13733         MP_WritePhyUshort(sc, 0x15, 0x00f2);
13734         MP_WritePhyUshort(sc, 0x19, 0x0000);
13735         MP_WritePhyUshort(sc, 0x15, 0x00f3);
13736         MP_WritePhyUshort(sc, 0x19, 0x0000);
13737         MP_WritePhyUshort(sc, 0x15, 0x00f4);
13738         MP_WritePhyUshort(sc, 0x19, 0x0000);
13739         MP_WritePhyUshort(sc, 0x15, 0x00f5);
13740         MP_WritePhyUshort(sc, 0x19, 0x0000);
13741         MP_WritePhyUshort(sc, 0x15, 0x00f6);
13742         MP_WritePhyUshort(sc, 0x19, 0x4408);
13743         MP_WritePhyUshort(sc, 0x15, 0x00f7);
13744         MP_WritePhyUshort(sc, 0x19, 0x480b);
13745         MP_WritePhyUshort(sc, 0x15, 0x00f8);
13746         MP_WritePhyUshort(sc, 0x19, 0x6f03);
13747         MP_WritePhyUshort(sc, 0x15, 0x00f9);
13748         MP_WritePhyUshort(sc, 0x19, 0x405f);
13749         MP_WritePhyUshort(sc, 0x15, 0x00fa);
13750         MP_WritePhyUshort(sc, 0x19, 0x4448);
13751         MP_WritePhyUshort(sc, 0x15, 0x00fb);
13752         MP_WritePhyUshort(sc, 0x19, 0x4020);
13753         MP_WritePhyUshort(sc, 0x15, 0x00fc);
13754         MP_WritePhyUshort(sc, 0x19, 0x4468);
13755         MP_WritePhyUshort(sc, 0x15, 0x00fd);
13756         MP_WritePhyUshort(sc, 0x19, 0x9c03);
13757         MP_WritePhyUshort(sc, 0x15, 0x00fe);
13758         MP_WritePhyUshort(sc, 0x19, 0x6f07);
13759         MP_WritePhyUshort(sc, 0x15, 0x00ff);
13760         MP_WritePhyUshort(sc, 0x19, 0x58a0);
13761         MP_WritePhyUshort(sc, 0x15, 0x0100);
13762         MP_WritePhyUshort(sc, 0x19, 0xd6d1);
13763         MP_WritePhyUshort(sc, 0x15, 0x0101);
13764         MP_WritePhyUshort(sc, 0x19, 0x0004);
13765         MP_WritePhyUshort(sc, 0x15, 0x0102);
13766         MP_WritePhyUshort(sc, 0x19, 0xc137);
13767         MP_WritePhyUshort(sc, 0x15, 0x0103);
13768         MP_WritePhyUshort(sc, 0x19, 0x0002);
13769         MP_WritePhyUshort(sc, 0x15, 0x0104);
13770         MP_WritePhyUshort(sc, 0x19, 0xa0e5);
13771         MP_WritePhyUshort(sc, 0x15, 0x0105);
13772         MP_WritePhyUshort(sc, 0x19, 0x9df8);
13773         MP_WritePhyUshort(sc, 0x15, 0x0106);
13774         MP_WritePhyUshort(sc, 0x19, 0x30c6);
13775         MP_WritePhyUshort(sc, 0x15, 0x0107);
13776         MP_WritePhyUshort(sc, 0x19, 0x0000);
13777         MP_WritePhyUshort(sc, 0x15, 0x0108);
13778         MP_WritePhyUshort(sc, 0x19, 0x0000);
13779         MP_WritePhyUshort(sc, 0x15, 0x0109);
13780         MP_WritePhyUshort(sc, 0x19, 0x0000);
13781         MP_WritePhyUshort(sc, 0x15, 0x010a);
13782         MP_WritePhyUshort(sc, 0x19, 0x0000);
13783         MP_WritePhyUshort(sc, 0x15, 0x010b);
13784         MP_WritePhyUshort(sc, 0x19, 0x4808);
13785         MP_WritePhyUshort(sc, 0x15, 0x010c);
13786         MP_WritePhyUshort(sc, 0x19, 0xc32d);
13787         MP_WritePhyUshort(sc, 0x15, 0x010d);
13788         MP_WritePhyUshort(sc, 0x19, 0x0003);
13789         MP_WritePhyUshort(sc, 0x15, 0x010e);
13790         MP_WritePhyUshort(sc, 0x19, 0xc8b3);
13791         MP_WritePhyUshort(sc, 0x15, 0x010f);
13792         MP_WritePhyUshort(sc, 0x19, 0x00fc);
13793         MP_WritePhyUshort(sc, 0x15, 0x0110);
13794         MP_WritePhyUshort(sc, 0x19, 0x4400);
13795         MP_WritePhyUshort(sc, 0x15, 0x0111);
13796         MP_WritePhyUshort(sc, 0x19, 0x3116);
13797         MP_WritePhyUshort(sc, 0x15, 0x0112);
13798         MP_WritePhyUshort(sc, 0x19, 0x0000);
13799         MP_WritePhyUshort(sc, 0x15, 0x0113);
13800         MP_WritePhyUshort(sc, 0x19, 0x0000);
13801         MP_WritePhyUshort(sc, 0x15, 0x0114);
13802         MP_WritePhyUshort(sc, 0x19, 0x0000);
13803         MP_WritePhyUshort(sc, 0x15, 0x0115);
13804         MP_WritePhyUshort(sc, 0x19, 0x0000);
13805         MP_WritePhyUshort(sc, 0x15, 0x0116);
13806         MP_WritePhyUshort(sc, 0x19, 0x4803);
13807         MP_WritePhyUshort(sc, 0x15, 0x0117);
13808         MP_WritePhyUshort(sc, 0x19, 0x7c03);
13809         MP_WritePhyUshort(sc, 0x15, 0x0118);
13810         MP_WritePhyUshort(sc, 0x19, 0x6c02);
13811         MP_WritePhyUshort(sc, 0x15, 0x0119);
13812         MP_WritePhyUshort(sc, 0x19, 0x7c04);
13813         MP_WritePhyUshort(sc, 0x15, 0x011a);
13814         MP_WritePhyUshort(sc, 0x19, 0x6000);
13815         MP_WritePhyUshort(sc, 0x15, 0x011b);
13816         MP_WritePhyUshort(sc, 0x19, 0x5cf7);
13817         MP_WritePhyUshort(sc, 0x15, 0x011c);
13818         MP_WritePhyUshort(sc, 0x19, 0x7c2a);
13819         MP_WritePhyUshort(sc, 0x15, 0x011d);
13820         MP_WritePhyUshort(sc, 0x19, 0x5800);
13821         MP_WritePhyUshort(sc, 0x15, 0x011e);
13822         MP_WritePhyUshort(sc, 0x19, 0x5400);
13823         MP_WritePhyUshort(sc, 0x15, 0x011f);
13824         MP_WritePhyUshort(sc, 0x19, 0x7c08);
13825         MP_WritePhyUshort(sc, 0x15, 0x0120);
13826         MP_WritePhyUshort(sc, 0x19, 0x74f0);
13827         MP_WritePhyUshort(sc, 0x15, 0x0121);
13828         MP_WritePhyUshort(sc, 0x19, 0x4019);
13829         MP_WritePhyUshort(sc, 0x15, 0x0122);
13830         MP_WritePhyUshort(sc, 0x19, 0x440d);
13831         MP_WritePhyUshort(sc, 0x15, 0x0123);
13832         MP_WritePhyUshort(sc, 0x19, 0xb6c1);
13833         MP_WritePhyUshort(sc, 0x15, 0x0124);
13834         MP_WritePhyUshort(sc, 0x19, 0xc05b);
13835         MP_WritePhyUshort(sc, 0x15, 0x0125);
13836         MP_WritePhyUshort(sc, 0x19, 0x00bf);
13837         MP_WritePhyUshort(sc, 0x15, 0x0126);
13838         MP_WritePhyUshort(sc, 0x19, 0xc025);
13839         MP_WritePhyUshort(sc, 0x15, 0x0127);
13840         MP_WritePhyUshort(sc, 0x19, 0x00bd);
13841         MP_WritePhyUshort(sc, 0x15, 0x0128);
13842         MP_WritePhyUshort(sc, 0x19, 0xc603);
13843         MP_WritePhyUshort(sc, 0x15, 0x0129);
13844         MP_WritePhyUshort(sc, 0x19, 0x00bb);
13845         MP_WritePhyUshort(sc, 0x15, 0x012a);
13846         MP_WritePhyUshort(sc, 0x19, 0x8805);
13847         MP_WritePhyUshort(sc, 0x15, 0x012b);
13848         MP_WritePhyUshort(sc, 0x19, 0x7801);
13849         MP_WritePhyUshort(sc, 0x15, 0x012c);
13850         MP_WritePhyUshort(sc, 0x19, 0x4001);
13851         MP_WritePhyUshort(sc, 0x15, 0x012d);
13852         MP_WritePhyUshort(sc, 0x19, 0x7800);
13853         MP_WritePhyUshort(sc, 0x15, 0x012e);
13854         MP_WritePhyUshort(sc, 0x19, 0xa3dd);
13855         MP_WritePhyUshort(sc, 0x15, 0x012f);
13856         MP_WritePhyUshort(sc, 0x19, 0x7c03);
13857         MP_WritePhyUshort(sc, 0x15, 0x0130);
13858         MP_WritePhyUshort(sc, 0x19, 0x6c03);
13859         MP_WritePhyUshort(sc, 0x15, 0x0131);
13860         MP_WritePhyUshort(sc, 0x19, 0x8407);
13861         MP_WritePhyUshort(sc, 0x15, 0x0132);
13862         MP_WritePhyUshort(sc, 0x19, 0x7c03);
13863         MP_WritePhyUshort(sc, 0x15, 0x0133);
13864         MP_WritePhyUshort(sc, 0x19, 0x6c02);
13865         MP_WritePhyUshort(sc, 0x15, 0x0134);
13866         MP_WritePhyUshort(sc, 0x19, 0xd9b8);
13867         MP_WritePhyUshort(sc, 0x15, 0x0135);
13868         MP_WritePhyUshort(sc, 0x19, 0x0003);
13869         MP_WritePhyUshort(sc, 0x15, 0x0136);
13870         MP_WritePhyUshort(sc, 0x19, 0xc240);
13871         MP_WritePhyUshort(sc, 0x15, 0x0137);
13872         MP_WritePhyUshort(sc, 0x19, 0x0015);
13873         MP_WritePhyUshort(sc, 0x15, 0x0138);
13874         MP_WritePhyUshort(sc, 0x19, 0x7c03);
13875         MP_WritePhyUshort(sc, 0x15, 0x0139);
13876         MP_WritePhyUshort(sc, 0x19, 0x6c02);
13877         MP_WritePhyUshort(sc, 0x15, 0x013a);
13878         MP_WritePhyUshort(sc, 0x19, 0x9ae9);
13879         MP_WritePhyUshort(sc, 0x15, 0x013b);
13880         MP_WritePhyUshort(sc, 0x19, 0x3140);
13881         MP_WritePhyUshort(sc, 0x15, 0x013c);
13882         MP_WritePhyUshort(sc, 0x19, 0x0000);
13883         MP_WritePhyUshort(sc, 0x15, 0x013d);
13884         MP_WritePhyUshort(sc, 0x19, 0x0000);
13885         MP_WritePhyUshort(sc, 0x15, 0x013e);
13886         MP_WritePhyUshort(sc, 0x19, 0x0000);
13887         MP_WritePhyUshort(sc, 0x15, 0x013f);
13888         MP_WritePhyUshort(sc, 0x19, 0x0000);
13889         MP_WritePhyUshort(sc, 0x15, 0x0140);
13890         MP_WritePhyUshort(sc, 0x19, 0x4807);
13891         MP_WritePhyUshort(sc, 0x15, 0x0141);
13892         MP_WritePhyUshort(sc, 0x19, 0x4004);
13893         MP_WritePhyUshort(sc, 0x15, 0x0142);
13894         MP_WritePhyUshort(sc, 0x19, 0x4410);
13895         MP_WritePhyUshort(sc, 0x15, 0x0143);
13896         MP_WritePhyUshort(sc, 0x19, 0x7c0c);
13897         MP_WritePhyUshort(sc, 0x15, 0x0144);
13898         MP_WritePhyUshort(sc, 0x19, 0x600c);
13899         MP_WritePhyUshort(sc, 0x15, 0x0145);
13900         MP_WritePhyUshort(sc, 0x19, 0x9b00);
13901         MP_WritePhyUshort(sc, 0x15, 0x0146);
13902         MP_WritePhyUshort(sc, 0x19, 0xa68f);
13903         MP_WritePhyUshort(sc, 0x15, 0x0147);
13904         MP_WritePhyUshort(sc, 0x19, 0x3116);
13905         MP_WritePhyUshort(sc, 0x15, 0x0148);
13906         MP_WritePhyUshort(sc, 0x19, 0x0000);
13907         MP_WritePhyUshort(sc, 0x15, 0x0149);
13908         MP_WritePhyUshort(sc, 0x19, 0x0000);
13909         MP_WritePhyUshort(sc, 0x15, 0x014a);
13910         MP_WritePhyUshort(sc, 0x19, 0x0000);
13911         MP_WritePhyUshort(sc, 0x15, 0x014b);
13912         MP_WritePhyUshort(sc, 0x19, 0x0000);
13913         MP_WritePhyUshort(sc, 0x15, 0x014c);
13914         MP_WritePhyUshort(sc, 0x19, 0x4804);
13915         MP_WritePhyUshort(sc, 0x15, 0x014d);
13916         MP_WritePhyUshort(sc, 0x19, 0x54c0);
13917         MP_WritePhyUshort(sc, 0x15, 0x014e);
13918         MP_WritePhyUshort(sc, 0x19, 0xb703);
13919         MP_WritePhyUshort(sc, 0x15, 0x014f);
13920         MP_WritePhyUshort(sc, 0x19, 0x5cff);
13921         MP_WritePhyUshort(sc, 0x15, 0x0150);
13922         MP_WritePhyUshort(sc, 0x19, 0x315f);
13923         MP_WritePhyUshort(sc, 0x15, 0x0151);
13924         MP_WritePhyUshort(sc, 0x19, 0x7c08);
13925         MP_WritePhyUshort(sc, 0x15, 0x0152);
13926         MP_WritePhyUshort(sc, 0x19, 0x74f8);
13927         MP_WritePhyUshort(sc, 0x15, 0x0153);
13928         MP_WritePhyUshort(sc, 0x19, 0x6421);
13929         MP_WritePhyUshort(sc, 0x15, 0x0154);
13930         MP_WritePhyUshort(sc, 0x19, 0x7c08);
13931         MP_WritePhyUshort(sc, 0x15, 0x0155);
13932         MP_WritePhyUshort(sc, 0x19, 0x6000);
13933         MP_WritePhyUshort(sc, 0x15, 0x0156);
13934         MP_WritePhyUshort(sc, 0x19, 0x4003);
13935         MP_WritePhyUshort(sc, 0x15, 0x0157);
13936         MP_WritePhyUshort(sc, 0x19, 0x4418);
13937         MP_WritePhyUshort(sc, 0x15, 0x0158);
13938         MP_WritePhyUshort(sc, 0x19, 0x9b00);
13939         MP_WritePhyUshort(sc, 0x15, 0x0159);
13940         MP_WritePhyUshort(sc, 0x19, 0x6461);
13941         MP_WritePhyUshort(sc, 0x15, 0x015a);
13942         MP_WritePhyUshort(sc, 0x19, 0x64e1);
13943         MP_WritePhyUshort(sc, 0x15, 0x015b);
13944         MP_WritePhyUshort(sc, 0x19, 0x7c20);
13945         MP_WritePhyUshort(sc, 0x15, 0x015c);
13946         MP_WritePhyUshort(sc, 0x19, 0x5820);
13947         MP_WritePhyUshort(sc, 0x15, 0x015d);
13948         MP_WritePhyUshort(sc, 0x19, 0x5ccf);
13949         MP_WritePhyUshort(sc, 0x15, 0x015e);
13950         MP_WritePhyUshort(sc, 0x19, 0x7050);
13951         MP_WritePhyUshort(sc, 0x15, 0x015f);
13952         MP_WritePhyUshort(sc, 0x19, 0xd9b8);
13953         MP_WritePhyUshort(sc, 0x15, 0x0160);
13954         MP_WritePhyUshort(sc, 0x19, 0x0008);
13955         MP_WritePhyUshort(sc, 0x15, 0x0161);
13956         MP_WritePhyUshort(sc, 0x19, 0xdab1);
13957         MP_WritePhyUshort(sc, 0x15, 0x0162);
13958         MP_WritePhyUshort(sc, 0x19, 0x0015);
13959         MP_WritePhyUshort(sc, 0x15, 0x0163);
13960         MP_WritePhyUshort(sc, 0x19, 0xc244);
13961         MP_WritePhyUshort(sc, 0x15, 0x0164);
13962         MP_WritePhyUshort(sc, 0x19, 0x0013);
13963         MP_WritePhyUshort(sc, 0x15, 0x0165);
13964         MP_WritePhyUshort(sc, 0x19, 0xc021);
13965         MP_WritePhyUshort(sc, 0x15, 0x0166);
13966         MP_WritePhyUshort(sc, 0x19, 0x00f9);
13967         MP_WritePhyUshort(sc, 0x15, 0x0167);
13968         MP_WritePhyUshort(sc, 0x19, 0x3177);
13969         MP_WritePhyUshort(sc, 0x15, 0x0168);
13970         MP_WritePhyUshort(sc, 0x19, 0x5cf7);
13971         MP_WritePhyUshort(sc, 0x15, 0x0169);
13972         MP_WritePhyUshort(sc, 0x19, 0x4010);
13973         MP_WritePhyUshort(sc, 0x15, 0x016a);
13974         MP_WritePhyUshort(sc, 0x19, 0x4428);
13975         MP_WritePhyUshort(sc, 0x15, 0x016b);
13976         MP_WritePhyUshort(sc, 0x19, 0x9c00);
13977         MP_WritePhyUshort(sc, 0x15, 0x016c);
13978         MP_WritePhyUshort(sc, 0x19, 0x7c08);
13979         MP_WritePhyUshort(sc, 0x15, 0x016d);
13980         MP_WritePhyUshort(sc, 0x19, 0x6008);
13981         MP_WritePhyUshort(sc, 0x15, 0x016e);
13982         MP_WritePhyUshort(sc, 0x19, 0x7c08);
13983         MP_WritePhyUshort(sc, 0x15, 0x016f);
13984         MP_WritePhyUshort(sc, 0x19, 0x74f0);
13985         MP_WritePhyUshort(sc, 0x15, 0x0170);
13986         MP_WritePhyUshort(sc, 0x19, 0x6461);
13987         MP_WritePhyUshort(sc, 0x15, 0x0171);
13988         MP_WritePhyUshort(sc, 0x19, 0x6421);
13989         MP_WritePhyUshort(sc, 0x15, 0x0172);
13990         MP_WritePhyUshort(sc, 0x19, 0x64a1);
13991         MP_WritePhyUshort(sc, 0x15, 0x0173);
13992         MP_WritePhyUshort(sc, 0x19, 0x3116);
13993         MP_WritePhyUshort(sc, 0x15, 0x0174);
13994         MP_WritePhyUshort(sc, 0x19, 0x0000);
13995         MP_WritePhyUshort(sc, 0x15, 0x0175);
13996         MP_WritePhyUshort(sc, 0x19, 0x0000);
13997         MP_WritePhyUshort(sc, 0x15, 0x0176);
13998         MP_WritePhyUshort(sc, 0x19, 0x0000);
13999         MP_WritePhyUshort(sc, 0x15, 0x0177);
14000         MP_WritePhyUshort(sc, 0x19, 0x4805);
14001         MP_WritePhyUshort(sc, 0x15, 0x0178);
14002         MP_WritePhyUshort(sc, 0x19, 0xa103);
14003         MP_WritePhyUshort(sc, 0x15, 0x0179);
14004         MP_WritePhyUshort(sc, 0x19, 0x7c02);
14005         MP_WritePhyUshort(sc, 0x15, 0x017a);
14006         MP_WritePhyUshort(sc, 0x19, 0x6002);
14007         MP_WritePhyUshort(sc, 0x15, 0x017b);
14008         MP_WritePhyUshort(sc, 0x19, 0x7e00);
14009         MP_WritePhyUshort(sc, 0x15, 0x017c);
14010         MP_WritePhyUshort(sc, 0x19, 0x5400);
14011         MP_WritePhyUshort(sc, 0x15, 0x017d);
14012         MP_WritePhyUshort(sc, 0x19, 0x7c6b);
14013         MP_WritePhyUshort(sc, 0x15, 0x017e);
14014         MP_WritePhyUshort(sc, 0x19, 0x5c63);
14015         MP_WritePhyUshort(sc, 0x15, 0x017f);
14016         MP_WritePhyUshort(sc, 0x19, 0x407d);
14017         MP_WritePhyUshort(sc, 0x15, 0x0180);
14018         MP_WritePhyUshort(sc, 0x19, 0xa602);
14019         MP_WritePhyUshort(sc, 0x15, 0x0181);
14020         MP_WritePhyUshort(sc, 0x19, 0x4001);
14021         MP_WritePhyUshort(sc, 0x15, 0x0182);
14022         MP_WritePhyUshort(sc, 0x19, 0x4420);
14023         MP_WritePhyUshort(sc, 0x15, 0x0183);
14024         MP_WritePhyUshort(sc, 0x19, 0x4020);
14025         MP_WritePhyUshort(sc, 0x15, 0x0184);
14026         MP_WritePhyUshort(sc, 0x19, 0x44a1);
14027         MP_WritePhyUshort(sc, 0x15, 0x0185);
14028         MP_WritePhyUshort(sc, 0x19, 0xd6e0);
14029         MP_WritePhyUshort(sc, 0x15, 0x0186);
14030         MP_WritePhyUshort(sc, 0x19, 0x0009);
14031         MP_WritePhyUshort(sc, 0x15, 0x0187);
14032         MP_WritePhyUshort(sc, 0x19, 0x9efe);
14033         MP_WritePhyUshort(sc, 0x15, 0x0188);
14034         MP_WritePhyUshort(sc, 0x19, 0x7c02);
14035         MP_WritePhyUshort(sc, 0x15, 0x0189);
14036         MP_WritePhyUshort(sc, 0x19, 0x6000);
14037         MP_WritePhyUshort(sc, 0x15, 0x018a);
14038         MP_WritePhyUshort(sc, 0x19, 0x9c00);
14039         MP_WritePhyUshort(sc, 0x15, 0x018b);
14040         MP_WritePhyUshort(sc, 0x19, 0x318f);
14041         MP_WritePhyUshort(sc, 0x15, 0x018c);
14042         MP_WritePhyUshort(sc, 0x19, 0x0000);
14043         MP_WritePhyUshort(sc, 0x15, 0x018d);
14044         MP_WritePhyUshort(sc, 0x19, 0x0000);
14045         MP_WritePhyUshort(sc, 0x15, 0x018e);
14046         MP_WritePhyUshort(sc, 0x19, 0x0000);
14047         MP_WritePhyUshort(sc, 0x15, 0x018f);
14048         MP_WritePhyUshort(sc, 0x19, 0x4806);
14049         MP_WritePhyUshort(sc, 0x15, 0x0190);
14050         MP_WritePhyUshort(sc, 0x19, 0x7c10);
14051         MP_WritePhyUshort(sc, 0x15, 0x0191);
14052         MP_WritePhyUshort(sc, 0x19, 0x5c10);
14053         MP_WritePhyUshort(sc, 0x15, 0x0192);
14054         MP_WritePhyUshort(sc, 0x19, 0x40fa);
14055         MP_WritePhyUshort(sc, 0x15, 0x0193);
14056         MP_WritePhyUshort(sc, 0x19, 0xa602);
14057         MP_WritePhyUshort(sc, 0x15, 0x0194);
14058         MP_WritePhyUshort(sc, 0x19, 0x4010);
14059         MP_WritePhyUshort(sc, 0x15, 0x0195);
14060         MP_WritePhyUshort(sc, 0x19, 0x4440);
14061         MP_WritePhyUshort(sc, 0x15, 0x0196);
14062         MP_WritePhyUshort(sc, 0x19, 0x9d00);
14063         MP_WritePhyUshort(sc, 0x15, 0x0197);
14064         MP_WritePhyUshort(sc, 0x19, 0x7c80);
14065         MP_WritePhyUshort(sc, 0x15, 0x0198);
14066         MP_WritePhyUshort(sc, 0x19, 0x6400);
14067         MP_WritePhyUshort(sc, 0x15, 0x0199);
14068         MP_WritePhyUshort(sc, 0x19, 0x4003);
14069         MP_WritePhyUshort(sc, 0x15, 0x019a);
14070         MP_WritePhyUshort(sc, 0x19, 0x4540);
14071         MP_WritePhyUshort(sc, 0x15, 0x019b);
14072         MP_WritePhyUshort(sc, 0x19, 0x7c08);
14073         MP_WritePhyUshort(sc, 0x15, 0x019c);
14074         MP_WritePhyUshort(sc, 0x19, 0x6008);
14075         MP_WritePhyUshort(sc, 0x15, 0x019d);
14076         MP_WritePhyUshort(sc, 0x19, 0x9f00);
14077         MP_WritePhyUshort(sc, 0x15, 0x019e);
14078         MP_WritePhyUshort(sc, 0x19, 0x7c40);
14079         MP_WritePhyUshort(sc, 0x15, 0x019f);
14080         MP_WritePhyUshort(sc, 0x19, 0x6400);
14081         MP_WritePhyUshort(sc, 0x15, 0x01a0);
14082         MP_WritePhyUshort(sc, 0x19, 0x7c80);
14083         MP_WritePhyUshort(sc, 0x15, 0x01a1);
14084         MP_WritePhyUshort(sc, 0x19, 0x6480);
14085         MP_WritePhyUshort(sc, 0x15, 0x01a2);
14086         MP_WritePhyUshort(sc, 0x19, 0x3140);
14087         MP_WritePhyUshort(sc, 0x15, 0x01a3);
14088         MP_WritePhyUshort(sc, 0x19, 0x0000);
14089         MP_WritePhyUshort(sc, 0x15, 0x01a4);
14090         MP_WritePhyUshort(sc, 0x19, 0x0000);
14091         MP_WritePhyUshort(sc, 0x15, 0x01a5);
14092         MP_WritePhyUshort(sc, 0x19, 0x0000);
14093         MP_WritePhyUshort(sc, 0x15, 0x01a6);
14094         MP_WritePhyUshort(sc, 0x19, 0x4400);
14095         MP_WritePhyUshort(sc, 0x15, 0x01a7);
14096         MP_WritePhyUshort(sc, 0x19, 0x7c0b);
14097         MP_WritePhyUshort(sc, 0x15, 0x01a8);
14098         MP_WritePhyUshort(sc, 0x19, 0x6c01);
14099         MP_WritePhyUshort(sc, 0x15, 0x01a9);
14100         MP_WritePhyUshort(sc, 0x19, 0x64a8);
14101         MP_WritePhyUshort(sc, 0x15, 0x01aa);
14102         MP_WritePhyUshort(sc, 0x19, 0x6800);
14103         MP_WritePhyUshort(sc, 0x15, 0x01ab);
14104         MP_WritePhyUshort(sc, 0x19, 0x5cf0);
14105         MP_WritePhyUshort(sc, 0x15, 0x01ac);
14106         MP_WritePhyUshort(sc, 0x19, 0x588f);
14107         MP_WritePhyUshort(sc, 0x15, 0x01ad);
14108         MP_WritePhyUshort(sc, 0x19, 0xb628);
14109         MP_WritePhyUshort(sc, 0x15, 0x01ae);
14110         MP_WritePhyUshort(sc, 0x19, 0xc053);
14111         MP_WritePhyUshort(sc, 0x15, 0x01af);
14112         MP_WritePhyUshort(sc, 0x19, 0x0026);
14113         MP_WritePhyUshort(sc, 0x15, 0x01b0);
14114         MP_WritePhyUshort(sc, 0x19, 0xc02d);
14115         MP_WritePhyUshort(sc, 0x15, 0x01b1);
14116         MP_WritePhyUshort(sc, 0x19, 0x0024);
14117         MP_WritePhyUshort(sc, 0x15, 0x01b2);
14118         MP_WritePhyUshort(sc, 0x19, 0xc603);
14119         MP_WritePhyUshort(sc, 0x15, 0x01b3);
14120         MP_WritePhyUshort(sc, 0x19, 0x0022);
14121         MP_WritePhyUshort(sc, 0x15, 0x01b4);
14122         MP_WritePhyUshort(sc, 0x19, 0x8cf9);
14123         MP_WritePhyUshort(sc, 0x15, 0x01b5);
14124         MP_WritePhyUshort(sc, 0x19, 0x31ba);
14125         MP_WritePhyUshort(sc, 0x15, 0x01b6);
14126         MP_WritePhyUshort(sc, 0x19, 0x0000);
14127         MP_WritePhyUshort(sc, 0x15, 0x01b7);
14128         MP_WritePhyUshort(sc, 0x19, 0x0000);
14129         MP_WritePhyUshort(sc, 0x15, 0x01b8);
14130         MP_WritePhyUshort(sc, 0x19, 0x0000);
14131         MP_WritePhyUshort(sc, 0x15, 0x01b9);
14132         MP_WritePhyUshort(sc, 0x19, 0x0000);
14133         MP_WritePhyUshort(sc, 0x15, 0x01ba);
14134         MP_WritePhyUshort(sc, 0x19, 0x4400);
14135         MP_WritePhyUshort(sc, 0x15, 0x01bb);
14136         MP_WritePhyUshort(sc, 0x19, 0x5420);
14137         MP_WritePhyUshort(sc, 0x15, 0x01bc);
14138         MP_WritePhyUshort(sc, 0x19, 0x4811);
14139         MP_WritePhyUshort(sc, 0x15, 0x01bd);
14140         MP_WritePhyUshort(sc, 0x19, 0x5000);
14141         MP_WritePhyUshort(sc, 0x15, 0x01be);
14142         MP_WritePhyUshort(sc, 0x19, 0x4801);
14143         MP_WritePhyUshort(sc, 0x15, 0x01bf);
14144         MP_WritePhyUshort(sc, 0x19, 0x6800);
14145         MP_WritePhyUshort(sc, 0x15, 0x01c0);
14146         MP_WritePhyUshort(sc, 0x19, 0x31f5);
14147         MP_WritePhyUshort(sc, 0x15, 0x01c1);
14148         MP_WritePhyUshort(sc, 0x19, 0xb614);
14149         MP_WritePhyUshort(sc, 0x15, 0x01c2);
14150         MP_WritePhyUshort(sc, 0x19, 0x8ce4);
14151         MP_WritePhyUshort(sc, 0x15, 0x01c3);
14152         MP_WritePhyUshort(sc, 0x19, 0xb30c);
14153         MP_WritePhyUshort(sc, 0x15, 0x01c4);
14154         MP_WritePhyUshort(sc, 0x19, 0x7c03);
14155         MP_WritePhyUshort(sc, 0x15, 0x01c5);
14156         MP_WritePhyUshort(sc, 0x19, 0x6c02);
14157         MP_WritePhyUshort(sc, 0x15, 0x01c6);
14158         MP_WritePhyUshort(sc, 0x19, 0x8206);
14159         MP_WritePhyUshort(sc, 0x15, 0x01c7);
14160         MP_WritePhyUshort(sc, 0x19, 0x7c03);
14161         MP_WritePhyUshort(sc, 0x15, 0x01c8);
14162         MP_WritePhyUshort(sc, 0x19, 0x6c00);
14163         MP_WritePhyUshort(sc, 0x15, 0x01c9);
14164         MP_WritePhyUshort(sc, 0x19, 0x7c04);
14165         MP_WritePhyUshort(sc, 0x15, 0x01ca);
14166         MP_WritePhyUshort(sc, 0x19, 0x7404);
14167         MP_WritePhyUshort(sc, 0x15, 0x01cb);
14168         MP_WritePhyUshort(sc, 0x19, 0x31c0);
14169         MP_WritePhyUshort(sc, 0x15, 0x01cc);
14170         MP_WritePhyUshort(sc, 0x19, 0x7c04);
14171         MP_WritePhyUshort(sc, 0x15, 0x01cd);
14172         MP_WritePhyUshort(sc, 0x19, 0x7400);
14173         MP_WritePhyUshort(sc, 0x15, 0x01ce);
14174         MP_WritePhyUshort(sc, 0x19, 0x31c0);
14175         MP_WritePhyUshort(sc, 0x15, 0x01cf);
14176         MP_WritePhyUshort(sc, 0x19, 0x8df1);
14177         MP_WritePhyUshort(sc, 0x15, 0x01d0);
14178         MP_WritePhyUshort(sc, 0x19, 0x3248);
14179         MP_WritePhyUshort(sc, 0x15, 0x01d1);
14180         MP_WritePhyUshort(sc, 0x19, 0x0000);
14181         MP_WritePhyUshort(sc, 0x15, 0x01d2);
14182         MP_WritePhyUshort(sc, 0x19, 0x0000);
14183         MP_WritePhyUshort(sc, 0x15, 0x01d3);
14184         MP_WritePhyUshort(sc, 0x19, 0x0000);
14185         MP_WritePhyUshort(sc, 0x15, 0x01d4);
14186         MP_WritePhyUshort(sc, 0x19, 0x0000);
14187         MP_WritePhyUshort(sc, 0x15, 0x01d5);
14188         MP_WritePhyUshort(sc, 0x19, 0x4400);
14189         MP_WritePhyUshort(sc, 0x15, 0x01d6);
14190         MP_WritePhyUshort(sc, 0x19, 0x7c03);
14191         MP_WritePhyUshort(sc, 0x15, 0x01d7);
14192         MP_WritePhyUshort(sc, 0x19, 0x6c03);
14193         MP_WritePhyUshort(sc, 0x15, 0x01d8);
14194         MP_WritePhyUshort(sc, 0x19, 0x7670);
14195         MP_WritePhyUshort(sc, 0x15, 0x01d9);
14196         MP_WritePhyUshort(sc, 0x19, 0x4023);
14197         MP_WritePhyUshort(sc, 0x15, 0x01da);
14198         MP_WritePhyUshort(sc, 0x19, 0x4500);
14199         MP_WritePhyUshort(sc, 0x15, 0x01db);
14200         MP_WritePhyUshort(sc, 0x19, 0x4069);
14201         MP_WritePhyUshort(sc, 0x15, 0x01dc);
14202         MP_WritePhyUshort(sc, 0x19, 0x4580);
14203         MP_WritePhyUshort(sc, 0x15, 0x01dd);
14204         MP_WritePhyUshort(sc, 0x19, 0x9f00);
14205         MP_WritePhyUshort(sc, 0x15, 0x01de);
14206         MP_WritePhyUshort(sc, 0x19, 0xcff5);
14207         MP_WritePhyUshort(sc, 0x15, 0x01df);
14208         MP_WritePhyUshort(sc, 0x19, 0x00ff);
14209         MP_WritePhyUshort(sc, 0x15, 0x01e0);
14210         MP_WritePhyUshort(sc, 0x19, 0x76f0);
14211         MP_WritePhyUshort(sc, 0x15, 0x01e1);
14212         MP_WritePhyUshort(sc, 0x19, 0x4400);
14213         MP_WritePhyUshort(sc, 0x15, 0x01e2);
14214         MP_WritePhyUshort(sc, 0x19, 0x4023);
14215         MP_WritePhyUshort(sc, 0x15, 0x01e3);
14216         MP_WritePhyUshort(sc, 0x19, 0x4500);
14217         MP_WritePhyUshort(sc, 0x15, 0x01e4);
14218         MP_WritePhyUshort(sc, 0x19, 0x4069);
14219         MP_WritePhyUshort(sc, 0x15, 0x01e5);
14220         MP_WritePhyUshort(sc, 0x19, 0x4580);
14221         MP_WritePhyUshort(sc, 0x15, 0x01e6);
14222         MP_WritePhyUshort(sc, 0x19, 0x9f00);
14223         MP_WritePhyUshort(sc, 0x15, 0x01e7);
14224         MP_WritePhyUshort(sc, 0x19, 0xd0f5);
14225         MP_WritePhyUshort(sc, 0x15, 0x01e8);
14226         MP_WritePhyUshort(sc, 0x19, 0x00ff);
14227         MP_WritePhyUshort(sc, 0x15, 0x01e9);
14228         MP_WritePhyUshort(sc, 0x19, 0x4400);
14229         MP_WritePhyUshort(sc, 0x15, 0x01ea);
14230         MP_WritePhyUshort(sc, 0x19, 0x7c03);
14231         MP_WritePhyUshort(sc, 0x15, 0x01eb);
14232         MP_WritePhyUshort(sc, 0x19, 0x6800);
14233         MP_WritePhyUshort(sc, 0x15, 0x01ec);
14234         MP_WritePhyUshort(sc, 0x19, 0x66a0);
14235         MP_WritePhyUshort(sc, 0x15, 0x01ed);
14236         MP_WritePhyUshort(sc, 0x19, 0x8300);
14237         MP_WritePhyUshort(sc, 0x15, 0x01ee);
14238         MP_WritePhyUshort(sc, 0x19, 0x74f0);
14239         MP_WritePhyUshort(sc, 0x15, 0x01ef);
14240         MP_WritePhyUshort(sc, 0x19, 0x3006);
14241         MP_WritePhyUshort(sc, 0x15, 0x01f0);
14242         MP_WritePhyUshort(sc, 0x19, 0x0000);
14243         MP_WritePhyUshort(sc, 0x15, 0x01f1);
14244         MP_WritePhyUshort(sc, 0x19, 0x0000);
14245         MP_WritePhyUshort(sc, 0x15, 0x01f2);
14246         MP_WritePhyUshort(sc, 0x19, 0x0000);
14247         MP_WritePhyUshort(sc, 0x15, 0x01f3);
14248         MP_WritePhyUshort(sc, 0x19, 0x0000);
14249         MP_WritePhyUshort(sc, 0x15, 0x01f4);
14250         MP_WritePhyUshort(sc, 0x19, 0x0000);
14251         MP_WritePhyUshort(sc, 0x15, 0x01f5);
14252         MP_WritePhyUshort(sc, 0x19, 0x7c03);
14253         MP_WritePhyUshort(sc, 0x15, 0x01f6);
14254         MP_WritePhyUshort(sc, 0x19, 0x6c02);
14255         MP_WritePhyUshort(sc, 0x15, 0x01f7);
14256         MP_WritePhyUshort(sc, 0x19, 0x409d);
14257         MP_WritePhyUshort(sc, 0x15, 0x01f8);
14258         MP_WritePhyUshort(sc, 0x19, 0x7c87);
14259         MP_WritePhyUshort(sc, 0x15, 0x01f9);
14260         MP_WritePhyUshort(sc, 0x19, 0xae14);
14261         MP_WritePhyUshort(sc, 0x15, 0x01fa);
14262         MP_WritePhyUshort(sc, 0x19, 0x4400);
14263         MP_WritePhyUshort(sc, 0x15, 0x01fb);
14264         MP_WritePhyUshort(sc, 0x19, 0x7c40);
14265         MP_WritePhyUshort(sc, 0x15, 0x01fc);
14266         MP_WritePhyUshort(sc, 0x19, 0x6800);
14267         MP_WritePhyUshort(sc, 0x15, 0x01fd);
14268         MP_WritePhyUshort(sc, 0x19, 0x7801);
14269         MP_WritePhyUshort(sc, 0x15, 0x01fe);
14270         MP_WritePhyUshort(sc, 0x19, 0x980e);
14271         MP_WritePhyUshort(sc, 0x15, 0x01ff);
14272         MP_WritePhyUshort(sc, 0x19, 0x930c);
14273         MP_WritePhyUshort(sc, 0x15, 0x0200);
14274         MP_WritePhyUshort(sc, 0x19, 0x9206);
14275         MP_WritePhyUshort(sc, 0x15, 0x0201);
14276         MP_WritePhyUshort(sc, 0x19, 0x4002);
14277         MP_WritePhyUshort(sc, 0x15, 0x0202);
14278         MP_WritePhyUshort(sc, 0x19, 0x7800);
14279         MP_WritePhyUshort(sc, 0x15, 0x0203);
14280         MP_WritePhyUshort(sc, 0x19, 0x588f);
14281         MP_WritePhyUshort(sc, 0x15, 0x0204);
14282         MP_WritePhyUshort(sc, 0x19, 0x5520);
14283         MP_WritePhyUshort(sc, 0x15, 0x0205);
14284         MP_WritePhyUshort(sc, 0x19, 0x320c);
14285         MP_WritePhyUshort(sc, 0x15, 0x0206);
14286         MP_WritePhyUshort(sc, 0x19, 0x4000);
14287         MP_WritePhyUshort(sc, 0x15, 0x0207);
14288         MP_WritePhyUshort(sc, 0x19, 0x7800);
14289         MP_WritePhyUshort(sc, 0x15, 0x0208);
14290         MP_WritePhyUshort(sc, 0x19, 0x588d);
14291         MP_WritePhyUshort(sc, 0x15, 0x0209);
14292         MP_WritePhyUshort(sc, 0x19, 0x5500);
14293         MP_WritePhyUshort(sc, 0x15, 0x020a);
14294         MP_WritePhyUshort(sc, 0x19, 0x320c);
14295         MP_WritePhyUshort(sc, 0x15, 0x020b);
14296         MP_WritePhyUshort(sc, 0x19, 0x4002);
14297         MP_WritePhyUshort(sc, 0x15, 0x020c);
14298         MP_WritePhyUshort(sc, 0x19, 0x3220);
14299         MP_WritePhyUshort(sc, 0x15, 0x020d);
14300         MP_WritePhyUshort(sc, 0x19, 0x4480);
14301         MP_WritePhyUshort(sc, 0x15, 0x020e);
14302         MP_WritePhyUshort(sc, 0x19, 0x9e03);
14303         MP_WritePhyUshort(sc, 0x15, 0x020f);
14304         MP_WritePhyUshort(sc, 0x19, 0x7c40);
14305         MP_WritePhyUshort(sc, 0x15, 0x0210);
14306         MP_WritePhyUshort(sc, 0x19, 0x6840);
14307         MP_WritePhyUshort(sc, 0x15, 0x0211);
14308         MP_WritePhyUshort(sc, 0x19, 0x7801);
14309         MP_WritePhyUshort(sc, 0x15, 0x0212);
14310         MP_WritePhyUshort(sc, 0x19, 0x980e);
14311         MP_WritePhyUshort(sc, 0x15, 0x0213);
14312         MP_WritePhyUshort(sc, 0x19, 0x930c);
14313         MP_WritePhyUshort(sc, 0x15, 0x0214);
14314         MP_WritePhyUshort(sc, 0x19, 0x9206);
14315         MP_WritePhyUshort(sc, 0x15, 0x0215);
14316         MP_WritePhyUshort(sc, 0x19, 0x4000);
14317         MP_WritePhyUshort(sc, 0x15, 0x0216);
14318         MP_WritePhyUshort(sc, 0x19, 0x7800);
14319         MP_WritePhyUshort(sc, 0x15, 0x0217);
14320         MP_WritePhyUshort(sc, 0x19, 0x588f);
14321         MP_WritePhyUshort(sc, 0x15, 0x0218);
14322         MP_WritePhyUshort(sc, 0x19, 0x5520);
14323         MP_WritePhyUshort(sc, 0x15, 0x0219);
14324         MP_WritePhyUshort(sc, 0x19, 0x3220);
14325         MP_WritePhyUshort(sc, 0x15, 0x021a);
14326         MP_WritePhyUshort(sc, 0x19, 0x4002);
14327         MP_WritePhyUshort(sc, 0x15, 0x021b);
14328         MP_WritePhyUshort(sc, 0x19, 0x7800);
14329         MP_WritePhyUshort(sc, 0x15, 0x021c);
14330         MP_WritePhyUshort(sc, 0x19, 0x588d);
14331         MP_WritePhyUshort(sc, 0x15, 0x021d);
14332         MP_WritePhyUshort(sc, 0x19, 0x5540);
14333         MP_WritePhyUshort(sc, 0x15, 0x021e);
14334         MP_WritePhyUshort(sc, 0x19, 0x3220);
14335         MP_WritePhyUshort(sc, 0x15, 0x021f);
14336         MP_WritePhyUshort(sc, 0x19, 0x4000);
14337         MP_WritePhyUshort(sc, 0x15, 0x0220);
14338         MP_WritePhyUshort(sc, 0x19, 0x7800);
14339         MP_WritePhyUshort(sc, 0x15, 0x0221);
14340         MP_WritePhyUshort(sc, 0x19, 0x7c03);
14341         MP_WritePhyUshort(sc, 0x15, 0x0222);
14342         MP_WritePhyUshort(sc, 0x19, 0x6c00);
14343         MP_WritePhyUshort(sc, 0x15, 0x0223);
14344         MP_WritePhyUshort(sc, 0x19, 0x3231);
14345         MP_WritePhyUshort(sc, 0x15, 0x0224);
14346         MP_WritePhyUshort(sc, 0x19, 0xab06);
14347         MP_WritePhyUshort(sc, 0x15, 0x0225);
14348         MP_WritePhyUshort(sc, 0x19, 0xbf08);
14349         MP_WritePhyUshort(sc, 0x15, 0x0226);
14350         MP_WritePhyUshort(sc, 0x19, 0x4076);
14351         MP_WritePhyUshort(sc, 0x15, 0x0227);
14352         MP_WritePhyUshort(sc, 0x19, 0x7d07);
14353         MP_WritePhyUshort(sc, 0x15, 0x0228);
14354         MP_WritePhyUshort(sc, 0x19, 0x4502);
14355         MP_WritePhyUshort(sc, 0x15, 0x0229);
14356         MP_WritePhyUshort(sc, 0x19, 0x3231);
14357         MP_WritePhyUshort(sc, 0x15, 0x022a);
14358         MP_WritePhyUshort(sc, 0x19, 0x7d80);
14359         MP_WritePhyUshort(sc, 0x15, 0x022b);
14360         MP_WritePhyUshort(sc, 0x19, 0x5180);
14361         MP_WritePhyUshort(sc, 0x15, 0x022c);
14362         MP_WritePhyUshort(sc, 0x19, 0x322f);
14363         MP_WritePhyUshort(sc, 0x15, 0x022d);
14364         MP_WritePhyUshort(sc, 0x19, 0x7d80);
14365         MP_WritePhyUshort(sc, 0x15, 0x022e);
14366         MP_WritePhyUshort(sc, 0x19, 0x5000);
14367         MP_WritePhyUshort(sc, 0x15, 0x022f);
14368         MP_WritePhyUshort(sc, 0x19, 0x7d07);
14369         MP_WritePhyUshort(sc, 0x15, 0x0230);
14370         MP_WritePhyUshort(sc, 0x19, 0x4402);
14371         MP_WritePhyUshort(sc, 0x15, 0x0231);
14372         MP_WritePhyUshort(sc, 0x19, 0x7c03);
14373         MP_WritePhyUshort(sc, 0x15, 0x0232);
14374         MP_WritePhyUshort(sc, 0x19, 0x6c02);
14375         MP_WritePhyUshort(sc, 0x15, 0x0233);
14376         MP_WritePhyUshort(sc, 0x19, 0x7c03);
14377         MP_WritePhyUshort(sc, 0x15, 0x0234);
14378         MP_WritePhyUshort(sc, 0x19, 0xb309);
14379         MP_WritePhyUshort(sc, 0x15, 0x0235);
14380         MP_WritePhyUshort(sc, 0x19, 0xb204);
14381         MP_WritePhyUshort(sc, 0x15, 0x0236);
14382         MP_WritePhyUshort(sc, 0x19, 0xb105);
14383         MP_WritePhyUshort(sc, 0x15, 0x0237);
14384         MP_WritePhyUshort(sc, 0x19, 0x6c00);
14385         MP_WritePhyUshort(sc, 0x15, 0x0238);
14386         MP_WritePhyUshort(sc, 0x19, 0x31c1);
14387         MP_WritePhyUshort(sc, 0x15, 0x0239);
14388         MP_WritePhyUshort(sc, 0x19, 0x6c00);
14389         MP_WritePhyUshort(sc, 0x15, 0x023a);
14390         MP_WritePhyUshort(sc, 0x19, 0x3261);
14391         MP_WritePhyUshort(sc, 0x15, 0x023b);
14392         MP_WritePhyUshort(sc, 0x19, 0x6c00);
14393         MP_WritePhyUshort(sc, 0x15, 0x023c);
14394         MP_WritePhyUshort(sc, 0x19, 0x3250);
14395         MP_WritePhyUshort(sc, 0x15, 0x023d);
14396         MP_WritePhyUshort(sc, 0x19, 0xb203);
14397         MP_WritePhyUshort(sc, 0x15, 0x023e);
14398         MP_WritePhyUshort(sc, 0x19, 0x6c00);
14399         MP_WritePhyUshort(sc, 0x15, 0x023f);
14400         MP_WritePhyUshort(sc, 0x19, 0x327a);
14401         MP_WritePhyUshort(sc, 0x15, 0x0240);
14402         MP_WritePhyUshort(sc, 0x19, 0x6c00);
14403         MP_WritePhyUshort(sc, 0x15, 0x0241);
14404         MP_WritePhyUshort(sc, 0x19, 0x3293);
14405         MP_WritePhyUshort(sc, 0x15, 0x0242);
14406         MP_WritePhyUshort(sc, 0x19, 0x0000);
14407         MP_WritePhyUshort(sc, 0x15, 0x0243);
14408         MP_WritePhyUshort(sc, 0x19, 0x0000);
14409         MP_WritePhyUshort(sc, 0x15, 0x0244);
14410         MP_WritePhyUshort(sc, 0x19, 0x0000);
14411         MP_WritePhyUshort(sc, 0x15, 0x0245);
14412         MP_WritePhyUshort(sc, 0x19, 0x0000);
14413         MP_WritePhyUshort(sc, 0x15, 0x0246);
14414         MP_WritePhyUshort(sc, 0x19, 0x0000);
14415         MP_WritePhyUshort(sc, 0x15, 0x0247);
14416         MP_WritePhyUshort(sc, 0x19, 0x32a3);
14417         MP_WritePhyUshort(sc, 0x15, 0x0248);
14418         MP_WritePhyUshort(sc, 0x19, 0x5520);
14419         MP_WritePhyUshort(sc, 0x15, 0x0249);
14420         MP_WritePhyUshort(sc, 0x19, 0x403d);
14421         MP_WritePhyUshort(sc, 0x15, 0x024a);
14422         MP_WritePhyUshort(sc, 0x19, 0x440c);
14423         MP_WritePhyUshort(sc, 0x15, 0x024b);
14424         MP_WritePhyUshort(sc, 0x19, 0x4812);
14425         MP_WritePhyUshort(sc, 0x15, 0x024c);
14426         MP_WritePhyUshort(sc, 0x19, 0x5001);
14427         MP_WritePhyUshort(sc, 0x15, 0x024d);
14428         MP_WritePhyUshort(sc, 0x19, 0x4802);
14429         MP_WritePhyUshort(sc, 0x15, 0x024e);
14430         MP_WritePhyUshort(sc, 0x19, 0x6880);
14431         MP_WritePhyUshort(sc, 0x15, 0x024f);
14432         MP_WritePhyUshort(sc, 0x19, 0x31f5);
14433         MP_WritePhyUshort(sc, 0x15, 0x0250);
14434         MP_WritePhyUshort(sc, 0x19, 0xb685);
14435         MP_WritePhyUshort(sc, 0x15, 0x0251);
14436         MP_WritePhyUshort(sc, 0x19, 0x801c);
14437         MP_WritePhyUshort(sc, 0x15, 0x0252);
14438         MP_WritePhyUshort(sc, 0x19, 0xbaf5);
14439         MP_WritePhyUshort(sc, 0x15, 0x0253);
14440         MP_WritePhyUshort(sc, 0x19, 0xc07c);
14441         MP_WritePhyUshort(sc, 0x15, 0x0254);
14442         MP_WritePhyUshort(sc, 0x19, 0x00fb);
14443         MP_WritePhyUshort(sc, 0x15, 0x0255);
14444         MP_WritePhyUshort(sc, 0x19, 0x325a);
14445         MP_WritePhyUshort(sc, 0x15, 0x0256);
14446         MP_WritePhyUshort(sc, 0x19, 0x0000);
14447         MP_WritePhyUshort(sc, 0x15, 0x0257);
14448         MP_WritePhyUshort(sc, 0x19, 0x0000);
14449         MP_WritePhyUshort(sc, 0x15, 0x0258);
14450         MP_WritePhyUshort(sc, 0x19, 0x0000);
14451         MP_WritePhyUshort(sc, 0x15, 0x0259);
14452         MP_WritePhyUshort(sc, 0x19, 0x0000);
14453         MP_WritePhyUshort(sc, 0x15, 0x025a);
14454         MP_WritePhyUshort(sc, 0x19, 0x481a);
14455         MP_WritePhyUshort(sc, 0x15, 0x025b);
14456         MP_WritePhyUshort(sc, 0x19, 0x5001);
14457         MP_WritePhyUshort(sc, 0x15, 0x025c);
14458         MP_WritePhyUshort(sc, 0x19, 0x401b);
14459         MP_WritePhyUshort(sc, 0x15, 0x025d);
14460         MP_WritePhyUshort(sc, 0x19, 0x480a);
14461         MP_WritePhyUshort(sc, 0x15, 0x025e);
14462         MP_WritePhyUshort(sc, 0x19, 0x4418);
14463         MP_WritePhyUshort(sc, 0x15, 0x025f);
14464         MP_WritePhyUshort(sc, 0x19, 0x6900);
14465         MP_WritePhyUshort(sc, 0x15, 0x0260);
14466         MP_WritePhyUshort(sc, 0x19, 0x31f5);
14467         MP_WritePhyUshort(sc, 0x15, 0x0261);
14468         MP_WritePhyUshort(sc, 0x19, 0xb64b);
14469         MP_WritePhyUshort(sc, 0x15, 0x0262);
14470         MP_WritePhyUshort(sc, 0x19, 0xdb00);
14471         MP_WritePhyUshort(sc, 0x15, 0x0263);
14472         MP_WritePhyUshort(sc, 0x19, 0x0048);
14473         MP_WritePhyUshort(sc, 0x15, 0x0264);
14474         MP_WritePhyUshort(sc, 0x19, 0xdb7d);
14475         MP_WritePhyUshort(sc, 0x15, 0x0265);
14476         MP_WritePhyUshort(sc, 0x19, 0x0002);
14477         MP_WritePhyUshort(sc, 0x15, 0x0266);
14478         MP_WritePhyUshort(sc, 0x19, 0xa0fa);
14479         MP_WritePhyUshort(sc, 0x15, 0x0267);
14480         MP_WritePhyUshort(sc, 0x19, 0x4408);
14481         MP_WritePhyUshort(sc, 0x15, 0x0268);
14482         MP_WritePhyUshort(sc, 0x19, 0x3248);
14483         MP_WritePhyUshort(sc, 0x15, 0x0269);
14484         MP_WritePhyUshort(sc, 0x19, 0x0000);
14485         MP_WritePhyUshort(sc, 0x15, 0x026a);
14486         MP_WritePhyUshort(sc, 0x19, 0x0000);
14487         MP_WritePhyUshort(sc, 0x15, 0x026b);
14488         MP_WritePhyUshort(sc, 0x19, 0x0000);
14489         MP_WritePhyUshort(sc, 0x15, 0x026c);
14490         MP_WritePhyUshort(sc, 0x19, 0x0000);
14491         MP_WritePhyUshort(sc, 0x15, 0x026d);
14492         MP_WritePhyUshort(sc, 0x19, 0xb806);
14493         MP_WritePhyUshort(sc, 0x15, 0x026e);
14494         MP_WritePhyUshort(sc, 0x19, 0x588d);
14495         MP_WritePhyUshort(sc, 0x15, 0x026f);
14496         MP_WritePhyUshort(sc, 0x19, 0x5500);
14497         MP_WritePhyUshort(sc, 0x15, 0x0270);
14498         MP_WritePhyUshort(sc, 0x19, 0x7801);
14499         MP_WritePhyUshort(sc, 0x15, 0x0271);
14500         MP_WritePhyUshort(sc, 0x19, 0x4002);
14501         MP_WritePhyUshort(sc, 0x15, 0x0272);
14502         MP_WritePhyUshort(sc, 0x19, 0x7800);
14503         MP_WritePhyUshort(sc, 0x15, 0x0273);
14504         MP_WritePhyUshort(sc, 0x19, 0x4814);
14505         MP_WritePhyUshort(sc, 0x15, 0x0274);
14506         MP_WritePhyUshort(sc, 0x19, 0x500b);
14507         MP_WritePhyUshort(sc, 0x15, 0x0275);
14508         MP_WritePhyUshort(sc, 0x19, 0x4804);
14509         MP_WritePhyUshort(sc, 0x15, 0x0276);
14510         MP_WritePhyUshort(sc, 0x19, 0x40c4);
14511         MP_WritePhyUshort(sc, 0x15, 0x0277);
14512         MP_WritePhyUshort(sc, 0x19, 0x4425);
14513         MP_WritePhyUshort(sc, 0x15, 0x0278);
14514         MP_WritePhyUshort(sc, 0x19, 0x6a00);
14515         MP_WritePhyUshort(sc, 0x15, 0x0279);
14516         MP_WritePhyUshort(sc, 0x19, 0x31f5);
14517         MP_WritePhyUshort(sc, 0x15, 0x027a);
14518         MP_WritePhyUshort(sc, 0x19, 0xb632);
14519         MP_WritePhyUshort(sc, 0x15, 0x027b);
14520         MP_WritePhyUshort(sc, 0x19, 0xdc03);
14521         MP_WritePhyUshort(sc, 0x15, 0x027c);
14522         MP_WritePhyUshort(sc, 0x19, 0x0027);
14523         MP_WritePhyUshort(sc, 0x15, 0x027d);
14524         MP_WritePhyUshort(sc, 0x19, 0x80fc);
14525         MP_WritePhyUshort(sc, 0x15, 0x027e);
14526         MP_WritePhyUshort(sc, 0x19, 0x3283);
14527         MP_WritePhyUshort(sc, 0x15, 0x027f);
14528         MP_WritePhyUshort(sc, 0x19, 0x0000);
14529         MP_WritePhyUshort(sc, 0x15, 0x0280);
14530         MP_WritePhyUshort(sc, 0x19, 0x0000);
14531         MP_WritePhyUshort(sc, 0x15, 0x0281);
14532         MP_WritePhyUshort(sc, 0x19, 0x0000);
14533         MP_WritePhyUshort(sc, 0x15, 0x0282);
14534         MP_WritePhyUshort(sc, 0x19, 0x0000);
14535         MP_WritePhyUshort(sc, 0x15, 0x0283);
14536         MP_WritePhyUshort(sc, 0x19, 0xb806);
14537         MP_WritePhyUshort(sc, 0x15, 0x0284);
14538         MP_WritePhyUshort(sc, 0x19, 0x588f);
14539         MP_WritePhyUshort(sc, 0x15, 0x0285);
14540         MP_WritePhyUshort(sc, 0x19, 0x5520);
14541         MP_WritePhyUshort(sc, 0x15, 0x0286);
14542         MP_WritePhyUshort(sc, 0x19, 0x7801);
14543         MP_WritePhyUshort(sc, 0x15, 0x0287);
14544         MP_WritePhyUshort(sc, 0x19, 0x4000);
14545         MP_WritePhyUshort(sc, 0x15, 0x0288);
14546         MP_WritePhyUshort(sc, 0x19, 0x7800);
14547         MP_WritePhyUshort(sc, 0x15, 0x0289);
14548         MP_WritePhyUshort(sc, 0x19, 0x4818);
14549         MP_WritePhyUshort(sc, 0x15, 0x028a);
14550         MP_WritePhyUshort(sc, 0x19, 0x5051);
14551         MP_WritePhyUshort(sc, 0x15, 0x028b);
14552         MP_WritePhyUshort(sc, 0x19, 0x4808);
14553         MP_WritePhyUshort(sc, 0x15, 0x028c);
14554         MP_WritePhyUshort(sc, 0x19, 0x4050);
14555         MP_WritePhyUshort(sc, 0x15, 0x028d);
14556         MP_WritePhyUshort(sc, 0x19, 0x4462);
14557         MP_WritePhyUshort(sc, 0x15, 0x028e);
14558         MP_WritePhyUshort(sc, 0x19, 0x40c4);
14559         MP_WritePhyUshort(sc, 0x15, 0x028f);
14560         MP_WritePhyUshort(sc, 0x19, 0x4473);
14561         MP_WritePhyUshort(sc, 0x15, 0x0290);
14562         MP_WritePhyUshort(sc, 0x19, 0x5041);
14563         MP_WritePhyUshort(sc, 0x15, 0x0291);
14564         MP_WritePhyUshort(sc, 0x19, 0x6b00);
14565         MP_WritePhyUshort(sc, 0x15, 0x0292);
14566         MP_WritePhyUshort(sc, 0x19, 0x31f5);
14567         MP_WritePhyUshort(sc, 0x15, 0x0293);
14568         MP_WritePhyUshort(sc, 0x19, 0xb619);
14569         MP_WritePhyUshort(sc, 0x15, 0x0294);
14570         MP_WritePhyUshort(sc, 0x19, 0x80d9);
14571         MP_WritePhyUshort(sc, 0x15, 0x0295);
14572         MP_WritePhyUshort(sc, 0x19, 0xbd06);
14573         MP_WritePhyUshort(sc, 0x15, 0x0296);
14574         MP_WritePhyUshort(sc, 0x19, 0xbb0d);
14575         MP_WritePhyUshort(sc, 0x15, 0x0297);
14576         MP_WritePhyUshort(sc, 0x19, 0xaf14);
14577         MP_WritePhyUshort(sc, 0x15, 0x0298);
14578         MP_WritePhyUshort(sc, 0x19, 0x8efa);
14579         MP_WritePhyUshort(sc, 0x15, 0x0299);
14580         MP_WritePhyUshort(sc, 0x19, 0x5049);
14581         MP_WritePhyUshort(sc, 0x15, 0x029a);
14582         MP_WritePhyUshort(sc, 0x19, 0x3248);
14583         MP_WritePhyUshort(sc, 0x15, 0x029b);
14584         MP_WritePhyUshort(sc, 0x19, 0x4c10);
14585         MP_WritePhyUshort(sc, 0x15, 0x029c);
14586         MP_WritePhyUshort(sc, 0x19, 0x44b0);
14587         MP_WritePhyUshort(sc, 0x15, 0x029d);
14588         MP_WritePhyUshort(sc, 0x19, 0x4c00);
14589         MP_WritePhyUshort(sc, 0x15, 0x029e);
14590         MP_WritePhyUshort(sc, 0x19, 0x3292);
14591         MP_WritePhyUshort(sc, 0x15, 0x029f);
14592         MP_WritePhyUshort(sc, 0x19, 0x0000);
14593         MP_WritePhyUshort(sc, 0x15, 0x02a0);
14594         MP_WritePhyUshort(sc, 0x19, 0x0000);
14595         MP_WritePhyUshort(sc, 0x15, 0x02a1);
14596         MP_WritePhyUshort(sc, 0x19, 0x0000);
14597         MP_WritePhyUshort(sc, 0x15, 0x02a2);
14598         MP_WritePhyUshort(sc, 0x19, 0x0000);
14599         MP_WritePhyUshort(sc, 0x15, 0x02a3);
14600         MP_WritePhyUshort(sc, 0x19, 0x481f);
14601         MP_WritePhyUshort(sc, 0x15, 0x02a4);
14602         MP_WritePhyUshort(sc, 0x19, 0x5005);
14603         MP_WritePhyUshort(sc, 0x15, 0x02a5);
14604         MP_WritePhyUshort(sc, 0x19, 0x480f);
14605         MP_WritePhyUshort(sc, 0x15, 0x02a6);
14606         MP_WritePhyUshort(sc, 0x19, 0xac00);
14607         MP_WritePhyUshort(sc, 0x15, 0x02a7);
14608         MP_WritePhyUshort(sc, 0x19, 0x31a6);
14609         MP_WritePhyUshort(sc, 0x15, 0x02a8);
14610         MP_WritePhyUshort(sc, 0x19, 0x0000);
14611         MP_WritePhyUshort(sc, 0x15, 0x02a9);
14612         MP_WritePhyUshort(sc, 0x19, 0x0000);
14613         MP_WritePhyUshort(sc, 0x15, 0x02aa);
14614         MP_WritePhyUshort(sc, 0x19, 0x0000);
14615         MP_WritePhyUshort(sc, 0x15, 0x02ab);
14616         MP_WritePhyUshort(sc, 0x19, 0x31ba);
14617         MP_WritePhyUshort(sc, 0x15, 0x02ac);
14618         MP_WritePhyUshort(sc, 0x19, 0x31d5);
14619         MP_WritePhyUshort(sc, 0x15, 0x02ad);
14620         MP_WritePhyUshort(sc, 0x19, 0x0000);
14621         MP_WritePhyUshort(sc, 0x15, 0x02ae);
14622         MP_WritePhyUshort(sc, 0x19, 0x5cf0);
14623         MP_WritePhyUshort(sc, 0x15, 0x02af);
14624         MP_WritePhyUshort(sc, 0x19, 0x588c);
14625         MP_WritePhyUshort(sc, 0x15, 0x02b0);
14626         MP_WritePhyUshort(sc, 0x19, 0x542f);
14627         MP_WritePhyUshort(sc, 0x15, 0x02b1);
14628         MP_WritePhyUshort(sc, 0x19, 0x7ffb);
14629         MP_WritePhyUshort(sc, 0x15, 0x02b2);
14630         MP_WritePhyUshort(sc, 0x19, 0x6ff8);
14631         MP_WritePhyUshort(sc, 0x15, 0x02b3);
14632         MP_WritePhyUshort(sc, 0x19, 0x64a4);
14633         MP_WritePhyUshort(sc, 0x15, 0x02b4);
14634         MP_WritePhyUshort(sc, 0x19, 0x64a0);
14635         MP_WritePhyUshort(sc, 0x15, 0x02b5);
14636         MP_WritePhyUshort(sc, 0x19, 0x6800);
14637         MP_WritePhyUshort(sc, 0x15, 0x02b6);
14638         MP_WritePhyUshort(sc, 0x19, 0x4400);
14639         MP_WritePhyUshort(sc, 0x15, 0x02b7);
14640         MP_WritePhyUshort(sc, 0x19, 0x4020);
14641         MP_WritePhyUshort(sc, 0x15, 0x02b8);
14642         MP_WritePhyUshort(sc, 0x19, 0x4480);
14643         MP_WritePhyUshort(sc, 0x15, 0x02b9);
14644         MP_WritePhyUshort(sc, 0x19, 0x9e00);
14645         MP_WritePhyUshort(sc, 0x15, 0x02ba);
14646         MP_WritePhyUshort(sc, 0x19, 0x4891);
14647         MP_WritePhyUshort(sc, 0x15, 0x02bb);
14648         MP_WritePhyUshort(sc, 0x19, 0x4cc0);
14649         MP_WritePhyUshort(sc, 0x15, 0x02bc);
14650         MP_WritePhyUshort(sc, 0x19, 0x4801);
14651         MP_WritePhyUshort(sc, 0x15, 0x02bd);
14652         MP_WritePhyUshort(sc, 0x19, 0xa609);
14653         MP_WritePhyUshort(sc, 0x15, 0x02be);
14654         MP_WritePhyUshort(sc, 0x19, 0xd64f);
14655         MP_WritePhyUshort(sc, 0x15, 0x02bf);
14656         MP_WritePhyUshort(sc, 0x19, 0x004e);
14657         MP_WritePhyUshort(sc, 0x15, 0x02c0);
14658         MP_WritePhyUshort(sc, 0x19, 0x87fe);
14659         MP_WritePhyUshort(sc, 0x15, 0x02c1);
14660         MP_WritePhyUshort(sc, 0x19, 0x32c6);
14661         MP_WritePhyUshort(sc, 0x15, 0x02c2);
14662         MP_WritePhyUshort(sc, 0x19, 0x0000);
14663         MP_WritePhyUshort(sc, 0x15, 0x02c3);
14664         MP_WritePhyUshort(sc, 0x19, 0x0000);
14665         MP_WritePhyUshort(sc, 0x15, 0x02c4);
14666         MP_WritePhyUshort(sc, 0x19, 0x0000);
14667         MP_WritePhyUshort(sc, 0x15, 0x02c5);
14668         MP_WritePhyUshort(sc, 0x19, 0x0000);
14669         MP_WritePhyUshort(sc, 0x15, 0x02c6);
14670         MP_WritePhyUshort(sc, 0x19, 0x48b2);
14671         MP_WritePhyUshort(sc, 0x15, 0x02c7);
14672         MP_WritePhyUshort(sc, 0x19, 0x4020);
14673         MP_WritePhyUshort(sc, 0x15, 0x02c8);
14674         MP_WritePhyUshort(sc, 0x19, 0x4822);
14675         MP_WritePhyUshort(sc, 0x15, 0x02c9);
14676         MP_WritePhyUshort(sc, 0x19, 0x4488);
14677         MP_WritePhyUshort(sc, 0x15, 0x02ca);
14678         MP_WritePhyUshort(sc, 0x19, 0xd64f);
14679         MP_WritePhyUshort(sc, 0x15, 0x02cb);
14680         MP_WritePhyUshort(sc, 0x19, 0x0042);
14681         MP_WritePhyUshort(sc, 0x15, 0x02cc);
14682         MP_WritePhyUshort(sc, 0x19, 0x8203);
14683         MP_WritePhyUshort(sc, 0x15, 0x02cd);
14684         MP_WritePhyUshort(sc, 0x19, 0x4cc8);
14685         MP_WritePhyUshort(sc, 0x15, 0x02ce);
14686         MP_WritePhyUshort(sc, 0x19, 0x32d0);
14687         MP_WritePhyUshort(sc, 0x15, 0x02cf);
14688         MP_WritePhyUshort(sc, 0x19, 0x4cc0);
14689         MP_WritePhyUshort(sc, 0x15, 0x02d0);
14690         MP_WritePhyUshort(sc, 0x19, 0xc4d4);
14691         MP_WritePhyUshort(sc, 0x15, 0x02d1);
14692         MP_WritePhyUshort(sc, 0x19, 0x00f9);
14693         MP_WritePhyUshort(sc, 0x15, 0x02d2);
14694         MP_WritePhyUshort(sc, 0x19, 0xa51a);
14695         MP_WritePhyUshort(sc, 0x15, 0x02d3);
14696         MP_WritePhyUshort(sc, 0x19, 0x32d9);
14697         MP_WritePhyUshort(sc, 0x15, 0x02d4);
14698         MP_WritePhyUshort(sc, 0x19, 0x0000);
14699         MP_WritePhyUshort(sc, 0x15, 0x02d5);
14700         MP_WritePhyUshort(sc, 0x19, 0x0000);
14701         MP_WritePhyUshort(sc, 0x15, 0x02d6);
14702         MP_WritePhyUshort(sc, 0x19, 0x0000);
14703         MP_WritePhyUshort(sc, 0x15, 0x02d7);
14704         MP_WritePhyUshort(sc, 0x19, 0x0000);
14705         MP_WritePhyUshort(sc, 0x15, 0x02d8);
14706         MP_WritePhyUshort(sc, 0x19, 0x0000);
14707         MP_WritePhyUshort(sc, 0x15, 0x02d9);
14708         MP_WritePhyUshort(sc, 0x19, 0x48b3);
14709         MP_WritePhyUshort(sc, 0x15, 0x02da);
14710         MP_WritePhyUshort(sc, 0x19, 0x4020);
14711         MP_WritePhyUshort(sc, 0x15, 0x02db);
14712         MP_WritePhyUshort(sc, 0x19, 0x4823);
14713         MP_WritePhyUshort(sc, 0x15, 0x02dc);
14714         MP_WritePhyUshort(sc, 0x19, 0x4410);
14715         MP_WritePhyUshort(sc, 0x15, 0x02dd);
14716         MP_WritePhyUshort(sc, 0x19, 0xb630);
14717         MP_WritePhyUshort(sc, 0x15, 0x02de);
14718         MP_WritePhyUshort(sc, 0x19, 0x7dc8);
14719         MP_WritePhyUshort(sc, 0x15, 0x02df);
14720         MP_WritePhyUshort(sc, 0x19, 0x8203);
14721         MP_WritePhyUshort(sc, 0x15, 0x02e0);
14722         MP_WritePhyUshort(sc, 0x19, 0x4c48);
14723         MP_WritePhyUshort(sc, 0x15, 0x02e1);
14724         MP_WritePhyUshort(sc, 0x19, 0x32e3);
14725         MP_WritePhyUshort(sc, 0x15, 0x02e2);
14726         MP_WritePhyUshort(sc, 0x19, 0x4c40);
14727         MP_WritePhyUshort(sc, 0x15, 0x02e3);
14728         MP_WritePhyUshort(sc, 0x19, 0x9bfa);
14729         MP_WritePhyUshort(sc, 0x15, 0x02e4);
14730         MP_WritePhyUshort(sc, 0x19, 0x84ca);
14731         MP_WritePhyUshort(sc, 0x15, 0x02e5);
14732         MP_WritePhyUshort(sc, 0x19, 0x85f8);
14733         MP_WritePhyUshort(sc, 0x15, 0x02e6);
14734         MP_WritePhyUshort(sc, 0x19, 0x32ec);
14735         MP_WritePhyUshort(sc, 0x15, 0x02e7);
14736         MP_WritePhyUshort(sc, 0x19, 0x0000);
14737         MP_WritePhyUshort(sc, 0x15, 0x02e8);
14738         MP_WritePhyUshort(sc, 0x19, 0x0000);
14739         MP_WritePhyUshort(sc, 0x15, 0x02e9);
14740         MP_WritePhyUshort(sc, 0x19, 0x0000);
14741         MP_WritePhyUshort(sc, 0x15, 0x02ea);
14742         MP_WritePhyUshort(sc, 0x19, 0x0000);
14743         MP_WritePhyUshort(sc, 0x15, 0x02eb);
14744         MP_WritePhyUshort(sc, 0x19, 0x0000);
14745         MP_WritePhyUshort(sc, 0x15, 0x02ec);
14746         MP_WritePhyUshort(sc, 0x19, 0x48d4);
14747         MP_WritePhyUshort(sc, 0x15, 0x02ed);
14748         MP_WritePhyUshort(sc, 0x19, 0x4020);
14749         MP_WritePhyUshort(sc, 0x15, 0x02ee);
14750         MP_WritePhyUshort(sc, 0x19, 0x4844);
14751         MP_WritePhyUshort(sc, 0x15, 0x02ef);
14752         MP_WritePhyUshort(sc, 0x19, 0x4420);
14753         MP_WritePhyUshort(sc, 0x15, 0x02f0);
14754         MP_WritePhyUshort(sc, 0x19, 0x6800);
14755         MP_WritePhyUshort(sc, 0x15, 0x02f1);
14756         MP_WritePhyUshort(sc, 0x19, 0x7dc0);
14757         MP_WritePhyUshort(sc, 0x15, 0x02f2);
14758         MP_WritePhyUshort(sc, 0x19, 0x4c40);
14759         MP_WritePhyUshort(sc, 0x15, 0x02f3);
14760         MP_WritePhyUshort(sc, 0x19, 0x7c0b);
14761         MP_WritePhyUshort(sc, 0x15, 0x02f4);
14762         MP_WritePhyUshort(sc, 0x19, 0x6c08);
14763         MP_WritePhyUshort(sc, 0x15, 0x02f5);
14764         MP_WritePhyUshort(sc, 0x19, 0x3311);
14765         MP_WritePhyUshort(sc, 0x15, 0x02f6);
14766         MP_WritePhyUshort(sc, 0x19, 0x9cfd);
14767         MP_WritePhyUshort(sc, 0x15, 0x02f7);
14768         MP_WritePhyUshort(sc, 0x19, 0xb616);
14769         MP_WritePhyUshort(sc, 0x15, 0x02f8);
14770         MP_WritePhyUshort(sc, 0x19, 0xc42b);
14771         MP_WritePhyUshort(sc, 0x15, 0x02f9);
14772         MP_WritePhyUshort(sc, 0x19, 0x00e0);
14773         MP_WritePhyUshort(sc, 0x15, 0x02fa);
14774         MP_WritePhyUshort(sc, 0x19, 0xc455);
14775         MP_WritePhyUshort(sc, 0x15, 0x02fb);
14776         MP_WritePhyUshort(sc, 0x19, 0x00b3);
14777         MP_WritePhyUshort(sc, 0x15, 0x02fc);
14778         MP_WritePhyUshort(sc, 0x19, 0xb20a);
14779         MP_WritePhyUshort(sc, 0x15, 0x02fd);
14780         MP_WritePhyUshort(sc, 0x19, 0x7c03);
14781         MP_WritePhyUshort(sc, 0x15, 0x02fe);
14782         MP_WritePhyUshort(sc, 0x19, 0x6c02);
14783         MP_WritePhyUshort(sc, 0x15, 0x02ff);
14784         MP_WritePhyUshort(sc, 0x19, 0x8204);
14785         MP_WritePhyUshort(sc, 0x15, 0x0300);
14786         MP_WritePhyUshort(sc, 0x19, 0x7c04);
14787         MP_WritePhyUshort(sc, 0x15, 0x0301);
14788         MP_WritePhyUshort(sc, 0x19, 0x7404);
14789         MP_WritePhyUshort(sc, 0x15, 0x0302);
14790         MP_WritePhyUshort(sc, 0x19, 0x32f3);
14791         MP_WritePhyUshort(sc, 0x15, 0x0303);
14792         MP_WritePhyUshort(sc, 0x19, 0x7c04);
14793         MP_WritePhyUshort(sc, 0x15, 0x0304);
14794         MP_WritePhyUshort(sc, 0x19, 0x7400);
14795         MP_WritePhyUshort(sc, 0x15, 0x0305);
14796         MP_WritePhyUshort(sc, 0x19, 0x32f3);
14797         MP_WritePhyUshort(sc, 0x15, 0x0306);
14798         MP_WritePhyUshort(sc, 0x19, 0xefed);
14799         MP_WritePhyUshort(sc, 0x15, 0x0307);
14800         MP_WritePhyUshort(sc, 0x19, 0x3342);
14801         MP_WritePhyUshort(sc, 0x15, 0x0308);
14802         MP_WritePhyUshort(sc, 0x19, 0x0000);
14803         MP_WritePhyUshort(sc, 0x15, 0x0309);
14804         MP_WritePhyUshort(sc, 0x19, 0x0000);
14805         MP_WritePhyUshort(sc, 0x15, 0x030a);
14806         MP_WritePhyUshort(sc, 0x19, 0x0000);
14807         MP_WritePhyUshort(sc, 0x15, 0x030b);
14808         MP_WritePhyUshort(sc, 0x19, 0x0000);
14809         MP_WritePhyUshort(sc, 0x15, 0x030c);
14810         MP_WritePhyUshort(sc, 0x19, 0x0000);
14811         MP_WritePhyUshort(sc, 0x15, 0x030d);
14812         MP_WritePhyUshort(sc, 0x19, 0x3006);
14813         MP_WritePhyUshort(sc, 0x15, 0x030e);
14814         MP_WritePhyUshort(sc, 0x19, 0x0000);
14815         MP_WritePhyUshort(sc, 0x15, 0x030f);
14816         MP_WritePhyUshort(sc, 0x19, 0x0000);
14817         MP_WritePhyUshort(sc, 0x15, 0x0310);
14818         MP_WritePhyUshort(sc, 0x19, 0x0000);
14819         MP_WritePhyUshort(sc, 0x15, 0x0311);
14820         MP_WritePhyUshort(sc, 0x19, 0x7c08);
14821         MP_WritePhyUshort(sc, 0x15, 0x0312);
14822         MP_WritePhyUshort(sc, 0x19, 0xa207);
14823         MP_WritePhyUshort(sc, 0x15, 0x0313);
14824         MP_WritePhyUshort(sc, 0x19, 0x4c00);
14825         MP_WritePhyUshort(sc, 0x15, 0x0314);
14826         MP_WritePhyUshort(sc, 0x19, 0x3322);
14827         MP_WritePhyUshort(sc, 0x15, 0x0315);
14828         MP_WritePhyUshort(sc, 0x19, 0x4041);
14829         MP_WritePhyUshort(sc, 0x15, 0x0316);
14830         MP_WritePhyUshort(sc, 0x19, 0x7d07);
14831         MP_WritePhyUshort(sc, 0x15, 0x0317);
14832         MP_WritePhyUshort(sc, 0x19, 0x4502);
14833         MP_WritePhyUshort(sc, 0x15, 0x0318);
14834         MP_WritePhyUshort(sc, 0x19, 0x3322);
14835         MP_WritePhyUshort(sc, 0x15, 0x0319);
14836         MP_WritePhyUshort(sc, 0x19, 0x4c08);
14837         MP_WritePhyUshort(sc, 0x15, 0x031a);
14838         MP_WritePhyUshort(sc, 0x19, 0x3322);
14839         MP_WritePhyUshort(sc, 0x15, 0x031b);
14840         MP_WritePhyUshort(sc, 0x19, 0x7d80);
14841         MP_WritePhyUshort(sc, 0x15, 0x031c);
14842         MP_WritePhyUshort(sc, 0x19, 0x5180);
14843         MP_WritePhyUshort(sc, 0x15, 0x031d);
14844         MP_WritePhyUshort(sc, 0x19, 0x3320);
14845         MP_WritePhyUshort(sc, 0x15, 0x031e);
14846         MP_WritePhyUshort(sc, 0x19, 0x7d80);
14847         MP_WritePhyUshort(sc, 0x15, 0x031f);
14848         MP_WritePhyUshort(sc, 0x19, 0x5000);
14849         MP_WritePhyUshort(sc, 0x15, 0x0320);
14850         MP_WritePhyUshort(sc, 0x19, 0x7d07);
14851         MP_WritePhyUshort(sc, 0x15, 0x0321);
14852         MP_WritePhyUshort(sc, 0x19, 0x4402);
14853         MP_WritePhyUshort(sc, 0x15, 0x0322);
14854         MP_WritePhyUshort(sc, 0x19, 0x7c03);
14855         MP_WritePhyUshort(sc, 0x15, 0x0323);
14856         MP_WritePhyUshort(sc, 0x19, 0x6c02);
14857         MP_WritePhyUshort(sc, 0x15, 0x0324);
14858         MP_WritePhyUshort(sc, 0x19, 0x7c03);
14859         MP_WritePhyUshort(sc, 0x15, 0x0325);
14860         MP_WritePhyUshort(sc, 0x19, 0xb30c);
14861         MP_WritePhyUshort(sc, 0x15, 0x0326);
14862         MP_WritePhyUshort(sc, 0x19, 0xb206);
14863         MP_WritePhyUshort(sc, 0x15, 0x0327);
14864         MP_WritePhyUshort(sc, 0x19, 0xb103);
14865         MP_WritePhyUshort(sc, 0x15, 0x0328);
14866         MP_WritePhyUshort(sc, 0x19, 0x6c00);
14867         MP_WritePhyUshort(sc, 0x15, 0x0329);
14868         MP_WritePhyUshort(sc, 0x19, 0x32f6);
14869         MP_WritePhyUshort(sc, 0x15, 0x032a);
14870         MP_WritePhyUshort(sc, 0x19, 0x6c00);
14871         MP_WritePhyUshort(sc, 0x15, 0x032b);
14872         MP_WritePhyUshort(sc, 0x19, 0x3352);
14873         MP_WritePhyUshort(sc, 0x15, 0x032c);
14874         MP_WritePhyUshort(sc, 0x19, 0xb103);
14875         MP_WritePhyUshort(sc, 0x15, 0x032d);
14876         MP_WritePhyUshort(sc, 0x19, 0x6c00);
14877         MP_WritePhyUshort(sc, 0x15, 0x032e);
14878         MP_WritePhyUshort(sc, 0x19, 0x336a);
14879         MP_WritePhyUshort(sc, 0x15, 0x032f);
14880         MP_WritePhyUshort(sc, 0x19, 0x6c00);
14881         MP_WritePhyUshort(sc, 0x15, 0x0330);
14882         MP_WritePhyUshort(sc, 0x19, 0x3382);
14883         MP_WritePhyUshort(sc, 0x15, 0x0331);
14884         MP_WritePhyUshort(sc, 0x19, 0xb206);
14885         MP_WritePhyUshort(sc, 0x15, 0x0332);
14886         MP_WritePhyUshort(sc, 0x19, 0xb103);
14887         MP_WritePhyUshort(sc, 0x15, 0x0333);
14888         MP_WritePhyUshort(sc, 0x19, 0x6c00);
14889         MP_WritePhyUshort(sc, 0x15, 0x0334);
14890         MP_WritePhyUshort(sc, 0x19, 0x3395);
14891         MP_WritePhyUshort(sc, 0x15, 0x0335);
14892         MP_WritePhyUshort(sc, 0x19, 0x6c00);
14893         MP_WritePhyUshort(sc, 0x15, 0x0336);
14894         MP_WritePhyUshort(sc, 0x19, 0x33c6);
14895         MP_WritePhyUshort(sc, 0x15, 0x0337);
14896         MP_WritePhyUshort(sc, 0x19, 0xb103);
14897         MP_WritePhyUshort(sc, 0x15, 0x0338);
14898         MP_WritePhyUshort(sc, 0x19, 0x6c00);
14899         MP_WritePhyUshort(sc, 0x15, 0x0339);
14900         MP_WritePhyUshort(sc, 0x19, 0x33d7);
14901         MP_WritePhyUshort(sc, 0x15, 0x033a);
14902         MP_WritePhyUshort(sc, 0x19, 0x6c00);
14903         MP_WritePhyUshort(sc, 0x15, 0x033b);
14904         MP_WritePhyUshort(sc, 0x19, 0x33f2);
14905         MP_WritePhyUshort(sc, 0x15, 0x033c);
14906         MP_WritePhyUshort(sc, 0x19, 0x0000);
14907         MP_WritePhyUshort(sc, 0x15, 0x033d);
14908         MP_WritePhyUshort(sc, 0x19, 0x0000);
14909         MP_WritePhyUshort(sc, 0x15, 0x033e);
14910         MP_WritePhyUshort(sc, 0x19, 0x0000);
14911         MP_WritePhyUshort(sc, 0x15, 0x033f);
14912         MP_WritePhyUshort(sc, 0x19, 0x0000);
14913         MP_WritePhyUshort(sc, 0x15, 0x0340);
14914         MP_WritePhyUshort(sc, 0x19, 0x0000);
14915         MP_WritePhyUshort(sc, 0x15, 0x0341);
14916         MP_WritePhyUshort(sc, 0x19, 0x0000);
14917         MP_WritePhyUshort(sc, 0x15, 0x0342);
14918         MP_WritePhyUshort(sc, 0x19, 0x49b5);
14919         MP_WritePhyUshort(sc, 0x15, 0x0343);
14920         MP_WritePhyUshort(sc, 0x19, 0x7d00);
14921         MP_WritePhyUshort(sc, 0x15, 0x0344);
14922         MP_WritePhyUshort(sc, 0x19, 0x4d00);
14923         MP_WritePhyUshort(sc, 0x15, 0x0345);
14924         MP_WritePhyUshort(sc, 0x19, 0x6880);
14925         MP_WritePhyUshort(sc, 0x15, 0x0346);
14926         MP_WritePhyUshort(sc, 0x19, 0x7c08);
14927         MP_WritePhyUshort(sc, 0x15, 0x0347);
14928         MP_WritePhyUshort(sc, 0x19, 0x6c08);
14929         MP_WritePhyUshort(sc, 0x15, 0x0348);
14930         MP_WritePhyUshort(sc, 0x19, 0x4925);
14931         MP_WritePhyUshort(sc, 0x15, 0x0349);
14932         MP_WritePhyUshort(sc, 0x19, 0x403b);
14933         MP_WritePhyUshort(sc, 0x15, 0x034a);
14934         MP_WritePhyUshort(sc, 0x19, 0xa602);
14935         MP_WritePhyUshort(sc, 0x15, 0x034b);
14936         MP_WritePhyUshort(sc, 0x19, 0x402f);
14937         MP_WritePhyUshort(sc, 0x15, 0x034c);
14938         MP_WritePhyUshort(sc, 0x19, 0x4484);
14939         MP_WritePhyUshort(sc, 0x15, 0x034d);
14940         MP_WritePhyUshort(sc, 0x19, 0x40c8);
14941         MP_WritePhyUshort(sc, 0x15, 0x034e);
14942         MP_WritePhyUshort(sc, 0x19, 0x44c4);
14943         MP_WritePhyUshort(sc, 0x15, 0x034f);
14944         MP_WritePhyUshort(sc, 0x19, 0xd64f);
14945         MP_WritePhyUshort(sc, 0x15, 0x0350);
14946         MP_WritePhyUshort(sc, 0x19, 0x00bd);
14947         MP_WritePhyUshort(sc, 0x15, 0x0351);
14948         MP_WritePhyUshort(sc, 0x19, 0x3311);
14949         MP_WritePhyUshort(sc, 0x15, 0x0352);
14950         MP_WritePhyUshort(sc, 0x19, 0xc8ed);
14951         MP_WritePhyUshort(sc, 0x15, 0x0353);
14952         MP_WritePhyUshort(sc, 0x19, 0x00fc);
14953         MP_WritePhyUshort(sc, 0x15, 0x0354);
14954         MP_WritePhyUshort(sc, 0x19, 0x8221);
14955         MP_WritePhyUshort(sc, 0x15, 0x0355);
14956         MP_WritePhyUshort(sc, 0x19, 0xd11d);
14957         MP_WritePhyUshort(sc, 0x15, 0x0356);
14958         MP_WritePhyUshort(sc, 0x19, 0x001f);
14959         MP_WritePhyUshort(sc, 0x15, 0x0357);
14960         MP_WritePhyUshort(sc, 0x19, 0xde18);
14961         MP_WritePhyUshort(sc, 0x15, 0x0358);
14962         MP_WritePhyUshort(sc, 0x19, 0x0008);
14963         MP_WritePhyUshort(sc, 0x15, 0x0359);
14964         MP_WritePhyUshort(sc, 0x19, 0x91f6);
14965         MP_WritePhyUshort(sc, 0x15, 0x035a);
14966         MP_WritePhyUshort(sc, 0x19, 0x3360);
14967         MP_WritePhyUshort(sc, 0x15, 0x035b);
14968         MP_WritePhyUshort(sc, 0x19, 0x0000);
14969         MP_WritePhyUshort(sc, 0x15, 0x035c);
14970         MP_WritePhyUshort(sc, 0x19, 0x0000);
14971         MP_WritePhyUshort(sc, 0x15, 0x035d);
14972         MP_WritePhyUshort(sc, 0x19, 0x0000);
14973         MP_WritePhyUshort(sc, 0x15, 0x035e);
14974         MP_WritePhyUshort(sc, 0x19, 0x0000);
14975         MP_WritePhyUshort(sc, 0x15, 0x035f);
14976         MP_WritePhyUshort(sc, 0x19, 0x0000);
14977         MP_WritePhyUshort(sc, 0x15, 0x0360);
14978         MP_WritePhyUshort(sc, 0x19, 0x4bb6);
14979         MP_WritePhyUshort(sc, 0x15, 0x0361);
14980         MP_WritePhyUshort(sc, 0x19, 0x4064);
14981         MP_WritePhyUshort(sc, 0x15, 0x0362);
14982         MP_WritePhyUshort(sc, 0x19, 0x4b26);
14983         MP_WritePhyUshort(sc, 0x15, 0x0363);
14984         MP_WritePhyUshort(sc, 0x19, 0x4410);
14985         MP_WritePhyUshort(sc, 0x15, 0x0364);
14986         MP_WritePhyUshort(sc, 0x19, 0x4006);
14987         MP_WritePhyUshort(sc, 0x15, 0x0365);
14988         MP_WritePhyUshort(sc, 0x19, 0x4490);
14989         MP_WritePhyUshort(sc, 0x15, 0x0366);
14990         MP_WritePhyUshort(sc, 0x19, 0x6900);
14991         MP_WritePhyUshort(sc, 0x15, 0x0367);
14992         MP_WritePhyUshort(sc, 0x19, 0xb6a6);
14993         MP_WritePhyUshort(sc, 0x15, 0x0368);
14994         MP_WritePhyUshort(sc, 0x19, 0x9e02);
14995         MP_WritePhyUshort(sc, 0x15, 0x0369);
14996         MP_WritePhyUshort(sc, 0x19, 0x3311);
14997         MP_WritePhyUshort(sc, 0x15, 0x036a);
14998         MP_WritePhyUshort(sc, 0x19, 0xd11d);
14999         MP_WritePhyUshort(sc, 0x15, 0x036b);
15000         MP_WritePhyUshort(sc, 0x19, 0x000a);
15001         MP_WritePhyUshort(sc, 0x15, 0x036c);
15002         MP_WritePhyUshort(sc, 0x19, 0xbb0f);
15003         MP_WritePhyUshort(sc, 0x15, 0x036d);
15004         MP_WritePhyUshort(sc, 0x19, 0x8102);
15005         MP_WritePhyUshort(sc, 0x15, 0x036e);
15006         MP_WritePhyUshort(sc, 0x19, 0x3371);
15007         MP_WritePhyUshort(sc, 0x15, 0x036f);
15008         MP_WritePhyUshort(sc, 0x19, 0xa21e);
15009         MP_WritePhyUshort(sc, 0x15, 0x0370);
15010         MP_WritePhyUshort(sc, 0x19, 0x33b6);
15011         MP_WritePhyUshort(sc, 0x15, 0x0371);
15012         MP_WritePhyUshort(sc, 0x19, 0x91f6);
15013         MP_WritePhyUshort(sc, 0x15, 0x0372);
15014         MP_WritePhyUshort(sc, 0x19, 0xc218);
15015         MP_WritePhyUshort(sc, 0x15, 0x0373);
15016         MP_WritePhyUshort(sc, 0x19, 0x00f4);
15017         MP_WritePhyUshort(sc, 0x15, 0x0374);
15018         MP_WritePhyUshort(sc, 0x19, 0x33b6);
15019         MP_WritePhyUshort(sc, 0x15, 0x0375);
15020         MP_WritePhyUshort(sc, 0x19, 0x32ec);
15021         MP_WritePhyUshort(sc, 0x15, 0x0376);
15022         MP_WritePhyUshort(sc, 0x19, 0x0000);
15023         MP_WritePhyUshort(sc, 0x15, 0x0377);
15024         MP_WritePhyUshort(sc, 0x19, 0x0000);
15025         MP_WritePhyUshort(sc, 0x15, 0x0378);
15026         MP_WritePhyUshort(sc, 0x19, 0x0000);
15027         MP_WritePhyUshort(sc, 0x15, 0x0379);
15028         MP_WritePhyUshort(sc, 0x19, 0x0000);
15029         MP_WritePhyUshort(sc, 0x15, 0x037a);
15030         MP_WritePhyUshort(sc, 0x19, 0x0000);
15031         MP_WritePhyUshort(sc, 0x15, 0x037b);
15032         MP_WritePhyUshort(sc, 0x19, 0x4b97);
15033         MP_WritePhyUshort(sc, 0x15, 0x037c);
15034         MP_WritePhyUshort(sc, 0x19, 0x402b);
15035         MP_WritePhyUshort(sc, 0x15, 0x037d);
15036         MP_WritePhyUshort(sc, 0x19, 0x4b07);
15037         MP_WritePhyUshort(sc, 0x15, 0x037e);
15038         MP_WritePhyUshort(sc, 0x19, 0x4422);
15039         MP_WritePhyUshort(sc, 0x15, 0x037f);
15040         MP_WritePhyUshort(sc, 0x19, 0x6980);
15041         MP_WritePhyUshort(sc, 0x15, 0x0380);
15042         MP_WritePhyUshort(sc, 0x19, 0xb608);
15043         MP_WritePhyUshort(sc, 0x15, 0x0381);
15044         MP_WritePhyUshort(sc, 0x19, 0x3311);
15045         MP_WritePhyUshort(sc, 0x15, 0x0382);
15046         MP_WritePhyUshort(sc, 0x19, 0xbc05);
15047         MP_WritePhyUshort(sc, 0x15, 0x0383);
15048         MP_WritePhyUshort(sc, 0x19, 0xc21c);
15049         MP_WritePhyUshort(sc, 0x15, 0x0384);
15050         MP_WritePhyUshort(sc, 0x19, 0x0032);
15051         MP_WritePhyUshort(sc, 0x15, 0x0385);
15052         MP_WritePhyUshort(sc, 0x19, 0xa1fb);
15053         MP_WritePhyUshort(sc, 0x15, 0x0386);
15054         MP_WritePhyUshort(sc, 0x19, 0x338d);
15055         MP_WritePhyUshort(sc, 0x15, 0x0387);
15056         MP_WritePhyUshort(sc, 0x19, 0x32ae);
15057         MP_WritePhyUshort(sc, 0x15, 0x0388);
15058         MP_WritePhyUshort(sc, 0x19, 0x330d);
15059         MP_WritePhyUshort(sc, 0x15, 0x0389);
15060         MP_WritePhyUshort(sc, 0x19, 0x0000);
15061         MP_WritePhyUshort(sc, 0x15, 0x038a);
15062         MP_WritePhyUshort(sc, 0x19, 0x0000);
15063         MP_WritePhyUshort(sc, 0x15, 0x038b);
15064         MP_WritePhyUshort(sc, 0x19, 0x0000);
15065         MP_WritePhyUshort(sc, 0x15, 0x038c);
15066         MP_WritePhyUshort(sc, 0x19, 0x0000);
15067         MP_WritePhyUshort(sc, 0x15, 0x038d);
15068         MP_WritePhyUshort(sc, 0x19, 0x4b97);
15069         MP_WritePhyUshort(sc, 0x15, 0x038e);
15070         MP_WritePhyUshort(sc, 0x19, 0x6a08);
15071         MP_WritePhyUshort(sc, 0x15, 0x038f);
15072         MP_WritePhyUshort(sc, 0x19, 0x4b07);
15073         MP_WritePhyUshort(sc, 0x15, 0x0390);
15074         MP_WritePhyUshort(sc, 0x19, 0x40ac);
15075         MP_WritePhyUshort(sc, 0x15, 0x0391);
15076         MP_WritePhyUshort(sc, 0x19, 0x4445);
15077         MP_WritePhyUshort(sc, 0x15, 0x0392);
15078         MP_WritePhyUshort(sc, 0x19, 0x404e);
15079         MP_WritePhyUshort(sc, 0x15, 0x0393);
15080         MP_WritePhyUshort(sc, 0x19, 0x4461);
15081         MP_WritePhyUshort(sc, 0x15, 0x0394);
15082         MP_WritePhyUshort(sc, 0x19, 0x3311);
15083         MP_WritePhyUshort(sc, 0x15, 0x0395);
15084         MP_WritePhyUshort(sc, 0x19, 0x9c0a);
15085         MP_WritePhyUshort(sc, 0x15, 0x0396);
15086         MP_WritePhyUshort(sc, 0x19, 0x63da);
15087         MP_WritePhyUshort(sc, 0x15, 0x0397);
15088         MP_WritePhyUshort(sc, 0x19, 0x6f0c);
15089         MP_WritePhyUshort(sc, 0x15, 0x0398);
15090         MP_WritePhyUshort(sc, 0x19, 0x5440);
15091         MP_WritePhyUshort(sc, 0x15, 0x0399);
15092         MP_WritePhyUshort(sc, 0x19, 0x4b98);
15093         MP_WritePhyUshort(sc, 0x15, 0x039a);
15094         MP_WritePhyUshort(sc, 0x19, 0x7c40);
15095         MP_WritePhyUshort(sc, 0x15, 0x039b);
15096         MP_WritePhyUshort(sc, 0x19, 0x4c00);
15097         MP_WritePhyUshort(sc, 0x15, 0x039c);
15098         MP_WritePhyUshort(sc, 0x19, 0x4b08);
15099         MP_WritePhyUshort(sc, 0x15, 0x039d);
15100         MP_WritePhyUshort(sc, 0x19, 0x63d8);
15101         MP_WritePhyUshort(sc, 0x15, 0x039e);
15102         MP_WritePhyUshort(sc, 0x19, 0x33a5);
15103         MP_WritePhyUshort(sc, 0x15, 0x039f);
15104         MP_WritePhyUshort(sc, 0x19, 0xd64f);
15105         MP_WritePhyUshort(sc, 0x15, 0x03a0);
15106         MP_WritePhyUshort(sc, 0x19, 0x00e8);
15107         MP_WritePhyUshort(sc, 0x15, 0x03a1);
15108         MP_WritePhyUshort(sc, 0x19, 0x820e);
15109         MP_WritePhyUshort(sc, 0x15, 0x03a2);
15110         MP_WritePhyUshort(sc, 0x19, 0xa10d);
15111         MP_WritePhyUshort(sc, 0x15, 0x03a3);
15112         MP_WritePhyUshort(sc, 0x19, 0x9df1);
15113         MP_WritePhyUshort(sc, 0x15, 0x03a4);
15114         MP_WritePhyUshort(sc, 0x19, 0x33af);
15115         MP_WritePhyUshort(sc, 0x15, 0x03a5);
15116         MP_WritePhyUshort(sc, 0x19, 0xd64f);
15117         MP_WritePhyUshort(sc, 0x15, 0x03a6);
15118         MP_WritePhyUshort(sc, 0x19, 0x00f9);
15119         MP_WritePhyUshort(sc, 0x15, 0x03a7);
15120         MP_WritePhyUshort(sc, 0x19, 0xc017);
15121         MP_WritePhyUshort(sc, 0x15, 0x03a8);
15122         MP_WritePhyUshort(sc, 0x19, 0x0007);
15123         MP_WritePhyUshort(sc, 0x15, 0x03a9);
15124         MP_WritePhyUshort(sc, 0x19, 0x7c03);
15125         MP_WritePhyUshort(sc, 0x15, 0x03aa);
15126         MP_WritePhyUshort(sc, 0x19, 0x6c03);
15127         MP_WritePhyUshort(sc, 0x15, 0x03ab);
15128         MP_WritePhyUshort(sc, 0x19, 0xa104);
15129         MP_WritePhyUshort(sc, 0x15, 0x03ac);
15130         MP_WritePhyUshort(sc, 0x19, 0x7c03);
15131         MP_WritePhyUshort(sc, 0x15, 0x03ad);
15132         MP_WritePhyUshort(sc, 0x19, 0x6c00);
15133         MP_WritePhyUshort(sc, 0x15, 0x03ae);
15134         MP_WritePhyUshort(sc, 0x19, 0x9df7);
15135         MP_WritePhyUshort(sc, 0x15, 0x03af);
15136         MP_WritePhyUshort(sc, 0x19, 0x7c03);
15137         MP_WritePhyUshort(sc, 0x15, 0x03b0);
15138         MP_WritePhyUshort(sc, 0x19, 0x6c08);
15139         MP_WritePhyUshort(sc, 0x15, 0x03b1);
15140         MP_WritePhyUshort(sc, 0x19, 0x33b6);
15141         MP_WritePhyUshort(sc, 0x15, 0x03b2);
15142         MP_WritePhyUshort(sc, 0x19, 0x0000);
15143         MP_WritePhyUshort(sc, 0x15, 0x03b3);
15144         MP_WritePhyUshort(sc, 0x19, 0x0000);
15145         MP_WritePhyUshort(sc, 0x15, 0x03b4);
15146         MP_WritePhyUshort(sc, 0x19, 0x0000);
15147         MP_WritePhyUshort(sc, 0x15, 0x03b5);
15148         MP_WritePhyUshort(sc, 0x19, 0x0000);
15149         MP_WritePhyUshort(sc, 0x15, 0x03b6);
15150         MP_WritePhyUshort(sc, 0x19, 0x55af);
15151         MP_WritePhyUshort(sc, 0x15, 0x03b7);
15152         MP_WritePhyUshort(sc, 0x19, 0x7ff0);
15153         MP_WritePhyUshort(sc, 0x15, 0x03b8);
15154         MP_WritePhyUshort(sc, 0x19, 0x6ff0);
15155         MP_WritePhyUshort(sc, 0x15, 0x03b9);
15156         MP_WritePhyUshort(sc, 0x19, 0x4bb9);
15157         MP_WritePhyUshort(sc, 0x15, 0x03ba);
15158         MP_WritePhyUshort(sc, 0x19, 0x6a80);
15159         MP_WritePhyUshort(sc, 0x15, 0x03bb);
15160         MP_WritePhyUshort(sc, 0x19, 0x4b29);
15161         MP_WritePhyUshort(sc, 0x15, 0x03bc);
15162         MP_WritePhyUshort(sc, 0x19, 0x4041);
15163         MP_WritePhyUshort(sc, 0x15, 0x03bd);
15164         MP_WritePhyUshort(sc, 0x19, 0x440a);
15165         MP_WritePhyUshort(sc, 0x15, 0x03be);
15166         MP_WritePhyUshort(sc, 0x19, 0x4029);
15167         MP_WritePhyUshort(sc, 0x15, 0x03bf);
15168         MP_WritePhyUshort(sc, 0x19, 0x4418);
15169         MP_WritePhyUshort(sc, 0x15, 0x03c0);
15170         MP_WritePhyUshort(sc, 0x19, 0x4090);
15171         MP_WritePhyUshort(sc, 0x15, 0x03c1);
15172         MP_WritePhyUshort(sc, 0x19, 0x4438);
15173         MP_WritePhyUshort(sc, 0x15, 0x03c2);
15174         MP_WritePhyUshort(sc, 0x19, 0x40c4);
15175         MP_WritePhyUshort(sc, 0x15, 0x03c3);
15176         MP_WritePhyUshort(sc, 0x19, 0x447b);
15177         MP_WritePhyUshort(sc, 0x15, 0x03c4);
15178         MP_WritePhyUshort(sc, 0x19, 0xb6c4);
15179         MP_WritePhyUshort(sc, 0x15, 0x03c5);
15180         MP_WritePhyUshort(sc, 0x19, 0x3311);
15181         MP_WritePhyUshort(sc, 0x15, 0x03c6);
15182         MP_WritePhyUshort(sc, 0x19, 0x9bfe);
15183         MP_WritePhyUshort(sc, 0x15, 0x03c7);
15184         MP_WritePhyUshort(sc, 0x19, 0x33cc);
15185         MP_WritePhyUshort(sc, 0x15, 0x03c8);
15186         MP_WritePhyUshort(sc, 0x19, 0x0000);
15187         MP_WritePhyUshort(sc, 0x15, 0x03c9);
15188         MP_WritePhyUshort(sc, 0x19, 0x0000);
15189         MP_WritePhyUshort(sc, 0x15, 0x03ca);
15190         MP_WritePhyUshort(sc, 0x19, 0x0000);
15191         MP_WritePhyUshort(sc, 0x15, 0x03cb);
15192         MP_WritePhyUshort(sc, 0x19, 0x0000);
15193         MP_WritePhyUshort(sc, 0x15, 0x03cc);
15194         MP_WritePhyUshort(sc, 0x19, 0x542f);
15195         MP_WritePhyUshort(sc, 0x15, 0x03cd);
15196         MP_WritePhyUshort(sc, 0x19, 0x499a);
15197         MP_WritePhyUshort(sc, 0x15, 0x03ce);
15198         MP_WritePhyUshort(sc, 0x19, 0x7c40);
15199         MP_WritePhyUshort(sc, 0x15, 0x03cf);
15200         MP_WritePhyUshort(sc, 0x19, 0x4c40);
15201         MP_WritePhyUshort(sc, 0x15, 0x03d0);
15202         MP_WritePhyUshort(sc, 0x19, 0x490a);
15203         MP_WritePhyUshort(sc, 0x15, 0x03d1);
15204         MP_WritePhyUshort(sc, 0x19, 0x405e);
15205         MP_WritePhyUshort(sc, 0x15, 0x03d2);
15206         MP_WritePhyUshort(sc, 0x19, 0x44f8);
15207         MP_WritePhyUshort(sc, 0x15, 0x03d3);
15208         MP_WritePhyUshort(sc, 0x19, 0x6b00);
15209         MP_WritePhyUshort(sc, 0x15, 0x03d4);
15210         MP_WritePhyUshort(sc, 0x19, 0xd64f);
15211         MP_WritePhyUshort(sc, 0x15, 0x03d5);
15212         MP_WritePhyUshort(sc, 0x19, 0x0028);
15213         MP_WritePhyUshort(sc, 0x15, 0x03d6);
15214         MP_WritePhyUshort(sc, 0x19, 0x3311);
15215         MP_WritePhyUshort(sc, 0x15, 0x03d7);
15216         MP_WritePhyUshort(sc, 0x19, 0xbd27);
15217         MP_WritePhyUshort(sc, 0x15, 0x03d8);
15218         MP_WritePhyUshort(sc, 0x19, 0x9cfc);
15219         MP_WritePhyUshort(sc, 0x15, 0x03d9);
15220         MP_WritePhyUshort(sc, 0x19, 0xc639);
15221         MP_WritePhyUshort(sc, 0x15, 0x03da);
15222         MP_WritePhyUshort(sc, 0x19, 0x000f);
15223         MP_WritePhyUshort(sc, 0x15, 0x03db);
15224         MP_WritePhyUshort(sc, 0x19, 0x9e03);
15225         MP_WritePhyUshort(sc, 0x15, 0x03dc);
15226         MP_WritePhyUshort(sc, 0x19, 0x7c01);
15227         MP_WritePhyUshort(sc, 0x15, 0x03dd);
15228         MP_WritePhyUshort(sc, 0x19, 0x4c01);
15229         MP_WritePhyUshort(sc, 0x15, 0x03de);
15230         MP_WritePhyUshort(sc, 0x19, 0x9af6);
15231         MP_WritePhyUshort(sc, 0x15, 0x03df);
15232         MP_WritePhyUshort(sc, 0x19, 0x7c12);
15233         MP_WritePhyUshort(sc, 0x15, 0x03e0);
15234         MP_WritePhyUshort(sc, 0x19, 0x4c52);
15235         MP_WritePhyUshort(sc, 0x15, 0x03e1);
15236         MP_WritePhyUshort(sc, 0x19, 0x4470);
15237         MP_WritePhyUshort(sc, 0x15, 0x03e2);
15238         MP_WritePhyUshort(sc, 0x19, 0x7c12);
15239         MP_WritePhyUshort(sc, 0x15, 0x03e3);
15240         MP_WritePhyUshort(sc, 0x19, 0x4c40);
15241         MP_WritePhyUshort(sc, 0x15, 0x03e4);
15242         MP_WritePhyUshort(sc, 0x19, 0x33d4);
15243         MP_WritePhyUshort(sc, 0x15, 0x03e5);
15244         MP_WritePhyUshort(sc, 0x19, 0x0000);
15245         MP_WritePhyUshort(sc, 0x15, 0x03e6);
15246         MP_WritePhyUshort(sc, 0x19, 0x0000);
15247         MP_WritePhyUshort(sc, 0x15, 0x03e7);
15248         MP_WritePhyUshort(sc, 0x19, 0x0000);
15249         MP_WritePhyUshort(sc, 0x15, 0x03e8);
15250         MP_WritePhyUshort(sc, 0x19, 0x0000);
15251         MP_WritePhyUshort(sc, 0x15, 0x03e9);
15252         MP_WritePhyUshort(sc, 0x19, 0x49bb);
15253         MP_WritePhyUshort(sc, 0x15, 0x03ea);
15254         MP_WritePhyUshort(sc, 0x19, 0x4478);
15255         MP_WritePhyUshort(sc, 0x15, 0x03eb);
15256         MP_WritePhyUshort(sc, 0x19, 0x492b);
15257         MP_WritePhyUshort(sc, 0x15, 0x03ec);
15258         MP_WritePhyUshort(sc, 0x19, 0x6b80);
15259         MP_WritePhyUshort(sc, 0x15, 0x03ed);
15260         MP_WritePhyUshort(sc, 0x19, 0x7c01);
15261         MP_WritePhyUshort(sc, 0x15, 0x03ee);
15262         MP_WritePhyUshort(sc, 0x19, 0x4c00);
15263         MP_WritePhyUshort(sc, 0x15, 0x03ef);
15264         MP_WritePhyUshort(sc, 0x19, 0xd64f);
15265         MP_WritePhyUshort(sc, 0x15, 0x03f0);
15266         MP_WritePhyUshort(sc, 0x19, 0x000d);
15267         MP_WritePhyUshort(sc, 0x15, 0x03f1);
15268         MP_WritePhyUshort(sc, 0x19, 0x3311);
15269         MP_WritePhyUshort(sc, 0x15, 0x03f2);
15270         MP_WritePhyUshort(sc, 0x19, 0xbd0c);
15271         MP_WritePhyUshort(sc, 0x15, 0x03f3);
15272         MP_WritePhyUshort(sc, 0x19, 0xc428);
15273         MP_WritePhyUshort(sc, 0x15, 0x03f4);
15274         MP_WritePhyUshort(sc, 0x19, 0x0008);
15275         MP_WritePhyUshort(sc, 0x15, 0x03f5);
15276         MP_WritePhyUshort(sc, 0x19, 0x9afa);
15277         MP_WritePhyUshort(sc, 0x15, 0x03f6);
15278         MP_WritePhyUshort(sc, 0x19, 0x7c12);
15279         MP_WritePhyUshort(sc, 0x15, 0x03f7);
15280         MP_WritePhyUshort(sc, 0x19, 0x4c52);
15281         MP_WritePhyUshort(sc, 0x15, 0x03f8);
15282         MP_WritePhyUshort(sc, 0x19, 0x4470);
15283         MP_WritePhyUshort(sc, 0x15, 0x03f9);
15284         MP_WritePhyUshort(sc, 0x19, 0x7c12);
15285         MP_WritePhyUshort(sc, 0x15, 0x03fa);
15286         MP_WritePhyUshort(sc, 0x19, 0x4c40);
15287         MP_WritePhyUshort(sc, 0x15, 0x03fb);
15288         MP_WritePhyUshort(sc, 0x19, 0x33ef);
15289         MP_WritePhyUshort(sc, 0x15, 0x03fc);
15290         MP_WritePhyUshort(sc, 0x19, 0x3342);
15291         MP_WritePhyUshort(sc, 0x15, 0x03fd);
15292         MP_WritePhyUshort(sc, 0x19, 0x330d);
15293         MP_WritePhyUshort(sc, 0x15, 0x03fe);
15294         MP_WritePhyUshort(sc, 0x19, 0x32ae);
15295         MP_WritePhyUshort(sc, 0x15, 0x0000);
15296         MP_WritePhyUshort(sc, 0x16, 0x0306);
15297         MP_WritePhyUshort(sc, 0x16, 0x0300);
15298         MP_WritePhyUshort(sc, 0x1f, 0x0002);
15299         MP_WritePhyUshort(sc, 0x1f, 0x0000);
15300         MP_WritePhyUshort(sc, 0x1f, 0x0005);
15301         MP_WritePhyUshort(sc, 0x05, 0xfff6);
15302         MP_WritePhyUshort(sc, 0x06, 0x0080);
15303         MP_WritePhyUshort(sc, 0x05, 0x8000);
15304         MP_WritePhyUshort(sc, 0x06, 0x0280);
15305         MP_WritePhyUshort(sc, 0x06, 0x48f7);
15306         MP_WritePhyUshort(sc, 0x06, 0x00e0);
15307         MP_WritePhyUshort(sc, 0x06, 0xfff7);
15308         MP_WritePhyUshort(sc, 0x06, 0xa080);
15309         MP_WritePhyUshort(sc, 0x06, 0x02ae);
15310         MP_WritePhyUshort(sc, 0x06, 0xf602);
15311         MP_WritePhyUshort(sc, 0x06, 0x0112);
15312         MP_WritePhyUshort(sc, 0x06, 0x0201);
15313         MP_WritePhyUshort(sc, 0x06, 0x1f02);
15314         MP_WritePhyUshort(sc, 0x06, 0x012c);
15315         MP_WritePhyUshort(sc, 0x06, 0x0201);
15316         MP_WritePhyUshort(sc, 0x06, 0x3c02);
15317         MP_WritePhyUshort(sc, 0x06, 0x0156);
15318         MP_WritePhyUshort(sc, 0x06, 0x0201);
15319         MP_WritePhyUshort(sc, 0x06, 0x6d02);
15320         MP_WritePhyUshort(sc, 0x06, 0x809d);
15321         MP_WritePhyUshort(sc, 0x06, 0xe08b);
15322         MP_WritePhyUshort(sc, 0x06, 0x88e1);
15323         MP_WritePhyUshort(sc, 0x06, 0x8b89);
15324         MP_WritePhyUshort(sc, 0x06, 0x1e01);
15325         MP_WritePhyUshort(sc, 0x06, 0xe18b);
15326         MP_WritePhyUshort(sc, 0x06, 0x8a1e);
15327         MP_WritePhyUshort(sc, 0x06, 0x01e1);
15328         MP_WritePhyUshort(sc, 0x06, 0x8b8b);
15329         MP_WritePhyUshort(sc, 0x06, 0x1e01);
15330         MP_WritePhyUshort(sc, 0x06, 0xe18b);
15331         MP_WritePhyUshort(sc, 0x06, 0x8c1e);
15332         MP_WritePhyUshort(sc, 0x06, 0x01e1);
15333         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
15334         MP_WritePhyUshort(sc, 0x06, 0x1e01);
15335         MP_WritePhyUshort(sc, 0x06, 0xe18b);
15336         MP_WritePhyUshort(sc, 0x06, 0x8e1e);
15337         MP_WritePhyUshort(sc, 0x06, 0x01a0);
15338         MP_WritePhyUshort(sc, 0x06, 0x00c7);
15339         MP_WritePhyUshort(sc, 0x06, 0xaebb);
15340         MP_WritePhyUshort(sc, 0x06, 0xd100);
15341         MP_WritePhyUshort(sc, 0x06, 0xbf82);
15342         MP_WritePhyUshort(sc, 0x06, 0xc702);
15343         MP_WritePhyUshort(sc, 0x06, 0x320a);
15344         MP_WritePhyUshort(sc, 0x06, 0xd105);
15345         MP_WritePhyUshort(sc, 0x06, 0xbf82);
15346         MP_WritePhyUshort(sc, 0x06, 0xcd02);
15347         MP_WritePhyUshort(sc, 0x06, 0x320a);
15348         MP_WritePhyUshort(sc, 0x06, 0xd100);
15349         MP_WritePhyUshort(sc, 0x06, 0xbf82);
15350         MP_WritePhyUshort(sc, 0x06, 0xca02);
15351         MP_WritePhyUshort(sc, 0x06, 0x320a);
15352         MP_WritePhyUshort(sc, 0x06, 0xd105);
15353         MP_WritePhyUshort(sc, 0x06, 0xbf82);
15354         MP_WritePhyUshort(sc, 0x06, 0xd002);
15355         MP_WritePhyUshort(sc, 0x06, 0x320a);
15356         MP_WritePhyUshort(sc, 0x06, 0xd481);
15357         MP_WritePhyUshort(sc, 0x06, 0xc9e4);
15358         MP_WritePhyUshort(sc, 0x06, 0x8b90);
15359         MP_WritePhyUshort(sc, 0x06, 0xe58b);
15360         MP_WritePhyUshort(sc, 0x06, 0x91d4);
15361         MP_WritePhyUshort(sc, 0x06, 0x81b8);
15362         MP_WritePhyUshort(sc, 0x06, 0xe48b);
15363         MP_WritePhyUshort(sc, 0x06, 0x92e5);
15364         MP_WritePhyUshort(sc, 0x06, 0x8b93);
15365         MP_WritePhyUshort(sc, 0x06, 0xbf8b);
15366         MP_WritePhyUshort(sc, 0x06, 0x88ec);
15367         MP_WritePhyUshort(sc, 0x06, 0x0019);
15368         MP_WritePhyUshort(sc, 0x06, 0xa98b);
15369         MP_WritePhyUshort(sc, 0x06, 0x90f9);
15370         MP_WritePhyUshort(sc, 0x06, 0xeeff);
15371         MP_WritePhyUshort(sc, 0x06, 0xf600);
15372         MP_WritePhyUshort(sc, 0x06, 0xeeff);
15373         MP_WritePhyUshort(sc, 0x06, 0xf7fc);
15374         MP_WritePhyUshort(sc, 0x06, 0xd100);
15375         MP_WritePhyUshort(sc, 0x06, 0xbf82);
15376         MP_WritePhyUshort(sc, 0x06, 0xc102);
15377         MP_WritePhyUshort(sc, 0x06, 0x320a);
15378         MP_WritePhyUshort(sc, 0x06, 0xd101);
15379         MP_WritePhyUshort(sc, 0x06, 0xbf82);
15380         MP_WritePhyUshort(sc, 0x06, 0xc402);
15381         MP_WritePhyUshort(sc, 0x06, 0x320a);
15382         MP_WritePhyUshort(sc, 0x06, 0x04f8);
15383         MP_WritePhyUshort(sc, 0x06, 0xe08b);
15384         MP_WritePhyUshort(sc, 0x06, 0x8ead);
15385         MP_WritePhyUshort(sc, 0x06, 0x201a);
15386         MP_WritePhyUshort(sc, 0x06, 0xf620);
15387         MP_WritePhyUshort(sc, 0x06, 0xe48b);
15388         MP_WritePhyUshort(sc, 0x06, 0x8e02);
15389         MP_WritePhyUshort(sc, 0x06, 0x824b);
15390         MP_WritePhyUshort(sc, 0x06, 0x0281);
15391         MP_WritePhyUshort(sc, 0x06, 0x1902);
15392         MP_WritePhyUshort(sc, 0x06, 0x2c9d);
15393         MP_WritePhyUshort(sc, 0x06, 0x0203);
15394         MP_WritePhyUshort(sc, 0x06, 0x9602);
15395         MP_WritePhyUshort(sc, 0x06, 0x0473);
15396         MP_WritePhyUshort(sc, 0x06, 0x022e);
15397         MP_WritePhyUshort(sc, 0x06, 0x3902);
15398         MP_WritePhyUshort(sc, 0x06, 0x044d);
15399         MP_WritePhyUshort(sc, 0x06, 0xe08b);
15400         MP_WritePhyUshort(sc, 0x06, 0x8ead);
15401         MP_WritePhyUshort(sc, 0x06, 0x210b);
15402         MP_WritePhyUshort(sc, 0x06, 0xf621);
15403         MP_WritePhyUshort(sc, 0x06, 0xe48b);
15404         MP_WritePhyUshort(sc, 0x06, 0x8e02);
15405         MP_WritePhyUshort(sc, 0x06, 0x0416);
15406         MP_WritePhyUshort(sc, 0x06, 0x021b);
15407         MP_WritePhyUshort(sc, 0x06, 0xa4e0);
15408         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
15409         MP_WritePhyUshort(sc, 0x06, 0xad22);
15410         MP_WritePhyUshort(sc, 0x06, 0x05f6);
15411         MP_WritePhyUshort(sc, 0x06, 0x22e4);
15412         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
15413         MP_WritePhyUshort(sc, 0x06, 0xe08b);
15414         MP_WritePhyUshort(sc, 0x06, 0x8ead);
15415         MP_WritePhyUshort(sc, 0x06, 0x2305);
15416         MP_WritePhyUshort(sc, 0x06, 0xf623);
15417         MP_WritePhyUshort(sc, 0x06, 0xe48b);
15418         MP_WritePhyUshort(sc, 0x06, 0x8ee0);
15419         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
15420         MP_WritePhyUshort(sc, 0x06, 0xad24);
15421         MP_WritePhyUshort(sc, 0x06, 0x05f6);
15422         MP_WritePhyUshort(sc, 0x06, 0x24e4);
15423         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
15424         MP_WritePhyUshort(sc, 0x06, 0xe08b);
15425         MP_WritePhyUshort(sc, 0x06, 0x8ead);
15426         MP_WritePhyUshort(sc, 0x06, 0x2505);
15427         MP_WritePhyUshort(sc, 0x06, 0xf625);
15428         MP_WritePhyUshort(sc, 0x06, 0xe48b);
15429         MP_WritePhyUshort(sc, 0x06, 0x8ee0);
15430         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
15431         MP_WritePhyUshort(sc, 0x06, 0xad26);
15432         MP_WritePhyUshort(sc, 0x06, 0x08f6);
15433         MP_WritePhyUshort(sc, 0x06, 0x26e4);
15434         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
15435         MP_WritePhyUshort(sc, 0x06, 0x0281);
15436         MP_WritePhyUshort(sc, 0x06, 0xdae0);
15437         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
15438         MP_WritePhyUshort(sc, 0x06, 0xad27);
15439         MP_WritePhyUshort(sc, 0x06, 0x05f6);
15440         MP_WritePhyUshort(sc, 0x06, 0x27e4);
15441         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
15442         MP_WritePhyUshort(sc, 0x06, 0x0203);
15443         MP_WritePhyUshort(sc, 0x06, 0x5cfc);
15444         MP_WritePhyUshort(sc, 0x06, 0x04f8);
15445         MP_WritePhyUshort(sc, 0x06, 0xfaef);
15446         MP_WritePhyUshort(sc, 0x06, 0x69e0);
15447         MP_WritePhyUshort(sc, 0x06, 0x8b85);
15448         MP_WritePhyUshort(sc, 0x06, 0xad21);
15449         MP_WritePhyUshort(sc, 0x06, 0x57e0);
15450         MP_WritePhyUshort(sc, 0x06, 0xe022);
15451         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
15452         MP_WritePhyUshort(sc, 0x06, 0x2358);
15453         MP_WritePhyUshort(sc, 0x06, 0xc059);
15454         MP_WritePhyUshort(sc, 0x06, 0x021e);
15455         MP_WritePhyUshort(sc, 0x06, 0x01e1);
15456         MP_WritePhyUshort(sc, 0x06, 0x8b3c);
15457         MP_WritePhyUshort(sc, 0x06, 0x1f10);
15458         MP_WritePhyUshort(sc, 0x06, 0x9e44);
15459         MP_WritePhyUshort(sc, 0x06, 0xe48b);
15460         MP_WritePhyUshort(sc, 0x06, 0x3cad);
15461         MP_WritePhyUshort(sc, 0x06, 0x211d);
15462         MP_WritePhyUshort(sc, 0x06, 0xe18b);
15463         MP_WritePhyUshort(sc, 0x06, 0x84f7);
15464         MP_WritePhyUshort(sc, 0x06, 0x29e5);
15465         MP_WritePhyUshort(sc, 0x06, 0x8b84);
15466         MP_WritePhyUshort(sc, 0x06, 0xac27);
15467         MP_WritePhyUshort(sc, 0x06, 0x0dac);
15468         MP_WritePhyUshort(sc, 0x06, 0x2605);
15469         MP_WritePhyUshort(sc, 0x06, 0x0281);
15470         MP_WritePhyUshort(sc, 0x06, 0x7fae);
15471         MP_WritePhyUshort(sc, 0x06, 0x2b02);
15472         MP_WritePhyUshort(sc, 0x06, 0x2c23);
15473         MP_WritePhyUshort(sc, 0x06, 0xae26);
15474         MP_WritePhyUshort(sc, 0x06, 0x022c);
15475         MP_WritePhyUshort(sc, 0x06, 0x41ae);
15476         MP_WritePhyUshort(sc, 0x06, 0x21e0);
15477         MP_WritePhyUshort(sc, 0x06, 0x8b87);
15478         MP_WritePhyUshort(sc, 0x06, 0xad22);
15479         MP_WritePhyUshort(sc, 0x06, 0x18e0);
15480         MP_WritePhyUshort(sc, 0x06, 0xfff7);
15481         MP_WritePhyUshort(sc, 0x06, 0x58fc);
15482         MP_WritePhyUshort(sc, 0x06, 0xe4ff);
15483         MP_WritePhyUshort(sc, 0x06, 0xf7d1);
15484         MP_WritePhyUshort(sc, 0x06, 0x00bf);
15485         MP_WritePhyUshort(sc, 0x06, 0x2eee);
15486         MP_WritePhyUshort(sc, 0x06, 0x0232);
15487         MP_WritePhyUshort(sc, 0x06, 0x0ad1);
15488         MP_WritePhyUshort(sc, 0x06, 0x00bf);
15489         MP_WritePhyUshort(sc, 0x06, 0x82e8);
15490         MP_WritePhyUshort(sc, 0x06, 0x0232);
15491         MP_WritePhyUshort(sc, 0x06, 0x0a02);
15492         MP_WritePhyUshort(sc, 0x06, 0x2bdf);
15493         MP_WritePhyUshort(sc, 0x06, 0xef96);
15494         MP_WritePhyUshort(sc, 0x06, 0xfefc);
15495         MP_WritePhyUshort(sc, 0x06, 0x04d0);
15496         MP_WritePhyUshort(sc, 0x06, 0x0202);
15497         MP_WritePhyUshort(sc, 0x06, 0x1e97);
15498         MP_WritePhyUshort(sc, 0x06, 0xe08b);
15499         MP_WritePhyUshort(sc, 0x06, 0x87ad);
15500         MP_WritePhyUshort(sc, 0x06, 0x2228);
15501         MP_WritePhyUshort(sc, 0x06, 0xd100);
15502         MP_WritePhyUshort(sc, 0x06, 0xbf82);
15503         MP_WritePhyUshort(sc, 0x06, 0xd302);
15504         MP_WritePhyUshort(sc, 0x06, 0x320a);
15505         MP_WritePhyUshort(sc, 0x06, 0xd10c);
15506         MP_WritePhyUshort(sc, 0x06, 0xbf82);
15507         MP_WritePhyUshort(sc, 0x06, 0xd602);
15508         MP_WritePhyUshort(sc, 0x06, 0x320a);
15509         MP_WritePhyUshort(sc, 0x06, 0xd104);
15510         MP_WritePhyUshort(sc, 0x06, 0xbf82);
15511         MP_WritePhyUshort(sc, 0x06, 0xd902);
15512         MP_WritePhyUshort(sc, 0x06, 0x320a);
15513         MP_WritePhyUshort(sc, 0x06, 0xd101);
15514         MP_WritePhyUshort(sc, 0x06, 0xbf82);
15515         MP_WritePhyUshort(sc, 0x06, 0xe802);
15516         MP_WritePhyUshort(sc, 0x06, 0x320a);
15517         MP_WritePhyUshort(sc, 0x06, 0xe0ff);
15518         MP_WritePhyUshort(sc, 0x06, 0xf768);
15519         MP_WritePhyUshort(sc, 0x06, 0x03e4);
15520         MP_WritePhyUshort(sc, 0x06, 0xfff7);
15521         MP_WritePhyUshort(sc, 0x06, 0xd004);
15522         MP_WritePhyUshort(sc, 0x06, 0x0228);
15523         MP_WritePhyUshort(sc, 0x06, 0x7a04);
15524         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
15525         MP_WritePhyUshort(sc, 0x06, 0xe234);
15526         MP_WritePhyUshort(sc, 0x06, 0xe1e2);
15527         MP_WritePhyUshort(sc, 0x06, 0x35f6);
15528         MP_WritePhyUshort(sc, 0x06, 0x2be4);
15529         MP_WritePhyUshort(sc, 0x06, 0xe234);
15530         MP_WritePhyUshort(sc, 0x06, 0xe5e2);
15531         MP_WritePhyUshort(sc, 0x06, 0x35fc);
15532         MP_WritePhyUshort(sc, 0x06, 0x05f8);
15533         MP_WritePhyUshort(sc, 0x06, 0xe0e2);
15534         MP_WritePhyUshort(sc, 0x06, 0x34e1);
15535         MP_WritePhyUshort(sc, 0x06, 0xe235);
15536         MP_WritePhyUshort(sc, 0x06, 0xf72b);
15537         MP_WritePhyUshort(sc, 0x06, 0xe4e2);
15538         MP_WritePhyUshort(sc, 0x06, 0x34e5);
15539         MP_WritePhyUshort(sc, 0x06, 0xe235);
15540         MP_WritePhyUshort(sc, 0x06, 0xfc05);
15541         MP_WritePhyUshort(sc, 0x06, 0xf8f9);
15542         MP_WritePhyUshort(sc, 0x06, 0xfaef);
15543         MP_WritePhyUshort(sc, 0x06, 0x69ac);
15544         MP_WritePhyUshort(sc, 0x06, 0x1b4c);
15545         MP_WritePhyUshort(sc, 0x06, 0xbf2e);
15546         MP_WritePhyUshort(sc, 0x06, 0x3002);
15547         MP_WritePhyUshort(sc, 0x06, 0x31dd);
15548         MP_WritePhyUshort(sc, 0x06, 0xef01);
15549         MP_WritePhyUshort(sc, 0x06, 0xe28a);
15550         MP_WritePhyUshort(sc, 0x06, 0x76e4);
15551         MP_WritePhyUshort(sc, 0x06, 0x8a76);
15552         MP_WritePhyUshort(sc, 0x06, 0x1f12);
15553         MP_WritePhyUshort(sc, 0x06, 0x9e3a);
15554         MP_WritePhyUshort(sc, 0x06, 0xef12);
15555         MP_WritePhyUshort(sc, 0x06, 0x5907);
15556         MP_WritePhyUshort(sc, 0x06, 0x9f12);
15557         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
15558         MP_WritePhyUshort(sc, 0x06, 0x8b40);
15559         MP_WritePhyUshort(sc, 0x06, 0xf721);
15560         MP_WritePhyUshort(sc, 0x06, 0xe48b);
15561         MP_WritePhyUshort(sc, 0x06, 0x40d0);
15562         MP_WritePhyUshort(sc, 0x06, 0x0302);
15563         MP_WritePhyUshort(sc, 0x06, 0x287a);
15564         MP_WritePhyUshort(sc, 0x06, 0x0282);
15565         MP_WritePhyUshort(sc, 0x06, 0x34fc);
15566         MP_WritePhyUshort(sc, 0x06, 0xa000);
15567         MP_WritePhyUshort(sc, 0x06, 0x1002);
15568         MP_WritePhyUshort(sc, 0x06, 0x2dc3);
15569         MP_WritePhyUshort(sc, 0x06, 0x022e);
15570         MP_WritePhyUshort(sc, 0x06, 0x21e0);
15571         MP_WritePhyUshort(sc, 0x06, 0x8b40);
15572         MP_WritePhyUshort(sc, 0x06, 0xf621);
15573         MP_WritePhyUshort(sc, 0x06, 0xe48b);
15574         MP_WritePhyUshort(sc, 0x06, 0x40ae);
15575         MP_WritePhyUshort(sc, 0x06, 0x0fbf);
15576         MP_WritePhyUshort(sc, 0x06, 0x3fa5);
15577         MP_WritePhyUshort(sc, 0x06, 0x0231);
15578         MP_WritePhyUshort(sc, 0x06, 0x6cbf);
15579         MP_WritePhyUshort(sc, 0x06, 0x3fa2);
15580         MP_WritePhyUshort(sc, 0x06, 0x0231);
15581         MP_WritePhyUshort(sc, 0x06, 0x6c02);
15582         MP_WritePhyUshort(sc, 0x06, 0x2dc3);
15583         MP_WritePhyUshort(sc, 0x06, 0xef96);
15584         MP_WritePhyUshort(sc, 0x06, 0xfefd);
15585         MP_WritePhyUshort(sc, 0x06, 0xfc04);
15586         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
15587         MP_WritePhyUshort(sc, 0x06, 0xe2f4);
15588         MP_WritePhyUshort(sc, 0x06, 0xe1e2);
15589         MP_WritePhyUshort(sc, 0x06, 0xf5e4);
15590         MP_WritePhyUshort(sc, 0x06, 0x8a78);
15591         MP_WritePhyUshort(sc, 0x06, 0xe58a);
15592         MP_WritePhyUshort(sc, 0x06, 0x79ee);
15593         MP_WritePhyUshort(sc, 0x06, 0xe2f4);
15594         MP_WritePhyUshort(sc, 0x06, 0xd8ee);
15595         MP_WritePhyUshort(sc, 0x06, 0xe2f5);
15596         MP_WritePhyUshort(sc, 0x06, 0x20fc);
15597         MP_WritePhyUshort(sc, 0x06, 0x04f8);
15598         MP_WritePhyUshort(sc, 0x06, 0xf9fa);
15599         MP_WritePhyUshort(sc, 0x06, 0xef69);
15600         MP_WritePhyUshort(sc, 0x06, 0xe08b);
15601         MP_WritePhyUshort(sc, 0x06, 0x87ad);
15602         MP_WritePhyUshort(sc, 0x06, 0x2065);
15603         MP_WritePhyUshort(sc, 0x06, 0xd200);
15604         MP_WritePhyUshort(sc, 0x06, 0xbf2e);
15605         MP_WritePhyUshort(sc, 0x06, 0xe802);
15606         MP_WritePhyUshort(sc, 0x06, 0x31dd);
15607         MP_WritePhyUshort(sc, 0x06, 0x1e21);
15608         MP_WritePhyUshort(sc, 0x06, 0xbf82);
15609         MP_WritePhyUshort(sc, 0x06, 0xdf02);
15610         MP_WritePhyUshort(sc, 0x06, 0x31dd);
15611         MP_WritePhyUshort(sc, 0x06, 0x0c11);
15612         MP_WritePhyUshort(sc, 0x06, 0x1e21);
15613         MP_WritePhyUshort(sc, 0x06, 0xbf82);
15614         MP_WritePhyUshort(sc, 0x06, 0xe202);
15615         MP_WritePhyUshort(sc, 0x06, 0x31dd);
15616         MP_WritePhyUshort(sc, 0x06, 0x0c12);
15617         MP_WritePhyUshort(sc, 0x06, 0x1e21);
15618         MP_WritePhyUshort(sc, 0x06, 0xbf82);
15619         MP_WritePhyUshort(sc, 0x06, 0xe502);
15620         MP_WritePhyUshort(sc, 0x06, 0x31dd);
15621         MP_WritePhyUshort(sc, 0x06, 0x0c13);
15622         MP_WritePhyUshort(sc, 0x06, 0x1e21);
15623         MP_WritePhyUshort(sc, 0x06, 0xbf1f);
15624         MP_WritePhyUshort(sc, 0x06, 0x5302);
15625         MP_WritePhyUshort(sc, 0x06, 0x31dd);
15626         MP_WritePhyUshort(sc, 0x06, 0x0c14);
15627         MP_WritePhyUshort(sc, 0x06, 0x1e21);
15628         MP_WritePhyUshort(sc, 0x06, 0xbf82);
15629         MP_WritePhyUshort(sc, 0x06, 0xeb02);
15630         MP_WritePhyUshort(sc, 0x06, 0x31dd);
15631         MP_WritePhyUshort(sc, 0x06, 0x0c16);
15632         MP_WritePhyUshort(sc, 0x06, 0x1e21);
15633         MP_WritePhyUshort(sc, 0x06, 0xe083);
15634         MP_WritePhyUshort(sc, 0x06, 0xe01f);
15635         MP_WritePhyUshort(sc, 0x06, 0x029e);
15636         MP_WritePhyUshort(sc, 0x06, 0x22e6);
15637         MP_WritePhyUshort(sc, 0x06, 0x83e0);
15638         MP_WritePhyUshort(sc, 0x06, 0xad31);
15639         MP_WritePhyUshort(sc, 0x06, 0x14ad);
15640         MP_WritePhyUshort(sc, 0x06, 0x3011);
15641         MP_WritePhyUshort(sc, 0x06, 0xef02);
15642         MP_WritePhyUshort(sc, 0x06, 0x580c);
15643         MP_WritePhyUshort(sc, 0x06, 0x9e07);
15644         MP_WritePhyUshort(sc, 0x06, 0xad36);
15645         MP_WritePhyUshort(sc, 0x06, 0x085a);
15646         MP_WritePhyUshort(sc, 0x06, 0x309f);
15647         MP_WritePhyUshort(sc, 0x06, 0x04d1);
15648         MP_WritePhyUshort(sc, 0x06, 0x01ae);
15649         MP_WritePhyUshort(sc, 0x06, 0x02d1);
15650         MP_WritePhyUshort(sc, 0x06, 0x00bf);
15651         MP_WritePhyUshort(sc, 0x06, 0x82dc);
15652         MP_WritePhyUshort(sc, 0x06, 0x0232);
15653         MP_WritePhyUshort(sc, 0x06, 0x0aef);
15654         MP_WritePhyUshort(sc, 0x06, 0x96fe);
15655         MP_WritePhyUshort(sc, 0x06, 0xfdfc);
15656         MP_WritePhyUshort(sc, 0x06, 0x0400);
15657         MP_WritePhyUshort(sc, 0x06, 0xe140);
15658         MP_WritePhyUshort(sc, 0x06, 0x77e1);
15659         MP_WritePhyUshort(sc, 0x06, 0x4010);
15660         MP_WritePhyUshort(sc, 0x06, 0xe150);
15661         MP_WritePhyUshort(sc, 0x06, 0x32e1);
15662         MP_WritePhyUshort(sc, 0x06, 0x5030);
15663         MP_WritePhyUshort(sc, 0x06, 0xe144);
15664         MP_WritePhyUshort(sc, 0x06, 0x74e1);
15665         MP_WritePhyUshort(sc, 0x06, 0x44bb);
15666         MP_WritePhyUshort(sc, 0x06, 0xe2d2);
15667         MP_WritePhyUshort(sc, 0x06, 0x40e0);
15668         MP_WritePhyUshort(sc, 0x06, 0x2cfc);
15669         MP_WritePhyUshort(sc, 0x06, 0xe2cc);
15670         MP_WritePhyUshort(sc, 0x06, 0xcce2);
15671         MP_WritePhyUshort(sc, 0x06, 0x00cc);
15672         MP_WritePhyUshort(sc, 0x06, 0xe000);
15673         MP_WritePhyUshort(sc, 0x06, 0x99e0);
15674         MP_WritePhyUshort(sc, 0x06, 0x3688);
15675         MP_WritePhyUshort(sc, 0x06, 0xe036);
15676         MP_WritePhyUshort(sc, 0x06, 0x99e1);
15677         MP_WritePhyUshort(sc, 0x06, 0x40dd);
15678         MP_WritePhyUshort(sc, 0x06, 0xe022);
15679         MP_WritePhyUshort(sc, 0x05, 0xe142);
15680         PhyRegValue = MP_ReadPhyUshort(sc, 0x06);
15681         PhyRegValue |= BIT_0;
15682         MP_WritePhyUshort(sc, 0x06, PhyRegValue);
15683         MP_WritePhyUshort(sc, 0x05, 0xe140);
15684         PhyRegValue = MP_ReadPhyUshort(sc, 0x06);
15685         PhyRegValue |= BIT_0;
15686         MP_WritePhyUshort(sc, 0x06, PhyRegValue);
15687         MP_WritePhyUshort(sc, 0x1f, 0x0000);
15688         MP_WritePhyUshort(sc, 0x1f, 0x0005);
15689         for (i = 0; i < 200; i++) {
15690                 DELAY(100);
15691                 PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
15692                 if (PhyRegValue & BIT_7)
15693                         break;
15694         }
15695 
15696         MP_WritePhyUshort(sc, 0x1F, 0x0001);
15697         MP_WritePhyUshort(sc, 0x0B, 0x6C14);
15698         MP_WritePhyUshort(sc, 0x14, 0x7F3D);
15699         MP_WritePhyUshort(sc, 0x1C, 0xFAFE);
15700         MP_WritePhyUshort(sc, 0x08, 0x07C5);
15701         MP_WritePhyUshort(sc, 0x10, 0xF090);
15702         MP_WritePhyUshort(sc, 0x1F, 0x0003);
15703         MP_WritePhyUshort(sc, 0x14, 0x641A);
15704         MP_WritePhyUshort(sc, 0x1A, 0x0606);
15705         MP_WritePhyUshort(sc, 0x12, 0xF480);
15706         MP_WritePhyUshort(sc, 0x13, 0x0747);
15707         MP_WritePhyUshort(sc, 0x1F, 0x0000);
15708 
15709         MP_WritePhyUshort(sc, 0x1F, 0x0003);
15710         MP_WritePhyUshort(sc, 0x0D, 0x0207);
15711         MP_WritePhyUshort(sc, 0x02, 0x5FD0);
15712         MP_WritePhyUshort(sc, 0x1F, 0x0000);
15713 
15714         MP_WritePhyUshort(sc, 0x1F, 0x0003);
15715         MP_WritePhyUshort(sc, 0x09, 0xA20F);
15716         MP_WritePhyUshort(sc, 0x1F, 0x0000);
15717 
15718         MP_WritePhyUshort(sc, 0x1f, 0x0003);
15719         PhyRegValue = MP_ReadPhyUshort(sc, 0x19);
15720         PhyRegValue &= ~BIT_0;
15721         MP_WritePhyUshort(sc, 0x19, PhyRegValue);
15722         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
15723         PhyRegValue &= ~BIT_10;
15724         MP_WritePhyUshort(sc, 0x10, PhyRegValue);
15725         MP_WritePhyUshort(sc, 0x1f, 0x0000);
15726 
15727         MP_WritePhyUshort(sc, 0x1f, 0x0004);
15728         MP_WritePhyUshort(sc, 0x1f, 0x0007);
15729         MP_WritePhyUshort(sc, 0x1e, 0x0023);
15730         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
15731         PhyRegValue &= ~BIT_0;
15732         PhyRegValue |= BIT_2;
15733         MP_WritePhyUshort(sc, 0x17, PhyRegValue);
15734         MP_WritePhyUshort(sc, 0x1f, 0x0002);
15735         MP_WritePhyUshort(sc, 0x1f, 0x0000);
15736 }
15737 
15738 static void re_set_phy_mcu_8168evl_2(struct re_softc *sc)
15739 {
15740         u_int16_t PhyRegValue;
15741         int i;
15742 
15743         MP_WritePhyUshort(sc, 0x1f, 0x0000);
15744         MP_WritePhyUshort(sc, 0x00, 0x1800);
15745         PhyRegValue = MP_ReadPhyUshort(sc, 0x15);
15746         PhyRegValue &= ~(BIT_12);
15747         MP_WritePhyUshort(sc, 0x15, PhyRegValue);
15748         MP_WritePhyUshort(sc, 0x00, 0x4800);
15749         MP_WritePhyUshort(sc, 0x1f, 0x0007);
15750         MP_WritePhyUshort(sc, 0x1e, 0x002f);
15751         for (i = 0; i < 1000; i++) {
15752                 if (MP_ReadPhyUshort(sc, 0x1c) & BIT_7)
15753                         break;
15754                 DELAY(100);
15755         }
15756         MP_WritePhyUshort(sc, 0x1f, 0x0000);
15757         MP_WritePhyUshort(sc, 0x00, 0x1800);
15758         MP_WritePhyUshort(sc, 0x1f, 0x0007);
15759         MP_WritePhyUshort(sc, 0x1e, 0x0023);
15760         for (i = 0; i < 200; i++) {
15761                 if ((MP_ReadPhyUshort(sc, 0x17) & BIT_0) == 0)
15762                         break;
15763                 DELAY(100);
15764         }
15765         MP_WritePhyUshort(sc, 0x1f, 0x0005);
15766         MP_WritePhyUshort(sc, 0x05, 0xfff6);
15767         MP_WritePhyUshort(sc, 0x06, 0x0080);
15768         MP_WritePhyUshort(sc, 0x1f, 0x0007);
15769         MP_WritePhyUshort(sc, 0x1e, 0x0023);
15770         MP_WritePhyUshort(sc, 0x16, 0x0306);
15771         MP_WritePhyUshort(sc, 0x16, 0x0307);
15772         MP_WritePhyUshort(sc, 0x15, 0x00AF);
15773         MP_WritePhyUshort(sc, 0x19, 0x4060);
15774         MP_WritePhyUshort(sc, 0x15, 0x00B0);
15775         MP_WritePhyUshort(sc, 0x19, 0x7800);
15776         MP_WritePhyUshort(sc, 0x15, 0x00B1);
15777         MP_WritePhyUshort(sc, 0x19, 0x7e00);
15778         MP_WritePhyUshort(sc, 0x15, 0x00B2);
15779         MP_WritePhyUshort(sc, 0x19, 0x72B0);
15780         MP_WritePhyUshort(sc, 0x15, 0x00B3);
15781         MP_WritePhyUshort(sc, 0x19, 0x7F00);
15782         MP_WritePhyUshort(sc, 0x15, 0x00B4);
15783         MP_WritePhyUshort(sc, 0x19, 0x73B0);
15784         MP_WritePhyUshort(sc, 0x15, 0x0101);
15785         MP_WritePhyUshort(sc, 0x19, 0x0005);
15786         MP_WritePhyUshort(sc, 0x15, 0x0103);
15787         MP_WritePhyUshort(sc, 0x19, 0x0003);
15788         MP_WritePhyUshort(sc, 0x15, 0x0105);
15789         MP_WritePhyUshort(sc, 0x19, 0x30FD);
15790         MP_WritePhyUshort(sc, 0x15, 0x0106);
15791         MP_WritePhyUshort(sc, 0x19, 0x9DF7);
15792         MP_WritePhyUshort(sc, 0x15, 0x0107);
15793         MP_WritePhyUshort(sc, 0x19, 0x30C6);
15794         MP_WritePhyUshort(sc, 0x15, 0x0098);
15795         MP_WritePhyUshort(sc, 0x19, 0x7c0b);
15796         MP_WritePhyUshort(sc, 0x15, 0x0099);
15797         MP_WritePhyUshort(sc, 0x19, 0x6c0b);
15798         MP_WritePhyUshort(sc, 0x15, 0x00eb);
15799         MP_WritePhyUshort(sc, 0x19, 0x6c0b);
15800         MP_WritePhyUshort(sc, 0x15, 0x00f8);
15801         MP_WritePhyUshort(sc, 0x19, 0x6f0b);
15802         MP_WritePhyUshort(sc, 0x15, 0x00fe);
15803         MP_WritePhyUshort(sc, 0x19, 0x6f0f);
15804         MP_WritePhyUshort(sc, 0x15, 0x00db);
15805         MP_WritePhyUshort(sc, 0x19, 0x6f09);
15806         MP_WritePhyUshort(sc, 0x15, 0x00dc);
15807         MP_WritePhyUshort(sc, 0x19, 0xaefd);
15808         MP_WritePhyUshort(sc, 0x15, 0x00dd);
15809         MP_WritePhyUshort(sc, 0x19, 0x6f0b);
15810         MP_WritePhyUshort(sc, 0x15, 0x00de);
15811         MP_WritePhyUshort(sc, 0x19, 0xc60b);
15812         MP_WritePhyUshort(sc, 0x15, 0x00df);
15813         MP_WritePhyUshort(sc, 0x19, 0x00fa);
15814         MP_WritePhyUshort(sc, 0x15, 0x00e0);
15815         MP_WritePhyUshort(sc, 0x19, 0x30e1);
15816         MP_WritePhyUshort(sc, 0x15, 0x020c);
15817         MP_WritePhyUshort(sc, 0x19, 0x3224);
15818         MP_WritePhyUshort(sc, 0x15, 0x020e);
15819         MP_WritePhyUshort(sc, 0x19, 0x9813);
15820         MP_WritePhyUshort(sc, 0x15, 0x020f);
15821         MP_WritePhyUshort(sc, 0x19, 0x7801);
15822         MP_WritePhyUshort(sc, 0x15, 0x0210);
15823         MP_WritePhyUshort(sc, 0x19, 0x930f);
15824         MP_WritePhyUshort(sc, 0x15, 0x0211);
15825         MP_WritePhyUshort(sc, 0x19, 0x9206);
15826         MP_WritePhyUshort(sc, 0x15, 0x0212);
15827         MP_WritePhyUshort(sc, 0x19, 0x4002);
15828         MP_WritePhyUshort(sc, 0x15, 0x0213);
15829         MP_WritePhyUshort(sc, 0x19, 0x7800);
15830         MP_WritePhyUshort(sc, 0x15, 0x0214);
15831         MP_WritePhyUshort(sc, 0x19, 0x588f);
15832         MP_WritePhyUshort(sc, 0x15, 0x0215);
15833         MP_WritePhyUshort(sc, 0x19, 0x5520);
15834         MP_WritePhyUshort(sc, 0x15, 0x0216);
15835         MP_WritePhyUshort(sc, 0x19, 0x3224);
15836         MP_WritePhyUshort(sc, 0x15, 0x0217);
15837         MP_WritePhyUshort(sc, 0x19, 0x4002);
15838         MP_WritePhyUshort(sc, 0x15, 0x0218);
15839         MP_WritePhyUshort(sc, 0x19, 0x7800);
15840         MP_WritePhyUshort(sc, 0x15, 0x0219);
15841         MP_WritePhyUshort(sc, 0x19, 0x588d);
15842         MP_WritePhyUshort(sc, 0x15, 0x021a);
15843         MP_WritePhyUshort(sc, 0x19, 0x5540);
15844         MP_WritePhyUshort(sc, 0x15, 0x021b);
15845         MP_WritePhyUshort(sc, 0x19, 0x9e03);
15846         MP_WritePhyUshort(sc, 0x15, 0x021c);
15847         MP_WritePhyUshort(sc, 0x19, 0x7c40);
15848         MP_WritePhyUshort(sc, 0x15, 0x021d);
15849         MP_WritePhyUshort(sc, 0x19, 0x6840);
15850         MP_WritePhyUshort(sc, 0x15, 0x021e);
15851         MP_WritePhyUshort(sc, 0x19, 0x3224);
15852         MP_WritePhyUshort(sc, 0x15, 0x021f);
15853         MP_WritePhyUshort(sc, 0x19, 0x4002);
15854         MP_WritePhyUshort(sc, 0x15, 0x0220);
15855         MP_WritePhyUshort(sc, 0x19, 0x3224);
15856         MP_WritePhyUshort(sc, 0x15, 0x0221);
15857         MP_WritePhyUshort(sc, 0x19, 0x9e03);
15858         MP_WritePhyUshort(sc, 0x15, 0x0222);
15859         MP_WritePhyUshort(sc, 0x19, 0x7c40);
15860         MP_WritePhyUshort(sc, 0x15, 0x0223);
15861         MP_WritePhyUshort(sc, 0x19, 0x6840);
15862         MP_WritePhyUshort(sc, 0x15, 0x0224);
15863         MP_WritePhyUshort(sc, 0x19, 0x7800);
15864         MP_WritePhyUshort(sc, 0x15, 0x0225);
15865         MP_WritePhyUshort(sc, 0x19, 0x3231);
15866         MP_WritePhyUshort(sc, 0x15, 0x0000);
15867         MP_WritePhyUshort(sc, 0x16, 0x0306);
15868         MP_WritePhyUshort(sc, 0x16, 0x0300);
15869         MP_WritePhyUshort(sc, 0x1f, 0x0002);
15870         MP_WritePhyUshort(sc, 0x1f, 0x0000);
15871         MP_WritePhyUshort(sc, 0x1f, 0x0000);
15872         MP_WritePhyUshort(sc, 0x17, 0x2160);
15873         MP_WritePhyUshort(sc, 0x1f, 0x0007);
15874         MP_WritePhyUshort(sc, 0x1e, 0x0040);
15875         MP_WritePhyUshort(sc, 0x18, 0x0004);
15876         MP_WritePhyUshort(sc, 0x18, 0x09d4);
15877         MP_WritePhyUshort(sc, 0x19, 0x4000);
15878         MP_WritePhyUshort(sc, 0x18, 0x09e4);
15879         MP_WritePhyUshort(sc, 0x19, 0x0800);
15880         MP_WritePhyUshort(sc, 0x18, 0x09f4);
15881         MP_WritePhyUshort(sc, 0x19, 0xff00);
15882         MP_WritePhyUshort(sc, 0x18, 0x0a04);
15883         MP_WritePhyUshort(sc, 0x19, 0x4000);
15884         MP_WritePhyUshort(sc, 0x18, 0x0a14);
15885         MP_WritePhyUshort(sc, 0x19, 0x0c00);
15886         MP_WritePhyUshort(sc, 0x18, 0x0a24);
15887         MP_WritePhyUshort(sc, 0x19, 0xff00);
15888         MP_WritePhyUshort(sc, 0x18, 0x0a74);
15889         MP_WritePhyUshort(sc, 0x19, 0xf600);
15890         MP_WritePhyUshort(sc, 0x18, 0x1a24);
15891         MP_WritePhyUshort(sc, 0x19, 0x7d00);
15892         MP_WritePhyUshort(sc, 0x18, 0x1a64);
15893         MP_WritePhyUshort(sc, 0x19, 0x0500);
15894         MP_WritePhyUshort(sc, 0x18, 0x1a74);
15895         MP_WritePhyUshort(sc, 0x19, 0x9500);
15896         MP_WritePhyUshort(sc, 0x18, 0x1a84);
15897         MP_WritePhyUshort(sc, 0x19, 0x8000);
15898         MP_WritePhyUshort(sc, 0x18, 0x1a94);
15899         MP_WritePhyUshort(sc, 0x19, 0x7d00);
15900         MP_WritePhyUshort(sc, 0x18, 0x1aa4);
15901         MP_WritePhyUshort(sc, 0x19, 0x9600);
15902         MP_WritePhyUshort(sc, 0x18, 0x1ac4);
15903         MP_WritePhyUshort(sc, 0x19, 0x4000);
15904         MP_WritePhyUshort(sc, 0x18, 0x1ad4);
15905         MP_WritePhyUshort(sc, 0x19, 0x0800);
15906         MP_WritePhyUshort(sc, 0x18, 0x1af4);
15907         MP_WritePhyUshort(sc, 0x19, 0xc400);
15908         MP_WritePhyUshort(sc, 0x18, 0x1b04);
15909         MP_WritePhyUshort(sc, 0x19, 0x4000);
15910         MP_WritePhyUshort(sc, 0x18, 0x1b14);
15911         MP_WritePhyUshort(sc, 0x19, 0x0800);
15912         MP_WritePhyUshort(sc, 0x18, 0x1b24);
15913         MP_WritePhyUshort(sc, 0x19, 0xfd00);
15914         MP_WritePhyUshort(sc, 0x18, 0x1b34);
15915         MP_WritePhyUshort(sc, 0x19, 0x4000);
15916         MP_WritePhyUshort(sc, 0x18, 0x1b44);
15917         MP_WritePhyUshort(sc, 0x19, 0x0400);
15918         MP_WritePhyUshort(sc, 0x18, 0x1b94);
15919         MP_WritePhyUshort(sc, 0x19, 0xf100);
15920         MP_WritePhyUshort(sc, 0x1f, 0x0000);
15921         MP_WritePhyUshort(sc, 0x17, 0x2100);
15922         MP_WritePhyUshort(sc, 0x1f, 0x0007);
15923         MP_WritePhyUshort(sc, 0x1e, 0x0040);
15924         MP_WritePhyUshort(sc, 0x18, 0x0000);
15925         MP_WritePhyUshort(sc, 0x1f, 0x0000);
15926         MP_WritePhyUshort(sc, 0x1f, 0x0005);
15927         MP_WritePhyUshort(sc, 0x05, 0xfff6);
15928         MP_WritePhyUshort(sc, 0x06, 0x0080);
15929         MP_WritePhyUshort(sc, 0x05, 0x8000);
15930         MP_WritePhyUshort(sc, 0x06, 0x0280);
15931         MP_WritePhyUshort(sc, 0x06, 0x48f7);
15932         MP_WritePhyUshort(sc, 0x06, 0x00e0);
15933         MP_WritePhyUshort(sc, 0x06, 0xfff7);
15934         MP_WritePhyUshort(sc, 0x06, 0xa080);
15935         MP_WritePhyUshort(sc, 0x06, 0x02ae);
15936         MP_WritePhyUshort(sc, 0x06, 0xf602);
15937         MP_WritePhyUshort(sc, 0x06, 0x0115);
15938         MP_WritePhyUshort(sc, 0x06, 0x0201);
15939         MP_WritePhyUshort(sc, 0x06, 0x2202);
15940         MP_WritePhyUshort(sc, 0x06, 0x80a0);
15941         MP_WritePhyUshort(sc, 0x06, 0x0201);
15942         MP_WritePhyUshort(sc, 0x06, 0x3f02);
15943         MP_WritePhyUshort(sc, 0x06, 0x0159);
15944         MP_WritePhyUshort(sc, 0x06, 0x0280);
15945         MP_WritePhyUshort(sc, 0x06, 0xbd02);
15946         MP_WritePhyUshort(sc, 0x06, 0x80da);
15947         MP_WritePhyUshort(sc, 0x06, 0xe08b);
15948         MP_WritePhyUshort(sc, 0x06, 0x88e1);
15949         MP_WritePhyUshort(sc, 0x06, 0x8b89);
15950         MP_WritePhyUshort(sc, 0x06, 0x1e01);
15951         MP_WritePhyUshort(sc, 0x06, 0xe18b);
15952         MP_WritePhyUshort(sc, 0x06, 0x8a1e);
15953         MP_WritePhyUshort(sc, 0x06, 0x01e1);
15954         MP_WritePhyUshort(sc, 0x06, 0x8b8b);
15955         MP_WritePhyUshort(sc, 0x06, 0x1e01);
15956         MP_WritePhyUshort(sc, 0x06, 0xe18b);
15957         MP_WritePhyUshort(sc, 0x06, 0x8c1e);
15958         MP_WritePhyUshort(sc, 0x06, 0x01e1);
15959         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
15960         MP_WritePhyUshort(sc, 0x06, 0x1e01);
15961         MP_WritePhyUshort(sc, 0x06, 0xe18b);
15962         MP_WritePhyUshort(sc, 0x06, 0x8e1e);
15963         MP_WritePhyUshort(sc, 0x06, 0x01a0);
15964         MP_WritePhyUshort(sc, 0x06, 0x00c7);
15965         MP_WritePhyUshort(sc, 0x06, 0xaebb);
15966         MP_WritePhyUshort(sc, 0x06, 0xd481);
15967         MP_WritePhyUshort(sc, 0x06, 0xd2e4);
15968         MP_WritePhyUshort(sc, 0x06, 0x8b92);
15969         MP_WritePhyUshort(sc, 0x06, 0xe58b);
15970         MP_WritePhyUshort(sc, 0x06, 0x93d1);
15971         MP_WritePhyUshort(sc, 0x06, 0x03bf);
15972         MP_WritePhyUshort(sc, 0x06, 0x859e);
15973         MP_WritePhyUshort(sc, 0x06, 0x0237);
15974         MP_WritePhyUshort(sc, 0x06, 0x23d1);
15975         MP_WritePhyUshort(sc, 0x06, 0x02bf);
15976         MP_WritePhyUshort(sc, 0x06, 0x85a1);
15977         MP_WritePhyUshort(sc, 0x06, 0x0237);
15978         MP_WritePhyUshort(sc, 0x06, 0x23ee);
15979         MP_WritePhyUshort(sc, 0x06, 0x8608);
15980         MP_WritePhyUshort(sc, 0x06, 0x03ee);
15981         MP_WritePhyUshort(sc, 0x06, 0x860a);
15982         MP_WritePhyUshort(sc, 0x06, 0x60ee);
15983         MP_WritePhyUshort(sc, 0x06, 0x8610);
15984         MP_WritePhyUshort(sc, 0x06, 0x00ee);
15985         MP_WritePhyUshort(sc, 0x06, 0x8611);
15986         MP_WritePhyUshort(sc, 0x06, 0x00ee);
15987         MP_WritePhyUshort(sc, 0x06, 0x8abe);
15988         MP_WritePhyUshort(sc, 0x06, 0x07ee);
15989         MP_WritePhyUshort(sc, 0x06, 0x8abf);
15990         MP_WritePhyUshort(sc, 0x06, 0x73ee);
15991         MP_WritePhyUshort(sc, 0x06, 0x8a95);
15992         MP_WritePhyUshort(sc, 0x06, 0x02bf);
15993         MP_WritePhyUshort(sc, 0x06, 0x8b88);
15994         MP_WritePhyUshort(sc, 0x06, 0xec00);
15995         MP_WritePhyUshort(sc, 0x06, 0x19a9);
15996         MP_WritePhyUshort(sc, 0x06, 0x8b90);
15997         MP_WritePhyUshort(sc, 0x06, 0xf9ee);
15998         MP_WritePhyUshort(sc, 0x06, 0xfff6);
15999         MP_WritePhyUshort(sc, 0x06, 0x00ee);
16000         MP_WritePhyUshort(sc, 0x06, 0xfff7);
16001         MP_WritePhyUshort(sc, 0x06, 0xfed1);
16002         MP_WritePhyUshort(sc, 0x06, 0x00bf);
16003         MP_WritePhyUshort(sc, 0x06, 0x8595);
16004         MP_WritePhyUshort(sc, 0x06, 0x0237);
16005         MP_WritePhyUshort(sc, 0x06, 0x23d1);
16006         MP_WritePhyUshort(sc, 0x06, 0x01bf);
16007         MP_WritePhyUshort(sc, 0x06, 0x8598);
16008         MP_WritePhyUshort(sc, 0x06, 0x0237);
16009         MP_WritePhyUshort(sc, 0x06, 0x2304);
16010         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
16011         MP_WritePhyUshort(sc, 0x06, 0x8b8a);
16012         MP_WritePhyUshort(sc, 0x06, 0xad20);
16013         MP_WritePhyUshort(sc, 0x06, 0x14ee);
16014         MP_WritePhyUshort(sc, 0x06, 0x8b8a);
16015         MP_WritePhyUshort(sc, 0x06, 0x0002);
16016         MP_WritePhyUshort(sc, 0x06, 0x1f9a);
16017         MP_WritePhyUshort(sc, 0x06, 0xe0e4);
16018         MP_WritePhyUshort(sc, 0x06, 0x26e1);
16019         MP_WritePhyUshort(sc, 0x06, 0xe427);
16020         MP_WritePhyUshort(sc, 0x06, 0xeee4);
16021         MP_WritePhyUshort(sc, 0x06, 0x2623);
16022         MP_WritePhyUshort(sc, 0x06, 0xe5e4);
16023         MP_WritePhyUshort(sc, 0x06, 0x27fc);
16024         MP_WritePhyUshort(sc, 0x06, 0x04f8);
16025         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16026         MP_WritePhyUshort(sc, 0x06, 0x8dad);
16027         MP_WritePhyUshort(sc, 0x06, 0x2014);
16028         MP_WritePhyUshort(sc, 0x06, 0xee8b);
16029         MP_WritePhyUshort(sc, 0x06, 0x8d00);
16030         MP_WritePhyUshort(sc, 0x06, 0xe08a);
16031         MP_WritePhyUshort(sc, 0x06, 0x5a78);
16032         MP_WritePhyUshort(sc, 0x06, 0x039e);
16033         MP_WritePhyUshort(sc, 0x06, 0x0902);
16034         MP_WritePhyUshort(sc, 0x06, 0x05db);
16035         MP_WritePhyUshort(sc, 0x06, 0x0282);
16036         MP_WritePhyUshort(sc, 0x06, 0x7b02);
16037         MP_WritePhyUshort(sc, 0x06, 0x3231);
16038         MP_WritePhyUshort(sc, 0x06, 0xfc04);
16039         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
16040         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16041         MP_WritePhyUshort(sc, 0x06, 0xad20);
16042         MP_WritePhyUshort(sc, 0x06, 0x1df6);
16043         MP_WritePhyUshort(sc, 0x06, 0x20e4);
16044         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16045         MP_WritePhyUshort(sc, 0x06, 0x0281);
16046         MP_WritePhyUshort(sc, 0x06, 0x5c02);
16047         MP_WritePhyUshort(sc, 0x06, 0x2bcb);
16048         MP_WritePhyUshort(sc, 0x06, 0x022d);
16049         MP_WritePhyUshort(sc, 0x06, 0x2902);
16050         MP_WritePhyUshort(sc, 0x06, 0x03b4);
16051         MP_WritePhyUshort(sc, 0x06, 0x0285);
16052         MP_WritePhyUshort(sc, 0x06, 0x6402);
16053         MP_WritePhyUshort(sc, 0x06, 0x2eca);
16054         MP_WritePhyUshort(sc, 0x06, 0x0284);
16055         MP_WritePhyUshort(sc, 0x06, 0xcd02);
16056         MP_WritePhyUshort(sc, 0x06, 0x046f);
16057         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16058         MP_WritePhyUshort(sc, 0x06, 0x8ead);
16059         MP_WritePhyUshort(sc, 0x06, 0x210b);
16060         MP_WritePhyUshort(sc, 0x06, 0xf621);
16061         MP_WritePhyUshort(sc, 0x06, 0xe48b);
16062         MP_WritePhyUshort(sc, 0x06, 0x8e02);
16063         MP_WritePhyUshort(sc, 0x06, 0x8520);
16064         MP_WritePhyUshort(sc, 0x06, 0x021b);
16065         MP_WritePhyUshort(sc, 0x06, 0xe8e0);
16066         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16067         MP_WritePhyUshort(sc, 0x06, 0xad22);
16068         MP_WritePhyUshort(sc, 0x06, 0x05f6);
16069         MP_WritePhyUshort(sc, 0x06, 0x22e4);
16070         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16071         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16072         MP_WritePhyUshort(sc, 0x06, 0x8ead);
16073         MP_WritePhyUshort(sc, 0x06, 0x2308);
16074         MP_WritePhyUshort(sc, 0x06, 0xf623);
16075         MP_WritePhyUshort(sc, 0x06, 0xe48b);
16076         MP_WritePhyUshort(sc, 0x06, 0x8e02);
16077         MP_WritePhyUshort(sc, 0x06, 0x311c);
16078         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16079         MP_WritePhyUshort(sc, 0x06, 0x8ead);
16080         MP_WritePhyUshort(sc, 0x06, 0x2405);
16081         MP_WritePhyUshort(sc, 0x06, 0xf624);
16082         MP_WritePhyUshort(sc, 0x06, 0xe48b);
16083         MP_WritePhyUshort(sc, 0x06, 0x8ee0);
16084         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16085         MP_WritePhyUshort(sc, 0x06, 0xad25);
16086         MP_WritePhyUshort(sc, 0x06, 0x05f6);
16087         MP_WritePhyUshort(sc, 0x06, 0x25e4);
16088         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16089         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16090         MP_WritePhyUshort(sc, 0x06, 0x8ead);
16091         MP_WritePhyUshort(sc, 0x06, 0x2608);
16092         MP_WritePhyUshort(sc, 0x06, 0xf626);
16093         MP_WritePhyUshort(sc, 0x06, 0xe48b);
16094         MP_WritePhyUshort(sc, 0x06, 0x8e02);
16095         MP_WritePhyUshort(sc, 0x06, 0x2df5);
16096         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16097         MP_WritePhyUshort(sc, 0x06, 0x8ead);
16098         MP_WritePhyUshort(sc, 0x06, 0x2705);
16099         MP_WritePhyUshort(sc, 0x06, 0xf627);
16100         MP_WritePhyUshort(sc, 0x06, 0xe48b);
16101         MP_WritePhyUshort(sc, 0x06, 0x8e02);
16102         MP_WritePhyUshort(sc, 0x06, 0x037a);
16103         MP_WritePhyUshort(sc, 0x06, 0xfc04);
16104         MP_WritePhyUshort(sc, 0x06, 0xf8f9);
16105         MP_WritePhyUshort(sc, 0x06, 0xfaef);
16106         MP_WritePhyUshort(sc, 0x06, 0x69e0);
16107         MP_WritePhyUshort(sc, 0x06, 0x8b87);
16108         MP_WritePhyUshort(sc, 0x06, 0xad20);
16109         MP_WritePhyUshort(sc, 0x06, 0x65d2);
16110         MP_WritePhyUshort(sc, 0x06, 0x00bf);
16111         MP_WritePhyUshort(sc, 0x06, 0x2fe9);
16112         MP_WritePhyUshort(sc, 0x06, 0x0236);
16113         MP_WritePhyUshort(sc, 0x06, 0xf61e);
16114         MP_WritePhyUshort(sc, 0x06, 0x21bf);
16115         MP_WritePhyUshort(sc, 0x06, 0x2ff5);
16116         MP_WritePhyUshort(sc, 0x06, 0x0236);
16117         MP_WritePhyUshort(sc, 0x06, 0xf60c);
16118         MP_WritePhyUshort(sc, 0x06, 0x111e);
16119         MP_WritePhyUshort(sc, 0x06, 0x21bf);
16120         MP_WritePhyUshort(sc, 0x06, 0x2ff8);
16121         MP_WritePhyUshort(sc, 0x06, 0x0236);
16122         MP_WritePhyUshort(sc, 0x06, 0xf60c);
16123         MP_WritePhyUshort(sc, 0x06, 0x121e);
16124         MP_WritePhyUshort(sc, 0x06, 0x21bf);
16125         MP_WritePhyUshort(sc, 0x06, 0x2ffb);
16126         MP_WritePhyUshort(sc, 0x06, 0x0236);
16127         MP_WritePhyUshort(sc, 0x06, 0xf60c);
16128         MP_WritePhyUshort(sc, 0x06, 0x131e);
16129         MP_WritePhyUshort(sc, 0x06, 0x21bf);
16130         MP_WritePhyUshort(sc, 0x06, 0x1f97);
16131         MP_WritePhyUshort(sc, 0x06, 0x0236);
16132         MP_WritePhyUshort(sc, 0x06, 0xf60c);
16133         MP_WritePhyUshort(sc, 0x06, 0x141e);
16134         MP_WritePhyUshort(sc, 0x06, 0x21bf);
16135         MP_WritePhyUshort(sc, 0x06, 0x859b);
16136         MP_WritePhyUshort(sc, 0x06, 0x0236);
16137         MP_WritePhyUshort(sc, 0x06, 0xf60c);
16138         MP_WritePhyUshort(sc, 0x06, 0x161e);
16139         MP_WritePhyUshort(sc, 0x06, 0x21e0);
16140         MP_WritePhyUshort(sc, 0x06, 0x8a8c);
16141         MP_WritePhyUshort(sc, 0x06, 0x1f02);
16142         MP_WritePhyUshort(sc, 0x06, 0x9e22);
16143         MP_WritePhyUshort(sc, 0x06, 0xe68a);
16144         MP_WritePhyUshort(sc, 0x06, 0x8cad);
16145         MP_WritePhyUshort(sc, 0x06, 0x3114);
16146         MP_WritePhyUshort(sc, 0x06, 0xad30);
16147         MP_WritePhyUshort(sc, 0x06, 0x11ef);
16148         MP_WritePhyUshort(sc, 0x06, 0x0258);
16149         MP_WritePhyUshort(sc, 0x06, 0x0c9e);
16150         MP_WritePhyUshort(sc, 0x06, 0x07ad);
16151         MP_WritePhyUshort(sc, 0x06, 0x3608);
16152         MP_WritePhyUshort(sc, 0x06, 0x5a30);
16153         MP_WritePhyUshort(sc, 0x06, 0x9f04);
16154         MP_WritePhyUshort(sc, 0x06, 0xd101);
16155         MP_WritePhyUshort(sc, 0x06, 0xae02);
16156         MP_WritePhyUshort(sc, 0x06, 0xd100);
16157         MP_WritePhyUshort(sc, 0x06, 0xbf2f);
16158         MP_WritePhyUshort(sc, 0x06, 0xf202);
16159         MP_WritePhyUshort(sc, 0x06, 0x3723);
16160         MP_WritePhyUshort(sc, 0x06, 0xef96);
16161         MP_WritePhyUshort(sc, 0x06, 0xfefd);
16162         MP_WritePhyUshort(sc, 0x06, 0xfc04);
16163         MP_WritePhyUshort(sc, 0x06, 0xf8f9);
16164         MP_WritePhyUshort(sc, 0x06, 0xface);
16165         MP_WritePhyUshort(sc, 0x06, 0xfaef);
16166         MP_WritePhyUshort(sc, 0x06, 0x69fa);
16167         MP_WritePhyUshort(sc, 0x06, 0xd401);
16168         MP_WritePhyUshort(sc, 0x06, 0x55b4);
16169         MP_WritePhyUshort(sc, 0x06, 0xfebf);
16170         MP_WritePhyUshort(sc, 0x06, 0x85a7);
16171         MP_WritePhyUshort(sc, 0x06, 0x0236);
16172         MP_WritePhyUshort(sc, 0x06, 0xf6ac);
16173         MP_WritePhyUshort(sc, 0x06, 0x280b);
16174         MP_WritePhyUshort(sc, 0x06, 0xbf85);
16175         MP_WritePhyUshort(sc, 0x06, 0xa402);
16176         MP_WritePhyUshort(sc, 0x06, 0x36f6);
16177         MP_WritePhyUshort(sc, 0x06, 0xac28);
16178         MP_WritePhyUshort(sc, 0x06, 0x49ae);
16179         MP_WritePhyUshort(sc, 0x06, 0x64bf);
16180         MP_WritePhyUshort(sc, 0x06, 0x85a4);
16181         MP_WritePhyUshort(sc, 0x06, 0x0236);
16182         MP_WritePhyUshort(sc, 0x06, 0xf6ac);
16183         MP_WritePhyUshort(sc, 0x06, 0x285b);
16184         MP_WritePhyUshort(sc, 0x06, 0xd000);
16185         MP_WritePhyUshort(sc, 0x06, 0x0282);
16186         MP_WritePhyUshort(sc, 0x06, 0x60ac);
16187         MP_WritePhyUshort(sc, 0x06, 0x2105);
16188         MP_WritePhyUshort(sc, 0x06, 0xac22);
16189         MP_WritePhyUshort(sc, 0x06, 0x02ae);
16190         MP_WritePhyUshort(sc, 0x06, 0x4ebf);
16191         MP_WritePhyUshort(sc, 0x06, 0xe0c4);
16192         MP_WritePhyUshort(sc, 0x06, 0xbe86);
16193         MP_WritePhyUshort(sc, 0x06, 0x14d2);
16194         MP_WritePhyUshort(sc, 0x06, 0x04d8);
16195         MP_WritePhyUshort(sc, 0x06, 0x19d9);
16196         MP_WritePhyUshort(sc, 0x06, 0x1907);
16197         MP_WritePhyUshort(sc, 0x06, 0xdc19);
16198         MP_WritePhyUshort(sc, 0x06, 0xdd19);
16199         MP_WritePhyUshort(sc, 0x06, 0x0789);
16200         MP_WritePhyUshort(sc, 0x06, 0x89ef);
16201         MP_WritePhyUshort(sc, 0x06, 0x645e);
16202         MP_WritePhyUshort(sc, 0x06, 0x07ff);
16203         MP_WritePhyUshort(sc, 0x06, 0x0d65);
16204         MP_WritePhyUshort(sc, 0x06, 0x5cf8);
16205         MP_WritePhyUshort(sc, 0x06, 0x001e);
16206         MP_WritePhyUshort(sc, 0x06, 0x46dc);
16207         MP_WritePhyUshort(sc, 0x06, 0x19dd);
16208         MP_WritePhyUshort(sc, 0x06, 0x19b2);
16209         MP_WritePhyUshort(sc, 0x06, 0xe2d4);
16210         MP_WritePhyUshort(sc, 0x06, 0x0001);
16211         MP_WritePhyUshort(sc, 0x06, 0xbf85);
16212         MP_WritePhyUshort(sc, 0x06, 0xa402);
16213         MP_WritePhyUshort(sc, 0x06, 0x3723);
16214         MP_WritePhyUshort(sc, 0x06, 0xae1d);
16215         MP_WritePhyUshort(sc, 0x06, 0xbee0);
16216         MP_WritePhyUshort(sc, 0x06, 0xc4bf);
16217         MP_WritePhyUshort(sc, 0x06, 0x8614);
16218         MP_WritePhyUshort(sc, 0x06, 0xd204);
16219         MP_WritePhyUshort(sc, 0x06, 0xd819);
16220         MP_WritePhyUshort(sc, 0x06, 0xd919);
16221         MP_WritePhyUshort(sc, 0x06, 0x07dc);
16222         MP_WritePhyUshort(sc, 0x06, 0x19dd);
16223         MP_WritePhyUshort(sc, 0x06, 0x1907);
16224         MP_WritePhyUshort(sc, 0x06, 0xb2f4);
16225         MP_WritePhyUshort(sc, 0x06, 0xd400);
16226         MP_WritePhyUshort(sc, 0x06, 0x00bf);
16227         MP_WritePhyUshort(sc, 0x06, 0x85a4);
16228         MP_WritePhyUshort(sc, 0x06, 0x0237);
16229         MP_WritePhyUshort(sc, 0x06, 0x23fe);
16230         MP_WritePhyUshort(sc, 0x06, 0xef96);
16231         MP_WritePhyUshort(sc, 0x06, 0xfec6);
16232         MP_WritePhyUshort(sc, 0x06, 0xfefd);
16233         MP_WritePhyUshort(sc, 0x06, 0xfc05);
16234         MP_WritePhyUshort(sc, 0x06, 0xf9e2);
16235         MP_WritePhyUshort(sc, 0x06, 0xe0ea);
16236         MP_WritePhyUshort(sc, 0x06, 0xe3e0);
16237         MP_WritePhyUshort(sc, 0x06, 0xeb5a);
16238         MP_WritePhyUshort(sc, 0x06, 0x070c);
16239         MP_WritePhyUshort(sc, 0x06, 0x031e);
16240         MP_WritePhyUshort(sc, 0x06, 0x20e6);
16241         MP_WritePhyUshort(sc, 0x06, 0xe0ea);
16242         MP_WritePhyUshort(sc, 0x06, 0xe7e0);
16243         MP_WritePhyUshort(sc, 0x06, 0xebe0);
16244         MP_WritePhyUshort(sc, 0x06, 0xe0fc);
16245         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
16246         MP_WritePhyUshort(sc, 0x06, 0xfdfd);
16247         MP_WritePhyUshort(sc, 0x06, 0x04f8);
16248         MP_WritePhyUshort(sc, 0x06, 0xf9e0);
16249         MP_WritePhyUshort(sc, 0x06, 0x8b81);
16250         MP_WritePhyUshort(sc, 0x06, 0xac26);
16251         MP_WritePhyUshort(sc, 0x06, 0x1ae0);
16252         MP_WritePhyUshort(sc, 0x06, 0x8b81);
16253         MP_WritePhyUshort(sc, 0x06, 0xac21);
16254         MP_WritePhyUshort(sc, 0x06, 0x14e0);
16255         MP_WritePhyUshort(sc, 0x06, 0x8b85);
16256         MP_WritePhyUshort(sc, 0x06, 0xac20);
16257         MP_WritePhyUshort(sc, 0x06, 0x0ee0);
16258         MP_WritePhyUshort(sc, 0x06, 0x8b85);
16259         MP_WritePhyUshort(sc, 0x06, 0xac23);
16260         MP_WritePhyUshort(sc, 0x06, 0x08e0);
16261         MP_WritePhyUshort(sc, 0x06, 0x8b87);
16262         MP_WritePhyUshort(sc, 0x06, 0xac24);
16263         MP_WritePhyUshort(sc, 0x06, 0x02ae);
16264         MP_WritePhyUshort(sc, 0x06, 0x3802);
16265         MP_WritePhyUshort(sc, 0x06, 0x1ab5);
16266         MP_WritePhyUshort(sc, 0x06, 0xeee4);
16267         MP_WritePhyUshort(sc, 0x06, 0x1c04);
16268         MP_WritePhyUshort(sc, 0x06, 0xeee4);
16269         MP_WritePhyUshort(sc, 0x06, 0x1d04);
16270         MP_WritePhyUshort(sc, 0x06, 0xe2e0);
16271         MP_WritePhyUshort(sc, 0x06, 0x7ce3);
16272         MP_WritePhyUshort(sc, 0x06, 0xe07d);
16273         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
16274         MP_WritePhyUshort(sc, 0x06, 0x38e1);
16275         MP_WritePhyUshort(sc, 0x06, 0xe039);
16276         MP_WritePhyUshort(sc, 0x06, 0xad2e);
16277         MP_WritePhyUshort(sc, 0x06, 0x1bad);
16278         MP_WritePhyUshort(sc, 0x06, 0x390d);
16279         MP_WritePhyUshort(sc, 0x06, 0xd101);
16280         MP_WritePhyUshort(sc, 0x06, 0xbf21);
16281         MP_WritePhyUshort(sc, 0x06, 0xd502);
16282         MP_WritePhyUshort(sc, 0x06, 0x3723);
16283         MP_WritePhyUshort(sc, 0x06, 0x0282);
16284         MP_WritePhyUshort(sc, 0x06, 0xd8ae);
16285         MP_WritePhyUshort(sc, 0x06, 0x0bac);
16286         MP_WritePhyUshort(sc, 0x06, 0x3802);
16287         MP_WritePhyUshort(sc, 0x06, 0xae06);
16288         MP_WritePhyUshort(sc, 0x06, 0x0283);
16289         MP_WritePhyUshort(sc, 0x06, 0x1802);
16290         MP_WritePhyUshort(sc, 0x06, 0x8360);
16291         MP_WritePhyUshort(sc, 0x06, 0x021a);
16292         MP_WritePhyUshort(sc, 0x06, 0xc6fd);
16293         MP_WritePhyUshort(sc, 0x06, 0xfc04);
16294         MP_WritePhyUshort(sc, 0x06, 0xf8e1);
16295         MP_WritePhyUshort(sc, 0x06, 0x8af4);
16296         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16297         MP_WritePhyUshort(sc, 0x06, 0x81ad);
16298         MP_WritePhyUshort(sc, 0x06, 0x2605);
16299         MP_WritePhyUshort(sc, 0x06, 0x0222);
16300         MP_WritePhyUshort(sc, 0x06, 0xa4f7);
16301         MP_WritePhyUshort(sc, 0x06, 0x28e0);
16302         MP_WritePhyUshort(sc, 0x06, 0x8b81);
16303         MP_WritePhyUshort(sc, 0x06, 0xad21);
16304         MP_WritePhyUshort(sc, 0x06, 0x0502);
16305         MP_WritePhyUshort(sc, 0x06, 0x23a9);
16306         MP_WritePhyUshort(sc, 0x06, 0xf729);
16307         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16308         MP_WritePhyUshort(sc, 0x06, 0x85ad);
16309         MP_WritePhyUshort(sc, 0x06, 0x2005);
16310         MP_WritePhyUshort(sc, 0x06, 0x0214);
16311         MP_WritePhyUshort(sc, 0x06, 0xabf7);
16312         MP_WritePhyUshort(sc, 0x06, 0x2ae0);
16313         MP_WritePhyUshort(sc, 0x06, 0x8b85);
16314         MP_WritePhyUshort(sc, 0x06, 0xad23);
16315         MP_WritePhyUshort(sc, 0x06, 0x0502);
16316         MP_WritePhyUshort(sc, 0x06, 0x12e7);
16317         MP_WritePhyUshort(sc, 0x06, 0xf72b);
16318         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16319         MP_WritePhyUshort(sc, 0x06, 0x87ad);
16320         MP_WritePhyUshort(sc, 0x06, 0x2405);
16321         MP_WritePhyUshort(sc, 0x06, 0x0283);
16322         MP_WritePhyUshort(sc, 0x06, 0xbcf7);
16323         MP_WritePhyUshort(sc, 0x06, 0x2ce5);
16324         MP_WritePhyUshort(sc, 0x06, 0x8af4);
16325         MP_WritePhyUshort(sc, 0x06, 0xfc04);
16326         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
16327         MP_WritePhyUshort(sc, 0x06, 0x8b81);
16328         MP_WritePhyUshort(sc, 0x06, 0xad26);
16329         MP_WritePhyUshort(sc, 0x06, 0x0302);
16330         MP_WritePhyUshort(sc, 0x06, 0x21e5);
16331         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16332         MP_WritePhyUshort(sc, 0x06, 0x81ad);
16333         MP_WritePhyUshort(sc, 0x06, 0x2109);
16334         MP_WritePhyUshort(sc, 0x06, 0xe08a);
16335         MP_WritePhyUshort(sc, 0x06, 0xf4ac);
16336         MP_WritePhyUshort(sc, 0x06, 0x2003);
16337         MP_WritePhyUshort(sc, 0x06, 0x0223);
16338         MP_WritePhyUshort(sc, 0x06, 0x98e0);
16339         MP_WritePhyUshort(sc, 0x06, 0x8b85);
16340         MP_WritePhyUshort(sc, 0x06, 0xad20);
16341         MP_WritePhyUshort(sc, 0x06, 0x09e0);
16342         MP_WritePhyUshort(sc, 0x06, 0x8af4);
16343         MP_WritePhyUshort(sc, 0x06, 0xac21);
16344         MP_WritePhyUshort(sc, 0x06, 0x0302);
16345         MP_WritePhyUshort(sc, 0x06, 0x13fb);
16346         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16347         MP_WritePhyUshort(sc, 0x06, 0x85ad);
16348         MP_WritePhyUshort(sc, 0x06, 0x2309);
16349         MP_WritePhyUshort(sc, 0x06, 0xe08a);
16350         MP_WritePhyUshort(sc, 0x06, 0xf4ac);
16351         MP_WritePhyUshort(sc, 0x06, 0x2203);
16352         MP_WritePhyUshort(sc, 0x06, 0x0212);
16353         MP_WritePhyUshort(sc, 0x06, 0xfae0);
16354         MP_WritePhyUshort(sc, 0x06, 0x8b87);
16355         MP_WritePhyUshort(sc, 0x06, 0xad24);
16356         MP_WritePhyUshort(sc, 0x06, 0x09e0);
16357         MP_WritePhyUshort(sc, 0x06, 0x8af4);
16358         MP_WritePhyUshort(sc, 0x06, 0xac23);
16359         MP_WritePhyUshort(sc, 0x06, 0x0302);
16360         MP_WritePhyUshort(sc, 0x06, 0x83c1);
16361         MP_WritePhyUshort(sc, 0x06, 0xfc04);
16362         MP_WritePhyUshort(sc, 0x06, 0xf8e1);
16363         MP_WritePhyUshort(sc, 0x06, 0x8af4);
16364         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16365         MP_WritePhyUshort(sc, 0x06, 0x81ad);
16366         MP_WritePhyUshort(sc, 0x06, 0x2608);
16367         MP_WritePhyUshort(sc, 0x06, 0xe083);
16368         MP_WritePhyUshort(sc, 0x06, 0xd2ad);
16369         MP_WritePhyUshort(sc, 0x06, 0x2502);
16370         MP_WritePhyUshort(sc, 0x06, 0xf628);
16371         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16372         MP_WritePhyUshort(sc, 0x06, 0x81ad);
16373         MP_WritePhyUshort(sc, 0x06, 0x210a);
16374         MP_WritePhyUshort(sc, 0x06, 0xe084);
16375         MP_WritePhyUshort(sc, 0x06, 0x0af6);
16376         MP_WritePhyUshort(sc, 0x06, 0x27a0);
16377         MP_WritePhyUshort(sc, 0x06, 0x0502);
16378         MP_WritePhyUshort(sc, 0x06, 0xf629);
16379         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16380         MP_WritePhyUshort(sc, 0x06, 0x85ad);
16381         MP_WritePhyUshort(sc, 0x06, 0x2008);
16382         MP_WritePhyUshort(sc, 0x06, 0xe08a);
16383         MP_WritePhyUshort(sc, 0x06, 0xe8ad);
16384         MP_WritePhyUshort(sc, 0x06, 0x2102);
16385         MP_WritePhyUshort(sc, 0x06, 0xf62a);
16386         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16387         MP_WritePhyUshort(sc, 0x06, 0x85ad);
16388         MP_WritePhyUshort(sc, 0x06, 0x2308);
16389         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16390         MP_WritePhyUshort(sc, 0x06, 0x20a0);
16391         MP_WritePhyUshort(sc, 0x06, 0x0302);
16392         MP_WritePhyUshort(sc, 0x06, 0xf62b);
16393         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16394         MP_WritePhyUshort(sc, 0x06, 0x87ad);
16395         MP_WritePhyUshort(sc, 0x06, 0x2408);
16396         MP_WritePhyUshort(sc, 0x06, 0xe086);
16397         MP_WritePhyUshort(sc, 0x06, 0x02a0);
16398         MP_WritePhyUshort(sc, 0x06, 0x0302);
16399         MP_WritePhyUshort(sc, 0x06, 0xf62c);
16400         MP_WritePhyUshort(sc, 0x06, 0xe58a);
16401         MP_WritePhyUshort(sc, 0x06, 0xf4a1);
16402         MP_WritePhyUshort(sc, 0x06, 0x0008);
16403         MP_WritePhyUshort(sc, 0x06, 0xd100);
16404         MP_WritePhyUshort(sc, 0x06, 0xbf21);
16405         MP_WritePhyUshort(sc, 0x06, 0xd502);
16406         MP_WritePhyUshort(sc, 0x06, 0x3723);
16407         MP_WritePhyUshort(sc, 0x06, 0xfc04);
16408         MP_WritePhyUshort(sc, 0x06, 0xee86);
16409         MP_WritePhyUshort(sc, 0x06, 0x0200);
16410         MP_WritePhyUshort(sc, 0x06, 0x04f8);
16411         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16412         MP_WritePhyUshort(sc, 0x06, 0x87ad);
16413         MP_WritePhyUshort(sc, 0x06, 0x241e);
16414         MP_WritePhyUshort(sc, 0x06, 0xe086);
16415         MP_WritePhyUshort(sc, 0x06, 0x02a0);
16416         MP_WritePhyUshort(sc, 0x06, 0x0005);
16417         MP_WritePhyUshort(sc, 0x06, 0x0283);
16418         MP_WritePhyUshort(sc, 0x06, 0xe8ae);
16419         MP_WritePhyUshort(sc, 0x06, 0xf5a0);
16420         MP_WritePhyUshort(sc, 0x06, 0x0105);
16421         MP_WritePhyUshort(sc, 0x06, 0x0283);
16422         MP_WritePhyUshort(sc, 0x06, 0xf8ae);
16423         MP_WritePhyUshort(sc, 0x06, 0x0ba0);
16424         MP_WritePhyUshort(sc, 0x06, 0x0205);
16425         MP_WritePhyUshort(sc, 0x06, 0x0284);
16426         MP_WritePhyUshort(sc, 0x06, 0x14ae);
16427         MP_WritePhyUshort(sc, 0x06, 0x03a0);
16428         MP_WritePhyUshort(sc, 0x06, 0x0300);
16429         MP_WritePhyUshort(sc, 0x06, 0xfc04);
16430         MP_WritePhyUshort(sc, 0x06, 0xf8fa);
16431         MP_WritePhyUshort(sc, 0x06, 0xef69);
16432         MP_WritePhyUshort(sc, 0x06, 0x0284);
16433         MP_WritePhyUshort(sc, 0x06, 0x2bee);
16434         MP_WritePhyUshort(sc, 0x06, 0x8602);
16435         MP_WritePhyUshort(sc, 0x06, 0x01ef);
16436         MP_WritePhyUshort(sc, 0x06, 0x96fe);
16437         MP_WritePhyUshort(sc, 0x06, 0xfc04);
16438         MP_WritePhyUshort(sc, 0x06, 0xf8ee);
16439         MP_WritePhyUshort(sc, 0x06, 0x8609);
16440         MP_WritePhyUshort(sc, 0x06, 0x0002);
16441         MP_WritePhyUshort(sc, 0x06, 0x8461);
16442         MP_WritePhyUshort(sc, 0x06, 0xfc04);
16443         MP_WritePhyUshort(sc, 0x06, 0xae10);
16444         MP_WritePhyUshort(sc, 0x06, 0x0000);
16445         MP_WritePhyUshort(sc, 0x06, 0x0000);
16446         MP_WritePhyUshort(sc, 0x06, 0x0000);
16447         MP_WritePhyUshort(sc, 0x06, 0x0000);
16448         MP_WritePhyUshort(sc, 0x06, 0x0000);
16449         MP_WritePhyUshort(sc, 0x06, 0x0000);
16450         MP_WritePhyUshort(sc, 0x06, 0x0000);
16451         MP_WritePhyUshort(sc, 0x06, 0x0000);
16452         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
16453         MP_WritePhyUshort(sc, 0x06, 0x8608);
16454         MP_WritePhyUshort(sc, 0x06, 0xe186);
16455         MP_WritePhyUshort(sc, 0x06, 0x091f);
16456         MP_WritePhyUshort(sc, 0x06, 0x019e);
16457         MP_WritePhyUshort(sc, 0x06, 0x0611);
16458         MP_WritePhyUshort(sc, 0x06, 0xe586);
16459         MP_WritePhyUshort(sc, 0x06, 0x09ae);
16460         MP_WritePhyUshort(sc, 0x06, 0x04ee);
16461         MP_WritePhyUshort(sc, 0x06, 0x8602);
16462         MP_WritePhyUshort(sc, 0x06, 0x01fc);
16463         MP_WritePhyUshort(sc, 0x06, 0x04f8);
16464         MP_WritePhyUshort(sc, 0x06, 0xf9fa);
16465         MP_WritePhyUshort(sc, 0x06, 0xef69);
16466         MP_WritePhyUshort(sc, 0x06, 0xfbbf);
16467         MP_WritePhyUshort(sc, 0x06, 0x8604);
16468         MP_WritePhyUshort(sc, 0x06, 0xef79);
16469         MP_WritePhyUshort(sc, 0x06, 0xd200);
16470         MP_WritePhyUshort(sc, 0x06, 0xd400);
16471         MP_WritePhyUshort(sc, 0x06, 0x221e);
16472         MP_WritePhyUshort(sc, 0x06, 0x02bf);
16473         MP_WritePhyUshort(sc, 0x06, 0x2fec);
16474         MP_WritePhyUshort(sc, 0x06, 0x0237);
16475         MP_WritePhyUshort(sc, 0x06, 0x23bf);
16476         MP_WritePhyUshort(sc, 0x06, 0x13f2);
16477         MP_WritePhyUshort(sc, 0x06, 0x0236);
16478         MP_WritePhyUshort(sc, 0x06, 0xf60d);
16479         MP_WritePhyUshort(sc, 0x06, 0x4559);
16480         MP_WritePhyUshort(sc, 0x06, 0x1fef);
16481         MP_WritePhyUshort(sc, 0x06, 0x97dd);
16482         MP_WritePhyUshort(sc, 0x06, 0xd308);
16483         MP_WritePhyUshort(sc, 0x06, 0x1a93);
16484         MP_WritePhyUshort(sc, 0x06, 0xdd12);
16485         MP_WritePhyUshort(sc, 0x06, 0x17a2);
16486         MP_WritePhyUshort(sc, 0x06, 0x04de);
16487         MP_WritePhyUshort(sc, 0x06, 0xffef);
16488         MP_WritePhyUshort(sc, 0x06, 0x96fe);
16489         MP_WritePhyUshort(sc, 0x06, 0xfdfc);
16490         MP_WritePhyUshort(sc, 0x06, 0x04f8);
16491         MP_WritePhyUshort(sc, 0x06, 0xf9fa);
16492         MP_WritePhyUshort(sc, 0x06, 0xef69);
16493         MP_WritePhyUshort(sc, 0x06, 0xfbee);
16494         MP_WritePhyUshort(sc, 0x06, 0x8602);
16495         MP_WritePhyUshort(sc, 0x06, 0x03d5);
16496         MP_WritePhyUshort(sc, 0x06, 0x0080);
16497         MP_WritePhyUshort(sc, 0x06, 0xbf86);
16498         MP_WritePhyUshort(sc, 0x06, 0x04ef);
16499         MP_WritePhyUshort(sc, 0x06, 0x79ef);
16500         MP_WritePhyUshort(sc, 0x06, 0x45bf);
16501         MP_WritePhyUshort(sc, 0x06, 0x2fec);
16502         MP_WritePhyUshort(sc, 0x06, 0x0237);
16503         MP_WritePhyUshort(sc, 0x06, 0x23bf);
16504         MP_WritePhyUshort(sc, 0x06, 0x13f2);
16505         MP_WritePhyUshort(sc, 0x06, 0x0236);
16506         MP_WritePhyUshort(sc, 0x06, 0xf6ad);
16507         MP_WritePhyUshort(sc, 0x06, 0x2702);
16508         MP_WritePhyUshort(sc, 0x06, 0x78ff);
16509         MP_WritePhyUshort(sc, 0x06, 0xe186);
16510         MP_WritePhyUshort(sc, 0x06, 0x0a1b);
16511         MP_WritePhyUshort(sc, 0x06, 0x01aa);
16512         MP_WritePhyUshort(sc, 0x06, 0x2eef);
16513         MP_WritePhyUshort(sc, 0x06, 0x97d9);
16514         MP_WritePhyUshort(sc, 0x06, 0x7900);
16515         MP_WritePhyUshort(sc, 0x06, 0x9e2b);
16516         MP_WritePhyUshort(sc, 0x06, 0x81dd);
16517         MP_WritePhyUshort(sc, 0x06, 0xbf85);
16518         MP_WritePhyUshort(sc, 0x06, 0xad02);
16519         MP_WritePhyUshort(sc, 0x06, 0x3723);
16520         MP_WritePhyUshort(sc, 0x06, 0xd101);
16521         MP_WritePhyUshort(sc, 0x06, 0xef02);
16522         MP_WritePhyUshort(sc, 0x06, 0x100c);
16523         MP_WritePhyUshort(sc, 0x06, 0x11b0);
16524         MP_WritePhyUshort(sc, 0x06, 0xfc0d);
16525         MP_WritePhyUshort(sc, 0x06, 0x11bf);
16526         MP_WritePhyUshort(sc, 0x06, 0x85aa);
16527         MP_WritePhyUshort(sc, 0x06, 0x0237);
16528         MP_WritePhyUshort(sc, 0x06, 0x23d1);
16529         MP_WritePhyUshort(sc, 0x06, 0x00bf);
16530         MP_WritePhyUshort(sc, 0x06, 0x85aa);
16531         MP_WritePhyUshort(sc, 0x06, 0x0237);
16532         MP_WritePhyUshort(sc, 0x06, 0x23ee);
16533         MP_WritePhyUshort(sc, 0x06, 0x8602);
16534         MP_WritePhyUshort(sc, 0x06, 0x02ae);
16535         MP_WritePhyUshort(sc, 0x06, 0x0413);
16536         MP_WritePhyUshort(sc, 0x06, 0xa38b);
16537         MP_WritePhyUshort(sc, 0x06, 0xb4d3);
16538         MP_WritePhyUshort(sc, 0x06, 0x8012);
16539         MP_WritePhyUshort(sc, 0x06, 0x17a2);
16540         MP_WritePhyUshort(sc, 0x06, 0x04ad);
16541         MP_WritePhyUshort(sc, 0x06, 0xffef);
16542         MP_WritePhyUshort(sc, 0x06, 0x96fe);
16543         MP_WritePhyUshort(sc, 0x06, 0xfdfc);
16544         MP_WritePhyUshort(sc, 0x06, 0x04f8);
16545         MP_WritePhyUshort(sc, 0x06, 0xf9e0);
16546         MP_WritePhyUshort(sc, 0x06, 0x8b85);
16547         MP_WritePhyUshort(sc, 0x06, 0xad25);
16548         MP_WritePhyUshort(sc, 0x06, 0x48e0);
16549         MP_WritePhyUshort(sc, 0x06, 0x8a96);
16550         MP_WritePhyUshort(sc, 0x06, 0xe18a);
16551         MP_WritePhyUshort(sc, 0x06, 0x977c);
16552         MP_WritePhyUshort(sc, 0x06, 0x0000);
16553         MP_WritePhyUshort(sc, 0x06, 0x9e35);
16554         MP_WritePhyUshort(sc, 0x06, 0xee8a);
16555         MP_WritePhyUshort(sc, 0x06, 0x9600);
16556         MP_WritePhyUshort(sc, 0x06, 0xee8a);
16557         MP_WritePhyUshort(sc, 0x06, 0x9700);
16558         MP_WritePhyUshort(sc, 0x06, 0xe08a);
16559         MP_WritePhyUshort(sc, 0x06, 0xbee1);
16560         MP_WritePhyUshort(sc, 0x06, 0x8abf);
16561         MP_WritePhyUshort(sc, 0x06, 0xe286);
16562         MP_WritePhyUshort(sc, 0x06, 0x10e3);
16563         MP_WritePhyUshort(sc, 0x06, 0x8611);
16564         MP_WritePhyUshort(sc, 0x06, 0x0236);
16565         MP_WritePhyUshort(sc, 0x06, 0x1aad);
16566         MP_WritePhyUshort(sc, 0x06, 0x2012);
16567         MP_WritePhyUshort(sc, 0x06, 0xee8a);
16568         MP_WritePhyUshort(sc, 0x06, 0x9603);
16569         MP_WritePhyUshort(sc, 0x06, 0xee8a);
16570         MP_WritePhyUshort(sc, 0x06, 0x97b7);
16571         MP_WritePhyUshort(sc, 0x06, 0xee86);
16572         MP_WritePhyUshort(sc, 0x06, 0x1000);
16573         MP_WritePhyUshort(sc, 0x06, 0xee86);
16574         MP_WritePhyUshort(sc, 0x06, 0x1100);
16575         MP_WritePhyUshort(sc, 0x06, 0xae11);
16576         MP_WritePhyUshort(sc, 0x06, 0x15e6);
16577         MP_WritePhyUshort(sc, 0x06, 0x8610);
16578         MP_WritePhyUshort(sc, 0x06, 0xe786);
16579         MP_WritePhyUshort(sc, 0x06, 0x11ae);
16580         MP_WritePhyUshort(sc, 0x06, 0x08ee);
16581         MP_WritePhyUshort(sc, 0x06, 0x8610);
16582         MP_WritePhyUshort(sc, 0x06, 0x00ee);
16583         MP_WritePhyUshort(sc, 0x06, 0x8611);
16584         MP_WritePhyUshort(sc, 0x06, 0x00fd);
16585         MP_WritePhyUshort(sc, 0x06, 0xfc04);
16586         MP_WritePhyUshort(sc, 0x06, 0xf8fa);
16587         MP_WritePhyUshort(sc, 0x06, 0xef69);
16588         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
16589         MP_WritePhyUshort(sc, 0x06, 0x00e1);
16590         MP_WritePhyUshort(sc, 0x06, 0xe001);
16591         MP_WritePhyUshort(sc, 0x06, 0xad27);
16592         MP_WritePhyUshort(sc, 0x06, 0x32e0);
16593         MP_WritePhyUshort(sc, 0x06, 0x8b40);
16594         MP_WritePhyUshort(sc, 0x06, 0xf720);
16595         MP_WritePhyUshort(sc, 0x06, 0xe48b);
16596         MP_WritePhyUshort(sc, 0x06, 0x40bf);
16597         MP_WritePhyUshort(sc, 0x06, 0x31f5);
16598         MP_WritePhyUshort(sc, 0x06, 0x0236);
16599         MP_WritePhyUshort(sc, 0x06, 0xf6ad);
16600         MP_WritePhyUshort(sc, 0x06, 0x2821);
16601         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
16602         MP_WritePhyUshort(sc, 0x06, 0x20e1);
16603         MP_WritePhyUshort(sc, 0x06, 0xe021);
16604         MP_WritePhyUshort(sc, 0x06, 0xad20);
16605         MP_WritePhyUshort(sc, 0x06, 0x18e0);
16606         MP_WritePhyUshort(sc, 0x06, 0x8b40);
16607         MP_WritePhyUshort(sc, 0x06, 0xf620);
16608         MP_WritePhyUshort(sc, 0x06, 0xe48b);
16609         MP_WritePhyUshort(sc, 0x06, 0x40ee);
16610         MP_WritePhyUshort(sc, 0x06, 0x8b3b);
16611         MP_WritePhyUshort(sc, 0x06, 0xffe0);
16612         MP_WritePhyUshort(sc, 0x06, 0x8a8a);
16613         MP_WritePhyUshort(sc, 0x06, 0xe18a);
16614         MP_WritePhyUshort(sc, 0x06, 0x8be4);
16615         MP_WritePhyUshort(sc, 0x06, 0xe000);
16616         MP_WritePhyUshort(sc, 0x06, 0xe5e0);
16617         MP_WritePhyUshort(sc, 0x06, 0x01ef);
16618         MP_WritePhyUshort(sc, 0x06, 0x96fe);
16619         MP_WritePhyUshort(sc, 0x06, 0xfc04);
16620         MP_WritePhyUshort(sc, 0x06, 0xf8fa);
16621         MP_WritePhyUshort(sc, 0x06, 0xef69);
16622         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16623         MP_WritePhyUshort(sc, 0x06, 0x80ad);
16624         MP_WritePhyUshort(sc, 0x06, 0x2722);
16625         MP_WritePhyUshort(sc, 0x06, 0xbf44);
16626         MP_WritePhyUshort(sc, 0x06, 0xfc02);
16627         MP_WritePhyUshort(sc, 0x06, 0x36f6);
16628         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16629         MP_WritePhyUshort(sc, 0x06, 0x441f);
16630         MP_WritePhyUshort(sc, 0x06, 0x019e);
16631         MP_WritePhyUshort(sc, 0x06, 0x15e5);
16632         MP_WritePhyUshort(sc, 0x06, 0x8b44);
16633         MP_WritePhyUshort(sc, 0x06, 0xad29);
16634         MP_WritePhyUshort(sc, 0x06, 0x07ac);
16635         MP_WritePhyUshort(sc, 0x06, 0x2804);
16636         MP_WritePhyUshort(sc, 0x06, 0xd101);
16637         MP_WritePhyUshort(sc, 0x06, 0xae02);
16638         MP_WritePhyUshort(sc, 0x06, 0xd100);
16639         MP_WritePhyUshort(sc, 0x06, 0xbf85);
16640         MP_WritePhyUshort(sc, 0x06, 0xb002);
16641         MP_WritePhyUshort(sc, 0x06, 0x3723);
16642         MP_WritePhyUshort(sc, 0x06, 0xef96);
16643         MP_WritePhyUshort(sc, 0x06, 0xfefc);
16644         MP_WritePhyUshort(sc, 0x06, 0x0400);
16645         MP_WritePhyUshort(sc, 0x06, 0xe140);
16646         MP_WritePhyUshort(sc, 0x06, 0x77e1);
16647         MP_WritePhyUshort(sc, 0x06, 0x40dd);
16648         MP_WritePhyUshort(sc, 0x06, 0xe022);
16649         MP_WritePhyUshort(sc, 0x06, 0x32e1);
16650         MP_WritePhyUshort(sc, 0x06, 0x5074);
16651         MP_WritePhyUshort(sc, 0x06, 0xe144);
16652         MP_WritePhyUshort(sc, 0x06, 0xffe0);
16653         MP_WritePhyUshort(sc, 0x06, 0xdaff);
16654         MP_WritePhyUshort(sc, 0x06, 0xe0c0);
16655         MP_WritePhyUshort(sc, 0x06, 0x52e0);
16656         MP_WritePhyUshort(sc, 0x06, 0xeed9);
16657         MP_WritePhyUshort(sc, 0x06, 0xe04c);
16658         MP_WritePhyUshort(sc, 0x06, 0xbbe0);
16659         MP_WritePhyUshort(sc, 0x06, 0x2a00);
16660         MP_WritePhyUshort(sc, 0x05, 0xe142);
16661         PhyRegValue = MP_ReadPhyUshort(sc, 0x06);
16662         PhyRegValue |= BIT_0;
16663         MP_WritePhyUshort(sc, 0x06, PhyRegValue);
16664         MP_WritePhyUshort(sc, 0x05, 0xe140);
16665         PhyRegValue = MP_ReadPhyUshort(sc, 0x06);
16666         PhyRegValue |= BIT_0;
16667         MP_WritePhyUshort(sc, 0x06, PhyRegValue);
16668         MP_WritePhyUshort(sc, 0x1f, 0x0000);
16669         MP_WritePhyUshort(sc, 0x1f, 0x0005);
16670         for (i = 0; i < 200; i++) {
16671                 DELAY(100);
16672                 PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
16673                 if (PhyRegValue & BIT_7)
16674                         break;
16675         }
16676 
16677         MP_WritePhyUshort(sc, 0x1F, 0x0003);
16678         MP_WritePhyUshort(sc, 0x09, 0xA20F);
16679         MP_WritePhyUshort(sc, 0x1F, 0x0000);
16680 
16681         MP_WritePhyUshort(sc, 0x1f, 0x0003);
16682         PhyRegValue = MP_ReadPhyUshort(sc, 0x19);
16683         PhyRegValue &= ~BIT_0;
16684         MP_WritePhyUshort(sc, 0x19, PhyRegValue);
16685         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
16686         PhyRegValue &= ~BIT_10;
16687         MP_WritePhyUshort(sc, 0x10, PhyRegValue);
16688         MP_WritePhyUshort(sc, 0x1f, 0x0000);
16689 
16690         MP_WritePhyUshort(sc, 0x1f, 0x0007);
16691         MP_WritePhyUshort(sc, 0x1e, 0x0042);
16692         MP_WritePhyUshort(sc, 0x18, 0x2300);
16693         MP_WritePhyUshort(sc, 0x1f, 0x0000);
16694         MP_WritePhyUshort(sc, 0x1f, 0x0007);
16695         MP_WritePhyUshort(sc, 0x1e, 0x0023);
16696         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
16697         if (sc->RequiredSecLanDonglePatch)
16698                 PhyRegValue &= ~(BIT_2);
16699         MP_WritePhyUshort(sc, 0x17, PhyRegValue);
16700         MP_WritePhyUshort(sc, 0x1f, 0x0000);
16701         MP_WritePhyUshort(sc, 0x00, 0x9200);
16702 }
16703 
16704 static void re_set_phy_mcu_8168f_1(struct re_softc *sc)
16705 {
16706         u_int16_t PhyRegValue;
16707         int i;
16708 
16709         MP_WritePhyUshort(sc, 0x1f, 0x0000);
16710         MP_WritePhyUshort(sc, 0x00, 0x1800);
16711         PhyRegValue = MP_ReadPhyUshort(sc, 0x15);
16712         PhyRegValue &= ~(BIT_12);
16713         MP_WritePhyUshort(sc, 0x15, PhyRegValue);
16714         MP_WritePhyUshort(sc, 0x00, 0x4800);
16715         MP_WritePhyUshort(sc, 0x1f, 0x0007);
16716         MP_WritePhyUshort(sc, 0x1e, 0x002f);
16717         for (i = 0; i < 1000; i++) {
16718                 DELAY(100);
16719                 PhyRegValue = MP_ReadPhyUshort(sc, 0x1c);
16720                 if (PhyRegValue & BIT_7)
16721                         break;
16722         }
16723         MP_WritePhyUshort(sc, 0x1f, 0x0000);
16724         MP_WritePhyUshort(sc, 0x00, 0x1800);
16725         MP_WritePhyUshort(sc, 0x1f, 0x0007);
16726         MP_WritePhyUshort(sc, 0x1e, 0x0023);
16727         for (i = 0; i < 200; i++) {
16728                 DELAY(100);
16729                 PhyRegValue = MP_ReadPhyUshort(sc, 0x18);
16730                 if (!(PhyRegValue & BIT_0))
16731                         break;
16732         }
16733         MP_WritePhyUshort(sc, 0x1f, 0x0005);
16734         MP_WritePhyUshort(sc, 0x05, 0xfff6);
16735         MP_WritePhyUshort(sc, 0x06, 0x0080);
16736         MP_WritePhyUshort(sc, 0x1f, 0x0007);
16737         MP_WritePhyUshort(sc, 0x1e, 0x0023);
16738         MP_WritePhyUshort(sc, 0x16, 0x0306);
16739         MP_WritePhyUshort(sc, 0x16, 0x0307);
16740         MP_WritePhyUshort(sc, 0x15, 0x0194);
16741         MP_WritePhyUshort(sc, 0x19, 0x407D);
16742         MP_WritePhyUshort(sc, 0x15, 0x0098);
16743         MP_WritePhyUshort(sc, 0x19, 0x7c0b);
16744         MP_WritePhyUshort(sc, 0x15, 0x0099);
16745         MP_WritePhyUshort(sc, 0x19, 0x6c0b);
16746         MP_WritePhyUshort(sc, 0x15, 0x00eb);
16747         MP_WritePhyUshort(sc, 0x19, 0x6c0b);
16748         MP_WritePhyUshort(sc, 0x15, 0x00f8);
16749         MP_WritePhyUshort(sc, 0x19, 0x6f0b);
16750         MP_WritePhyUshort(sc, 0x15, 0x00fe);
16751         MP_WritePhyUshort(sc, 0x19, 0x6f0f);
16752         MP_WritePhyUshort(sc, 0x15, 0x00db);
16753         MP_WritePhyUshort(sc, 0x19, 0x6f09);
16754         MP_WritePhyUshort(sc, 0x15, 0x00dc);
16755         MP_WritePhyUshort(sc, 0x19, 0xaefd);
16756         MP_WritePhyUshort(sc, 0x15, 0x00dd);
16757         MP_WritePhyUshort(sc, 0x19, 0x6f0b);
16758         MP_WritePhyUshort(sc, 0x15, 0x00de);
16759         MP_WritePhyUshort(sc, 0x19, 0xc60b);
16760         MP_WritePhyUshort(sc, 0x15, 0x00df);
16761         MP_WritePhyUshort(sc, 0x19, 0x00fa);
16762         MP_WritePhyUshort(sc, 0x15, 0x00e0);
16763         MP_WritePhyUshort(sc, 0x19, 0x30e1);
16764         MP_WritePhyUshort(sc, 0x15, 0x020c);
16765         MP_WritePhyUshort(sc, 0x19, 0x3224);
16766         MP_WritePhyUshort(sc, 0x15, 0x020e);
16767         MP_WritePhyUshort(sc, 0x19, 0x9813);
16768         MP_WritePhyUshort(sc, 0x15, 0x020f);
16769         MP_WritePhyUshort(sc, 0x19, 0x7801);
16770         MP_WritePhyUshort(sc, 0x15, 0x0210);
16771         MP_WritePhyUshort(sc, 0x19, 0x930f);
16772         MP_WritePhyUshort(sc, 0x15, 0x0211);
16773         MP_WritePhyUshort(sc, 0x19, 0x9206);
16774         MP_WritePhyUshort(sc, 0x15, 0x0212);
16775         MP_WritePhyUshort(sc, 0x19, 0x4002);
16776         MP_WritePhyUshort(sc, 0x15, 0x0213);
16777         MP_WritePhyUshort(sc, 0x19, 0x7800);
16778         MP_WritePhyUshort(sc, 0x15, 0x0214);
16779         MP_WritePhyUshort(sc, 0x19, 0x588f);
16780         MP_WritePhyUshort(sc, 0x15, 0x0215);
16781         MP_WritePhyUshort(sc, 0x19, 0x5520);
16782         MP_WritePhyUshort(sc, 0x15, 0x0216);
16783         MP_WritePhyUshort(sc, 0x19, 0x3224);
16784         MP_WritePhyUshort(sc, 0x15, 0x0217);
16785         MP_WritePhyUshort(sc, 0x19, 0x4002);
16786         MP_WritePhyUshort(sc, 0x15, 0x0218);
16787         MP_WritePhyUshort(sc, 0x19, 0x7800);
16788         MP_WritePhyUshort(sc, 0x15, 0x0219);
16789         MP_WritePhyUshort(sc, 0x19, 0x588d);
16790         MP_WritePhyUshort(sc, 0x15, 0x021a);
16791         MP_WritePhyUshort(sc, 0x19, 0x5540);
16792         MP_WritePhyUshort(sc, 0x15, 0x021b);
16793         MP_WritePhyUshort(sc, 0x19, 0x9e03);
16794         MP_WritePhyUshort(sc, 0x15, 0x021c);
16795         MP_WritePhyUshort(sc, 0x19, 0x7c40);
16796         MP_WritePhyUshort(sc, 0x15, 0x021d);
16797         MP_WritePhyUshort(sc, 0x19, 0x6840);
16798         MP_WritePhyUshort(sc, 0x15, 0x021e);
16799         MP_WritePhyUshort(sc, 0x19, 0x3224);
16800         MP_WritePhyUshort(sc, 0x15, 0x021f);
16801         MP_WritePhyUshort(sc, 0x19, 0x4002);
16802         MP_WritePhyUshort(sc, 0x15, 0x0220);
16803         MP_WritePhyUshort(sc, 0x19, 0x3224);
16804         MP_WritePhyUshort(sc, 0x15, 0x0221);
16805         MP_WritePhyUshort(sc, 0x19, 0x9e03);
16806         MP_WritePhyUshort(sc, 0x15, 0x0222);
16807         MP_WritePhyUshort(sc, 0x19, 0x7c40);
16808         MP_WritePhyUshort(sc, 0x15, 0x0223);
16809         MP_WritePhyUshort(sc, 0x19, 0x6840);
16810         MP_WritePhyUshort(sc, 0x15, 0x0224);
16811         MP_WritePhyUshort(sc, 0x19, 0x7800);
16812         MP_WritePhyUshort(sc, 0x15, 0x0225);
16813         MP_WritePhyUshort(sc, 0x19, 0x3231);
16814         MP_WritePhyUshort(sc, 0x15, 0x0000);
16815         MP_WritePhyUshort(sc, 0x16, 0x0306);
16816         MP_WritePhyUshort(sc, 0x16, 0x0300);
16817         MP_WritePhyUshort(sc, 0x1f, 0x0000);
16818         MP_WritePhyUshort(sc, 0x1f, 0x0005);
16819         MP_WritePhyUshort(sc, 0x05, 0xfff6);
16820         MP_WritePhyUshort(sc, 0x06, 0x0080);
16821         MP_WritePhyUshort(sc, 0x05, 0x8000);
16822         MP_WritePhyUshort(sc, 0x06, 0x0280);
16823         MP_WritePhyUshort(sc, 0x06, 0x48f7);
16824         MP_WritePhyUshort(sc, 0x06, 0x00e0);
16825         MP_WritePhyUshort(sc, 0x06, 0xfff7);
16826         MP_WritePhyUshort(sc, 0x06, 0xa080);
16827         MP_WritePhyUshort(sc, 0x06, 0x02ae);
16828         MP_WritePhyUshort(sc, 0x06, 0xf602);
16829         MP_WritePhyUshort(sc, 0x06, 0x0118);
16830         MP_WritePhyUshort(sc, 0x06, 0x0201);
16831         MP_WritePhyUshort(sc, 0x06, 0x2502);
16832         MP_WritePhyUshort(sc, 0x06, 0x8090);
16833         MP_WritePhyUshort(sc, 0x06, 0x0201);
16834         MP_WritePhyUshort(sc, 0x06, 0x4202);
16835         MP_WritePhyUshort(sc, 0x06, 0x015c);
16836         MP_WritePhyUshort(sc, 0x06, 0x0280);
16837         MP_WritePhyUshort(sc, 0x06, 0xad02);
16838         MP_WritePhyUshort(sc, 0x06, 0x80ca);
16839         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16840         MP_WritePhyUshort(sc, 0x06, 0x88e1);
16841         MP_WritePhyUshort(sc, 0x06, 0x8b89);
16842         MP_WritePhyUshort(sc, 0x06, 0x1e01);
16843         MP_WritePhyUshort(sc, 0x06, 0xe18b);
16844         MP_WritePhyUshort(sc, 0x06, 0x8a1e);
16845         MP_WritePhyUshort(sc, 0x06, 0x01e1);
16846         MP_WritePhyUshort(sc, 0x06, 0x8b8b);
16847         MP_WritePhyUshort(sc, 0x06, 0x1e01);
16848         MP_WritePhyUshort(sc, 0x06, 0xe18b);
16849         MP_WritePhyUshort(sc, 0x06, 0x8c1e);
16850         MP_WritePhyUshort(sc, 0x06, 0x01e1);
16851         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
16852         MP_WritePhyUshort(sc, 0x06, 0x1e01);
16853         MP_WritePhyUshort(sc, 0x06, 0xe18b);
16854         MP_WritePhyUshort(sc, 0x06, 0x8e1e);
16855         MP_WritePhyUshort(sc, 0x06, 0x01a0);
16856         MP_WritePhyUshort(sc, 0x06, 0x00c7);
16857         MP_WritePhyUshort(sc, 0x06, 0xaebb);
16858         MP_WritePhyUshort(sc, 0x06, 0xd484);
16859         MP_WritePhyUshort(sc, 0x06, 0x3ce4);
16860         MP_WritePhyUshort(sc, 0x06, 0x8b92);
16861         MP_WritePhyUshort(sc, 0x06, 0xe58b);
16862         MP_WritePhyUshort(sc, 0x06, 0x93ee);
16863         MP_WritePhyUshort(sc, 0x06, 0x8ac8);
16864         MP_WritePhyUshort(sc, 0x06, 0x03ee);
16865         MP_WritePhyUshort(sc, 0x06, 0x8aca);
16866         MP_WritePhyUshort(sc, 0x06, 0x60ee);
16867         MP_WritePhyUshort(sc, 0x06, 0x8ac0);
16868         MP_WritePhyUshort(sc, 0x06, 0x00ee);
16869         MP_WritePhyUshort(sc, 0x06, 0x8ac1);
16870         MP_WritePhyUshort(sc, 0x06, 0x00ee);
16871         MP_WritePhyUshort(sc, 0x06, 0x8abe);
16872         MP_WritePhyUshort(sc, 0x06, 0x07ee);
16873         MP_WritePhyUshort(sc, 0x06, 0x8abf);
16874         MP_WritePhyUshort(sc, 0x06, 0x73ee);
16875         MP_WritePhyUshort(sc, 0x06, 0x8a95);
16876         MP_WritePhyUshort(sc, 0x06, 0x02bf);
16877         MP_WritePhyUshort(sc, 0x06, 0x8b88);
16878         MP_WritePhyUshort(sc, 0x06, 0xec00);
16879         MP_WritePhyUshort(sc, 0x06, 0x19a9);
16880         MP_WritePhyUshort(sc, 0x06, 0x8b90);
16881         MP_WritePhyUshort(sc, 0x06, 0xf9ee);
16882         MP_WritePhyUshort(sc, 0x06, 0xfff6);
16883         MP_WritePhyUshort(sc, 0x06, 0x00ee);
16884         MP_WritePhyUshort(sc, 0x06, 0xfff7);
16885         MP_WritePhyUshort(sc, 0x06, 0xfed1);
16886         MP_WritePhyUshort(sc, 0x06, 0x00bf);
16887         MP_WritePhyUshort(sc, 0x06, 0x85a4);
16888         MP_WritePhyUshort(sc, 0x06, 0x0238);
16889         MP_WritePhyUshort(sc, 0x06, 0x7dd1);
16890         MP_WritePhyUshort(sc, 0x06, 0x01bf);
16891         MP_WritePhyUshort(sc, 0x06, 0x85a7);
16892         MP_WritePhyUshort(sc, 0x06, 0x0238);
16893         MP_WritePhyUshort(sc, 0x06, 0x7d04);
16894         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
16895         MP_WritePhyUshort(sc, 0x06, 0x8b8a);
16896         MP_WritePhyUshort(sc, 0x06, 0xad20);
16897         MP_WritePhyUshort(sc, 0x06, 0x14ee);
16898         MP_WritePhyUshort(sc, 0x06, 0x8b8a);
16899         MP_WritePhyUshort(sc, 0x06, 0x0002);
16900         MP_WritePhyUshort(sc, 0x06, 0x204b);
16901         MP_WritePhyUshort(sc, 0x06, 0xe0e4);
16902         MP_WritePhyUshort(sc, 0x06, 0x26e1);
16903         MP_WritePhyUshort(sc, 0x06, 0xe427);
16904         MP_WritePhyUshort(sc, 0x06, 0xeee4);
16905         MP_WritePhyUshort(sc, 0x06, 0x2623);
16906         MP_WritePhyUshort(sc, 0x06, 0xe5e4);
16907         MP_WritePhyUshort(sc, 0x06, 0x27fc);
16908         MP_WritePhyUshort(sc, 0x06, 0x04f8);
16909         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16910         MP_WritePhyUshort(sc, 0x06, 0x8dad);
16911         MP_WritePhyUshort(sc, 0x06, 0x2014);
16912         MP_WritePhyUshort(sc, 0x06, 0xee8b);
16913         MP_WritePhyUshort(sc, 0x06, 0x8d00);
16914         MP_WritePhyUshort(sc, 0x06, 0xe08a);
16915         MP_WritePhyUshort(sc, 0x06, 0x5a78);
16916         MP_WritePhyUshort(sc, 0x06, 0x039e);
16917         MP_WritePhyUshort(sc, 0x06, 0x0902);
16918         MP_WritePhyUshort(sc, 0x06, 0x05e8);
16919         MP_WritePhyUshort(sc, 0x06, 0x0281);
16920         MP_WritePhyUshort(sc, 0x06, 0x4f02);
16921         MP_WritePhyUshort(sc, 0x06, 0x326c);
16922         MP_WritePhyUshort(sc, 0x06, 0xfc04);
16923         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
16924         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16925         MP_WritePhyUshort(sc, 0x06, 0xad20);
16926         MP_WritePhyUshort(sc, 0x06, 0x1df6);
16927         MP_WritePhyUshort(sc, 0x06, 0x20e4);
16928         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16929         MP_WritePhyUshort(sc, 0x06, 0x022f);
16930         MP_WritePhyUshort(sc, 0x06, 0x0902);
16931         MP_WritePhyUshort(sc, 0x06, 0x2ab0);
16932         MP_WritePhyUshort(sc, 0x06, 0x0285);
16933         MP_WritePhyUshort(sc, 0x06, 0x1602);
16934         MP_WritePhyUshort(sc, 0x06, 0x03ba);
16935         MP_WritePhyUshort(sc, 0x06, 0x0284);
16936         MP_WritePhyUshort(sc, 0x06, 0xe502);
16937         MP_WritePhyUshort(sc, 0x06, 0x2df1);
16938         MP_WritePhyUshort(sc, 0x06, 0x0283);
16939         MP_WritePhyUshort(sc, 0x06, 0x8302);
16940         MP_WritePhyUshort(sc, 0x06, 0x0475);
16941         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16942         MP_WritePhyUshort(sc, 0x06, 0x8ead);
16943         MP_WritePhyUshort(sc, 0x06, 0x210b);
16944         MP_WritePhyUshort(sc, 0x06, 0xf621);
16945         MP_WritePhyUshort(sc, 0x06, 0xe48b);
16946         MP_WritePhyUshort(sc, 0x06, 0x8e02);
16947         MP_WritePhyUshort(sc, 0x06, 0x83f8);
16948         MP_WritePhyUshort(sc, 0x06, 0x021c);
16949         MP_WritePhyUshort(sc, 0x06, 0x99e0);
16950         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16951         MP_WritePhyUshort(sc, 0x06, 0xad22);
16952         MP_WritePhyUshort(sc, 0x06, 0x08f6);
16953         MP_WritePhyUshort(sc, 0x06, 0x22e4);
16954         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16955         MP_WritePhyUshort(sc, 0x06, 0x0235);
16956         MP_WritePhyUshort(sc, 0x06, 0x63e0);
16957         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16958         MP_WritePhyUshort(sc, 0x06, 0xad23);
16959         MP_WritePhyUshort(sc, 0x06, 0x08f6);
16960         MP_WritePhyUshort(sc, 0x06, 0x23e4);
16961         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16962         MP_WritePhyUshort(sc, 0x06, 0x0231);
16963         MP_WritePhyUshort(sc, 0x06, 0x57e0);
16964         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16965         MP_WritePhyUshort(sc, 0x06, 0xad24);
16966         MP_WritePhyUshort(sc, 0x06, 0x05f6);
16967         MP_WritePhyUshort(sc, 0x06, 0x24e4);
16968         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16969         MP_WritePhyUshort(sc, 0x06, 0xe08b);
16970         MP_WritePhyUshort(sc, 0x06, 0x8ead);
16971         MP_WritePhyUshort(sc, 0x06, 0x2505);
16972         MP_WritePhyUshort(sc, 0x06, 0xf625);
16973         MP_WritePhyUshort(sc, 0x06, 0xe48b);
16974         MP_WritePhyUshort(sc, 0x06, 0x8ee0);
16975         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16976         MP_WritePhyUshort(sc, 0x06, 0xad26);
16977         MP_WritePhyUshort(sc, 0x06, 0x08f6);
16978         MP_WritePhyUshort(sc, 0x06, 0x26e4);
16979         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16980         MP_WritePhyUshort(sc, 0x06, 0x022d);
16981         MP_WritePhyUshort(sc, 0x06, 0x1ce0);
16982         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16983         MP_WritePhyUshort(sc, 0x06, 0xad27);
16984         MP_WritePhyUshort(sc, 0x06, 0x05f6);
16985         MP_WritePhyUshort(sc, 0x06, 0x27e4);
16986         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16987         MP_WritePhyUshort(sc, 0x06, 0x0203);
16988         MP_WritePhyUshort(sc, 0x06, 0x80fc);
16989         MP_WritePhyUshort(sc, 0x06, 0x04f8);
16990         MP_WritePhyUshort(sc, 0x06, 0xf9e0);
16991         MP_WritePhyUshort(sc, 0x06, 0x8b81);
16992         MP_WritePhyUshort(sc, 0x06, 0xac26);
16993         MP_WritePhyUshort(sc, 0x06, 0x1ae0);
16994         MP_WritePhyUshort(sc, 0x06, 0x8b81);
16995         MP_WritePhyUshort(sc, 0x06, 0xac21);
16996         MP_WritePhyUshort(sc, 0x06, 0x14e0);
16997         MP_WritePhyUshort(sc, 0x06, 0x8b85);
16998         MP_WritePhyUshort(sc, 0x06, 0xac20);
16999         MP_WritePhyUshort(sc, 0x06, 0x0ee0);
17000         MP_WritePhyUshort(sc, 0x06, 0x8b85);
17001         MP_WritePhyUshort(sc, 0x06, 0xac23);
17002         MP_WritePhyUshort(sc, 0x06, 0x08e0);
17003         MP_WritePhyUshort(sc, 0x06, 0x8b87);
17004         MP_WritePhyUshort(sc, 0x06, 0xac24);
17005         MP_WritePhyUshort(sc, 0x06, 0x02ae);
17006         MP_WritePhyUshort(sc, 0x06, 0x3802);
17007         MP_WritePhyUshort(sc, 0x06, 0x1ac2);
17008         MP_WritePhyUshort(sc, 0x06, 0xeee4);
17009         MP_WritePhyUshort(sc, 0x06, 0x1c04);
17010         MP_WritePhyUshort(sc, 0x06, 0xeee4);
17011         MP_WritePhyUshort(sc, 0x06, 0x1d04);
17012         MP_WritePhyUshort(sc, 0x06, 0xe2e0);
17013         MP_WritePhyUshort(sc, 0x06, 0x7ce3);
17014         MP_WritePhyUshort(sc, 0x06, 0xe07d);
17015         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
17016         MP_WritePhyUshort(sc, 0x06, 0x38e1);
17017         MP_WritePhyUshort(sc, 0x06, 0xe039);
17018         MP_WritePhyUshort(sc, 0x06, 0xad2e);
17019         MP_WritePhyUshort(sc, 0x06, 0x1bad);
17020         MP_WritePhyUshort(sc, 0x06, 0x390d);
17021         MP_WritePhyUshort(sc, 0x06, 0xd101);
17022         MP_WritePhyUshort(sc, 0x06, 0xbf22);
17023         MP_WritePhyUshort(sc, 0x06, 0x7a02);
17024         MP_WritePhyUshort(sc, 0x06, 0x387d);
17025         MP_WritePhyUshort(sc, 0x06, 0x0281);
17026         MP_WritePhyUshort(sc, 0x06, 0xacae);
17027         MP_WritePhyUshort(sc, 0x06, 0x0bac);
17028         MP_WritePhyUshort(sc, 0x06, 0x3802);
17029         MP_WritePhyUshort(sc, 0x06, 0xae06);
17030         MP_WritePhyUshort(sc, 0x06, 0x0281);
17031         MP_WritePhyUshort(sc, 0x06, 0xe902);
17032         MP_WritePhyUshort(sc, 0x06, 0x822e);
17033         MP_WritePhyUshort(sc, 0x06, 0x021a);
17034         MP_WritePhyUshort(sc, 0x06, 0xd3fd);
17035         MP_WritePhyUshort(sc, 0x06, 0xfc04);
17036         MP_WritePhyUshort(sc, 0x06, 0xf8e1);
17037         MP_WritePhyUshort(sc, 0x06, 0x8af4);
17038         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17039         MP_WritePhyUshort(sc, 0x06, 0x81ad);
17040         MP_WritePhyUshort(sc, 0x06, 0x2602);
17041         MP_WritePhyUshort(sc, 0x06, 0xf728);
17042         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17043         MP_WritePhyUshort(sc, 0x06, 0x81ad);
17044         MP_WritePhyUshort(sc, 0x06, 0x2105);
17045         MP_WritePhyUshort(sc, 0x06, 0x0222);
17046         MP_WritePhyUshort(sc, 0x06, 0x8ef7);
17047         MP_WritePhyUshort(sc, 0x06, 0x29e0);
17048         MP_WritePhyUshort(sc, 0x06, 0x8b85);
17049         MP_WritePhyUshort(sc, 0x06, 0xad20);
17050         MP_WritePhyUshort(sc, 0x06, 0x0502);
17051         MP_WritePhyUshort(sc, 0x06, 0x14b8);
17052         MP_WritePhyUshort(sc, 0x06, 0xf72a);
17053         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17054         MP_WritePhyUshort(sc, 0x06, 0x85ad);
17055         MP_WritePhyUshort(sc, 0x06, 0x2305);
17056         MP_WritePhyUshort(sc, 0x06, 0x0212);
17057         MP_WritePhyUshort(sc, 0x06, 0xf4f7);
17058         MP_WritePhyUshort(sc, 0x06, 0x2be0);
17059         MP_WritePhyUshort(sc, 0x06, 0x8b87);
17060         MP_WritePhyUshort(sc, 0x06, 0xad24);
17061         MP_WritePhyUshort(sc, 0x06, 0x0502);
17062         MP_WritePhyUshort(sc, 0x06, 0x8284);
17063         MP_WritePhyUshort(sc, 0x06, 0xf72c);
17064         MP_WritePhyUshort(sc, 0x06, 0xe58a);
17065         MP_WritePhyUshort(sc, 0x06, 0xf4fc);
17066         MP_WritePhyUshort(sc, 0x06, 0x04f8);
17067         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17068         MP_WritePhyUshort(sc, 0x06, 0x81ad);
17069         MP_WritePhyUshort(sc, 0x06, 0x2600);
17070         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17071         MP_WritePhyUshort(sc, 0x06, 0x81ad);
17072         MP_WritePhyUshort(sc, 0x06, 0x2109);
17073         MP_WritePhyUshort(sc, 0x06, 0xe08a);
17074         MP_WritePhyUshort(sc, 0x06, 0xf4ac);
17075         MP_WritePhyUshort(sc, 0x06, 0x2003);
17076         MP_WritePhyUshort(sc, 0x06, 0x0222);
17077         MP_WritePhyUshort(sc, 0x06, 0x7de0);
17078         MP_WritePhyUshort(sc, 0x06, 0x8b85);
17079         MP_WritePhyUshort(sc, 0x06, 0xad20);
17080         MP_WritePhyUshort(sc, 0x06, 0x09e0);
17081         MP_WritePhyUshort(sc, 0x06, 0x8af4);
17082         MP_WritePhyUshort(sc, 0x06, 0xac21);
17083         MP_WritePhyUshort(sc, 0x06, 0x0302);
17084         MP_WritePhyUshort(sc, 0x06, 0x1408);
17085         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17086         MP_WritePhyUshort(sc, 0x06, 0x85ad);
17087         MP_WritePhyUshort(sc, 0x06, 0x2309);
17088         MP_WritePhyUshort(sc, 0x06, 0xe08a);
17089         MP_WritePhyUshort(sc, 0x06, 0xf4ac);
17090         MP_WritePhyUshort(sc, 0x06, 0x2203);
17091         MP_WritePhyUshort(sc, 0x06, 0x0213);
17092         MP_WritePhyUshort(sc, 0x06, 0x07e0);
17093         MP_WritePhyUshort(sc, 0x06, 0x8b87);
17094         MP_WritePhyUshort(sc, 0x06, 0xad24);
17095         MP_WritePhyUshort(sc, 0x06, 0x09e0);
17096         MP_WritePhyUshort(sc, 0x06, 0x8af4);
17097         MP_WritePhyUshort(sc, 0x06, 0xac23);
17098         MP_WritePhyUshort(sc, 0x06, 0x0302);
17099         MP_WritePhyUshort(sc, 0x06, 0x8289);
17100         MP_WritePhyUshort(sc, 0x06, 0xfc04);
17101         MP_WritePhyUshort(sc, 0x06, 0xf8e1);
17102         MP_WritePhyUshort(sc, 0x06, 0x8af4);
17103         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17104         MP_WritePhyUshort(sc, 0x06, 0x81ad);
17105         MP_WritePhyUshort(sc, 0x06, 0x2602);
17106         MP_WritePhyUshort(sc, 0x06, 0xf628);
17107         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17108         MP_WritePhyUshort(sc, 0x06, 0x81ad);
17109         MP_WritePhyUshort(sc, 0x06, 0x210a);
17110         MP_WritePhyUshort(sc, 0x06, 0xe083);
17111         MP_WritePhyUshort(sc, 0x06, 0xecf6);
17112         MP_WritePhyUshort(sc, 0x06, 0x27a0);
17113         MP_WritePhyUshort(sc, 0x06, 0x0502);
17114         MP_WritePhyUshort(sc, 0x06, 0xf629);
17115         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17116         MP_WritePhyUshort(sc, 0x06, 0x85ad);
17117         MP_WritePhyUshort(sc, 0x06, 0x2008);
17118         MP_WritePhyUshort(sc, 0x06, 0xe08a);
17119         MP_WritePhyUshort(sc, 0x06, 0xe8ad);
17120         MP_WritePhyUshort(sc, 0x06, 0x2102);
17121         MP_WritePhyUshort(sc, 0x06, 0xf62a);
17122         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17123         MP_WritePhyUshort(sc, 0x06, 0x85ad);
17124         MP_WritePhyUshort(sc, 0x06, 0x2308);
17125         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17126         MP_WritePhyUshort(sc, 0x06, 0x20a0);
17127         MP_WritePhyUshort(sc, 0x06, 0x0302);
17128         MP_WritePhyUshort(sc, 0x06, 0xf62b);
17129         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17130         MP_WritePhyUshort(sc, 0x06, 0x87ad);
17131         MP_WritePhyUshort(sc, 0x06, 0x2408);
17132         MP_WritePhyUshort(sc, 0x06, 0xe08a);
17133         MP_WritePhyUshort(sc, 0x06, 0xc2a0);
17134         MP_WritePhyUshort(sc, 0x06, 0x0302);
17135         MP_WritePhyUshort(sc, 0x06, 0xf62c);
17136         MP_WritePhyUshort(sc, 0x06, 0xe58a);
17137         MP_WritePhyUshort(sc, 0x06, 0xf4a1);
17138         MP_WritePhyUshort(sc, 0x06, 0x0008);
17139         MP_WritePhyUshort(sc, 0x06, 0xd100);
17140         MP_WritePhyUshort(sc, 0x06, 0xbf22);
17141         MP_WritePhyUshort(sc, 0x06, 0x7a02);
17142         MP_WritePhyUshort(sc, 0x06, 0x387d);
17143         MP_WritePhyUshort(sc, 0x06, 0xfc04);
17144         MP_WritePhyUshort(sc, 0x06, 0xee8a);
17145         MP_WritePhyUshort(sc, 0x06, 0xc200);
17146         MP_WritePhyUshort(sc, 0x06, 0x04f8);
17147         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17148         MP_WritePhyUshort(sc, 0x06, 0x87ad);
17149         MP_WritePhyUshort(sc, 0x06, 0x241e);
17150         MP_WritePhyUshort(sc, 0x06, 0xe08a);
17151         MP_WritePhyUshort(sc, 0x06, 0xc2a0);
17152         MP_WritePhyUshort(sc, 0x06, 0x0005);
17153         MP_WritePhyUshort(sc, 0x06, 0x0282);
17154         MP_WritePhyUshort(sc, 0x06, 0xb0ae);
17155         MP_WritePhyUshort(sc, 0x06, 0xf5a0);
17156         MP_WritePhyUshort(sc, 0x06, 0x0105);
17157         MP_WritePhyUshort(sc, 0x06, 0x0282);
17158         MP_WritePhyUshort(sc, 0x06, 0xc0ae);
17159         MP_WritePhyUshort(sc, 0x06, 0x0ba0);
17160         MP_WritePhyUshort(sc, 0x06, 0x0205);
17161         MP_WritePhyUshort(sc, 0x06, 0x0282);
17162         MP_WritePhyUshort(sc, 0x06, 0xcaae);
17163         MP_WritePhyUshort(sc, 0x06, 0x03a0);
17164         MP_WritePhyUshort(sc, 0x06, 0x0300);
17165         MP_WritePhyUshort(sc, 0x06, 0xfc04);
17166         MP_WritePhyUshort(sc, 0x06, 0xf8fa);
17167         MP_WritePhyUshort(sc, 0x06, 0xef69);
17168         MP_WritePhyUshort(sc, 0x06, 0x0282);
17169         MP_WritePhyUshort(sc, 0x06, 0xe1ee);
17170         MP_WritePhyUshort(sc, 0x06, 0x8ac2);
17171         MP_WritePhyUshort(sc, 0x06, 0x01ef);
17172         MP_WritePhyUshort(sc, 0x06, 0x96fe);
17173         MP_WritePhyUshort(sc, 0x06, 0xfc04);
17174         MP_WritePhyUshort(sc, 0x06, 0xf8ee);
17175         MP_WritePhyUshort(sc, 0x06, 0x8ac9);
17176         MP_WritePhyUshort(sc, 0x06, 0x0002);
17177         MP_WritePhyUshort(sc, 0x06, 0x8317);
17178         MP_WritePhyUshort(sc, 0x06, 0xfc04);
17179         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
17180         MP_WritePhyUshort(sc, 0x06, 0x8ac8);
17181         MP_WritePhyUshort(sc, 0x06, 0xe18a);
17182         MP_WritePhyUshort(sc, 0x06, 0xc91f);
17183         MP_WritePhyUshort(sc, 0x06, 0x019e);
17184         MP_WritePhyUshort(sc, 0x06, 0x0611);
17185         MP_WritePhyUshort(sc, 0x06, 0xe58a);
17186         MP_WritePhyUshort(sc, 0x06, 0xc9ae);
17187         MP_WritePhyUshort(sc, 0x06, 0x04ee);
17188         MP_WritePhyUshort(sc, 0x06, 0x8ac2);
17189         MP_WritePhyUshort(sc, 0x06, 0x01fc);
17190         MP_WritePhyUshort(sc, 0x06, 0x04f8);
17191         MP_WritePhyUshort(sc, 0x06, 0xf9fa);
17192         MP_WritePhyUshort(sc, 0x06, 0xef69);
17193         MP_WritePhyUshort(sc, 0x06, 0xfbbf);
17194         MP_WritePhyUshort(sc, 0x06, 0x8ac4);
17195         MP_WritePhyUshort(sc, 0x06, 0xef79);
17196         MP_WritePhyUshort(sc, 0x06, 0xd200);
17197         MP_WritePhyUshort(sc, 0x06, 0xd400);
17198         MP_WritePhyUshort(sc, 0x06, 0x221e);
17199         MP_WritePhyUshort(sc, 0x06, 0x02bf);
17200         MP_WritePhyUshort(sc, 0x06, 0x3024);
17201         MP_WritePhyUshort(sc, 0x06, 0x0238);
17202         MP_WritePhyUshort(sc, 0x06, 0x7dbf);
17203         MP_WritePhyUshort(sc, 0x06, 0x13ff);
17204         MP_WritePhyUshort(sc, 0x06, 0x0238);
17205         MP_WritePhyUshort(sc, 0x06, 0x500d);
17206         MP_WritePhyUshort(sc, 0x06, 0x4559);
17207         MP_WritePhyUshort(sc, 0x06, 0x1fef);
17208         MP_WritePhyUshort(sc, 0x06, 0x97dd);
17209         MP_WritePhyUshort(sc, 0x06, 0xd308);
17210         MP_WritePhyUshort(sc, 0x06, 0x1a93);
17211         MP_WritePhyUshort(sc, 0x06, 0xdd12);
17212         MP_WritePhyUshort(sc, 0x06, 0x17a2);
17213         MP_WritePhyUshort(sc, 0x06, 0x04de);
17214         MP_WritePhyUshort(sc, 0x06, 0xffef);
17215         MP_WritePhyUshort(sc, 0x06, 0x96fe);
17216         MP_WritePhyUshort(sc, 0x06, 0xfdfc);
17217         MP_WritePhyUshort(sc, 0x06, 0x04f8);
17218         MP_WritePhyUshort(sc, 0x06, 0xf9fa);
17219         MP_WritePhyUshort(sc, 0x06, 0xef69);
17220         MP_WritePhyUshort(sc, 0x06, 0xfbee);
17221         MP_WritePhyUshort(sc, 0x06, 0x8ac2);
17222         MP_WritePhyUshort(sc, 0x06, 0x03d5);
17223         MP_WritePhyUshort(sc, 0x06, 0x0080);
17224         MP_WritePhyUshort(sc, 0x06, 0xbf8a);
17225         MP_WritePhyUshort(sc, 0x06, 0xc4ef);
17226         MP_WritePhyUshort(sc, 0x06, 0x79ef);
17227         MP_WritePhyUshort(sc, 0x06, 0x45bf);
17228         MP_WritePhyUshort(sc, 0x06, 0x3024);
17229         MP_WritePhyUshort(sc, 0x06, 0x0238);
17230         MP_WritePhyUshort(sc, 0x06, 0x7dbf);
17231         MP_WritePhyUshort(sc, 0x06, 0x13ff);
17232         MP_WritePhyUshort(sc, 0x06, 0x0238);
17233         MP_WritePhyUshort(sc, 0x06, 0x50ad);
17234         MP_WritePhyUshort(sc, 0x06, 0x2702);
17235         MP_WritePhyUshort(sc, 0x06, 0x78ff);
17236         MP_WritePhyUshort(sc, 0x06, 0xe18a);
17237         MP_WritePhyUshort(sc, 0x06, 0xca1b);
17238         MP_WritePhyUshort(sc, 0x06, 0x01aa);
17239         MP_WritePhyUshort(sc, 0x06, 0x2eef);
17240         MP_WritePhyUshort(sc, 0x06, 0x97d9);
17241         MP_WritePhyUshort(sc, 0x06, 0x7900);
17242         MP_WritePhyUshort(sc, 0x06, 0x9e2b);
17243         MP_WritePhyUshort(sc, 0x06, 0x81dd);
17244         MP_WritePhyUshort(sc, 0x06, 0xbf85);
17245         MP_WritePhyUshort(sc, 0x06, 0xad02);
17246         MP_WritePhyUshort(sc, 0x06, 0x387d);
17247         MP_WritePhyUshort(sc, 0x06, 0xd101);
17248         MP_WritePhyUshort(sc, 0x06, 0xef02);
17249         MP_WritePhyUshort(sc, 0x06, 0x100c);
17250         MP_WritePhyUshort(sc, 0x06, 0x11b0);
17251         MP_WritePhyUshort(sc, 0x06, 0xfc0d);
17252         MP_WritePhyUshort(sc, 0x06, 0x11bf);
17253         MP_WritePhyUshort(sc, 0x06, 0x85aa);
17254         MP_WritePhyUshort(sc, 0x06, 0x0238);
17255         MP_WritePhyUshort(sc, 0x06, 0x7dd1);
17256         MP_WritePhyUshort(sc, 0x06, 0x00bf);
17257         MP_WritePhyUshort(sc, 0x06, 0x85aa);
17258         MP_WritePhyUshort(sc, 0x06, 0x0238);
17259         MP_WritePhyUshort(sc, 0x06, 0x7dee);
17260         MP_WritePhyUshort(sc, 0x06, 0x8ac2);
17261         MP_WritePhyUshort(sc, 0x06, 0x02ae);
17262         MP_WritePhyUshort(sc, 0x06, 0x0413);
17263         MP_WritePhyUshort(sc, 0x06, 0xa38b);
17264         MP_WritePhyUshort(sc, 0x06, 0xb4d3);
17265         MP_WritePhyUshort(sc, 0x06, 0x8012);
17266         MP_WritePhyUshort(sc, 0x06, 0x17a2);
17267         MP_WritePhyUshort(sc, 0x06, 0x04ad);
17268         MP_WritePhyUshort(sc, 0x06, 0xffef);
17269         MP_WritePhyUshort(sc, 0x06, 0x96fe);
17270         MP_WritePhyUshort(sc, 0x06, 0xfdfc);
17271         MP_WritePhyUshort(sc, 0x06, 0x04f8);
17272         MP_WritePhyUshort(sc, 0x06, 0xf9e0);
17273         MP_WritePhyUshort(sc, 0x06, 0x8b85);
17274         MP_WritePhyUshort(sc, 0x06, 0xad25);
17275         MP_WritePhyUshort(sc, 0x06, 0x48e0);
17276         MP_WritePhyUshort(sc, 0x06, 0x8a96);
17277         MP_WritePhyUshort(sc, 0x06, 0xe18a);
17278         MP_WritePhyUshort(sc, 0x06, 0x977c);
17279         MP_WritePhyUshort(sc, 0x06, 0x0000);
17280         MP_WritePhyUshort(sc, 0x06, 0x9e35);
17281         MP_WritePhyUshort(sc, 0x06, 0xee8a);
17282         MP_WritePhyUshort(sc, 0x06, 0x9600);
17283         MP_WritePhyUshort(sc, 0x06, 0xee8a);
17284         MP_WritePhyUshort(sc, 0x06, 0x9700);
17285         MP_WritePhyUshort(sc, 0x06, 0xe08a);
17286         MP_WritePhyUshort(sc, 0x06, 0xbee1);
17287         MP_WritePhyUshort(sc, 0x06, 0x8abf);
17288         MP_WritePhyUshort(sc, 0x06, 0xe28a);
17289         MP_WritePhyUshort(sc, 0x06, 0xc0e3);
17290         MP_WritePhyUshort(sc, 0x06, 0x8ac1);
17291         MP_WritePhyUshort(sc, 0x06, 0x0237);
17292         MP_WritePhyUshort(sc, 0x06, 0x74ad);
17293         MP_WritePhyUshort(sc, 0x06, 0x2012);
17294         MP_WritePhyUshort(sc, 0x06, 0xee8a);
17295         MP_WritePhyUshort(sc, 0x06, 0x9603);
17296         MP_WritePhyUshort(sc, 0x06, 0xee8a);
17297         MP_WritePhyUshort(sc, 0x06, 0x97b7);
17298         MP_WritePhyUshort(sc, 0x06, 0xee8a);
17299         MP_WritePhyUshort(sc, 0x06, 0xc000);
17300         MP_WritePhyUshort(sc, 0x06, 0xee8a);
17301         MP_WritePhyUshort(sc, 0x06, 0xc100);
17302         MP_WritePhyUshort(sc, 0x06, 0xae11);
17303         MP_WritePhyUshort(sc, 0x06, 0x15e6);
17304         MP_WritePhyUshort(sc, 0x06, 0x8ac0);
17305         MP_WritePhyUshort(sc, 0x06, 0xe78a);
17306         MP_WritePhyUshort(sc, 0x06, 0xc1ae);
17307         MP_WritePhyUshort(sc, 0x06, 0x08ee);
17308         MP_WritePhyUshort(sc, 0x06, 0x8ac0);
17309         MP_WritePhyUshort(sc, 0x06, 0x00ee);
17310         MP_WritePhyUshort(sc, 0x06, 0x8ac1);
17311         MP_WritePhyUshort(sc, 0x06, 0x00fd);
17312         MP_WritePhyUshort(sc, 0x06, 0xfc04);
17313         MP_WritePhyUshort(sc, 0x06, 0xae20);
17314         MP_WritePhyUshort(sc, 0x06, 0x0000);
17315         MP_WritePhyUshort(sc, 0x06, 0x0000);
17316         MP_WritePhyUshort(sc, 0x06, 0x0000);
17317         MP_WritePhyUshort(sc, 0x06, 0x0000);
17318         MP_WritePhyUshort(sc, 0x06, 0x0000);
17319         MP_WritePhyUshort(sc, 0x06, 0x0000);
17320         MP_WritePhyUshort(sc, 0x06, 0x0000);
17321         MP_WritePhyUshort(sc, 0x06, 0x0000);
17322         MP_WritePhyUshort(sc, 0x06, 0x0000);
17323         MP_WritePhyUshort(sc, 0x06, 0x0000);
17324         MP_WritePhyUshort(sc, 0x06, 0x0000);
17325         MP_WritePhyUshort(sc, 0x06, 0x0000);
17326         MP_WritePhyUshort(sc, 0x06, 0x0000);
17327         MP_WritePhyUshort(sc, 0x06, 0x0000);
17328         MP_WritePhyUshort(sc, 0x06, 0x0000);
17329         MP_WritePhyUshort(sc, 0x06, 0x0000);
17330         MP_WritePhyUshort(sc, 0x06, 0xf8fa);
17331         MP_WritePhyUshort(sc, 0x06, 0xef69);
17332         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
17333         MP_WritePhyUshort(sc, 0x06, 0x00e1);
17334         MP_WritePhyUshort(sc, 0x06, 0xe001);
17335         MP_WritePhyUshort(sc, 0x06, 0xad27);
17336         MP_WritePhyUshort(sc, 0x06, 0x32e0);
17337         MP_WritePhyUshort(sc, 0x06, 0x8b40);
17338         MP_WritePhyUshort(sc, 0x06, 0xf720);
17339         MP_WritePhyUshort(sc, 0x06, 0xe48b);
17340         MP_WritePhyUshort(sc, 0x06, 0x40bf);
17341         MP_WritePhyUshort(sc, 0x06, 0x3230);
17342         MP_WritePhyUshort(sc, 0x06, 0x0238);
17343         MP_WritePhyUshort(sc, 0x06, 0x50ad);
17344         MP_WritePhyUshort(sc, 0x06, 0x2821);
17345         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
17346         MP_WritePhyUshort(sc, 0x06, 0x20e1);
17347         MP_WritePhyUshort(sc, 0x06, 0xe021);
17348         MP_WritePhyUshort(sc, 0x06, 0xad20);
17349         MP_WritePhyUshort(sc, 0x06, 0x18e0);
17350         MP_WritePhyUshort(sc, 0x06, 0x8b40);
17351         MP_WritePhyUshort(sc, 0x06, 0xf620);
17352         MP_WritePhyUshort(sc, 0x06, 0xe48b);
17353         MP_WritePhyUshort(sc, 0x06, 0x40ee);
17354         MP_WritePhyUshort(sc, 0x06, 0x8b3b);
17355         MP_WritePhyUshort(sc, 0x06, 0xffe0);
17356         MP_WritePhyUshort(sc, 0x06, 0x8a8a);
17357         MP_WritePhyUshort(sc, 0x06, 0xe18a);
17358         MP_WritePhyUshort(sc, 0x06, 0x8be4);
17359         MP_WritePhyUshort(sc, 0x06, 0xe000);
17360         MP_WritePhyUshort(sc, 0x06, 0xe5e0);
17361         MP_WritePhyUshort(sc, 0x06, 0x01ef);
17362         MP_WritePhyUshort(sc, 0x06, 0x96fe);
17363         MP_WritePhyUshort(sc, 0x06, 0xfc04);
17364         MP_WritePhyUshort(sc, 0x06, 0xf8f9);
17365         MP_WritePhyUshort(sc, 0x06, 0xface);
17366         MP_WritePhyUshort(sc, 0x06, 0xfaef);
17367         MP_WritePhyUshort(sc, 0x06, 0x69fa);
17368         MP_WritePhyUshort(sc, 0x06, 0xd401);
17369         MP_WritePhyUshort(sc, 0x06, 0x55b4);
17370         MP_WritePhyUshort(sc, 0x06, 0xfebf);
17371         MP_WritePhyUshort(sc, 0x06, 0x1c1e);
17372         MP_WritePhyUshort(sc, 0x06, 0x0238);
17373         MP_WritePhyUshort(sc, 0x06, 0x50ac);
17374         MP_WritePhyUshort(sc, 0x06, 0x280b);
17375         MP_WritePhyUshort(sc, 0x06, 0xbf1c);
17376         MP_WritePhyUshort(sc, 0x06, 0x1b02);
17377         MP_WritePhyUshort(sc, 0x06, 0x3850);
17378         MP_WritePhyUshort(sc, 0x06, 0xac28);
17379         MP_WritePhyUshort(sc, 0x06, 0x49ae);
17380         MP_WritePhyUshort(sc, 0x06, 0x64bf);
17381         MP_WritePhyUshort(sc, 0x06, 0x1c1b);
17382         MP_WritePhyUshort(sc, 0x06, 0x0238);
17383         MP_WritePhyUshort(sc, 0x06, 0x50ac);
17384         MP_WritePhyUshort(sc, 0x06, 0x285b);
17385         MP_WritePhyUshort(sc, 0x06, 0xd000);
17386         MP_WritePhyUshort(sc, 0x06, 0x0284);
17387         MP_WritePhyUshort(sc, 0x06, 0xcaac);
17388         MP_WritePhyUshort(sc, 0x06, 0x2105);
17389         MP_WritePhyUshort(sc, 0x06, 0xac22);
17390         MP_WritePhyUshort(sc, 0x06, 0x02ae);
17391         MP_WritePhyUshort(sc, 0x06, 0x4ebf);
17392         MP_WritePhyUshort(sc, 0x06, 0xe0c4);
17393         MP_WritePhyUshort(sc, 0x06, 0xbe85);
17394         MP_WritePhyUshort(sc, 0x06, 0xf6d2);
17395         MP_WritePhyUshort(sc, 0x06, 0x04d8);
17396         MP_WritePhyUshort(sc, 0x06, 0x19d9);
17397         MP_WritePhyUshort(sc, 0x06, 0x1907);
17398         MP_WritePhyUshort(sc, 0x06, 0xdc19);
17399         MP_WritePhyUshort(sc, 0x06, 0xdd19);
17400         MP_WritePhyUshort(sc, 0x06, 0x0789);
17401         MP_WritePhyUshort(sc, 0x06, 0x89ef);
17402         MP_WritePhyUshort(sc, 0x06, 0x645e);
17403         MP_WritePhyUshort(sc, 0x06, 0x07ff);
17404         MP_WritePhyUshort(sc, 0x06, 0x0d65);
17405         MP_WritePhyUshort(sc, 0x06, 0x5cf8);
17406         MP_WritePhyUshort(sc, 0x06, 0x001e);
17407         MP_WritePhyUshort(sc, 0x06, 0x46dc);
17408         MP_WritePhyUshort(sc, 0x06, 0x19dd);
17409         MP_WritePhyUshort(sc, 0x06, 0x19b2);
17410         MP_WritePhyUshort(sc, 0x06, 0xe2d4);
17411         MP_WritePhyUshort(sc, 0x06, 0x0001);
17412         MP_WritePhyUshort(sc, 0x06, 0xbf1c);
17413         MP_WritePhyUshort(sc, 0x06, 0x1b02);
17414         MP_WritePhyUshort(sc, 0x06, 0x387d);
17415         MP_WritePhyUshort(sc, 0x06, 0xae1d);
17416         MP_WritePhyUshort(sc, 0x06, 0xbee0);
17417         MP_WritePhyUshort(sc, 0x06, 0xc4bf);
17418         MP_WritePhyUshort(sc, 0x06, 0x85f6);
17419         MP_WritePhyUshort(sc, 0x06, 0xd204);
17420         MP_WritePhyUshort(sc, 0x06, 0xd819);
17421         MP_WritePhyUshort(sc, 0x06, 0xd919);
17422         MP_WritePhyUshort(sc, 0x06, 0x07dc);
17423         MP_WritePhyUshort(sc, 0x06, 0x19dd);
17424         MP_WritePhyUshort(sc, 0x06, 0x1907);
17425         MP_WritePhyUshort(sc, 0x06, 0xb2f4);
17426         MP_WritePhyUshort(sc, 0x06, 0xd400);
17427         MP_WritePhyUshort(sc, 0x06, 0x00bf);
17428         MP_WritePhyUshort(sc, 0x06, 0x1c1b);
17429         MP_WritePhyUshort(sc, 0x06, 0x0238);
17430         MP_WritePhyUshort(sc, 0x06, 0x7dfe);
17431         MP_WritePhyUshort(sc, 0x06, 0xef96);
17432         MP_WritePhyUshort(sc, 0x06, 0xfec6);
17433         MP_WritePhyUshort(sc, 0x06, 0xfefd);
17434         MP_WritePhyUshort(sc, 0x06, 0xfc05);
17435         MP_WritePhyUshort(sc, 0x06, 0xf9e2);
17436         MP_WritePhyUshort(sc, 0x06, 0xe0ea);
17437         MP_WritePhyUshort(sc, 0x06, 0xe3e0);
17438         MP_WritePhyUshort(sc, 0x06, 0xeb5a);
17439         MP_WritePhyUshort(sc, 0x06, 0x070c);
17440         MP_WritePhyUshort(sc, 0x06, 0x031e);
17441         MP_WritePhyUshort(sc, 0x06, 0x20e6);
17442         MP_WritePhyUshort(sc, 0x06, 0xe0ea);
17443         MP_WritePhyUshort(sc, 0x06, 0xe7e0);
17444         MP_WritePhyUshort(sc, 0x06, 0xebe0);
17445         MP_WritePhyUshort(sc, 0x06, 0xe0fc);
17446         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
17447         MP_WritePhyUshort(sc, 0x06, 0xfdfd);
17448         MP_WritePhyUshort(sc, 0x06, 0x04f8);
17449         MP_WritePhyUshort(sc, 0x06, 0xfaef);
17450         MP_WritePhyUshort(sc, 0x06, 0x69e0);
17451         MP_WritePhyUshort(sc, 0x06, 0x8b80);
17452         MP_WritePhyUshort(sc, 0x06, 0xad27);
17453         MP_WritePhyUshort(sc, 0x06, 0x22bf);
17454         MP_WritePhyUshort(sc, 0x06, 0x4616);
17455         MP_WritePhyUshort(sc, 0x06, 0x0238);
17456         MP_WritePhyUshort(sc, 0x06, 0x50e0);
17457         MP_WritePhyUshort(sc, 0x06, 0x8b44);
17458         MP_WritePhyUshort(sc, 0x06, 0x1f01);
17459         MP_WritePhyUshort(sc, 0x06, 0x9e15);
17460         MP_WritePhyUshort(sc, 0x06, 0xe58b);
17461         MP_WritePhyUshort(sc, 0x06, 0x44ad);
17462         MP_WritePhyUshort(sc, 0x06, 0x2907);
17463         MP_WritePhyUshort(sc, 0x06, 0xac28);
17464         MP_WritePhyUshort(sc, 0x06, 0x04d1);
17465         MP_WritePhyUshort(sc, 0x06, 0x01ae);
17466         MP_WritePhyUshort(sc, 0x06, 0x02d1);
17467         MP_WritePhyUshort(sc, 0x06, 0x00bf);
17468         MP_WritePhyUshort(sc, 0x06, 0x85b0);
17469         MP_WritePhyUshort(sc, 0x06, 0x0238);
17470         MP_WritePhyUshort(sc, 0x06, 0x7def);
17471         MP_WritePhyUshort(sc, 0x06, 0x96fe);
17472         MP_WritePhyUshort(sc, 0x06, 0xfc04);
17473         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
17474         MP_WritePhyUshort(sc, 0x06, 0x8b85);
17475         MP_WritePhyUshort(sc, 0x06, 0xad26);
17476         MP_WritePhyUshort(sc, 0x06, 0x30e0);
17477         MP_WritePhyUshort(sc, 0x06, 0xe036);
17478         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
17479         MP_WritePhyUshort(sc, 0x06, 0x37e1);
17480         MP_WritePhyUshort(sc, 0x06, 0x8b3f);
17481         MP_WritePhyUshort(sc, 0x06, 0x1f10);
17482         MP_WritePhyUshort(sc, 0x06, 0x9e23);
17483         MP_WritePhyUshort(sc, 0x06, 0xe48b);
17484         MP_WritePhyUshort(sc, 0x06, 0x3fac);
17485         MP_WritePhyUshort(sc, 0x06, 0x200b);
17486         MP_WritePhyUshort(sc, 0x06, 0xac21);
17487         MP_WritePhyUshort(sc, 0x06, 0x0dac);
17488         MP_WritePhyUshort(sc, 0x06, 0x250f);
17489         MP_WritePhyUshort(sc, 0x06, 0xac27);
17490         MP_WritePhyUshort(sc, 0x06, 0x11ae);
17491         MP_WritePhyUshort(sc, 0x06, 0x1202);
17492         MP_WritePhyUshort(sc, 0x06, 0x2c47);
17493         MP_WritePhyUshort(sc, 0x06, 0xae0d);
17494         MP_WritePhyUshort(sc, 0x06, 0x0285);
17495         MP_WritePhyUshort(sc, 0x06, 0x4fae);
17496         MP_WritePhyUshort(sc, 0x06, 0x0802);
17497         MP_WritePhyUshort(sc, 0x06, 0x2c69);
17498         MP_WritePhyUshort(sc, 0x06, 0xae03);
17499         MP_WritePhyUshort(sc, 0x06, 0x022c);
17500         MP_WritePhyUshort(sc, 0x06, 0x7cfc);
17501         MP_WritePhyUshort(sc, 0x06, 0x04f8);
17502         MP_WritePhyUshort(sc, 0x06, 0xfaef);
17503         MP_WritePhyUshort(sc, 0x06, 0x6902);
17504         MP_WritePhyUshort(sc, 0x06, 0x856c);
17505         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
17506         MP_WritePhyUshort(sc, 0x06, 0x14e1);
17507         MP_WritePhyUshort(sc, 0x06, 0xe015);
17508         MP_WritePhyUshort(sc, 0x06, 0xad26);
17509         MP_WritePhyUshort(sc, 0x06, 0x08d1);
17510         MP_WritePhyUshort(sc, 0x06, 0x1ebf);
17511         MP_WritePhyUshort(sc, 0x06, 0x2cd9);
17512         MP_WritePhyUshort(sc, 0x06, 0x0238);
17513         MP_WritePhyUshort(sc, 0x06, 0x7def);
17514         MP_WritePhyUshort(sc, 0x06, 0x96fe);
17515         MP_WritePhyUshort(sc, 0x06, 0xfc04);
17516         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
17517         MP_WritePhyUshort(sc, 0x06, 0x8b85);
17518         MP_WritePhyUshort(sc, 0x06, 0xad27);
17519         MP_WritePhyUshort(sc, 0x06, 0x2fd0);
17520         MP_WritePhyUshort(sc, 0x06, 0x0b02);
17521         MP_WritePhyUshort(sc, 0x06, 0x3682);
17522         MP_WritePhyUshort(sc, 0x06, 0x5882);
17523         MP_WritePhyUshort(sc, 0x06, 0x7882);
17524         MP_WritePhyUshort(sc, 0x06, 0x9f24);
17525         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17526         MP_WritePhyUshort(sc, 0x06, 0x32e1);
17527         MP_WritePhyUshort(sc, 0x06, 0x8b33);
17528         MP_WritePhyUshort(sc, 0x06, 0x1f10);
17529         MP_WritePhyUshort(sc, 0x06, 0x9e1a);
17530         MP_WritePhyUshort(sc, 0x06, 0x10e4);
17531         MP_WritePhyUshort(sc, 0x06, 0x8b32);
17532         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
17533         MP_WritePhyUshort(sc, 0x06, 0x28e1);
17534         MP_WritePhyUshort(sc, 0x06, 0xe029);
17535         MP_WritePhyUshort(sc, 0x06, 0xf72c);
17536         MP_WritePhyUshort(sc, 0x06, 0xe4e0);
17537         MP_WritePhyUshort(sc, 0x06, 0x28e5);
17538         MP_WritePhyUshort(sc, 0x06, 0xe029);
17539         MP_WritePhyUshort(sc, 0x06, 0xf62c);
17540         MP_WritePhyUshort(sc, 0x06, 0xe4e0);
17541         MP_WritePhyUshort(sc, 0x06, 0x28e5);
17542         MP_WritePhyUshort(sc, 0x06, 0xe029);
17543         MP_WritePhyUshort(sc, 0x06, 0xfc04);
17544         MP_WritePhyUshort(sc, 0x06, 0x00e1);
17545         MP_WritePhyUshort(sc, 0x06, 0x4077);
17546         MP_WritePhyUshort(sc, 0x06, 0xe140);
17547         MP_WritePhyUshort(sc, 0x06, 0x52e0);
17548         MP_WritePhyUshort(sc, 0x06, 0xeed9);
17549         MP_WritePhyUshort(sc, 0x06, 0xe04c);
17550         MP_WritePhyUshort(sc, 0x06, 0xbbe0);
17551         MP_WritePhyUshort(sc, 0x06, 0x2a00);
17552         MP_WritePhyUshort(sc, 0x05, 0xe142);
17553         PhyRegValue = MP_ReadPhyUshort(sc, 0x06);
17554         PhyRegValue |= BIT_0;
17555         MP_WritePhyUshort(sc, 0x06, PhyRegValue);
17556         MP_WritePhyUshort(sc, 0x05, 0xe140);
17557         PhyRegValue = MP_ReadPhyUshort(sc, 0x06);
17558         PhyRegValue |= BIT_0;
17559         MP_WritePhyUshort(sc, 0x06, PhyRegValue);
17560         MP_WritePhyUshort(sc, 0x1f, 0x0000);
17561         MP_WritePhyUshort(sc, 0x1f, 0x0005);
17562         for (i = 0; i < 200; i++) {
17563                 DELAY(100);
17564                 PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
17565                 if (PhyRegValue & BIT_7)
17566                         break;
17567         }
17568 
17569         MP_WritePhyUshort(sc, 0x1f, 0x0007);
17570         MP_WritePhyUshort(sc, 0x1e, 0x0023);
17571         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
17572         PhyRegValue |= BIT_1;
17573         if (sc->RequiredSecLanDonglePatch)
17574                 PhyRegValue &= ~(BIT_2);
17575         MP_WritePhyUshort(sc, 0x17, PhyRegValue);
17576         MP_WritePhyUshort(sc, 0x1f, 0x0000);
17577 
17578         MP_WritePhyUshort(sc, 0x1f, 0x0003);
17579         MP_WritePhyUshort(sc, 0x09, 0xA20F);
17580         MP_WritePhyUshort(sc, 0x1f, 0x0000);
17581 
17582         MP_WritePhyUshort(sc, 0x1f, 0x0003);
17583         MP_WritePhyUshort(sc, 0x01, 0x328A);
17584         MP_WritePhyUshort(sc, 0x1f, 0x0000);
17585 
17586         MP_WritePhyUshort(sc, 0x1f, 0x0003);
17587         PhyRegValue = MP_ReadPhyUshort(sc, 0x19);
17588         PhyRegValue &= ~BIT_0;
17589         MP_WritePhyUshort(sc, 0x19, PhyRegValue);
17590         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
17591         PhyRegValue &= ~BIT_10;
17592         MP_WritePhyUshort(sc, 0x10, PhyRegValue);
17593         MP_WritePhyUshort(sc, 0x1f, 0x0000);
17594 
17595 
17596         MP_WritePhyUshort(sc, 0x1f, 0x0000);
17597         MP_WritePhyUshort(sc, 0x00, 0x9200);
17598 }
17599 
17600 static void re_set_phy_mcu_8168f_2(struct re_softc *sc)
17601 {
17602         u_int16_t PhyRegValue;
17603         int i;
17604 
17605         MP_WritePhyUshort(sc, 0x1f, 0x0000);
17606         MP_WritePhyUshort(sc, 0x00, 0x1800);
17607         PhyRegValue = MP_ReadPhyUshort(sc, 0x15);
17608         PhyRegValue &= ~(BIT_12);
17609         MP_WritePhyUshort(sc, 0x15, PhyRegValue);
17610         MP_WritePhyUshort(sc, 0x00, 0x9800);
17611         MP_WritePhyUshort(sc, 0x1f, 0x0007);
17612         MP_WritePhyUshort(sc, 0x1e, 0x002f);
17613         for (i = 0; i < 1000; i++) {
17614                 DELAY(100);
17615                 PhyRegValue = MP_ReadPhyUshort(sc, 0x1c);
17616                 if (PhyRegValue & BIT_7)
17617                         break;
17618         }
17619         MP_WritePhyUshort(sc, 0x1f, 0x0007);
17620         MP_WritePhyUshort(sc, 0x1e, 0x0023);
17621         MP_WritePhyUshort(sc, 0x16, 0x0306);
17622         MP_WritePhyUshort(sc, 0x16, 0x0307);
17623         MP_WritePhyUshort(sc, 0x15, 0x0098);
17624         MP_WritePhyUshort(sc, 0x19, 0x7c0b);
17625         MP_WritePhyUshort(sc, 0x15, 0x0099);
17626         MP_WritePhyUshort(sc, 0x19, 0x6c0b);
17627         MP_WritePhyUshort(sc, 0x15, 0x00eb);
17628         MP_WritePhyUshort(sc, 0x19, 0x6c0b);
17629         MP_WritePhyUshort(sc, 0x15, 0x00f8);
17630         MP_WritePhyUshort(sc, 0x19, 0x6f0b);
17631         MP_WritePhyUshort(sc, 0x15, 0x00fe);
17632         MP_WritePhyUshort(sc, 0x19, 0x6f0f);
17633         MP_WritePhyUshort(sc, 0x15, 0x00db);
17634         MP_WritePhyUshort(sc, 0x19, 0x6f09);
17635         MP_WritePhyUshort(sc, 0x15, 0x00dc);
17636         MP_WritePhyUshort(sc, 0x19, 0xaefd);
17637         MP_WritePhyUshort(sc, 0x15, 0x00dd);
17638         MP_WritePhyUshort(sc, 0x19, 0x6f0b);
17639         MP_WritePhyUshort(sc, 0x15, 0x00de);
17640         MP_WritePhyUshort(sc, 0x19, 0xc60b);
17641         MP_WritePhyUshort(sc, 0x15, 0x00df);
17642         MP_WritePhyUshort(sc, 0x19, 0x00fa);
17643         MP_WritePhyUshort(sc, 0x15, 0x00e0);
17644         MP_WritePhyUshort(sc, 0x19, 0x30e1);
17645         MP_WritePhyUshort(sc, 0x15, 0x020c);
17646         MP_WritePhyUshort(sc, 0x19, 0x3224);
17647         MP_WritePhyUshort(sc, 0x15, 0x020e);
17648         MP_WritePhyUshort(sc, 0x19, 0x9813);
17649         MP_WritePhyUshort(sc, 0x15, 0x020f);
17650         MP_WritePhyUshort(sc, 0x19, 0x7801);
17651         MP_WritePhyUshort(sc, 0x15, 0x0210);
17652         MP_WritePhyUshort(sc, 0x19, 0x930f);
17653         MP_WritePhyUshort(sc, 0x15, 0x0211);
17654         MP_WritePhyUshort(sc, 0x19, 0x9206);
17655         MP_WritePhyUshort(sc, 0x15, 0x0212);
17656         MP_WritePhyUshort(sc, 0x19, 0x4002);
17657         MP_WritePhyUshort(sc, 0x15, 0x0213);
17658         MP_WritePhyUshort(sc, 0x19, 0x7800);
17659         MP_WritePhyUshort(sc, 0x15, 0x0214);
17660         MP_WritePhyUshort(sc, 0x19, 0x588f);
17661         MP_WritePhyUshort(sc, 0x15, 0x0215);
17662         MP_WritePhyUshort(sc, 0x19, 0x5520);
17663         MP_WritePhyUshort(sc, 0x15, 0x0216);
17664         MP_WritePhyUshort(sc, 0x19, 0x3224);
17665         MP_WritePhyUshort(sc, 0x15, 0x0217);
17666         MP_WritePhyUshort(sc, 0x19, 0x4002);
17667         MP_WritePhyUshort(sc, 0x15, 0x0218);
17668         MP_WritePhyUshort(sc, 0x19, 0x7800);
17669         MP_WritePhyUshort(sc, 0x15, 0x0219);
17670         MP_WritePhyUshort(sc, 0x19, 0x588d);
17671         MP_WritePhyUshort(sc, 0x15, 0x021a);
17672         MP_WritePhyUshort(sc, 0x19, 0x5540);
17673         MP_WritePhyUshort(sc, 0x15, 0x021b);
17674         MP_WritePhyUshort(sc, 0x19, 0x9e03);
17675         MP_WritePhyUshort(sc, 0x15, 0x021c);
17676         MP_WritePhyUshort(sc, 0x19, 0x7c40);
17677         MP_WritePhyUshort(sc, 0x15, 0x021d);
17678         MP_WritePhyUshort(sc, 0x19, 0x6840);
17679         MP_WritePhyUshort(sc, 0x15, 0x021e);
17680         MP_WritePhyUshort(sc, 0x19, 0x3224);
17681         MP_WritePhyUshort(sc, 0x15, 0x021f);
17682         MP_WritePhyUshort(sc, 0x19, 0x4002);
17683         MP_WritePhyUshort(sc, 0x15, 0x0220);
17684         MP_WritePhyUshort(sc, 0x19, 0x3224);
17685         MP_WritePhyUshort(sc, 0x15, 0x0221);
17686         MP_WritePhyUshort(sc, 0x19, 0x9e03);
17687         MP_WritePhyUshort(sc, 0x15, 0x0222);
17688         MP_WritePhyUshort(sc, 0x19, 0x7c40);
17689         MP_WritePhyUshort(sc, 0x15, 0x0223);
17690         MP_WritePhyUshort(sc, 0x19, 0x6840);
17691         MP_WritePhyUshort(sc, 0x15, 0x0224);
17692         MP_WritePhyUshort(sc, 0x19, 0x7800);
17693         MP_WritePhyUshort(sc, 0x15, 0x0225);
17694         MP_WritePhyUshort(sc, 0x19, 0x3231);
17695         MP_WritePhyUshort(sc, 0x15, 0x0000);
17696         MP_WritePhyUshort(sc, 0x16, 0x0306);
17697         MP_WritePhyUshort(sc, 0x16, 0x0300);
17698         MP_WritePhyUshort(sc, 0x1f, 0x0000);
17699         MP_WritePhyUshort(sc, 0x1f, 0x0005);
17700         MP_WritePhyUshort(sc, 0x05, 0xfff6);
17701         MP_WritePhyUshort(sc, 0x06, 0x0080);
17702         MP_WritePhyUshort(sc, 0x05, 0x8000);
17703         MP_WritePhyUshort(sc, 0x06, 0x0280);
17704         MP_WritePhyUshort(sc, 0x06, 0x48f7);
17705         MP_WritePhyUshort(sc, 0x06, 0x00e0);
17706         MP_WritePhyUshort(sc, 0x06, 0xfff7);
17707         MP_WritePhyUshort(sc, 0x06, 0xa080);
17708         MP_WritePhyUshort(sc, 0x06, 0x02ae);
17709         MP_WritePhyUshort(sc, 0x06, 0xf602);
17710         MP_WritePhyUshort(sc, 0x06, 0x011b);
17711         MP_WritePhyUshort(sc, 0x06, 0x0201);
17712         MP_WritePhyUshort(sc, 0x06, 0x2802);
17713         MP_WritePhyUshort(sc, 0x06, 0x0135);
17714         MP_WritePhyUshort(sc, 0x06, 0x0201);
17715         MP_WritePhyUshort(sc, 0x06, 0x4502);
17716         MP_WritePhyUshort(sc, 0x06, 0x015f);
17717         MP_WritePhyUshort(sc, 0x06, 0x0280);
17718         MP_WritePhyUshort(sc, 0x06, 0x6b02);
17719         MP_WritePhyUshort(sc, 0x06, 0x80e5);
17720         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17721         MP_WritePhyUshort(sc, 0x06, 0x88e1);
17722         MP_WritePhyUshort(sc, 0x06, 0x8b89);
17723         MP_WritePhyUshort(sc, 0x06, 0x1e01);
17724         MP_WritePhyUshort(sc, 0x06, 0xe18b);
17725         MP_WritePhyUshort(sc, 0x06, 0x8a1e);
17726         MP_WritePhyUshort(sc, 0x06, 0x01e1);
17727         MP_WritePhyUshort(sc, 0x06, 0x8b8b);
17728         MP_WritePhyUshort(sc, 0x06, 0x1e01);
17729         MP_WritePhyUshort(sc, 0x06, 0xe18b);
17730         MP_WritePhyUshort(sc, 0x06, 0x8c1e);
17731         MP_WritePhyUshort(sc, 0x06, 0x01e1);
17732         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
17733         MP_WritePhyUshort(sc, 0x06, 0x1e01);
17734         MP_WritePhyUshort(sc, 0x06, 0xe18b);
17735         MP_WritePhyUshort(sc, 0x06, 0x8e1e);
17736         MP_WritePhyUshort(sc, 0x06, 0x01a0);
17737         MP_WritePhyUshort(sc, 0x06, 0x00c7);
17738         MP_WritePhyUshort(sc, 0x06, 0xaebb);
17739         MP_WritePhyUshort(sc, 0x06, 0xbf8b);
17740         MP_WritePhyUshort(sc, 0x06, 0x88ec);
17741         MP_WritePhyUshort(sc, 0x06, 0x0019);
17742         MP_WritePhyUshort(sc, 0x06, 0xa98b);
17743         MP_WritePhyUshort(sc, 0x06, 0x90f9);
17744         MP_WritePhyUshort(sc, 0x06, 0xeeff);
17745         MP_WritePhyUshort(sc, 0x06, 0xf600);
17746         MP_WritePhyUshort(sc, 0x06, 0xeeff);
17747         MP_WritePhyUshort(sc, 0x06, 0xf7fe);
17748         MP_WritePhyUshort(sc, 0x06, 0xd100);
17749         MP_WritePhyUshort(sc, 0x06, 0xbf81);
17750         MP_WritePhyUshort(sc, 0x06, 0x9802);
17751         MP_WritePhyUshort(sc, 0x06, 0x39f3);
17752         MP_WritePhyUshort(sc, 0x06, 0xd101);
17753         MP_WritePhyUshort(sc, 0x06, 0xbf81);
17754         MP_WritePhyUshort(sc, 0x06, 0x9b02);
17755         MP_WritePhyUshort(sc, 0x06, 0x39f3);
17756         MP_WritePhyUshort(sc, 0x06, 0x04f8);
17757         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17758         MP_WritePhyUshort(sc, 0x06, 0x8dad);
17759         MP_WritePhyUshort(sc, 0x06, 0x2014);
17760         MP_WritePhyUshort(sc, 0x06, 0xee8b);
17761         MP_WritePhyUshort(sc, 0x06, 0x8d00);
17762         MP_WritePhyUshort(sc, 0x06, 0xe08a);
17763         MP_WritePhyUshort(sc, 0x06, 0x5a78);
17764         MP_WritePhyUshort(sc, 0x06, 0x039e);
17765         MP_WritePhyUshort(sc, 0x06, 0x0902);
17766         MP_WritePhyUshort(sc, 0x06, 0x05fc);
17767         MP_WritePhyUshort(sc, 0x06, 0x0280);
17768         MP_WritePhyUshort(sc, 0x06, 0x8802);
17769         MP_WritePhyUshort(sc, 0x06, 0x32dd);
17770         MP_WritePhyUshort(sc, 0x06, 0xfc04);
17771         MP_WritePhyUshort(sc, 0x06, 0xf8f9);
17772         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17773         MP_WritePhyUshort(sc, 0x06, 0x81ac);
17774         MP_WritePhyUshort(sc, 0x06, 0x261a);
17775         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17776         MP_WritePhyUshort(sc, 0x06, 0x81ac);
17777         MP_WritePhyUshort(sc, 0x06, 0x2114);
17778         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17779         MP_WritePhyUshort(sc, 0x06, 0x85ac);
17780         MP_WritePhyUshort(sc, 0x06, 0x200e);
17781         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17782         MP_WritePhyUshort(sc, 0x06, 0x85ac);
17783         MP_WritePhyUshort(sc, 0x06, 0x2308);
17784         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17785         MP_WritePhyUshort(sc, 0x06, 0x87ac);
17786         MP_WritePhyUshort(sc, 0x06, 0x2402);
17787         MP_WritePhyUshort(sc, 0x06, 0xae38);
17788         MP_WritePhyUshort(sc, 0x06, 0x021a);
17789         MP_WritePhyUshort(sc, 0x06, 0xd6ee);
17790         MP_WritePhyUshort(sc, 0x06, 0xe41c);
17791         MP_WritePhyUshort(sc, 0x06, 0x04ee);
17792         MP_WritePhyUshort(sc, 0x06, 0xe41d);
17793         MP_WritePhyUshort(sc, 0x06, 0x04e2);
17794         MP_WritePhyUshort(sc, 0x06, 0xe07c);
17795         MP_WritePhyUshort(sc, 0x06, 0xe3e0);
17796         MP_WritePhyUshort(sc, 0x06, 0x7de0);
17797         MP_WritePhyUshort(sc, 0x06, 0xe038);
17798         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
17799         MP_WritePhyUshort(sc, 0x06, 0x39ad);
17800         MP_WritePhyUshort(sc, 0x06, 0x2e1b);
17801         MP_WritePhyUshort(sc, 0x06, 0xad39);
17802         MP_WritePhyUshort(sc, 0x06, 0x0dd1);
17803         MP_WritePhyUshort(sc, 0x06, 0x01bf);
17804         MP_WritePhyUshort(sc, 0x06, 0x22c8);
17805         MP_WritePhyUshort(sc, 0x06, 0x0239);
17806         MP_WritePhyUshort(sc, 0x06, 0xf302);
17807         MP_WritePhyUshort(sc, 0x06, 0x21f0);
17808         MP_WritePhyUshort(sc, 0x06, 0xae0b);
17809         MP_WritePhyUshort(sc, 0x06, 0xac38);
17810         MP_WritePhyUshort(sc, 0x06, 0x02ae);
17811         MP_WritePhyUshort(sc, 0x06, 0x0602);
17812         MP_WritePhyUshort(sc, 0x06, 0x222d);
17813         MP_WritePhyUshort(sc, 0x06, 0x0222);
17814         MP_WritePhyUshort(sc, 0x06, 0x7202);
17815         MP_WritePhyUshort(sc, 0x06, 0x1ae7);
17816         MP_WritePhyUshort(sc, 0x06, 0xfdfc);
17817         MP_WritePhyUshort(sc, 0x06, 0x04f8);
17818         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17819         MP_WritePhyUshort(sc, 0x06, 0x8ead);
17820         MP_WritePhyUshort(sc, 0x06, 0x201a);
17821         MP_WritePhyUshort(sc, 0x06, 0xf620);
17822         MP_WritePhyUshort(sc, 0x06, 0xe48b);
17823         MP_WritePhyUshort(sc, 0x06, 0x8e02);
17824         MP_WritePhyUshort(sc, 0x06, 0x2afe);
17825         MP_WritePhyUshort(sc, 0x06, 0x022c);
17826         MP_WritePhyUshort(sc, 0x06, 0x5c02);
17827         MP_WritePhyUshort(sc, 0x06, 0x03c5);
17828         MP_WritePhyUshort(sc, 0x06, 0x0281);
17829         MP_WritePhyUshort(sc, 0x06, 0x6702);
17830         MP_WritePhyUshort(sc, 0x06, 0x2e4f);
17831         MP_WritePhyUshort(sc, 0x06, 0x0204);
17832         MP_WritePhyUshort(sc, 0x06, 0x8902);
17833         MP_WritePhyUshort(sc, 0x06, 0x2f7a);
17834         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17835         MP_WritePhyUshort(sc, 0x06, 0x8ead);
17836         MP_WritePhyUshort(sc, 0x06, 0x210b);
17837         MP_WritePhyUshort(sc, 0x06, 0xf621);
17838         MP_WritePhyUshort(sc, 0x06, 0xe48b);
17839         MP_WritePhyUshort(sc, 0x06, 0x8e02);
17840         MP_WritePhyUshort(sc, 0x06, 0x0445);
17841         MP_WritePhyUshort(sc, 0x06, 0x021c);
17842         MP_WritePhyUshort(sc, 0x06, 0xb8e0);
17843         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
17844         MP_WritePhyUshort(sc, 0x06, 0xad22);
17845         MP_WritePhyUshort(sc, 0x06, 0x08f6);
17846         MP_WritePhyUshort(sc, 0x06, 0x22e4);
17847         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
17848         MP_WritePhyUshort(sc, 0x06, 0x0235);
17849         MP_WritePhyUshort(sc, 0x06, 0xd4e0);
17850         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
17851         MP_WritePhyUshort(sc, 0x06, 0xad23);
17852         MP_WritePhyUshort(sc, 0x06, 0x08f6);
17853         MP_WritePhyUshort(sc, 0x06, 0x23e4);
17854         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
17855         MP_WritePhyUshort(sc, 0x06, 0x0231);
17856         MP_WritePhyUshort(sc, 0x06, 0xc8e0);
17857         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
17858         MP_WritePhyUshort(sc, 0x06, 0xad24);
17859         MP_WritePhyUshort(sc, 0x06, 0x05f6);
17860         MP_WritePhyUshort(sc, 0x06, 0x24e4);
17861         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
17862         MP_WritePhyUshort(sc, 0x06, 0xe08b);
17863         MP_WritePhyUshort(sc, 0x06, 0x8ead);
17864         MP_WritePhyUshort(sc, 0x06, 0x2505);
17865         MP_WritePhyUshort(sc, 0x06, 0xf625);
17866         MP_WritePhyUshort(sc, 0x06, 0xe48b);
17867         MP_WritePhyUshort(sc, 0x06, 0x8ee0);
17868         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
17869         MP_WritePhyUshort(sc, 0x06, 0xad26);
17870         MP_WritePhyUshort(sc, 0x06, 0x08f6);
17871         MP_WritePhyUshort(sc, 0x06, 0x26e4);
17872         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
17873         MP_WritePhyUshort(sc, 0x06, 0x022d);
17874         MP_WritePhyUshort(sc, 0x06, 0x6ae0);
17875         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
17876         MP_WritePhyUshort(sc, 0x06, 0xad27);
17877         MP_WritePhyUshort(sc, 0x06, 0x05f6);
17878         MP_WritePhyUshort(sc, 0x06, 0x27e4);
17879         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
17880         MP_WritePhyUshort(sc, 0x06, 0x0203);
17881         MP_WritePhyUshort(sc, 0x06, 0x8bfc);
17882         MP_WritePhyUshort(sc, 0x06, 0x04f8);
17883         MP_WritePhyUshort(sc, 0x06, 0xfaef);
17884         MP_WritePhyUshort(sc, 0x06, 0x69e0);
17885         MP_WritePhyUshort(sc, 0x06, 0x8b80);
17886         MP_WritePhyUshort(sc, 0x06, 0xad27);
17887         MP_WritePhyUshort(sc, 0x06, 0x22bf);
17888         MP_WritePhyUshort(sc, 0x06, 0x479a);
17889         MP_WritePhyUshort(sc, 0x06, 0x0239);
17890         MP_WritePhyUshort(sc, 0x06, 0xc6e0);
17891         MP_WritePhyUshort(sc, 0x06, 0x8b44);
17892         MP_WritePhyUshort(sc, 0x06, 0x1f01);
17893         MP_WritePhyUshort(sc, 0x06, 0x9e15);
17894         MP_WritePhyUshort(sc, 0x06, 0xe58b);
17895         MP_WritePhyUshort(sc, 0x06, 0x44ad);
17896         MP_WritePhyUshort(sc, 0x06, 0x2907);
17897         MP_WritePhyUshort(sc, 0x06, 0xac28);
17898         MP_WritePhyUshort(sc, 0x06, 0x04d1);
17899         MP_WritePhyUshort(sc, 0x06, 0x01ae);
17900         MP_WritePhyUshort(sc, 0x06, 0x02d1);
17901         MP_WritePhyUshort(sc, 0x06, 0x00bf);
17902         MP_WritePhyUshort(sc, 0x06, 0x819e);
17903         MP_WritePhyUshort(sc, 0x06, 0x0239);
17904         MP_WritePhyUshort(sc, 0x06, 0xf3ef);
17905         MP_WritePhyUshort(sc, 0x06, 0x96fe);
17906         MP_WritePhyUshort(sc, 0x06, 0xfc04);
17907         MP_WritePhyUshort(sc, 0x06, 0x00e1);
17908         MP_WritePhyUshort(sc, 0x06, 0x4077);
17909         MP_WritePhyUshort(sc, 0x06, 0xe140);
17910         MP_WritePhyUshort(sc, 0x06, 0xbbe0);
17911         MP_WritePhyUshort(sc, 0x06, 0x2a00);
17912         MP_WritePhyUshort(sc, 0x05, 0xe142);
17913         PhyRegValue = MP_ReadPhyUshort(sc, 0x06);
17914         PhyRegValue |= BIT_0;
17915         MP_WritePhyUshort(sc, 0x06, PhyRegValue);
17916         MP_WritePhyUshort(sc, 0x05, 0xe140);
17917         PhyRegValue = MP_ReadPhyUshort(sc, 0x06);
17918         PhyRegValue |= BIT_0;
17919         MP_WritePhyUshort(sc, 0x06, PhyRegValue);
17920         MP_WritePhyUshort(sc, 0x1f, 0x0000);
17921         MP_WritePhyUshort(sc, 0x1f, 0x0007);
17922         MP_WritePhyUshort(sc, 0x1e, 0x0023);
17923         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
17924         PhyRegValue |= BIT_1;
17925         if (sc->RequiredSecLanDonglePatch)
17926                 PhyRegValue &= ~(BIT_2);
17927         MP_WritePhyUshort(sc, 0x17, PhyRegValue);
17928         MP_WritePhyUshort(sc, 0x1f, 0x0000);
17929 
17930         MP_WritePhyUshort(sc, 0x1f, 0x0003);
17931         PhyRegValue = MP_ReadPhyUshort(sc, 0x19);
17932         PhyRegValue &= ~BIT_0;
17933         MP_WritePhyUshort(sc, 0x19, PhyRegValue);
17934         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
17935         PhyRegValue &= ~BIT_10;
17936         MP_WritePhyUshort(sc, 0x10, PhyRegValue);
17937 
17938         MP_WritePhyUshort(sc, 0x1f, 0x0000);
17939         MP_WritePhyUshort(sc, 0x00, 0x9200);
17940 }
17941 
17942 static void re_set_phy_mcu_8411_1(struct re_softc *sc)
17943 {
17944         u_int16_t PhyRegValue;
17945         int i;
17946 
17947         MP_WritePhyUshort(sc, 0x1f, 0x0000);
17948         MP_WritePhyUshort(sc, 0x00, 0x1800);
17949         PhyRegValue = MP_ReadPhyUshort(sc, 0x15);
17950         PhyRegValue &= ~(BIT_12);
17951         MP_WritePhyUshort(sc, 0x15, PhyRegValue);
17952         MP_WritePhyUshort(sc, 0x00, 0x4800);
17953         MP_WritePhyUshort(sc, 0x1f, 0x0007);
17954         MP_WritePhyUshort(sc, 0x1e, 0x002f);
17955         for (i = 0; i < 1000; i++) {
17956                 DELAY(100);
17957                 PhyRegValue = MP_ReadPhyUshort(sc, 0x1c);
17958                 if (PhyRegValue & BIT_7)
17959                         break;
17960         }
17961         MP_WritePhyUshort(sc, 0x1f, 0x0000);
17962         MP_WritePhyUshort(sc, 0x00, 0x1800);
17963         MP_WritePhyUshort(sc, 0x1f, 0x0007);
17964         MP_WritePhyUshort(sc, 0x1e, 0x0023);
17965         for (i = 0; i < 200; i++) {
17966                 DELAY(100);
17967                 PhyRegValue = MP_ReadPhyUshort(sc, 0x18);
17968                 if (!(PhyRegValue & BIT_0))
17969                         break;
17970         }
17971         MP_WritePhyUshort(sc, 0x1f, 0x0005);
17972         MP_WritePhyUshort(sc, 0x05, 0xfff6);
17973         MP_WritePhyUshort(sc, 0x06, 0x0080);
17974         MP_WritePhyUshort(sc, 0x1f, 0x0007);
17975         MP_WritePhyUshort(sc, 0x1e, 0x0023);
17976         MP_WritePhyUshort(sc, 0x16, 0x0306);
17977         MP_WritePhyUshort(sc, 0x16, 0x0307);
17978         MP_WritePhyUshort(sc, 0x15, 0x0098);
17979         MP_WritePhyUshort(sc, 0x19, 0x7c0b);
17980         MP_WritePhyUshort(sc, 0x15, 0x0099);
17981         MP_WritePhyUshort(sc, 0x19, 0x6c0b);
17982         MP_WritePhyUshort(sc, 0x15, 0x00eb);
17983         MP_WritePhyUshort(sc, 0x19, 0x6c0b);
17984         MP_WritePhyUshort(sc, 0x15, 0x00f8);
17985         MP_WritePhyUshort(sc, 0x19, 0x6f0b);
17986         MP_WritePhyUshort(sc, 0x15, 0x00fe);
17987         MP_WritePhyUshort(sc, 0x19, 0x6f0f);
17988         MP_WritePhyUshort(sc, 0x15, 0x00db);
17989         MP_WritePhyUshort(sc, 0x19, 0x6f09);
17990         MP_WritePhyUshort(sc, 0x15, 0x00dc);
17991         MP_WritePhyUshort(sc, 0x19, 0xaefd);
17992         MP_WritePhyUshort(sc, 0x15, 0x00dd);
17993         MP_WritePhyUshort(sc, 0x19, 0x6f0b);
17994         MP_WritePhyUshort(sc, 0x15, 0x00de);
17995         MP_WritePhyUshort(sc, 0x19, 0xc60b);
17996         MP_WritePhyUshort(sc, 0x15, 0x00df);
17997         MP_WritePhyUshort(sc, 0x19, 0x00fa);
17998         MP_WritePhyUshort(sc, 0x15, 0x00e0);
17999         MP_WritePhyUshort(sc, 0x19, 0x30e1);
18000         MP_WritePhyUshort(sc, 0x15, 0x020c);
18001         MP_WritePhyUshort(sc, 0x19, 0x3224);
18002         MP_WritePhyUshort(sc, 0x15, 0x020e);
18003         MP_WritePhyUshort(sc, 0x19, 0x9813);
18004         MP_WritePhyUshort(sc, 0x15, 0x020f);
18005         MP_WritePhyUshort(sc, 0x19, 0x7801);
18006         MP_WritePhyUshort(sc, 0x15, 0x0210);
18007         MP_WritePhyUshort(sc, 0x19, 0x930f);
18008         MP_WritePhyUshort(sc, 0x15, 0x0211);
18009         MP_WritePhyUshort(sc, 0x19, 0x9206);
18010         MP_WritePhyUshort(sc, 0x15, 0x0212);
18011         MP_WritePhyUshort(sc, 0x19, 0x4002);
18012         MP_WritePhyUshort(sc, 0x15, 0x0213);
18013         MP_WritePhyUshort(sc, 0x19, 0x7800);
18014         MP_WritePhyUshort(sc, 0x15, 0x0214);
18015         MP_WritePhyUshort(sc, 0x19, 0x588f);
18016         MP_WritePhyUshort(sc, 0x15, 0x0215);
18017         MP_WritePhyUshort(sc, 0x19, 0x5520);
18018         MP_WritePhyUshort(sc, 0x15, 0x0216);
18019         MP_WritePhyUshort(sc, 0x19, 0x3224);
18020         MP_WritePhyUshort(sc, 0x15, 0x0217);
18021         MP_WritePhyUshort(sc, 0x19, 0x4002);
18022         MP_WritePhyUshort(sc, 0x15, 0x0218);
18023         MP_WritePhyUshort(sc, 0x19, 0x7800);
18024         MP_WritePhyUshort(sc, 0x15, 0x0219);
18025         MP_WritePhyUshort(sc, 0x19, 0x588d);
18026         MP_WritePhyUshort(sc, 0x15, 0x021a);
18027         MP_WritePhyUshort(sc, 0x19, 0x5540);
18028         MP_WritePhyUshort(sc, 0x15, 0x021b);
18029         MP_WritePhyUshort(sc, 0x19, 0x9e03);
18030         MP_WritePhyUshort(sc, 0x15, 0x021c);
18031         MP_WritePhyUshort(sc, 0x19, 0x7c40);
18032         MP_WritePhyUshort(sc, 0x15, 0x021d);
18033         MP_WritePhyUshort(sc, 0x19, 0x6840);
18034         MP_WritePhyUshort(sc, 0x15, 0x021e);
18035         MP_WritePhyUshort(sc, 0x19, 0x3224);
18036         MP_WritePhyUshort(sc, 0x15, 0x021f);
18037         MP_WritePhyUshort(sc, 0x19, 0x4002);
18038         MP_WritePhyUshort(sc, 0x15, 0x0220);
18039         MP_WritePhyUshort(sc, 0x19, 0x3224);
18040         MP_WritePhyUshort(sc, 0x15, 0x0221);
18041         MP_WritePhyUshort(sc, 0x19, 0x9e03);
18042         MP_WritePhyUshort(sc, 0x15, 0x0222);
18043         MP_WritePhyUshort(sc, 0x19, 0x7c40);
18044         MP_WritePhyUshort(sc, 0x15, 0x0223);
18045         MP_WritePhyUshort(sc, 0x19, 0x6840);
18046         MP_WritePhyUshort(sc, 0x15, 0x0224);
18047         MP_WritePhyUshort(sc, 0x19, 0x7800);
18048         MP_WritePhyUshort(sc, 0x15, 0x0225);
18049         MP_WritePhyUshort(sc, 0x19, 0x3231);
18050         MP_WritePhyUshort(sc, 0x15, 0x0000);
18051         MP_WritePhyUshort(sc, 0x16, 0x0306);
18052         MP_WritePhyUshort(sc, 0x16, 0x0300);
18053         MP_WritePhyUshort(sc, 0x1f, 0x0000);
18054         MP_WritePhyUshort(sc, 0x1f, 0x0005);
18055         MP_WritePhyUshort(sc, 0x05, 0xfff6);
18056         MP_WritePhyUshort(sc, 0x06, 0x0080);
18057         MP_WritePhyUshort(sc, 0x05, 0x8000);
18058         MP_WritePhyUshort(sc, 0x06, 0x0280);
18059         MP_WritePhyUshort(sc, 0x06, 0x48f7);
18060         MP_WritePhyUshort(sc, 0x06, 0x00e0);
18061         MP_WritePhyUshort(sc, 0x06, 0xfff7);
18062         MP_WritePhyUshort(sc, 0x06, 0xa080);
18063         MP_WritePhyUshort(sc, 0x06, 0x02ae);
18064         MP_WritePhyUshort(sc, 0x06, 0xf602);
18065         MP_WritePhyUshort(sc, 0x06, 0x011e);
18066         MP_WritePhyUshort(sc, 0x06, 0x0201);
18067         MP_WritePhyUshort(sc, 0x06, 0x2b02);
18068         MP_WritePhyUshort(sc, 0x06, 0x8077);
18069         MP_WritePhyUshort(sc, 0x06, 0x0201);
18070         MP_WritePhyUshort(sc, 0x06, 0x4802);
18071         MP_WritePhyUshort(sc, 0x06, 0x0162);
18072         MP_WritePhyUshort(sc, 0x06, 0x0280);
18073         MP_WritePhyUshort(sc, 0x06, 0x9402);
18074         MP_WritePhyUshort(sc, 0x06, 0x810e);
18075         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18076         MP_WritePhyUshort(sc, 0x06, 0x88e1);
18077         MP_WritePhyUshort(sc, 0x06, 0x8b89);
18078         MP_WritePhyUshort(sc, 0x06, 0x1e01);
18079         MP_WritePhyUshort(sc, 0x06, 0xe18b);
18080         MP_WritePhyUshort(sc, 0x06, 0x8a1e);
18081         MP_WritePhyUshort(sc, 0x06, 0x01e1);
18082         MP_WritePhyUshort(sc, 0x06, 0x8b8b);
18083         MP_WritePhyUshort(sc, 0x06, 0x1e01);
18084         MP_WritePhyUshort(sc, 0x06, 0xe18b);
18085         MP_WritePhyUshort(sc, 0x06, 0x8c1e);
18086         MP_WritePhyUshort(sc, 0x06, 0x01e1);
18087         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
18088         MP_WritePhyUshort(sc, 0x06, 0x1e01);
18089         MP_WritePhyUshort(sc, 0x06, 0xe18b);
18090         MP_WritePhyUshort(sc, 0x06, 0x8e1e);
18091         MP_WritePhyUshort(sc, 0x06, 0x01a0);
18092         MP_WritePhyUshort(sc, 0x06, 0x00c7);
18093         MP_WritePhyUshort(sc, 0x06, 0xaebb);
18094         MP_WritePhyUshort(sc, 0x06, 0xd481);
18095         MP_WritePhyUshort(sc, 0x06, 0xd4e4);
18096         MP_WritePhyUshort(sc, 0x06, 0x8b92);
18097         MP_WritePhyUshort(sc, 0x06, 0xe58b);
18098         MP_WritePhyUshort(sc, 0x06, 0x9302);
18099         MP_WritePhyUshort(sc, 0x06, 0x2e5a);
18100         MP_WritePhyUshort(sc, 0x06, 0xbf8b);
18101         MP_WritePhyUshort(sc, 0x06, 0x88ec);
18102         MP_WritePhyUshort(sc, 0x06, 0x0019);
18103         MP_WritePhyUshort(sc, 0x06, 0xa98b);
18104         MP_WritePhyUshort(sc, 0x06, 0x90f9);
18105         MP_WritePhyUshort(sc, 0x06, 0xeeff);
18106         MP_WritePhyUshort(sc, 0x06, 0xf600);
18107         MP_WritePhyUshort(sc, 0x06, 0xeeff);
18108         MP_WritePhyUshort(sc, 0x06, 0xf7fc);
18109         MP_WritePhyUshort(sc, 0x06, 0xd100);
18110         MP_WritePhyUshort(sc, 0x06, 0xbf83);
18111         MP_WritePhyUshort(sc, 0x06, 0x3c02);
18112         MP_WritePhyUshort(sc, 0x06, 0x3a21);
18113         MP_WritePhyUshort(sc, 0x06, 0xd101);
18114         MP_WritePhyUshort(sc, 0x06, 0xbf83);
18115         MP_WritePhyUshort(sc, 0x06, 0x3f02);
18116         MP_WritePhyUshort(sc, 0x06, 0x3a21);
18117         MP_WritePhyUshort(sc, 0x06, 0x04f8);
18118         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18119         MP_WritePhyUshort(sc, 0x06, 0x8aad);
18120         MP_WritePhyUshort(sc, 0x06, 0x2014);
18121         MP_WritePhyUshort(sc, 0x06, 0xee8b);
18122         MP_WritePhyUshort(sc, 0x06, 0x8a00);
18123         MP_WritePhyUshort(sc, 0x06, 0x0220);
18124         MP_WritePhyUshort(sc, 0x06, 0x8be0);
18125         MP_WritePhyUshort(sc, 0x06, 0xe426);
18126         MP_WritePhyUshort(sc, 0x06, 0xe1e4);
18127         MP_WritePhyUshort(sc, 0x06, 0x27ee);
18128         MP_WritePhyUshort(sc, 0x06, 0xe426);
18129         MP_WritePhyUshort(sc, 0x06, 0x23e5);
18130         MP_WritePhyUshort(sc, 0x06, 0xe427);
18131         MP_WritePhyUshort(sc, 0x06, 0xfc04);
18132         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
18133         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
18134         MP_WritePhyUshort(sc, 0x06, 0xad20);
18135         MP_WritePhyUshort(sc, 0x06, 0x14ee);
18136         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
18137         MP_WritePhyUshort(sc, 0x06, 0x00e0);
18138         MP_WritePhyUshort(sc, 0x06, 0x8a5a);
18139         MP_WritePhyUshort(sc, 0x06, 0x7803);
18140         MP_WritePhyUshort(sc, 0x06, 0x9e09);
18141         MP_WritePhyUshort(sc, 0x06, 0x0206);
18142         MP_WritePhyUshort(sc, 0x06, 0x2802);
18143         MP_WritePhyUshort(sc, 0x06, 0x80b1);
18144         MP_WritePhyUshort(sc, 0x06, 0x0232);
18145         MP_WritePhyUshort(sc, 0x06, 0xfdfc);
18146         MP_WritePhyUshort(sc, 0x06, 0x04f8);
18147         MP_WritePhyUshort(sc, 0x06, 0xf9e0);
18148         MP_WritePhyUshort(sc, 0x06, 0x8b81);
18149         MP_WritePhyUshort(sc, 0x06, 0xac26);
18150         MP_WritePhyUshort(sc, 0x06, 0x1ae0);
18151         MP_WritePhyUshort(sc, 0x06, 0x8b81);
18152         MP_WritePhyUshort(sc, 0x06, 0xac21);
18153         MP_WritePhyUshort(sc, 0x06, 0x14e0);
18154         MP_WritePhyUshort(sc, 0x06, 0x8b85);
18155         MP_WritePhyUshort(sc, 0x06, 0xac20);
18156         MP_WritePhyUshort(sc, 0x06, 0x0ee0);
18157         MP_WritePhyUshort(sc, 0x06, 0x8b85);
18158         MP_WritePhyUshort(sc, 0x06, 0xac23);
18159         MP_WritePhyUshort(sc, 0x06, 0x08e0);
18160         MP_WritePhyUshort(sc, 0x06, 0x8b87);
18161         MP_WritePhyUshort(sc, 0x06, 0xac24);
18162         MP_WritePhyUshort(sc, 0x06, 0x02ae);
18163         MP_WritePhyUshort(sc, 0x06, 0x3802);
18164         MP_WritePhyUshort(sc, 0x06, 0x1b02);
18165         MP_WritePhyUshort(sc, 0x06, 0xeee4);
18166         MP_WritePhyUshort(sc, 0x06, 0x1c04);
18167         MP_WritePhyUshort(sc, 0x06, 0xeee4);
18168         MP_WritePhyUshort(sc, 0x06, 0x1d04);
18169         MP_WritePhyUshort(sc, 0x06, 0xe2e0);
18170         MP_WritePhyUshort(sc, 0x06, 0x7ce3);
18171         MP_WritePhyUshort(sc, 0x06, 0xe07d);
18172         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
18173         MP_WritePhyUshort(sc, 0x06, 0x38e1);
18174         MP_WritePhyUshort(sc, 0x06, 0xe039);
18175         MP_WritePhyUshort(sc, 0x06, 0xad2e);
18176         MP_WritePhyUshort(sc, 0x06, 0x1bad);
18177         MP_WritePhyUshort(sc, 0x06, 0x390d);
18178         MP_WritePhyUshort(sc, 0x06, 0xd101);
18179         MP_WritePhyUshort(sc, 0x06, 0xbf22);
18180         MP_WritePhyUshort(sc, 0x06, 0xe802);
18181         MP_WritePhyUshort(sc, 0x06, 0x3a21);
18182         MP_WritePhyUshort(sc, 0x06, 0x0222);
18183         MP_WritePhyUshort(sc, 0x06, 0x10ae);
18184         MP_WritePhyUshort(sc, 0x06, 0x0bac);
18185         MP_WritePhyUshort(sc, 0x06, 0x3802);
18186         MP_WritePhyUshort(sc, 0x06, 0xae06);
18187         MP_WritePhyUshort(sc, 0x06, 0x0222);
18188         MP_WritePhyUshort(sc, 0x06, 0x4d02);
18189         MP_WritePhyUshort(sc, 0x06, 0x2292);
18190         MP_WritePhyUshort(sc, 0x06, 0x021b);
18191         MP_WritePhyUshort(sc, 0x06, 0x13fd);
18192         MP_WritePhyUshort(sc, 0x06, 0xfc04);
18193         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
18194         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
18195         MP_WritePhyUshort(sc, 0x06, 0xad20);
18196         MP_WritePhyUshort(sc, 0x06, 0x1af6);
18197         MP_WritePhyUshort(sc, 0x06, 0x20e4);
18198         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
18199         MP_WritePhyUshort(sc, 0x06, 0x022b);
18200         MP_WritePhyUshort(sc, 0x06, 0x1e02);
18201         MP_WritePhyUshort(sc, 0x06, 0x82ae);
18202         MP_WritePhyUshort(sc, 0x06, 0x0203);
18203         MP_WritePhyUshort(sc, 0x06, 0xc002);
18204         MP_WritePhyUshort(sc, 0x06, 0x827d);
18205         MP_WritePhyUshort(sc, 0x06, 0x022e);
18206         MP_WritePhyUshort(sc, 0x06, 0x6f02);
18207         MP_WritePhyUshort(sc, 0x06, 0x047b);
18208         MP_WritePhyUshort(sc, 0x06, 0x022f);
18209         MP_WritePhyUshort(sc, 0x06, 0x9ae0);
18210         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
18211         MP_WritePhyUshort(sc, 0x06, 0xad21);
18212         MP_WritePhyUshort(sc, 0x06, 0x0bf6);
18213         MP_WritePhyUshort(sc, 0x06, 0x21e4);
18214         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
18215         MP_WritePhyUshort(sc, 0x06, 0x0281);
18216         MP_WritePhyUshort(sc, 0x06, 0x9002);
18217         MP_WritePhyUshort(sc, 0x06, 0x1cd9);
18218         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18219         MP_WritePhyUshort(sc, 0x06, 0x8ead);
18220         MP_WritePhyUshort(sc, 0x06, 0x2208);
18221         MP_WritePhyUshort(sc, 0x06, 0xf622);
18222         MP_WritePhyUshort(sc, 0x06, 0xe48b);
18223         MP_WritePhyUshort(sc, 0x06, 0x8e02);
18224         MP_WritePhyUshort(sc, 0x06, 0x35f4);
18225         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18226         MP_WritePhyUshort(sc, 0x06, 0x8ead);
18227         MP_WritePhyUshort(sc, 0x06, 0x2308);
18228         MP_WritePhyUshort(sc, 0x06, 0xf623);
18229         MP_WritePhyUshort(sc, 0x06, 0xe48b);
18230         MP_WritePhyUshort(sc, 0x06, 0x8e02);
18231         MP_WritePhyUshort(sc, 0x06, 0x31e8);
18232         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18233         MP_WritePhyUshort(sc, 0x06, 0x8ead);
18234         MP_WritePhyUshort(sc, 0x06, 0x2405);
18235         MP_WritePhyUshort(sc, 0x06, 0xf624);
18236         MP_WritePhyUshort(sc, 0x06, 0xe48b);
18237         MP_WritePhyUshort(sc, 0x06, 0x8ee0);
18238         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
18239         MP_WritePhyUshort(sc, 0x06, 0xad25);
18240         MP_WritePhyUshort(sc, 0x06, 0x05f6);
18241         MP_WritePhyUshort(sc, 0x06, 0x25e4);
18242         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
18243         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18244         MP_WritePhyUshort(sc, 0x06, 0x8ead);
18245         MP_WritePhyUshort(sc, 0x06, 0x2608);
18246         MP_WritePhyUshort(sc, 0x06, 0xf626);
18247         MP_WritePhyUshort(sc, 0x06, 0xe48b);
18248         MP_WritePhyUshort(sc, 0x06, 0x8e02);
18249         MP_WritePhyUshort(sc, 0x06, 0x2d8a);
18250         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18251         MP_WritePhyUshort(sc, 0x06, 0x8ead);
18252         MP_WritePhyUshort(sc, 0x06, 0x2705);
18253         MP_WritePhyUshort(sc, 0x06, 0xf627);
18254         MP_WritePhyUshort(sc, 0x06, 0xe48b);
18255         MP_WritePhyUshort(sc, 0x06, 0x8e02);
18256         MP_WritePhyUshort(sc, 0x06, 0x0386);
18257         MP_WritePhyUshort(sc, 0x06, 0xfc04);
18258         MP_WritePhyUshort(sc, 0x06, 0xf8fa);
18259         MP_WritePhyUshort(sc, 0x06, 0xef69);
18260         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
18261         MP_WritePhyUshort(sc, 0x06, 0x00e1);
18262         MP_WritePhyUshort(sc, 0x06, 0xe001);
18263         MP_WritePhyUshort(sc, 0x06, 0xad27);
18264         MP_WritePhyUshort(sc, 0x06, 0x32e0);
18265         MP_WritePhyUshort(sc, 0x06, 0x8b40);
18266         MP_WritePhyUshort(sc, 0x06, 0xf720);
18267         MP_WritePhyUshort(sc, 0x06, 0xe48b);
18268         MP_WritePhyUshort(sc, 0x06, 0x40bf);
18269         MP_WritePhyUshort(sc, 0x06, 0x32c1);
18270         MP_WritePhyUshort(sc, 0x06, 0x0239);
18271         MP_WritePhyUshort(sc, 0x06, 0xf4ad);
18272         MP_WritePhyUshort(sc, 0x06, 0x2821);
18273         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
18274         MP_WritePhyUshort(sc, 0x06, 0x20e1);
18275         MP_WritePhyUshort(sc, 0x06, 0xe021);
18276         MP_WritePhyUshort(sc, 0x06, 0xad20);
18277         MP_WritePhyUshort(sc, 0x06, 0x18e0);
18278         MP_WritePhyUshort(sc, 0x06, 0x8b40);
18279         MP_WritePhyUshort(sc, 0x06, 0xf620);
18280         MP_WritePhyUshort(sc, 0x06, 0xe48b);
18281         MP_WritePhyUshort(sc, 0x06, 0x40ee);
18282         MP_WritePhyUshort(sc, 0x06, 0x8b3b);
18283         MP_WritePhyUshort(sc, 0x06, 0xffe0);
18284         MP_WritePhyUshort(sc, 0x06, 0x8a8a);
18285         MP_WritePhyUshort(sc, 0x06, 0xe18a);
18286         MP_WritePhyUshort(sc, 0x06, 0x8be4);
18287         MP_WritePhyUshort(sc, 0x06, 0xe000);
18288         MP_WritePhyUshort(sc, 0x06, 0xe5e0);
18289         MP_WritePhyUshort(sc, 0x06, 0x01ef);
18290         MP_WritePhyUshort(sc, 0x06, 0x96fe);
18291         MP_WritePhyUshort(sc, 0x06, 0xfc04);
18292         MP_WritePhyUshort(sc, 0x06, 0xf8f9);
18293         MP_WritePhyUshort(sc, 0x06, 0xface);
18294         MP_WritePhyUshort(sc, 0x06, 0xfaef);
18295         MP_WritePhyUshort(sc, 0x06, 0x69fa);
18296         MP_WritePhyUshort(sc, 0x06, 0xd401);
18297         MP_WritePhyUshort(sc, 0x06, 0x55b4);
18298         MP_WritePhyUshort(sc, 0x06, 0xfebf);
18299         MP_WritePhyUshort(sc, 0x06, 0x1c5e);
18300         MP_WritePhyUshort(sc, 0x06, 0x0239);
18301         MP_WritePhyUshort(sc, 0x06, 0xf4ac);
18302         MP_WritePhyUshort(sc, 0x06, 0x280b);
18303         MP_WritePhyUshort(sc, 0x06, 0xbf1c);
18304         MP_WritePhyUshort(sc, 0x06, 0x5b02);
18305         MP_WritePhyUshort(sc, 0x06, 0x39f4);
18306         MP_WritePhyUshort(sc, 0x06, 0xac28);
18307         MP_WritePhyUshort(sc, 0x06, 0x49ae);
18308         MP_WritePhyUshort(sc, 0x06, 0x64bf);
18309         MP_WritePhyUshort(sc, 0x06, 0x1c5b);
18310         MP_WritePhyUshort(sc, 0x06, 0x0239);
18311         MP_WritePhyUshort(sc, 0x06, 0xf4ac);
18312         MP_WritePhyUshort(sc, 0x06, 0x285b);
18313         MP_WritePhyUshort(sc, 0x06, 0xd000);
18314         MP_WritePhyUshort(sc, 0x06, 0x0282);
18315         MP_WritePhyUshort(sc, 0x06, 0x62ac);
18316         MP_WritePhyUshort(sc, 0x06, 0x2105);
18317         MP_WritePhyUshort(sc, 0x06, 0xac22);
18318         MP_WritePhyUshort(sc, 0x06, 0x02ae);
18319         MP_WritePhyUshort(sc, 0x06, 0x4ebf);
18320         MP_WritePhyUshort(sc, 0x06, 0xe0c4);
18321         MP_WritePhyUshort(sc, 0x06, 0xbe85);
18322         MP_WritePhyUshort(sc, 0x06, 0xecd2);
18323         MP_WritePhyUshort(sc, 0x06, 0x04d8);
18324         MP_WritePhyUshort(sc, 0x06, 0x19d9);
18325         MP_WritePhyUshort(sc, 0x06, 0x1907);
18326         MP_WritePhyUshort(sc, 0x06, 0xdc19);
18327         MP_WritePhyUshort(sc, 0x06, 0xdd19);
18328         MP_WritePhyUshort(sc, 0x06, 0x0789);
18329         MP_WritePhyUshort(sc, 0x06, 0x89ef);
18330         MP_WritePhyUshort(sc, 0x06, 0x645e);
18331         MP_WritePhyUshort(sc, 0x06, 0x07ff);
18332         MP_WritePhyUshort(sc, 0x06, 0x0d65);
18333         MP_WritePhyUshort(sc, 0x06, 0x5cf8);
18334         MP_WritePhyUshort(sc, 0x06, 0x001e);
18335         MP_WritePhyUshort(sc, 0x06, 0x46dc);
18336         MP_WritePhyUshort(sc, 0x06, 0x19dd);
18337         MP_WritePhyUshort(sc, 0x06, 0x19b2);
18338         MP_WritePhyUshort(sc, 0x06, 0xe2d4);
18339         MP_WritePhyUshort(sc, 0x06, 0x0001);
18340         MP_WritePhyUshort(sc, 0x06, 0xbf1c);
18341         MP_WritePhyUshort(sc, 0x06, 0x5b02);
18342         MP_WritePhyUshort(sc, 0x06, 0x3a21);
18343         MP_WritePhyUshort(sc, 0x06, 0xae1d);
18344         MP_WritePhyUshort(sc, 0x06, 0xbee0);
18345         MP_WritePhyUshort(sc, 0x06, 0xc4bf);
18346         MP_WritePhyUshort(sc, 0x06, 0x85ec);
18347         MP_WritePhyUshort(sc, 0x06, 0xd204);
18348         MP_WritePhyUshort(sc, 0x06, 0xd819);
18349         MP_WritePhyUshort(sc, 0x06, 0xd919);
18350         MP_WritePhyUshort(sc, 0x06, 0x07dc);
18351         MP_WritePhyUshort(sc, 0x06, 0x19dd);
18352         MP_WritePhyUshort(sc, 0x06, 0x1907);
18353         MP_WritePhyUshort(sc, 0x06, 0xb2f4);
18354         MP_WritePhyUshort(sc, 0x06, 0xd400);
18355         MP_WritePhyUshort(sc, 0x06, 0x00bf);
18356         MP_WritePhyUshort(sc, 0x06, 0x1c5b);
18357         MP_WritePhyUshort(sc, 0x06, 0x023a);
18358         MP_WritePhyUshort(sc, 0x06, 0x21fe);
18359         MP_WritePhyUshort(sc, 0x06, 0xef96);
18360         MP_WritePhyUshort(sc, 0x06, 0xfec6);
18361         MP_WritePhyUshort(sc, 0x06, 0xfefd);
18362         MP_WritePhyUshort(sc, 0x06, 0xfc05);
18363         MP_WritePhyUshort(sc, 0x06, 0xf9e2);
18364         MP_WritePhyUshort(sc, 0x06, 0xe0ea);
18365         MP_WritePhyUshort(sc, 0x06, 0xe3e0);
18366         MP_WritePhyUshort(sc, 0x06, 0xeb5a);
18367         MP_WritePhyUshort(sc, 0x06, 0x070c);
18368         MP_WritePhyUshort(sc, 0x06, 0x031e);
18369         MP_WritePhyUshort(sc, 0x06, 0x20e6);
18370         MP_WritePhyUshort(sc, 0x06, 0xe0ea);
18371         MP_WritePhyUshort(sc, 0x06, 0xe7e0);
18372         MP_WritePhyUshort(sc, 0x06, 0xebe0);
18373         MP_WritePhyUshort(sc, 0x06, 0xe0fc);
18374         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
18375         MP_WritePhyUshort(sc, 0x06, 0xfdfd);
18376         MP_WritePhyUshort(sc, 0x06, 0x04f8);
18377         MP_WritePhyUshort(sc, 0x06, 0xfaef);
18378         MP_WritePhyUshort(sc, 0x06, 0x69e0);
18379         MP_WritePhyUshort(sc, 0x06, 0x8b80);
18380         MP_WritePhyUshort(sc, 0x06, 0xad27);
18381         MP_WritePhyUshort(sc, 0x06, 0x22bf);
18382         MP_WritePhyUshort(sc, 0x06, 0x47ba);
18383         MP_WritePhyUshort(sc, 0x06, 0x0239);
18384         MP_WritePhyUshort(sc, 0x06, 0xf4e0);
18385         MP_WritePhyUshort(sc, 0x06, 0x8b44);
18386         MP_WritePhyUshort(sc, 0x06, 0x1f01);
18387         MP_WritePhyUshort(sc, 0x06, 0x9e15);
18388         MP_WritePhyUshort(sc, 0x06, 0xe58b);
18389         MP_WritePhyUshort(sc, 0x06, 0x44ad);
18390         MP_WritePhyUshort(sc, 0x06, 0x2907);
18391         MP_WritePhyUshort(sc, 0x06, 0xac28);
18392         MP_WritePhyUshort(sc, 0x06, 0x04d1);
18393         MP_WritePhyUshort(sc, 0x06, 0x01ae);
18394         MP_WritePhyUshort(sc, 0x06, 0x02d1);
18395         MP_WritePhyUshort(sc, 0x06, 0x00bf);
18396         MP_WritePhyUshort(sc, 0x06, 0x8342);
18397         MP_WritePhyUshort(sc, 0x06, 0x023a);
18398         MP_WritePhyUshort(sc, 0x06, 0x21ef);
18399         MP_WritePhyUshort(sc, 0x06, 0x96fe);
18400         MP_WritePhyUshort(sc, 0x06, 0xfc04);
18401         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
18402         MP_WritePhyUshort(sc, 0x06, 0x8b85);
18403         MP_WritePhyUshort(sc, 0x06, 0xad26);
18404         MP_WritePhyUshort(sc, 0x06, 0x30e0);
18405         MP_WritePhyUshort(sc, 0x06, 0xe036);
18406         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
18407         MP_WritePhyUshort(sc, 0x06, 0x37e1);
18408         MP_WritePhyUshort(sc, 0x06, 0x8b3f);
18409         MP_WritePhyUshort(sc, 0x06, 0x1f10);
18410         MP_WritePhyUshort(sc, 0x06, 0x9e23);
18411         MP_WritePhyUshort(sc, 0x06, 0xe48b);
18412         MP_WritePhyUshort(sc, 0x06, 0x3fac);
18413         MP_WritePhyUshort(sc, 0x06, 0x200b);
18414         MP_WritePhyUshort(sc, 0x06, 0xac21);
18415         MP_WritePhyUshort(sc, 0x06, 0x0dac);
18416         MP_WritePhyUshort(sc, 0x06, 0x250f);
18417         MP_WritePhyUshort(sc, 0x06, 0xac27);
18418         MP_WritePhyUshort(sc, 0x06, 0x11ae);
18419         MP_WritePhyUshort(sc, 0x06, 0x1202);
18420         MP_WritePhyUshort(sc, 0x06, 0x2cb5);
18421         MP_WritePhyUshort(sc, 0x06, 0xae0d);
18422         MP_WritePhyUshort(sc, 0x06, 0x0282);
18423         MP_WritePhyUshort(sc, 0x06, 0xe7ae);
18424         MP_WritePhyUshort(sc, 0x06, 0x0802);
18425         MP_WritePhyUshort(sc, 0x06, 0x2cd7);
18426         MP_WritePhyUshort(sc, 0x06, 0xae03);
18427         MP_WritePhyUshort(sc, 0x06, 0x022c);
18428         MP_WritePhyUshort(sc, 0x06, 0xeafc);
18429         MP_WritePhyUshort(sc, 0x06, 0x04f8);
18430         MP_WritePhyUshort(sc, 0x06, 0xfaef);
18431         MP_WritePhyUshort(sc, 0x06, 0x6902);
18432         MP_WritePhyUshort(sc, 0x06, 0x8304);
18433         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
18434         MP_WritePhyUshort(sc, 0x06, 0x14e1);
18435         MP_WritePhyUshort(sc, 0x06, 0xe015);
18436         MP_WritePhyUshort(sc, 0x06, 0xad26);
18437         MP_WritePhyUshort(sc, 0x06, 0x08d1);
18438         MP_WritePhyUshort(sc, 0x06, 0x1ebf);
18439         MP_WritePhyUshort(sc, 0x06, 0x2d47);
18440         MP_WritePhyUshort(sc, 0x06, 0x023a);
18441         MP_WritePhyUshort(sc, 0x06, 0x21ef);
18442         MP_WritePhyUshort(sc, 0x06, 0x96fe);
18443         MP_WritePhyUshort(sc, 0x06, 0xfc04);
18444         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
18445         MP_WritePhyUshort(sc, 0x06, 0x8b85);
18446         MP_WritePhyUshort(sc, 0x06, 0xad27);
18447         MP_WritePhyUshort(sc, 0x06, 0x2fd0);
18448         MP_WritePhyUshort(sc, 0x06, 0x0b02);
18449         MP_WritePhyUshort(sc, 0x06, 0x3826);
18450         MP_WritePhyUshort(sc, 0x06, 0x5882);
18451         MP_WritePhyUshort(sc, 0x06, 0x7882);
18452         MP_WritePhyUshort(sc, 0x06, 0x9f24);
18453         MP_WritePhyUshort(sc, 0x06, 0xe08b);
18454         MP_WritePhyUshort(sc, 0x06, 0x32e1);
18455         MP_WritePhyUshort(sc, 0x06, 0x8b33);
18456         MP_WritePhyUshort(sc, 0x06, 0x1f10);
18457         MP_WritePhyUshort(sc, 0x06, 0x9e1a);
18458         MP_WritePhyUshort(sc, 0x06, 0x10e4);
18459         MP_WritePhyUshort(sc, 0x06, 0x8b32);
18460         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
18461         MP_WritePhyUshort(sc, 0x06, 0x28e1);
18462         MP_WritePhyUshort(sc, 0x06, 0xe029);
18463         MP_WritePhyUshort(sc, 0x06, 0xf72c);
18464         MP_WritePhyUshort(sc, 0x06, 0xe4e0);
18465         MP_WritePhyUshort(sc, 0x06, 0x28e5);
18466         MP_WritePhyUshort(sc, 0x06, 0xe029);
18467         MP_WritePhyUshort(sc, 0x06, 0xf62c);
18468         MP_WritePhyUshort(sc, 0x06, 0xe4e0);
18469         MP_WritePhyUshort(sc, 0x06, 0x28e5);
18470         MP_WritePhyUshort(sc, 0x06, 0xe029);
18471         MP_WritePhyUshort(sc, 0x06, 0xfc04);
18472         MP_WritePhyUshort(sc, 0x06, 0x00e1);
18473         MP_WritePhyUshort(sc, 0x06, 0x4077);
18474         MP_WritePhyUshort(sc, 0x06, 0xe140);
18475         MP_WritePhyUshort(sc, 0x06, 0xbbe0);
18476         MP_WritePhyUshort(sc, 0x06, 0x2a00);
18477         MP_WritePhyUshort(sc, 0x05, 0xe142);
18478         PhyRegValue = MP_ReadPhyUshort(sc, 0x06);
18479         PhyRegValue |= BIT_0;
18480         MP_WritePhyUshort(sc, 0x06,PhyRegValue);
18481         MP_WritePhyUshort(sc, 0x05, 0xe140);
18482         PhyRegValue = MP_ReadPhyUshort(sc, 0x06);
18483         PhyRegValue |= BIT_0;
18484         MP_WritePhyUshort(sc, 0x06, PhyRegValue);
18485         MP_WritePhyUshort(sc, 0x1f, 0x0000);
18486         MP_WritePhyUshort(sc, 0x1f, 0x0005);
18487         for (i = 0; i < 200; i++) {
18488                 DELAY(100);
18489                 PhyRegValue = MP_ReadPhyUshort(sc, 0x00);
18490                 if (PhyRegValue & BIT_7)
18491                         break;
18492         }
18493         MP_WritePhyUshort(sc, 0x1f, 0x0007);
18494         MP_WritePhyUshort(sc, 0x1e, 0x0023);
18495         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
18496         PhyRegValue |= BIT_1;
18497         if (sc->RequiredSecLanDonglePatch)
18498                 PhyRegValue &= ~(BIT_2);
18499         MP_WritePhyUshort(sc, 0x17, PhyRegValue);
18500         MP_WritePhyUshort(sc, 0x1f, 0x0000);
18501         MP_WritePhyUshort(sc, 0x1f, 0x0003);
18502         MP_WritePhyUshort(sc, 0x09, 0xA20F);
18503         MP_WritePhyUshort(sc, 0x1f, 0x0000);
18504         MP_WritePhyUshort(sc, 0x1f, 0x0003);
18505         MP_WritePhyUshort(sc, 0x01, 0x328A);
18506         MP_WritePhyUshort(sc, 0x1f, 0x0000);
18507         MP_WritePhyUshort(sc, 0x1f, 0x0003);
18508         PhyRegValue = MP_ReadPhyUshort(sc, 0x19);
18509         PhyRegValue &= ~BIT_0;
18510         MP_WritePhyUshort(sc, 0x19, PhyRegValue);
18511         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
18512         PhyRegValue &= ~BIT_10;
18513         MP_WritePhyUshort(sc, 0x10, PhyRegValue);
18514         MP_WritePhyUshort(sc, 0x1f, 0x0000);
18515         MP_WritePhyUshort(sc, 0x00, 0x9200);
18516 }
18517 
18518 static void re_set_phy_mcu_8168g_1(struct re_softc *sc)
18519 {
18520         u_int16_t PhyRegValue;
18521         u_int32_t WaitCnt;
18522 
18523         MP_WritePhyUshort(sc, 0x1f, 0x0B82);
18524         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
18525         PhyRegValue |= BIT_4;
18526         MP_WritePhyUshort(sc, 0x10, PhyRegValue);
18527 
18528         MP_WritePhyUshort(sc, 0x1f, 0x0B80);
18529         WaitCnt = 0;
18530         do {
18531                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
18532                 PhyRegValue &= 0x0040;
18533                 DELAY(50);
18534                 DELAY(50);
18535                 WaitCnt++;
18536         } while(PhyRegValue != 0x0040 && WaitCnt <1000);
18537 
18538         MP_WritePhyUshort(sc, 0x1f, 0x0A43);
18539         MP_WritePhyUshort(sc, 0x13, 0x8146);
18540         MP_WritePhyUshort(sc, 0x14, 0x2300);
18541         MP_WritePhyUshort(sc, 0x13, 0xB820);
18542         MP_WritePhyUshort(sc, 0x14, 0x0210);
18543 
18544         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
18545         MP_WritePhyUshort(sc, 0x13, 0xB820);
18546         MP_WritePhyUshort(sc, 0x14, 0x0290);
18547         MP_WritePhyUshort(sc, 0x13, 0xA012);
18548         MP_WritePhyUshort(sc, 0x14, 0x0000);
18549         MP_WritePhyUshort(sc, 0x13, 0xA014);
18550         MP_WritePhyUshort(sc, 0x14, 0x2c04);
18551         MP_WritePhyUshort(sc, 0x14, 0x2c0c);
18552         MP_WritePhyUshort(sc, 0x14, 0x2c6c);
18553         MP_WritePhyUshort(sc, 0x14, 0x2d0d);
18554         MP_WritePhyUshort(sc, 0x14, 0x31ce);
18555         MP_WritePhyUshort(sc, 0x14, 0x506d);
18556         MP_WritePhyUshort(sc, 0x14, 0xd708);
18557         MP_WritePhyUshort(sc, 0x14, 0x3108);
18558         MP_WritePhyUshort(sc, 0x14, 0x106d);
18559         MP_WritePhyUshort(sc, 0x14, 0x1560);
18560         MP_WritePhyUshort(sc, 0x14, 0x15a9);
18561         MP_WritePhyUshort(sc, 0x14, 0x206e);
18562         MP_WritePhyUshort(sc, 0x14, 0x175b);
18563         MP_WritePhyUshort(sc, 0x14, 0x6062);
18564         MP_WritePhyUshort(sc, 0x14, 0xd700);
18565         MP_WritePhyUshort(sc, 0x14, 0x5fae);
18566         MP_WritePhyUshort(sc, 0x14, 0xd708);
18567         MP_WritePhyUshort(sc, 0x14, 0x3107);
18568         MP_WritePhyUshort(sc, 0x14, 0x4c1e);
18569         MP_WritePhyUshort(sc, 0x14, 0x4169);
18570         MP_WritePhyUshort(sc, 0x14, 0x316a);
18571         MP_WritePhyUshort(sc, 0x14, 0x0c19);
18572         MP_WritePhyUshort(sc, 0x14, 0x31aa);
18573         MP_WritePhyUshort(sc, 0x14, 0x0c19);
18574         MP_WritePhyUshort(sc, 0x14, 0x2c1b);
18575         MP_WritePhyUshort(sc, 0x14, 0x5e62);
18576         MP_WritePhyUshort(sc, 0x14, 0x26b5);
18577         MP_WritePhyUshort(sc, 0x14, 0x31ab);
18578         MP_WritePhyUshort(sc, 0x14, 0x5c1e);
18579         MP_WritePhyUshort(sc, 0x14, 0x2c0c);
18580         MP_WritePhyUshort(sc, 0x14, 0xc040);
18581         MP_WritePhyUshort(sc, 0x14, 0x8808);
18582         MP_WritePhyUshort(sc, 0x14, 0xc520);
18583         MP_WritePhyUshort(sc, 0x14, 0xc421);
18584         MP_WritePhyUshort(sc, 0x14, 0xd05a);
18585         MP_WritePhyUshort(sc, 0x14, 0xd19a);
18586         MP_WritePhyUshort(sc, 0x14, 0xd709);
18587         MP_WritePhyUshort(sc, 0x14, 0x608f);
18588         MP_WritePhyUshort(sc, 0x14, 0xd06b);
18589         MP_WritePhyUshort(sc, 0x14, 0xd18a);
18590         MP_WritePhyUshort(sc, 0x14, 0x2c2c);
18591         MP_WritePhyUshort(sc, 0x14, 0xd0be);
18592         MP_WritePhyUshort(sc, 0x14, 0xd188);
18593         MP_WritePhyUshort(sc, 0x14, 0x2c2c);
18594         MP_WritePhyUshort(sc, 0x14, 0xd708);
18595         MP_WritePhyUshort(sc, 0x14, 0x4072);
18596         MP_WritePhyUshort(sc, 0x14, 0xc104);
18597         MP_WritePhyUshort(sc, 0x14, 0x2c3e);
18598         MP_WritePhyUshort(sc, 0x14, 0x4076);
18599         MP_WritePhyUshort(sc, 0x14, 0xc110);
18600         MP_WritePhyUshort(sc, 0x14, 0x2c3e);
18601         MP_WritePhyUshort(sc, 0x14, 0x4071);
18602         MP_WritePhyUshort(sc, 0x14, 0xc102);
18603         MP_WritePhyUshort(sc, 0x14, 0x2c3e);
18604         MP_WritePhyUshort(sc, 0x14, 0x4070);
18605         MP_WritePhyUshort(sc, 0x14, 0xc101);
18606         MP_WritePhyUshort(sc, 0x14, 0x2c3e);
18607         MP_WritePhyUshort(sc, 0x14, 0x175b);
18608         MP_WritePhyUshort(sc, 0x14, 0xd709);
18609         MP_WritePhyUshort(sc, 0x14, 0x3390);
18610         MP_WritePhyUshort(sc, 0x14, 0x5c39);
18611         MP_WritePhyUshort(sc, 0x14, 0x2c4e);
18612         MP_WritePhyUshort(sc, 0x14, 0x175b);
18613         MP_WritePhyUshort(sc, 0x14, 0xd708);
18614         MP_WritePhyUshort(sc, 0x14, 0x6193);
18615         MP_WritePhyUshort(sc, 0x14, 0xd709);
18616         MP_WritePhyUshort(sc, 0x14, 0x5f9d);
18617         MP_WritePhyUshort(sc, 0x14, 0x408b);
18618         MP_WritePhyUshort(sc, 0x14, 0xd71e);
18619         MP_WritePhyUshort(sc, 0x14, 0x6042);
18620         MP_WritePhyUshort(sc, 0x14, 0xb401);
18621         MP_WritePhyUshort(sc, 0x14, 0x175b);
18622         MP_WritePhyUshort(sc, 0x14, 0xd708);
18623         MP_WritePhyUshort(sc, 0x14, 0x6073);
18624         MP_WritePhyUshort(sc, 0x14, 0x5fbc);
18625         MP_WritePhyUshort(sc, 0x14, 0x2c4d);
18626         MP_WritePhyUshort(sc, 0x14, 0x26ed);
18627         MP_WritePhyUshort(sc, 0x14, 0xb280);
18628         MP_WritePhyUshort(sc, 0x14, 0xa841);
18629         MP_WritePhyUshort(sc, 0x14, 0x9420);
18630         MP_WritePhyUshort(sc, 0x14, 0x8710);
18631         MP_WritePhyUshort(sc, 0x14, 0xd709);
18632         MP_WritePhyUshort(sc, 0x14, 0x42ec);
18633         MP_WritePhyUshort(sc, 0x14, 0x606d);
18634         MP_WritePhyUshort(sc, 0x14, 0xd207);
18635         MP_WritePhyUshort(sc, 0x14, 0x2c57);
18636         MP_WritePhyUshort(sc, 0x14, 0xd203);
18637         MP_WritePhyUshort(sc, 0x14, 0x33ff);
18638         MP_WritePhyUshort(sc, 0x14, 0x563b);
18639         MP_WritePhyUshort(sc, 0x14, 0x3275);
18640         MP_WritePhyUshort(sc, 0x14, 0x7c5e);
18641         MP_WritePhyUshort(sc, 0x14, 0xb240);
18642         MP_WritePhyUshort(sc, 0x14, 0xb402);
18643         MP_WritePhyUshort(sc, 0x14, 0x263b);
18644         MP_WritePhyUshort(sc, 0x14, 0x6096);
18645         MP_WritePhyUshort(sc, 0x14, 0xb240);
18646         MP_WritePhyUshort(sc, 0x14, 0xb406);
18647         MP_WritePhyUshort(sc, 0x14, 0x263b);
18648         MP_WritePhyUshort(sc, 0x14, 0x31d7);
18649         MP_WritePhyUshort(sc, 0x14, 0x7c67);
18650         MP_WritePhyUshort(sc, 0x14, 0xb240);
18651         MP_WritePhyUshort(sc, 0x14, 0xb40e);
18652         MP_WritePhyUshort(sc, 0x14, 0x263b);
18653         MP_WritePhyUshort(sc, 0x14, 0xb410);
18654         MP_WritePhyUshort(sc, 0x14, 0x8802);
18655         MP_WritePhyUshort(sc, 0x14, 0xb240);
18656         MP_WritePhyUshort(sc, 0x14, 0x940e);
18657         MP_WritePhyUshort(sc, 0x14, 0x263b);
18658         MP_WritePhyUshort(sc, 0x14, 0xba04);
18659         MP_WritePhyUshort(sc, 0x14, 0x1cd6);
18660         MP_WritePhyUshort(sc, 0x14, 0xa902);
18661         MP_WritePhyUshort(sc, 0x14, 0xd711);
18662         MP_WritePhyUshort(sc, 0x14, 0x4045);
18663         MP_WritePhyUshort(sc, 0x14, 0xa980);
18664         MP_WritePhyUshort(sc, 0x14, 0x3003);
18665         MP_WritePhyUshort(sc, 0x14, 0x59b1);
18666         MP_WritePhyUshort(sc, 0x14, 0xa540);
18667         MP_WritePhyUshort(sc, 0x14, 0xa601);
18668         MP_WritePhyUshort(sc, 0x14, 0xd710);
18669         MP_WritePhyUshort(sc, 0x14, 0x4043);
18670         MP_WritePhyUshort(sc, 0x14, 0xa910);
18671         MP_WritePhyUshort(sc, 0x14, 0xd711);
18672         MP_WritePhyUshort(sc, 0x14, 0x60a0);
18673         MP_WritePhyUshort(sc, 0x14, 0xca33);
18674         MP_WritePhyUshort(sc, 0x14, 0xcb33);
18675         MP_WritePhyUshort(sc, 0x14, 0xa941);
18676         MP_WritePhyUshort(sc, 0x14, 0x2c82);
18677         MP_WritePhyUshort(sc, 0x14, 0xcaff);
18678         MP_WritePhyUshort(sc, 0x14, 0xcbff);
18679         MP_WritePhyUshort(sc, 0x14, 0xa921);
18680         MP_WritePhyUshort(sc, 0x14, 0xce02);
18681         MP_WritePhyUshort(sc, 0x14, 0xe070);
18682         MP_WritePhyUshort(sc, 0x14, 0x0f10);
18683         MP_WritePhyUshort(sc, 0x14, 0xaf01);
18684         MP_WritePhyUshort(sc, 0x14, 0x8f01);
18685         MP_WritePhyUshort(sc, 0x14, 0x1766);
18686         MP_WritePhyUshort(sc, 0x14, 0x8e02);
18687         MP_WritePhyUshort(sc, 0x14, 0x1787);
18688         MP_WritePhyUshort(sc, 0x14, 0xd710);
18689         MP_WritePhyUshort(sc, 0x14, 0x609c);
18690         MP_WritePhyUshort(sc, 0x14, 0xd71e);
18691         MP_WritePhyUshort(sc, 0x14, 0x7fa4);
18692         MP_WritePhyUshort(sc, 0x14, 0x2cd4);
18693         MP_WritePhyUshort(sc, 0x14, 0x1ce9);
18694         MP_WritePhyUshort(sc, 0x14, 0xce04);
18695         MP_WritePhyUshort(sc, 0x14, 0xe070);
18696         MP_WritePhyUshort(sc, 0x14, 0x0f20);
18697         MP_WritePhyUshort(sc, 0x14, 0xaf01);
18698         MP_WritePhyUshort(sc, 0x14, 0x8f01);
18699         MP_WritePhyUshort(sc, 0x14, 0x1766);
18700         MP_WritePhyUshort(sc, 0x14, 0x8e04);
18701         MP_WritePhyUshort(sc, 0x14, 0x6044);
18702         MP_WritePhyUshort(sc, 0x14, 0x2cd4);
18703         MP_WritePhyUshort(sc, 0x14, 0xa520);
18704         MP_WritePhyUshort(sc, 0x14, 0xd710);
18705         MP_WritePhyUshort(sc, 0x14, 0x4043);
18706         MP_WritePhyUshort(sc, 0x14, 0x2cc1);
18707         MP_WritePhyUshort(sc, 0x14, 0xe00f);
18708         MP_WritePhyUshort(sc, 0x14, 0x0501);
18709         MP_WritePhyUshort(sc, 0x14, 0x1cef);
18710         MP_WritePhyUshort(sc, 0x14, 0xb801);
18711         MP_WritePhyUshort(sc, 0x14, 0xd71e);
18712         MP_WritePhyUshort(sc, 0x14, 0x4060);
18713         MP_WritePhyUshort(sc, 0x14, 0x7fc4);
18714         MP_WritePhyUshort(sc, 0x14, 0x2cd4);
18715         MP_WritePhyUshort(sc, 0x14, 0x1cf5);
18716         MP_WritePhyUshort(sc, 0x14, 0xe00f);
18717         MP_WritePhyUshort(sc, 0x14, 0x0502);
18718         MP_WritePhyUshort(sc, 0x14, 0x1cef);
18719         MP_WritePhyUshort(sc, 0x14, 0xb802);
18720         MP_WritePhyUshort(sc, 0x14, 0xd71e);
18721         MP_WritePhyUshort(sc, 0x14, 0x4061);
18722         MP_WritePhyUshort(sc, 0x14, 0x7fc4);
18723         MP_WritePhyUshort(sc, 0x14, 0x2cd4);
18724         MP_WritePhyUshort(sc, 0x14, 0x1cf5);
18725         MP_WritePhyUshort(sc, 0x14, 0xe00f);
18726         MP_WritePhyUshort(sc, 0x14, 0x0504);
18727         MP_WritePhyUshort(sc, 0x14, 0xd710);
18728         MP_WritePhyUshort(sc, 0x14, 0x6099);
18729         MP_WritePhyUshort(sc, 0x14, 0xd71e);
18730         MP_WritePhyUshort(sc, 0x14, 0x7fa4);
18731         MP_WritePhyUshort(sc, 0x14, 0x2cd4);
18732         MP_WritePhyUshort(sc, 0x14, 0xc17f);
18733         MP_WritePhyUshort(sc, 0x14, 0xc200);
18734         MP_WritePhyUshort(sc, 0x14, 0xc43f);
18735         MP_WritePhyUshort(sc, 0x14, 0xcc03);
18736         MP_WritePhyUshort(sc, 0x14, 0xa701);
18737         MP_WritePhyUshort(sc, 0x14, 0xa510);
18738         MP_WritePhyUshort(sc, 0x14, 0xd710);
18739         MP_WritePhyUshort(sc, 0x14, 0x4018);
18740         MP_WritePhyUshort(sc, 0x14, 0x9910);
18741         MP_WritePhyUshort(sc, 0x14, 0x8510);
18742         MP_WritePhyUshort(sc, 0x14, 0x2860);
18743         MP_WritePhyUshort(sc, 0x14, 0xe00f);
18744         MP_WritePhyUshort(sc, 0x14, 0x0504);
18745         MP_WritePhyUshort(sc, 0x14, 0xd710);
18746         MP_WritePhyUshort(sc, 0x14, 0x6099);
18747         MP_WritePhyUshort(sc, 0x14, 0xd71e);
18748         MP_WritePhyUshort(sc, 0x14, 0x7fa4);
18749         MP_WritePhyUshort(sc, 0x14, 0x2cd4);
18750         MP_WritePhyUshort(sc, 0x14, 0xa608);
18751         MP_WritePhyUshort(sc, 0x14, 0xc17d);
18752         MP_WritePhyUshort(sc, 0x14, 0xc200);
18753         MP_WritePhyUshort(sc, 0x14, 0xc43f);
18754         MP_WritePhyUshort(sc, 0x14, 0xcc03);
18755         MP_WritePhyUshort(sc, 0x14, 0xa701);
18756         MP_WritePhyUshort(sc, 0x14, 0xa510);
18757         MP_WritePhyUshort(sc, 0x14, 0xd710);
18758         MP_WritePhyUshort(sc, 0x14, 0x4018);
18759         MP_WritePhyUshort(sc, 0x14, 0x9910);
18760         MP_WritePhyUshort(sc, 0x14, 0x8510);
18761         MP_WritePhyUshort(sc, 0x14, 0x2926);
18762         MP_WritePhyUshort(sc, 0x14, 0x1792);
18763         MP_WritePhyUshort(sc, 0x14, 0x27db);
18764         MP_WritePhyUshort(sc, 0x14, 0xc000);
18765         MP_WritePhyUshort(sc, 0x14, 0xc100);
18766         MP_WritePhyUshort(sc, 0x14, 0xc200);
18767         MP_WritePhyUshort(sc, 0x14, 0xc300);
18768         MP_WritePhyUshort(sc, 0x14, 0xc400);
18769         MP_WritePhyUshort(sc, 0x14, 0xc500);
18770         MP_WritePhyUshort(sc, 0x14, 0xc600);
18771         MP_WritePhyUshort(sc, 0x14, 0xc7c1);
18772         MP_WritePhyUshort(sc, 0x14, 0xc800);
18773         MP_WritePhyUshort(sc, 0x14, 0xcc00);
18774         MP_WritePhyUshort(sc, 0x14, 0x0800);
18775         MP_WritePhyUshort(sc, 0x14, 0xca0f);
18776         MP_WritePhyUshort(sc, 0x14, 0xcbff);
18777         MP_WritePhyUshort(sc, 0x14, 0xa901);
18778         MP_WritePhyUshort(sc, 0x14, 0x8902);
18779         MP_WritePhyUshort(sc, 0x14, 0xc900);
18780         MP_WritePhyUshort(sc, 0x14, 0xca00);
18781         MP_WritePhyUshort(sc, 0x14, 0xcb00);
18782         MP_WritePhyUshort(sc, 0x14, 0x0800);
18783         MP_WritePhyUshort(sc, 0x14, 0xb804);
18784         MP_WritePhyUshort(sc, 0x14, 0x0800);
18785         MP_WritePhyUshort(sc, 0x14, 0xd71e);
18786         MP_WritePhyUshort(sc, 0x14, 0x6044);
18787         MP_WritePhyUshort(sc, 0x14, 0x9804);
18788         MP_WritePhyUshort(sc, 0x14, 0x0800);
18789         MP_WritePhyUshort(sc, 0x14, 0xd710);
18790         MP_WritePhyUshort(sc, 0x14, 0x6099);
18791         MP_WritePhyUshort(sc, 0x14, 0xd71e);
18792         MP_WritePhyUshort(sc, 0x14, 0x7fa4);
18793         MP_WritePhyUshort(sc, 0x14, 0x2cd4);
18794         MP_WritePhyUshort(sc, 0x14, 0x0800);
18795         MP_WritePhyUshort(sc, 0x14, 0xa510);
18796         MP_WritePhyUshort(sc, 0x14, 0xd710);
18797         MP_WritePhyUshort(sc, 0x14, 0x6098);
18798         MP_WritePhyUshort(sc, 0x14, 0xd71e);
18799         MP_WritePhyUshort(sc, 0x14, 0x7fa4);
18800         MP_WritePhyUshort(sc, 0x14, 0x2cd4);
18801         MP_WritePhyUshort(sc, 0x14, 0x8510);
18802         MP_WritePhyUshort(sc, 0x14, 0x0800);
18803         MP_WritePhyUshort(sc, 0x14, 0xd711);
18804         MP_WritePhyUshort(sc, 0x14, 0x3003);
18805         MP_WritePhyUshort(sc, 0x14, 0x1d01);
18806         MP_WritePhyUshort(sc, 0x14, 0x2d0b);
18807         MP_WritePhyUshort(sc, 0x14, 0xd710);
18808         MP_WritePhyUshort(sc, 0x14, 0x60be);
18809         MP_WritePhyUshort(sc, 0x14, 0xe060);
18810         MP_WritePhyUshort(sc, 0x14, 0x0920);
18811         MP_WritePhyUshort(sc, 0x14, 0x1cd6);
18812         MP_WritePhyUshort(sc, 0x14, 0x2c89);
18813         MP_WritePhyUshort(sc, 0x14, 0xd71e);
18814         MP_WritePhyUshort(sc, 0x14, 0x3063);
18815         MP_WritePhyUshort(sc, 0x14, 0x1948);
18816         MP_WritePhyUshort(sc, 0x14, 0x288a);
18817         MP_WritePhyUshort(sc, 0x14, 0x1cd6);
18818         MP_WritePhyUshort(sc, 0x14, 0x29bd);
18819         MP_WritePhyUshort(sc, 0x14, 0xa802);
18820         MP_WritePhyUshort(sc, 0x14, 0xa303);
18821         MP_WritePhyUshort(sc, 0x14, 0x843f);
18822         MP_WritePhyUshort(sc, 0x14, 0x81ff);
18823         MP_WritePhyUshort(sc, 0x14, 0x8208);
18824         MP_WritePhyUshort(sc, 0x14, 0xa201);
18825         MP_WritePhyUshort(sc, 0x14, 0xc001);
18826         MP_WritePhyUshort(sc, 0x14, 0xd710);
18827         MP_WritePhyUshort(sc, 0x14, 0x30a0);
18828         MP_WritePhyUshort(sc, 0x14, 0x0d1c);
18829         MP_WritePhyUshort(sc, 0x14, 0x30a0);
18830         MP_WritePhyUshort(sc, 0x14, 0x3d13);
18831         MP_WritePhyUshort(sc, 0x14, 0xd71e);
18832         MP_WritePhyUshort(sc, 0x14, 0x7f4c);
18833         MP_WritePhyUshort(sc, 0x14, 0x2ab6);
18834         MP_WritePhyUshort(sc, 0x14, 0xe003);
18835         MP_WritePhyUshort(sc, 0x14, 0x0202);
18836         MP_WritePhyUshort(sc, 0x14, 0xd710);
18837         MP_WritePhyUshort(sc, 0x14, 0x6090);
18838         MP_WritePhyUshort(sc, 0x14, 0xd71e);
18839         MP_WritePhyUshort(sc, 0x14, 0x7fac);
18840         MP_WritePhyUshort(sc, 0x14, 0x2ab6);
18841         MP_WritePhyUshort(sc, 0x14, 0xa20c);
18842         MP_WritePhyUshort(sc, 0x14, 0xd710);
18843         MP_WritePhyUshort(sc, 0x14, 0x6091);
18844         MP_WritePhyUshort(sc, 0x14, 0xd71e);
18845         MP_WritePhyUshort(sc, 0x14, 0x7fac);
18846         MP_WritePhyUshort(sc, 0x14, 0x2ab6);
18847         MP_WritePhyUshort(sc, 0x14, 0x820e);
18848         MP_WritePhyUshort(sc, 0x14, 0xa3e0);
18849         MP_WritePhyUshort(sc, 0x14, 0xa520);
18850         MP_WritePhyUshort(sc, 0x14, 0xd710);
18851         MP_WritePhyUshort(sc, 0x14, 0x609d);
18852         MP_WritePhyUshort(sc, 0x14, 0xd71e);
18853         MP_WritePhyUshort(sc, 0x14, 0x7fac);
18854         MP_WritePhyUshort(sc, 0x14, 0x2ab6);
18855         MP_WritePhyUshort(sc, 0x14, 0x8520);
18856         MP_WritePhyUshort(sc, 0x14, 0x6703);
18857         MP_WritePhyUshort(sc, 0x14, 0x2d34);
18858         MP_WritePhyUshort(sc, 0x14, 0xa13e);
18859         MP_WritePhyUshort(sc, 0x14, 0xc001);
18860         MP_WritePhyUshort(sc, 0x14, 0xd710);
18861         MP_WritePhyUshort(sc, 0x14, 0x4000);
18862         MP_WritePhyUshort(sc, 0x14, 0x6046);
18863         MP_WritePhyUshort(sc, 0x14, 0x2d0d);
18864         MP_WritePhyUshort(sc, 0x14, 0xa43f);
18865         MP_WritePhyUshort(sc, 0x14, 0xa101);
18866         MP_WritePhyUshort(sc, 0x14, 0xc020);
18867         MP_WritePhyUshort(sc, 0x14, 0xd710);
18868         MP_WritePhyUshort(sc, 0x14, 0x3121);
18869         MP_WritePhyUshort(sc, 0x14, 0x0d45);
18870         MP_WritePhyUshort(sc, 0x14, 0x30c0);
18871         MP_WritePhyUshort(sc, 0x14, 0x3d0d);
18872         MP_WritePhyUshort(sc, 0x14, 0xd71e);
18873         MP_WritePhyUshort(sc, 0x14, 0x7f4c);
18874         MP_WritePhyUshort(sc, 0x14, 0x2ab6);
18875         MP_WritePhyUshort(sc, 0x14, 0xa540);
18876         MP_WritePhyUshort(sc, 0x14, 0xc001);
18877         MP_WritePhyUshort(sc, 0x14, 0xd710);
18878         MP_WritePhyUshort(sc, 0x14, 0x4001);
18879         MP_WritePhyUshort(sc, 0x14, 0xe00f);
18880         MP_WritePhyUshort(sc, 0x14, 0x0501);
18881         MP_WritePhyUshort(sc, 0x14, 0x1dac);
18882         MP_WritePhyUshort(sc, 0x14, 0xc1c4);
18883         MP_WritePhyUshort(sc, 0x14, 0xa268);
18884         MP_WritePhyUshort(sc, 0x14, 0xa303);
18885         MP_WritePhyUshort(sc, 0x14, 0x8420);
18886         MP_WritePhyUshort(sc, 0x14, 0xe00f);
18887         MP_WritePhyUshort(sc, 0x14, 0x0502);
18888         MP_WritePhyUshort(sc, 0x14, 0x1dac);
18889         MP_WritePhyUshort(sc, 0x14, 0xc002);
18890         MP_WritePhyUshort(sc, 0x14, 0xd710);
18891         MP_WritePhyUshort(sc, 0x14, 0x4000);
18892         MP_WritePhyUshort(sc, 0x14, 0x8208);
18893         MP_WritePhyUshort(sc, 0x14, 0x8410);
18894         MP_WritePhyUshort(sc, 0x14, 0xa121);
18895         MP_WritePhyUshort(sc, 0x14, 0xc002);
18896         MP_WritePhyUshort(sc, 0x14, 0xd710);
18897         MP_WritePhyUshort(sc, 0x14, 0x4000);
18898         MP_WritePhyUshort(sc, 0x14, 0x8120);
18899         MP_WritePhyUshort(sc, 0x14, 0x8180);
18900         MP_WritePhyUshort(sc, 0x14, 0x1d97);
18901         MP_WritePhyUshort(sc, 0x14, 0xa180);
18902         MP_WritePhyUshort(sc, 0x14, 0xa13a);
18903         MP_WritePhyUshort(sc, 0x14, 0x8240);
18904         MP_WritePhyUshort(sc, 0x14, 0xa430);
18905         MP_WritePhyUshort(sc, 0x14, 0xc010);
18906         MP_WritePhyUshort(sc, 0x14, 0xd710);
18907         MP_WritePhyUshort(sc, 0x14, 0x30e1);
18908         MP_WritePhyUshort(sc, 0x14, 0x0abc);
18909         MP_WritePhyUshort(sc, 0x14, 0xd71e);
18910         MP_WritePhyUshort(sc, 0x14, 0x7f8c);
18911         MP_WritePhyUshort(sc, 0x14, 0x2ab6);
18912         MP_WritePhyUshort(sc, 0x14, 0xa480);
18913         MP_WritePhyUshort(sc, 0x14, 0xa230);
18914         MP_WritePhyUshort(sc, 0x14, 0xa303);
18915         MP_WritePhyUshort(sc, 0x14, 0xc001);
18916         MP_WritePhyUshort(sc, 0x14, 0xd70c);
18917         MP_WritePhyUshort(sc, 0x14, 0x4124);
18918         MP_WritePhyUshort(sc, 0x14, 0xd710);
18919         MP_WritePhyUshort(sc, 0x14, 0x6120);
18920         MP_WritePhyUshort(sc, 0x14, 0xd711);
18921         MP_WritePhyUshort(sc, 0x14, 0x3128);
18922         MP_WritePhyUshort(sc, 0x14, 0x3d76);
18923         MP_WritePhyUshort(sc, 0x14, 0x2d70);
18924         MP_WritePhyUshort(sc, 0x14, 0xa801);
18925         MP_WritePhyUshort(sc, 0x14, 0x2d6c);
18926         MP_WritePhyUshort(sc, 0x14, 0xd710);
18927         MP_WritePhyUshort(sc, 0x14, 0x4000);
18928         MP_WritePhyUshort(sc, 0x14, 0xe018);
18929         MP_WritePhyUshort(sc, 0x14, 0x0208);
18930         MP_WritePhyUshort(sc, 0x14, 0xa1f8);
18931         MP_WritePhyUshort(sc, 0x14, 0x8480);
18932         MP_WritePhyUshort(sc, 0x14, 0xc004);
18933         MP_WritePhyUshort(sc, 0x14, 0xd710);
18934         MP_WritePhyUshort(sc, 0x14, 0x4000);
18935         MP_WritePhyUshort(sc, 0x14, 0x6046);
18936         MP_WritePhyUshort(sc, 0x14, 0x2d0d);
18937         MP_WritePhyUshort(sc, 0x14, 0xa43f);
18938         MP_WritePhyUshort(sc, 0x14, 0xa105);
18939         MP_WritePhyUshort(sc, 0x14, 0x8228);
18940         MP_WritePhyUshort(sc, 0x14, 0xc004);
18941         MP_WritePhyUshort(sc, 0x14, 0xd710);
18942         MP_WritePhyUshort(sc, 0x14, 0x4000);
18943         MP_WritePhyUshort(sc, 0x14, 0x81bc);
18944         MP_WritePhyUshort(sc, 0x14, 0xa220);
18945         MP_WritePhyUshort(sc, 0x14, 0x1d97);
18946         MP_WritePhyUshort(sc, 0x14, 0x8220);
18947         MP_WritePhyUshort(sc, 0x14, 0xa1bc);
18948         MP_WritePhyUshort(sc, 0x14, 0xc040);
18949         MP_WritePhyUshort(sc, 0x14, 0xd710);
18950         MP_WritePhyUshort(sc, 0x14, 0x30e1);
18951         MP_WritePhyUshort(sc, 0x14, 0x0abc);
18952         MP_WritePhyUshort(sc, 0x14, 0x30e1);
18953         MP_WritePhyUshort(sc, 0x14, 0x3d0d);
18954         MP_WritePhyUshort(sc, 0x14, 0xd71e);
18955         MP_WritePhyUshort(sc, 0x14, 0x7f4c);
18956         MP_WritePhyUshort(sc, 0x14, 0x2ab6);
18957         MP_WritePhyUshort(sc, 0x14, 0xa802);
18958         MP_WritePhyUshort(sc, 0x14, 0xd70c);
18959         MP_WritePhyUshort(sc, 0x14, 0x4244);
18960         MP_WritePhyUshort(sc, 0x14, 0xa301);
18961         MP_WritePhyUshort(sc, 0x14, 0xc004);
18962         MP_WritePhyUshort(sc, 0x14, 0xd711);
18963         MP_WritePhyUshort(sc, 0x14, 0x3128);
18964         MP_WritePhyUshort(sc, 0x14, 0x3da5);
18965         MP_WritePhyUshort(sc, 0x14, 0xd710);
18966         MP_WritePhyUshort(sc, 0x14, 0x5f80);
18967         MP_WritePhyUshort(sc, 0x14, 0xd711);
18968         MP_WritePhyUshort(sc, 0x14, 0x3109);
18969         MP_WritePhyUshort(sc, 0x14, 0x3da7);
18970         MP_WritePhyUshort(sc, 0x14, 0x2dab);
18971         MP_WritePhyUshort(sc, 0x14, 0xa801);
18972         MP_WritePhyUshort(sc, 0x14, 0x2d9a);
18973         MP_WritePhyUshort(sc, 0x14, 0xa802);
18974         MP_WritePhyUshort(sc, 0x14, 0xc004);
18975         MP_WritePhyUshort(sc, 0x14, 0xd710);
18976         MP_WritePhyUshort(sc, 0x14, 0x4000);
18977         MP_WritePhyUshort(sc, 0x14, 0x0800);
18978         MP_WritePhyUshort(sc, 0x14, 0xa510);
18979         MP_WritePhyUshort(sc, 0x14, 0xd710);
18980         MP_WritePhyUshort(sc, 0x14, 0x609a);
18981         MP_WritePhyUshort(sc, 0x14, 0xd71e);
18982         MP_WritePhyUshort(sc, 0x14, 0x7fac);
18983         MP_WritePhyUshort(sc, 0x14, 0x2ab6);
18984         MP_WritePhyUshort(sc, 0x14, 0x8510);
18985         MP_WritePhyUshort(sc, 0x14, 0x0800);
18986         MP_WritePhyUshort(sc, 0x13, 0xA01A);
18987         MP_WritePhyUshort(sc, 0x14, 0x0000);
18988         MP_WritePhyUshort(sc, 0x13, 0xA006);
18989         MP_WritePhyUshort(sc, 0x14, 0x0ad6);
18990         MP_WritePhyUshort(sc, 0x13, 0xA004);
18991         MP_WritePhyUshort(sc, 0x14, 0x07f5);
18992         MP_WritePhyUshort(sc, 0x13, 0xA002);
18993         MP_WritePhyUshort(sc, 0x14, 0x06a9);
18994         MP_WritePhyUshort(sc, 0x13, 0xA000);
18995         MP_WritePhyUshort(sc, 0x14, 0xf069);
18996         MP_WritePhyUshort(sc, 0x13, 0xB820);
18997         MP_WritePhyUshort(sc, 0x14, 0x0210);
18998 
18999         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19000         MP_WritePhyUshort(sc, 0x13, 0x83a0);
19001         MP_WritePhyUshort(sc, 0x14, 0xaf83);
19002         MP_WritePhyUshort(sc, 0x14, 0xacaf);
19003         MP_WritePhyUshort(sc, 0x14, 0x83b8);
19004         MP_WritePhyUshort(sc, 0x14, 0xaf83);
19005         MP_WritePhyUshort(sc, 0x14, 0xcdaf);
19006         MP_WritePhyUshort(sc, 0x14, 0x83d3);
19007         MP_WritePhyUshort(sc, 0x14, 0x0204);
19008         MP_WritePhyUshort(sc, 0x14, 0x9a02);
19009         MP_WritePhyUshort(sc, 0x14, 0x09a9);
19010         MP_WritePhyUshort(sc, 0x14, 0x0284);
19011         MP_WritePhyUshort(sc, 0x14, 0x61af);
19012         MP_WritePhyUshort(sc, 0x14, 0x02fc);
19013         MP_WritePhyUshort(sc, 0x14, 0xad20);
19014         MP_WritePhyUshort(sc, 0x14, 0x0302);
19015         MP_WritePhyUshort(sc, 0x14, 0x867c);
19016         MP_WritePhyUshort(sc, 0x14, 0xad21);
19017         MP_WritePhyUshort(sc, 0x14, 0x0302);
19018         MP_WritePhyUshort(sc, 0x14, 0x85c9);
19019         MP_WritePhyUshort(sc, 0x14, 0xad22);
19020         MP_WritePhyUshort(sc, 0x14, 0x0302);
19021         MP_WritePhyUshort(sc, 0x14, 0x1bc0);
19022         MP_WritePhyUshort(sc, 0x14, 0xaf17);
19023         MP_WritePhyUshort(sc, 0x14, 0xe302);
19024         MP_WritePhyUshort(sc, 0x14, 0x8703);
19025         MP_WritePhyUshort(sc, 0x14, 0xaf18);
19026         MP_WritePhyUshort(sc, 0x14, 0x6201);
19027         MP_WritePhyUshort(sc, 0x14, 0x06e0);
19028         MP_WritePhyUshort(sc, 0x14, 0x8148);
19029         MP_WritePhyUshort(sc, 0x14, 0xaf3c);
19030         MP_WritePhyUshort(sc, 0x14, 0x69f8);
19031         MP_WritePhyUshort(sc, 0x14, 0xf9fa);
19032         MP_WritePhyUshort(sc, 0x14, 0xef69);
19033         MP_WritePhyUshort(sc, 0x14, 0xee80);
19034         MP_WritePhyUshort(sc, 0x14, 0x10f7);
19035         MP_WritePhyUshort(sc, 0x14, 0xee80);
19036         MP_WritePhyUshort(sc, 0x14, 0x131f);
19037         MP_WritePhyUshort(sc, 0x14, 0xd104);
19038         MP_WritePhyUshort(sc, 0x14, 0xbf87);
19039         MP_WritePhyUshort(sc, 0x14, 0xf302);
19040         MP_WritePhyUshort(sc, 0x14, 0x4259);
19041         MP_WritePhyUshort(sc, 0x14, 0x0287);
19042         MP_WritePhyUshort(sc, 0x14, 0x88bf);
19043         MP_WritePhyUshort(sc, 0x14, 0x87cf);
19044         MP_WritePhyUshort(sc, 0x14, 0xd7b8);
19045         MP_WritePhyUshort(sc, 0x14, 0x22d0);
19046         MP_WritePhyUshort(sc, 0x14, 0x0c02);
19047         MP_WritePhyUshort(sc, 0x14, 0x4252);
19048         MP_WritePhyUshort(sc, 0x14, 0xee80);
19049         MP_WritePhyUshort(sc, 0x14, 0xcda0);
19050         MP_WritePhyUshort(sc, 0x14, 0xee80);
19051         MP_WritePhyUshort(sc, 0x14, 0xce8b);
19052         MP_WritePhyUshort(sc, 0x14, 0xee80);
19053         MP_WritePhyUshort(sc, 0x14, 0xd1f5);
19054         MP_WritePhyUshort(sc, 0x14, 0xee80);
19055         MP_WritePhyUshort(sc, 0x14, 0xd2a9);
19056         MP_WritePhyUshort(sc, 0x14, 0xee80);
19057         MP_WritePhyUshort(sc, 0x14, 0xd30a);
19058         MP_WritePhyUshort(sc, 0x14, 0xee80);
19059         MP_WritePhyUshort(sc, 0x14, 0xf010);
19060         MP_WritePhyUshort(sc, 0x14, 0xee80);
19061         MP_WritePhyUshort(sc, 0x14, 0xf38f);
19062         MP_WritePhyUshort(sc, 0x14, 0xee81);
19063         MP_WritePhyUshort(sc, 0x14, 0x011e);
19064         MP_WritePhyUshort(sc, 0x14, 0xee81);
19065         MP_WritePhyUshort(sc, 0x14, 0x0b4a);
19066         MP_WritePhyUshort(sc, 0x14, 0xee81);
19067         MP_WritePhyUshort(sc, 0x14, 0x0c7c);
19068         MP_WritePhyUshort(sc, 0x14, 0xee81);
19069         MP_WritePhyUshort(sc, 0x14, 0x127f);
19070         MP_WritePhyUshort(sc, 0x14, 0xd100);
19071         MP_WritePhyUshort(sc, 0x14, 0x0210);
19072         MP_WritePhyUshort(sc, 0x14, 0xb5ee);
19073         MP_WritePhyUshort(sc, 0x14, 0x8088);
19074         MP_WritePhyUshort(sc, 0x14, 0xa4ee);
19075         MP_WritePhyUshort(sc, 0x14, 0x8089);
19076         MP_WritePhyUshort(sc, 0x14, 0x44ee);
19077         MP_WritePhyUshort(sc, 0x14, 0x809a);
19078         MP_WritePhyUshort(sc, 0x14, 0xa4ee);
19079         MP_WritePhyUshort(sc, 0x14, 0x809b);
19080         MP_WritePhyUshort(sc, 0x14, 0x44ee);
19081         MP_WritePhyUshort(sc, 0x14, 0x809c);
19082         MP_WritePhyUshort(sc, 0x14, 0xa7ee);
19083         MP_WritePhyUshort(sc, 0x14, 0x80a5);
19084         MP_WritePhyUshort(sc, 0x14, 0xa7d2);
19085         MP_WritePhyUshort(sc, 0x14, 0x0002);
19086         MP_WritePhyUshort(sc, 0x14, 0x0e66);
19087         MP_WritePhyUshort(sc, 0x14, 0x0285);
19088         MP_WritePhyUshort(sc, 0x14, 0xc0ee);
19089         MP_WritePhyUshort(sc, 0x14, 0x87fc);
19090         MP_WritePhyUshort(sc, 0x14, 0x00e0);
19091         MP_WritePhyUshort(sc, 0x14, 0x8245);
19092         MP_WritePhyUshort(sc, 0x14, 0xf622);
19093         MP_WritePhyUshort(sc, 0x14, 0xe482);
19094         MP_WritePhyUshort(sc, 0x14, 0x45ef);
19095         MP_WritePhyUshort(sc, 0x14, 0x96fe);
19096         MP_WritePhyUshort(sc, 0x14, 0xfdfc);
19097         MP_WritePhyUshort(sc, 0x14, 0x0402);
19098         MP_WritePhyUshort(sc, 0x14, 0x847a);
19099         MP_WritePhyUshort(sc, 0x14, 0x0284);
19100         MP_WritePhyUshort(sc, 0x14, 0xb302);
19101         MP_WritePhyUshort(sc, 0x14, 0x0cab);
19102         MP_WritePhyUshort(sc, 0x14, 0x020c);
19103         MP_WritePhyUshort(sc, 0x14, 0xc402);
19104         MP_WritePhyUshort(sc, 0x14, 0x0cef);
19105         MP_WritePhyUshort(sc, 0x14, 0x020d);
19106         MP_WritePhyUshort(sc, 0x14, 0x0802);
19107         MP_WritePhyUshort(sc, 0x14, 0x0d33);
19108         MP_WritePhyUshort(sc, 0x14, 0x020c);
19109         MP_WritePhyUshort(sc, 0x14, 0x3d04);
19110         MP_WritePhyUshort(sc, 0x14, 0xf8fa);
19111         MP_WritePhyUshort(sc, 0x14, 0xef69);
19112         MP_WritePhyUshort(sc, 0x14, 0xe182);
19113         MP_WritePhyUshort(sc, 0x14, 0x2fac);
19114         MP_WritePhyUshort(sc, 0x14, 0x291a);
19115         MP_WritePhyUshort(sc, 0x14, 0xe082);
19116         MP_WritePhyUshort(sc, 0x14, 0x24ac);
19117         MP_WritePhyUshort(sc, 0x14, 0x2102);
19118         MP_WritePhyUshort(sc, 0x14, 0xae22);
19119         MP_WritePhyUshort(sc, 0x14, 0x0210);
19120         MP_WritePhyUshort(sc, 0x14, 0x57f6);
19121         MP_WritePhyUshort(sc, 0x14, 0x21e4);
19122         MP_WritePhyUshort(sc, 0x14, 0x8224);
19123         MP_WritePhyUshort(sc, 0x14, 0xd101);
19124         MP_WritePhyUshort(sc, 0x14, 0xbf44);
19125         MP_WritePhyUshort(sc, 0x14, 0xd202);
19126         MP_WritePhyUshort(sc, 0x14, 0x4259);
19127         MP_WritePhyUshort(sc, 0x14, 0xae10);
19128         MP_WritePhyUshort(sc, 0x14, 0x0212);
19129         MP_WritePhyUshort(sc, 0x14, 0x4cf6);
19130         MP_WritePhyUshort(sc, 0x14, 0x29e5);
19131         MP_WritePhyUshort(sc, 0x14, 0x822f);
19132         MP_WritePhyUshort(sc, 0x14, 0xe082);
19133         MP_WritePhyUshort(sc, 0x14, 0x24f6);
19134         MP_WritePhyUshort(sc, 0x14, 0x21e4);
19135         MP_WritePhyUshort(sc, 0x14, 0x8224);
19136         MP_WritePhyUshort(sc, 0x14, 0xef96);
19137         MP_WritePhyUshort(sc, 0x14, 0xfefc);
19138         MP_WritePhyUshort(sc, 0x14, 0x04f8);
19139         MP_WritePhyUshort(sc, 0x14, 0xe182);
19140         MP_WritePhyUshort(sc, 0x14, 0x2fac);
19141         MP_WritePhyUshort(sc, 0x14, 0x2a18);
19142         MP_WritePhyUshort(sc, 0x14, 0xe082);
19143         MP_WritePhyUshort(sc, 0x14, 0x24ac);
19144         MP_WritePhyUshort(sc, 0x14, 0x2202);
19145         MP_WritePhyUshort(sc, 0x14, 0xae26);
19146         MP_WritePhyUshort(sc, 0x14, 0x0284);
19147         MP_WritePhyUshort(sc, 0x14, 0xf802);
19148         MP_WritePhyUshort(sc, 0x14, 0x8565);
19149         MP_WritePhyUshort(sc, 0x14, 0xd101);
19150         MP_WritePhyUshort(sc, 0x14, 0xbf44);
19151         MP_WritePhyUshort(sc, 0x14, 0xd502);
19152         MP_WritePhyUshort(sc, 0x14, 0x4259);
19153         MP_WritePhyUshort(sc, 0x14, 0xae0e);
19154         MP_WritePhyUshort(sc, 0x14, 0x0284);
19155         MP_WritePhyUshort(sc, 0x14, 0xea02);
19156         MP_WritePhyUshort(sc, 0x14, 0x85a9);
19157         MP_WritePhyUshort(sc, 0x14, 0xe182);
19158         MP_WritePhyUshort(sc, 0x14, 0x2ff6);
19159         MP_WritePhyUshort(sc, 0x14, 0x2ae5);
19160         MP_WritePhyUshort(sc, 0x14, 0x822f);
19161         MP_WritePhyUshort(sc, 0x14, 0xe082);
19162         MP_WritePhyUshort(sc, 0x14, 0x24f6);
19163         MP_WritePhyUshort(sc, 0x14, 0x22e4);
19164         MP_WritePhyUshort(sc, 0x14, 0x8224);
19165         MP_WritePhyUshort(sc, 0x14, 0xfc04);
19166         MP_WritePhyUshort(sc, 0x14, 0xf9e2);
19167         MP_WritePhyUshort(sc, 0x14, 0x8011);
19168         MP_WritePhyUshort(sc, 0x14, 0xad31);
19169         MP_WritePhyUshort(sc, 0x14, 0x05d2);
19170         MP_WritePhyUshort(sc, 0x14, 0x0002);
19171         MP_WritePhyUshort(sc, 0x14, 0x0e66);
19172         MP_WritePhyUshort(sc, 0x14, 0xfd04);
19173         MP_WritePhyUshort(sc, 0x14, 0xf8f9);
19174         MP_WritePhyUshort(sc, 0x14, 0xfaef);
19175         MP_WritePhyUshort(sc, 0x14, 0x69e0);
19176         MP_WritePhyUshort(sc, 0x14, 0x8011);
19177         MP_WritePhyUshort(sc, 0x14, 0xad21);
19178         MP_WritePhyUshort(sc, 0x14, 0x5cbf);
19179         MP_WritePhyUshort(sc, 0x14, 0x43be);
19180         MP_WritePhyUshort(sc, 0x14, 0x0242);
19181         MP_WritePhyUshort(sc, 0x14, 0x97ac);
19182         MP_WritePhyUshort(sc, 0x14, 0x281b);
19183         MP_WritePhyUshort(sc, 0x14, 0xbf43);
19184         MP_WritePhyUshort(sc, 0x14, 0xc102);
19185         MP_WritePhyUshort(sc, 0x14, 0x4297);
19186         MP_WritePhyUshort(sc, 0x14, 0xac28);
19187         MP_WritePhyUshort(sc, 0x14, 0x12bf);
19188         MP_WritePhyUshort(sc, 0x14, 0x43c7);
19189         MP_WritePhyUshort(sc, 0x14, 0x0242);
19190         MP_WritePhyUshort(sc, 0x14, 0x97ac);
19191         MP_WritePhyUshort(sc, 0x14, 0x2804);
19192         MP_WritePhyUshort(sc, 0x14, 0xd300);
19193         MP_WritePhyUshort(sc, 0x14, 0xae07);
19194         MP_WritePhyUshort(sc, 0x14, 0xd306);
19195         MP_WritePhyUshort(sc, 0x14, 0xaf85);
19196         MP_WritePhyUshort(sc, 0x14, 0x56d3);
19197         MP_WritePhyUshort(sc, 0x14, 0x03e0);
19198         MP_WritePhyUshort(sc, 0x14, 0x8011);
19199         MP_WritePhyUshort(sc, 0x14, 0xad26);
19200         MP_WritePhyUshort(sc, 0x14, 0x25bf);
19201         MP_WritePhyUshort(sc, 0x14, 0x4559);
19202         MP_WritePhyUshort(sc, 0x14, 0x0242);
19203         MP_WritePhyUshort(sc, 0x14, 0x97e2);
19204         MP_WritePhyUshort(sc, 0x14, 0x8073);
19205         MP_WritePhyUshort(sc, 0x14, 0x0d21);
19206         MP_WritePhyUshort(sc, 0x14, 0xf637);
19207         MP_WritePhyUshort(sc, 0x14, 0x0d11);
19208         MP_WritePhyUshort(sc, 0x14, 0xf62f);
19209         MP_WritePhyUshort(sc, 0x14, 0x1b21);
19210         MP_WritePhyUshort(sc, 0x14, 0xaa02);
19211         MP_WritePhyUshort(sc, 0x14, 0xae10);
19212         MP_WritePhyUshort(sc, 0x14, 0xe280);
19213         MP_WritePhyUshort(sc, 0x14, 0x740d);
19214         MP_WritePhyUshort(sc, 0x14, 0x21f6);
19215         MP_WritePhyUshort(sc, 0x14, 0x371b);
19216         MP_WritePhyUshort(sc, 0x14, 0x21aa);
19217         MP_WritePhyUshort(sc, 0x14, 0x0313);
19218         MP_WritePhyUshort(sc, 0x14, 0xae02);
19219         MP_WritePhyUshort(sc, 0x14, 0x2b02);
19220         MP_WritePhyUshort(sc, 0x14, 0x020e);
19221         MP_WritePhyUshort(sc, 0x14, 0x5102);
19222         MP_WritePhyUshort(sc, 0x14, 0x0e66);
19223         MP_WritePhyUshort(sc, 0x14, 0x020f);
19224         MP_WritePhyUshort(sc, 0x14, 0xa3ef);
19225         MP_WritePhyUshort(sc, 0x14, 0x96fe);
19226         MP_WritePhyUshort(sc, 0x14, 0xfdfc);
19227         MP_WritePhyUshort(sc, 0x14, 0x04f8);
19228         MP_WritePhyUshort(sc, 0x14, 0xf9fa);
19229         MP_WritePhyUshort(sc, 0x14, 0xef69);
19230         MP_WritePhyUshort(sc, 0x14, 0xe080);
19231         MP_WritePhyUshort(sc, 0x14, 0x12ad);
19232         MP_WritePhyUshort(sc, 0x14, 0x2733);
19233         MP_WritePhyUshort(sc, 0x14, 0xbf43);
19234         MP_WritePhyUshort(sc, 0x14, 0xbe02);
19235         MP_WritePhyUshort(sc, 0x14, 0x4297);
19236         MP_WritePhyUshort(sc, 0x14, 0xac28);
19237         MP_WritePhyUshort(sc, 0x14, 0x09bf);
19238         MP_WritePhyUshort(sc, 0x14, 0x43c1);
19239         MP_WritePhyUshort(sc, 0x14, 0x0242);
19240         MP_WritePhyUshort(sc, 0x14, 0x97ad);
19241         MP_WritePhyUshort(sc, 0x14, 0x2821);
19242         MP_WritePhyUshort(sc, 0x14, 0xbf45);
19243         MP_WritePhyUshort(sc, 0x14, 0x5902);
19244         MP_WritePhyUshort(sc, 0x14, 0x4297);
19245         MP_WritePhyUshort(sc, 0x14, 0xe387);
19246         MP_WritePhyUshort(sc, 0x14, 0xffd2);
19247         MP_WritePhyUshort(sc, 0x14, 0x001b);
19248         MP_WritePhyUshort(sc, 0x14, 0x45ac);
19249         MP_WritePhyUshort(sc, 0x14, 0x2711);
19250         MP_WritePhyUshort(sc, 0x14, 0xe187);
19251         MP_WritePhyUshort(sc, 0x14, 0xfebf);
19252         MP_WritePhyUshort(sc, 0x14, 0x87e4);
19253         MP_WritePhyUshort(sc, 0x14, 0x0242);
19254         MP_WritePhyUshort(sc, 0x14, 0x590d);
19255         MP_WritePhyUshort(sc, 0x14, 0x11bf);
19256         MP_WritePhyUshort(sc, 0x14, 0x87e7);
19257         MP_WritePhyUshort(sc, 0x14, 0x0242);
19258         MP_WritePhyUshort(sc, 0x14, 0x59ef);
19259         MP_WritePhyUshort(sc, 0x14, 0x96fe);
19260         MP_WritePhyUshort(sc, 0x14, 0xfdfc);
19261         MP_WritePhyUshort(sc, 0x14, 0x04f8);
19262         MP_WritePhyUshort(sc, 0x14, 0xfaef);
19263         MP_WritePhyUshort(sc, 0x14, 0x69d1);
19264         MP_WritePhyUshort(sc, 0x14, 0x00bf);
19265         MP_WritePhyUshort(sc, 0x14, 0x87e4);
19266         MP_WritePhyUshort(sc, 0x14, 0x0242);
19267         MP_WritePhyUshort(sc, 0x14, 0x59bf);
19268         MP_WritePhyUshort(sc, 0x14, 0x87e7);
19269         MP_WritePhyUshort(sc, 0x14, 0x0242);
19270         MP_WritePhyUshort(sc, 0x14, 0x59ef);
19271         MP_WritePhyUshort(sc, 0x14, 0x96fe);
19272         MP_WritePhyUshort(sc, 0x14, 0xfc04);
19273         MP_WritePhyUshort(sc, 0x14, 0xee87);
19274         MP_WritePhyUshort(sc, 0x14, 0xff46);
19275         MP_WritePhyUshort(sc, 0x14, 0xee87);
19276         MP_WritePhyUshort(sc, 0x14, 0xfe01);
19277         MP_WritePhyUshort(sc, 0x14, 0x04f8);
19278         MP_WritePhyUshort(sc, 0x14, 0xfaef);
19279         MP_WritePhyUshort(sc, 0x14, 0x69e0);
19280         MP_WritePhyUshort(sc, 0x14, 0x8241);
19281         MP_WritePhyUshort(sc, 0x14, 0xa000);
19282         MP_WritePhyUshort(sc, 0x14, 0x0502);
19283         MP_WritePhyUshort(sc, 0x14, 0x85eb);
19284         MP_WritePhyUshort(sc, 0x14, 0xae0e);
19285         MP_WritePhyUshort(sc, 0x14, 0xa001);
19286         MP_WritePhyUshort(sc, 0x14, 0x0502);
19287         MP_WritePhyUshort(sc, 0x14, 0x1a5a);
19288         MP_WritePhyUshort(sc, 0x14, 0xae06);
19289         MP_WritePhyUshort(sc, 0x14, 0xa002);
19290         MP_WritePhyUshort(sc, 0x14, 0x0302);
19291         MP_WritePhyUshort(sc, 0x14, 0x1ae6);
19292         MP_WritePhyUshort(sc, 0x14, 0xef96);
19293         MP_WritePhyUshort(sc, 0x14, 0xfefc);
19294         MP_WritePhyUshort(sc, 0x14, 0x04f8);
19295         MP_WritePhyUshort(sc, 0x14, 0xf9fa);
19296         MP_WritePhyUshort(sc, 0x14, 0xef69);
19297         MP_WritePhyUshort(sc, 0x14, 0xe082);
19298         MP_WritePhyUshort(sc, 0x14, 0x29f6);
19299         MP_WritePhyUshort(sc, 0x14, 0x21e4);
19300         MP_WritePhyUshort(sc, 0x14, 0x8229);
19301         MP_WritePhyUshort(sc, 0x14, 0xe080);
19302         MP_WritePhyUshort(sc, 0x14, 0x10ac);
19303         MP_WritePhyUshort(sc, 0x14, 0x2202);
19304         MP_WritePhyUshort(sc, 0x14, 0xae76);
19305         MP_WritePhyUshort(sc, 0x14, 0xe082);
19306         MP_WritePhyUshort(sc, 0x14, 0x27f7);
19307         MP_WritePhyUshort(sc, 0x14, 0x21e4);
19308         MP_WritePhyUshort(sc, 0x14, 0x8227);
19309         MP_WritePhyUshort(sc, 0x14, 0xbf43);
19310         MP_WritePhyUshort(sc, 0x14, 0x1302);
19311         MP_WritePhyUshort(sc, 0x14, 0x4297);
19312         MP_WritePhyUshort(sc, 0x14, 0xef21);
19313         MP_WritePhyUshort(sc, 0x14, 0xbf43);
19314         MP_WritePhyUshort(sc, 0x14, 0x1602);
19315         MP_WritePhyUshort(sc, 0x14, 0x4297);
19316         MP_WritePhyUshort(sc, 0x14, 0x0c11);
19317         MP_WritePhyUshort(sc, 0x14, 0x1e21);
19318         MP_WritePhyUshort(sc, 0x14, 0xbf43);
19319         MP_WritePhyUshort(sc, 0x14, 0x1902);
19320         MP_WritePhyUshort(sc, 0x14, 0x4297);
19321         MP_WritePhyUshort(sc, 0x14, 0x0c12);
19322         MP_WritePhyUshort(sc, 0x14, 0x1e21);
19323         MP_WritePhyUshort(sc, 0x14, 0xe682);
19324         MP_WritePhyUshort(sc, 0x14, 0x43a2);
19325         MP_WritePhyUshort(sc, 0x14, 0x000a);
19326         MP_WritePhyUshort(sc, 0x14, 0xe182);
19327         MP_WritePhyUshort(sc, 0x14, 0x27f6);
19328         MP_WritePhyUshort(sc, 0x14, 0x29e5);
19329         MP_WritePhyUshort(sc, 0x14, 0x8227);
19330         MP_WritePhyUshort(sc, 0x14, 0xae42);
19331         MP_WritePhyUshort(sc, 0x14, 0xe082);
19332         MP_WritePhyUshort(sc, 0x14, 0x44f7);
19333         MP_WritePhyUshort(sc, 0x14, 0x21e4);
19334         MP_WritePhyUshort(sc, 0x14, 0x8244);
19335         MP_WritePhyUshort(sc, 0x14, 0x0246);
19336         MP_WritePhyUshort(sc, 0x14, 0xaebf);
19337         MP_WritePhyUshort(sc, 0x14, 0x4325);
19338         MP_WritePhyUshort(sc, 0x14, 0x0242);
19339         MP_WritePhyUshort(sc, 0x14, 0x97ef);
19340         MP_WritePhyUshort(sc, 0x14, 0x21bf);
19341         MP_WritePhyUshort(sc, 0x14, 0x431c);
19342         MP_WritePhyUshort(sc, 0x14, 0x0242);
19343         MP_WritePhyUshort(sc, 0x14, 0x970c);
19344         MP_WritePhyUshort(sc, 0x14, 0x121e);
19345         MP_WritePhyUshort(sc, 0x14, 0x21bf);
19346         MP_WritePhyUshort(sc, 0x14, 0x431f);
19347         MP_WritePhyUshort(sc, 0x14, 0x0242);
19348         MP_WritePhyUshort(sc, 0x14, 0x970c);
19349         MP_WritePhyUshort(sc, 0x14, 0x131e);
19350         MP_WritePhyUshort(sc, 0x14, 0x21bf);
19351         MP_WritePhyUshort(sc, 0x14, 0x4328);
19352         MP_WritePhyUshort(sc, 0x14, 0x0242);
19353         MP_WritePhyUshort(sc, 0x14, 0x970c);
19354         MP_WritePhyUshort(sc, 0x14, 0x141e);
19355         MP_WritePhyUshort(sc, 0x14, 0x21bf);
19356         MP_WritePhyUshort(sc, 0x14, 0x44b1);
19357         MP_WritePhyUshort(sc, 0x14, 0x0242);
19358         MP_WritePhyUshort(sc, 0x14, 0x970c);
19359         MP_WritePhyUshort(sc, 0x14, 0x161e);
19360         MP_WritePhyUshort(sc, 0x14, 0x21e6);
19361         MP_WritePhyUshort(sc, 0x14, 0x8242);
19362         MP_WritePhyUshort(sc, 0x14, 0xee82);
19363         MP_WritePhyUshort(sc, 0x14, 0x4101);
19364         MP_WritePhyUshort(sc, 0x14, 0xef96);
19365         MP_WritePhyUshort(sc, 0x14, 0xfefd);
19366         MP_WritePhyUshort(sc, 0x14, 0xfc04);
19367         MP_WritePhyUshort(sc, 0x14, 0xf8fa);
19368         MP_WritePhyUshort(sc, 0x14, 0xef69);
19369         MP_WritePhyUshort(sc, 0x14, 0xe082);
19370         MP_WritePhyUshort(sc, 0x14, 0x46a0);
19371         MP_WritePhyUshort(sc, 0x14, 0x0005);
19372         MP_WritePhyUshort(sc, 0x14, 0x0286);
19373         MP_WritePhyUshort(sc, 0x14, 0x96ae);
19374         MP_WritePhyUshort(sc, 0x14, 0x06a0);
19375         MP_WritePhyUshort(sc, 0x14, 0x0103);
19376         MP_WritePhyUshort(sc, 0x14, 0x0219);
19377         MP_WritePhyUshort(sc, 0x14, 0x19ef);
19378         MP_WritePhyUshort(sc, 0x14, 0x96fe);
19379         MP_WritePhyUshort(sc, 0x14, 0xfc04);
19380         MP_WritePhyUshort(sc, 0x14, 0xf8fa);
19381         MP_WritePhyUshort(sc, 0x14, 0xef69);
19382         MP_WritePhyUshort(sc, 0x14, 0xe082);
19383         MP_WritePhyUshort(sc, 0x14, 0x29f6);
19384         MP_WritePhyUshort(sc, 0x14, 0x20e4);
19385         MP_WritePhyUshort(sc, 0x14, 0x8229);
19386         MP_WritePhyUshort(sc, 0x14, 0xe080);
19387         MP_WritePhyUshort(sc, 0x14, 0x10ac);
19388         MP_WritePhyUshort(sc, 0x14, 0x2102);
19389         MP_WritePhyUshort(sc, 0x14, 0xae54);
19390         MP_WritePhyUshort(sc, 0x14, 0xe082);
19391         MP_WritePhyUshort(sc, 0x14, 0x27f7);
19392         MP_WritePhyUshort(sc, 0x14, 0x20e4);
19393         MP_WritePhyUshort(sc, 0x14, 0x8227);
19394         MP_WritePhyUshort(sc, 0x14, 0xbf42);
19395         MP_WritePhyUshort(sc, 0x14, 0xe602);
19396         MP_WritePhyUshort(sc, 0x14, 0x4297);
19397         MP_WritePhyUshort(sc, 0x14, 0xac28);
19398         MP_WritePhyUshort(sc, 0x14, 0x22bf);
19399         MP_WritePhyUshort(sc, 0x14, 0x430d);
19400         MP_WritePhyUshort(sc, 0x14, 0x0242);
19401         MP_WritePhyUshort(sc, 0x14, 0x97e5);
19402         MP_WritePhyUshort(sc, 0x14, 0x8247);
19403         MP_WritePhyUshort(sc, 0x14, 0xac28);
19404         MP_WritePhyUshort(sc, 0x14, 0x20d1);
19405         MP_WritePhyUshort(sc, 0x14, 0x03bf);
19406         MP_WritePhyUshort(sc, 0x14, 0x4307);
19407         MP_WritePhyUshort(sc, 0x14, 0x0242);
19408         MP_WritePhyUshort(sc, 0x14, 0x59ee);
19409         MP_WritePhyUshort(sc, 0x14, 0x8246);
19410         MP_WritePhyUshort(sc, 0x14, 0x00e1);
19411         MP_WritePhyUshort(sc, 0x14, 0x8227);
19412         MP_WritePhyUshort(sc, 0x14, 0xf628);
19413         MP_WritePhyUshort(sc, 0x14, 0xe582);
19414         MP_WritePhyUshort(sc, 0x14, 0x27ae);
19415         MP_WritePhyUshort(sc, 0x14, 0x21d1);
19416         MP_WritePhyUshort(sc, 0x14, 0x04bf);
19417         MP_WritePhyUshort(sc, 0x14, 0x4307);
19418         MP_WritePhyUshort(sc, 0x14, 0x0242);
19419         MP_WritePhyUshort(sc, 0x14, 0x59ae);
19420         MP_WritePhyUshort(sc, 0x14, 0x08d1);
19421         MP_WritePhyUshort(sc, 0x14, 0x05bf);
19422         MP_WritePhyUshort(sc, 0x14, 0x4307);
19423         MP_WritePhyUshort(sc, 0x14, 0x0242);
19424         MP_WritePhyUshort(sc, 0x14, 0x59e0);
19425         MP_WritePhyUshort(sc, 0x14, 0x8244);
19426         MP_WritePhyUshort(sc, 0x14, 0xf720);
19427         MP_WritePhyUshort(sc, 0x14, 0xe482);
19428         MP_WritePhyUshort(sc, 0x14, 0x4402);
19429         MP_WritePhyUshort(sc, 0x14, 0x46ae);
19430         MP_WritePhyUshort(sc, 0x14, 0xee82);
19431         MP_WritePhyUshort(sc, 0x14, 0x4601);
19432         MP_WritePhyUshort(sc, 0x14, 0xef96);
19433         MP_WritePhyUshort(sc, 0x14, 0xfefc);
19434         MP_WritePhyUshort(sc, 0x14, 0x04f8);
19435         MP_WritePhyUshort(sc, 0x14, 0xfaef);
19436         MP_WritePhyUshort(sc, 0x14, 0x69e0);
19437         MP_WritePhyUshort(sc, 0x14, 0x8013);
19438         MP_WritePhyUshort(sc, 0x14, 0xad24);
19439         MP_WritePhyUshort(sc, 0x14, 0x1cbf);
19440         MP_WritePhyUshort(sc, 0x14, 0x87f0);
19441         MP_WritePhyUshort(sc, 0x14, 0x0242);
19442         MP_WritePhyUshort(sc, 0x14, 0x97ad);
19443         MP_WritePhyUshort(sc, 0x14, 0x2813);
19444         MP_WritePhyUshort(sc, 0x14, 0xe087);
19445         MP_WritePhyUshort(sc, 0x14, 0xfca0);
19446         MP_WritePhyUshort(sc, 0x14, 0x0005);
19447         MP_WritePhyUshort(sc, 0x14, 0x0287);
19448         MP_WritePhyUshort(sc, 0x14, 0x36ae);
19449         MP_WritePhyUshort(sc, 0x14, 0x10a0);
19450         MP_WritePhyUshort(sc, 0x14, 0x0105);
19451         MP_WritePhyUshort(sc, 0x14, 0x0287);
19452         MP_WritePhyUshort(sc, 0x14, 0x48ae);
19453         MP_WritePhyUshort(sc, 0x14, 0x08e0);
19454         MP_WritePhyUshort(sc, 0x14, 0x8230);
19455         MP_WritePhyUshort(sc, 0x14, 0xf626);
19456         MP_WritePhyUshort(sc, 0x14, 0xe482);
19457         MP_WritePhyUshort(sc, 0x14, 0x30ef);
19458         MP_WritePhyUshort(sc, 0x14, 0x96fe);
19459         MP_WritePhyUshort(sc, 0x14, 0xfc04);
19460         MP_WritePhyUshort(sc, 0x14, 0xf8e0);
19461         MP_WritePhyUshort(sc, 0x14, 0x8245);
19462         MP_WritePhyUshort(sc, 0x14, 0xf722);
19463         MP_WritePhyUshort(sc, 0x14, 0xe482);
19464         MP_WritePhyUshort(sc, 0x14, 0x4502);
19465         MP_WritePhyUshort(sc, 0x14, 0x46ae);
19466         MP_WritePhyUshort(sc, 0x14, 0xee87);
19467         MP_WritePhyUshort(sc, 0x14, 0xfc01);
19468         MP_WritePhyUshort(sc, 0x14, 0xfc04);
19469         MP_WritePhyUshort(sc, 0x14, 0xf8fa);
19470         MP_WritePhyUshort(sc, 0x14, 0xef69);
19471         MP_WritePhyUshort(sc, 0x14, 0xfb02);
19472         MP_WritePhyUshort(sc, 0x14, 0x46d3);
19473         MP_WritePhyUshort(sc, 0x14, 0xad50);
19474         MP_WritePhyUshort(sc, 0x14, 0x2fbf);
19475         MP_WritePhyUshort(sc, 0x14, 0x87ed);
19476         MP_WritePhyUshort(sc, 0x14, 0xd101);
19477         MP_WritePhyUshort(sc, 0x14, 0x0242);
19478         MP_WritePhyUshort(sc, 0x14, 0x59bf);
19479         MP_WritePhyUshort(sc, 0x14, 0x87ed);
19480         MP_WritePhyUshort(sc, 0x14, 0xd100);
19481         MP_WritePhyUshort(sc, 0x14, 0x0242);
19482         MP_WritePhyUshort(sc, 0x14, 0x59e0);
19483         MP_WritePhyUshort(sc, 0x14, 0x8245);
19484         MP_WritePhyUshort(sc, 0x14, 0xf622);
19485         MP_WritePhyUshort(sc, 0x14, 0xe482);
19486         MP_WritePhyUshort(sc, 0x14, 0x4502);
19487         MP_WritePhyUshort(sc, 0x14, 0x46ae);
19488         MP_WritePhyUshort(sc, 0x14, 0xd100);
19489         MP_WritePhyUshort(sc, 0x14, 0xbf87);
19490         MP_WritePhyUshort(sc, 0x14, 0xf002);
19491         MP_WritePhyUshort(sc, 0x14, 0x4259);
19492         MP_WritePhyUshort(sc, 0x14, 0xee87);
19493         MP_WritePhyUshort(sc, 0x14, 0xfc00);
19494         MP_WritePhyUshort(sc, 0x14, 0xe082);
19495         MP_WritePhyUshort(sc, 0x14, 0x30f6);
19496         MP_WritePhyUshort(sc, 0x14, 0x26e4);
19497         MP_WritePhyUshort(sc, 0x14, 0x8230);
19498         MP_WritePhyUshort(sc, 0x14, 0xffef);
19499         MP_WritePhyUshort(sc, 0x14, 0x96fe);
19500         MP_WritePhyUshort(sc, 0x14, 0xfc04);
19501         MP_WritePhyUshort(sc, 0x14, 0xf8f9);
19502         MP_WritePhyUshort(sc, 0x14, 0xface);
19503         MP_WritePhyUshort(sc, 0x14, 0xfaef);
19504         MP_WritePhyUshort(sc, 0x14, 0x69fb);
19505         MP_WritePhyUshort(sc, 0x14, 0xbf87);
19506         MP_WritePhyUshort(sc, 0x14, 0xb3d7);
19507         MP_WritePhyUshort(sc, 0x14, 0x001c);
19508         MP_WritePhyUshort(sc, 0x14, 0xd819);
19509         MP_WritePhyUshort(sc, 0x14, 0xd919);
19510         MP_WritePhyUshort(sc, 0x14, 0xda19);
19511         MP_WritePhyUshort(sc, 0x14, 0xdb19);
19512         MP_WritePhyUshort(sc, 0x14, 0x07ef);
19513         MP_WritePhyUshort(sc, 0x14, 0x9502);
19514         MP_WritePhyUshort(sc, 0x14, 0x4259);
19515         MP_WritePhyUshort(sc, 0x14, 0x073f);
19516         MP_WritePhyUshort(sc, 0x14, 0x0004);
19517         MP_WritePhyUshort(sc, 0x14, 0x9fec);
19518         MP_WritePhyUshort(sc, 0x14, 0xffef);
19519         MP_WritePhyUshort(sc, 0x14, 0x96fe);
19520         MP_WritePhyUshort(sc, 0x14, 0xc6fe);
19521         MP_WritePhyUshort(sc, 0x14, 0xfdfc);
19522         MP_WritePhyUshort(sc, 0x14, 0x0400);
19523         MP_WritePhyUshort(sc, 0x14, 0x0145);
19524         MP_WritePhyUshort(sc, 0x14, 0x7d00);
19525         MP_WritePhyUshort(sc, 0x14, 0x0345);
19526         MP_WritePhyUshort(sc, 0x14, 0x5c00);
19527         MP_WritePhyUshort(sc, 0x14, 0x0143);
19528         MP_WritePhyUshort(sc, 0x14, 0x4f00);
19529         MP_WritePhyUshort(sc, 0x14, 0x0387);
19530         MP_WritePhyUshort(sc, 0x14, 0xdb00);
19531         MP_WritePhyUshort(sc, 0x14, 0x0987);
19532         MP_WritePhyUshort(sc, 0x14, 0xde00);
19533         MP_WritePhyUshort(sc, 0x14, 0x0987);
19534         MP_WritePhyUshort(sc, 0x14, 0xe100);
19535         MP_WritePhyUshort(sc, 0x14, 0x0087);
19536         MP_WritePhyUshort(sc, 0x14, 0xeaa4);
19537         MP_WritePhyUshort(sc, 0x14, 0x00b8);
19538         MP_WritePhyUshort(sc, 0x14, 0x20c4);
19539         MP_WritePhyUshort(sc, 0x14, 0x1600);
19540         MP_WritePhyUshort(sc, 0x14, 0x000f);
19541         MP_WritePhyUshort(sc, 0x14, 0xf800);
19542         MP_WritePhyUshort(sc, 0x14, 0x7098);
19543         MP_WritePhyUshort(sc, 0x14, 0xa58a);
19544         MP_WritePhyUshort(sc, 0x14, 0xb6a8);
19545         MP_WritePhyUshort(sc, 0x14, 0x3e50);
19546         MP_WritePhyUshort(sc, 0x14, 0xa83e);
19547         MP_WritePhyUshort(sc, 0x14, 0x33bc);
19548         MP_WritePhyUshort(sc, 0x14, 0xc622);
19549         MP_WritePhyUshort(sc, 0x14, 0xbcc6);
19550         MP_WritePhyUshort(sc, 0x14, 0xaaa4);
19551         MP_WritePhyUshort(sc, 0x14, 0x42ff);
19552         MP_WritePhyUshort(sc, 0x14, 0xc408);
19553         MP_WritePhyUshort(sc, 0x14, 0x00c4);
19554         MP_WritePhyUshort(sc, 0x14, 0x16a8);
19555         MP_WritePhyUshort(sc, 0x14, 0xbcc0);
19556         MP_WritePhyUshort(sc, 0x13, 0xb818);
19557         MP_WritePhyUshort(sc, 0x14, 0x02f3);
19558         MP_WritePhyUshort(sc, 0x13, 0xb81a);
19559         MP_WritePhyUshort(sc, 0x14, 0x17d1);
19560         MP_WritePhyUshort(sc, 0x13, 0xb81c);
19561         MP_WritePhyUshort(sc, 0x14, 0x185a);
19562         MP_WritePhyUshort(sc, 0x13, 0xb81e);
19563         MP_WritePhyUshort(sc, 0x14, 0x3c66);
19564         MP_WritePhyUshort(sc, 0x13, 0xb820);
19565         MP_WritePhyUshort(sc, 0x14, 0x021f);
19566         MP_WritePhyUshort(sc, 0x13, 0xc416);
19567         MP_WritePhyUshort(sc, 0x14, 0x0500);
19568         MP_WritePhyUshort(sc, 0x13, 0xb82e);
19569         MP_WritePhyUshort(sc, 0x14, 0xfffc);
19570 
19571         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19572         MP_WritePhyUshort(sc, 0x13, 0x0000);
19573         MP_WritePhyUshort(sc, 0x14, 0x0000);
19574         MP_WritePhyUshort(sc, 0x1f, 0x0B82);
19575         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
19576         PhyRegValue &= ~(BIT_9);
19577         MP_WritePhyUshort(sc, 0x10, PhyRegValue);
19578         MP_WritePhyUshort(sc, 0x1f, 0x0A43);
19579         MP_WritePhyUshort(sc, 0x13, 0x8146);
19580         MP_WritePhyUshort(sc, 0x14, 0x0000);
19581 
19582         MP_WritePhyUshort(sc, 0x1f, 0x0B82);
19583         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
19584         PhyRegValue &= ~(BIT_4);
19585         MP_WritePhyUshort(sc, 0x10, PhyRegValue);
19586         if (sc->RequiredSecLanDonglePatch) {
19587                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19588                 PhyRegValue = MP_ReadPhyUshort(sc, 0x11);
19589                 PhyRegValue &= ~(BIT_6);
19590                 MP_WritePhyUshort(sc, 0x11, PhyRegValue);
19591         }
19592 }
19593 
19594 static void re_set_phy_mcu_8168gu_2(struct re_softc *sc)
19595 {
19596         u_int16_t PhyRegValue;
19597         u_int32_t WaitCnt;
19598 
19599         MP_WritePhyUshort(sc, 0x1f, 0x0B82);
19600         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
19601         PhyRegValue |= BIT_4;
19602         MP_WritePhyUshort(sc, 0x10, PhyRegValue);
19603 
19604         MP_WritePhyUshort(sc, 0x1f, 0x0B80);
19605         WaitCnt = 0;
19606         do {
19607                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
19608                 PhyRegValue &= 0x0040;
19609                 DELAY(50);
19610                 DELAY(50);
19611                 WaitCnt++;
19612         } while(PhyRegValue != 0x0040 && WaitCnt <1000);
19613 
19614         MP_WritePhyUshort(sc, 0x1f, 0x0A43);
19615         MP_WritePhyUshort(sc, 0x13, 0x8146);
19616         MP_WritePhyUshort(sc, 0x14, 0x0300);
19617         MP_WritePhyUshort(sc, 0x13, 0xB82E);
19618         MP_WritePhyUshort(sc, 0x14, 0x0001);
19619 
19620         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19621         MP_WritePhyUshort(sc, 0x13, 0xb820);
19622         MP_WritePhyUshort(sc, 0x14, 0x0290);
19623         MP_WritePhyUshort(sc, 0x13, 0xa012);
19624         MP_WritePhyUshort(sc, 0x14, 0x0000);
19625         MP_WritePhyUshort(sc, 0x13, 0xa014);
19626         MP_WritePhyUshort(sc, 0x14, 0x2c04);
19627         MP_WritePhyUshort(sc, 0x14, 0x2c07);
19628         MP_WritePhyUshort(sc, 0x14, 0x2c07);
19629         MP_WritePhyUshort(sc, 0x14, 0x2c07);
19630         MP_WritePhyUshort(sc, 0x14, 0xa304);
19631         MP_WritePhyUshort(sc, 0x14, 0xa301);
19632         MP_WritePhyUshort(sc, 0x14, 0x207e);
19633         MP_WritePhyUshort(sc, 0x13, 0xa01a);
19634         MP_WritePhyUshort(sc, 0x14, 0x0000);
19635         MP_WritePhyUshort(sc, 0x13, 0xa006);
19636         MP_WritePhyUshort(sc, 0x14, 0x0fff);
19637         MP_WritePhyUshort(sc, 0x13, 0xa004);
19638         MP_WritePhyUshort(sc, 0x14, 0x0fff);
19639         MP_WritePhyUshort(sc, 0x13, 0xa002);
19640         MP_WritePhyUshort(sc, 0x14, 0x0fff);
19641         MP_WritePhyUshort(sc, 0x13, 0xa000);
19642         MP_WritePhyUshort(sc, 0x14, 0x107c);
19643         MP_WritePhyUshort(sc, 0x13, 0xb820);
19644         MP_WritePhyUshort(sc, 0x14, 0x0210);
19645 
19646         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19647         MP_WritePhyUshort(sc, 0x13, 0x0000);
19648         MP_WritePhyUshort(sc, 0x14, 0x0000);
19649         MP_WritePhyUshort(sc, 0x1f, 0x0B82);
19650         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
19651         PhyRegValue &= ~(BIT_0);
19652         MP_WritePhyUshort(sc, 0x17, PhyRegValue);
19653         MP_WritePhyUshort(sc, 0x1f, 0x0A43);
19654         MP_WritePhyUshort(sc, 0x13, 0x8146);
19655         MP_WritePhyUshort(sc, 0x14, 0x0000);
19656 
19657         MP_WritePhyUshort(sc, 0x1f, 0x0B82);
19658         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
19659         PhyRegValue &= ~(BIT_4);
19660         MP_WritePhyUshort(sc, 0x10, PhyRegValue);
19661         if (sc->RequiredSecLanDonglePatch) {
19662                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19663                 PhyRegValue = MP_ReadPhyUshort(sc, 0x11);
19664                 PhyRegValue &= ~(BIT_6);
19665                 MP_WritePhyUshort(sc, 0x11, PhyRegValue);
19666         }
19667 }
19668 
19669 static void re_set_phy_mcu_8411b_1(struct re_softc *sc)
19670 {
19671         u_int16_t PhyRegValue;
19672         u_int32_t WaitCnt;
19673 
19674         MP_WritePhyUshort(sc, 0x1f, 0x0B82);
19675         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
19676         PhyRegValue |= BIT_4;
19677         MP_WritePhyUshort(sc, 0x10, PhyRegValue);
19678 
19679         MP_WritePhyUshort(sc, 0x1f, 0x0B80);
19680         WaitCnt = 0;
19681         do {
19682                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
19683                 PhyRegValue &= 0x0040;
19684                 DELAY(50);
19685                 DELAY(50);
19686                 WaitCnt++;
19687         } while(PhyRegValue != 0x0040 && WaitCnt <1000);
19688 
19689         MP_WritePhyUshort(sc, 0x1f, 0x0A43);
19690         MP_WritePhyUshort(sc, 0x13, 0x8146);
19691         MP_WritePhyUshort(sc, 0x14, 0x0100);
19692         MP_WritePhyUshort(sc, 0x13, 0xB82E);
19693         MP_WritePhyUshort(sc, 0x14, 0x0001);
19694 
19695         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19696         MP_WritePhyUshort(sc, 0x13, 0xb820);
19697         MP_WritePhyUshort(sc, 0x14, 0x0290);
19698         MP_WritePhyUshort(sc, 0x13, 0xa012);
19699         MP_WritePhyUshort(sc, 0x14, 0x0000);
19700         MP_WritePhyUshort(sc, 0x13, 0xa014);
19701         MP_WritePhyUshort(sc, 0x14, 0x2c04);
19702         MP_WritePhyUshort(sc, 0x14, 0x2c07);
19703         MP_WritePhyUshort(sc, 0x14, 0x2c07);
19704         MP_WritePhyUshort(sc, 0x14, 0x2c07);
19705         MP_WritePhyUshort(sc, 0x14, 0xa304);
19706         MP_WritePhyUshort(sc, 0x14, 0xa301);
19707         MP_WritePhyUshort(sc, 0x14, 0x207e);
19708         MP_WritePhyUshort(sc, 0x13, 0xa01a);
19709         MP_WritePhyUshort(sc, 0x14, 0x0000);
19710         MP_WritePhyUshort(sc, 0x13, 0xa006);
19711         MP_WritePhyUshort(sc, 0x14, 0x0fff);
19712         MP_WritePhyUshort(sc, 0x13, 0xa004);
19713         MP_WritePhyUshort(sc, 0x14, 0x0fff);
19714         MP_WritePhyUshort(sc, 0x13, 0xa002);
19715         MP_WritePhyUshort(sc, 0x14, 0x0fff);
19716         MP_WritePhyUshort(sc, 0x13, 0xa000);
19717         MP_WritePhyUshort(sc, 0x14, 0x107c);
19718         MP_WritePhyUshort(sc, 0x13, 0xb820);
19719         MP_WritePhyUshort(sc, 0x14, 0x0210);
19720 
19721         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19722         MP_WritePhyUshort(sc, 0x13, 0x0000);
19723         MP_WritePhyUshort(sc, 0x14, 0x0000);
19724         MP_WritePhyUshort(sc, 0x1f, 0x0B82);
19725         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
19726         PhyRegValue &= ~(BIT_0);
19727         MP_WritePhyUshort(sc, 0x17, PhyRegValue);
19728         MP_WritePhyUshort(sc, 0x1f, 0x0A43);
19729         MP_WritePhyUshort(sc, 0x13, 0x8146);
19730         MP_WritePhyUshort(sc, 0x14, 0x0000);
19731 
19732         MP_WritePhyUshort(sc, 0x1f, 0x0B82);
19733         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
19734         PhyRegValue &= ~(BIT_4);
19735         MP_WritePhyUshort(sc, 0x10, PhyRegValue);
19736         if (sc->RequiredSecLanDonglePatch) {
19737                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19738                 PhyRegValue = MP_ReadPhyUshort(sc, 0x11);
19739                 PhyRegValue &= ~(BIT_6);
19740                 MP_WritePhyUshort(sc, 0x11, PhyRegValue);
19741         }
19742 }
19743 
19744 static void re_set_phy_mcu_8168h_1(struct re_softc *sc)
19745 {
19746         u_int16_t PhyRegValue;
19747         u_int32_t WaitCnt;
19748 
19749         MP_WritePhyUshort(sc, 0x1f, 0x0B82);
19750         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
19751         PhyRegValue |= BIT_4;
19752         MP_WritePhyUshort(sc, 0x10, PhyRegValue);
19753 
19754         MP_WritePhyUshort(sc, 0x1f, 0x0B80);
19755         WaitCnt = 0;
19756         do {
19757                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
19758                 PhyRegValue &= 0x0040;
19759                 DELAY(50);
19760                 DELAY(50);
19761                 WaitCnt++;
19762         } while(PhyRegValue != 0x0040 && WaitCnt <1000);
19763 
19764         MP_WritePhyUshort(sc, 0x1f, 0x0A43);
19765         MP_WritePhyUshort(sc, 0x13, 0x8028);
19766         MP_WritePhyUshort(sc, 0x14, 0x6200);
19767         MP_WritePhyUshort(sc, 0x13, 0xB82E);
19768         MP_WritePhyUshort(sc, 0x14, 0x0001);
19769 
19770         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19771         MP_WritePhyUshort(sc, 0x13, 0xB820);
19772         MP_WritePhyUshort(sc, 0x14, 0x0290);
19773         MP_WritePhyUshort(sc, 0x13, 0xA012);
19774         MP_WritePhyUshort(sc, 0x14, 0x0000);
19775         MP_WritePhyUshort(sc, 0x13, 0xA014);
19776         MP_WritePhyUshort(sc, 0x14, 0x2c04);
19777         MP_WritePhyUshort(sc, 0x14, 0x2c10);
19778         MP_WritePhyUshort(sc, 0x14, 0x2c10);
19779         MP_WritePhyUshort(sc, 0x14, 0x2c10);
19780         MP_WritePhyUshort(sc, 0x14, 0xa210);
19781         MP_WritePhyUshort(sc, 0x14, 0xa101);
19782         MP_WritePhyUshort(sc, 0x14, 0xce10);
19783         MP_WritePhyUshort(sc, 0x14, 0xe070);
19784         MP_WritePhyUshort(sc, 0x14, 0x0f40);
19785         MP_WritePhyUshort(sc, 0x14, 0xaf01);
19786         MP_WritePhyUshort(sc, 0x14, 0x8f01);
19787         MP_WritePhyUshort(sc, 0x14, 0x183e);
19788         MP_WritePhyUshort(sc, 0x14, 0x8e10);
19789         MP_WritePhyUshort(sc, 0x14, 0x8101);
19790         MP_WritePhyUshort(sc, 0x14, 0x8210);
19791         MP_WritePhyUshort(sc, 0x14, 0x28da);
19792         MP_WritePhyUshort(sc, 0x13, 0xA01A);
19793         MP_WritePhyUshort(sc, 0x14, 0x0000);
19794         MP_WritePhyUshort(sc, 0x13, 0xA006);
19795         MP_WritePhyUshort(sc, 0x14, 0x0017);
19796         MP_WritePhyUshort(sc, 0x13, 0xA004);
19797         MP_WritePhyUshort(sc, 0x14, 0x0015);
19798         MP_WritePhyUshort(sc, 0x13, 0xA002);
19799         MP_WritePhyUshort(sc, 0x14, 0x0013);
19800         MP_WritePhyUshort(sc, 0x13, 0xA000);
19801         MP_WritePhyUshort(sc, 0x14, 0x18d1);
19802         MP_WritePhyUshort(sc, 0x13, 0xB820);
19803         MP_WritePhyUshort(sc, 0x14, 0x0210);
19804 
19805         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19806         MP_WritePhyUshort(sc, 0x13, 0x0000);
19807         MP_WritePhyUshort(sc, 0x14, 0x0000);
19808         MP_WritePhyUshort(sc, 0x1f, 0x0B82);
19809         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
19810         PhyRegValue &= ~(BIT_0);
19811         MP_WritePhyUshort(sc, 0x17, PhyRegValue);
19812         MP_WritePhyUshort(sc, 0x1f, 0x0A43);
19813         MP_WritePhyUshort(sc, 0x13, 0x8028);
19814         MP_WritePhyUshort(sc, 0x14, 0x0000);
19815 
19816         MP_WritePhyUshort(sc, 0x1f, 0x0B82);
19817         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
19818         PhyRegValue &= ~(BIT_4);
19819         MP_WritePhyUshort(sc, 0x10, PhyRegValue);
19820         if (sc->RequiredSecLanDonglePatch) {
19821                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19822                 PhyRegValue = MP_ReadPhyUshort(sc, 0x11);
19823                 PhyRegValue &= ~(BIT_6);
19824                 MP_WritePhyUshort(sc, 0x11, PhyRegValue);
19825         }
19826 }
19827 
19828 static void re_set_phy_mcu_8168h_2(struct re_softc *sc)
19829 {
19830         u_int16_t PhyRegValue;
19831         u_int32_t WaitCnt;
19832 
19833         MP_WritePhyUshort(sc, 0x1f, 0x0B82);
19834         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
19835         PhyRegValue |= BIT_4;
19836         MP_WritePhyUshort(sc, 0x10, PhyRegValue);
19837 
19838         MP_WritePhyUshort(sc, 0x1f, 0x0B80);
19839         WaitCnt = 0;
19840         do {
19841                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
19842                 PhyRegValue &= 0x0040;
19843                 DELAY(50);
19844                 DELAY(50);
19845                 WaitCnt++;
19846         } while(PhyRegValue != 0x0040 && WaitCnt <1000);
19847 
19848         MP_WritePhyUshort(sc, 0x1f, 0x0A43);
19849         MP_WritePhyUshort(sc, 0x13, 0x8028);
19850         MP_WritePhyUshort(sc, 0x14, 0x6201);
19851         MP_WritePhyUshort(sc, 0x13, 0xB82E);
19852         MP_WritePhyUshort(sc, 0x14, 0x0001);
19853 
19854         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19855         MP_WritePhyUshort(sc, 0x13, 0xB820);
19856         MP_WritePhyUshort(sc, 0x14, 0x0290);
19857         MP_WritePhyUshort(sc, 0x13, 0xA012);
19858         MP_WritePhyUshort(sc, 0x14, 0x0000);
19859         MP_WritePhyUshort(sc, 0x13, 0xA014);
19860         MP_WritePhyUshort(sc, 0x14, 0x2c04);
19861         MP_WritePhyUshort(sc, 0x14, 0x2c09);
19862         MP_WritePhyUshort(sc, 0x14, 0x2c09);
19863         MP_WritePhyUshort(sc, 0x14, 0x2c09);
19864         MP_WritePhyUshort(sc, 0x14, 0xad01);
19865         MP_WritePhyUshort(sc, 0x14, 0xad01);
19866         MP_WritePhyUshort(sc, 0x14, 0xad01);
19867         MP_WritePhyUshort(sc, 0x14, 0xad01);
19868         MP_WritePhyUshort(sc, 0x14, 0x236c);
19869         MP_WritePhyUshort(sc, 0x13, 0xA01A);
19870         MP_WritePhyUshort(sc, 0x14, 0x0000);
19871         MP_WritePhyUshort(sc, 0x13, 0xA006);
19872         MP_WritePhyUshort(sc, 0x14, 0x0fff);
19873         MP_WritePhyUshort(sc, 0x13, 0xA004);
19874         MP_WritePhyUshort(sc, 0x14, 0x0fff);
19875         MP_WritePhyUshort(sc, 0x13, 0xA002);
19876         MP_WritePhyUshort(sc, 0x14, 0x0fff);
19877         MP_WritePhyUshort(sc, 0x13, 0xA000);
19878         MP_WritePhyUshort(sc, 0x14, 0x136b);
19879         MP_WritePhyUshort(sc, 0x13, 0xB820);
19880         MP_WritePhyUshort(sc, 0x14, 0x0210);
19881 
19882         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19883         MP_WritePhyUshort(sc, 0x13, 0x0000);
19884         MP_WritePhyUshort(sc, 0x14, 0x0000);
19885         MP_WritePhyUshort(sc, 0x1f, 0x0B82);
19886         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
19887         PhyRegValue &= ~(BIT_0);
19888         MP_WritePhyUshort(sc, 0x17, PhyRegValue);
19889         MP_WritePhyUshort(sc, 0x1f, 0x0A43);
19890         MP_WritePhyUshort(sc, 0x13, 0x8028);
19891         MP_WritePhyUshort(sc, 0x14, 0x0000);
19892 
19893         MP_WritePhyUshort(sc, 0x1f, 0x0B82);
19894         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
19895         PhyRegValue &= ~(BIT_4);
19896         MP_WritePhyUshort(sc, 0x10, PhyRegValue);
19897         if (sc->RequiredSecLanDonglePatch) {
19898                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19899                 PhyRegValue = MP_ReadPhyUshort(sc, 0x11);
19900                 PhyRegValue &= ~(BIT_6);
19901                 MP_WritePhyUshort(sc, 0x11, PhyRegValue);
19902         }
19903 }
19904 
19905 static void re_set_phy_mcu_8168ep_1(struct re_softc *sc)
19906 {
19907         u_int16_t PhyRegValue;
19908         u_int32_t WaitCnt;
19909 
19910         MP_WritePhyUshort(sc, 0x1f, 0x0B82);
19911         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
19912         PhyRegValue |= BIT_4;
19913         MP_WritePhyUshort(sc, 0x10, PhyRegValue);
19914 
19915         MP_WritePhyUshort(sc, 0x1f, 0x0B80);
19916         WaitCnt = 0;
19917         do {
19918                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
19919                 PhyRegValue &= 0x0040;
19920                 DELAY(50);
19921                 DELAY(50);
19922                 WaitCnt++;
19923         } while(PhyRegValue != 0x0040 && WaitCnt <1000);
19924 
19925         MP_WritePhyUshort(sc, 0x1f, 0x0A43);
19926         MP_WritePhyUshort(sc, 0x13, 0x8146);
19927         MP_WritePhyUshort(sc, 0x14, 0x2700);
19928         MP_WritePhyUshort(sc, 0x13, 0xB82E);
19929         MP_WritePhyUshort(sc, 0x14, 0x0001);
19930 
19931         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19932         MP_WritePhyUshort(sc, 0x13, 0xb820);
19933         MP_WritePhyUshort(sc, 0x14, 0x0090);
19934         MP_WritePhyUshort(sc, 0x13, 0xa012);
19935         MP_WritePhyUshort(sc, 0x14, 0x0000);
19936         MP_WritePhyUshort(sc, 0x13, 0xa014);
19937         MP_WritePhyUshort(sc, 0x14, 0x2c04);
19938         MP_WritePhyUshort(sc, 0x14, 0x2c1b);
19939         MP_WritePhyUshort(sc, 0x14, 0x2c65);
19940         MP_WritePhyUshort(sc, 0x14, 0x2d14);
19941         MP_WritePhyUshort(sc, 0x14, 0xd71e);
19942         MP_WritePhyUshort(sc, 0x14, 0x4092);
19943         MP_WritePhyUshort(sc, 0x14, 0xba04);
19944         MP_WritePhyUshort(sc, 0x14, 0x3084);
19945         MP_WritePhyUshort(sc, 0x14, 0x1d04);
19946         MP_WritePhyUshort(sc, 0x14, 0x1cdd);
19947         MP_WritePhyUshort(sc, 0x14, 0x1ce8);
19948         MP_WritePhyUshort(sc, 0x14, 0xaeff);
19949         MP_WritePhyUshort(sc, 0x14, 0xaf02);
19950         MP_WritePhyUshort(sc, 0x14, 0x8f02);
19951         MP_WritePhyUshort(sc, 0x14, 0x8eff);
19952         MP_WritePhyUshort(sc, 0x14, 0xce01);
19953         MP_WritePhyUshort(sc, 0x14, 0xe070);
19954         MP_WritePhyUshort(sc, 0x14, 0x0f00);
19955         MP_WritePhyUshort(sc, 0x14, 0xaf01);
19956         MP_WritePhyUshort(sc, 0x14, 0x8f01);
19957         MP_WritePhyUshort(sc, 0x14, 0xd712);
19958         MP_WritePhyUshort(sc, 0x14, 0x5fe8);
19959         MP_WritePhyUshort(sc, 0x14, 0xaf02);
19960         MP_WritePhyUshort(sc, 0x14, 0x8f02);
19961         MP_WritePhyUshort(sc, 0x14, 0x8e01);
19962         MP_WritePhyUshort(sc, 0x14, 0x1cf2);
19963         MP_WritePhyUshort(sc, 0x14, 0x2825);
19964         MP_WritePhyUshort(sc, 0x14, 0xd05a);
19965         MP_WritePhyUshort(sc, 0x14, 0xd19a);
19966         MP_WritePhyUshort(sc, 0x14, 0xd709);
19967         MP_WritePhyUshort(sc, 0x14, 0x608f);
19968         MP_WritePhyUshort(sc, 0x14, 0xd06b);
19969         MP_WritePhyUshort(sc, 0x14, 0xd18a);
19970         MP_WritePhyUshort(sc, 0x14, 0x2c25);
19971         MP_WritePhyUshort(sc, 0x14, 0xd0be);
19972         MP_WritePhyUshort(sc, 0x14, 0xd188);
19973         MP_WritePhyUshort(sc, 0x14, 0x2c25);
19974         MP_WritePhyUshort(sc, 0x14, 0xd708);
19975         MP_WritePhyUshort(sc, 0x14, 0x4072);
19976         MP_WritePhyUshort(sc, 0x14, 0xc104);
19977         MP_WritePhyUshort(sc, 0x14, 0x2c37);
19978         MP_WritePhyUshort(sc, 0x14, 0x4076);
19979         MP_WritePhyUshort(sc, 0x14, 0xc110);
19980         MP_WritePhyUshort(sc, 0x14, 0x2c37);
19981         MP_WritePhyUshort(sc, 0x14, 0x4071);
19982         MP_WritePhyUshort(sc, 0x14, 0xc102);
19983         MP_WritePhyUshort(sc, 0x14, 0x2c37);
19984         MP_WritePhyUshort(sc, 0x14, 0x4070);
19985         MP_WritePhyUshort(sc, 0x14, 0xc101);
19986         MP_WritePhyUshort(sc, 0x14, 0x2c37);
19987         MP_WritePhyUshort(sc, 0x14, 0x1786);
19988         MP_WritePhyUshort(sc, 0x14, 0xd709);
19989         MP_WritePhyUshort(sc, 0x14, 0x3390);
19990         MP_WritePhyUshort(sc, 0x14, 0x5c32);
19991         MP_WritePhyUshort(sc, 0x14, 0x2c47);
19992         MP_WritePhyUshort(sc, 0x14, 0x1786);
19993         MP_WritePhyUshort(sc, 0x14, 0xd708);
19994         MP_WritePhyUshort(sc, 0x14, 0x6193);
19995         MP_WritePhyUshort(sc, 0x14, 0xd709);
19996         MP_WritePhyUshort(sc, 0x14, 0x5f9d);
19997         MP_WritePhyUshort(sc, 0x14, 0x408b);
19998         MP_WritePhyUshort(sc, 0x14, 0xd71e);
19999         MP_WritePhyUshort(sc, 0x14, 0x6042);
20000         MP_WritePhyUshort(sc, 0x14, 0xb401);
20001         MP_WritePhyUshort(sc, 0x14, 0x1786);
20002         MP_WritePhyUshort(sc, 0x14, 0xd708);
20003         MP_WritePhyUshort(sc, 0x14, 0x6073);
20004         MP_WritePhyUshort(sc, 0x14, 0x5fbc);
20005         MP_WritePhyUshort(sc, 0x14, 0x2c46);
20006         MP_WritePhyUshort(sc, 0x14, 0x26fe);
20007         MP_WritePhyUshort(sc, 0x14, 0xb280);
20008         MP_WritePhyUshort(sc, 0x14, 0xa841);
20009         MP_WritePhyUshort(sc, 0x14, 0x94e0);
20010         MP_WritePhyUshort(sc, 0x14, 0x8710);
20011         MP_WritePhyUshort(sc, 0x14, 0xd709);
20012         MP_WritePhyUshort(sc, 0x14, 0x42ec);
20013         MP_WritePhyUshort(sc, 0x14, 0x606d);
20014         MP_WritePhyUshort(sc, 0x14, 0xd207);
20015         MP_WritePhyUshort(sc, 0x14, 0x2c50);
20016         MP_WritePhyUshort(sc, 0x14, 0xd203);
20017         MP_WritePhyUshort(sc, 0x14, 0x33ff);
20018         MP_WritePhyUshort(sc, 0x14, 0x5647);
20019         MP_WritePhyUshort(sc, 0x14, 0x3275);
20020         MP_WritePhyUshort(sc, 0x14, 0x7c57);
20021         MP_WritePhyUshort(sc, 0x14, 0xb240);
20022         MP_WritePhyUshort(sc, 0x14, 0xb402);
20023         MP_WritePhyUshort(sc, 0x14, 0x2647);
20024         MP_WritePhyUshort(sc, 0x14, 0x6096);
20025         MP_WritePhyUshort(sc, 0x14, 0xb240);
20026         MP_WritePhyUshort(sc, 0x14, 0xb406);
20027         MP_WritePhyUshort(sc, 0x14, 0x2647);
20028         MP_WritePhyUshort(sc, 0x14, 0x31d7);
20029         MP_WritePhyUshort(sc, 0x14, 0x7c60);
20030         MP_WritePhyUshort(sc, 0x14, 0xb240);
20031         MP_WritePhyUshort(sc, 0x14, 0xb40e);
20032         MP_WritePhyUshort(sc, 0x14, 0x2647);
20033         MP_WritePhyUshort(sc, 0x14, 0xb410);
20034         MP_WritePhyUshort(sc, 0x14, 0x8802);
20035         MP_WritePhyUshort(sc, 0x14, 0xb240);
20036         MP_WritePhyUshort(sc, 0x14, 0x940e);
20037         MP_WritePhyUshort(sc, 0x14, 0x2647);
20038         MP_WritePhyUshort(sc, 0x14, 0xba04);
20039         MP_WritePhyUshort(sc, 0x14, 0x1cdd);
20040         MP_WritePhyUshort(sc, 0x14, 0xa902);
20041         MP_WritePhyUshort(sc, 0x14, 0xd711);
20042         MP_WritePhyUshort(sc, 0x14, 0x4045);
20043         MP_WritePhyUshort(sc, 0x14, 0xa980);
20044         MP_WritePhyUshort(sc, 0x14, 0x3003);
20045         MP_WritePhyUshort(sc, 0x14, 0x5a19);
20046         MP_WritePhyUshort(sc, 0x14, 0xa540);
20047         MP_WritePhyUshort(sc, 0x14, 0xa601);
20048         MP_WritePhyUshort(sc, 0x14, 0xd710);
20049         MP_WritePhyUshort(sc, 0x14, 0x4043);
20050         MP_WritePhyUshort(sc, 0x14, 0xa910);
20051         MP_WritePhyUshort(sc, 0x14, 0xd711);
20052         MP_WritePhyUshort(sc, 0x14, 0x60a0);
20053         MP_WritePhyUshort(sc, 0x14, 0xca33);
20054         MP_WritePhyUshort(sc, 0x14, 0xcb33);
20055         MP_WritePhyUshort(sc, 0x14, 0xa941);
20056         MP_WritePhyUshort(sc, 0x14, 0x2c7b);
20057         MP_WritePhyUshort(sc, 0x14, 0xcaff);
20058         MP_WritePhyUshort(sc, 0x14, 0xcbff);
20059         MP_WritePhyUshort(sc, 0x14, 0xa921);
20060         MP_WritePhyUshort(sc, 0x14, 0xce02);
20061         MP_WritePhyUshort(sc, 0x14, 0xe070);
20062         MP_WritePhyUshort(sc, 0x14, 0x0f10);
20063         MP_WritePhyUshort(sc, 0x14, 0xaf01);
20064         MP_WritePhyUshort(sc, 0x14, 0x8f01);
20065         MP_WritePhyUshort(sc, 0x14, 0x1791);
20066         MP_WritePhyUshort(sc, 0x14, 0x8e02);
20067         MP_WritePhyUshort(sc, 0x14, 0xd710);
20068         MP_WritePhyUshort(sc, 0x14, 0x41a3);
20069         MP_WritePhyUshort(sc, 0x14, 0xa140);
20070         MP_WritePhyUshort(sc, 0x14, 0xa220);
20071         MP_WritePhyUshort(sc, 0x14, 0xce10);
20072         MP_WritePhyUshort(sc, 0x14, 0xe070);
20073         MP_WritePhyUshort(sc, 0x14, 0x0f40);
20074         MP_WritePhyUshort(sc, 0x14, 0xaf01);
20075         MP_WritePhyUshort(sc, 0x14, 0x8f01);
20076         MP_WritePhyUshort(sc, 0x14, 0x1791);
20077         MP_WritePhyUshort(sc, 0x14, 0x8e10);
20078         MP_WritePhyUshort(sc, 0x14, 0x8140);
20079         MP_WritePhyUshort(sc, 0x14, 0x8220);
20080         MP_WritePhyUshort(sc, 0x14, 0xa301);
20081         MP_WritePhyUshort(sc, 0x14, 0x17b2);
20082         MP_WritePhyUshort(sc, 0x14, 0xd710);
20083         MP_WritePhyUshort(sc, 0x14, 0x609c);
20084         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20085         MP_WritePhyUshort(sc, 0x14, 0x7fa4);
20086         MP_WritePhyUshort(sc, 0x14, 0x2cdb);
20087         MP_WritePhyUshort(sc, 0x14, 0x1cf0);
20088         MP_WritePhyUshort(sc, 0x14, 0xce04);
20089         MP_WritePhyUshort(sc, 0x14, 0xe070);
20090         MP_WritePhyUshort(sc, 0x14, 0x0f20);
20091         MP_WritePhyUshort(sc, 0x14, 0xaf01);
20092         MP_WritePhyUshort(sc, 0x14, 0x8f01);
20093         MP_WritePhyUshort(sc, 0x14, 0x1791);
20094         MP_WritePhyUshort(sc, 0x14, 0x8e04);
20095         MP_WritePhyUshort(sc, 0x14, 0x6044);
20096         MP_WritePhyUshort(sc, 0x14, 0x2cdb);
20097         MP_WritePhyUshort(sc, 0x14, 0xa520);
20098         MP_WritePhyUshort(sc, 0x14, 0xd710);
20099         MP_WritePhyUshort(sc, 0x14, 0x4043);
20100         MP_WritePhyUshort(sc, 0x14, 0x2cc8);
20101         MP_WritePhyUshort(sc, 0x14, 0xe00f);
20102         MP_WritePhyUshort(sc, 0x14, 0x0501);
20103         MP_WritePhyUshort(sc, 0x14, 0x1cf6);
20104         MP_WritePhyUshort(sc, 0x14, 0xb801);
20105         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20106         MP_WritePhyUshort(sc, 0x14, 0x4060);
20107         MP_WritePhyUshort(sc, 0x14, 0x7fc4);
20108         MP_WritePhyUshort(sc, 0x14, 0x2cdb);
20109         MP_WritePhyUshort(sc, 0x14, 0x1cfc);
20110         MP_WritePhyUshort(sc, 0x14, 0xe00f);
20111         MP_WritePhyUshort(sc, 0x14, 0x0502);
20112         MP_WritePhyUshort(sc, 0x14, 0x1cf6);
20113         MP_WritePhyUshort(sc, 0x14, 0xb802);
20114         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20115         MP_WritePhyUshort(sc, 0x14, 0x4061);
20116         MP_WritePhyUshort(sc, 0x14, 0x7fc4);
20117         MP_WritePhyUshort(sc, 0x14, 0x2cdb);
20118         MP_WritePhyUshort(sc, 0x14, 0x1cfc);
20119         MP_WritePhyUshort(sc, 0x14, 0xe00f);
20120         MP_WritePhyUshort(sc, 0x14, 0x0504);
20121         MP_WritePhyUshort(sc, 0x14, 0xd710);
20122         MP_WritePhyUshort(sc, 0x14, 0x6099);
20123         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20124         MP_WritePhyUshort(sc, 0x14, 0x7fa4);
20125         MP_WritePhyUshort(sc, 0x14, 0x2cdb);
20126         MP_WritePhyUshort(sc, 0x14, 0xc17f);
20127         MP_WritePhyUshort(sc, 0x14, 0xc200);
20128         MP_WritePhyUshort(sc, 0x14, 0xc43f);
20129         MP_WritePhyUshort(sc, 0x14, 0xcc03);
20130         MP_WritePhyUshort(sc, 0x14, 0xa701);
20131         MP_WritePhyUshort(sc, 0x14, 0xa510);
20132         MP_WritePhyUshort(sc, 0x14, 0xd710);
20133         MP_WritePhyUshort(sc, 0x14, 0x4018);
20134         MP_WritePhyUshort(sc, 0x14, 0x9910);
20135         MP_WritePhyUshort(sc, 0x14, 0x8510);
20136         MP_WritePhyUshort(sc, 0x14, 0x28a1);
20137         MP_WritePhyUshort(sc, 0x14, 0xe00f);
20138         MP_WritePhyUshort(sc, 0x14, 0x0504);
20139         MP_WritePhyUshort(sc, 0x14, 0xd710);
20140         MP_WritePhyUshort(sc, 0x14, 0x6099);
20141         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20142         MP_WritePhyUshort(sc, 0x14, 0x7fa4);
20143         MP_WritePhyUshort(sc, 0x14, 0x2cdb);
20144         MP_WritePhyUshort(sc, 0x14, 0xa608);
20145         MP_WritePhyUshort(sc, 0x14, 0xc17d);
20146         MP_WritePhyUshort(sc, 0x14, 0xc200);
20147         MP_WritePhyUshort(sc, 0x14, 0xc43f);
20148         MP_WritePhyUshort(sc, 0x14, 0xcc03);
20149         MP_WritePhyUshort(sc, 0x14, 0xa701);
20150         MP_WritePhyUshort(sc, 0x14, 0xa510);
20151         MP_WritePhyUshort(sc, 0x14, 0xd710);
20152         MP_WritePhyUshort(sc, 0x14, 0x4018);
20153         MP_WritePhyUshort(sc, 0x14, 0x9910);
20154         MP_WritePhyUshort(sc, 0x14, 0x8510);
20155         MP_WritePhyUshort(sc, 0x14, 0x298e);
20156         MP_WritePhyUshort(sc, 0x14, 0x17bd);
20157         MP_WritePhyUshort(sc, 0x14, 0x2815);
20158         MP_WritePhyUshort(sc, 0x14, 0xc000);
20159         MP_WritePhyUshort(sc, 0x14, 0xc100);
20160         MP_WritePhyUshort(sc, 0x14, 0xc200);
20161         MP_WritePhyUshort(sc, 0x14, 0xc300);
20162         MP_WritePhyUshort(sc, 0x14, 0xc400);
20163         MP_WritePhyUshort(sc, 0x14, 0xc500);
20164         MP_WritePhyUshort(sc, 0x14, 0xc600);
20165         MP_WritePhyUshort(sc, 0x14, 0xc7c1);
20166         MP_WritePhyUshort(sc, 0x14, 0xc800);
20167         MP_WritePhyUshort(sc, 0x14, 0xcc00);
20168         MP_WritePhyUshort(sc, 0x14, 0x0800);
20169         MP_WritePhyUshort(sc, 0x14, 0xca0f);
20170         MP_WritePhyUshort(sc, 0x14, 0xcbff);
20171         MP_WritePhyUshort(sc, 0x14, 0xa901);
20172         MP_WritePhyUshort(sc, 0x14, 0x8902);
20173         MP_WritePhyUshort(sc, 0x14, 0xc900);
20174         MP_WritePhyUshort(sc, 0x14, 0xca00);
20175         MP_WritePhyUshort(sc, 0x14, 0xcb00);
20176         MP_WritePhyUshort(sc, 0x14, 0x0800);
20177         MP_WritePhyUshort(sc, 0x14, 0xb804);
20178         MP_WritePhyUshort(sc, 0x14, 0x0800);
20179         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20180         MP_WritePhyUshort(sc, 0x14, 0x6044);
20181         MP_WritePhyUshort(sc, 0x14, 0x9804);
20182         MP_WritePhyUshort(sc, 0x14, 0x0800);
20183         MP_WritePhyUshort(sc, 0x14, 0xd710);
20184         MP_WritePhyUshort(sc, 0x14, 0x6099);
20185         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20186         MP_WritePhyUshort(sc, 0x14, 0x7fa4);
20187         MP_WritePhyUshort(sc, 0x14, 0x2cdb);
20188         MP_WritePhyUshort(sc, 0x14, 0x0800);
20189         MP_WritePhyUshort(sc, 0x14, 0xa510);
20190         MP_WritePhyUshort(sc, 0x14, 0xd710);
20191         MP_WritePhyUshort(sc, 0x14, 0x6098);
20192         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20193         MP_WritePhyUshort(sc, 0x14, 0x7fa4);
20194         MP_WritePhyUshort(sc, 0x14, 0x2cdb);
20195         MP_WritePhyUshort(sc, 0x14, 0x8510);
20196         MP_WritePhyUshort(sc, 0x14, 0x0800);
20197         MP_WritePhyUshort(sc, 0x14, 0xd711);
20198         MP_WritePhyUshort(sc, 0x14, 0x3003);
20199         MP_WritePhyUshort(sc, 0x14, 0x1d08);
20200         MP_WritePhyUshort(sc, 0x14, 0x2d12);
20201         MP_WritePhyUshort(sc, 0x14, 0xd710);
20202         MP_WritePhyUshort(sc, 0x14, 0x60be);
20203         MP_WritePhyUshort(sc, 0x14, 0xe060);
20204         MP_WritePhyUshort(sc, 0x14, 0x0920);
20205         MP_WritePhyUshort(sc, 0x14, 0x1cdd);
20206         MP_WritePhyUshort(sc, 0x14, 0x2c90);
20207         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20208         MP_WritePhyUshort(sc, 0x14, 0x3063);
20209         MP_WritePhyUshort(sc, 0x14, 0x19b0);
20210         MP_WritePhyUshort(sc, 0x14, 0x28d5);
20211         MP_WritePhyUshort(sc, 0x14, 0x1cdd);
20212         MP_WritePhyUshort(sc, 0x14, 0x2a25);
20213         MP_WritePhyUshort(sc, 0x14, 0xa802);
20214         MP_WritePhyUshort(sc, 0x14, 0xa303);
20215         MP_WritePhyUshort(sc, 0x14, 0x843f);
20216         MP_WritePhyUshort(sc, 0x14, 0x81ff);
20217         MP_WritePhyUshort(sc, 0x14, 0x8208);
20218         MP_WritePhyUshort(sc, 0x14, 0xa201);
20219         MP_WritePhyUshort(sc, 0x14, 0xc001);
20220         MP_WritePhyUshort(sc, 0x14, 0xd710);
20221         MP_WritePhyUshort(sc, 0x14, 0x30a0);
20222         MP_WritePhyUshort(sc, 0x14, 0x0d23);
20223         MP_WritePhyUshort(sc, 0x14, 0x30a0);
20224         MP_WritePhyUshort(sc, 0x14, 0x3d1a);
20225         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20226         MP_WritePhyUshort(sc, 0x14, 0x7f4c);
20227         MP_WritePhyUshort(sc, 0x14, 0x2b1e);
20228         MP_WritePhyUshort(sc, 0x14, 0xe003);
20229         MP_WritePhyUshort(sc, 0x14, 0x0202);
20230         MP_WritePhyUshort(sc, 0x14, 0xd710);
20231         MP_WritePhyUshort(sc, 0x14, 0x6090);
20232         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20233         MP_WritePhyUshort(sc, 0x14, 0x7fac);
20234         MP_WritePhyUshort(sc, 0x14, 0x2b1e);
20235         MP_WritePhyUshort(sc, 0x14, 0xa20c);
20236         MP_WritePhyUshort(sc, 0x14, 0xd710);
20237         MP_WritePhyUshort(sc, 0x14, 0x6091);
20238         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20239         MP_WritePhyUshort(sc, 0x14, 0x7fac);
20240         MP_WritePhyUshort(sc, 0x14, 0x2b1e);
20241         MP_WritePhyUshort(sc, 0x14, 0x820e);
20242         MP_WritePhyUshort(sc, 0x14, 0xa3e0);
20243         MP_WritePhyUshort(sc, 0x14, 0xa520);
20244         MP_WritePhyUshort(sc, 0x14, 0xd710);
20245         MP_WritePhyUshort(sc, 0x14, 0x609d);
20246         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20247         MP_WritePhyUshort(sc, 0x14, 0x7fac);
20248         MP_WritePhyUshort(sc, 0x14, 0x2b1e);
20249         MP_WritePhyUshort(sc, 0x14, 0x8520);
20250         MP_WritePhyUshort(sc, 0x14, 0x6703);
20251         MP_WritePhyUshort(sc, 0x14, 0x2d3b);
20252         MP_WritePhyUshort(sc, 0x14, 0xa13e);
20253         MP_WritePhyUshort(sc, 0x14, 0xc001);
20254         MP_WritePhyUshort(sc, 0x14, 0xd710);
20255         MP_WritePhyUshort(sc, 0x14, 0x4000);
20256         MP_WritePhyUshort(sc, 0x14, 0x6046);
20257         MP_WritePhyUshort(sc, 0x14, 0x2d14);
20258         MP_WritePhyUshort(sc, 0x14, 0xa43f);
20259         MP_WritePhyUshort(sc, 0x14, 0xa101);
20260         MP_WritePhyUshort(sc, 0x14, 0xc020);
20261         MP_WritePhyUshort(sc, 0x14, 0xd710);
20262         MP_WritePhyUshort(sc, 0x14, 0x3121);
20263         MP_WritePhyUshort(sc, 0x14, 0x0d4c);
20264         MP_WritePhyUshort(sc, 0x14, 0x30c0);
20265         MP_WritePhyUshort(sc, 0x14, 0x3d14);
20266         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20267         MP_WritePhyUshort(sc, 0x14, 0x7f4c);
20268         MP_WritePhyUshort(sc, 0x14, 0x2b1e);
20269         MP_WritePhyUshort(sc, 0x14, 0xa540);
20270         MP_WritePhyUshort(sc, 0x14, 0xc001);
20271         MP_WritePhyUshort(sc, 0x14, 0xd710);
20272         MP_WritePhyUshort(sc, 0x14, 0x4001);
20273         MP_WritePhyUshort(sc, 0x14, 0xe00f);
20274         MP_WritePhyUshort(sc, 0x14, 0x0501);
20275         MP_WritePhyUshort(sc, 0x14, 0x1db3);
20276         MP_WritePhyUshort(sc, 0x14, 0xc1c4);
20277         MP_WritePhyUshort(sc, 0x14, 0xa268);
20278         MP_WritePhyUshort(sc, 0x14, 0xa303);
20279         MP_WritePhyUshort(sc, 0x14, 0x8420);
20280         MP_WritePhyUshort(sc, 0x14, 0xe00f);
20281         MP_WritePhyUshort(sc, 0x14, 0x0502);
20282         MP_WritePhyUshort(sc, 0x14, 0x1db3);
20283         MP_WritePhyUshort(sc, 0x14, 0xc002);
20284         MP_WritePhyUshort(sc, 0x14, 0xd710);
20285         MP_WritePhyUshort(sc, 0x14, 0x4000);
20286         MP_WritePhyUshort(sc, 0x14, 0x8208);
20287         MP_WritePhyUshort(sc, 0x14, 0x8410);
20288         MP_WritePhyUshort(sc, 0x14, 0xa121);
20289         MP_WritePhyUshort(sc, 0x14, 0xc002);
20290         MP_WritePhyUshort(sc, 0x14, 0xd710);
20291         MP_WritePhyUshort(sc, 0x14, 0x4000);
20292         MP_WritePhyUshort(sc, 0x14, 0x8120);
20293         MP_WritePhyUshort(sc, 0x14, 0x8180);
20294         MP_WritePhyUshort(sc, 0x14, 0x1d9e);
20295         MP_WritePhyUshort(sc, 0x14, 0xa180);
20296         MP_WritePhyUshort(sc, 0x14, 0xa13a);
20297         MP_WritePhyUshort(sc, 0x14, 0x8240);
20298         MP_WritePhyUshort(sc, 0x14, 0xa430);
20299         MP_WritePhyUshort(sc, 0x14, 0xc010);
20300         MP_WritePhyUshort(sc, 0x14, 0xd710);
20301         MP_WritePhyUshort(sc, 0x14, 0x30e1);
20302         MP_WritePhyUshort(sc, 0x14, 0x0b24);
20303         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20304         MP_WritePhyUshort(sc, 0x14, 0x7f8c);
20305         MP_WritePhyUshort(sc, 0x14, 0x2b1e);
20306         MP_WritePhyUshort(sc, 0x14, 0xa480);
20307         MP_WritePhyUshort(sc, 0x14, 0xa230);
20308         MP_WritePhyUshort(sc, 0x14, 0xa303);
20309         MP_WritePhyUshort(sc, 0x14, 0xc001);
20310         MP_WritePhyUshort(sc, 0x14, 0xd70c);
20311         MP_WritePhyUshort(sc, 0x14, 0x4124);
20312         MP_WritePhyUshort(sc, 0x14, 0xd710);
20313         MP_WritePhyUshort(sc, 0x14, 0x6120);
20314         MP_WritePhyUshort(sc, 0x14, 0xd711);
20315         MP_WritePhyUshort(sc, 0x14, 0x3128);
20316         MP_WritePhyUshort(sc, 0x14, 0x3d7d);
20317         MP_WritePhyUshort(sc, 0x14, 0x2d77);
20318         MP_WritePhyUshort(sc, 0x14, 0xa801);
20319         MP_WritePhyUshort(sc, 0x14, 0x2d73);
20320         MP_WritePhyUshort(sc, 0x14, 0xd710);
20321         MP_WritePhyUshort(sc, 0x14, 0x4000);
20322         MP_WritePhyUshort(sc, 0x14, 0xe018);
20323         MP_WritePhyUshort(sc, 0x14, 0x0208);
20324         MP_WritePhyUshort(sc, 0x14, 0xa1f8);
20325         MP_WritePhyUshort(sc, 0x14, 0x8480);
20326         MP_WritePhyUshort(sc, 0x14, 0xc004);
20327         MP_WritePhyUshort(sc, 0x14, 0xd710);
20328         MP_WritePhyUshort(sc, 0x14, 0x4000);
20329         MP_WritePhyUshort(sc, 0x14, 0x6046);
20330         MP_WritePhyUshort(sc, 0x14, 0x2d14);
20331         MP_WritePhyUshort(sc, 0x14, 0xa43f);
20332         MP_WritePhyUshort(sc, 0x14, 0xa105);
20333         MP_WritePhyUshort(sc, 0x14, 0x8228);
20334         MP_WritePhyUshort(sc, 0x14, 0xc004);
20335         MP_WritePhyUshort(sc, 0x14, 0xd710);
20336         MP_WritePhyUshort(sc, 0x14, 0x4000);
20337         MP_WritePhyUshort(sc, 0x14, 0x81bc);
20338         MP_WritePhyUshort(sc, 0x14, 0xa220);
20339         MP_WritePhyUshort(sc, 0x14, 0x1d9e);
20340         MP_WritePhyUshort(sc, 0x14, 0x8220);
20341         MP_WritePhyUshort(sc, 0x14, 0xa1bc);
20342         MP_WritePhyUshort(sc, 0x14, 0xc040);
20343         MP_WritePhyUshort(sc, 0x14, 0xd710);
20344         MP_WritePhyUshort(sc, 0x14, 0x30e1);
20345         MP_WritePhyUshort(sc, 0x14, 0x0b24);
20346         MP_WritePhyUshort(sc, 0x14, 0x30e1);
20347         MP_WritePhyUshort(sc, 0x14, 0x3d14);
20348         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20349         MP_WritePhyUshort(sc, 0x14, 0x7f4c);
20350         MP_WritePhyUshort(sc, 0x14, 0x2b1e);
20351         MP_WritePhyUshort(sc, 0x14, 0xa802);
20352         MP_WritePhyUshort(sc, 0x14, 0xd70c);
20353         MP_WritePhyUshort(sc, 0x14, 0x4244);
20354         MP_WritePhyUshort(sc, 0x14, 0xa301);
20355         MP_WritePhyUshort(sc, 0x14, 0xc004);
20356         MP_WritePhyUshort(sc, 0x14, 0xd711);
20357         MP_WritePhyUshort(sc, 0x14, 0x3128);
20358         MP_WritePhyUshort(sc, 0x14, 0x3dac);
20359         MP_WritePhyUshort(sc, 0x14, 0xd710);
20360         MP_WritePhyUshort(sc, 0x14, 0x5f80);
20361         MP_WritePhyUshort(sc, 0x14, 0xd711);
20362         MP_WritePhyUshort(sc, 0x14, 0x3109);
20363         MP_WritePhyUshort(sc, 0x14, 0x3dae);
20364         MP_WritePhyUshort(sc, 0x14, 0x2db2);
20365         MP_WritePhyUshort(sc, 0x14, 0xa801);
20366         MP_WritePhyUshort(sc, 0x14, 0x2da1);
20367         MP_WritePhyUshort(sc, 0x14, 0xa802);
20368         MP_WritePhyUshort(sc, 0x14, 0xc004);
20369         MP_WritePhyUshort(sc, 0x14, 0xd710);
20370         MP_WritePhyUshort(sc, 0x14, 0x4000);
20371         MP_WritePhyUshort(sc, 0x14, 0x0800);
20372         MP_WritePhyUshort(sc, 0x14, 0xa510);
20373         MP_WritePhyUshort(sc, 0x14, 0xd710);
20374         MP_WritePhyUshort(sc, 0x14, 0x609a);
20375         MP_WritePhyUshort(sc, 0x14, 0xd71e);
20376         MP_WritePhyUshort(sc, 0x14, 0x7fac);
20377         MP_WritePhyUshort(sc, 0x14, 0x2b1e);
20378         MP_WritePhyUshort(sc, 0x14, 0x8510);
20379         MP_WritePhyUshort(sc, 0x14, 0x0800);
20380         MP_WritePhyUshort(sc, 0x13, 0xa01a);
20381         MP_WritePhyUshort(sc, 0x14, 0x0000);
20382         MP_WritePhyUshort(sc, 0x13, 0xa006);
20383         MP_WritePhyUshort(sc, 0x14, 0x0b3e);
20384         MP_WritePhyUshort(sc, 0x13, 0xa004);
20385         MP_WritePhyUshort(sc, 0x14, 0x0828);
20386         MP_WritePhyUshort(sc, 0x13, 0xa002);
20387         MP_WritePhyUshort(sc, 0x14, 0x06dd);
20388         MP_WritePhyUshort(sc, 0x13, 0xa000);
20389         MP_WritePhyUshort(sc, 0x14, 0xf815);
20390         MP_WritePhyUshort(sc, 0x13, 0xb820);
20391         MP_WritePhyUshort(sc, 0x14, 0x0010);
20392 
20393         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
20394         MP_WritePhyUshort(sc, 0x13, 0x83b0);
20395         MP_WritePhyUshort(sc, 0x14, 0xaf83);
20396         MP_WritePhyUshort(sc, 0x14, 0xbcaf);
20397         MP_WritePhyUshort(sc, 0x14, 0x83c8);
20398         MP_WritePhyUshort(sc, 0x14, 0xaf83);
20399         MP_WritePhyUshort(sc, 0x14, 0xddaf);
20400         MP_WritePhyUshort(sc, 0x14, 0x83e0);
20401         MP_WritePhyUshort(sc, 0x14, 0x0204);
20402         MP_WritePhyUshort(sc, 0x14, 0xa102);
20403         MP_WritePhyUshort(sc, 0x14, 0x09b4);
20404         MP_WritePhyUshort(sc, 0x14, 0x0284);
20405         MP_WritePhyUshort(sc, 0x14, 0x62af);
20406         MP_WritePhyUshort(sc, 0x14, 0x02ec);
20407         MP_WritePhyUshort(sc, 0x14, 0xad20);
20408         MP_WritePhyUshort(sc, 0x14, 0x0302);
20409         MP_WritePhyUshort(sc, 0x14, 0x867d);
20410         MP_WritePhyUshort(sc, 0x14, 0xad21);
20411         MP_WritePhyUshort(sc, 0x14, 0x0302);
20412         MP_WritePhyUshort(sc, 0x14, 0x85ca);
20413         MP_WritePhyUshort(sc, 0x14, 0xad22);
20414         MP_WritePhyUshort(sc, 0x14, 0x0302);
20415         MP_WritePhyUshort(sc, 0x14, 0x1bce);
20416         MP_WritePhyUshort(sc, 0x14, 0xaf18);
20417         MP_WritePhyUshort(sc, 0x14, 0x11af);
20418         MP_WritePhyUshort(sc, 0x14, 0x1811);
20419         MP_WritePhyUshort(sc, 0x14, 0x0106);
20420         MP_WritePhyUshort(sc, 0x14, 0xe081);
20421         MP_WritePhyUshort(sc, 0x14, 0x48af);
20422         MP_WritePhyUshort(sc, 0x14, 0x3b1f);
20423         MP_WritePhyUshort(sc, 0x14, 0xf8f9);
20424         MP_WritePhyUshort(sc, 0x14, 0xfaef);
20425         MP_WritePhyUshort(sc, 0x14, 0x69ee);
20426         MP_WritePhyUshort(sc, 0x14, 0x8010);
20427         MP_WritePhyUshort(sc, 0x14, 0xf7d1);
20428         MP_WritePhyUshort(sc, 0x14, 0x04bf);
20429         MP_WritePhyUshort(sc, 0x14, 0x8776);
20430         MP_WritePhyUshort(sc, 0x14, 0x0241);
20431         MP_WritePhyUshort(sc, 0x14, 0x0a02);
20432         MP_WritePhyUshort(sc, 0x14, 0x8704);
20433         MP_WritePhyUshort(sc, 0x14, 0xbf87);
20434         MP_WritePhyUshort(sc, 0x14, 0x4fd7);
20435         MP_WritePhyUshort(sc, 0x14, 0xb822);
20436         MP_WritePhyUshort(sc, 0x14, 0xd00c);
20437         MP_WritePhyUshort(sc, 0x14, 0x0241);
20438         MP_WritePhyUshort(sc, 0x14, 0x03ee);
20439         MP_WritePhyUshort(sc, 0x14, 0x80cd);
20440         MP_WritePhyUshort(sc, 0x14, 0xa0ee);
20441         MP_WritePhyUshort(sc, 0x14, 0x80ce);
20442         MP_WritePhyUshort(sc, 0x14, 0x8bee);
20443         MP_WritePhyUshort(sc, 0x14, 0x80d1);
20444         MP_WritePhyUshort(sc, 0x14, 0xf5ee);
20445         MP_WritePhyUshort(sc, 0x14, 0x80d2);
20446         MP_WritePhyUshort(sc, 0x14, 0xa9ee);
20447         MP_WritePhyUshort(sc, 0x14, 0x80d3);
20448         MP_WritePhyUshort(sc, 0x14, 0x0aee);
20449         MP_WritePhyUshort(sc, 0x14, 0x80f0);
20450         MP_WritePhyUshort(sc, 0x14, 0x10ee);
20451         MP_WritePhyUshort(sc, 0x14, 0x80f3);
20452         MP_WritePhyUshort(sc, 0x14, 0x8fee);
20453         MP_WritePhyUshort(sc, 0x14, 0x8101);
20454         MP_WritePhyUshort(sc, 0x14, 0x1eee);
20455         MP_WritePhyUshort(sc, 0x14, 0x810b);
20456         MP_WritePhyUshort(sc, 0x14, 0x4aee);
20457         MP_WritePhyUshort(sc, 0x14, 0x810c);
20458         MP_WritePhyUshort(sc, 0x14, 0x7cee);
20459         MP_WritePhyUshort(sc, 0x14, 0x8112);
20460         MP_WritePhyUshort(sc, 0x14, 0x7fd1);
20461         MP_WritePhyUshort(sc, 0x14, 0x0002);
20462         MP_WritePhyUshort(sc, 0x14, 0x10e3);
20463         MP_WritePhyUshort(sc, 0x14, 0xee80);
20464         MP_WritePhyUshort(sc, 0x14, 0x8892);
20465         MP_WritePhyUshort(sc, 0x14, 0xee80);
20466         MP_WritePhyUshort(sc, 0x14, 0x8922);
20467         MP_WritePhyUshort(sc, 0x14, 0xee80);
20468         MP_WritePhyUshort(sc, 0x14, 0x9a80);
20469         MP_WritePhyUshort(sc, 0x14, 0xee80);
20470         MP_WritePhyUshort(sc, 0x14, 0x9b22);
20471         MP_WritePhyUshort(sc, 0x14, 0xee80);
20472         MP_WritePhyUshort(sc, 0x14, 0x9ca7);
20473         MP_WritePhyUshort(sc, 0x14, 0xee80);
20474         MP_WritePhyUshort(sc, 0x14, 0xa010);
20475         MP_WritePhyUshort(sc, 0x14, 0xee80);
20476         MP_WritePhyUshort(sc, 0x14, 0xa5a7);
20477         MP_WritePhyUshort(sc, 0x14, 0xd200);
20478         MP_WritePhyUshort(sc, 0x14, 0x020e);
20479         MP_WritePhyUshort(sc, 0x14, 0x4b02);
20480         MP_WritePhyUshort(sc, 0x14, 0x85c1);
20481         MP_WritePhyUshort(sc, 0x14, 0xef96);
20482         MP_WritePhyUshort(sc, 0x14, 0xfefd);
20483         MP_WritePhyUshort(sc, 0x14, 0xfc04);
20484         MP_WritePhyUshort(sc, 0x14, 0x0284);
20485         MP_WritePhyUshort(sc, 0x14, 0x7b02);
20486         MP_WritePhyUshort(sc, 0x14, 0x84b4);
20487         MP_WritePhyUshort(sc, 0x14, 0x020c);
20488         MP_WritePhyUshort(sc, 0x14, 0x9202);
20489         MP_WritePhyUshort(sc, 0x14, 0x0cab);
20490         MP_WritePhyUshort(sc, 0x14, 0x020c);
20491         MP_WritePhyUshort(sc, 0x14, 0xd602);
20492         MP_WritePhyUshort(sc, 0x14, 0x0cef);
20493         MP_WritePhyUshort(sc, 0x14, 0x020d);
20494         MP_WritePhyUshort(sc, 0x14, 0x1a02);
20495         MP_WritePhyUshort(sc, 0x14, 0x0c24);
20496         MP_WritePhyUshort(sc, 0x14, 0x04f8);
20497         MP_WritePhyUshort(sc, 0x14, 0xfaef);
20498         MP_WritePhyUshort(sc, 0x14, 0x69e1);
20499         MP_WritePhyUshort(sc, 0x14, 0x8234);
20500         MP_WritePhyUshort(sc, 0x14, 0xac29);
20501         MP_WritePhyUshort(sc, 0x14, 0x1ae0);
20502         MP_WritePhyUshort(sc, 0x14, 0x8229);
20503         MP_WritePhyUshort(sc, 0x14, 0xac21);
20504         MP_WritePhyUshort(sc, 0x14, 0x02ae);
20505         MP_WritePhyUshort(sc, 0x14, 0x2202);
20506         MP_WritePhyUshort(sc, 0x14, 0x1085);
20507         MP_WritePhyUshort(sc, 0x14, 0xf621);
20508         MP_WritePhyUshort(sc, 0x14, 0xe482);
20509         MP_WritePhyUshort(sc, 0x14, 0x29d1);
20510         MP_WritePhyUshort(sc, 0x14, 0x01bf);
20511         MP_WritePhyUshort(sc, 0x14, 0x4364);
20512         MP_WritePhyUshort(sc, 0x14, 0x0241);
20513         MP_WritePhyUshort(sc, 0x14, 0x0aae);
20514         MP_WritePhyUshort(sc, 0x14, 0x1002);
20515         MP_WritePhyUshort(sc, 0x14, 0x127a);
20516         MP_WritePhyUshort(sc, 0x14, 0xf629);
20517         MP_WritePhyUshort(sc, 0x14, 0xe582);
20518         MP_WritePhyUshort(sc, 0x14, 0x34e0);
20519         MP_WritePhyUshort(sc, 0x14, 0x8229);
20520         MP_WritePhyUshort(sc, 0x14, 0xf621);
20521         MP_WritePhyUshort(sc, 0x14, 0xe482);
20522         MP_WritePhyUshort(sc, 0x14, 0x29ef);
20523         MP_WritePhyUshort(sc, 0x14, 0x96fe);
20524         MP_WritePhyUshort(sc, 0x14, 0xfc04);
20525         MP_WritePhyUshort(sc, 0x14, 0xf8e1);
20526         MP_WritePhyUshort(sc, 0x14, 0x8234);
20527         MP_WritePhyUshort(sc, 0x14, 0xac2a);
20528         MP_WritePhyUshort(sc, 0x14, 0x18e0);
20529         MP_WritePhyUshort(sc, 0x14, 0x8229);
20530         MP_WritePhyUshort(sc, 0x14, 0xac22);
20531         MP_WritePhyUshort(sc, 0x14, 0x02ae);
20532         MP_WritePhyUshort(sc, 0x14, 0x2602);
20533         MP_WritePhyUshort(sc, 0x14, 0x84f9);
20534         MP_WritePhyUshort(sc, 0x14, 0x0285);
20535         MP_WritePhyUshort(sc, 0x14, 0x66d1);
20536         MP_WritePhyUshort(sc, 0x14, 0x01bf);
20537         MP_WritePhyUshort(sc, 0x14, 0x4367);
20538         MP_WritePhyUshort(sc, 0x14, 0x0241);
20539         MP_WritePhyUshort(sc, 0x14, 0x0aae);
20540         MP_WritePhyUshort(sc, 0x14, 0x0e02);
20541         MP_WritePhyUshort(sc, 0x14, 0x84eb);
20542         MP_WritePhyUshort(sc, 0x14, 0x0285);
20543         MP_WritePhyUshort(sc, 0x14, 0xaae1);
20544         MP_WritePhyUshort(sc, 0x14, 0x8234);
20545         MP_WritePhyUshort(sc, 0x14, 0xf62a);
20546         MP_WritePhyUshort(sc, 0x14, 0xe582);
20547         MP_WritePhyUshort(sc, 0x14, 0x34e0);
20548         MP_WritePhyUshort(sc, 0x14, 0x8229);
20549         MP_WritePhyUshort(sc, 0x14, 0xf622);
20550         MP_WritePhyUshort(sc, 0x14, 0xe482);
20551         MP_WritePhyUshort(sc, 0x14, 0x29fc);
20552         MP_WritePhyUshort(sc, 0x14, 0x04f9);
20553         MP_WritePhyUshort(sc, 0x14, 0xe280);
20554         MP_WritePhyUshort(sc, 0x14, 0x11ad);
20555         MP_WritePhyUshort(sc, 0x14, 0x3105);
20556         MP_WritePhyUshort(sc, 0x14, 0xd200);
20557         MP_WritePhyUshort(sc, 0x14, 0x020e);
20558         MP_WritePhyUshort(sc, 0x14, 0x4bfd);
20559         MP_WritePhyUshort(sc, 0x14, 0x04f8);
20560         MP_WritePhyUshort(sc, 0x14, 0xf9fa);
20561         MP_WritePhyUshort(sc, 0x14, 0xef69);
20562         MP_WritePhyUshort(sc, 0x14, 0xe080);
20563         MP_WritePhyUshort(sc, 0x14, 0x11ad);
20564         MP_WritePhyUshort(sc, 0x14, 0x215c);
20565         MP_WritePhyUshort(sc, 0x14, 0xbf42);
20566         MP_WritePhyUshort(sc, 0x14, 0x5002);
20567         MP_WritePhyUshort(sc, 0x14, 0x4148);
20568         MP_WritePhyUshort(sc, 0x14, 0xac28);
20569         MP_WritePhyUshort(sc, 0x14, 0x1bbf);
20570         MP_WritePhyUshort(sc, 0x14, 0x4253);
20571         MP_WritePhyUshort(sc, 0x14, 0x0241);
20572         MP_WritePhyUshort(sc, 0x14, 0x48ac);
20573         MP_WritePhyUshort(sc, 0x14, 0x2812);
20574         MP_WritePhyUshort(sc, 0x14, 0xbf42);
20575         MP_WritePhyUshort(sc, 0x14, 0x5902);
20576         MP_WritePhyUshort(sc, 0x14, 0x4148);
20577         MP_WritePhyUshort(sc, 0x14, 0xac28);
20578         MP_WritePhyUshort(sc, 0x14, 0x04d3);
20579         MP_WritePhyUshort(sc, 0x14, 0x00ae);
20580         MP_WritePhyUshort(sc, 0x14, 0x07d3);
20581         MP_WritePhyUshort(sc, 0x14, 0x06af);
20582         MP_WritePhyUshort(sc, 0x14, 0x8557);
20583         MP_WritePhyUshort(sc, 0x14, 0xd303);
20584         MP_WritePhyUshort(sc, 0x14, 0xe080);
20585         MP_WritePhyUshort(sc, 0x14, 0x11ad);
20586         MP_WritePhyUshort(sc, 0x14, 0x2625);
20587         MP_WritePhyUshort(sc, 0x14, 0xbf43);
20588         MP_WritePhyUshort(sc, 0x14, 0xeb02);
20589         MP_WritePhyUshort(sc, 0x14, 0x4148);
20590         MP_WritePhyUshort(sc, 0x14, 0xe280);
20591         MP_WritePhyUshort(sc, 0x14, 0x730d);
20592         MP_WritePhyUshort(sc, 0x14, 0x21f6);
20593         MP_WritePhyUshort(sc, 0x14, 0x370d);
20594         MP_WritePhyUshort(sc, 0x14, 0x11f6);
20595         MP_WritePhyUshort(sc, 0x14, 0x2f1b);
20596         MP_WritePhyUshort(sc, 0x14, 0x21aa);
20597         MP_WritePhyUshort(sc, 0x14, 0x02ae);
20598         MP_WritePhyUshort(sc, 0x14, 0x10e2);
20599         MP_WritePhyUshort(sc, 0x14, 0x8074);
20600         MP_WritePhyUshort(sc, 0x14, 0x0d21);
20601         MP_WritePhyUshort(sc, 0x14, 0xf637);
20602         MP_WritePhyUshort(sc, 0x14, 0x1b21);
20603         MP_WritePhyUshort(sc, 0x14, 0xaa03);
20604         MP_WritePhyUshort(sc, 0x14, 0x13ae);
20605         MP_WritePhyUshort(sc, 0x14, 0x022b);
20606         MP_WritePhyUshort(sc, 0x14, 0x0202);
20607         MP_WritePhyUshort(sc, 0x14, 0x0e36);
20608         MP_WritePhyUshort(sc, 0x14, 0x020e);
20609         MP_WritePhyUshort(sc, 0x14, 0x4b02);
20610         MP_WritePhyUshort(sc, 0x14, 0x0f91);
20611         MP_WritePhyUshort(sc, 0x14, 0xef96);
20612         MP_WritePhyUshort(sc, 0x14, 0xfefd);
20613         MP_WritePhyUshort(sc, 0x14, 0xfc04);
20614         MP_WritePhyUshort(sc, 0x14, 0xf8f9);
20615         MP_WritePhyUshort(sc, 0x14, 0xfaef);
20616         MP_WritePhyUshort(sc, 0x14, 0x69e0);
20617         MP_WritePhyUshort(sc, 0x14, 0x8012);
20618         MP_WritePhyUshort(sc, 0x14, 0xad27);
20619         MP_WritePhyUshort(sc, 0x14, 0x33bf);
20620         MP_WritePhyUshort(sc, 0x14, 0x4250);
20621         MP_WritePhyUshort(sc, 0x14, 0x0241);
20622         MP_WritePhyUshort(sc, 0x14, 0x48ac);
20623         MP_WritePhyUshort(sc, 0x14, 0x2809);
20624         MP_WritePhyUshort(sc, 0x14, 0xbf42);
20625         MP_WritePhyUshort(sc, 0x14, 0x5302);
20626         MP_WritePhyUshort(sc, 0x14, 0x4148);
20627         MP_WritePhyUshort(sc, 0x14, 0xad28);
20628         MP_WritePhyUshort(sc, 0x14, 0x21bf);
20629         MP_WritePhyUshort(sc, 0x14, 0x43eb);
20630         MP_WritePhyUshort(sc, 0x14, 0x0241);
20631         MP_WritePhyUshort(sc, 0x14, 0x48e3);
20632         MP_WritePhyUshort(sc, 0x14, 0x87ff);
20633         MP_WritePhyUshort(sc, 0x14, 0xd200);
20634         MP_WritePhyUshort(sc, 0x14, 0x1b45);
20635         MP_WritePhyUshort(sc, 0x14, 0xac27);
20636         MP_WritePhyUshort(sc, 0x14, 0x11e1);
20637         MP_WritePhyUshort(sc, 0x14, 0x87fe);
20638         MP_WritePhyUshort(sc, 0x14, 0xbf87);
20639         MP_WritePhyUshort(sc, 0x14, 0x6702);
20640         MP_WritePhyUshort(sc, 0x14, 0x410a);
20641         MP_WritePhyUshort(sc, 0x14, 0x0d11);
20642         MP_WritePhyUshort(sc, 0x14, 0xbf87);
20643         MP_WritePhyUshort(sc, 0x14, 0x6a02);
20644         MP_WritePhyUshort(sc, 0x14, 0x410a);
20645         MP_WritePhyUshort(sc, 0x14, 0xef96);
20646         MP_WritePhyUshort(sc, 0x14, 0xfefd);
20647         MP_WritePhyUshort(sc, 0x14, 0xfc04);
20648         MP_WritePhyUshort(sc, 0x14, 0xf8fa);
20649         MP_WritePhyUshort(sc, 0x14, 0xef69);
20650         MP_WritePhyUshort(sc, 0x14, 0xd100);
20651         MP_WritePhyUshort(sc, 0x14, 0xbf87);
20652         MP_WritePhyUshort(sc, 0x14, 0x6702);
20653         MP_WritePhyUshort(sc, 0x14, 0x410a);
20654         MP_WritePhyUshort(sc, 0x14, 0xbf87);
20655         MP_WritePhyUshort(sc, 0x14, 0x6a02);
20656         MP_WritePhyUshort(sc, 0x14, 0x410a);
20657         MP_WritePhyUshort(sc, 0x14, 0xef96);
20658         MP_WritePhyUshort(sc, 0x14, 0xfefc);
20659         MP_WritePhyUshort(sc, 0x14, 0x04ee);
20660         MP_WritePhyUshort(sc, 0x14, 0x87ff);
20661         MP_WritePhyUshort(sc, 0x14, 0x46ee);
20662         MP_WritePhyUshort(sc, 0x14, 0x87fe);
20663         MP_WritePhyUshort(sc, 0x14, 0x0104);
20664         MP_WritePhyUshort(sc, 0x14, 0xf8fa);
20665         MP_WritePhyUshort(sc, 0x14, 0xef69);
20666         MP_WritePhyUshort(sc, 0x14, 0xe082);
20667         MP_WritePhyUshort(sc, 0x14, 0x46a0);
20668         MP_WritePhyUshort(sc, 0x14, 0x0005);
20669         MP_WritePhyUshort(sc, 0x14, 0x0285);
20670         MP_WritePhyUshort(sc, 0x14, 0xecae);
20671         MP_WritePhyUshort(sc, 0x14, 0x0ea0);
20672         MP_WritePhyUshort(sc, 0x14, 0x0105);
20673         MP_WritePhyUshort(sc, 0x14, 0x021a);
20674         MP_WritePhyUshort(sc, 0x14, 0x68ae);
20675         MP_WritePhyUshort(sc, 0x14, 0x06a0);
20676         MP_WritePhyUshort(sc, 0x14, 0x0203);
20677         MP_WritePhyUshort(sc, 0x14, 0x021a);
20678         MP_WritePhyUshort(sc, 0x14, 0xf4ef);
20679         MP_WritePhyUshort(sc, 0x14, 0x96fe);
20680         MP_WritePhyUshort(sc, 0x14, 0xfc04);
20681         MP_WritePhyUshort(sc, 0x14, 0xf8f9);
20682         MP_WritePhyUshort(sc, 0x14, 0xfaef);
20683         MP_WritePhyUshort(sc, 0x14, 0x69e0);
20684         MP_WritePhyUshort(sc, 0x14, 0x822e);
20685         MP_WritePhyUshort(sc, 0x14, 0xf621);
20686         MP_WritePhyUshort(sc, 0x14, 0xe482);
20687         MP_WritePhyUshort(sc, 0x14, 0x2ee0);
20688         MP_WritePhyUshort(sc, 0x14, 0x8010);
20689         MP_WritePhyUshort(sc, 0x14, 0xac22);
20690         MP_WritePhyUshort(sc, 0x14, 0x02ae);
20691         MP_WritePhyUshort(sc, 0x14, 0x76e0);
20692         MP_WritePhyUshort(sc, 0x14, 0x822c);
20693         MP_WritePhyUshort(sc, 0x14, 0xf721);
20694         MP_WritePhyUshort(sc, 0x14, 0xe482);
20695         MP_WritePhyUshort(sc, 0x14, 0x2cbf);
20696         MP_WritePhyUshort(sc, 0x14, 0x41a5);
20697         MP_WritePhyUshort(sc, 0x14, 0x0241);
20698         MP_WritePhyUshort(sc, 0x14, 0x48ef);
20699         MP_WritePhyUshort(sc, 0x14, 0x21bf);
20700         MP_WritePhyUshort(sc, 0x14, 0x41a8);
20701         MP_WritePhyUshort(sc, 0x14, 0x0241);
20702         MP_WritePhyUshort(sc, 0x14, 0x480c);
20703         MP_WritePhyUshort(sc, 0x14, 0x111e);
20704         MP_WritePhyUshort(sc, 0x14, 0x21bf);
20705         MP_WritePhyUshort(sc, 0x14, 0x41ab);
20706         MP_WritePhyUshort(sc, 0x14, 0x0241);
20707         MP_WritePhyUshort(sc, 0x14, 0x480c);
20708         MP_WritePhyUshort(sc, 0x14, 0x121e);
20709         MP_WritePhyUshort(sc, 0x14, 0x21e6);
20710         MP_WritePhyUshort(sc, 0x14, 0x8248);
20711         MP_WritePhyUshort(sc, 0x14, 0xa200);
20712         MP_WritePhyUshort(sc, 0x14, 0x0ae1);
20713         MP_WritePhyUshort(sc, 0x14, 0x822c);
20714         MP_WritePhyUshort(sc, 0x14, 0xf629);
20715         MP_WritePhyUshort(sc, 0x14, 0xe582);
20716         MP_WritePhyUshort(sc, 0x14, 0x2cae);
20717         MP_WritePhyUshort(sc, 0x14, 0x42e0);
20718         MP_WritePhyUshort(sc, 0x14, 0x8249);
20719         MP_WritePhyUshort(sc, 0x14, 0xf721);
20720         MP_WritePhyUshort(sc, 0x14, 0xe482);
20721         MP_WritePhyUshort(sc, 0x14, 0x4902);
20722         MP_WritePhyUshort(sc, 0x14, 0x4520);
20723         MP_WritePhyUshort(sc, 0x14, 0xbf41);
20724         MP_WritePhyUshort(sc, 0x14, 0xb702);
20725         MP_WritePhyUshort(sc, 0x14, 0x4148);
20726         MP_WritePhyUshort(sc, 0x14, 0xef21);
20727         MP_WritePhyUshort(sc, 0x14, 0xbf41);
20728         MP_WritePhyUshort(sc, 0x14, 0xae02);
20729         MP_WritePhyUshort(sc, 0x14, 0x4148);
20730         MP_WritePhyUshort(sc, 0x14, 0x0c12);
20731         MP_WritePhyUshort(sc, 0x14, 0x1e21);
20732         MP_WritePhyUshort(sc, 0x14, 0xbf41);
20733         MP_WritePhyUshort(sc, 0x14, 0xb102);
20734         MP_WritePhyUshort(sc, 0x14, 0x4148);
20735         MP_WritePhyUshort(sc, 0x14, 0x0c13);
20736         MP_WritePhyUshort(sc, 0x14, 0x1e21);
20737         MP_WritePhyUshort(sc, 0x14, 0xbf41);
20738         MP_WritePhyUshort(sc, 0x14, 0xba02);
20739         MP_WritePhyUshort(sc, 0x14, 0x4148);
20740         MP_WritePhyUshort(sc, 0x14, 0x0c14);
20741         MP_WritePhyUshort(sc, 0x14, 0x1e21);
20742         MP_WritePhyUshort(sc, 0x14, 0xbf43);
20743         MP_WritePhyUshort(sc, 0x14, 0x4602);
20744         MP_WritePhyUshort(sc, 0x14, 0x4148);
20745         MP_WritePhyUshort(sc, 0x14, 0x0c16);
20746         MP_WritePhyUshort(sc, 0x14, 0x1e21);
20747         MP_WritePhyUshort(sc, 0x14, 0xe682);
20748         MP_WritePhyUshort(sc, 0x14, 0x47ee);
20749         MP_WritePhyUshort(sc, 0x14, 0x8246);
20750         MP_WritePhyUshort(sc, 0x14, 0x01ef);
20751         MP_WritePhyUshort(sc, 0x14, 0x96fe);
20752         MP_WritePhyUshort(sc, 0x14, 0xfdfc);
20753         MP_WritePhyUshort(sc, 0x14, 0x04f8);
20754         MP_WritePhyUshort(sc, 0x14, 0xfaef);
20755         MP_WritePhyUshort(sc, 0x14, 0x69e0);
20756         MP_WritePhyUshort(sc, 0x14, 0x824b);
20757         MP_WritePhyUshort(sc, 0x14, 0xa000);
20758         MP_WritePhyUshort(sc, 0x14, 0x0502);
20759         MP_WritePhyUshort(sc, 0x14, 0x8697);
20760         MP_WritePhyUshort(sc, 0x14, 0xae06);
20761         MP_WritePhyUshort(sc, 0x14, 0xa001);
20762         MP_WritePhyUshort(sc, 0x14, 0x0302);
20763         MP_WritePhyUshort(sc, 0x14, 0x1937);
20764         MP_WritePhyUshort(sc, 0x14, 0xef96);
20765         MP_WritePhyUshort(sc, 0x14, 0xfefc);
20766         MP_WritePhyUshort(sc, 0x14, 0x04f8);
20767         MP_WritePhyUshort(sc, 0x14, 0xfaef);
20768         MP_WritePhyUshort(sc, 0x14, 0x69e0);
20769         MP_WritePhyUshort(sc, 0x14, 0x822e);
20770         MP_WritePhyUshort(sc, 0x14, 0xf620);
20771         MP_WritePhyUshort(sc, 0x14, 0xe482);
20772         MP_WritePhyUshort(sc, 0x14, 0x2ee0);
20773         MP_WritePhyUshort(sc, 0x14, 0x8010);
20774         MP_WritePhyUshort(sc, 0x14, 0xac21);
20775         MP_WritePhyUshort(sc, 0x14, 0x02ae);
20776         MP_WritePhyUshort(sc, 0x14, 0x54e0);
20777         MP_WritePhyUshort(sc, 0x14, 0x822c);
20778         MP_WritePhyUshort(sc, 0x14, 0xf720);
20779         MP_WritePhyUshort(sc, 0x14, 0xe482);
20780         MP_WritePhyUshort(sc, 0x14, 0x2cbf);
20781         MP_WritePhyUshort(sc, 0x14, 0x4175);
20782         MP_WritePhyUshort(sc, 0x14, 0x0241);
20783         MP_WritePhyUshort(sc, 0x14, 0x48ac);
20784         MP_WritePhyUshort(sc, 0x14, 0x2822);
20785         MP_WritePhyUshort(sc, 0x14, 0xbf41);
20786         MP_WritePhyUshort(sc, 0x14, 0x9f02);
20787         MP_WritePhyUshort(sc, 0x14, 0x4148);
20788         MP_WritePhyUshort(sc, 0x14, 0xe582);
20789         MP_WritePhyUshort(sc, 0x14, 0x4cac);
20790         MP_WritePhyUshort(sc, 0x14, 0x2820);
20791         MP_WritePhyUshort(sc, 0x14, 0xd103);
20792         MP_WritePhyUshort(sc, 0x14, 0xbf41);
20793         MP_WritePhyUshort(sc, 0x14, 0x9902);
20794         MP_WritePhyUshort(sc, 0x14, 0x410a);
20795         MP_WritePhyUshort(sc, 0x14, 0xee82);
20796         MP_WritePhyUshort(sc, 0x14, 0x4b00);
20797         MP_WritePhyUshort(sc, 0x14, 0xe182);
20798         MP_WritePhyUshort(sc, 0x14, 0x2cf6);
20799         MP_WritePhyUshort(sc, 0x14, 0x28e5);
20800         MP_WritePhyUshort(sc, 0x14, 0x822c);
20801         MP_WritePhyUshort(sc, 0x14, 0xae21);
20802         MP_WritePhyUshort(sc, 0x14, 0xd104);
20803         MP_WritePhyUshort(sc, 0x14, 0xbf41);
20804         MP_WritePhyUshort(sc, 0x14, 0x9902);
20805         MP_WritePhyUshort(sc, 0x14, 0x410a);
20806         MP_WritePhyUshort(sc, 0x14, 0xae08);
20807         MP_WritePhyUshort(sc, 0x14, 0xd105);
20808         MP_WritePhyUshort(sc, 0x14, 0xbf41);
20809         MP_WritePhyUshort(sc, 0x14, 0x9902);
20810         MP_WritePhyUshort(sc, 0x14, 0x410a);
20811         MP_WritePhyUshort(sc, 0x14, 0xe082);
20812         MP_WritePhyUshort(sc, 0x14, 0x49f7);
20813         MP_WritePhyUshort(sc, 0x14, 0x20e4);
20814         MP_WritePhyUshort(sc, 0x14, 0x8249);
20815         MP_WritePhyUshort(sc, 0x14, 0x0245);
20816         MP_WritePhyUshort(sc, 0x14, 0x20ee);
20817         MP_WritePhyUshort(sc, 0x14, 0x824b);
20818         MP_WritePhyUshort(sc, 0x14, 0x01ef);
20819         MP_WritePhyUshort(sc, 0x14, 0x96fe);
20820         MP_WritePhyUshort(sc, 0x14, 0xfc04);
20821         MP_WritePhyUshort(sc, 0x14, 0xf8f9);
20822         MP_WritePhyUshort(sc, 0x14, 0xface);
20823         MP_WritePhyUshort(sc, 0x14, 0xfaef);
20824         MP_WritePhyUshort(sc, 0x14, 0x69fb);
20825         MP_WritePhyUshort(sc, 0x14, 0xbf87);
20826         MP_WritePhyUshort(sc, 0x14, 0x2fd7);
20827         MP_WritePhyUshort(sc, 0x14, 0x0020);
20828         MP_WritePhyUshort(sc, 0x14, 0xd819);
20829         MP_WritePhyUshort(sc, 0x14, 0xd919);
20830         MP_WritePhyUshort(sc, 0x14, 0xda19);
20831         MP_WritePhyUshort(sc, 0x14, 0xdb19);
20832         MP_WritePhyUshort(sc, 0x14, 0x07ef);
20833         MP_WritePhyUshort(sc, 0x14, 0x9502);
20834         MP_WritePhyUshort(sc, 0x14, 0x410a);
20835         MP_WritePhyUshort(sc, 0x14, 0x073f);
20836         MP_WritePhyUshort(sc, 0x14, 0x0004);
20837         MP_WritePhyUshort(sc, 0x14, 0x9fec);
20838         MP_WritePhyUshort(sc, 0x14, 0xffef);
20839         MP_WritePhyUshort(sc, 0x14, 0x96fe);
20840         MP_WritePhyUshort(sc, 0x14, 0xc6fe);
20841         MP_WritePhyUshort(sc, 0x14, 0xfdfc);
20842         MP_WritePhyUshort(sc, 0x14, 0x0400);
20843         MP_WritePhyUshort(sc, 0x14, 0x0144);
20844         MP_WritePhyUshort(sc, 0x14, 0x0000);
20845         MP_WritePhyUshort(sc, 0x14, 0x0343);
20846         MP_WritePhyUshort(sc, 0x14, 0xee00);
20847         MP_WritePhyUshort(sc, 0x14, 0x0087);
20848         MP_WritePhyUshort(sc, 0x14, 0x5b00);
20849         MP_WritePhyUshort(sc, 0x14, 0x0141);
20850         MP_WritePhyUshort(sc, 0x14, 0xe100);
20851         MP_WritePhyUshort(sc, 0x14, 0x0387);
20852         MP_WritePhyUshort(sc, 0x14, 0x5e00);
20853         MP_WritePhyUshort(sc, 0x14, 0x0987);
20854         MP_WritePhyUshort(sc, 0x14, 0x6100);
20855         MP_WritePhyUshort(sc, 0x14, 0x0987);
20856         MP_WritePhyUshort(sc, 0x14, 0x6400);
20857         MP_WritePhyUshort(sc, 0x14, 0x0087);
20858         MP_WritePhyUshort(sc, 0x14, 0x6da4);
20859         MP_WritePhyUshort(sc, 0x14, 0x00b8);
20860         MP_WritePhyUshort(sc, 0x14, 0x20c4);
20861         MP_WritePhyUshort(sc, 0x14, 0x1600);
20862         MP_WritePhyUshort(sc, 0x14, 0x000f);
20863         MP_WritePhyUshort(sc, 0x14, 0xf800);
20864         MP_WritePhyUshort(sc, 0x14, 0x7000);
20865         MP_WritePhyUshort(sc, 0x14, 0xb82e);
20866         MP_WritePhyUshort(sc, 0x14, 0x98a5);
20867         MP_WritePhyUshort(sc, 0x14, 0x8ab6);
20868         MP_WritePhyUshort(sc, 0x14, 0xa83e);
20869         MP_WritePhyUshort(sc, 0x14, 0x50a8);
20870         MP_WritePhyUshort(sc, 0x14, 0x3e33);
20871         MP_WritePhyUshort(sc, 0x14, 0xbcc6);
20872         MP_WritePhyUshort(sc, 0x14, 0x22bc);
20873         MP_WritePhyUshort(sc, 0x14, 0xc6aa);
20874         MP_WritePhyUshort(sc, 0x14, 0xa442);
20875         MP_WritePhyUshort(sc, 0x14, 0xffc4);
20876         MP_WritePhyUshort(sc, 0x14, 0x0800);
20877         MP_WritePhyUshort(sc, 0x14, 0xc416);
20878         MP_WritePhyUshort(sc, 0x14, 0xa8bc);
20879         MP_WritePhyUshort(sc, 0x14, 0xc000);
20880         MP_WritePhyUshort(sc, 0x13, 0xb818);
20881         MP_WritePhyUshort(sc, 0x14, 0x02e3);
20882         MP_WritePhyUshort(sc, 0x13, 0xb81a);
20883         MP_WritePhyUshort(sc, 0x14, 0x17ff);
20884         MP_WritePhyUshort(sc, 0x13, 0xb81e);
20885         MP_WritePhyUshort(sc, 0x14, 0x3b1c);
20886         MP_WritePhyUshort(sc, 0x13, 0xb820);
20887         MP_WritePhyUshort(sc, 0x14, 0x021b);
20888         MP_WritePhyUshort(sc, 0x1f, 0x0000);
20889 
20890         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
20891         MP_WritePhyUshort(sc, 0x13, 0x0000);
20892         MP_WritePhyUshort(sc, 0x14, 0x0000);
20893         MP_WritePhyUshort(sc, 0x1f, 0x0B82);
20894         PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
20895         PhyRegValue &= ~(BIT_0);
20896         MP_WritePhyUshort(sc, 0x17, PhyRegValue);
20897         if (sc->RequiredSecLanDonglePatch)
20898                 PhyRegValue &= ~(BIT_2);
20899         MP_WritePhyUshort(sc,0x1f, 0x0000);
20900 
20901         MP_WritePhyUshort(sc, 0x1F, 0x0003);
20902         MP_WritePhyUshort(sc, 0x09, 0xA20F);
20903         MP_WritePhyUshort(sc, 0x1F, 0x0000);
20904         MP_WritePhyUshort(sc, 0x1F, 0x0003);
20905         MP_WritePhyUshort(sc, 0x01, 0x328A);
20906         MP_WritePhyUshort(sc, 0x1F, 0x0000);
20907         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
20908         MP_WritePhyUshort(sc, 0x13, 0x8011);
20909         ClearEthPhyBit(sc, 0x14, BIT_14);
20910         MP_WritePhyUshort(sc, 0x1F, 0x0A40);
20911         MP_WritePhyUshort(sc, 0x1F, 0x0000);
20912         MP_WritePhyUshort(sc,0x1f, 0x0000);
20913         MP_WritePhyUshort(sc,0x00, 0x9200);
20914 }
20915 
20916 static void re_init_hw_phy_mcu(struct re_softc *sc)
20917 {
20918         if (re_hw_phy_mcu_code_ver_matched(sc)) return;
20919 
20920         switch (sc->re_type) {
20921         case MACFG_36:
20922                 re_set_phy_mcu_8168e_1(sc);
20923                 break;
20924         case MACFG_37:
20925                 re_set_phy_mcu_8168e_2(sc);
20926                 break;
20927         case MACFG_38:
20928                 re_set_phy_mcu_8168evl_1(sc);
20929                 break;
20930         case MACFG_39:
20931                 re_set_phy_mcu_8168evl_2(sc);
20932                 break;
20933         case MACFG_50:
20934                 re_set_phy_mcu_8168f_1(sc);
20935                 break;
20936         case MACFG_51:
20937                 re_set_phy_mcu_8168f_2(sc);
20938                 break;
20939         case MACFG_52:
20940                 re_set_phy_mcu_8411_1(sc);
20941                 break;
20942         case MACFG_56:
20943                 re_set_phy_mcu_8168g_1(sc);
20944                 break;
20945         case MACFG_59:
20946                 re_set_phy_mcu_8168gu_2(sc);
20947                 break;
20948         case MACFG_60:
20949                 re_set_phy_mcu_8411b_1(sc);
20950                 break;
20951         case MACFG_61:
20952                 re_set_phy_mcu_8168ep_1(sc);
20953                 break;
20954         case MACFG_68:
20955                 re_set_phy_mcu_8168h_1(sc);
20956                 break;
20957         case MACFG_69:
20958                 re_set_phy_mcu_8168h_2(sc);
20959                 break;
20960         }
20961 
20962         re_write_hw_phy_mcu_code_ver(sc);
20963 
20964         MP_WritePhyUshort(sc, 0x1F, 0x0000);
20965 }
20966 
20967 static void re_hw_phy_config(struct re_softc *sc)
20968 {
20969         u_int16_t Data, PhyRegValue, TmpUshort;
20970         u_int32_t Data_u32;
20971         u_int16_t dout_tapbin;
20972         int	i;
20973 
20974         if (sc->re_type == MACFG_59 || sc->re_type == MACFG_60 ||
20975             sc->re_type == MACFG_62 || sc->re_type == MACFG_67 ||
20976             sc->re_type == MACFG_68 || sc->re_type == MACFG_69 ||
20977             sc->re_type == MACFG_70 || sc->re_type == MACFG_71) {
20978                 MP_WritePhyOcpRegWord(sc, 0x0C41, 0x13, 0x0000);
20979                 MP_WritePhyOcpRegWord(sc, 0x0C41, 0x13, 0x0500);
20980         }
20981 
20982         if (HW_DASH_SUPPORT_TYPE_3(sc) && sc->HwPkgDet == 0x06) return;
20983 
20984         if (FALSE == re_phy_ram_code_check(sc)) {
20985                 re_set_phy_ram_code_check_fail_flag(sc);
20986                 return;
20987         }
20988 
20989         re_init_hw_phy_mcu(sc);
20990 
20991         MP_WritePhyUshort(sc, 0x1F, 0x0000);
20992 
20993         if (sc->re_type == MACFG_3) {
20994                 CSR_WRITE_1(sc, 0x82, CSR_READ_1(sc, 0x82)|BIT_0);
20995                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
20996                 MP_WritePhyUshort(sc, 0x0b, 0x0000);
20997 
20998                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
20999                 MP_WritePhyUshort(sc, 0x06, 0x006e);
21000                 MP_WritePhyUshort(sc, 0x08, 0x0708);
21001                 MP_WritePhyUshort(sc, 0x15, 0x4000);
21002                 MP_WritePhyUshort(sc, 0x18, 0x65c7);
21003 
21004                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
21005                 MP_WritePhyUshort(sc, 0x03, 0x00a1);
21006                 MP_WritePhyUshort(sc, 0x02, 0x0008);
21007                 MP_WritePhyUshort(sc, 0x01, 0x0120);
21008                 MP_WritePhyUshort(sc, 0x00, 0x1000);
21009                 MP_WritePhyUshort(sc, 0x04, 0x0800);
21010                 MP_WritePhyUshort(sc, 0x04, 0x0000);
21011 
21012                 MP_WritePhyUshort(sc, 0x03, 0xff41);
21013                 MP_WritePhyUshort(sc, 0x02, 0xdf60);
21014                 MP_WritePhyUshort(sc, 0x01, 0x0140);
21015                 MP_WritePhyUshort(sc, 0x00, 0x0077);
21016                 MP_WritePhyUshort(sc, 0x04, 0x7800);
21017                 MP_WritePhyUshort(sc, 0x04, 0x7000);
21018 
21019                 MP_WritePhyUshort(sc, 0x03, 0x802f);
21020                 MP_WritePhyUshort(sc, 0x02, 0x4f02);
21021                 MP_WritePhyUshort(sc, 0x01, 0x0409);
21022                 MP_WritePhyUshort(sc, 0x00, 0xf0f9);
21023                 MP_WritePhyUshort(sc, 0x04, 0x9800);
21024                 MP_WritePhyUshort(sc, 0x04, 0x9000);
21025 
21026                 MP_WritePhyUshort(sc, 0x03, 0xdf01);
21027                 MP_WritePhyUshort(sc, 0x02, 0xdf20);
21028                 MP_WritePhyUshort(sc, 0x01, 0xff95);
21029                 MP_WritePhyUshort(sc, 0x00, 0xba00);
21030                 MP_WritePhyUshort(sc, 0x04, 0xa800);
21031                 MP_WritePhyUshort(sc, 0x04, 0xa000);
21032 
21033                 MP_WritePhyUshort(sc, 0x03, 0xff41);
21034                 MP_WritePhyUshort(sc, 0x02, 0xdf20);
21035                 MP_WritePhyUshort(sc, 0x01, 0x0140);
21036                 MP_WritePhyUshort(sc, 0x00, 0x00bb);
21037                 MP_WritePhyUshort(sc, 0x04, 0xb800);
21038                 MP_WritePhyUshort(sc, 0x04, 0xb000);
21039 
21040                 MP_WritePhyUshort(sc, 0x03, 0xdf41);
21041                 MP_WritePhyUshort(sc, 0x02, 0xdc60);
21042                 MP_WritePhyUshort(sc, 0x01, 0x6340);
21043                 MP_WritePhyUshort(sc, 0x00, 0x007d);
21044                 MP_WritePhyUshort(sc, 0x04, 0xd800);
21045                 MP_WritePhyUshort(sc, 0x04, 0xd000);
21046 
21047                 MP_WritePhyUshort(sc, 0x03, 0xdf01);
21048                 MP_WritePhyUshort(sc, 0x02, 0xdf20);
21049                 MP_WritePhyUshort(sc, 0x01, 0x100a);
21050                 MP_WritePhyUshort(sc, 0x00, 0xa0ff);
21051                 MP_WritePhyUshort(sc, 0x04, 0xf800);
21052                 MP_WritePhyUshort(sc, 0x04, 0xf000);
21053 
21054                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
21055                 MP_WritePhyUshort(sc, 0x0b, 0x0000);
21056                 MP_WritePhyUshort(sc, 0x00, 0x9200);
21057 
21058                 CSR_WRITE_1(sc, 0x82, 0x0d);
21059         } else if (sc->re_type == MACFG_4) {
21060                 MP_WritePhyUshort(sc, 0x1f, 0x0002);
21061                 MP_WritePhyUshort(sc, 0x01, 0x90D0);
21062                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
21063                 // MP_WritePhyUshort(sc, 0x1e, 0x8c00); /* PHY link down with some Giga switch */
21064         } else if (sc->re_type == MACFG_5) {
21065                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
21066                 MP_WritePhyUshort(sc, 0x04, 0x0000);
21067                 MP_WritePhyUshort(sc, 0x03, 0x00a1);
21068                 MP_WritePhyUshort(sc, 0x02, 0x0008);
21069                 MP_WritePhyUshort(sc, 0x01, 0x0120);
21070                 MP_WritePhyUshort(sc, 0x00, 0x1000);
21071                 MP_WritePhyUshort(sc, 0x04, 0x0800);
21072 
21073                 MP_WritePhyUshort(sc, 0x04, 0x9000);
21074                 MP_WritePhyUshort(sc, 0x03, 0x802f);
21075                 MP_WritePhyUshort(sc, 0x02, 0x4f02);
21076                 MP_WritePhyUshort(sc, 0x01, 0x0409);
21077                 MP_WritePhyUshort(sc, 0x00, 0xf099);
21078                 MP_WritePhyUshort(sc, 0x04, 0x9800);
21079 
21080                 MP_WritePhyUshort(sc, 0x04, 0xa000);
21081                 MP_WritePhyUshort(sc, 0x03, 0xdf01);
21082                 MP_WritePhyUshort(sc, 0x02, 0xdf20);
21083                 MP_WritePhyUshort(sc, 0x01, 0xff95);
21084                 MP_WritePhyUshort(sc, 0x00, 0xba00);
21085                 MP_WritePhyUshort(sc, 0x04, 0xa800);
21086 
21087                 MP_WritePhyUshort(sc, 0x04, 0xf000);
21088                 MP_WritePhyUshort(sc, 0x03, 0xdf01);
21089                 MP_WritePhyUshort(sc, 0x02, 0xdf20);
21090                 MP_WritePhyUshort(sc, 0x01, 0x101a);
21091                 MP_WritePhyUshort(sc, 0x00, 0xa0ff);
21092                 MP_WritePhyUshort(sc, 0x04, 0xf800);
21093                 MP_WritePhyUshort(sc, 0x04, 0x0000);
21094                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
21095 
21096                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
21097                 MP_WritePhyUshort(sc, 0x10, 0xf41b);
21098                 MP_WritePhyUshort(sc, 0x14, 0xfb54);
21099                 MP_WritePhyUshort(sc, 0x18, 0xf5c7);
21100                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
21101 
21102                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
21103                 MP_WritePhyUshort(sc, 0x17, 0x0CC0);
21104                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
21105 
21106                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
21107                 MP_WritePhyUshort(sc, 0x10, 0xf01b);
21108 
21109         } else if (sc->re_type == MACFG_6) {
21110                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
21111                 MP_WritePhyUshort(sc, 0x04, 0x0000);
21112                 MP_WritePhyUshort(sc, 0x03, 0x00a1);
21113                 MP_WritePhyUshort(sc, 0x02, 0x0008);
21114                 MP_WritePhyUshort(sc, 0x01, 0x0120);
21115                 MP_WritePhyUshort(sc, 0x00, 0x1000);
21116                 MP_WritePhyUshort(sc, 0x04, 0x0800);
21117 
21118                 MP_WritePhyUshort(sc, 0x04, 0x9000);
21119                 MP_WritePhyUshort(sc, 0x03, 0x802f);
21120                 MP_WritePhyUshort(sc, 0x02, 0x4f02);
21121                 MP_WritePhyUshort(sc, 0x01, 0x0409);
21122                 MP_WritePhyUshort(sc, 0x00, 0xf099);
21123                 MP_WritePhyUshort(sc, 0x04, 0x9800);
21124 
21125                 MP_WritePhyUshort(sc, 0x04, 0xa000);
21126                 MP_WritePhyUshort(sc, 0x03, 0xdf01);
21127                 MP_WritePhyUshort(sc, 0x02, 0xdf20);
21128                 MP_WritePhyUshort(sc, 0x01, 0xff95);
21129                 MP_WritePhyUshort(sc, 0x00, 0xba00);
21130                 MP_WritePhyUshort(sc, 0x04, 0xa800);
21131 
21132                 MP_WritePhyUshort(sc, 0x04, 0xf000);
21133                 MP_WritePhyUshort(sc, 0x03, 0xdf01);
21134                 MP_WritePhyUshort(sc, 0x02, 0xdf20);
21135                 MP_WritePhyUshort(sc, 0x01, 0x101a);
21136                 MP_WritePhyUshort(sc, 0x00, 0xa0ff);
21137                 MP_WritePhyUshort(sc, 0x04, 0xf800);
21138                 MP_WritePhyUshort(sc, 0x04, 0x0000);
21139                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
21140 
21141                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
21142                 MP_WritePhyUshort(sc, 0x0b, 0x8480);
21143                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
21144 
21145                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
21146                 MP_WritePhyUshort(sc, 0x18, 0x67c7);
21147                 MP_WritePhyUshort(sc, 0x04, 0x2000);
21148                 MP_WritePhyUshort(sc, 0x03, 0x002f);
21149                 MP_WritePhyUshort(sc, 0x02, 0x4360);
21150                 MP_WritePhyUshort(sc, 0x01, 0x0109);
21151                 MP_WritePhyUshort(sc, 0x00, 0x3022);
21152                 MP_WritePhyUshort(sc, 0x04, 0x2800);
21153                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
21154 
21155                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
21156                 MP_WritePhyUshort(sc, 0x17, 0x0CC0);
21157         } else if (sc->re_type == MACFG_14) {
21158                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
21159                 MP_WritePhyUshort(sc, 0x11, MP_ReadPhyUshort(sc, 0x11) | 0x1000);
21160                 MP_WritePhyUshort(sc, 0x19, MP_ReadPhyUshort(sc, 0x19) | 0x2000);
21161                 MP_WritePhyUshort(sc, 0x10, MP_ReadPhyUshort(sc, 0x10) | 0x8000);
21162 
21163                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
21164                 MP_WritePhyUshort(sc, 0x08, 0x441D);
21165                 MP_WritePhyUshort(sc, 0x01, 0x9100);
21166         } else if (sc->re_type == MACFG_15) {
21167                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
21168                 MP_WritePhyUshort(sc, 0x11, MP_ReadPhyUshort(sc, 0x11) | 0x1000);
21169                 MP_WritePhyUshort(sc, 0x19, MP_ReadPhyUshort(sc, 0x19) | 0x2000);
21170                 MP_WritePhyUshort(sc, 0x10, MP_ReadPhyUshort(sc, 0x10) | 0x8000);
21171 
21172                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
21173                 MP_WritePhyUshort(sc, 0x08, 0x441D);
21174                 MP_WritePhyUshort(sc, 0x01, 0x9100);
21175         } else if (sc->re_type == MACFG_17) {
21176                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
21177                 MP_WritePhyUshort(sc, 0x11, MP_ReadPhyUshort(sc, 0x11) | 0x1000);
21178                 MP_WritePhyUshort(sc, 0x19, MP_ReadPhyUshort(sc, 0x19) | 0x2000);
21179                 MP_WritePhyUshort(sc, 0x10, MP_ReadPhyUshort(sc, 0x10) | 0x8000);
21180 
21181                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
21182                 MP_WritePhyUshort(sc, 0x08, 0x441D);
21183 
21184                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
21185         } else if (sc->re_type == MACFG_21) {
21186                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
21187                 MP_WritePhyUshort(sc, 0x0B, 0x94B0);
21188 
21189                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
21190                 MP_WritePhyUshort(sc, 0x12, 0x6096);
21191                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21192         } else if (sc->re_type == MACFG_22) {
21193                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
21194                 MP_WritePhyUshort(sc, 0x0B, 0x94B0);
21195 
21196                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
21197                 MP_WritePhyUshort(sc, 0x12, 0x6096);
21198         } else if (sc->re_type == MACFG_23) {
21199                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
21200                 MP_WritePhyUshort(sc, 0x0B, 0x94B0);
21201 
21202                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
21203                 MP_WritePhyUshort(sc, 0x12, 0x6096);
21204         } else if (sc->re_type == MACFG_24) {
21205                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
21206                 MP_WritePhyUshort(sc, 0x12, 0x2300);
21207                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21208                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
21209                 MP_WritePhyUshort(sc, 0x16, 0x000A);
21210                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21211 
21212                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
21213                 MP_WritePhyUshort(sc, 0x12, 0xC096);
21214                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21215 
21216                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21217                 MP_WritePhyUshort(sc, 0x00, 0x88DE);
21218                 MP_WritePhyUshort(sc, 0x01, 0x82B1);
21219                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21220 
21221                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21222                 MP_WritePhyUshort(sc, 0x08, 0x9E30);
21223                 MP_WritePhyUshort(sc, 0x09, 0x01F0);
21224                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21225 
21226                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21227                 MP_WritePhyUshort(sc, 0x0A, 0x5500);
21228                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21229 
21230                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21231                 MP_WritePhyUshort(sc, 0x03, 0x7002);
21232                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21233 
21234                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21235                 MP_WritePhyUshort(sc, 0x14, MP_ReadPhyUshort(sc, 0x14) | BIT_5);
21236                 MP_WritePhyUshort(sc, 0x0d, MP_ReadPhyUshort(sc, 0x0d) | BIT_5);
21237         } else if (sc->re_type == MACFG_25) {
21238                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
21239                 MP_WritePhyUshort(sc, 0x12, 0x2300);
21240                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
21241                 MP_WritePhyUshort(sc, 0x16, 0x0F0A);
21242                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21243 
21244                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21245                 MP_WritePhyUshort(sc, 0x00, 0x88DE);
21246                 MP_WritePhyUshort(sc, 0x01, 0x82B1);
21247                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21248 
21249                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21250                 MP_WritePhyUshort(sc, 0x0C, 0x7EB8);
21251                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21252 
21253                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21254                 MP_WritePhyUshort(sc, 0x06, 0x0761);
21255                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21256 
21257                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
21258                 MP_WritePhyUshort(sc, 0x03, 0x802F);
21259                 MP_WritePhyUshort(sc, 0x02, 0x4F02);
21260                 MP_WritePhyUshort(sc, 0x01, 0x0409);
21261                 MP_WritePhyUshort(sc, 0x00, 0xF099);
21262                 MP_WritePhyUshort(sc, 0x04, 0x9800);
21263                 MP_WritePhyUshort(sc, 0x04, 0x9000);
21264                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21265 
21266                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21267                 MP_WritePhyUshort(sc, 0x16, MP_ReadPhyUshort(sc, 0x16) | BIT_0);
21268 
21269                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21270                 MP_WritePhyUshort(sc, 0x14, MP_ReadPhyUshort(sc, 0x14) | BIT_5);
21271                 MP_WritePhyUshort(sc, 0x0D, MP_ReadPhyUshort(sc, 0x0D) & ~BIT_5);
21272 
21273                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
21274                 MP_WritePhyUshort(sc, 0x1D, 0x3D98);
21275                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21276 
21277                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
21278                 MP_WritePhyUshort(sc, 0x17, 0x0CC0);
21279                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21280         } else if (sc->re_type == MACFG_26) {
21281                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
21282                 MP_WritePhyUshort(sc, 0x12, 0x2300);
21283                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
21284                 MP_WritePhyUshort(sc, 0x16, 0x0F0A);
21285                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21286 
21287                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21288                 MP_WritePhyUshort(sc, 0x00, 0x88DE);
21289                 MP_WritePhyUshort(sc, 0x01, 0x82B1);
21290                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21291 
21292                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21293                 MP_WritePhyUshort(sc, 0x0C, 0x7EB8);
21294                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21295 
21296                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21297                 MP_WritePhyUshort(sc, 0x06, 0x5461);
21298                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21299 
21300                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21301                 MP_WritePhyUshort(sc, 0x06, 0x5461);
21302                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21303 
21304                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21305                 MP_WritePhyUshort(sc, 0x16, MP_ReadPhyUshort(sc, 0x16) | BIT_0);
21306 
21307                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21308                 MP_WritePhyUshort(sc, 0x14, MP_ReadPhyUshort(sc, 0x14) | BIT_5);
21309                 MP_WritePhyUshort(sc, 0x0D, MP_ReadPhyUshort(sc, 0x0D) & ~BIT_5);
21310 
21311                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
21312                 MP_WritePhyUshort(sc, 0x1D, 0x3D98);
21313                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21314 
21315                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
21316                 MP_WritePhyUshort(sc, 0x17, 0x0CC0);
21317                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21318         } else if (sc->re_type == MACFG_27) {
21319                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21320                 MP_WritePhyUshort(sc, 0x0d, MP_ReadPhyUshort(sc, 0x0d) | BIT_5);
21321                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21322 
21323                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
21324                 MP_WritePhyUshort(sc, 0x1D, 0x3D98);
21325                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21326 
21327                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
21328                 MP_WritePhyUshort(sc, 0x14, 0xCAA3);
21329                 MP_WritePhyUshort(sc, 0x1C, 0x000A);
21330                 MP_WritePhyUshort(sc, 0x18, 0x65D0);
21331 
21332                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
21333                 MP_WritePhyUshort(sc, 0x17, 0xB580);
21334                 MP_WritePhyUshort(sc, 0x18, 0xFF54);
21335                 MP_WritePhyUshort(sc, 0x19, 0x3954);
21336 
21337                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21338                 MP_WritePhyUshort(sc, 0x0D, 0x310C);
21339                 MP_WritePhyUshort(sc, 0x0E, 0x310C);
21340                 MP_WritePhyUshort(sc, 0x0F, 0x311C);
21341                 MP_WritePhyUshort(sc, 0x06, 0x0761);
21342 
21343                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
21344                 MP_WritePhyUshort(sc, 0x18, 0xFF55);
21345                 MP_WritePhyUshort(sc, 0x19, 0x3955);
21346                 MP_WritePhyUshort(sc, 0x18, 0xFF54);
21347                 MP_WritePhyUshort(sc, 0x19, 0x3954);
21348 
21349                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
21350                 MP_WritePhyUshort(sc, 0x17, 0x0CC0);
21351         } else if (sc->re_type == MACFG_28) {
21352                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21353                 MP_WritePhyUshort(sc, 0x14, MP_ReadPhyUshort(sc, 0x14) | BIT_5);
21354                 MP_WritePhyUshort(sc, 0x0d, MP_ReadPhyUshort(sc, 0x0d) | BIT_5);
21355 
21356                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
21357                 MP_WritePhyUshort(sc, 0x14, 0xCAA3);
21358                 MP_WritePhyUshort(sc, 0x1C, 0x000A);
21359                 MP_WritePhyUshort(sc, 0x18, 0x65D0);
21360 
21361                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
21362                 MP_WritePhyUshort(sc, 0x17, 0xB580);
21363                 MP_WritePhyUshort(sc, 0x18, 0xFF54);
21364                 MP_WritePhyUshort(sc, 0x19, 0x3954);
21365 
21366                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21367                 MP_WritePhyUshort(sc, 0x0D, 0x310C);
21368                 MP_WritePhyUshort(sc, 0x0E, 0x310C);
21369                 MP_WritePhyUshort(sc, 0x0F, 0x311C);
21370                 MP_WritePhyUshort(sc, 0x06, 0x0761);
21371 
21372                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
21373                 MP_WritePhyUshort(sc, 0x18, 0xFF55);
21374                 MP_WritePhyUshort(sc, 0x19, 0x3955);
21375                 MP_WritePhyUshort(sc, 0x18, 0xFF54);
21376                 MP_WritePhyUshort(sc, 0x19, 0x3954);
21377 
21378                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
21379                 MP_WritePhyUshort(sc, 0x17, 0x0CC0);
21380 
21381                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21382                 MP_WritePhyUshort(sc, 0x16, MP_ReadPhyUshort(sc, 0x16) | BIT_0);
21383                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21384         } else if (sc->re_type == MACFG_31) {
21385                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
21386                 MP_WritePhyUshort(sc, 0x06, 0x4064);
21387                 MP_WritePhyUshort(sc, 0x07, 0x2863);
21388                 MP_WritePhyUshort(sc, 0x08, 0x059C);
21389                 MP_WritePhyUshort(sc, 0x09, 0x26B4);
21390                 MP_WritePhyUshort(sc, 0x0A, 0x6A19);
21391                 MP_WritePhyUshort(sc, 0x0B, 0xDCC8);
21392                 MP_WritePhyUshort(sc, 0x10, 0xF06D);
21393                 MP_WritePhyUshort(sc, 0x14, 0x7F68);
21394                 MP_WritePhyUshort(sc, 0x18, 0x7FD9);
21395                 MP_WritePhyUshort(sc, 0x1C, 0xF0FF);
21396                 MP_WritePhyUshort(sc, 0x1D, 0x3D9C);
21397                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
21398                 MP_WritePhyUshort(sc, 0x12, 0xF49F);
21399                 MP_WritePhyUshort(sc, 0x13, 0x070B);
21400                 MP_WritePhyUshort(sc, 0x1A, 0x05AD);
21401                 MP_WritePhyUshort(sc, 0x14, 0x94C0);
21402 
21403                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21404                 Data = MP_ReadPhyUshort(sc, 0x0B) & 0xFF00;
21405                 Data |= 0x10;
21406                 MP_WritePhyUshort(sc, 0x0B, Data);
21407                 Data = MP_ReadPhyUshort(sc, 0x0C) & 0x00FF;
21408                 Data |= 0xA200;
21409                 MP_WritePhyUshort(sc, 0x0C, Data);
21410 
21411                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21412                 MP_WritePhyUshort(sc, 0x06, 0x5561);
21413                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
21414                 MP_WritePhyUshort(sc, 0x05, 0x8332);
21415                 MP_WritePhyUshort(sc, 0x06, 0x5561);
21416 
21417                 if (MP_ReadEfuse(sc, 0x01) == 0xb1) {
21418                         MP_WritePhyUshort(sc, 0x1F, 0x0002);
21419                         MP_WritePhyUshort(sc, 0x05, 0x669A);
21420                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
21421                         MP_WritePhyUshort(sc, 0x05, 0x8330);
21422                         MP_WritePhyUshort(sc, 0x06, 0x669A);
21423 
21424                         MP_WritePhyUshort(sc, 0x1F, 0x0002);
21425                         Data = MP_ReadPhyUshort(sc, 0x0D);
21426                         if ((Data & 0x00FF) != 0x006C) {
21427                                 Data &= 0xFF00;
21428                                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21429                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0065);
21430                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0066);
21431                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0067);
21432                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0068);
21433                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0069);
21434                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x006A);
21435                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x006B);
21436                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x006C);
21437                         }
21438                 } else {
21439                         MP_WritePhyUshort(sc, 0x1F, 0x0002);
21440                         MP_WritePhyUshort(sc, 0x05, 0x6662);
21441                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
21442                         MP_WritePhyUshort(sc, 0x05, 0x8330);
21443                         MP_WritePhyUshort(sc, 0x06, 0x6662);
21444                 }
21445 
21446                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21447                 Data = MP_ReadPhyUshort(sc, 0x0D);
21448                 Data |= 0x300;
21449                 MP_WritePhyUshort(sc, 0x0D, Data);
21450                 Data = MP_ReadPhyUshort(sc, 0x0F);
21451                 Data |= 0x10;
21452                 MP_WritePhyUshort(sc, 0x0F, Data);
21453 
21454                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21455                 Data = MP_ReadPhyUshort(sc, 0x02);
21456                 Data &= ~0x600;
21457                 Data |= 0x100;
21458                 MP_WritePhyUshort(sc, 0x02, Data);
21459                 Data = MP_ReadPhyUshort(sc, 0x03);
21460                 Data &= ~0xE000;
21461                 MP_WritePhyUshort(sc, 0x03, Data);
21462 
21463                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
21464                 MP_WritePhyUshort(sc, 0x17, 0x0CC0);
21465 
21466                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
21467                 MP_WritePhyUshort(sc, 0x05, 0x001B);
21468                 if (MP_ReadPhyUshort(sc, 0x06) == 0xBF00) {
21469                         MP_WritePhyUshort(sc, 0x1f, 0x0005);
21470                         MP_WritePhyUshort(sc, 0x05, 0xfff6);
21471                         MP_WritePhyUshort(sc, 0x06, 0x0080);
21472                         MP_WritePhyUshort(sc, 0x05, 0x8000);
21473                         MP_WritePhyUshort(sc, 0x06, 0xf8f9);
21474                         MP_WritePhyUshort(sc, 0x06, 0xfaef);
21475                         MP_WritePhyUshort(sc, 0x06, 0x59ee);
21476                         MP_WritePhyUshort(sc, 0x06, 0xf8ea);
21477                         MP_WritePhyUshort(sc, 0x06, 0x00ee);
21478                         MP_WritePhyUshort(sc, 0x06, 0xf8eb);
21479                         MP_WritePhyUshort(sc, 0x06, 0x00e0);
21480                         MP_WritePhyUshort(sc, 0x06, 0xf87c);
21481                         MP_WritePhyUshort(sc, 0x06, 0xe1f8);
21482                         MP_WritePhyUshort(sc, 0x06, 0x7d59);
21483                         MP_WritePhyUshort(sc, 0x06, 0x0fef);
21484                         MP_WritePhyUshort(sc, 0x06, 0x0139);
21485                         MP_WritePhyUshort(sc, 0x06, 0x029e);
21486                         MP_WritePhyUshort(sc, 0x06, 0x06ef);
21487                         MP_WritePhyUshort(sc, 0x06, 0x1039);
21488                         MP_WritePhyUshort(sc, 0x06, 0x089f);
21489                         MP_WritePhyUshort(sc, 0x06, 0x2aee);
21490                         MP_WritePhyUshort(sc, 0x06, 0xf8ea);
21491                         MP_WritePhyUshort(sc, 0x06, 0x00ee);
21492                         MP_WritePhyUshort(sc, 0x06, 0xf8eb);
21493                         MP_WritePhyUshort(sc, 0x06, 0x01e0);
21494                         MP_WritePhyUshort(sc, 0x06, 0xf87c);
21495                         MP_WritePhyUshort(sc, 0x06, 0xe1f8);
21496                         MP_WritePhyUshort(sc, 0x06, 0x7d58);
21497                         MP_WritePhyUshort(sc, 0x06, 0x409e);
21498                         MP_WritePhyUshort(sc, 0x06, 0x0f39);
21499                         MP_WritePhyUshort(sc, 0x06, 0x46aa);
21500                         MP_WritePhyUshort(sc, 0x06, 0x0bbf);
21501                         MP_WritePhyUshort(sc, 0x06, 0x8290);
21502                         MP_WritePhyUshort(sc, 0x06, 0xd682);
21503                         MP_WritePhyUshort(sc, 0x06, 0x9802);
21504                         MP_WritePhyUshort(sc, 0x06, 0x014f);
21505                         MP_WritePhyUshort(sc, 0x06, 0xae09);
21506                         MP_WritePhyUshort(sc, 0x06, 0xbf82);
21507                         MP_WritePhyUshort(sc, 0x06, 0x98d6);
21508                         MP_WritePhyUshort(sc, 0x06, 0x82a0);
21509                         MP_WritePhyUshort(sc, 0x06, 0x0201);
21510                         MP_WritePhyUshort(sc, 0x06, 0x4fef);
21511                         MP_WritePhyUshort(sc, 0x06, 0x95fe);
21512                         MP_WritePhyUshort(sc, 0x06, 0xfdfc);
21513                         MP_WritePhyUshort(sc, 0x06, 0x05f8);
21514                         MP_WritePhyUshort(sc, 0x06, 0xf9fa);
21515                         MP_WritePhyUshort(sc, 0x06, 0xeef8);
21516                         MP_WritePhyUshort(sc, 0x06, 0xea00);
21517                         MP_WritePhyUshort(sc, 0x06, 0xeef8);
21518                         MP_WritePhyUshort(sc, 0x06, 0xeb00);
21519                         MP_WritePhyUshort(sc, 0x06, 0xe2f8);
21520                         MP_WritePhyUshort(sc, 0x06, 0x7ce3);
21521                         MP_WritePhyUshort(sc, 0x06, 0xf87d);
21522                         MP_WritePhyUshort(sc, 0x06, 0xa511);
21523                         MP_WritePhyUshort(sc, 0x06, 0x1112);
21524                         MP_WritePhyUshort(sc, 0x06, 0xd240);
21525                         MP_WritePhyUshort(sc, 0x06, 0xd644);
21526                         MP_WritePhyUshort(sc, 0x06, 0x4402);
21527                         MP_WritePhyUshort(sc, 0x06, 0x8217);
21528                         MP_WritePhyUshort(sc, 0x06, 0xd2a0);
21529                         MP_WritePhyUshort(sc, 0x06, 0xd6aa);
21530                         MP_WritePhyUshort(sc, 0x06, 0xaa02);
21531                         MP_WritePhyUshort(sc, 0x06, 0x8217);
21532                         MP_WritePhyUshort(sc, 0x06, 0xae0f);
21533                         MP_WritePhyUshort(sc, 0x06, 0xa544);
21534                         MP_WritePhyUshort(sc, 0x06, 0x4402);
21535                         MP_WritePhyUshort(sc, 0x06, 0xae4d);
21536                         MP_WritePhyUshort(sc, 0x06, 0xa5aa);
21537                         MP_WritePhyUshort(sc, 0x06, 0xaa02);
21538                         MP_WritePhyUshort(sc, 0x06, 0xae47);
21539                         MP_WritePhyUshort(sc, 0x06, 0xaf82);
21540                         MP_WritePhyUshort(sc, 0x06, 0x13ee);
21541                         MP_WritePhyUshort(sc, 0x06, 0x834e);
21542                         MP_WritePhyUshort(sc, 0x06, 0x00ee);
21543                         MP_WritePhyUshort(sc, 0x06, 0x834d);
21544                         MP_WritePhyUshort(sc, 0x06, 0x0fee);
21545                         MP_WritePhyUshort(sc, 0x06, 0x834c);
21546                         MP_WritePhyUshort(sc, 0x06, 0x0fee);
21547                         MP_WritePhyUshort(sc, 0x06, 0x834f);
21548                         MP_WritePhyUshort(sc, 0x06, 0x00ee);
21549                         MP_WritePhyUshort(sc, 0x06, 0x8351);
21550                         MP_WritePhyUshort(sc, 0x06, 0x00ee);
21551                         MP_WritePhyUshort(sc, 0x06, 0x834a);
21552                         MP_WritePhyUshort(sc, 0x06, 0xffee);
21553                         MP_WritePhyUshort(sc, 0x06, 0x834b);
21554                         MP_WritePhyUshort(sc, 0x06, 0xffe0);
21555                         MP_WritePhyUshort(sc, 0x06, 0x8330);
21556                         MP_WritePhyUshort(sc, 0x06, 0xe183);
21557                         MP_WritePhyUshort(sc, 0x06, 0x3158);
21558                         MP_WritePhyUshort(sc, 0x06, 0xfee4);
21559                         MP_WritePhyUshort(sc, 0x06, 0xf88a);
21560                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
21561                         MP_WritePhyUshort(sc, 0x06, 0x8be0);
21562                         MP_WritePhyUshort(sc, 0x06, 0x8332);
21563                         MP_WritePhyUshort(sc, 0x06, 0xe183);
21564                         MP_WritePhyUshort(sc, 0x06, 0x3359);
21565                         MP_WritePhyUshort(sc, 0x06, 0x0fe2);
21566                         MP_WritePhyUshort(sc, 0x06, 0x834d);
21567                         MP_WritePhyUshort(sc, 0x06, 0x0c24);
21568                         MP_WritePhyUshort(sc, 0x06, 0x5af0);
21569                         MP_WritePhyUshort(sc, 0x06, 0x1e12);
21570                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
21571                         MP_WritePhyUshort(sc, 0x06, 0x8ce5);
21572                         MP_WritePhyUshort(sc, 0x06, 0xf88d);
21573                         MP_WritePhyUshort(sc, 0x06, 0xaf82);
21574                         MP_WritePhyUshort(sc, 0x06, 0x13e0);
21575                         MP_WritePhyUshort(sc, 0x06, 0x834f);
21576                         MP_WritePhyUshort(sc, 0x06, 0x10e4);
21577                         MP_WritePhyUshort(sc, 0x06, 0x834f);
21578                         MP_WritePhyUshort(sc, 0x06, 0xe083);
21579                         MP_WritePhyUshort(sc, 0x06, 0x4e78);
21580                         MP_WritePhyUshort(sc, 0x06, 0x009f);
21581                         MP_WritePhyUshort(sc, 0x06, 0x0ae0);
21582                         MP_WritePhyUshort(sc, 0x06, 0x834f);
21583                         MP_WritePhyUshort(sc, 0x06, 0xa010);
21584                         MP_WritePhyUshort(sc, 0x06, 0xa5ee);
21585                         MP_WritePhyUshort(sc, 0x06, 0x834e);
21586                         MP_WritePhyUshort(sc, 0x06, 0x01e0);
21587                         MP_WritePhyUshort(sc, 0x06, 0x834e);
21588                         MP_WritePhyUshort(sc, 0x06, 0x7805);
21589                         MP_WritePhyUshort(sc, 0x06, 0x9e9a);
21590                         MP_WritePhyUshort(sc, 0x06, 0xe083);
21591                         MP_WritePhyUshort(sc, 0x06, 0x4e78);
21592                         MP_WritePhyUshort(sc, 0x06, 0x049e);
21593                         MP_WritePhyUshort(sc, 0x06, 0x10e0);
21594                         MP_WritePhyUshort(sc, 0x06, 0x834e);
21595                         MP_WritePhyUshort(sc, 0x06, 0x7803);
21596                         MP_WritePhyUshort(sc, 0x06, 0x9e0f);
21597                         MP_WritePhyUshort(sc, 0x06, 0xe083);
21598                         MP_WritePhyUshort(sc, 0x06, 0x4e78);
21599                         MP_WritePhyUshort(sc, 0x06, 0x019e);
21600                         MP_WritePhyUshort(sc, 0x06, 0x05ae);
21601                         MP_WritePhyUshort(sc, 0x06, 0x0caf);
21602                         MP_WritePhyUshort(sc, 0x06, 0x81f8);
21603                         MP_WritePhyUshort(sc, 0x06, 0xaf81);
21604                         MP_WritePhyUshort(sc, 0x06, 0xa3af);
21605                         MP_WritePhyUshort(sc, 0x06, 0x81dc);
21606                         MP_WritePhyUshort(sc, 0x06, 0xaf82);
21607                         MP_WritePhyUshort(sc, 0x06, 0x13ee);
21608                         MP_WritePhyUshort(sc, 0x06, 0x8348);
21609                         MP_WritePhyUshort(sc, 0x06, 0x00ee);
21610                         MP_WritePhyUshort(sc, 0x06, 0x8349);
21611                         MP_WritePhyUshort(sc, 0x06, 0x00e0);
21612                         MP_WritePhyUshort(sc, 0x06, 0x8351);
21613                         MP_WritePhyUshort(sc, 0x06, 0x10e4);
21614                         MP_WritePhyUshort(sc, 0x06, 0x8351);
21615                         MP_WritePhyUshort(sc, 0x06, 0x5801);
21616                         MP_WritePhyUshort(sc, 0x06, 0x9fea);
21617                         MP_WritePhyUshort(sc, 0x06, 0xd000);
21618                         MP_WritePhyUshort(sc, 0x06, 0xd180);
21619                         MP_WritePhyUshort(sc, 0x06, 0x1f66);
21620                         MP_WritePhyUshort(sc, 0x06, 0xe2f8);
21621                         MP_WritePhyUshort(sc, 0x06, 0xeae3);
21622                         MP_WritePhyUshort(sc, 0x06, 0xf8eb);
21623                         MP_WritePhyUshort(sc, 0x06, 0x5af8);
21624                         MP_WritePhyUshort(sc, 0x06, 0x1e20);
21625                         MP_WritePhyUshort(sc, 0x06, 0xe6f8);
21626                         MP_WritePhyUshort(sc, 0x06, 0xeae5);
21627                         MP_WritePhyUshort(sc, 0x06, 0xf8eb);
21628                         MP_WritePhyUshort(sc, 0x06, 0xd302);
21629                         MP_WritePhyUshort(sc, 0x06, 0xb3fe);
21630                         MP_WritePhyUshort(sc, 0x06, 0xe2f8);
21631                         MP_WritePhyUshort(sc, 0x06, 0x7cef);
21632                         MP_WritePhyUshort(sc, 0x06, 0x325b);
21633                         MP_WritePhyUshort(sc, 0x06, 0x80e3);
21634                         MP_WritePhyUshort(sc, 0x06, 0xf87d);
21635                         MP_WritePhyUshort(sc, 0x06, 0x9e03);
21636                         MP_WritePhyUshort(sc, 0x06, 0x7dff);
21637                         MP_WritePhyUshort(sc, 0x06, 0xff0d);
21638                         MP_WritePhyUshort(sc, 0x06, 0x581c);
21639                         MP_WritePhyUshort(sc, 0x06, 0x551a);
21640                         MP_WritePhyUshort(sc, 0x06, 0x6511);
21641                         MP_WritePhyUshort(sc, 0x06, 0xa190);
21642                         MP_WritePhyUshort(sc, 0x06, 0xd3e2);
21643                         MP_WritePhyUshort(sc, 0x06, 0x8348);
21644                         MP_WritePhyUshort(sc, 0x06, 0xe383);
21645                         MP_WritePhyUshort(sc, 0x06, 0x491b);
21646                         MP_WritePhyUshort(sc, 0x06, 0x56ab);
21647                         MP_WritePhyUshort(sc, 0x06, 0x08ef);
21648                         MP_WritePhyUshort(sc, 0x06, 0x56e6);
21649                         MP_WritePhyUshort(sc, 0x06, 0x8348);
21650                         MP_WritePhyUshort(sc, 0x06, 0xe783);
21651                         MP_WritePhyUshort(sc, 0x06, 0x4910);
21652                         MP_WritePhyUshort(sc, 0x06, 0xd180);
21653                         MP_WritePhyUshort(sc, 0x06, 0x1f66);
21654                         MP_WritePhyUshort(sc, 0x06, 0xa004);
21655                         MP_WritePhyUshort(sc, 0x06, 0xb9e2);
21656                         MP_WritePhyUshort(sc, 0x06, 0x8348);
21657                         MP_WritePhyUshort(sc, 0x06, 0xe383);
21658                         MP_WritePhyUshort(sc, 0x06, 0x49ef);
21659                         MP_WritePhyUshort(sc, 0x06, 0x65e2);
21660                         MP_WritePhyUshort(sc, 0x06, 0x834a);
21661                         MP_WritePhyUshort(sc, 0x06, 0xe383);
21662                         MP_WritePhyUshort(sc, 0x06, 0x4b1b);
21663                         MP_WritePhyUshort(sc, 0x06, 0x56aa);
21664                         MP_WritePhyUshort(sc, 0x06, 0x0eef);
21665                         MP_WritePhyUshort(sc, 0x06, 0x56e6);
21666                         MP_WritePhyUshort(sc, 0x06, 0x834a);
21667                         MP_WritePhyUshort(sc, 0x06, 0xe783);
21668                         MP_WritePhyUshort(sc, 0x06, 0x4be2);
21669                         MP_WritePhyUshort(sc, 0x06, 0x834d);
21670                         MP_WritePhyUshort(sc, 0x06, 0xe683);
21671                         MP_WritePhyUshort(sc, 0x06, 0x4ce0);
21672                         MP_WritePhyUshort(sc, 0x06, 0x834d);
21673                         MP_WritePhyUshort(sc, 0x06, 0xa000);
21674                         MP_WritePhyUshort(sc, 0x06, 0x0caf);
21675                         MP_WritePhyUshort(sc, 0x06, 0x81dc);
21676                         MP_WritePhyUshort(sc, 0x06, 0xe083);
21677                         MP_WritePhyUshort(sc, 0x06, 0x4d10);
21678                         MP_WritePhyUshort(sc, 0x06, 0xe483);
21679                         MP_WritePhyUshort(sc, 0x06, 0x4dae);
21680                         MP_WritePhyUshort(sc, 0x06, 0x0480);
21681                         MP_WritePhyUshort(sc, 0x06, 0xe483);
21682                         MP_WritePhyUshort(sc, 0x06, 0x4de0);
21683                         MP_WritePhyUshort(sc, 0x06, 0x834e);
21684                         MP_WritePhyUshort(sc, 0x06, 0x7803);
21685                         MP_WritePhyUshort(sc, 0x06, 0x9e0b);
21686                         MP_WritePhyUshort(sc, 0x06, 0xe083);
21687                         MP_WritePhyUshort(sc, 0x06, 0x4e78);
21688                         MP_WritePhyUshort(sc, 0x06, 0x049e);
21689                         MP_WritePhyUshort(sc, 0x06, 0x04ee);
21690                         MP_WritePhyUshort(sc, 0x06, 0x834e);
21691                         MP_WritePhyUshort(sc, 0x06, 0x02e0);
21692                         MP_WritePhyUshort(sc, 0x06, 0x8332);
21693                         MP_WritePhyUshort(sc, 0x06, 0xe183);
21694                         MP_WritePhyUshort(sc, 0x06, 0x3359);
21695                         MP_WritePhyUshort(sc, 0x06, 0x0fe2);
21696                         MP_WritePhyUshort(sc, 0x06, 0x834d);
21697                         MP_WritePhyUshort(sc, 0x06, 0x0c24);
21698                         MP_WritePhyUshort(sc, 0x06, 0x5af0);
21699                         MP_WritePhyUshort(sc, 0x06, 0x1e12);
21700                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
21701                         MP_WritePhyUshort(sc, 0x06, 0x8ce5);
21702                         MP_WritePhyUshort(sc, 0x06, 0xf88d);
21703                         MP_WritePhyUshort(sc, 0x06, 0xe083);
21704                         MP_WritePhyUshort(sc, 0x06, 0x30e1);
21705                         MP_WritePhyUshort(sc, 0x06, 0x8331);
21706                         MP_WritePhyUshort(sc, 0x06, 0x6801);
21707                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
21708                         MP_WritePhyUshort(sc, 0x06, 0x8ae5);
21709                         MP_WritePhyUshort(sc, 0x06, 0xf88b);
21710                         MP_WritePhyUshort(sc, 0x06, 0xae37);
21711                         MP_WritePhyUshort(sc, 0x06, 0xee83);
21712                         MP_WritePhyUshort(sc, 0x06, 0x4e03);
21713                         MP_WritePhyUshort(sc, 0x06, 0xe083);
21714                         MP_WritePhyUshort(sc, 0x06, 0x4ce1);
21715                         MP_WritePhyUshort(sc, 0x06, 0x834d);
21716                         MP_WritePhyUshort(sc, 0x06, 0x1b01);
21717                         MP_WritePhyUshort(sc, 0x06, 0x9e04);
21718                         MP_WritePhyUshort(sc, 0x06, 0xaaa1);
21719                         MP_WritePhyUshort(sc, 0x06, 0xaea8);
21720                         MP_WritePhyUshort(sc, 0x06, 0xee83);
21721                         MP_WritePhyUshort(sc, 0x06, 0x4e04);
21722                         MP_WritePhyUshort(sc, 0x06, 0xee83);
21723                         MP_WritePhyUshort(sc, 0x06, 0x4f00);
21724                         MP_WritePhyUshort(sc, 0x06, 0xaeab);
21725                         MP_WritePhyUshort(sc, 0x06, 0xe083);
21726                         MP_WritePhyUshort(sc, 0x06, 0x4f78);
21727                         MP_WritePhyUshort(sc, 0x06, 0x039f);
21728                         MP_WritePhyUshort(sc, 0x06, 0x14ee);
21729                         MP_WritePhyUshort(sc, 0x06, 0x834e);
21730                         MP_WritePhyUshort(sc, 0x06, 0x05d2);
21731                         MP_WritePhyUshort(sc, 0x06, 0x40d6);
21732                         MP_WritePhyUshort(sc, 0x06, 0x5554);
21733                         MP_WritePhyUshort(sc, 0x06, 0x0282);
21734                         MP_WritePhyUshort(sc, 0x06, 0x17d2);
21735                         MP_WritePhyUshort(sc, 0x06, 0xa0d6);
21736                         MP_WritePhyUshort(sc, 0x06, 0xba00);
21737                         MP_WritePhyUshort(sc, 0x06, 0x0282);
21738                         MP_WritePhyUshort(sc, 0x06, 0x17fe);
21739                         MP_WritePhyUshort(sc, 0x06, 0xfdfc);
21740                         MP_WritePhyUshort(sc, 0x06, 0x05f8);
21741                         MP_WritePhyUshort(sc, 0x06, 0xe0f8);
21742                         MP_WritePhyUshort(sc, 0x06, 0x60e1);
21743                         MP_WritePhyUshort(sc, 0x06, 0xf861);
21744                         MP_WritePhyUshort(sc, 0x06, 0x6802);
21745                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
21746                         MP_WritePhyUshort(sc, 0x06, 0x60e5);
21747                         MP_WritePhyUshort(sc, 0x06, 0xf861);
21748                         MP_WritePhyUshort(sc, 0x06, 0xe0f8);
21749                         MP_WritePhyUshort(sc, 0x06, 0x48e1);
21750                         MP_WritePhyUshort(sc, 0x06, 0xf849);
21751                         MP_WritePhyUshort(sc, 0x06, 0x580f);
21752                         MP_WritePhyUshort(sc, 0x06, 0x1e02);
21753                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
21754                         MP_WritePhyUshort(sc, 0x06, 0x48e5);
21755                         MP_WritePhyUshort(sc, 0x06, 0xf849);
21756                         MP_WritePhyUshort(sc, 0x06, 0xd000);
21757                         MP_WritePhyUshort(sc, 0x06, 0x0282);
21758                         MP_WritePhyUshort(sc, 0x06, 0x5bbf);
21759                         MP_WritePhyUshort(sc, 0x06, 0x8350);
21760                         MP_WritePhyUshort(sc, 0x06, 0xef46);
21761                         MP_WritePhyUshort(sc, 0x06, 0xdc19);
21762                         MP_WritePhyUshort(sc, 0x06, 0xddd0);
21763                         MP_WritePhyUshort(sc, 0x06, 0x0102);
21764                         MP_WritePhyUshort(sc, 0x06, 0x825b);
21765                         MP_WritePhyUshort(sc, 0x06, 0x0282);
21766                         MP_WritePhyUshort(sc, 0x06, 0x77e0);
21767                         MP_WritePhyUshort(sc, 0x06, 0xf860);
21768                         MP_WritePhyUshort(sc, 0x06, 0xe1f8);
21769                         MP_WritePhyUshort(sc, 0x06, 0x6158);
21770                         MP_WritePhyUshort(sc, 0x06, 0xfde4);
21771                         MP_WritePhyUshort(sc, 0x06, 0xf860);
21772                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
21773                         MP_WritePhyUshort(sc, 0x06, 0x61fc);
21774                         MP_WritePhyUshort(sc, 0x06, 0x04f9);
21775                         MP_WritePhyUshort(sc, 0x06, 0xfafb);
21776                         MP_WritePhyUshort(sc, 0x06, 0xc6bf);
21777                         MP_WritePhyUshort(sc, 0x06, 0xf840);
21778                         MP_WritePhyUshort(sc, 0x06, 0xbe83);
21779                         MP_WritePhyUshort(sc, 0x06, 0x50a0);
21780                         MP_WritePhyUshort(sc, 0x06, 0x0101);
21781                         MP_WritePhyUshort(sc, 0x06, 0x071b);
21782                         MP_WritePhyUshort(sc, 0x06, 0x89cf);
21783                         MP_WritePhyUshort(sc, 0x06, 0xd208);
21784                         MP_WritePhyUshort(sc, 0x06, 0xebdb);
21785                         MP_WritePhyUshort(sc, 0x06, 0x19b2);
21786                         MP_WritePhyUshort(sc, 0x06, 0xfbff);
21787                         MP_WritePhyUshort(sc, 0x06, 0xfefd);
21788                         MP_WritePhyUshort(sc, 0x06, 0x04f8);
21789                         MP_WritePhyUshort(sc, 0x06, 0xe0f8);
21790                         MP_WritePhyUshort(sc, 0x06, 0x48e1);
21791                         MP_WritePhyUshort(sc, 0x06, 0xf849);
21792                         MP_WritePhyUshort(sc, 0x06, 0x6808);
21793                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
21794                         MP_WritePhyUshort(sc, 0x06, 0x48e5);
21795                         MP_WritePhyUshort(sc, 0x06, 0xf849);
21796                         MP_WritePhyUshort(sc, 0x06, 0x58f7);
21797                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
21798                         MP_WritePhyUshort(sc, 0x06, 0x48e5);
21799                         MP_WritePhyUshort(sc, 0x06, 0xf849);
21800                         MP_WritePhyUshort(sc, 0x06, 0xfc04);
21801                         MP_WritePhyUshort(sc, 0x06, 0x4d20);
21802                         MP_WritePhyUshort(sc, 0x06, 0x0002);
21803                         MP_WritePhyUshort(sc, 0x06, 0x4e22);
21804                         MP_WritePhyUshort(sc, 0x06, 0x0002);
21805                         MP_WritePhyUshort(sc, 0x06, 0x4ddf);
21806                         MP_WritePhyUshort(sc, 0x06, 0xff01);
21807                         MP_WritePhyUshort(sc, 0x06, 0x4edd);
21808                         MP_WritePhyUshort(sc, 0x06, 0xff01);
21809                         MP_WritePhyUshort(sc, 0x06, 0xf8fa);
21810                         MP_WritePhyUshort(sc, 0x06, 0xfbef);
21811                         MP_WritePhyUshort(sc, 0x06, 0x79bf);
21812                         MP_WritePhyUshort(sc, 0x06, 0xf822);
21813                         MP_WritePhyUshort(sc, 0x06, 0xd819);
21814                         MP_WritePhyUshort(sc, 0x06, 0xd958);
21815                         MP_WritePhyUshort(sc, 0x06, 0x849f);
21816                         MP_WritePhyUshort(sc, 0x06, 0x09bf);
21817                         MP_WritePhyUshort(sc, 0x06, 0x82be);
21818                         MP_WritePhyUshort(sc, 0x06, 0xd682);
21819                         MP_WritePhyUshort(sc, 0x06, 0xc602);
21820                         MP_WritePhyUshort(sc, 0x06, 0x014f);
21821                         MP_WritePhyUshort(sc, 0x06, 0xef97);
21822                         MP_WritePhyUshort(sc, 0x06, 0xfffe);
21823                         MP_WritePhyUshort(sc, 0x06, 0xfc05);
21824                         MP_WritePhyUshort(sc, 0x06, 0x17ff);
21825                         MP_WritePhyUshort(sc, 0x06, 0xfe01);
21826                         MP_WritePhyUshort(sc, 0x06, 0x1700);
21827                         MP_WritePhyUshort(sc, 0x06, 0x0102);
21828                         MP_WritePhyUshort(sc, 0x05, 0x83d8);
21829                         MP_WritePhyUshort(sc, 0x06, 0x8051);
21830                         MP_WritePhyUshort(sc, 0x05, 0x83d6);
21831                         MP_WritePhyUshort(sc, 0x06, 0x82a0);
21832                         MP_WritePhyUshort(sc, 0x05, 0x83d4);
21833                         MP_WritePhyUshort(sc, 0x06, 0x8000);
21834                         MP_WritePhyUshort(sc, 0x02, 0x2010);
21835                         MP_WritePhyUshort(sc, 0x03, 0xdc00);
21836                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
21837                         MP_WritePhyUshort(sc, 0x0b, 0x0600);
21838                         MP_WritePhyUshort(sc, 0x1f, 0x0005);
21839                         MP_WritePhyUshort(sc, 0x05, 0xfff6);
21840                         MP_WritePhyUshort(sc, 0x06, 0x00fc);
21841                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
21842                 }
21843 
21844                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21845                 MP_WritePhyUshort(sc, 0x0D, 0xF880);
21846                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21847         } else if (sc->re_type == MACFG_32) {
21848                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
21849                 MP_WritePhyUshort(sc, 0x06, 0x4064);
21850                 MP_WritePhyUshort(sc, 0x07, 0x2863);
21851                 MP_WritePhyUshort(sc, 0x08, 0x059C);
21852                 MP_WritePhyUshort(sc, 0x09, 0x26B4);
21853                 MP_WritePhyUshort(sc, 0x0A, 0x6A19);
21854                 MP_WritePhyUshort(sc, 0x0B, 0xBCC0);
21855                 MP_WritePhyUshort(sc, 0x10, 0xF06D);
21856                 MP_WritePhyUshort(sc, 0x14, 0x7F68);
21857                 MP_WritePhyUshort(sc, 0x18, 0x7FD9);
21858                 MP_WritePhyUshort(sc, 0x1C, 0xF0FF);
21859                 MP_WritePhyUshort(sc, 0x1D, 0x3D9C);
21860                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
21861                 MP_WritePhyUshort(sc, 0x12, 0xF49F);
21862                 MP_WritePhyUshort(sc, 0x13, 0x070B);
21863                 MP_WritePhyUshort(sc, 0x1A, 0x05AD);
21864                 MP_WritePhyUshort(sc, 0x14, 0x94C0);
21865 
21866                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21867                 MP_WritePhyUshort(sc, 0x06, 0x5571);
21868 
21869                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21870                 MP_WritePhyUshort(sc, 0x05, 0x2642);
21871 
21872                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21873                 MP_WritePhyUshort(sc, 0x02, 0xC107);
21874                 MP_WritePhyUshort(sc, 0x03, 0x1002);
21875 
21876                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
21877                 MP_WritePhyUshort(sc, 0x16, 0x0CC0);
21878 
21879                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21880                 MP_WritePhyUshort(sc, 0x0F, 0x0017);
21881 
21882                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
21883                 MP_WritePhyUshort(sc, 0x05, 0x8200);
21884                 MP_WritePhyUshort(sc, 0x06, 0xF8F9);
21885                 MP_WritePhyUshort(sc, 0x06, 0xFAEF);
21886                 MP_WritePhyUshort(sc, 0x06, 0x59EE);
21887                 MP_WritePhyUshort(sc, 0x06, 0xF8EA);
21888                 MP_WritePhyUshort(sc, 0x06, 0x00EE);
21889                 MP_WritePhyUshort(sc, 0x06, 0xF8EB);
21890                 MP_WritePhyUshort(sc, 0x06, 0x00E0);
21891                 MP_WritePhyUshort(sc, 0x06, 0xF87C);
21892                 MP_WritePhyUshort(sc, 0x06, 0xE1F8);
21893                 MP_WritePhyUshort(sc, 0x06, 0x7D59);
21894                 MP_WritePhyUshort(sc, 0x06, 0x0FEF);
21895                 MP_WritePhyUshort(sc, 0x06, 0x0139);
21896                 MP_WritePhyUshort(sc, 0x06, 0x029E);
21897                 MP_WritePhyUshort(sc, 0x06, 0x06EF);
21898                 MP_WritePhyUshort(sc, 0x06, 0x1039);
21899                 MP_WritePhyUshort(sc, 0x06, 0x089F);
21900                 MP_WritePhyUshort(sc, 0x06, 0x2AEE);
21901                 MP_WritePhyUshort(sc, 0x06, 0xF8EA);
21902                 MP_WritePhyUshort(sc, 0x06, 0x00EE);
21903                 MP_WritePhyUshort(sc, 0x06, 0xF8EB);
21904                 MP_WritePhyUshort(sc, 0x06, 0x01E0);
21905                 MP_WritePhyUshort(sc, 0x06, 0xF87C);
21906                 MP_WritePhyUshort(sc, 0x06, 0xE1F8);
21907                 MP_WritePhyUshort(sc, 0x06, 0x7D58);
21908                 MP_WritePhyUshort(sc, 0x06, 0x409E);
21909                 MP_WritePhyUshort(sc, 0x06, 0x0F39);
21910                 MP_WritePhyUshort(sc, 0x06, 0x46AA);
21911                 MP_WritePhyUshort(sc, 0x06, 0x0BBF);
21912                 MP_WritePhyUshort(sc, 0x06, 0x8251);
21913                 MP_WritePhyUshort(sc, 0x06, 0xD682);
21914                 MP_WritePhyUshort(sc, 0x06, 0x5902);
21915                 MP_WritePhyUshort(sc, 0x06, 0x014F);
21916                 MP_WritePhyUshort(sc, 0x06, 0xAE09);
21917                 MP_WritePhyUshort(sc, 0x06, 0xBF82);
21918                 MP_WritePhyUshort(sc, 0x06, 0x59D6);
21919                 MP_WritePhyUshort(sc, 0x06, 0x8261);
21920                 MP_WritePhyUshort(sc, 0x06, 0x0201);
21921                 MP_WritePhyUshort(sc, 0x06, 0x4FEF);
21922                 MP_WritePhyUshort(sc, 0x06, 0x95FE);
21923                 MP_WritePhyUshort(sc, 0x06, 0xFDFC);
21924                 MP_WritePhyUshort(sc, 0x06, 0x054D);
21925                 MP_WritePhyUshort(sc, 0x06, 0x2000);
21926                 MP_WritePhyUshort(sc, 0x06, 0x024E);
21927                 MP_WritePhyUshort(sc, 0x06, 0x2200);
21928                 MP_WritePhyUshort(sc, 0x06, 0x024D);
21929                 MP_WritePhyUshort(sc, 0x06, 0xDFFF);
21930                 MP_WritePhyUshort(sc, 0x06, 0x014E);
21931                 MP_WritePhyUshort(sc, 0x06, 0xDDFF);
21932                 MP_WritePhyUshort(sc, 0x06, 0x0100);
21933                 MP_WritePhyUshort(sc, 0x02, 0x6010);
21934                 MP_WritePhyUshort(sc, 0x05, 0xFFF6);
21935                 MP_WritePhyUshort(sc, 0x06, 0x00EC);
21936                 MP_WritePhyUshort(sc, 0x05, 0x83D4);
21937                 MP_WritePhyUshort(sc, 0x06, 0x8200);
21938 
21939         } else if (sc->re_type == MACFG_33) {
21940                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
21941                 MP_WritePhyUshort(sc, 0x06, 0x4064);
21942                 MP_WritePhyUshort(sc, 0x07, 0x2863);
21943                 MP_WritePhyUshort(sc, 0x08, 0x059C);
21944                 MP_WritePhyUshort(sc, 0x09, 0x26B4);
21945                 MP_WritePhyUshort(sc, 0x0A, 0x6A19);
21946                 MP_WritePhyUshort(sc, 0x0B, 0xDCC8);
21947                 MP_WritePhyUshort(sc, 0x10, 0xF06D);
21948                 MP_WritePhyUshort(sc, 0x14, 0x7F68);
21949                 MP_WritePhyUshort(sc, 0x18, 0x7FD9);
21950                 MP_WritePhyUshort(sc, 0x1C, 0xF0FF);
21951                 MP_WritePhyUshort(sc, 0x1D, 0x3D9C);
21952                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
21953                 MP_WritePhyUshort(sc, 0x12, 0xF49F);
21954                 MP_WritePhyUshort(sc, 0x13, 0x070B);
21955                 MP_WritePhyUshort(sc, 0x1A, 0x05AD);
21956                 MP_WritePhyUshort(sc, 0x14, 0x94C0);
21957 
21958                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21959                 MP_WritePhyUshort(sc, 0x06, 0x5561);
21960                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
21961                 MP_WritePhyUshort(sc, 0x05, 0x8332);
21962                 MP_WritePhyUshort(sc, 0x06, 0x5561);
21963 
21964                 if (MP_ReadEfuse(sc, 0x01) == 0xb1) {
21965                         MP_WritePhyUshort(sc, 0x1F, 0x0002);
21966                         MP_WritePhyUshort(sc, 0x05, 0x669A);
21967                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
21968                         MP_WritePhyUshort(sc, 0x05, 0x8330);
21969                         MP_WritePhyUshort(sc, 0x06, 0x669A);
21970 
21971                         MP_WritePhyUshort(sc, 0x1F, 0x0002);
21972                         Data = MP_ReadPhyUshort(sc, 0x0D);
21973                         if ((Data & 0x00FF) != 0x006C) {
21974                                 Data &= 0xFF00;
21975                                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21976                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0065);
21977                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0066);
21978                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0067);
21979                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0068);
21980                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0069);
21981                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x006A);
21982                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x006B);
21983                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x006C);
21984                         }
21985                 } else {
21986                         MP_WritePhyUshort(sc, 0x1F, 0x0002);
21987                         MP_WritePhyUshort(sc, 0x05, 0x2642);
21988                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
21989                         MP_WritePhyUshort(sc, 0x05, 0x8330);
21990                         MP_WritePhyUshort(sc, 0x06, 0x2642);
21991                 }
21992 
21993                 if (MP_ReadEfuse(sc, 0x30) == 0x98) {
21994                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
21995                         MP_WritePhyUshort(sc, 0x11, MP_ReadPhyUshort(sc, 0x11) & ~0x02);
21996                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
21997                         MP_WritePhyUshort(sc, 0x01, MP_ReadPhyUshort(sc, 0x01) | 0x200);
21998                 } else if (MP_ReadEfuse(sc, 0x30) == 0x90) {
21999                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
22000                         MP_WritePhyUshort(sc, 0x01, MP_ReadPhyUshort(sc, 0x01) & ~0x200);
22001                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
22002                         MP_WritePhyUshort(sc, 0x16, 0x5101);
22003                 }
22004 
22005                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
22006                 Data = MP_ReadPhyUshort(sc, 0x02);
22007                 Data &= ~0x600;
22008                 Data |= 0x100;
22009                 MP_WritePhyUshort(sc, 0x02, Data);
22010                 Data = MP_ReadPhyUshort(sc, 0x03);
22011                 Data &= ~0xE000;
22012                 MP_WritePhyUshort(sc, 0x03, Data);
22013 
22014                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
22015                 MP_WritePhyUshort(sc, 0x17, 0x0CC0);
22016 
22017                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
22018                 Data = MP_ReadPhyUshort(sc, 0x0F);
22019                 Data |= 0x17;
22020                 MP_WritePhyUshort(sc, 0x0F, Data);
22021 
22022                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
22023                 MP_WritePhyUshort(sc, 0x05, 0x001B);
22024                 if (MP_ReadPhyUshort(sc, 0x06) == 0xB300) {
22025                         MP_WritePhyUshort(sc, 0x1f, 0x0005);
22026                         MP_WritePhyUshort(sc, 0x05, 0xfff6);
22027                         MP_WritePhyUshort(sc, 0x06, 0x0080);
22028                         MP_WritePhyUshort(sc, 0x05, 0x8000);
22029                         MP_WritePhyUshort(sc, 0x06, 0xf8f9);
22030                         MP_WritePhyUshort(sc, 0x06, 0xfaee);
22031                         MP_WritePhyUshort(sc, 0x06, 0xf8ea);
22032                         MP_WritePhyUshort(sc, 0x06, 0x00ee);
22033                         MP_WritePhyUshort(sc, 0x06, 0xf8eb);
22034                         MP_WritePhyUshort(sc, 0x06, 0x00e2);
22035                         MP_WritePhyUshort(sc, 0x06, 0xf87c);
22036                         MP_WritePhyUshort(sc, 0x06, 0xe3f8);
22037                         MP_WritePhyUshort(sc, 0x06, 0x7da5);
22038                         MP_WritePhyUshort(sc, 0x06, 0x1111);
22039                         MP_WritePhyUshort(sc, 0x06, 0x12d2);
22040                         MP_WritePhyUshort(sc, 0x06, 0x40d6);
22041                         MP_WritePhyUshort(sc, 0x06, 0x4444);
22042                         MP_WritePhyUshort(sc, 0x06, 0x0281);
22043                         MP_WritePhyUshort(sc, 0x06, 0xc6d2);
22044                         MP_WritePhyUshort(sc, 0x06, 0xa0d6);
22045                         MP_WritePhyUshort(sc, 0x06, 0xaaaa);
22046                         MP_WritePhyUshort(sc, 0x06, 0x0281);
22047                         MP_WritePhyUshort(sc, 0x06, 0xc6ae);
22048                         MP_WritePhyUshort(sc, 0x06, 0x0fa5);
22049                         MP_WritePhyUshort(sc, 0x06, 0x4444);
22050                         MP_WritePhyUshort(sc, 0x06, 0x02ae);
22051                         MP_WritePhyUshort(sc, 0x06, 0x4da5);
22052                         MP_WritePhyUshort(sc, 0x06, 0xaaaa);
22053                         MP_WritePhyUshort(sc, 0x06, 0x02ae);
22054                         MP_WritePhyUshort(sc, 0x06, 0x47af);
22055                         MP_WritePhyUshort(sc, 0x06, 0x81c2);
22056                         MP_WritePhyUshort(sc, 0x06, 0xee83);
22057                         MP_WritePhyUshort(sc, 0x06, 0x4e00);
22058                         MP_WritePhyUshort(sc, 0x06, 0xee83);
22059                         MP_WritePhyUshort(sc, 0x06, 0x4d0f);
22060                         MP_WritePhyUshort(sc, 0x06, 0xee83);
22061                         MP_WritePhyUshort(sc, 0x06, 0x4c0f);
22062                         MP_WritePhyUshort(sc, 0x06, 0xee83);
22063                         MP_WritePhyUshort(sc, 0x06, 0x4f00);
22064                         MP_WritePhyUshort(sc, 0x06, 0xee83);
22065                         MP_WritePhyUshort(sc, 0x06, 0x5100);
22066                         MP_WritePhyUshort(sc, 0x06, 0xee83);
22067                         MP_WritePhyUshort(sc, 0x06, 0x4aff);
22068                         MP_WritePhyUshort(sc, 0x06, 0xee83);
22069                         MP_WritePhyUshort(sc, 0x06, 0x4bff);
22070                         MP_WritePhyUshort(sc, 0x06, 0xe083);
22071                         MP_WritePhyUshort(sc, 0x06, 0x30e1);
22072                         MP_WritePhyUshort(sc, 0x06, 0x8331);
22073                         MP_WritePhyUshort(sc, 0x06, 0x58fe);
22074                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
22075                         MP_WritePhyUshort(sc, 0x06, 0x8ae5);
22076                         MP_WritePhyUshort(sc, 0x06, 0xf88b);
22077                         MP_WritePhyUshort(sc, 0x06, 0xe083);
22078                         MP_WritePhyUshort(sc, 0x06, 0x32e1);
22079                         MP_WritePhyUshort(sc, 0x06, 0x8333);
22080                         MP_WritePhyUshort(sc, 0x06, 0x590f);
22081                         MP_WritePhyUshort(sc, 0x06, 0xe283);
22082                         MP_WritePhyUshort(sc, 0x06, 0x4d0c);
22083                         MP_WritePhyUshort(sc, 0x06, 0x245a);
22084                         MP_WritePhyUshort(sc, 0x06, 0xf01e);
22085                         MP_WritePhyUshort(sc, 0x06, 0x12e4);
22086                         MP_WritePhyUshort(sc, 0x06, 0xf88c);
22087                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
22088                         MP_WritePhyUshort(sc, 0x06, 0x8daf);
22089                         MP_WritePhyUshort(sc, 0x06, 0x81c2);
22090                         MP_WritePhyUshort(sc, 0x06, 0xe083);
22091                         MP_WritePhyUshort(sc, 0x06, 0x4f10);
22092                         MP_WritePhyUshort(sc, 0x06, 0xe483);
22093                         MP_WritePhyUshort(sc, 0x06, 0x4fe0);
22094                         MP_WritePhyUshort(sc, 0x06, 0x834e);
22095                         MP_WritePhyUshort(sc, 0x06, 0x7800);
22096                         MP_WritePhyUshort(sc, 0x06, 0x9f0a);
22097                         MP_WritePhyUshort(sc, 0x06, 0xe083);
22098                         MP_WritePhyUshort(sc, 0x06, 0x4fa0);
22099                         MP_WritePhyUshort(sc, 0x06, 0x10a5);
22100                         MP_WritePhyUshort(sc, 0x06, 0xee83);
22101                         MP_WritePhyUshort(sc, 0x06, 0x4e01);
22102                         MP_WritePhyUshort(sc, 0x06, 0xe083);
22103                         MP_WritePhyUshort(sc, 0x06, 0x4e78);
22104                         MP_WritePhyUshort(sc, 0x06, 0x059e);
22105                         MP_WritePhyUshort(sc, 0x06, 0x9ae0);
22106                         MP_WritePhyUshort(sc, 0x06, 0x834e);
22107                         MP_WritePhyUshort(sc, 0x06, 0x7804);
22108                         MP_WritePhyUshort(sc, 0x06, 0x9e10);
22109                         MP_WritePhyUshort(sc, 0x06, 0xe083);
22110                         MP_WritePhyUshort(sc, 0x06, 0x4e78);
22111                         MP_WritePhyUshort(sc, 0x06, 0x039e);
22112                         MP_WritePhyUshort(sc, 0x06, 0x0fe0);
22113                         MP_WritePhyUshort(sc, 0x06, 0x834e);
22114                         MP_WritePhyUshort(sc, 0x06, 0x7801);
22115                         MP_WritePhyUshort(sc, 0x06, 0x9e05);
22116                         MP_WritePhyUshort(sc, 0x06, 0xae0c);
22117                         MP_WritePhyUshort(sc, 0x06, 0xaf81);
22118                         MP_WritePhyUshort(sc, 0x06, 0xa7af);
22119                         MP_WritePhyUshort(sc, 0x06, 0x8152);
22120                         MP_WritePhyUshort(sc, 0x06, 0xaf81);
22121                         MP_WritePhyUshort(sc, 0x06, 0x8baf);
22122                         MP_WritePhyUshort(sc, 0x06, 0x81c2);
22123                         MP_WritePhyUshort(sc, 0x06, 0xee83);
22124                         MP_WritePhyUshort(sc, 0x06, 0x4800);
22125                         MP_WritePhyUshort(sc, 0x06, 0xee83);
22126                         MP_WritePhyUshort(sc, 0x06, 0x4900);
22127                         MP_WritePhyUshort(sc, 0x06, 0xe083);
22128                         MP_WritePhyUshort(sc, 0x06, 0x5110);
22129                         MP_WritePhyUshort(sc, 0x06, 0xe483);
22130                         MP_WritePhyUshort(sc, 0x06, 0x5158);
22131                         MP_WritePhyUshort(sc, 0x06, 0x019f);
22132                         MP_WritePhyUshort(sc, 0x06, 0xead0);
22133                         MP_WritePhyUshort(sc, 0x06, 0x00d1);
22134                         MP_WritePhyUshort(sc, 0x06, 0x801f);
22135                         MP_WritePhyUshort(sc, 0x06, 0x66e2);
22136                         MP_WritePhyUshort(sc, 0x06, 0xf8ea);
22137                         MP_WritePhyUshort(sc, 0x06, 0xe3f8);
22138                         MP_WritePhyUshort(sc, 0x06, 0xeb5a);
22139                         MP_WritePhyUshort(sc, 0x06, 0xf81e);
22140                         MP_WritePhyUshort(sc, 0x06, 0x20e6);
22141                         MP_WritePhyUshort(sc, 0x06, 0xf8ea);
22142                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
22143                         MP_WritePhyUshort(sc, 0x06, 0xebd3);
22144                         MP_WritePhyUshort(sc, 0x06, 0x02b3);
22145                         MP_WritePhyUshort(sc, 0x06, 0xfee2);
22146                         MP_WritePhyUshort(sc, 0x06, 0xf87c);
22147                         MP_WritePhyUshort(sc, 0x06, 0xef32);
22148                         MP_WritePhyUshort(sc, 0x06, 0x5b80);
22149                         MP_WritePhyUshort(sc, 0x06, 0xe3f8);
22150                         MP_WritePhyUshort(sc, 0x06, 0x7d9e);
22151                         MP_WritePhyUshort(sc, 0x06, 0x037d);
22152                         MP_WritePhyUshort(sc, 0x06, 0xffff);
22153                         MP_WritePhyUshort(sc, 0x06, 0x0d58);
22154                         MP_WritePhyUshort(sc, 0x06, 0x1c55);
22155                         MP_WritePhyUshort(sc, 0x06, 0x1a65);
22156                         MP_WritePhyUshort(sc, 0x06, 0x11a1);
22157                         MP_WritePhyUshort(sc, 0x06, 0x90d3);
22158                         MP_WritePhyUshort(sc, 0x06, 0xe283);
22159                         MP_WritePhyUshort(sc, 0x06, 0x48e3);
22160                         MP_WritePhyUshort(sc, 0x06, 0x8349);
22161                         MP_WritePhyUshort(sc, 0x06, 0x1b56);
22162                         MP_WritePhyUshort(sc, 0x06, 0xab08);
22163                         MP_WritePhyUshort(sc, 0x06, 0xef56);
22164                         MP_WritePhyUshort(sc, 0x06, 0xe683);
22165                         MP_WritePhyUshort(sc, 0x06, 0x48e7);
22166                         MP_WritePhyUshort(sc, 0x06, 0x8349);
22167                         MP_WritePhyUshort(sc, 0x06, 0x10d1);
22168                         MP_WritePhyUshort(sc, 0x06, 0x801f);
22169                         MP_WritePhyUshort(sc, 0x06, 0x66a0);
22170                         MP_WritePhyUshort(sc, 0x06, 0x04b9);
22171                         MP_WritePhyUshort(sc, 0x06, 0xe283);
22172                         MP_WritePhyUshort(sc, 0x06, 0x48e3);
22173                         MP_WritePhyUshort(sc, 0x06, 0x8349);
22174                         MP_WritePhyUshort(sc, 0x06, 0xef65);
22175                         MP_WritePhyUshort(sc, 0x06, 0xe283);
22176                         MP_WritePhyUshort(sc, 0x06, 0x4ae3);
22177                         MP_WritePhyUshort(sc, 0x06, 0x834b);
22178                         MP_WritePhyUshort(sc, 0x06, 0x1b56);
22179                         MP_WritePhyUshort(sc, 0x06, 0xaa0e);
22180                         MP_WritePhyUshort(sc, 0x06, 0xef56);
22181                         MP_WritePhyUshort(sc, 0x06, 0xe683);
22182                         MP_WritePhyUshort(sc, 0x06, 0x4ae7);
22183                         MP_WritePhyUshort(sc, 0x06, 0x834b);
22184                         MP_WritePhyUshort(sc, 0x06, 0xe283);
22185                         MP_WritePhyUshort(sc, 0x06, 0x4de6);
22186                         MP_WritePhyUshort(sc, 0x06, 0x834c);
22187                         MP_WritePhyUshort(sc, 0x06, 0xe083);
22188                         MP_WritePhyUshort(sc, 0x06, 0x4da0);
22189                         MP_WritePhyUshort(sc, 0x06, 0x000c);
22190                         MP_WritePhyUshort(sc, 0x06, 0xaf81);
22191                         MP_WritePhyUshort(sc, 0x06, 0x8be0);
22192                         MP_WritePhyUshort(sc, 0x06, 0x834d);
22193                         MP_WritePhyUshort(sc, 0x06, 0x10e4);
22194                         MP_WritePhyUshort(sc, 0x06, 0x834d);
22195                         MP_WritePhyUshort(sc, 0x06, 0xae04);
22196                         MP_WritePhyUshort(sc, 0x06, 0x80e4);
22197                         MP_WritePhyUshort(sc, 0x06, 0x834d);
22198                         MP_WritePhyUshort(sc, 0x06, 0xe083);
22199                         MP_WritePhyUshort(sc, 0x06, 0x4e78);
22200                         MP_WritePhyUshort(sc, 0x06, 0x039e);
22201                         MP_WritePhyUshort(sc, 0x06, 0x0be0);
22202                         MP_WritePhyUshort(sc, 0x06, 0x834e);
22203                         MP_WritePhyUshort(sc, 0x06, 0x7804);
22204                         MP_WritePhyUshort(sc, 0x06, 0x9e04);
22205                         MP_WritePhyUshort(sc, 0x06, 0xee83);
22206                         MP_WritePhyUshort(sc, 0x06, 0x4e02);
22207                         MP_WritePhyUshort(sc, 0x06, 0xe083);
22208                         MP_WritePhyUshort(sc, 0x06, 0x32e1);
22209                         MP_WritePhyUshort(sc, 0x06, 0x8333);
22210                         MP_WritePhyUshort(sc, 0x06, 0x590f);
22211                         MP_WritePhyUshort(sc, 0x06, 0xe283);
22212                         MP_WritePhyUshort(sc, 0x06, 0x4d0c);
22213                         MP_WritePhyUshort(sc, 0x06, 0x245a);
22214                         MP_WritePhyUshort(sc, 0x06, 0xf01e);
22215                         MP_WritePhyUshort(sc, 0x06, 0x12e4);
22216                         MP_WritePhyUshort(sc, 0x06, 0xf88c);
22217                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
22218                         MP_WritePhyUshort(sc, 0x06, 0x8de0);
22219                         MP_WritePhyUshort(sc, 0x06, 0x8330);
22220                         MP_WritePhyUshort(sc, 0x06, 0xe183);
22221                         MP_WritePhyUshort(sc, 0x06, 0x3168);
22222                         MP_WritePhyUshort(sc, 0x06, 0x01e4);
22223                         MP_WritePhyUshort(sc, 0x06, 0xf88a);
22224                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
22225                         MP_WritePhyUshort(sc, 0x06, 0x8bae);
22226                         MP_WritePhyUshort(sc, 0x06, 0x37ee);
22227                         MP_WritePhyUshort(sc, 0x06, 0x834e);
22228                         MP_WritePhyUshort(sc, 0x06, 0x03e0);
22229                         MP_WritePhyUshort(sc, 0x06, 0x834c);
22230                         MP_WritePhyUshort(sc, 0x06, 0xe183);
22231                         MP_WritePhyUshort(sc, 0x06, 0x4d1b);
22232                         MP_WritePhyUshort(sc, 0x06, 0x019e);
22233                         MP_WritePhyUshort(sc, 0x06, 0x04aa);
22234                         MP_WritePhyUshort(sc, 0x06, 0xa1ae);
22235                         MP_WritePhyUshort(sc, 0x06, 0xa8ee);
22236                         MP_WritePhyUshort(sc, 0x06, 0x834e);
22237                         MP_WritePhyUshort(sc, 0x06, 0x04ee);
22238                         MP_WritePhyUshort(sc, 0x06, 0x834f);
22239                         MP_WritePhyUshort(sc, 0x06, 0x00ae);
22240                         MP_WritePhyUshort(sc, 0x06, 0xabe0);
22241                         MP_WritePhyUshort(sc, 0x06, 0x834f);
22242                         MP_WritePhyUshort(sc, 0x06, 0x7803);
22243                         MP_WritePhyUshort(sc, 0x06, 0x9f14);
22244                         MP_WritePhyUshort(sc, 0x06, 0xee83);
22245                         MP_WritePhyUshort(sc, 0x06, 0x4e05);
22246                         MP_WritePhyUshort(sc, 0x06, 0xd240);
22247                         MP_WritePhyUshort(sc, 0x06, 0xd655);
22248                         MP_WritePhyUshort(sc, 0x06, 0x5402);
22249                         MP_WritePhyUshort(sc, 0x06, 0x81c6);
22250                         MP_WritePhyUshort(sc, 0x06, 0xd2a0);
22251                         MP_WritePhyUshort(sc, 0x06, 0xd6ba);
22252                         MP_WritePhyUshort(sc, 0x06, 0x0002);
22253                         MP_WritePhyUshort(sc, 0x06, 0x81c6);
22254                         MP_WritePhyUshort(sc, 0x06, 0xfefd);
22255                         MP_WritePhyUshort(sc, 0x06, 0xfc05);
22256                         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
22257                         MP_WritePhyUshort(sc, 0x06, 0xf860);
22258                         MP_WritePhyUshort(sc, 0x06, 0xe1f8);
22259                         MP_WritePhyUshort(sc, 0x06, 0x6168);
22260                         MP_WritePhyUshort(sc, 0x06, 0x02e4);
22261                         MP_WritePhyUshort(sc, 0x06, 0xf860);
22262                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
22263                         MP_WritePhyUshort(sc, 0x06, 0x61e0);
22264                         MP_WritePhyUshort(sc, 0x06, 0xf848);
22265                         MP_WritePhyUshort(sc, 0x06, 0xe1f8);
22266                         MP_WritePhyUshort(sc, 0x06, 0x4958);
22267                         MP_WritePhyUshort(sc, 0x06, 0x0f1e);
22268                         MP_WritePhyUshort(sc, 0x06, 0x02e4);
22269                         MP_WritePhyUshort(sc, 0x06, 0xf848);
22270                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
22271                         MP_WritePhyUshort(sc, 0x06, 0x49d0);
22272                         MP_WritePhyUshort(sc, 0x06, 0x0002);
22273                         MP_WritePhyUshort(sc, 0x06, 0x820a);
22274                         MP_WritePhyUshort(sc, 0x06, 0xbf83);
22275                         MP_WritePhyUshort(sc, 0x06, 0x50ef);
22276                         MP_WritePhyUshort(sc, 0x06, 0x46dc);
22277                         MP_WritePhyUshort(sc, 0x06, 0x19dd);
22278                         MP_WritePhyUshort(sc, 0x06, 0xd001);
22279                         MP_WritePhyUshort(sc, 0x06, 0x0282);
22280                         MP_WritePhyUshort(sc, 0x06, 0x0a02);
22281                         MP_WritePhyUshort(sc, 0x06, 0x8226);
22282                         MP_WritePhyUshort(sc, 0x06, 0xe0f8);
22283                         MP_WritePhyUshort(sc, 0x06, 0x60e1);
22284                         MP_WritePhyUshort(sc, 0x06, 0xf861);
22285                         MP_WritePhyUshort(sc, 0x06, 0x58fd);
22286                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
22287                         MP_WritePhyUshort(sc, 0x06, 0x60e5);
22288                         MP_WritePhyUshort(sc, 0x06, 0xf861);
22289                         MP_WritePhyUshort(sc, 0x06, 0xfc04);
22290                         MP_WritePhyUshort(sc, 0x06, 0xf9fa);
22291                         MP_WritePhyUshort(sc, 0x06, 0xfbc6);
22292                         MP_WritePhyUshort(sc, 0x06, 0xbff8);
22293                         MP_WritePhyUshort(sc, 0x06, 0x40be);
22294                         MP_WritePhyUshort(sc, 0x06, 0x8350);
22295                         MP_WritePhyUshort(sc, 0x06, 0xa001);
22296                         MP_WritePhyUshort(sc, 0x06, 0x0107);
22297                         MP_WritePhyUshort(sc, 0x06, 0x1b89);
22298                         MP_WritePhyUshort(sc, 0x06, 0xcfd2);
22299                         MP_WritePhyUshort(sc, 0x06, 0x08eb);
22300                         MP_WritePhyUshort(sc, 0x06, 0xdb19);
22301                         MP_WritePhyUshort(sc, 0x06, 0xb2fb);
22302                         MP_WritePhyUshort(sc, 0x06, 0xfffe);
22303                         MP_WritePhyUshort(sc, 0x06, 0xfd04);
22304                         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
22305                         MP_WritePhyUshort(sc, 0x06, 0xf848);
22306                         MP_WritePhyUshort(sc, 0x06, 0xe1f8);
22307                         MP_WritePhyUshort(sc, 0x06, 0x4968);
22308                         MP_WritePhyUshort(sc, 0x06, 0x08e4);
22309                         MP_WritePhyUshort(sc, 0x06, 0xf848);
22310                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
22311                         MP_WritePhyUshort(sc, 0x06, 0x4958);
22312                         MP_WritePhyUshort(sc, 0x06, 0xf7e4);
22313                         MP_WritePhyUshort(sc, 0x06, 0xf848);
22314                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
22315                         MP_WritePhyUshort(sc, 0x06, 0x49fc);
22316                         MP_WritePhyUshort(sc, 0x06, 0x044d);
22317                         MP_WritePhyUshort(sc, 0x06, 0x2000);
22318                         MP_WritePhyUshort(sc, 0x06, 0x024e);
22319                         MP_WritePhyUshort(sc, 0x06, 0x2200);
22320                         MP_WritePhyUshort(sc, 0x06, 0x024d);
22321                         MP_WritePhyUshort(sc, 0x06, 0xdfff);
22322                         MP_WritePhyUshort(sc, 0x06, 0x014e);
22323                         MP_WritePhyUshort(sc, 0x06, 0xddff);
22324                         MP_WritePhyUshort(sc, 0x06, 0x01f8);
22325                         MP_WritePhyUshort(sc, 0x06, 0xfafb);
22326                         MP_WritePhyUshort(sc, 0x06, 0xef79);
22327                         MP_WritePhyUshort(sc, 0x06, 0xbff8);
22328                         MP_WritePhyUshort(sc, 0x06, 0x22d8);
22329                         MP_WritePhyUshort(sc, 0x06, 0x19d9);
22330                         MP_WritePhyUshort(sc, 0x06, 0x5884);
22331                         MP_WritePhyUshort(sc, 0x06, 0x9f09);
22332                         MP_WritePhyUshort(sc, 0x06, 0xbf82);
22333                         MP_WritePhyUshort(sc, 0x06, 0x6dd6);
22334                         MP_WritePhyUshort(sc, 0x06, 0x8275);
22335                         MP_WritePhyUshort(sc, 0x06, 0x0201);
22336                         MP_WritePhyUshort(sc, 0x06, 0x4fef);
22337                         MP_WritePhyUshort(sc, 0x06, 0x97ff);
22338                         MP_WritePhyUshort(sc, 0x06, 0xfefc);
22339                         MP_WritePhyUshort(sc, 0x06, 0x0517);
22340                         MP_WritePhyUshort(sc, 0x06, 0xfffe);
22341                         MP_WritePhyUshort(sc, 0x06, 0x0117);
22342                         MP_WritePhyUshort(sc, 0x06, 0x0001);
22343                         MP_WritePhyUshort(sc, 0x06, 0x0200);
22344                         MP_WritePhyUshort(sc, 0x05, 0x83d8);
22345                         MP_WritePhyUshort(sc, 0x06, 0x8000);
22346                         MP_WritePhyUshort(sc, 0x05, 0x83d6);
22347                         MP_WritePhyUshort(sc, 0x06, 0x824f);
22348                         MP_WritePhyUshort(sc, 0x02, 0x2010);
22349                         MP_WritePhyUshort(sc, 0x03, 0xdc00);
22350                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
22351                         MP_WritePhyUshort(sc, 0x0b, 0x0600);
22352                         MP_WritePhyUshort(sc, 0x1f, 0x0005);
22353                         MP_WritePhyUshort(sc, 0x05, 0xfff6);
22354                         MP_WritePhyUshort(sc, 0x06, 0x00fc);
22355                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
22356                 }
22357 
22358                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
22359                 MP_WritePhyUshort(sc, 0x0D, 0xF880);
22360                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
22361         } else if (sc->re_type == MACFG_36 || sc->re_type == MACFG_37) {
22362                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
22363                 MP_WritePhyUshort(sc, 0x1E, 0x0023);
22364                 Data = MP_ReadPhyUshort(sc, 0x17) | 0x0006;
22365                 if (sc->RequiredSecLanDonglePatch)
22366                         Data &= ~(BIT_2);
22367                 else
22368                         Data |= (BIT_2);
22369                 MP_WritePhyUshort(sc, 0x17, Data);
22370                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
22371 
22372                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
22373                 MP_WritePhyUshort(sc, 0x05, 0x8b80);
22374                 MP_WritePhyUshort(sc, 0x06, 0xc896);
22375                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
22376 
22377                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
22378                 MP_WritePhyUshort(sc, 0x0B, 0x6C20);
22379                 MP_WritePhyUshort(sc, 0x07, 0x2872);
22380                 MP_WritePhyUshort(sc, 0x1C, 0xEFFF);
22381                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
22382                 MP_WritePhyUshort(sc, 0x14, 0x6420);
22383                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
22384 
22385                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
22386                 Data = MP_ReadPhyUshort(sc, 0x08) & 0x00FF;
22387                 MP_WritePhyUshort(sc, 0x08, Data | 0x8000);
22388 
22389                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
22390                 MP_WritePhyUshort(sc, 0x1E, 0x002D);
22391                 Data = MP_ReadPhyUshort(sc, 0x18);
22392                 MP_WritePhyUshort(sc, 0x18, Data | 0x0050);
22393                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
22394                 Data = MP_ReadPhyUshort(sc, 0x14);
22395                 MP_WritePhyUshort(sc, 0x14, Data | 0x8000);
22396 
22397                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
22398                 MP_WritePhyUshort(sc, 0x00, 0x080B);
22399                 MP_WritePhyUshort(sc, 0x0B, 0x09D7);
22400                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
22401                 MP_WritePhyUshort(sc, 0x15, 0x1006);
22402 
22403                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
22404                 MP_WritePhyUshort(sc, 0x1E, 0x002F);
22405                 MP_WritePhyUshort(sc, 0x15, 0x1919);
22406                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
22407 
22408                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
22409                 MP_WritePhyUshort(sc, 0x19, 0x7F46);
22410                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
22411                 MP_WritePhyUshort(sc, 0x05, 0x8AD2);
22412                 MP_WritePhyUshort(sc, 0x06, 0x6810);
22413                 MP_WritePhyUshort(sc, 0x05, 0x8AD4);
22414                 MP_WritePhyUshort(sc, 0x06, 0x8002);
22415                 MP_WritePhyUshort(sc, 0x05, 0x8ADE);
22416                 MP_WritePhyUshort(sc, 0x06, 0x8025);
22417                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
22418         } else if (sc->re_type == MACFG_38) {
22419                 CSR_WRITE_1(sc, 0x6E, CSR_READ_1(sc, 0x6E)| (1<<6));
22420 
22421                 Data_u32 = re_eri_read(sc, 0x1D0, 4, ERIAR_ExGMAC);
22422                 Data_u32 &= ~BIT_1;
22423                 re_eri_write(sc, 0x1D0, 4, Data_u32, ERIAR_ExGMAC);
22424 
22425                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
22426                 MP_WritePhyUshort(sc, 0x05, 0x8B80);
22427                 Data = MP_ReadPhyUshort(sc, 0x06);
22428                 Data |= BIT_2 | BIT_1;
22429                 MP_WritePhyUshort(sc, 0x06, Data);
22430                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
22431 
22432                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
22433                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
22434                 MP_WritePhyUshort(sc, 0x1e, 0x002D);
22435                 Data = MP_ReadPhyUshort(sc, 0x18);
22436                 Data |= BIT_4;
22437                 MP_WritePhyUshort(sc, 0x18, Data);
22438                 MP_WritePhyUshort(sc, 0x1f, 0x0002);
22439                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
22440                 Data = MP_ReadPhyUshort(sc, 0x14);
22441                 Data |= BIT_15;
22442                 MP_WritePhyUshort(sc, 0x14, Data);
22443 
22444                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
22445                 MP_WritePhyUshort(sc, 0x05, 0x8B86);
22446                 Data = MP_ReadPhyUshort(sc, 0x06);
22447                 Data |= BIT_0;
22448                 MP_WritePhyUshort(sc, 0x06, Data);
22449                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
22450 
22451                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
22452                 MP_WritePhyUshort(sc, 0x0B, 0x6C14);
22453                 MP_WritePhyUshort(sc, 0x14, 0x7F3D);
22454                 MP_WritePhyUshort(sc, 0x1C, 0xFAFE);
22455                 MP_WritePhyUshort(sc, 0x08, 0x07C5);
22456                 MP_WritePhyUshort(sc, 0x10, 0xF090);
22457                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
22458                 MP_WritePhyUshort(sc, 0x14, 0x641A);
22459                 MP_WritePhyUshort(sc, 0x1A, 0x0606);
22460                 MP_WritePhyUshort(sc, 0x12, 0xF480);
22461                 MP_WritePhyUshort(sc, 0x13, 0x0747);
22462                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
22463 
22464                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
22465                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
22466                 MP_WritePhyUshort(sc, 0x1E, 0x0078);
22467                 MP_WritePhyUshort(sc, 0x15, 0xA408);
22468                 MP_WritePhyUshort(sc, 0x17, 0x5100);
22469                 MP_WritePhyUshort(sc, 0x19, 0x0008);
22470                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
22471                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
22472 
22473                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
22474                 MP_WritePhyUshort(sc, 0x0D, 0x0207);
22475                 MP_WritePhyUshort(sc, 0x02, 0x5FD0);
22476                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
22477 
22478                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
22479                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
22480                 MP_WritePhyUshort(sc, 0x1E, 0x00A1);
22481                 Data = MP_ReadPhyUshort(sc, 0x1A);
22482                 Data &= ~BIT_2;
22483                 MP_WritePhyUshort(sc, 0x1A, Data);
22484                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
22485                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
22486 
22487                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
22488                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
22489                 MP_WritePhyUshort(sc, 0x1E, 0x002D);
22490                 Data = MP_ReadPhyUshort(sc, 0x16);
22491                 Data |= BIT_5;
22492                 MP_WritePhyUshort(sc, 0x16, Data);
22493                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
22494                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
22495 
22496                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
22497                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
22498                 MP_WritePhyUshort(sc, 0x1E, 0x00AC);
22499                 MP_WritePhyUshort(sc, 0x18, 0x0006);
22500                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
22501                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
22502 
22503                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
22504                 MP_WritePhyUshort(sc, 0x09, 0xA20F);
22505                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
22506 
22507                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
22508                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
22509                 Data = MP_ReadPhyUshort(sc, 0x06);
22510                 Data |= BIT_14;
22511                 MP_WritePhyUshort(sc, 0x06, Data);
22512                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
22513 
22514                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
22515                 MP_WritePhyUshort(sc, 0x05, 0x8B54);
22516                 Data = MP_ReadPhyUshort(sc, 0x06);
22517                 Data &= ~BIT_11;
22518                 MP_WritePhyUshort(sc, 0x06, Data);
22519                 MP_WritePhyUshort(sc, 0x05, 0x8B5D);
22520                 Data = MP_ReadPhyUshort(sc, 0x06);
22521                 Data &= ~BIT_11;
22522                 MP_WritePhyUshort(sc, 0x06, Data);
22523                 MP_WritePhyUshort(sc, 0x05, 0x8A7C);
22524                 Data = MP_ReadPhyUshort(sc, 0x06);
22525                 Data &= ~BIT_8;
22526                 MP_WritePhyUshort(sc, 0x06, Data);
22527                 MP_WritePhyUshort(sc, 0x05, 0x8A7F);
22528                 Data = MP_ReadPhyUshort(sc, 0x06);
22529                 Data |= BIT_8;
22530                 MP_WritePhyUshort(sc, 0x06, Data);
22531                 MP_WritePhyUshort(sc, 0x05, 0x8A82);
22532                 Data = MP_ReadPhyUshort(sc, 0x06);
22533                 Data &= ~BIT_8;
22534                 MP_WritePhyUshort(sc, 0x06, Data);
22535                 MP_WritePhyUshort(sc, 0x05, 0x8A85);
22536                 Data = MP_ReadPhyUshort(sc, 0x06);
22537                 Data &= ~BIT_8;
22538                 MP_WritePhyUshort(sc, 0x06, Data);
22539                 MP_WritePhyUshort(sc, 0x05, 0x8A88);
22540                 Data = MP_ReadPhyUshort(sc, 0x06);
22541                 Data &= ~BIT_8;
22542                 MP_WritePhyUshort(sc, 0x06, Data);
22543                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
22544 
22545                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
22546                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
22547                 Data = MP_ReadPhyUshort(sc, 0x06);
22548                 Data |= BIT_15;
22549                 MP_WritePhyUshort(sc, 0x06, Data);
22550                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
22551 
22552                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
22553                 Data = MP_ReadPhyUshort(sc, 0x19);
22554                 Data &= ~BIT_0;
22555                 MP_WritePhyUshort(sc, 0x19, Data);
22556                 Data = MP_ReadPhyUshort(sc, 0x10);
22557                 Data &= ~BIT_10;
22558                 MP_WritePhyUshort(sc, 0x10, Data);
22559                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
22560         } else if (sc->re_type == MACFG_39) {
22561                 Data_u32 = re_eri_read(sc, 0x1D0, 4, ERIAR_ExGMAC);
22562                 Data_u32 &= ~BIT_1;
22563                 re_eri_write(sc, 0x1D0, 4, Data_u32, ERIAR_ExGMAC);
22564 
22565                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
22566                 MP_WritePhyUshort(sc, 0x05, 0x8B80);
22567                 Data = MP_ReadPhyUshort(sc, 0x06);
22568                 Data |= BIT_2 | BIT_1;
22569                 MP_WritePhyUshort(sc, 0x06, Data);
22570                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
22571 
22572                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
22573                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
22574                 Data = MP_ReadPhyUshort(sc, 0x06);
22575                 Data |= BIT_15;
22576                 MP_WritePhyUshort(sc, 0x06, Data);
22577                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
22578 
22579                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
22580                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
22581                 MP_WritePhyUshort(sc, 0x1e, 0x002D);
22582                 Data = MP_ReadPhyUshort(sc, 0x18);
22583                 Data |= BIT_4;
22584                 MP_WritePhyUshort(sc, 0x18, Data);
22585                 MP_WritePhyUshort(sc, 0x1f, 0x0002);
22586                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
22587                 Data = MP_ReadPhyUshort(sc, 0x14);
22588                 Data |= BIT_15;
22589                 MP_WritePhyUshort(sc, 0x14, Data);
22590 
22591                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
22592                 MP_WritePhyUshort(sc, 0x05, 0x8B86);
22593                 Data = MP_ReadPhyUshort(sc, 0x06);
22594                 Data |= BIT_0;
22595                 MP_WritePhyUshort(sc, 0x06, Data);
22596                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
22597 
22598                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
22599                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
22600                 MP_WritePhyUshort(sc, 0x1E, 0x00AC);
22601                 MP_WritePhyUshort(sc, 0x18, 0x0006);
22602                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
22603                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
22604 
22605                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
22606                 MP_WritePhyUshort(sc, 0x09, 0xA20F);
22607                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
22608 
22609                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
22610                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
22611                 Data = MP_ReadPhyUshort(sc, 0x06);
22612                 Data |= BIT_14;
22613                 MP_WritePhyUshort(sc, 0x06, Data);
22614                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
22615 
22616                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
22617                 MP_WritePhyUshort(sc, 0x05, 0x8B54);
22618                 Data = MP_ReadPhyUshort(sc, 0x06);
22619                 Data &= ~BIT_11;
22620                 MP_WritePhyUshort(sc, 0x06, Data);
22621                 MP_WritePhyUshort(sc, 0x05, 0x8B5D);
22622                 Data = MP_ReadPhyUshort(sc, 0x06);
22623                 Data &= ~BIT_11;
22624                 MP_WritePhyUshort(sc, 0x06, Data);
22625                 MP_WritePhyUshort(sc, 0x05, 0x8A7C);
22626                 Data = MP_ReadPhyUshort(sc, 0x06);
22627                 Data &= ~BIT_8;
22628                 MP_WritePhyUshort(sc, 0x06, Data);
22629                 MP_WritePhyUshort(sc, 0x05, 0x8A7F);
22630                 Data = MP_ReadPhyUshort(sc, 0x06);
22631                 Data |= BIT_8;
22632                 MP_WritePhyUshort(sc, 0x06, Data);
22633                 MP_WritePhyUshort(sc, 0x05, 0x8A82);
22634                 Data = MP_ReadPhyUshort(sc, 0x06);
22635                 Data &= ~BIT_8;
22636                 MP_WritePhyUshort(sc, 0x06, Data);
22637                 MP_WritePhyUshort(sc, 0x05, 0x8A85);
22638                 Data = MP_ReadPhyUshort(sc, 0x06);
22639                 Data &= ~BIT_8;
22640                 MP_WritePhyUshort(sc, 0x06, Data);
22641                 MP_WritePhyUshort(sc, 0x05, 0x8A88);
22642                 Data = MP_ReadPhyUshort(sc, 0x06);
22643                 Data &= ~BIT_8;
22644                 MP_WritePhyUshort(sc, 0x06, Data);
22645                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
22646 
22647                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
22648                 Data = MP_ReadPhyUshort(sc, 0x19);
22649                 Data &= ~BIT_0;
22650                 MP_WritePhyUshort(sc, 0x19, Data);
22651                 Data = MP_ReadPhyUshort(sc, 0x10);
22652                 Data &= ~BIT_10;
22653                 MP_WritePhyUshort(sc, 0x10, Data);
22654                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
22655         } else if (sc->re_type == MACFG_41) {
22656                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
22657                 MP_WritePhyUshort(sc, 0x11, MP_ReadPhyUshort(sc, 0x11) | 0x1000);
22658                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
22659                 MP_WritePhyUshort(sc, 0x0F, MP_ReadPhyUshort(sc, 0x0F) | 0x0003);
22660                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
22661 
22662                 for (Data_u32=0x800E0068; Data_u32<0x800E006D; Data_u32++) {
22663                         CSR_WRITE_4(sc, 0xF8, Data_u32);
22664                         for (i=0; i<10; i++) {
22665                                 DELAY(400);
22666                                 if ((CSR_READ_4(sc, 0xF8)&0x80000000)==0)
22667                                         break;
22668                         }
22669                 }
22670         } else if (sc->re_type == MACFG_42 || sc->re_type == MACFG_43) {
22671                 Data_u32 = re_eri_read(sc, 0x1D0, 4, ERIAR_ExGMAC);
22672                 Data_u32 &= 0xFFFF0000;
22673                 re_eri_write(sc, 0x1D0, 4, Data_u32, ERIAR_ExGMAC);
22674 
22675                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
22676                 MP_WritePhyUshort(sc, 0x18, 0x0310);
22677                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
22678 
22679                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
22680                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
22681                 MP_WritePhyUshort(sc, 0x19, 0x7070);
22682                 MP_WritePhyUshort(sc, 0x1c, 0x0600);
22683                 MP_WritePhyUshort(sc, 0x1d, 0x9700);
22684                 MP_WritePhyUshort(sc, 0x1d, 0x7d00);
22685                 MP_WritePhyUshort(sc, 0x1d, 0x6900);
22686                 MP_WritePhyUshort(sc, 0x1d, 0x7d00);
22687                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
22688                 MP_WritePhyUshort(sc, 0x1d, 0x4899);
22689                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
22690                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
22691                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
22692                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
22693                 MP_WritePhyUshort(sc, 0x1d, 0x8000);
22694                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
22695                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
22696                 MP_WritePhyUshort(sc, 0x1d, 0x4007);
22697                 MP_WritePhyUshort(sc, 0x1d, 0x4400);
22698                 MP_WritePhyUshort(sc, 0x1d, 0x4800);
22699                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
22700                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
22701                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
22702                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
22703                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
22704                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
22705                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22706                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22707                 MP_WritePhyUshort(sc, 0x1d, 0x571f);
22708                 MP_WritePhyUshort(sc, 0x1d, 0x5ffb);
22709                 MP_WritePhyUshort(sc, 0x1d, 0xaa03);
22710                 MP_WritePhyUshort(sc, 0x1d, 0x5b58);
22711                 MP_WritePhyUshort(sc, 0x1d, 0x301e);
22712                 MP_WritePhyUshort(sc, 0x1d, 0x5b64);
22713                 MP_WritePhyUshort(sc, 0x1d, 0xa6fc);
22714                 MP_WritePhyUshort(sc, 0x1d, 0xdcdb);
22715                 MP_WritePhyUshort(sc, 0x1d, 0x0014);
22716                 MP_WritePhyUshort(sc, 0x1d, 0xd9a9);
22717                 MP_WritePhyUshort(sc, 0x1d, 0x0013);
22718                 MP_WritePhyUshort(sc, 0x1d, 0xd16b);
22719                 MP_WritePhyUshort(sc, 0x1d, 0x0011);
22720                 MP_WritePhyUshort(sc, 0x1d, 0xb40e);
22721                 MP_WritePhyUshort(sc, 0x1d, 0xd06b);
22722                 MP_WritePhyUshort(sc, 0x1d, 0x000c);
22723                 MP_WritePhyUshort(sc, 0x1d, 0xb206);
22724                 MP_WritePhyUshort(sc, 0x1d, 0x7c01);
22725                 MP_WritePhyUshort(sc, 0x1d, 0x5800);
22726                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
22727                 MP_WritePhyUshort(sc, 0x1d, 0x5c00);
22728                 MP_WritePhyUshort(sc, 0x1d, 0x301a);
22729                 MP_WritePhyUshort(sc, 0x1d, 0x7c01);
22730                 MP_WritePhyUshort(sc, 0x1d, 0x5801);
22731                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
22732                 MP_WritePhyUshort(sc, 0x1d, 0x5c04);
22733                 MP_WritePhyUshort(sc, 0x1d, 0x301e);
22734                 MP_WritePhyUshort(sc, 0x1d, 0x314d);
22735                 MP_WritePhyUshort(sc, 0x1d, 0x31f0);
22736                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
22737                 MP_WritePhyUshort(sc, 0x1d, 0x4c20);
22738                 MP_WritePhyUshort(sc, 0x1d, 0x6004);
22739                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
22740                 MP_WritePhyUshort(sc, 0x1d, 0x4833);
22741                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
22742                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
22743                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
22744                 MP_WritePhyUshort(sc, 0x1d, 0x4c08);
22745                 MP_WritePhyUshort(sc, 0x1d, 0x8300);
22746                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
22747                 MP_WritePhyUshort(sc, 0x1d, 0x6600);
22748                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22749                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22750                 MP_WritePhyUshort(sc, 0x1d, 0xb90c);
22751                 MP_WritePhyUshort(sc, 0x1d, 0x30d3);
22752                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
22753                 MP_WritePhyUshort(sc, 0x1d, 0x4de0);
22754                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
22755                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
22756                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
22757                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
22758                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22759                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22760                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
22761                 MP_WritePhyUshort(sc, 0x1d, 0x300b);
22762                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
22763                 MP_WritePhyUshort(sc, 0x1d, 0x4c60);
22764                 MP_WritePhyUshort(sc, 0x1d, 0x6803);
22765                 MP_WritePhyUshort(sc, 0x1d, 0x6520);
22766                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22767                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22768                 MP_WritePhyUshort(sc, 0x1d, 0xaf03);
22769                 MP_WritePhyUshort(sc, 0x1d, 0x6015);
22770                 MP_WritePhyUshort(sc, 0x1d, 0x3059);
22771                 MP_WritePhyUshort(sc, 0x1d, 0x6017);
22772                 MP_WritePhyUshort(sc, 0x1d, 0x57e0);
22773                 MP_WritePhyUshort(sc, 0x1d, 0x580c);
22774                 MP_WritePhyUshort(sc, 0x1d, 0x588c);
22775                 MP_WritePhyUshort(sc, 0x1d, 0x7ffc);
22776                 MP_WritePhyUshort(sc, 0x1d, 0x5fa3);
22777                 MP_WritePhyUshort(sc, 0x1d, 0x4827);
22778                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
22779                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
22780                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
22781                 MP_WritePhyUshort(sc, 0x1d, 0x4c10);
22782                 MP_WritePhyUshort(sc, 0x1d, 0x8400);
22783                 MP_WritePhyUshort(sc, 0x1d, 0x7c30);
22784                 MP_WritePhyUshort(sc, 0x1d, 0x6020);
22785                 MP_WritePhyUshort(sc, 0x1d, 0x48bf);
22786                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
22787                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
22788                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
22789                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
22790                 MP_WritePhyUshort(sc, 0x1d, 0xad09);
22791                 MP_WritePhyUshort(sc, 0x1d, 0x7c03);
22792                 MP_WritePhyUshort(sc, 0x1d, 0x5c03);
22793                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22794                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22795                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22796                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22797                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22798                 MP_WritePhyUshort(sc, 0x1d, 0x4400);
22799                 MP_WritePhyUshort(sc, 0x1d, 0xad2c);
22800                 MP_WritePhyUshort(sc, 0x1d, 0xd6cf);
22801                 MP_WritePhyUshort(sc, 0x1d, 0x0002);
22802                 MP_WritePhyUshort(sc, 0x1d, 0x80f4);
22803                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
22804                 MP_WritePhyUshort(sc, 0x1d, 0x4c80);
22805                 MP_WritePhyUshort(sc, 0x1d, 0x7c20);
22806                 MP_WritePhyUshort(sc, 0x1d, 0x5c20);
22807                 MP_WritePhyUshort(sc, 0x1d, 0x481e);
22808                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
22809                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
22810                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
22811                 MP_WritePhyUshort(sc, 0x1d, 0x4c02);
22812                 MP_WritePhyUshort(sc, 0x1d, 0xad0a);
22813                 MP_WritePhyUshort(sc, 0x1d, 0x7c03);
22814                 MP_WritePhyUshort(sc, 0x1d, 0x5c03);
22815                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22816                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22817                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22818                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22819                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22820                 MP_WritePhyUshort(sc, 0x1d, 0x4400);
22821                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
22822                 MP_WritePhyUshort(sc, 0x1d, 0x8d02);
22823                 MP_WritePhyUshort(sc, 0x1d, 0x4401);
22824                 MP_WritePhyUshort(sc, 0x1d, 0x81f4);
22825                 MP_WritePhyUshort(sc, 0x1d, 0x3114);
22826                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
22827                 MP_WritePhyUshort(sc, 0x1d, 0x4d00);
22828                 MP_WritePhyUshort(sc, 0x1d, 0x4832);
22829                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
22830                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
22831                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
22832                 MP_WritePhyUshort(sc, 0x1d, 0x4c10);
22833                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
22834                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
22835                 MP_WritePhyUshort(sc, 0x1d, 0xa4b7);
22836                 MP_WritePhyUshort(sc, 0x1d, 0xd9b3);
22837                 MP_WritePhyUshort(sc, 0x1d, 0xfffe);
22838                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
22839                 MP_WritePhyUshort(sc, 0x1d, 0x4d20);
22840                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
22841                 MP_WritePhyUshort(sc, 0x1d, 0x6200);
22842                 MP_WritePhyUshort(sc, 0x1d, 0x3045);
22843                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
22844                 MP_WritePhyUshort(sc, 0x1d, 0x4d40);
22845                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
22846                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
22847                 MP_WritePhyUshort(sc, 0x1d, 0x4401);
22848                 MP_WritePhyUshort(sc, 0x1d, 0x5210);
22849                 MP_WritePhyUshort(sc, 0x1d, 0x4833);
22850                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
22851                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
22852                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
22853                 MP_WritePhyUshort(sc, 0x1d, 0x4c08);
22854                 MP_WritePhyUshort(sc, 0x1d, 0x8300);
22855                 MP_WritePhyUshort(sc, 0x1d, 0x5f80);
22856                 MP_WritePhyUshort(sc, 0x1d, 0x55e0);
22857                 MP_WritePhyUshort(sc, 0x1d, 0xc06f);
22858                 MP_WritePhyUshort(sc, 0x1d, 0x0005);
22859                 MP_WritePhyUshort(sc, 0x1d, 0xd9b3);
22860                 MP_WritePhyUshort(sc, 0x1d, 0xfffd);
22861                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
22862                 MP_WritePhyUshort(sc, 0x1d, 0x6040);
22863                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
22864                 MP_WritePhyUshort(sc, 0x1d, 0x4d60);
22865                 MP_WritePhyUshort(sc, 0x1d, 0x57e0);
22866                 MP_WritePhyUshort(sc, 0x1d, 0x4814);
22867                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
22868                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
22869                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
22870                 MP_WritePhyUshort(sc, 0x1d, 0x4c04);
22871                 MP_WritePhyUshort(sc, 0x1d, 0x8200);
22872                 MP_WritePhyUshort(sc, 0x1d, 0x7c03);
22873                 MP_WritePhyUshort(sc, 0x1d, 0x5c03);
22874                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22875                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22876                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22877                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22878                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22879                 MP_WritePhyUshort(sc, 0x1d, 0xad02);
22880                 MP_WritePhyUshort(sc, 0x1d, 0x4400);
22881                 MP_WritePhyUshort(sc, 0x1d, 0xc0e9);
22882                 MP_WritePhyUshort(sc, 0x1d, 0x0003);
22883                 MP_WritePhyUshort(sc, 0x1d, 0xadd8);
22884                 MP_WritePhyUshort(sc, 0x1d, 0x30c6);
22885                 MP_WritePhyUshort(sc, 0x1d, 0x3078);
22886                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
22887                 MP_WritePhyUshort(sc, 0x1d, 0x4dc0);
22888                 MP_WritePhyUshort(sc, 0x1d, 0x6730);
22889                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22890                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22891                 MP_WritePhyUshort(sc, 0x1d, 0xd09d);
22892                 MP_WritePhyUshort(sc, 0x1d, 0x0002);
22893                 MP_WritePhyUshort(sc, 0x1d, 0xb4fe);
22894                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
22895                 MP_WritePhyUshort(sc, 0x1d, 0x4d80);
22896                 MP_WritePhyUshort(sc, 0x1d, 0x6802);
22897                 MP_WritePhyUshort(sc, 0x1d, 0x6600);
22898                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22899                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22900                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
22901                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
22902                 MP_WritePhyUshort(sc, 0x1d, 0x486c);
22903                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
22904                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
22905                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
22906                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
22907                 MP_WritePhyUshort(sc, 0x1d, 0x9503);
22908                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
22909                 MP_WritePhyUshort(sc, 0x1d, 0x6200);
22910                 MP_WritePhyUshort(sc, 0x1d, 0x571f);
22911                 MP_WritePhyUshort(sc, 0x1d, 0x5fbb);
22912                 MP_WritePhyUshort(sc, 0x1d, 0xaa03);
22913                 MP_WritePhyUshort(sc, 0x1d, 0x5b58);
22914                 MP_WritePhyUshort(sc, 0x1d, 0x30e9);
22915                 MP_WritePhyUshort(sc, 0x1d, 0x5b64);
22916                 MP_WritePhyUshort(sc, 0x1d, 0xcdab);
22917                 MP_WritePhyUshort(sc, 0x1d, 0xff5b);
22918                 MP_WritePhyUshort(sc, 0x1d, 0xcd8d);
22919                 MP_WritePhyUshort(sc, 0x1d, 0xff59);
22920                 MP_WritePhyUshort(sc, 0x1d, 0xd96b);
22921                 MP_WritePhyUshort(sc, 0x1d, 0xff57);
22922                 MP_WritePhyUshort(sc, 0x1d, 0xd0a0);
22923                 MP_WritePhyUshort(sc, 0x1d, 0xffdb);
22924                 MP_WritePhyUshort(sc, 0x1d, 0xcba0);
22925                 MP_WritePhyUshort(sc, 0x1d, 0x0003);
22926                 MP_WritePhyUshort(sc, 0x1d, 0x80f0);
22927                 MP_WritePhyUshort(sc, 0x1d, 0x30f6);
22928                 MP_WritePhyUshort(sc, 0x1d, 0x3109);
22929                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
22930                 MP_WritePhyUshort(sc, 0x1d, 0x4ce0);
22931                 MP_WritePhyUshort(sc, 0x1d, 0x7d30);
22932                 MP_WritePhyUshort(sc, 0x1d, 0x6530);
22933                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22934                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22935                 MP_WritePhyUshort(sc, 0x1d, 0x7ce0);
22936                 MP_WritePhyUshort(sc, 0x1d, 0x5400);
22937                 MP_WritePhyUshort(sc, 0x1d, 0x4832);
22938                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
22939                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
22940                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
22941                 MP_WritePhyUshort(sc, 0x1d, 0x4c08);
22942                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
22943                 MP_WritePhyUshort(sc, 0x1d, 0x6008);
22944                 MP_WritePhyUshort(sc, 0x1d, 0x8300);
22945                 MP_WritePhyUshort(sc, 0x1d, 0xb902);
22946                 MP_WritePhyUshort(sc, 0x1d, 0x30d3);
22947                 MP_WritePhyUshort(sc, 0x1d, 0x308f);
22948                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
22949                 MP_WritePhyUshort(sc, 0x1d, 0x4da0);
22950                 MP_WritePhyUshort(sc, 0x1d, 0x57a0);
22951                 MP_WritePhyUshort(sc, 0x1d, 0x590c);
22952                 MP_WritePhyUshort(sc, 0x1d, 0x5fa2);
22953                 MP_WritePhyUshort(sc, 0x1d, 0xcba4);
22954                 MP_WritePhyUshort(sc, 0x1d, 0x0005);
22955                 MP_WritePhyUshort(sc, 0x1d, 0xcd8d);
22956                 MP_WritePhyUshort(sc, 0x1d, 0x0003);
22957                 MP_WritePhyUshort(sc, 0x1d, 0x80fc);
22958                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
22959                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
22960                 MP_WritePhyUshort(sc, 0x1d, 0x4ca0);
22961                 MP_WritePhyUshort(sc, 0x1d, 0xb603);
22962                 MP_WritePhyUshort(sc, 0x1d, 0x7c10);
22963                 MP_WritePhyUshort(sc, 0x1d, 0x6010);
22964                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
22965                 MP_WritePhyUshort(sc, 0x1d, 0x541f);
22966                 MP_WritePhyUshort(sc, 0x1d, 0x7ffc);
22967                 MP_WritePhyUshort(sc, 0x1d, 0x5fb3);
22968                 MP_WritePhyUshort(sc, 0x1d, 0x9403);
22969                 MP_WritePhyUshort(sc, 0x1d, 0x7c03);
22970                 MP_WritePhyUshort(sc, 0x1d, 0x5c03);
22971                 MP_WritePhyUshort(sc, 0x1d, 0xaa05);
22972                 MP_WritePhyUshort(sc, 0x1d, 0x7c80);
22973                 MP_WritePhyUshort(sc, 0x1d, 0x5800);
22974                 MP_WritePhyUshort(sc, 0x1d, 0x5b58);
22975                 MP_WritePhyUshort(sc, 0x1d, 0x3128);
22976                 MP_WritePhyUshort(sc, 0x1d, 0x7c80);
22977                 MP_WritePhyUshort(sc, 0x1d, 0x5800);
22978                 MP_WritePhyUshort(sc, 0x1d, 0x5b64);
22979                 MP_WritePhyUshort(sc, 0x1d, 0x4827);
22980                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
22981                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
22982                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
22983                 MP_WritePhyUshort(sc, 0x1d, 0x4c10);
22984                 MP_WritePhyUshort(sc, 0x1d, 0x8400);
22985                 MP_WritePhyUshort(sc, 0x1d, 0x7c10);
22986                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
22987                 MP_WritePhyUshort(sc, 0x1d, 0x4824);
22988                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
22989                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
22990                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
22991                 MP_WritePhyUshort(sc, 0x1d, 0x4c04);
22992                 MP_WritePhyUshort(sc, 0x1d, 0x8200);
22993                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
22994                 MP_WritePhyUshort(sc, 0x1d, 0x4cc0);
22995                 MP_WritePhyUshort(sc, 0x1d, 0x7d00);
22996                 MP_WritePhyUshort(sc, 0x1d, 0x6400);
22997                 MP_WritePhyUshort(sc, 0x1d, 0x7ffc);
22998                 MP_WritePhyUshort(sc, 0x1d, 0x5fbb);
22999                 MP_WritePhyUshort(sc, 0x1d, 0x4824);
23000                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23001                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
23002                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23003                 MP_WritePhyUshort(sc, 0x1d, 0x4c04);
23004                 MP_WritePhyUshort(sc, 0x1d, 0x8200);
23005                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
23006                 MP_WritePhyUshort(sc, 0x1d, 0x6a00);
23007                 MP_WritePhyUshort(sc, 0x1d, 0x4824);
23008                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23009                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
23010                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23011                 MP_WritePhyUshort(sc, 0x1d, 0x4c04);
23012                 MP_WritePhyUshort(sc, 0x1d, 0x8200);
23013                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
23014                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
23015                 MP_WritePhyUshort(sc, 0x1d, 0x30f6);
23016                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23017                 MP_WritePhyUshort(sc, 0x1d, 0x4e00);
23018                 MP_WritePhyUshort(sc, 0x1d, 0x4007);
23019                 MP_WritePhyUshort(sc, 0x1d, 0x4400);
23020                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
23021                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
23022                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
23023                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23024                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23025                 MP_WritePhyUshort(sc, 0x1d, 0x570f);
23026                 MP_WritePhyUshort(sc, 0x1d, 0x5fff);
23027                 MP_WritePhyUshort(sc, 0x1d, 0xaa03);
23028                 MP_WritePhyUshort(sc, 0x1d, 0x585b);
23029                 MP_WritePhyUshort(sc, 0x1d, 0x315c);
23030                 MP_WritePhyUshort(sc, 0x1d, 0x5867);
23031                 MP_WritePhyUshort(sc, 0x1d, 0x9402);
23032                 MP_WritePhyUshort(sc, 0x1d, 0x6200);
23033                 MP_WritePhyUshort(sc, 0x1d, 0xcda3);
23034                 MP_WritePhyUshort(sc, 0x1d, 0x009d);
23035                 MP_WritePhyUshort(sc, 0x1d, 0xcd85);
23036                 MP_WritePhyUshort(sc, 0x1d, 0x009b);
23037                 MP_WritePhyUshort(sc, 0x1d, 0xd96b);
23038                 MP_WritePhyUshort(sc, 0x1d, 0x0099);
23039                 MP_WritePhyUshort(sc, 0x1d, 0x96e9);
23040                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
23041                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
23042                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23043                 MP_WritePhyUshort(sc, 0x1d, 0x4e20);
23044                 MP_WritePhyUshort(sc, 0x1d, 0x96e4);
23045                 MP_WritePhyUshort(sc, 0x1d, 0x8b04);
23046                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
23047                 MP_WritePhyUshort(sc, 0x1d, 0x5008);
23048                 MP_WritePhyUshort(sc, 0x1d, 0xab03);
23049                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
23050                 MP_WritePhyUshort(sc, 0x1d, 0x5000);
23051                 MP_WritePhyUshort(sc, 0x1d, 0x6801);
23052                 MP_WritePhyUshort(sc, 0x1d, 0x6776);
23053                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23054                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23055                 MP_WritePhyUshort(sc, 0x1d, 0xdb7c);
23056                 MP_WritePhyUshort(sc, 0x1d, 0xfff0);
23057                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23058                 MP_WritePhyUshort(sc, 0x1d, 0x7fe1);
23059                 MP_WritePhyUshort(sc, 0x1d, 0x4e40);
23060                 MP_WritePhyUshort(sc, 0x1d, 0x4837);
23061                 MP_WritePhyUshort(sc, 0x1d, 0x4418);
23062                 MP_WritePhyUshort(sc, 0x1d, 0x41c7);
23063                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23064                 MP_WritePhyUshort(sc, 0x1d, 0x4e40);
23065                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
23066                 MP_WritePhyUshort(sc, 0x1d, 0x5400);
23067                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23068                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
23069                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23070                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
23071                 MP_WritePhyUshort(sc, 0x1d, 0x8fc9);
23072                 MP_WritePhyUshort(sc, 0x1d, 0xd2a0);
23073                 MP_WritePhyUshort(sc, 0x1d, 0x004a);
23074                 MP_WritePhyUshort(sc, 0x1d, 0x9203);
23075                 MP_WritePhyUshort(sc, 0x1d, 0xa041);
23076                 MP_WritePhyUshort(sc, 0x1d, 0x3184);
23077                 MP_WritePhyUshort(sc, 0x1d, 0x7fe1);
23078                 MP_WritePhyUshort(sc, 0x1d, 0x4e60);
23079                 MP_WritePhyUshort(sc, 0x1d, 0x489c);
23080                 MP_WritePhyUshort(sc, 0x1d, 0x4628);
23081                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23082                 MP_WritePhyUshort(sc, 0x1d, 0x4e60);
23083                 MP_WritePhyUshort(sc, 0x1d, 0x7e28);
23084                 MP_WritePhyUshort(sc, 0x1d, 0x4628);
23085                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
23086                 MP_WritePhyUshort(sc, 0x1d, 0x5400);
23087                 MP_WritePhyUshort(sc, 0x1d, 0x7c01);
23088                 MP_WritePhyUshort(sc, 0x1d, 0x5800);
23089                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
23090                 MP_WritePhyUshort(sc, 0x1d, 0x5c00);
23091                 MP_WritePhyUshort(sc, 0x1d, 0x41e8);
23092                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23093                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
23094                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23095                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
23096                 MP_WritePhyUshort(sc, 0x1d, 0x8fb0);
23097                 MP_WritePhyUshort(sc, 0x1d, 0xb241);
23098                 MP_WritePhyUshort(sc, 0x1d, 0xa02a);
23099                 MP_WritePhyUshort(sc, 0x1d, 0x319d);
23100                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23101                 MP_WritePhyUshort(sc, 0x1d, 0x4ea0);
23102                 MP_WritePhyUshort(sc, 0x1d, 0x7c02);
23103                 MP_WritePhyUshort(sc, 0x1d, 0x4402);
23104                 MP_WritePhyUshort(sc, 0x1d, 0x4448);
23105                 MP_WritePhyUshort(sc, 0x1d, 0x4894);
23106                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23107                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
23108                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23109                 MP_WritePhyUshort(sc, 0x1d, 0x4c03);
23110                 MP_WritePhyUshort(sc, 0x1d, 0x4824);
23111                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23112                 MP_WritePhyUshort(sc, 0x1d, 0x4c07);
23113                 MP_WritePhyUshort(sc, 0x1d, 0x41ef);
23114                 MP_WritePhyUshort(sc, 0x1d, 0x41ff);
23115                 MP_WritePhyUshort(sc, 0x1d, 0x4891);
23116                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23117                 MP_WritePhyUshort(sc, 0x1d, 0x4c07);
23118                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23119                 MP_WritePhyUshort(sc, 0x1d, 0x4c17);
23120                 MP_WritePhyUshort(sc, 0x1d, 0x8400);
23121                 MP_WritePhyUshort(sc, 0x1d, 0x8ef8);
23122                 MP_WritePhyUshort(sc, 0x1d, 0x41c7);
23123                 MP_WritePhyUshort(sc, 0x1d, 0x8f95);
23124                 MP_WritePhyUshort(sc, 0x1d, 0x92d5);
23125                 MP_WritePhyUshort(sc, 0x1d, 0xa10f);
23126                 MP_WritePhyUshort(sc, 0x1d, 0xd480);
23127                 MP_WritePhyUshort(sc, 0x1d, 0x0008);
23128                 MP_WritePhyUshort(sc, 0x1d, 0xd580);
23129                 MP_WritePhyUshort(sc, 0x1d, 0xffb9);
23130                 MP_WritePhyUshort(sc, 0x1d, 0xa202);
23131                 MP_WritePhyUshort(sc, 0x1d, 0x31b8);
23132                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
23133                 MP_WritePhyUshort(sc, 0x1d, 0x4404);
23134                 MP_WritePhyUshort(sc, 0x1d, 0x31b8);
23135                 MP_WritePhyUshort(sc, 0x1d, 0xd484);
23136                 MP_WritePhyUshort(sc, 0x1d, 0xfff3);
23137                 MP_WritePhyUshort(sc, 0x1d, 0xd484);
23138                 MP_WritePhyUshort(sc, 0x1d, 0xfff1);
23139                 MP_WritePhyUshort(sc, 0x1d, 0x314d);
23140                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23141                 MP_WritePhyUshort(sc, 0x1d, 0x4ee0);
23142                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
23143                 MP_WritePhyUshort(sc, 0x1d, 0x5400);
23144                 MP_WritePhyUshort(sc, 0x1d, 0x4488);
23145                 MP_WritePhyUshort(sc, 0x1d, 0x41cf);
23146                 MP_WritePhyUshort(sc, 0x1d, 0x314d);
23147                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23148                 MP_WritePhyUshort(sc, 0x1d, 0x4ec0);
23149                 MP_WritePhyUshort(sc, 0x1d, 0x48f3);
23150                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23151                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
23152                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23153                 MP_WritePhyUshort(sc, 0x1d, 0x4c09);
23154                 MP_WritePhyUshort(sc, 0x1d, 0x4508);
23155                 MP_WritePhyUshort(sc, 0x1d, 0x41c7);
23156                 MP_WritePhyUshort(sc, 0x1d, 0x8f24);
23157                 MP_WritePhyUshort(sc, 0x1d, 0xd218);
23158                 MP_WritePhyUshort(sc, 0x1d, 0x0022);
23159                 MP_WritePhyUshort(sc, 0x1d, 0xd2a4);
23160                 MP_WritePhyUshort(sc, 0x1d, 0xff9f);
23161                 MP_WritePhyUshort(sc, 0x1d, 0x31d9);
23162                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23163                 MP_WritePhyUshort(sc, 0x1d, 0x4e80);
23164                 MP_WritePhyUshort(sc, 0x1d, 0x4832);
23165                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23166                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
23167                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23168                 MP_WritePhyUshort(sc, 0x1d, 0x4c11);
23169                 MP_WritePhyUshort(sc, 0x1d, 0x4428);
23170                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
23171                 MP_WritePhyUshort(sc, 0x1d, 0x5440);
23172                 MP_WritePhyUshort(sc, 0x1d, 0x7c01);
23173                 MP_WritePhyUshort(sc, 0x1d, 0x5801);
23174                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
23175                 MP_WritePhyUshort(sc, 0x1d, 0x5c04);
23176                 MP_WritePhyUshort(sc, 0x1d, 0x41e8);
23177                 MP_WritePhyUshort(sc, 0x1d, 0xa4b3);
23178                 MP_WritePhyUshort(sc, 0x1d, 0x31ee);
23179                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
23180                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
23181                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23182                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23183                 MP_WritePhyUshort(sc, 0x1d, 0x570f);
23184                 MP_WritePhyUshort(sc, 0x1d, 0x5fff);
23185                 MP_WritePhyUshort(sc, 0x1d, 0xaa03);
23186                 MP_WritePhyUshort(sc, 0x1d, 0x585b);
23187                 MP_WritePhyUshort(sc, 0x1d, 0x31fa);
23188                 MP_WritePhyUshort(sc, 0x1d, 0x5867);
23189                 MP_WritePhyUshort(sc, 0x1d, 0xbcf6);
23190                 MP_WritePhyUshort(sc, 0x1d, 0x300b);
23191                 MP_WritePhyUshort(sc, 0x1d, 0x300b);
23192                 MP_WritePhyUshort(sc, 0x1d, 0x314d);
23193                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
23194                 MP_WritePhyUshort(sc, 0x1c, 0x0200);
23195                 MP_WritePhyUshort(sc, 0x19, 0x7030);
23196                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
23197 
23198                 if (CSR_READ_1(sc, 0xEF)&0x08) {
23199                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
23200                         MP_WritePhyUshort(sc, 0x1A, 0x0004);
23201                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
23202                 } else {
23203                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
23204                         MP_WritePhyUshort(sc, 0x1A, 0x0000);
23205                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
23206                 }
23207 
23208                 if (CSR_READ_1(sc, 0xEF)&0x10) {
23209                         MP_WritePhyUshort(sc, 0x1F, 0x0004);
23210                         MP_WritePhyUshort(sc, 0x1C, 0x0000);
23211                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
23212                 } else {
23213                         MP_WritePhyUshort(sc, 0x1F, 0x0004);
23214                         MP_WritePhyUshort(sc, 0x1C, 0x0200);
23215                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
23216                 }
23217 
23218                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
23219                 MP_WritePhyUshort(sc, 0x15, 0x7701);
23220                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
23221 
23222                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
23223                 ClearEthPhyBit(sc, 0x1A, BIT_14);
23224 
23225                 if (phy_power_saving == 1) {
23226                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
23227                         MP_WritePhyUshort(sc, 0x18, 0x8310);
23228                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
23229                 } else {
23230                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
23231                         MP_WritePhyUshort(sc, 0x18, 0x0310);
23232                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
23233                         DELAY(20000);
23234                 }
23235 
23236                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
23237                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
23238                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
23239                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
23240                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
23241                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
23242                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
23243                 MP_WritePhyUshort(sc, 0x0D, 0x0003);
23244                 MP_WritePhyUshort(sc, 0x0E, 0x0015);
23245                 MP_WritePhyUshort(sc, 0x0D, 0x4003);
23246                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
23247                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
23248 
23249         } else if (sc->re_type == MACFG_50) {
23250                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
23251                 MP_WritePhyUshort(sc, 0x05, 0x8B80);
23252                 Data = MP_ReadPhyUshort(sc, 0x06);
23253                 Data |= BIT_2 | BIT_1;
23254                 MP_WritePhyUshort(sc, 0x06, Data);
23255                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
23256 
23257                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
23258                 MP_WritePhyUshort(sc, 0x1E, 0x002D);
23259                 Data = MP_ReadPhyUshort(sc, 0x18);
23260                 Data |= BIT_4;
23261                 MP_WritePhyUshort(sc, 0x18, Data);
23262                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
23263                 Data = MP_ReadPhyUshort(sc, 0x14);
23264                 Data |= BIT_15;
23265                 MP_WritePhyUshort(sc, 0x14, Data);
23266 
23267                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
23268                 MP_WritePhyUshort(sc, 0x05, 0x8B86);
23269                 Data = MP_ReadPhyUshort(sc, 0x06);
23270                 Data |= BIT_0;
23271                 MP_WritePhyUshort(sc, 0x06, Data);
23272                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
23273 
23274                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
23275                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
23276                 Data = MP_ReadPhyUshort(sc, 0x06);
23277                 Data |= BIT_14;
23278                 MP_WritePhyUshort(sc, 0x06, Data);
23279                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
23280 
23281                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
23282                 MP_WritePhyUshort(sc, 0x09, 0xA20F);
23283                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
23284 
23285                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
23286                 MP_WritePhyUshort(sc, 0x05, 0x8B55);
23287                 MP_WritePhyUshort(sc, 0x06, 0x0000);
23288                 MP_WritePhyUshort(sc, 0x05, 0x8B5E);
23289                 MP_WritePhyUshort(sc, 0x06, 0x0000);
23290                 MP_WritePhyUshort(sc, 0x05, 0x8B67);
23291                 MP_WritePhyUshort(sc, 0x06, 0x0000);
23292                 MP_WritePhyUshort(sc, 0x05, 0x8B70);
23293                 MP_WritePhyUshort(sc, 0x06, 0x0000);
23294                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
23295                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
23296                 MP_WritePhyUshort(sc, 0x1E, 0x0078);
23297                 MP_WritePhyUshort(sc, 0x17, 0x0000);
23298                 MP_WritePhyUshort(sc, 0x19, 0x00FB);
23299                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
23300 
23301                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
23302                 MP_WritePhyUshort(sc, 0x05, 0x8B79);
23303                 MP_WritePhyUshort(sc, 0x06, 0xAA00);
23304                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
23305 
23306                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
23307                 MP_WritePhyUshort(sc, 0x01, 0x328A);
23308                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
23309 
23310                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
23311                 MP_WritePhyUshort(sc, 0x05, 0x8B54);
23312                 Data = MP_ReadPhyUshort(sc, 0x06);
23313                 Data &= ~BIT_11;
23314                 MP_WritePhyUshort(sc, 0x06, Data);
23315                 MP_WritePhyUshort(sc, 0x05, 0x8B5D);
23316                 Data = MP_ReadPhyUshort(sc, 0x06);
23317                 Data &= ~BIT_11;
23318                 MP_WritePhyUshort(sc, 0x06, Data);
23319                 MP_WritePhyUshort(sc, 0x05, 0x8A7C);
23320                 Data = MP_ReadPhyUshort(sc, 0x06);
23321                 Data &= ~BIT_8;
23322                 MP_WritePhyUshort(sc, 0x06, Data);
23323                 MP_WritePhyUshort(sc, 0x05, 0x8A7F);
23324                 Data = MP_ReadPhyUshort(sc, 0x06);
23325                 Data |= BIT_8;
23326                 MP_WritePhyUshort(sc, 0x06, Data);
23327                 MP_WritePhyUshort(sc, 0x05, 0x8A82);
23328                 Data = MP_ReadPhyUshort(sc, 0x06);
23329                 Data &= ~BIT_8;
23330                 MP_WritePhyUshort(sc, 0x06, Data);
23331                 MP_WritePhyUshort(sc, 0x05, 0x8A85);
23332                 Data = MP_ReadPhyUshort(sc, 0x06);
23333                 Data &= ~BIT_8;
23334                 MP_WritePhyUshort(sc, 0x06, Data);
23335                 MP_WritePhyUshort(sc, 0x05, 0x8A88);
23336                 Data = MP_ReadPhyUshort(sc, 0x06);
23337                 Data &= ~BIT_8;
23338                 MP_WritePhyUshort(sc, 0x06, Data);
23339                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
23340 
23341                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
23342                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
23343                 Data = MP_ReadPhyUshort(sc, 0x06);
23344                 Data |= BIT_15;
23345                 MP_WritePhyUshort(sc, 0x06, Data);
23346                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
23347 
23348                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
23349                 Data = MP_ReadPhyUshort(sc, 0x19);
23350                 Data &= ~BIT_0;
23351                 MP_WritePhyUshort(sc, 0x19, Data);
23352                 Data = MP_ReadPhyUshort(sc, 0x10);
23353                 Data &= ~BIT_10;
23354                 MP_WritePhyUshort(sc, 0x10, Data);
23355                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
23356         } else if (sc->re_type == MACFG_51) {
23357                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
23358                 MP_WritePhyUshort(sc, 0x05, 0x8B80);
23359                 Data = MP_ReadPhyUshort(sc, 0x06);
23360                 Data |= BIT_2 | BIT_1;
23361                 MP_WritePhyUshort(sc, 0x06, Data);
23362                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
23363 
23364                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
23365                 MP_WritePhyUshort(sc, 0x1E, 0x002D);
23366                 Data = MP_ReadPhyUshort(sc, 0x18);
23367                 Data |= BIT_4;
23368                 MP_WritePhyUshort(sc, 0x18, Data);
23369                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
23370                 Data = MP_ReadPhyUshort(sc, 0x14);
23371                 Data |= BIT_15;
23372                 MP_WritePhyUshort(sc, 0x14, Data);
23373 
23374                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
23375                 MP_WritePhyUshort(sc, 0x05, 0x8B86);
23376                 Data = MP_ReadPhyUshort(sc, 0x06);
23377                 Data |= BIT_0;
23378                 MP_WritePhyUshort(sc, 0x06, Data);
23379                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
23380 
23381                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
23382                 MP_WritePhyUshort(sc, 0x05, 0x8B54);
23383                 Data = MP_ReadPhyUshort(sc, 0x06);
23384                 Data &= ~BIT_11;
23385                 MP_WritePhyUshort(sc, 0x06, Data);
23386                 MP_WritePhyUshort(sc, 0x05, 0x8B5D);
23387                 Data = MP_ReadPhyUshort(sc, 0x06);
23388                 Data &= ~BIT_11;
23389                 MP_WritePhyUshort(sc, 0x06, Data);
23390                 MP_WritePhyUshort(sc, 0x05, 0x8A7C);
23391                 Data = MP_ReadPhyUshort(sc, 0x06);
23392                 Data &= ~BIT_8;
23393                 MP_WritePhyUshort(sc, 0x06, Data);
23394                 MP_WritePhyUshort(sc, 0x05, 0x8A7F);
23395                 Data = MP_ReadPhyUshort(sc, 0x06);
23396                 Data |= BIT_8;
23397                 MP_WritePhyUshort(sc, 0x06, Data);
23398                 MP_WritePhyUshort(sc, 0x05, 0x8A82);
23399                 Data = MP_ReadPhyUshort(sc, 0x06);
23400                 Data &= ~BIT_8;
23401                 MP_WritePhyUshort(sc, 0x06, Data);
23402                 MP_WritePhyUshort(sc, 0x05, 0x8A85);
23403                 Data = MP_ReadPhyUshort(sc, 0x06);
23404                 Data &= ~BIT_8;
23405                 MP_WritePhyUshort(sc, 0x06, Data);
23406                 MP_WritePhyUshort(sc, 0x05, 0x8A88);
23407                 Data = MP_ReadPhyUshort(sc, 0x06);
23408                 Data &= ~BIT_8;
23409                 MP_WritePhyUshort(sc, 0x06, Data);
23410                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
23411 
23412                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
23413                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
23414                 Data = MP_ReadPhyUshort(sc, 0x06);
23415                 Data |= BIT_15;
23416                 MP_WritePhyUshort(sc, 0x06, Data);
23417                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
23418 
23419                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
23420                 Data = MP_ReadPhyUshort(sc, 0x19);
23421                 Data &= ~BIT_0;
23422                 MP_WritePhyUshort(sc, 0x19, Data);
23423                 Data = MP_ReadPhyUshort(sc, 0x10);
23424                 Data &= ~BIT_10;
23425                 MP_WritePhyUshort(sc, 0x10, Data);
23426                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
23427         } else if (sc->re_type == MACFG_52) {
23428                 Data_u32 = re_eri_read(sc, 0x1D0, 4, ERIAR_ExGMAC);
23429                 Data_u32 &= ~BIT_1;
23430                 re_eri_write(sc, 0x1D0, 4, Data_u32, ERIAR_ExGMAC);
23431 
23432                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
23433                 MP_WritePhyUshort(sc, 0x05, 0x8B80);
23434                 Data = MP_ReadPhyUshort(sc, 0x06);
23435                 Data |= BIT_2 | BIT_1;
23436                 MP_WritePhyUshort(sc, 0x06, Data);
23437                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
23438 
23439                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
23440                 MP_WritePhyUshort(sc, 0x1E, 0x002D);
23441                 Data = MP_ReadPhyUshort(sc, 0x18);
23442                 Data |= BIT_4;
23443                 MP_WritePhyUshort(sc, 0x18, Data);
23444                 MP_WritePhyUshort(sc, 0x1f, 0x0002);
23445                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
23446                 Data = MP_ReadPhyUshort(sc, 0x14);
23447                 Data |= BIT_15;
23448                 MP_WritePhyUshort(sc, 0x14, Data);
23449 
23450                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
23451                 MP_WritePhyUshort(sc, 0x05, 0x8B86);
23452                 Data = MP_ReadPhyUshort(sc, 0x06);
23453                 Data |= BIT_0;
23454                 MP_WritePhyUshort(sc, 0x06, Data);
23455                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
23456 
23457                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
23458                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
23459                 Data = MP_ReadPhyUshort(sc, 0x06);
23460                 Data |= BIT_14;
23461                 MP_WritePhyUshort(sc, 0x06, Data);
23462                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
23463 
23464                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
23465                 MP_WritePhyUshort(sc, 0x09, 0xA20F);
23466                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
23467 
23468                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
23469                 MP_WritePhyUshort(sc, 0x05, 0x8B55);
23470                 MP_WritePhyUshort(sc, 0x06, 0x0000);
23471                 MP_WritePhyUshort(sc, 0x05, 0x8B5E);
23472                 MP_WritePhyUshort(sc, 0x06, 0x0000);
23473                 MP_WritePhyUshort(sc, 0x05, 0x8B67);
23474                 MP_WritePhyUshort(sc, 0x06, 0x0000);
23475                 MP_WritePhyUshort(sc, 0x05, 0x8B70);
23476                 MP_WritePhyUshort(sc, 0x06, 0x0000);
23477                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
23478                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
23479                 MP_WritePhyUshort(sc, 0x1E, 0x0078);
23480                 MP_WritePhyUshort(sc, 0x17, 0x0000);
23481                 MP_WritePhyUshort(sc, 0x19, 0x00FB);
23482                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
23483 
23484                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
23485                 MP_WritePhyUshort(sc, 0x05, 0x8B79);
23486                 MP_WritePhyUshort(sc, 0x06, 0xAA00);
23487                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
23488 
23489                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
23490                 MP_WritePhyUshort(sc, 0x01, 0x328A);
23491                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
23492 
23493                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
23494                 MP_WritePhyUshort(sc, 0x05, 0x8B54);
23495                 Data = MP_ReadPhyUshort(sc, 0x06);
23496                 Data &= ~BIT_11;
23497                 MP_WritePhyUshort(sc, 0x06, Data);
23498                 MP_WritePhyUshort(sc, 0x05, 0x8B5D);
23499                 Data = MP_ReadPhyUshort(sc, 0x06);
23500                 Data &= ~BIT_11;
23501                 MP_WritePhyUshort(sc, 0x06, Data);
23502                 MP_WritePhyUshort(sc, 0x05, 0x8A7C);
23503                 Data = MP_ReadPhyUshort(sc, 0x06);
23504                 Data &= ~BIT_8;
23505                 MP_WritePhyUshort(sc, 0x06, Data);
23506                 MP_WritePhyUshort(sc, 0x05, 0x8A7F);
23507                 Data = MP_ReadPhyUshort(sc, 0x06);
23508                 Data |= BIT_8;
23509                 MP_WritePhyUshort(sc, 0x06, Data);
23510                 MP_WritePhyUshort(sc, 0x05, 0x8A82);
23511                 Data = MP_ReadPhyUshort(sc, 0x06);
23512                 Data &= ~BIT_8;
23513                 MP_WritePhyUshort(sc, 0x06, Data);
23514                 MP_WritePhyUshort(sc, 0x05, 0x8A85);
23515                 Data = MP_ReadPhyUshort(sc, 0x06);
23516                 Data &= ~BIT_8;
23517                 MP_WritePhyUshort(sc, 0x06, Data);
23518                 MP_WritePhyUshort(sc, 0x05, 0x8A88);
23519                 Data = MP_ReadPhyUshort(sc, 0x06);
23520                 Data &= ~BIT_8;
23521                 MP_WritePhyUshort(sc, 0x06, Data);
23522                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
23523 
23524                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
23525                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
23526                 Data = MP_ReadPhyUshort(sc, 0x06);
23527                 Data |= BIT_15;
23528                 MP_WritePhyUshort(sc, 0x06, Data);
23529                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
23530 
23531                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
23532                 Data = MP_ReadPhyUshort(sc, 0x19);
23533                 Data &= ~BIT_0;
23534                 MP_WritePhyUshort(sc, 0x19, Data);
23535                 Data = MP_ReadPhyUshort(sc, 0x10);
23536                 Data &= ~BIT_10;
23537                 MP_WritePhyUshort(sc, 0x10, Data);
23538                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
23539         } else if (sc->re_type == MACFG_53) {
23540                 Data_u32 = re_eri_read(sc, 0x1D0, 4, ERIAR_ExGMAC);
23541                 Data_u32 &= 0xFFFF0000;
23542                 re_eri_write(sc, 0x1D0, 4, Data_u32, ERIAR_ExGMAC);
23543 
23544                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
23545                 MP_WritePhyUshort(sc, 0x18, 0x0310);
23546                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
23547 
23548                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
23549                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
23550                 MP_WritePhyUshort(sc, 0x19, 0x7070);
23551                 MP_WritePhyUshort(sc, 0x1c, 0x0600);
23552                 MP_WritePhyUshort(sc, 0x1d, 0x9700);
23553                 MP_WritePhyUshort(sc, 0x1d, 0x7d00);
23554                 MP_WritePhyUshort(sc, 0x1d, 0x6900);
23555                 MP_WritePhyUshort(sc, 0x1d, 0x7d00);
23556                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
23557                 MP_WritePhyUshort(sc, 0x1d, 0x4899);
23558                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23559                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
23560                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23561                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
23562                 MP_WritePhyUshort(sc, 0x1d, 0x8000);
23563                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23564                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
23565                 MP_WritePhyUshort(sc, 0x1d, 0x4007);
23566                 MP_WritePhyUshort(sc, 0x1d, 0x4400);
23567                 MP_WritePhyUshort(sc, 0x1d, 0x4800);
23568                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23569                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
23570                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
23571                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
23572                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
23573                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
23574                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23575                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23576                 MP_WritePhyUshort(sc, 0x1d, 0x571f);
23577                 MP_WritePhyUshort(sc, 0x1d, 0x5ffb);
23578                 MP_WritePhyUshort(sc, 0x1d, 0xaa03);
23579                 MP_WritePhyUshort(sc, 0x1d, 0x5b58);
23580                 MP_WritePhyUshort(sc, 0x1d, 0x301e);
23581                 MP_WritePhyUshort(sc, 0x1d, 0x5b64);
23582                 MP_WritePhyUshort(sc, 0x1d, 0xa6fc);
23583                 MP_WritePhyUshort(sc, 0x1d, 0xdcdb);
23584                 MP_WritePhyUshort(sc, 0x1d, 0x0015);
23585                 MP_WritePhyUshort(sc, 0x1d, 0xb915);
23586                 MP_WritePhyUshort(sc, 0x1d, 0xb511);
23587                 MP_WritePhyUshort(sc, 0x1d, 0xd16b);
23588                 MP_WritePhyUshort(sc, 0x1d, 0x000f);
23589                 MP_WritePhyUshort(sc, 0x1d, 0xb40f);
23590                 MP_WritePhyUshort(sc, 0x1d, 0xd06b);
23591                 MP_WritePhyUshort(sc, 0x1d, 0x000d);
23592                 MP_WritePhyUshort(sc, 0x1d, 0xb206);
23593                 MP_WritePhyUshort(sc, 0x1d, 0x7c01);
23594                 MP_WritePhyUshort(sc, 0x1d, 0x5800);
23595                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
23596                 MP_WritePhyUshort(sc, 0x1d, 0x5c00);
23597                 MP_WritePhyUshort(sc, 0x1d, 0x301a);
23598                 MP_WritePhyUshort(sc, 0x1d, 0x7c01);
23599                 MP_WritePhyUshort(sc, 0x1d, 0x5801);
23600                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
23601                 MP_WritePhyUshort(sc, 0x1d, 0x5c04);
23602                 MP_WritePhyUshort(sc, 0x1d, 0x301e);
23603                 MP_WritePhyUshort(sc, 0x1d, 0x3079);
23604                 MP_WritePhyUshort(sc, 0x1d, 0x30f1);
23605                 MP_WritePhyUshort(sc, 0x1d, 0x3199);
23606                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23607                 MP_WritePhyUshort(sc, 0x1d, 0x4c60);
23608                 MP_WritePhyUshort(sc, 0x1d, 0x6803);
23609                 MP_WritePhyUshort(sc, 0x1d, 0x6420);
23610                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23611                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23612                 MP_WritePhyUshort(sc, 0x1d, 0xaf03);
23613                 MP_WritePhyUshort(sc, 0x1d, 0x6015);
23614                 MP_WritePhyUshort(sc, 0x1d, 0x3040);
23615                 MP_WritePhyUshort(sc, 0x1d, 0x6017);
23616                 MP_WritePhyUshort(sc, 0x1d, 0x57e0);
23617                 MP_WritePhyUshort(sc, 0x1d, 0x580c);
23618                 MP_WritePhyUshort(sc, 0x1d, 0x588c);
23619                 MP_WritePhyUshort(sc, 0x1d, 0x5fa3);
23620                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23621                 MP_WritePhyUshort(sc, 0x1d, 0x4827);
23622                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23623                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
23624                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23625                 MP_WritePhyUshort(sc, 0x1d, 0x4c10);
23626                 MP_WritePhyUshort(sc, 0x1d, 0x8400);
23627                 MP_WritePhyUshort(sc, 0x1d, 0x7c30);
23628                 MP_WritePhyUshort(sc, 0x1d, 0x6020);
23629                 MP_WritePhyUshort(sc, 0x1d, 0x48bf);
23630                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23631                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
23632                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23633                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
23634                 MP_WritePhyUshort(sc, 0x1d, 0xd6cf);
23635                 MP_WritePhyUshort(sc, 0x1d, 0x0002);
23636                 MP_WritePhyUshort(sc, 0x1d, 0x80fe);
23637                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23638                 MP_WritePhyUshort(sc, 0x1d, 0x4c80);
23639                 MP_WritePhyUshort(sc, 0x1d, 0x7c20);
23640                 MP_WritePhyUshort(sc, 0x1d, 0x5c20);
23641                 MP_WritePhyUshort(sc, 0x1d, 0x481e);
23642                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23643                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
23644                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23645                 MP_WritePhyUshort(sc, 0x1d, 0x4c02);
23646                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
23647                 MP_WritePhyUshort(sc, 0x1d, 0x81ff);
23648                 MP_WritePhyUshort(sc, 0x1d, 0x30ba);
23649                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23650                 MP_WritePhyUshort(sc, 0x1d, 0x4d00);
23651                 MP_WritePhyUshort(sc, 0x1d, 0x4832);
23652                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23653                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
23654                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23655                 MP_WritePhyUshort(sc, 0x1d, 0x4c10);
23656                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
23657                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
23658                 MP_WritePhyUshort(sc, 0x1d, 0xa4cc);
23659                 MP_WritePhyUshort(sc, 0x1d, 0xd9b3);
23660                 MP_WritePhyUshort(sc, 0x1d, 0xfffe);
23661                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23662                 MP_WritePhyUshort(sc, 0x1d, 0x4d20);
23663                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
23664                 MP_WritePhyUshort(sc, 0x1d, 0x6200);
23665                 MP_WritePhyUshort(sc, 0x1d, 0x300b);
23666                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23667                 MP_WritePhyUshort(sc, 0x1d, 0x4dc0);
23668                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23669                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23670                 MP_WritePhyUshort(sc, 0x1d, 0xd09d);
23671                 MP_WritePhyUshort(sc, 0x1d, 0x0002);
23672                 MP_WritePhyUshort(sc, 0x1d, 0xb4fe);
23673                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23674                 MP_WritePhyUshort(sc, 0x1d, 0x4d80);
23675                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
23676                 MP_WritePhyUshort(sc, 0x1d, 0x6004);
23677                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
23678                 MP_WritePhyUshort(sc, 0x1d, 0x6802);
23679                 MP_WritePhyUshort(sc, 0x1d, 0x6720);
23680                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23681                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23682                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
23683                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
23684                 MP_WritePhyUshort(sc, 0x1d, 0x486c);
23685                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23686                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
23687                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23688                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
23689                 MP_WritePhyUshort(sc, 0x1d, 0x9503);
23690                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
23691                 MP_WritePhyUshort(sc, 0x1d, 0x6200);
23692                 MP_WritePhyUshort(sc, 0x1d, 0x571f);
23693                 MP_WritePhyUshort(sc, 0x1d, 0x5fbb);
23694                 MP_WritePhyUshort(sc, 0x1d, 0xaa03);
23695                 MP_WritePhyUshort(sc, 0x1d, 0x5b58);
23696                 MP_WritePhyUshort(sc, 0x1d, 0x3092);
23697                 MP_WritePhyUshort(sc, 0x1d, 0x5b64);
23698                 MP_WritePhyUshort(sc, 0x1d, 0xcdab);
23699                 MP_WritePhyUshort(sc, 0x1d, 0xff78);
23700                 MP_WritePhyUshort(sc, 0x1d, 0xcd8d);
23701                 MP_WritePhyUshort(sc, 0x1d, 0xff76);
23702                 MP_WritePhyUshort(sc, 0x1d, 0xd96b);
23703                 MP_WritePhyUshort(sc, 0x1d, 0xff74);
23704                 MP_WritePhyUshort(sc, 0x1d, 0xd0a0);
23705                 MP_WritePhyUshort(sc, 0x1d, 0xffd9);
23706                 MP_WritePhyUshort(sc, 0x1d, 0xcba0);
23707                 MP_WritePhyUshort(sc, 0x1d, 0x0003);
23708                 MP_WritePhyUshort(sc, 0x1d, 0x80f0);
23709                 MP_WritePhyUshort(sc, 0x1d, 0x309f);
23710                 MP_WritePhyUshort(sc, 0x1d, 0x30ac);
23711                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23712                 MP_WritePhyUshort(sc, 0x1d, 0x4ce0);
23713                 MP_WritePhyUshort(sc, 0x1d, 0x4832);
23714                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23715                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
23716                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23717                 MP_WritePhyUshort(sc, 0x1d, 0x4c08);
23718                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
23719                 MP_WritePhyUshort(sc, 0x1d, 0x6008);
23720                 MP_WritePhyUshort(sc, 0x1d, 0x8300);
23721                 MP_WritePhyUshort(sc, 0x1d, 0xb902);
23722                 MP_WritePhyUshort(sc, 0x1d, 0x3079);
23723                 MP_WritePhyUshort(sc, 0x1d, 0x3061);
23724                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23725                 MP_WritePhyUshort(sc, 0x1d, 0x4da0);
23726                 MP_WritePhyUshort(sc, 0x1d, 0x6400);
23727                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23728                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23729                 MP_WritePhyUshort(sc, 0x1d, 0x57a0);
23730                 MP_WritePhyUshort(sc, 0x1d, 0x590c);
23731                 MP_WritePhyUshort(sc, 0x1d, 0x5fa3);
23732                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23733                 MP_WritePhyUshort(sc, 0x1d, 0xcba4);
23734                 MP_WritePhyUshort(sc, 0x1d, 0x0004);
23735                 MP_WritePhyUshort(sc, 0x1d, 0xcd8d);
23736                 MP_WritePhyUshort(sc, 0x1d, 0x0002);
23737                 MP_WritePhyUshort(sc, 0x1d, 0x80fc);
23738                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23739                 MP_WritePhyUshort(sc, 0x1d, 0x4ca0);
23740                 MP_WritePhyUshort(sc, 0x1d, 0xb603);
23741                 MP_WritePhyUshort(sc, 0x1d, 0x7c10);
23742                 MP_WritePhyUshort(sc, 0x1d, 0x6010);
23743                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23744                 MP_WritePhyUshort(sc, 0x1d, 0x541f);
23745                 MP_WritePhyUshort(sc, 0x1d, 0x5fb3);
23746                 MP_WritePhyUshort(sc, 0x1d, 0xaa05);
23747                 MP_WritePhyUshort(sc, 0x1d, 0x7c80);
23748                 MP_WritePhyUshort(sc, 0x1d, 0x5800);
23749                 MP_WritePhyUshort(sc, 0x1d, 0x5b58);
23750                 MP_WritePhyUshort(sc, 0x1d, 0x30ca);
23751                 MP_WritePhyUshort(sc, 0x1d, 0x7c80);
23752                 MP_WritePhyUshort(sc, 0x1d, 0x5800);
23753                 MP_WritePhyUshort(sc, 0x1d, 0x5b64);
23754                 MP_WritePhyUshort(sc, 0x1d, 0x4824);
23755                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23756                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
23757                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23758                 MP_WritePhyUshort(sc, 0x1d, 0x4c04);
23759                 MP_WritePhyUshort(sc, 0x1d, 0x8200);
23760                 MP_WritePhyUshort(sc, 0x1d, 0x4827);
23761                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23762                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
23763                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23764                 MP_WritePhyUshort(sc, 0x1d, 0x4c10);
23765                 MP_WritePhyUshort(sc, 0x1d, 0x8400);
23766                 MP_WritePhyUshort(sc, 0x1d, 0x7c10);
23767                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
23768                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23769                 MP_WritePhyUshort(sc, 0x1d, 0x4cc0);
23770                 MP_WritePhyUshort(sc, 0x1d, 0x5fbb);
23771                 MP_WritePhyUshort(sc, 0x1d, 0x4824);
23772                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23773                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
23774                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23775                 MP_WritePhyUshort(sc, 0x1d, 0x4c04);
23776                 MP_WritePhyUshort(sc, 0x1d, 0x8200);
23777                 MP_WritePhyUshort(sc, 0x1d, 0x7ce0);
23778                 MP_WritePhyUshort(sc, 0x1d, 0x5400);
23779                 MP_WritePhyUshort(sc, 0x1d, 0x6720);
23780                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23781                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23782                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
23783                 MP_WritePhyUshort(sc, 0x1d, 0x6a00);
23784                 MP_WritePhyUshort(sc, 0x1d, 0x4824);
23785                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23786                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
23787                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23788                 MP_WritePhyUshort(sc, 0x1d, 0x4c04);
23789                 MP_WritePhyUshort(sc, 0x1d, 0x8200);
23790                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
23791                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
23792                 MP_WritePhyUshort(sc, 0x1d, 0x309f);
23793                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23794                 MP_WritePhyUshort(sc, 0x1d, 0x4e00);
23795                 MP_WritePhyUshort(sc, 0x1d, 0x4007);
23796                 MP_WritePhyUshort(sc, 0x1d, 0x4400);
23797                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
23798                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
23799                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
23800                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23801                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23802                 MP_WritePhyUshort(sc, 0x1d, 0x570f);
23803                 MP_WritePhyUshort(sc, 0x1d, 0x5fff);
23804                 MP_WritePhyUshort(sc, 0x1d, 0xaa03);
23805                 MP_WritePhyUshort(sc, 0x1d, 0x585b);
23806                 MP_WritePhyUshort(sc, 0x1d, 0x3100);
23807                 MP_WritePhyUshort(sc, 0x1d, 0x5867);
23808                 MP_WritePhyUshort(sc, 0x1d, 0x9403);
23809                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
23810                 MP_WritePhyUshort(sc, 0x1d, 0x6200);
23811                 MP_WritePhyUshort(sc, 0x1d, 0xcda3);
23812                 MP_WritePhyUshort(sc, 0x1d, 0x002d);
23813                 MP_WritePhyUshort(sc, 0x1d, 0xcd85);
23814                 MP_WritePhyUshort(sc, 0x1d, 0x002b);
23815                 MP_WritePhyUshort(sc, 0x1d, 0xd96b);
23816                 MP_WritePhyUshort(sc, 0x1d, 0x0029);
23817                 MP_WritePhyUshort(sc, 0x1d, 0x9629);
23818                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
23819                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
23820                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23821                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23822                 MP_WritePhyUshort(sc, 0x1d, 0x9624);
23823                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23824                 MP_WritePhyUshort(sc, 0x1d, 0x4e20);
23825                 MP_WritePhyUshort(sc, 0x1d, 0x8b04);
23826                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
23827                 MP_WritePhyUshort(sc, 0x1d, 0x5008);
23828                 MP_WritePhyUshort(sc, 0x1d, 0xab03);
23829                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
23830                 MP_WritePhyUshort(sc, 0x1d, 0x5000);
23831                 MP_WritePhyUshort(sc, 0x1d, 0x6801);
23832                 MP_WritePhyUshort(sc, 0x1d, 0x6776);
23833                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23834                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23835                 MP_WritePhyUshort(sc, 0x1d, 0xdb7c);
23836                 MP_WritePhyUshort(sc, 0x1d, 0xffee);
23837                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23838                 MP_WritePhyUshort(sc, 0x1d, 0x7fe1);
23839                 MP_WritePhyUshort(sc, 0x1d, 0x4e40);
23840                 MP_WritePhyUshort(sc, 0x1d, 0x4837);
23841                 MP_WritePhyUshort(sc, 0x1d, 0x4418);
23842                 MP_WritePhyUshort(sc, 0x1d, 0x41c7);
23843                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23844                 MP_WritePhyUshort(sc, 0x1d, 0x4e40);
23845                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
23846                 MP_WritePhyUshort(sc, 0x1d, 0x5400);
23847                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23848                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
23849                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23850                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
23851                 MP_WritePhyUshort(sc, 0x1d, 0x8f07);
23852                 MP_WritePhyUshort(sc, 0x1d, 0xd2a0);
23853                 MP_WritePhyUshort(sc, 0x1d, 0x004c);
23854                 MP_WritePhyUshort(sc, 0x1d, 0x9205);
23855                 MP_WritePhyUshort(sc, 0x1d, 0xa043);
23856                 MP_WritePhyUshort(sc, 0x1d, 0x312b);
23857                 MP_WritePhyUshort(sc, 0x1d, 0x300b);
23858                 MP_WritePhyUshort(sc, 0x1d, 0x30f1);
23859                 MP_WritePhyUshort(sc, 0x1d, 0x7fe1);
23860                 MP_WritePhyUshort(sc, 0x1d, 0x4e60);
23861                 MP_WritePhyUshort(sc, 0x1d, 0x489c);
23862                 MP_WritePhyUshort(sc, 0x1d, 0x4628);
23863                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23864                 MP_WritePhyUshort(sc, 0x1d, 0x4e60);
23865                 MP_WritePhyUshort(sc, 0x1d, 0x7e28);
23866                 MP_WritePhyUshort(sc, 0x1d, 0x4628);
23867                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
23868                 MP_WritePhyUshort(sc, 0x1d, 0x5400);
23869                 MP_WritePhyUshort(sc, 0x1d, 0x7c01);
23870                 MP_WritePhyUshort(sc, 0x1d, 0x5800);
23871                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
23872                 MP_WritePhyUshort(sc, 0x1d, 0x5c00);
23873                 MP_WritePhyUshort(sc, 0x1d, 0x41e8);
23874                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23875                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
23876                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23877                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
23878                 MP_WritePhyUshort(sc, 0x1d, 0x8fec);
23879                 MP_WritePhyUshort(sc, 0x1d, 0xb241);
23880                 MP_WritePhyUshort(sc, 0x1d, 0xa02a);
23881                 MP_WritePhyUshort(sc, 0x1d, 0x3146);
23882                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23883                 MP_WritePhyUshort(sc, 0x1d, 0x4ea0);
23884                 MP_WritePhyUshort(sc, 0x1d, 0x7c02);
23885                 MP_WritePhyUshort(sc, 0x1d, 0x4402);
23886                 MP_WritePhyUshort(sc, 0x1d, 0x4448);
23887                 MP_WritePhyUshort(sc, 0x1d, 0x4894);
23888                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23889                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
23890                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23891                 MP_WritePhyUshort(sc, 0x1d, 0x4c03);
23892                 MP_WritePhyUshort(sc, 0x1d, 0x4824);
23893                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23894                 MP_WritePhyUshort(sc, 0x1d, 0x4c07);
23895                 MP_WritePhyUshort(sc, 0x1d, 0x41ef);
23896                 MP_WritePhyUshort(sc, 0x1d, 0x41ff);
23897                 MP_WritePhyUshort(sc, 0x1d, 0x4891);
23898                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23899                 MP_WritePhyUshort(sc, 0x1d, 0x4c07);
23900                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23901                 MP_WritePhyUshort(sc, 0x1d, 0x4c17);
23902                 MP_WritePhyUshort(sc, 0x1d, 0x8400);
23903                 MP_WritePhyUshort(sc, 0x1d, 0x8ef8);
23904                 MP_WritePhyUshort(sc, 0x1d, 0x41c7);
23905                 MP_WritePhyUshort(sc, 0x1d, 0x8fd1);
23906                 MP_WritePhyUshort(sc, 0x1d, 0x92d5);
23907                 MP_WritePhyUshort(sc, 0x1d, 0xa10f);
23908                 MP_WritePhyUshort(sc, 0x1d, 0xd480);
23909                 MP_WritePhyUshort(sc, 0x1d, 0x0008);
23910                 MP_WritePhyUshort(sc, 0x1d, 0xd580);
23911                 MP_WritePhyUshort(sc, 0x1d, 0xffb7);
23912                 MP_WritePhyUshort(sc, 0x1d, 0xa202);
23913                 MP_WritePhyUshort(sc, 0x1d, 0x3161);
23914                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
23915                 MP_WritePhyUshort(sc, 0x1d, 0x4404);
23916                 MP_WritePhyUshort(sc, 0x1d, 0x3161);
23917                 MP_WritePhyUshort(sc, 0x1d, 0xd484);
23918                 MP_WritePhyUshort(sc, 0x1d, 0xfff3);
23919                 MP_WritePhyUshort(sc, 0x1d, 0xd484);
23920                 MP_WritePhyUshort(sc, 0x1d, 0xfff1);
23921                 MP_WritePhyUshort(sc, 0x1d, 0x30f1);
23922                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23923                 MP_WritePhyUshort(sc, 0x1d, 0x4ee0);
23924                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
23925                 MP_WritePhyUshort(sc, 0x1d, 0x5400);
23926                 MP_WritePhyUshort(sc, 0x1d, 0x4488);
23927                 MP_WritePhyUshort(sc, 0x1d, 0x41cf);
23928                 MP_WritePhyUshort(sc, 0x1d, 0x30f1);
23929                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23930                 MP_WritePhyUshort(sc, 0x1d, 0x4ec0);
23931                 MP_WritePhyUshort(sc, 0x1d, 0x48f3);
23932                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23933                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
23934                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23935                 MP_WritePhyUshort(sc, 0x1d, 0x4c09);
23936                 MP_WritePhyUshort(sc, 0x1d, 0x4508);
23937                 MP_WritePhyUshort(sc, 0x1d, 0x41c7);
23938                 MP_WritePhyUshort(sc, 0x1d, 0x8fb0);
23939                 MP_WritePhyUshort(sc, 0x1d, 0xd218);
23940                 MP_WritePhyUshort(sc, 0x1d, 0xffae);
23941                 MP_WritePhyUshort(sc, 0x1d, 0xd2a4);
23942                 MP_WritePhyUshort(sc, 0x1d, 0xff9d);
23943                 MP_WritePhyUshort(sc, 0x1d, 0x3182);
23944                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23945                 MP_WritePhyUshort(sc, 0x1d, 0x4e80);
23946                 MP_WritePhyUshort(sc, 0x1d, 0x4832);
23947                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23948                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
23949                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
23950                 MP_WritePhyUshort(sc, 0x1d, 0x4c11);
23951                 MP_WritePhyUshort(sc, 0x1d, 0x4428);
23952                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
23953                 MP_WritePhyUshort(sc, 0x1d, 0x5440);
23954                 MP_WritePhyUshort(sc, 0x1d, 0x7c01);
23955                 MP_WritePhyUshort(sc, 0x1d, 0x5801);
23956                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
23957                 MP_WritePhyUshort(sc, 0x1d, 0x5c04);
23958                 MP_WritePhyUshort(sc, 0x1d, 0x41e8);
23959                 MP_WritePhyUshort(sc, 0x1d, 0xa4b3);
23960                 MP_WritePhyUshort(sc, 0x1d, 0x3197);
23961                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
23962                 MP_WritePhyUshort(sc, 0x1d, 0x4f20);
23963                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
23964                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
23965                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23966                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
23967                 MP_WritePhyUshort(sc, 0x1d, 0x570f);
23968                 MP_WritePhyUshort(sc, 0x1d, 0x5fff);
23969                 MP_WritePhyUshort(sc, 0x1d, 0xaa03);
23970                 MP_WritePhyUshort(sc, 0x1d, 0x585b);
23971                 MP_WritePhyUshort(sc, 0x1d, 0x31a5);
23972                 MP_WritePhyUshort(sc, 0x1d, 0x5867);
23973                 MP_WritePhyUshort(sc, 0x1d, 0xbcf4);
23974                 MP_WritePhyUshort(sc, 0x1d, 0x300b);
23975                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
23976                 MP_WritePhyUshort(sc, 0x1c, 0x0200);
23977                 MP_WritePhyUshort(sc, 0x19, 0x7030);
23978                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
23979 
23980                 if (phy_power_saving == 1) {
23981                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
23982                         MP_WritePhyUshort(sc, 0x18, 0x8310);
23983                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
23984                 } else {
23985                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
23986                         MP_WritePhyUshort(sc, 0x18, 0x0310);
23987                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
23988                         DELAY(20000);
23989                 }
23990 
23991                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
23992                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
23993                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
23994                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
23995                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
23996                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
23997         } else if (sc->re_type == MACFG_54 || sc->re_type == MACFG_55) {
23998                 Data_u32 = re_eri_read(sc, 0x1D0, 4, ERIAR_ExGMAC);
23999                 Data_u32 &= 0xFFFF0000;
24000                 re_eri_write(sc, 0x1D0, 4, Data_u32, ERIAR_ExGMAC);
24001 
24002                 if (sc->re_type == MACFG_55) {
24003                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
24004                         MP_WritePhyUshort(sc, 0x18, 0x0310);
24005                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
24006 
24007                         MP_WritePhyUshort(sc, 0x1f, 0x0004);
24008                         MP_WritePhyUshort(sc, 0x1f, 0x0004);
24009                         MP_WritePhyUshort(sc, 0x19, 0x7070);
24010                         MP_WritePhyUshort(sc, 0x1c, 0x0600);
24011                         MP_WritePhyUshort(sc, 0x1d, 0x9700);
24012                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
24013                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
24014                         MP_WritePhyUshort(sc, 0x1d, 0x4007);
24015                         MP_WritePhyUshort(sc, 0x1d, 0x4400);
24016                         MP_WritePhyUshort(sc, 0x1d, 0x4800);
24017                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24018                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
24019                         MP_WritePhyUshort(sc, 0x1d, 0x5310);
24020                         MP_WritePhyUshort(sc, 0x1d, 0x6000);
24021                         MP_WritePhyUshort(sc, 0x1d, 0x6800);
24022                         MP_WritePhyUshort(sc, 0x1d, 0x673e);
24023                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24024                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24025                         MP_WritePhyUshort(sc, 0x1d, 0x571f);
24026                         MP_WritePhyUshort(sc, 0x1d, 0x5ffb);
24027                         MP_WritePhyUshort(sc, 0x1d, 0xaa04);
24028                         MP_WritePhyUshort(sc, 0x1d, 0x5b58);
24029                         MP_WritePhyUshort(sc, 0x1d, 0x6100);
24030                         MP_WritePhyUshort(sc, 0x1d, 0x3016);
24031                         MP_WritePhyUshort(sc, 0x1d, 0x5b64);
24032                         MP_WritePhyUshort(sc, 0x1d, 0x6080);
24033                         MP_WritePhyUshort(sc, 0x1d, 0xa6fa);
24034                         MP_WritePhyUshort(sc, 0x1d, 0xdcdb);
24035                         MP_WritePhyUshort(sc, 0x1d, 0x0015);
24036                         MP_WritePhyUshort(sc, 0x1d, 0xb915);
24037                         MP_WritePhyUshort(sc, 0x1d, 0xb511);
24038                         MP_WritePhyUshort(sc, 0x1d, 0xd16b);
24039                         MP_WritePhyUshort(sc, 0x1d, 0x000f);
24040                         MP_WritePhyUshort(sc, 0x1d, 0xb40f);
24041                         MP_WritePhyUshort(sc, 0x1d, 0xd06b);
24042                         MP_WritePhyUshort(sc, 0x1d, 0x000d);
24043                         MP_WritePhyUshort(sc, 0x1d, 0xb206);
24044                         MP_WritePhyUshort(sc, 0x1d, 0x7c01);
24045                         MP_WritePhyUshort(sc, 0x1d, 0x5800);
24046                         MP_WritePhyUshort(sc, 0x1d, 0x7c04);
24047                         MP_WritePhyUshort(sc, 0x1d, 0x5c00);
24048                         MP_WritePhyUshort(sc, 0x1d, 0x3010);
24049                         MP_WritePhyUshort(sc, 0x1d, 0x7c01);
24050                         MP_WritePhyUshort(sc, 0x1d, 0x5801);
24051                         MP_WritePhyUshort(sc, 0x1d, 0x7c04);
24052                         MP_WritePhyUshort(sc, 0x1d, 0x5c04);
24053                         MP_WritePhyUshort(sc, 0x1d, 0x3016);
24054                         MP_WritePhyUshort(sc, 0x1d, 0x307e);
24055                         MP_WritePhyUshort(sc, 0x1d, 0x30f4);
24056                         MP_WritePhyUshort(sc, 0x1d, 0x319f);
24057                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
24058                         MP_WritePhyUshort(sc, 0x1d, 0x4c60);
24059                         MP_WritePhyUshort(sc, 0x1d, 0x6803);
24060                         MP_WritePhyUshort(sc, 0x1d, 0x7d00);
24061                         MP_WritePhyUshort(sc, 0x1d, 0x6900);
24062                         MP_WritePhyUshort(sc, 0x1d, 0x6520);
24063                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24064                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24065                         MP_WritePhyUshort(sc, 0x1d, 0xaf03);
24066                         MP_WritePhyUshort(sc, 0x1d, 0x6115);
24067                         MP_WritePhyUshort(sc, 0x1d, 0x303a);
24068                         MP_WritePhyUshort(sc, 0x1d, 0x6097);
24069                         MP_WritePhyUshort(sc, 0x1d, 0x57e0);
24070                         MP_WritePhyUshort(sc, 0x1d, 0x580c);
24071                         MP_WritePhyUshort(sc, 0x1d, 0x588c);
24072                         MP_WritePhyUshort(sc, 0x1d, 0x5f80);
24073                         MP_WritePhyUshort(sc, 0x1d, 0x4827);
24074                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24075                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
24076                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24077                         MP_WritePhyUshort(sc, 0x1d, 0x4c10);
24078                         MP_WritePhyUshort(sc, 0x1d, 0x8400);
24079                         MP_WritePhyUshort(sc, 0x1d, 0x7c30);
24080                         MP_WritePhyUshort(sc, 0x1d, 0x6020);
24081                         MP_WritePhyUshort(sc, 0x1d, 0x48bf);
24082                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24083                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
24084                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24085                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
24086                         MP_WritePhyUshort(sc, 0x1d, 0xb802);
24087                         MP_WritePhyUshort(sc, 0x1d, 0x3053);
24088                         MP_WritePhyUshort(sc, 0x1d, 0x7c08);
24089                         MP_WritePhyUshort(sc, 0x1d, 0x6808);
24090                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24091                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24092                         MP_WritePhyUshort(sc, 0x1d, 0x7c10);
24093                         MP_WritePhyUshort(sc, 0x1d, 0x6810);
24094                         MP_WritePhyUshort(sc, 0x1d, 0xd6cf);
24095                         MP_WritePhyUshort(sc, 0x1d, 0x0002);
24096                         MP_WritePhyUshort(sc, 0x1d, 0x80fe);
24097                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
24098                         MP_WritePhyUshort(sc, 0x1d, 0x4c80);
24099                         MP_WritePhyUshort(sc, 0x1d, 0x7c10);
24100                         MP_WritePhyUshort(sc, 0x1d, 0x6800);
24101                         MP_WritePhyUshort(sc, 0x1d, 0x7c08);
24102                         MP_WritePhyUshort(sc, 0x1d, 0x6800);
24103                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24104                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24105                         MP_WritePhyUshort(sc, 0x1d, 0x7c23);
24106                         MP_WritePhyUshort(sc, 0x1d, 0x5c23);
24107                         MP_WritePhyUshort(sc, 0x1d, 0x481e);
24108                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24109                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
24110                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24111                         MP_WritePhyUshort(sc, 0x1d, 0x4c02);
24112                         MP_WritePhyUshort(sc, 0x1d, 0x5310);
24113                         MP_WritePhyUshort(sc, 0x1d, 0x81ff);
24114                         MP_WritePhyUshort(sc, 0x1d, 0x30c1);
24115                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
24116                         MP_WritePhyUshort(sc, 0x1d, 0x4d00);
24117                         MP_WritePhyUshort(sc, 0x1d, 0x4832);
24118                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24119                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
24120                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24121                         MP_WritePhyUshort(sc, 0x1d, 0x4c10);
24122                         MP_WritePhyUshort(sc, 0x1d, 0x7c08);
24123                         MP_WritePhyUshort(sc, 0x1d, 0x6000);
24124                         MP_WritePhyUshort(sc, 0x1d, 0xa4bd);
24125                         MP_WritePhyUshort(sc, 0x1d, 0xd9b3);
24126                         MP_WritePhyUshort(sc, 0x1d, 0x00fe);
24127                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
24128                         MP_WritePhyUshort(sc, 0x1d, 0x4d20);
24129                         MP_WritePhyUshort(sc, 0x1d, 0x7e00);
24130                         MP_WritePhyUshort(sc, 0x1d, 0x6200);
24131                         MP_WritePhyUshort(sc, 0x1d, 0x3001);
24132                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
24133                         MP_WritePhyUshort(sc, 0x1d, 0x4dc0);
24134                         MP_WritePhyUshort(sc, 0x1d, 0xd09d);
24135                         MP_WritePhyUshort(sc, 0x1d, 0x0002);
24136                         MP_WritePhyUshort(sc, 0x1d, 0xb4fe);
24137                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
24138                         MP_WritePhyUshort(sc, 0x1d, 0x4d80);
24139                         MP_WritePhyUshort(sc, 0x1d, 0x7c04);
24140                         MP_WritePhyUshort(sc, 0x1d, 0x6004);
24141                         MP_WritePhyUshort(sc, 0x1d, 0x6802);
24142                         MP_WritePhyUshort(sc, 0x1d, 0x6728);
24143                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24144                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24145                         MP_WritePhyUshort(sc, 0x1d, 0x7c08);
24146                         MP_WritePhyUshort(sc, 0x1d, 0x6000);
24147                         MP_WritePhyUshort(sc, 0x1d, 0x486c);
24148                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24149                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
24150                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24151                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
24152                         MP_WritePhyUshort(sc, 0x1d, 0x9503);
24153                         MP_WritePhyUshort(sc, 0x1d, 0x7e00);
24154                         MP_WritePhyUshort(sc, 0x1d, 0x6200);
24155                         MP_WritePhyUshort(sc, 0x1d, 0x571f);
24156                         MP_WritePhyUshort(sc, 0x1d, 0x5fbb);
24157                         MP_WritePhyUshort(sc, 0x1d, 0xaa05);
24158                         MP_WritePhyUshort(sc, 0x1d, 0x5b58);
24159                         MP_WritePhyUshort(sc, 0x1d, 0x7d80);
24160                         MP_WritePhyUshort(sc, 0x1d, 0x6100);
24161                         MP_WritePhyUshort(sc, 0x1d, 0x309a);
24162                         MP_WritePhyUshort(sc, 0x1d, 0x5b64);
24163                         MP_WritePhyUshort(sc, 0x1d, 0x7d80);
24164                         MP_WritePhyUshort(sc, 0x1d, 0x6080);
24165                         MP_WritePhyUshort(sc, 0x1d, 0xcdab);
24166                         MP_WritePhyUshort(sc, 0x1d, 0x0058);
24167                         MP_WritePhyUshort(sc, 0x1d, 0xcd8d);
24168                         MP_WritePhyUshort(sc, 0x1d, 0x0056);
24169                         MP_WritePhyUshort(sc, 0x1d, 0xd96b);
24170                         MP_WritePhyUshort(sc, 0x1d, 0x0054);
24171                         MP_WritePhyUshort(sc, 0x1d, 0xd0a0);
24172                         MP_WritePhyUshort(sc, 0x1d, 0x00d8);
24173                         MP_WritePhyUshort(sc, 0x1d, 0xcba0);
24174                         MP_WritePhyUshort(sc, 0x1d, 0x0003);
24175                         MP_WritePhyUshort(sc, 0x1d, 0x80ec);
24176                         MP_WritePhyUshort(sc, 0x1d, 0x30a7);
24177                         MP_WritePhyUshort(sc, 0x1d, 0x30b4);
24178                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
24179                         MP_WritePhyUshort(sc, 0x1d, 0x4ce0);
24180                         MP_WritePhyUshort(sc, 0x1d, 0x4832);
24181                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24182                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
24183                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24184                         MP_WritePhyUshort(sc, 0x1d, 0x4c08);
24185                         MP_WritePhyUshort(sc, 0x1d, 0x7c08);
24186                         MP_WritePhyUshort(sc, 0x1d, 0x6008);
24187                         MP_WritePhyUshort(sc, 0x1d, 0x8300);
24188                         MP_WritePhyUshort(sc, 0x1d, 0xb902);
24189                         MP_WritePhyUshort(sc, 0x1d, 0x307e);
24190                         MP_WritePhyUshort(sc, 0x1d, 0x3068);
24191                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
24192                         MP_WritePhyUshort(sc, 0x1d, 0x4da0);
24193                         MP_WritePhyUshort(sc, 0x1d, 0x6608);
24194                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24195                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24196                         MP_WritePhyUshort(sc, 0x1d, 0x56a0);
24197                         MP_WritePhyUshort(sc, 0x1d, 0x590c);
24198                         MP_WritePhyUshort(sc, 0x1d, 0x5fa0);
24199                         MP_WritePhyUshort(sc, 0x1d, 0xcba4);
24200                         MP_WritePhyUshort(sc, 0x1d, 0x0004);
24201                         MP_WritePhyUshort(sc, 0x1d, 0xcd8d);
24202                         MP_WritePhyUshort(sc, 0x1d, 0x0002);
24203                         MP_WritePhyUshort(sc, 0x1d, 0x80fc);
24204                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
24205                         MP_WritePhyUshort(sc, 0x1d, 0x4ca0);
24206                         MP_WritePhyUshort(sc, 0x1d, 0x7c08);
24207                         MP_WritePhyUshort(sc, 0x1d, 0x6408);
24208                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24209                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24210                         MP_WritePhyUshort(sc, 0x1d, 0x7d00);
24211                         MP_WritePhyUshort(sc, 0x1d, 0x6800);
24212                         MP_WritePhyUshort(sc, 0x1d, 0xb603);
24213                         MP_WritePhyUshort(sc, 0x1d, 0x7c10);
24214                         MP_WritePhyUshort(sc, 0x1d, 0x6010);
24215                         MP_WritePhyUshort(sc, 0x1d, 0x7d1f);
24216                         MP_WritePhyUshort(sc, 0x1d, 0x551f);
24217                         MP_WritePhyUshort(sc, 0x1d, 0x5fb3);
24218                         MP_WritePhyUshort(sc, 0x1d, 0xaa05);
24219                         MP_WritePhyUshort(sc, 0x1d, 0x7c80);
24220                         MP_WritePhyUshort(sc, 0x1d, 0x5800);
24221                         MP_WritePhyUshort(sc, 0x1d, 0x5b58);
24222                         MP_WritePhyUshort(sc, 0x1d, 0x30d7);
24223                         MP_WritePhyUshort(sc, 0x1d, 0x7c80);
24224                         MP_WritePhyUshort(sc, 0x1d, 0x5800);
24225                         MP_WritePhyUshort(sc, 0x1d, 0x5b64);
24226                         MP_WritePhyUshort(sc, 0x1d, 0x4827);
24227                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24228                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
24229                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24230                         MP_WritePhyUshort(sc, 0x1d, 0x4c10);
24231                         MP_WritePhyUshort(sc, 0x1d, 0x8400);
24232                         MP_WritePhyUshort(sc, 0x1d, 0x7c10);
24233                         MP_WritePhyUshort(sc, 0x1d, 0x6000);
24234                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
24235                         MP_WritePhyUshort(sc, 0x1d, 0x4cc0);
24236                         MP_WritePhyUshort(sc, 0x1d, 0x7d00);
24237                         MP_WritePhyUshort(sc, 0x1d, 0x6400);
24238                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24239                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24240                         MP_WritePhyUshort(sc, 0x1d, 0x5fbb);
24241                         MP_WritePhyUshort(sc, 0x1d, 0x4824);
24242                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24243                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
24244                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24245                         MP_WritePhyUshort(sc, 0x1d, 0x4c04);
24246                         MP_WritePhyUshort(sc, 0x1d, 0x8200);
24247                         MP_WritePhyUshort(sc, 0x1d, 0x7ce0);
24248                         MP_WritePhyUshort(sc, 0x1d, 0x5400);
24249                         MP_WritePhyUshort(sc, 0x1d, 0x7d00);
24250                         MP_WritePhyUshort(sc, 0x1d, 0x6500);
24251                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24252                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24253                         MP_WritePhyUshort(sc, 0x1d, 0x30a7);
24254                         MP_WritePhyUshort(sc, 0x1d, 0x3001);
24255                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
24256                         MP_WritePhyUshort(sc, 0x1d, 0x4e00);
24257                         MP_WritePhyUshort(sc, 0x1d, 0x4007);
24258                         MP_WritePhyUshort(sc, 0x1d, 0x4400);
24259                         MP_WritePhyUshort(sc, 0x1d, 0x5310);
24260                         MP_WritePhyUshort(sc, 0x1d, 0x6800);
24261                         MP_WritePhyUshort(sc, 0x1d, 0x673e);
24262                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24263                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24264                         MP_WritePhyUshort(sc, 0x1d, 0x570f);
24265                         MP_WritePhyUshort(sc, 0x1d, 0x5fff);
24266                         MP_WritePhyUshort(sc, 0x1d, 0xaa05);
24267                         MP_WritePhyUshort(sc, 0x1d, 0x585b);
24268                         MP_WritePhyUshort(sc, 0x1d, 0x7d80);
24269                         MP_WritePhyUshort(sc, 0x1d, 0x6100);
24270                         MP_WritePhyUshort(sc, 0x1d, 0x3107);
24271                         MP_WritePhyUshort(sc, 0x1d, 0x5867);
24272                         MP_WritePhyUshort(sc, 0x1d, 0x7d80);
24273                         MP_WritePhyUshort(sc, 0x1d, 0x6080);
24274                         MP_WritePhyUshort(sc, 0x1d, 0x9403);
24275                         MP_WritePhyUshort(sc, 0x1d, 0x7e00);
24276                         MP_WritePhyUshort(sc, 0x1d, 0x6200);
24277                         MP_WritePhyUshort(sc, 0x1d, 0xcda3);
24278                         MP_WritePhyUshort(sc, 0x1d, 0x00e8);
24279                         MP_WritePhyUshort(sc, 0x1d, 0xcd85);
24280                         MP_WritePhyUshort(sc, 0x1d, 0x00e6);
24281                         MP_WritePhyUshort(sc, 0x1d, 0xd96b);
24282                         MP_WritePhyUshort(sc, 0x1d, 0x00e4);
24283                         MP_WritePhyUshort(sc, 0x1d, 0x96e4);
24284                         MP_WritePhyUshort(sc, 0x1d, 0x6800);
24285                         MP_WritePhyUshort(sc, 0x1d, 0x673e);
24286                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24287                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24288                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
24289                         MP_WritePhyUshort(sc, 0x1d, 0x4e20);
24290                         MP_WritePhyUshort(sc, 0x1d, 0x96dd);
24291                         MP_WritePhyUshort(sc, 0x1d, 0x8b04);
24292                         MP_WritePhyUshort(sc, 0x1d, 0x7c08);
24293                         MP_WritePhyUshort(sc, 0x1d, 0x5008);
24294                         MP_WritePhyUshort(sc, 0x1d, 0xab03);
24295                         MP_WritePhyUshort(sc, 0x1d, 0x7c08);
24296                         MP_WritePhyUshort(sc, 0x1d, 0x5000);
24297                         MP_WritePhyUshort(sc, 0x1d, 0x6801);
24298                         MP_WritePhyUshort(sc, 0x1d, 0x677e);
24299                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24300                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24301                         MP_WritePhyUshort(sc, 0x1d, 0xdb7c);
24302                         MP_WritePhyUshort(sc, 0x1d, 0x00ee);
24303                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24304                         MP_WritePhyUshort(sc, 0x1d, 0x7fe1);
24305                         MP_WritePhyUshort(sc, 0x1d, 0x4e40);
24306                         MP_WritePhyUshort(sc, 0x1d, 0x4837);
24307                         MP_WritePhyUshort(sc, 0x1d, 0x4418);
24308                         MP_WritePhyUshort(sc, 0x1d, 0x41c7);
24309                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
24310                         MP_WritePhyUshort(sc, 0x1d, 0x4e40);
24311                         MP_WritePhyUshort(sc, 0x1d, 0x7c40);
24312                         MP_WritePhyUshort(sc, 0x1d, 0x5400);
24313                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24314                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
24315                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24316                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
24317                         MP_WritePhyUshort(sc, 0x1d, 0x8fc2);
24318                         MP_WritePhyUshort(sc, 0x1d, 0xd2a0);
24319                         MP_WritePhyUshort(sc, 0x1d, 0x004b);
24320                         MP_WritePhyUshort(sc, 0x1d, 0x9204);
24321                         MP_WritePhyUshort(sc, 0x1d, 0xa042);
24322                         MP_WritePhyUshort(sc, 0x1d, 0x3132);
24323                         MP_WritePhyUshort(sc, 0x1d, 0x30f4);
24324                         MP_WritePhyUshort(sc, 0x1d, 0x7fe1);
24325                         MP_WritePhyUshort(sc, 0x1d, 0x4e60);
24326                         MP_WritePhyUshort(sc, 0x1d, 0x489c);
24327                         MP_WritePhyUshort(sc, 0x1d, 0x4628);
24328                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
24329                         MP_WritePhyUshort(sc, 0x1d, 0x4e60);
24330                         MP_WritePhyUshort(sc, 0x1d, 0x7e28);
24331                         MP_WritePhyUshort(sc, 0x1d, 0x4628);
24332                         MP_WritePhyUshort(sc, 0x1d, 0x7c40);
24333                         MP_WritePhyUshort(sc, 0x1d, 0x5400);
24334                         MP_WritePhyUshort(sc, 0x1d, 0x7c01);
24335                         MP_WritePhyUshort(sc, 0x1d, 0x5800);
24336                         MP_WritePhyUshort(sc, 0x1d, 0x7c04);
24337                         MP_WritePhyUshort(sc, 0x1d, 0x5c00);
24338                         MP_WritePhyUshort(sc, 0x1d, 0x41e8);
24339                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24340                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
24341                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24342                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
24343                         MP_WritePhyUshort(sc, 0x1d, 0x8fa8);
24344                         MP_WritePhyUshort(sc, 0x1d, 0xb241);
24345                         MP_WritePhyUshort(sc, 0x1d, 0xa02a);
24346                         MP_WritePhyUshort(sc, 0x1d, 0x314c);
24347                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
24348                         MP_WritePhyUshort(sc, 0x1d, 0x4ea0);
24349                         MP_WritePhyUshort(sc, 0x1d, 0x7c02);
24350                         MP_WritePhyUshort(sc, 0x1d, 0x4402);
24351                         MP_WritePhyUshort(sc, 0x1d, 0x4448);
24352                         MP_WritePhyUshort(sc, 0x1d, 0x4894);
24353                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24354                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
24355                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24356                         MP_WritePhyUshort(sc, 0x1d, 0x4c03);
24357                         MP_WritePhyUshort(sc, 0x1d, 0x4824);
24358                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24359                         MP_WritePhyUshort(sc, 0x1d, 0x4c07);
24360                         MP_WritePhyUshort(sc, 0x1d, 0x41ef);
24361                         MP_WritePhyUshort(sc, 0x1d, 0x41ff);
24362                         MP_WritePhyUshort(sc, 0x1d, 0x4891);
24363                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24364                         MP_WritePhyUshort(sc, 0x1d, 0x4c07);
24365                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24366                         MP_WritePhyUshort(sc, 0x1d, 0x4c17);
24367                         MP_WritePhyUshort(sc, 0x1d, 0x8400);
24368                         MP_WritePhyUshort(sc, 0x1d, 0x8ef8);
24369                         MP_WritePhyUshort(sc, 0x1d, 0x41c7);
24370                         MP_WritePhyUshort(sc, 0x1d, 0x8f8d);
24371                         MP_WritePhyUshort(sc, 0x1d, 0x92d5);
24372                         MP_WritePhyUshort(sc, 0x1d, 0xa10f);
24373                         MP_WritePhyUshort(sc, 0x1d, 0xd480);
24374                         MP_WritePhyUshort(sc, 0x1d, 0x0008);
24375                         MP_WritePhyUshort(sc, 0x1d, 0xd580);
24376                         MP_WritePhyUshort(sc, 0x1d, 0x00b8);
24377                         MP_WritePhyUshort(sc, 0x1d, 0xa202);
24378                         MP_WritePhyUshort(sc, 0x1d, 0x3167);
24379                         MP_WritePhyUshort(sc, 0x1d, 0x7c04);
24380                         MP_WritePhyUshort(sc, 0x1d, 0x4404);
24381                         MP_WritePhyUshort(sc, 0x1d, 0x3167);
24382                         MP_WritePhyUshort(sc, 0x1d, 0xd484);
24383                         MP_WritePhyUshort(sc, 0x1d, 0x00f3);
24384                         MP_WritePhyUshort(sc, 0x1d, 0xd484);
24385                         MP_WritePhyUshort(sc, 0x1d, 0x00f1);
24386                         MP_WritePhyUshort(sc, 0x1d, 0x30f4);
24387                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
24388                         MP_WritePhyUshort(sc, 0x1d, 0x4ee0);
24389                         MP_WritePhyUshort(sc, 0x1d, 0x7c40);
24390                         MP_WritePhyUshort(sc, 0x1d, 0x5400);
24391                         MP_WritePhyUshort(sc, 0x1d, 0x4488);
24392                         MP_WritePhyUshort(sc, 0x1d, 0x41cf);
24393                         MP_WritePhyUshort(sc, 0x1d, 0x30f4);
24394                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
24395                         MP_WritePhyUshort(sc, 0x1d, 0x4ec0);
24396                         MP_WritePhyUshort(sc, 0x1d, 0x48f3);
24397                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24398                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
24399                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24400                         MP_WritePhyUshort(sc, 0x1d, 0x4c09);
24401                         MP_WritePhyUshort(sc, 0x1d, 0x4508);
24402                         MP_WritePhyUshort(sc, 0x1d, 0x41c7);
24403                         MP_WritePhyUshort(sc, 0x1d, 0x8fb0);
24404                         MP_WritePhyUshort(sc, 0x1d, 0xd218);
24405                         MP_WritePhyUshort(sc, 0x1d, 0x00ae);
24406                         MP_WritePhyUshort(sc, 0x1d, 0xd2a4);
24407                         MP_WritePhyUshort(sc, 0x1d, 0x009e);
24408                         MP_WritePhyUshort(sc, 0x1d, 0x3188);
24409                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
24410                         MP_WritePhyUshort(sc, 0x1d, 0x4e80);
24411                         MP_WritePhyUshort(sc, 0x1d, 0x4832);
24412                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24413                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
24414                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
24415                         MP_WritePhyUshort(sc, 0x1d, 0x4c11);
24416                         MP_WritePhyUshort(sc, 0x1d, 0x4428);
24417                         MP_WritePhyUshort(sc, 0x1d, 0x7c40);
24418                         MP_WritePhyUshort(sc, 0x1d, 0x5440);
24419                         MP_WritePhyUshort(sc, 0x1d, 0x7c01);
24420                         MP_WritePhyUshort(sc, 0x1d, 0x5801);
24421                         MP_WritePhyUshort(sc, 0x1d, 0x7c04);
24422                         MP_WritePhyUshort(sc, 0x1d, 0x5c04);
24423                         MP_WritePhyUshort(sc, 0x1d, 0x41e8);
24424                         MP_WritePhyUshort(sc, 0x1d, 0xa4b3);
24425                         MP_WritePhyUshort(sc, 0x1d, 0x319d);
24426                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
24427                         MP_WritePhyUshort(sc, 0x1d, 0x4f20);
24428                         MP_WritePhyUshort(sc, 0x1d, 0x6800);
24429                         MP_WritePhyUshort(sc, 0x1d, 0x673e);
24430                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24431                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
24432                         MP_WritePhyUshort(sc, 0x1d, 0x570f);
24433                         MP_WritePhyUshort(sc, 0x1d, 0x5fff);
24434                         MP_WritePhyUshort(sc, 0x1d, 0xaa04);
24435                         MP_WritePhyUshort(sc, 0x1d, 0x585b);
24436                         MP_WritePhyUshort(sc, 0x1d, 0x6100);
24437                         MP_WritePhyUshort(sc, 0x1d, 0x31ad);
24438                         MP_WritePhyUshort(sc, 0x1d, 0x5867);
24439                         MP_WritePhyUshort(sc, 0x1d, 0x6080);
24440                         MP_WritePhyUshort(sc, 0x1d, 0xbcf2);
24441                         MP_WritePhyUshort(sc, 0x1d, 0x3001);
24442                         MP_WritePhyUshort(sc, 0x1f, 0x0004);
24443                         MP_WritePhyUshort(sc, 0x1c, 0x0200);
24444                         MP_WritePhyUshort(sc, 0x19, 0x7030);
24445                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
24446                 }
24447 
24448                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
24449                 MP_WritePhyUshort(sc, 0x11, 0x83BA);
24450                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
24451 
24452                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
24453                 ClearEthPhyBit(sc, 0x1A, BIT_2);
24454                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
24455 
24456                 if (phy_power_saving == 1) {
24457                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
24458                         MP_WritePhyUshort(sc, 0x18, 0x8310);
24459                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
24460                 } else {
24461                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
24462                         MP_WritePhyUshort(sc, 0x18, 0x0310);
24463                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
24464                         DELAY(20000);
24465                 }
24466 
24467                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
24468                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
24469                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
24470                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
24471                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
24472                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
24473                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
24474                 MP_WritePhyUshort(sc, 0x0D, 0x0003);
24475                 MP_WritePhyUshort(sc, 0x0E, 0x0015);
24476                 MP_WritePhyUshort(sc, 0x0D, 0x4003);
24477                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
24478                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
24479         } else if (sc->re_type == MACFG_56) {
24480                 MP_WritePhyUshort(sc, 0x1F, 0x0A46);
24481                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
24482                 TmpUshort = (PhyRegValue & BIT_8) ? 0 : BIT_15;
24483 
24484                 MP_WritePhyUshort(sc, 0x1F, 0x0BCC);
24485                 ClearEthPhyBit(sc, 0x12, BIT_15);
24486                 SetEthPhyBit(sc, 0x12, TmpUshort);
24487 
24488 
24489                 MP_WritePhyUshort(sc, 0x1F, 0x0A46);
24490                 PhyRegValue = MP_ReadPhyUshort(sc, 0x13);
24491                 TmpUshort = (PhyRegValue & BIT_8) ? BIT_1 : 0;
24492 
24493                 MP_WritePhyUshort(sc, 0x1F, 0x0C41);
24494                 ClearEthPhyBit(sc, 0x15, BIT_1);
24495                 SetEthPhyBit(sc, 0x15, TmpUshort);
24496 
24497                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
24498                 SetEthPhyBit(sc, 0x11, (BIT_3 | BIT_2));
24499                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
24500 
24501 
24502                 MP_WritePhyUshort(sc, 0x1F, 0x0BCC);
24503                 ClearEthPhyBit(sc, 0x14, BIT_8);
24504                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
24505                 SetEthPhyBit(sc, 0x11, BIT_7);
24506                 SetEthPhyBit(sc, 0x11, BIT_6);
24507                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24508                 MP_WritePhyUshort(sc, 0x13, 0x8084);
24509                 ClearEthPhyBit(sc, 0x14, (BIT_14 | BIT_13));
24510                 SetEthPhyBit(sc, 0x10, BIT_12);
24511                 SetEthPhyBit(sc, 0x10, BIT_1);
24512                 SetEthPhyBit(sc, 0x10, BIT_0);
24513                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
24514 
24515 
24516                 MP_WritePhyUshort(sc, 0x1F, 0x0A4B);
24517                 SetEthPhyBit(sc, 0x11, BIT_2);
24518                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
24519 
24520 
24521 
24522                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24523                 MP_WritePhyUshort(sc, 0x13, 0x8012);
24524                 SetEthPhyBit(sc, 0x14, BIT_15);
24525                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
24526 
24527 
24528 
24529                 MP_WritePhyUshort(sc, 0x1F, 0x0C42);
24530                 ClearAndSetEthPhyBit(sc,
24531                                      0x11,
24532                                      BIT_13,
24533                                      BIT_14
24534                                     );
24535                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
24536 
24537                 if (phy_power_saving == 1) {
24538                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24539                         SetEthPhyBit(sc, 0x10, BIT_2);
24540                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
24541                 } else {
24542                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24543                         ClearEthPhyBit(sc, 0x10, BIT_2);
24544                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
24545                         DELAY(20000);
24546                 }
24547 
24548                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24549                 MP_WritePhyUshort(sc, 0x13, 0x809A);
24550                 MP_WritePhyUshort(sc, 0x14, 0x8022);
24551                 MP_WritePhyUshort(sc, 0x13, 0x80A0);
24552                 ClearAndSetEthPhyBit(sc,
24553                                      0x14,
24554                                      0xFF00,
24555                                      0x1000
24556                                     );
24557                 MP_WritePhyUshort(sc, 0x13, 0x8088);
24558                 MP_WritePhyUshort(sc, 0x14, 0x9222);
24559                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
24560 
24561                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24562                 MP_WritePhyUshort(sc, 0x13, 0x8011);
24563                 ClearEthPhyBit(sc, 0x14, BIT_14);
24564                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
24565                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
24566                 MP_WritePhyUshort(sc, 0x00, 0x9200);
24567         } else if (sc->re_type == MACFG_58) {
24568                 MP_WritePhyUshort(sc, 0x1F, 0x0BCC);
24569                 ClearEthPhyBit(sc, 0x14, BIT_8);
24570                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
24571                 SetEthPhyBit(sc, 0x11, BIT_7);
24572                 SetEthPhyBit(sc, 0x11, BIT_6);
24573                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24574                 MP_WritePhyUshort(sc, 0x13, 0x8084);
24575                 ClearEthPhyBit(sc, 0x14, (BIT_14 | BIT_13));
24576                 SetEthPhyBit(sc, 0x10, BIT_12);
24577                 SetEthPhyBit(sc, 0x10, BIT_1);
24578                 SetEthPhyBit(sc, 0x10, BIT_0);
24579                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
24580 
24581                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24582                 MP_WritePhyUshort(sc, 0x13, 0x8012);
24583                 SetEthPhyBit(sc, 0x14, BIT_15);
24584                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
24585 
24586                 MP_WritePhyUshort(sc, 0x1F, 0x0C42);
24587                 ClearAndSetEthPhyBit(sc,
24588                                      0x11,
24589                                      BIT_13,
24590                                      BIT_14
24591                                     );
24592                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
24593 
24594                 if (phy_power_saving == 1) {
24595                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24596                         SetEthPhyBit(sc, 0x10, BIT_2);
24597                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
24598                 } else {
24599                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24600                         ClearEthPhyBit(sc, 0x10, BIT_2);
24601                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
24602                         DELAY(20000);
24603                 }
24604 
24605                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24606                 MP_WritePhyUshort(sc, 0x13, 0x8011);
24607                 ClearEthPhyBit(sc, 0x14, BIT_14);
24608                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
24609                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
24610                 MP_WritePhyUshort(sc, 0x00, 0x9200);
24611         } else if (sc->re_type == MACFG_59) {
24612                 MP_WritePhyUshort(sc, 0x1F, 0x0BCC);
24613                 ClearEthPhyBit(sc, 0x14, BIT_8);
24614                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
24615                 SetEthPhyBit(sc, 0x11, BIT_7);
24616                 SetEthPhyBit(sc, 0x11, BIT_6);
24617                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24618                 MP_WritePhyUshort(sc, 0x13, 0x8084);
24619                 ClearEthPhyBit(sc, 0x14, (BIT_14 | BIT_13));
24620                 SetEthPhyBit(sc, 0x10, BIT_12);
24621                 SetEthPhyBit(sc, 0x10, BIT_1);
24622                 SetEthPhyBit(sc, 0x10, BIT_0);
24623 
24624 
24625                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24626                 MP_WritePhyUshort(sc, 0x13, 0x8012);
24627                 SetEthPhyBit(sc, 0x14, BIT_15);
24628                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
24629 
24630                 MP_WritePhyUshort(sc, 0x1F, 0x0BCE);
24631                 MP_WritePhyUshort(sc, 0x12, 0x8860);
24632                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
24633 
24634                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24635                 MP_WritePhyUshort(sc, 0x13, 0x80F3);
24636                 ClearAndSetEthPhyBit(sc,
24637                                      0x14,
24638                                      0xFF00,
24639                                      0x8B00
24640                                     );
24641                 MP_WritePhyUshort(sc, 0x13, 0x80F0);
24642                 ClearAndSetEthPhyBit(sc,
24643                                      0x14,
24644                                      0xFF00,
24645                                      0x3A00
24646                                     );
24647                 MP_WritePhyUshort(sc, 0x13, 0x80EF);
24648                 ClearAndSetEthPhyBit(sc,
24649                                      0x14,
24650                                      0xFF00,
24651                                      0x0500
24652                                     );
24653                 MP_WritePhyUshort(sc, 0x13, 0x80F6);
24654                 ClearAndSetEthPhyBit(sc,
24655                                      0x14,
24656                                      0xFF00,
24657                                      0x6E00
24658                                     );
24659                 MP_WritePhyUshort(sc, 0x13, 0x80EC);
24660                 ClearAndSetEthPhyBit(sc,
24661                                      0x14,
24662                                      0xFF00,
24663                                      0x6800
24664                                     );
24665                 MP_WritePhyUshort(sc, 0x13, 0x80ED);
24666                 ClearAndSetEthPhyBit(sc,
24667                                      0x14,
24668                                      0xFF00,
24669                                      0x7C00
24670                                     );
24671                 MP_WritePhyUshort(sc, 0x13, 0x80F2);
24672                 ClearAndSetEthPhyBit(sc,
24673                                      0x14,
24674                                      0xFF00,
24675                                      0xF400
24676                                     );
24677                 MP_WritePhyUshort(sc, 0x13, 0x80F4);
24678                 ClearAndSetEthPhyBit(sc,
24679                                      0x14,
24680                                      0xFF00,
24681                                      0x8500
24682                                     );
24683 
24684                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24685                 MP_WritePhyUshort(sc, 0x13, 0x8110);
24686                 ClearAndSetEthPhyBit(sc,
24687                                      0x14,
24688                                      0xFF00,
24689                                      0xA800
24690                                     );
24691                 MP_WritePhyUshort(sc, 0x13, 0x810F);
24692                 ClearAndSetEthPhyBit(sc,
24693                                      0x14,
24694                                      0xFF00,
24695                                      0x1D00
24696                                     );
24697                 MP_WritePhyUshort(sc, 0x13, 0x8111);
24698                 ClearAndSetEthPhyBit(sc,
24699                                      0x14,
24700                                      0xFF00,
24701                                      0xF500
24702                                     );
24703                 MP_WritePhyUshort(sc, 0x13, 0x8113);
24704                 ClearAndSetEthPhyBit(sc,
24705                                      0x14,
24706                                      0xFF00,
24707                                      0x6100
24708                                     );
24709                 MP_WritePhyUshort(sc, 0x13, 0x8115);
24710                 ClearAndSetEthPhyBit(sc,
24711                                      0x14,
24712                                      0xFF00,
24713                                      0x9200
24714                                     );
24715                 MP_WritePhyUshort(sc, 0x13, 0x810E);
24716                 ClearAndSetEthPhyBit(sc,
24717                                      0x14,
24718                                      0xFF00,
24719                                      0x0400
24720                                     );
24721                 MP_WritePhyUshort(sc, 0x13, 0x810C);
24722                 ClearAndSetEthPhyBit(sc,
24723                                      0x14,
24724                                      0xFF00,
24725                                      0x7C00
24726                                     );
24727                 MP_WritePhyUshort(sc, 0x13, 0x810B);
24728                 ClearAndSetEthPhyBit(sc,
24729                                      0x14,
24730                                      0xFF00,
24731                                      0x5A00
24732                                     );
24733 
24734                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24735                 MP_WritePhyUshort(sc, 0x13, 0x80D1);
24736                 ClearAndSetEthPhyBit(sc,
24737                                      0x14,
24738                                      0xFF00,
24739                                      0xFF00
24740                                     );
24741                 MP_WritePhyUshort(sc, 0x13, 0x80CD);
24742                 ClearAndSetEthPhyBit(sc,
24743                                      0x14,
24744                                      0xFF00,
24745                                      0x9E00
24746                                     );
24747                 MP_WritePhyUshort(sc, 0x13, 0x80D3);
24748                 ClearAndSetEthPhyBit(sc,
24749                                      0x14,
24750                                      0xFF00,
24751                                      0x0E00
24752                                     );
24753                 MP_WritePhyUshort(sc, 0x13, 0x80D5);
24754                 ClearAndSetEthPhyBit(sc,
24755                                      0x14,
24756                                      0xFF00,
24757                                      0xCA00
24758                                     );
24759                 MP_WritePhyUshort(sc, 0x13, 0x80D7);
24760                 ClearAndSetEthPhyBit(sc,
24761                                      0x14,
24762                                      0xFF00,
24763                                      0x8400
24764                                     );
24765 
24766                 if (phy_power_saving == 1) {
24767                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24768                         SetEthPhyBit(sc, 0x10, BIT_2);
24769                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
24770                 } else {
24771                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24772                         ClearEthPhyBit(sc, 0x10, BIT_2);
24773                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
24774                         DELAY(20000);
24775                 }
24776 
24777                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24778                 MP_WritePhyUshort(sc, 0x13, 0x8011);
24779                 ClearEthPhyBit(sc, 0x14, BIT_14);
24780                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
24781                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
24782                 MP_WritePhyUshort(sc, 0x00, 0x9200);
24783         } else if (sc->re_type == MACFG_60) {
24784                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24785                 MP_WritePhyUshort(sc, 0x13, 0x8012);
24786                 SetEthPhyBit(sc, 0x14, BIT_15);
24787                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
24788 
24789                 MP_WritePhyUshort(sc, 0x1F, 0x0BCE);
24790                 MP_WritePhyUshort(sc, 0x12, 0x8860);
24791                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
24792 
24793                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24794                 MP_WritePhyUshort(sc, 0x13, 0x80F3);
24795                 ClearAndSetEthPhyBit(sc,
24796                                      0x14,
24797                                      0xFF00,
24798                                      0x8B00
24799                                     );
24800                 MP_WritePhyUshort(sc, 0x13, 0x80F0);
24801                 ClearAndSetEthPhyBit(sc,
24802                                      0x14,
24803                                      0xFF00,
24804                                      0x3A00
24805                                     );
24806                 MP_WritePhyUshort(sc, 0x13, 0x80EF);
24807                 ClearAndSetEthPhyBit(sc,
24808                                      0x14,
24809                                      0xFF00,
24810                                      0x0500
24811                                     );
24812                 MP_WritePhyUshort(sc, 0x13, 0x80F6);
24813                 ClearAndSetEthPhyBit(sc,
24814                                      0x14,
24815                                      0xFF00,
24816                                      0x6E00
24817                                     );
24818                 MP_WritePhyUshort(sc, 0x13, 0x80EC);
24819                 ClearAndSetEthPhyBit(sc,
24820                                      0x14,
24821                                      0xFF00,
24822                                      0x6800
24823                                     );
24824                 MP_WritePhyUshort(sc, 0x13, 0x80ED);
24825                 ClearAndSetEthPhyBit(sc,
24826                                      0x14,
24827                                      0xFF00,
24828                                      0x7C00
24829                                     );
24830                 MP_WritePhyUshort(sc, 0x13, 0x80F2);
24831                 ClearAndSetEthPhyBit(sc,
24832                                      0x14,
24833                                      0xFF00,
24834                                      0xF400
24835                                     );
24836                 MP_WritePhyUshort(sc, 0x13, 0x80F4);
24837                 ClearAndSetEthPhyBit(sc,
24838                                      0x14,
24839                                      0xFF00,
24840                                      0x8500
24841                                     );
24842 
24843                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24844                 MP_WritePhyUshort(sc, 0x13, 0x8110);
24845                 ClearAndSetEthPhyBit(sc,
24846                                      0x14,
24847                                      0xFF00,
24848                                      0xA800
24849                                     );
24850                 MP_WritePhyUshort(sc, 0x13, 0x810F);
24851                 ClearAndSetEthPhyBit(sc,
24852                                      0x14,
24853                                      0xFF00,
24854                                      0x1D00
24855                                     );
24856                 MP_WritePhyUshort(sc, 0x13, 0x8111);
24857                 ClearAndSetEthPhyBit(sc,
24858                                      0x14,
24859                                      0xFF00,
24860                                      0xF500
24861                                     );
24862                 MP_WritePhyUshort(sc, 0x13, 0x8113);
24863                 ClearAndSetEthPhyBit(sc,
24864                                      0x14,
24865                                      0xFF00,
24866                                      0x6100
24867                                     );
24868                 MP_WritePhyUshort(sc, 0x13, 0x8115);
24869                 ClearAndSetEthPhyBit(sc,
24870                                      0x14,
24871                                      0xFF00,
24872                                      0x9200
24873                                     );
24874                 MP_WritePhyUshort(sc, 0x13, 0x810E);
24875                 ClearAndSetEthPhyBit(sc,
24876                                      0x14,
24877                                      0xFF00,
24878                                      0x0400
24879                                     );
24880                 MP_WritePhyUshort(sc, 0x13, 0x810C);
24881                 ClearAndSetEthPhyBit(sc,
24882                                      0x14,
24883                                      0xFF00,
24884                                      0x7C00
24885                                     );
24886                 MP_WritePhyUshort(sc, 0x13, 0x810B);
24887                 ClearAndSetEthPhyBit(sc,
24888                                      0x14,
24889                                      0xFF00,
24890                                      0x5A00
24891                                     );
24892 
24893                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24894                 MP_WritePhyUshort(sc, 0x13, 0x80D1);
24895                 ClearAndSetEthPhyBit(sc,
24896                                      0x14,
24897                                      0xFF00,
24898                                      0xFF00
24899                                     );
24900                 MP_WritePhyUshort(sc, 0x13, 0x80CD);
24901                 ClearAndSetEthPhyBit(sc,
24902                                      0x14,
24903                                      0xFF00,
24904                                      0x9E00
24905                                     );
24906                 MP_WritePhyUshort(sc, 0x13, 0x80D3);
24907                 ClearAndSetEthPhyBit(sc,
24908                                      0x14,
24909                                      0xFF00,
24910                                      0x0E00
24911                                     );
24912                 MP_WritePhyUshort(sc, 0x13, 0x80D5);
24913                 ClearAndSetEthPhyBit(sc,
24914                                      0x14,
24915                                      0xFF00,
24916                                      0xCA00
24917                                     );
24918                 MP_WritePhyUshort(sc, 0x13, 0x80D7);
24919                 ClearAndSetEthPhyBit(sc,
24920                                      0x14,
24921                                      0xFF00,
24922                                      0x8400
24923                                     );
24924 
24925                 if (phy_power_saving == 1) {
24926                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24927                         SetEthPhyBit(sc, 0x10, BIT_2);
24928                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
24929                 } else {
24930                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24931                         ClearEthPhyBit(sc, 0x10, BIT_2);
24932                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
24933                         DELAY(20000);
24934                 }
24935 
24936                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24937                 MP_WritePhyUshort(sc, 0x13, 0x8011);
24938                 ClearEthPhyBit(sc, 0x14, BIT_14);
24939                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
24940                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
24941                 MP_WritePhyUshort(sc, 0x00, 0x9200);
24942         } else if (sc->re_type == MACFG_61) {
24943                 MP_WritePhyUshort(sc, 0x1f, 0x0A43);
24944                 MP_WritePhyUshort(sc, 0x13, 0x8146);
24945                 MP_WritePhyUshort(sc, 0x14, 0x0000);
24946 
24947                 MP_WritePhyUshort(sc, 0x1f, 0x0B82);
24948                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
24949                 PhyRegValue &= ~(BIT_4);
24950                 MP_WritePhyUshort(sc, 0x10, PhyRegValue);
24951 
24952                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
24953                 SetEthPhyBit(sc, 0x11, (BIT_3 | BIT_2));
24954                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
24955 
24956 
24957                 MP_WritePhyUshort(sc, 0x1F, 0x0BCC);
24958                 ClearEthPhyBit(sc, 0x14, BIT_8);
24959                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
24960                 SetEthPhyBit(sc, 0x11, BIT_7);
24961                 SetEthPhyBit(sc, 0x11, BIT_6);
24962                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24963                 MP_WritePhyUshort(sc, 0x13, 0x8084);
24964                 ClearEthPhyBit(sc, 0x14, (BIT_14 | BIT_13));
24965                 SetEthPhyBit(sc, 0x10, BIT_12);
24966                 SetEthPhyBit(sc, 0x10, BIT_1);
24967                 SetEthPhyBit(sc, 0x10, BIT_0);
24968                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
24969 
24970                 MP_WritePhyUshort(sc, 0x1F, 0x0A4B);
24971                 SetEthPhyBit(sc, 0x11, BIT_2);
24972                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
24973 
24974                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24975                 MP_WritePhyUshort(sc, 0x13, 0x8012);
24976                 SetEthPhyBit(sc, 0x14, BIT_15);
24977                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
24978 
24979                 MP_WritePhyUshort(sc, 0x1F, 0x0C42);
24980                 ClearAndSetEthPhyBit(sc,
24981                                      0x11,
24982                                      BIT_13,
24983                                      BIT_14
24984                                     );
24985                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
24986 
24987                 if (phy_power_saving == 1) {
24988                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24989                         SetEthPhyBit(sc, 0x10, BIT_2);
24990                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
24991                 } else {
24992                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24993                         ClearEthPhyBit(sc, 0x10, BIT_2);
24994                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
24995                         DELAY(20000);
24996                 }
24997 
24998                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
24999                 MP_WritePhyUshort(sc, 0x13, 0x8011);
25000                 ClearEthPhyBit(sc, 0x14, BIT_14);
25001                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
25002                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25003                 MP_WritePhyUshort(sc, 0x00, 0x9200);
25004         } else if (sc->re_type == MACFG_62 || sc->re_type == MACFG_67) {
25005                 MP_WritePhyUshort(sc, 0x1F, 0x0BCC);
25006                 ClearEthPhyBit(sc, 0x14, BIT_8);
25007                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
25008                 SetEthPhyBit(sc, 0x11, BIT_7);
25009                 SetEthPhyBit(sc, 0x11, BIT_6);
25010                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25011                 MP_WritePhyUshort(sc, 0x13, 0x8084);
25012                 ClearEthPhyBit(sc, 0x14, (BIT_14 | BIT_13));
25013                 SetEthPhyBit(sc, 0x10, BIT_12);
25014                 SetEthPhyBit(sc, 0x10, BIT_1);
25015                 SetEthPhyBit(sc, 0x10, BIT_0);
25016                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25017 
25018                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25019                 MP_WritePhyUshort(sc, 0x13, 0x8012);
25020                 SetEthPhyBit(sc, 0x14, BIT_15);
25021                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25022 
25023                 MP_WritePhyUshort(sc, 0x1F, 0x0C42);
25024                 ClearAndSetEthPhyBit(sc,
25025                                      0x11,
25026                                      BIT_13,
25027                                      BIT_14
25028                                     );
25029                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25030 
25031                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25032                 MP_WritePhyUshort(sc, 0x13, 0x80F3);
25033                 ClearAndSetEthPhyBit(sc,
25034                                      0x14,
25035                                      0xFF00,
25036                                      0x8B00
25037                                     );
25038                 MP_WritePhyUshort(sc, 0x13, 0x80F0);
25039                 ClearAndSetEthPhyBit(sc,
25040                                      0x14,
25041                                      0xFF00,
25042                                      0x3A00
25043                                     );
25044                 MP_WritePhyUshort(sc, 0x13, 0x80EF);
25045                 ClearAndSetEthPhyBit(sc,
25046                                      0x14,
25047                                      0xFF00,
25048                                      0x0500
25049                                     );
25050                 MP_WritePhyUshort(sc, 0x13, 0x80F6);
25051                 ClearAndSetEthPhyBit(sc,
25052                                      0x14,
25053                                      0xFF00,
25054                                      0x6E00
25055                                     );
25056                 MP_WritePhyUshort(sc, 0x13, 0x80EC);
25057                 ClearAndSetEthPhyBit(sc,
25058                                      0x14,
25059                                      0xFF00,
25060                                      0x6800
25061                                     );
25062                 MP_WritePhyUshort(sc, 0x13, 0x80ED);
25063                 ClearAndSetEthPhyBit(sc,
25064                                      0x14,
25065                                      0xFF00,
25066                                      0x7C00
25067                                     );
25068                 MP_WritePhyUshort(sc, 0x13, 0x80F2);
25069                 ClearAndSetEthPhyBit(sc,
25070                                      0x14,
25071                                      0xFF00,
25072                                      0xF400
25073                                     );
25074                 MP_WritePhyUshort(sc, 0x13, 0x80F4);
25075                 ClearAndSetEthPhyBit(sc,
25076                                      0x14,
25077                                      0xFF00,
25078                                      0x8500
25079                                     );
25080 
25081                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25082                 MP_WritePhyUshort(sc, 0x13, 0x8110);
25083                 ClearAndSetEthPhyBit(sc,
25084                                      0x14,
25085                                      0xFF00,
25086                                      0xA800
25087                                     );
25088                 MP_WritePhyUshort(sc, 0x13, 0x810F);
25089                 ClearAndSetEthPhyBit(sc,
25090                                      0x14,
25091                                      0xFF00,
25092                                      0x1D00
25093                                     );
25094                 MP_WritePhyUshort(sc, 0x13, 0x8111);
25095                 ClearAndSetEthPhyBit(sc,
25096                                      0x14,
25097                                      0xFF00,
25098                                      0xF500
25099                                     );
25100                 MP_WritePhyUshort(sc, 0x13, 0x8113);
25101                 ClearAndSetEthPhyBit(sc,
25102                                      0x14,
25103                                      0xFF00,
25104                                      0x6100
25105                                     );
25106                 MP_WritePhyUshort(sc, 0x13, 0x8115);
25107                 ClearAndSetEthPhyBit(sc,
25108                                      0x14,
25109                                      0xFF00,
25110                                      0x9200
25111                                     );
25112                 MP_WritePhyUshort(sc, 0x13, 0x810E);
25113                 ClearAndSetEthPhyBit(sc,
25114                                      0x14,
25115                                      0xFF00,
25116                                      0x0400
25117                                     );
25118                 MP_WritePhyUshort(sc, 0x13, 0x810C);
25119                 ClearAndSetEthPhyBit(sc,
25120                                      0x14,
25121                                      0xFF00,
25122                                      0x7C00
25123                                     );
25124                 MP_WritePhyUshort(sc, 0x13, 0x810B);
25125                 ClearAndSetEthPhyBit(sc,
25126                                      0x14,
25127                                      0xFF00,
25128                                      0x5A00
25129                                     );
25130 
25131                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25132                 MP_WritePhyUshort(sc, 0x13, 0x80D1);
25133                 ClearAndSetEthPhyBit(sc,
25134                                      0x14,
25135                                      0xFF00,
25136                                      0xFF00
25137                                     );
25138                 MP_WritePhyUshort(sc, 0x13, 0x80CD);
25139                 ClearAndSetEthPhyBit(sc,
25140                                      0x14,
25141                                      0xFF00,
25142                                      0x9E00
25143                                     );
25144                 MP_WritePhyUshort(sc, 0x13, 0x80D3);
25145                 ClearAndSetEthPhyBit(sc,
25146                                      0x14,
25147                                      0xFF00,
25148                                      0x0E00
25149                                     );
25150                 MP_WritePhyUshort(sc, 0x13, 0x80D5);
25151                 ClearAndSetEthPhyBit(sc,
25152                                      0x14,
25153                                      0xFF00,
25154                                      0xCA00
25155                                     );
25156                 MP_WritePhyUshort(sc, 0x13, 0x80D7);
25157                 ClearAndSetEthPhyBit(sc,
25158                                      0x14,
25159                                      0xFF00,
25160                                      0x8400
25161                                     );
25162 
25163                 if (phy_power_saving == 1) {
25164                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25165                         SetEthPhyBit(sc, 0x10, BIT_2);
25166                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
25167                 } else {
25168                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25169                         ClearEthPhyBit(sc, 0x10, BIT_2);
25170                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
25171                         DELAY(20000);
25172                 }
25173 
25174                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25175                 MP_WritePhyUshort(sc, 0x13, 0x8011);
25176                 ClearEthPhyBit(sc, 0x14, BIT_14);
25177                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
25178                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25179                 MP_WritePhyUshort(sc, 0x00, 0x9200);
25180         } else if (sc->re_type == MACFG_63) {
25181                 MP_WritePhyUshort(sc, 0x1f, 0x0002);
25182                 MP_WritePhyUshort(sc, 0x10, 0x0008);
25183                 MP_WritePhyUshort(sc, 0x0d, 0x006c);
25184                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
25185 
25186                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
25187                 MP_WritePhyUshort(sc, 0x17, 0x0cc0);
25188                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
25189 
25190                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
25191                 MP_WritePhyUshort(sc, 0x0B, 0xA4D8);
25192                 MP_WritePhyUshort(sc, 0x09, 0x281C);
25193                 MP_WritePhyUshort(sc, 0x07, 0x2883);
25194                 MP_WritePhyUshort(sc, 0x0A, 0x6B35);
25195                 MP_WritePhyUshort(sc, 0x1D, 0x3DA4);
25196                 MP_WritePhyUshort(sc, 0x1C, 0xEFFD);
25197                 MP_WritePhyUshort(sc, 0x14, 0x7F52);
25198                 MP_WritePhyUshort(sc, 0x18, 0x7FC6);
25199                 MP_WritePhyUshort(sc, 0x08, 0x0601);
25200                 MP_WritePhyUshort(sc, 0x06, 0x4063);
25201                 MP_WritePhyUshort(sc, 0x10, 0xF074);
25202                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
25203                 MP_WritePhyUshort(sc, 0x13, 0x0789);
25204                 MP_WritePhyUshort(sc, 0x12, 0xF4BD);
25205                 MP_WritePhyUshort(sc, 0x1A, 0x04FD);
25206                 MP_WritePhyUshort(sc, 0x14, 0x84B0);
25207                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25208 
25209                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
25210                 MP_WritePhyUshort(sc, 0x01, 0x0340);
25211                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
25212                 MP_WritePhyUshort(sc, 0x04, 0x4000);
25213                 MP_WritePhyUshort(sc, 0x03, 0x1D21);
25214                 MP_WritePhyUshort(sc, 0x02, 0x0C32);
25215                 MP_WritePhyUshort(sc, 0x01, 0x0200);
25216                 MP_WritePhyUshort(sc, 0x00, 0x5554);
25217                 MP_WritePhyUshort(sc, 0x04, 0x4800);
25218                 MP_WritePhyUshort(sc, 0x04, 0x4000);
25219                 MP_WritePhyUshort(sc, 0x04, 0xF000);
25220                 MP_WritePhyUshort(sc, 0x03, 0xDF01);
25221                 MP_WritePhyUshort(sc, 0x02, 0xDF20);
25222                 MP_WritePhyUshort(sc, 0x01, 0x101A);
25223                 MP_WritePhyUshort(sc, 0x00, 0xA0FF);
25224                 MP_WritePhyUshort(sc, 0x04, 0xF800);
25225                 MP_WritePhyUshort(sc, 0x04, 0xF000);
25226                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25227 
25228                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
25229                 MP_WritePhyUshort(sc, 0x1E, 0x0023);
25230                 MP_WritePhyUshort(sc, 0x16, 0x0000);
25231                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25232 
25233                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25234                 PhyRegValue = MP_ReadPhyUshort(sc, 0x0D);
25235                 PhyRegValue |= (BIT_5);
25236                 MP_WritePhyUshort(sc, 0x0D, PhyRegValue);
25237 
25238                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
25239                 PhyRegValue = MP_ReadPhyUshort(sc, 0x0C);
25240                 PhyRegValue |= (BIT_10);
25241                 MP_WritePhyUshort(sc, 0x0C, PhyRegValue);
25242                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25243         } else if (sc->re_type == MACFG_64) {
25244                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
25245                 MP_WritePhyUshort(sc, 0x17, 0x0cc0);
25246                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
25247 
25248                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
25249                 MP_WritePhyUshort(sc, 0x01, 0x0340);
25250                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
25251                 MP_WritePhyUshort(sc, 0x04, 0x4000);
25252                 MP_WritePhyUshort(sc, 0x03, 0x1D21);
25253                 MP_WritePhyUshort(sc, 0x02, 0x0C32);
25254                 MP_WritePhyUshort(sc, 0x01, 0x0200);
25255                 MP_WritePhyUshort(sc, 0x00, 0x5554);
25256                 MP_WritePhyUshort(sc, 0x04, 0x4800);
25257                 MP_WritePhyUshort(sc, 0x04, 0x4000);
25258                 MP_WritePhyUshort(sc, 0x04, 0xF000);
25259                 MP_WritePhyUshort(sc, 0x03, 0xDF01);
25260                 MP_WritePhyUshort(sc, 0x02, 0xDF20);
25261                 MP_WritePhyUshort(sc, 0x01, 0x101A);
25262                 MP_WritePhyUshort(sc, 0x00, 0xA0FF);
25263                 MP_WritePhyUshort(sc, 0x04, 0xF800);
25264                 MP_WritePhyUshort(sc, 0x04, 0xF000);
25265                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25266 
25267                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
25268                 MP_WritePhyUshort(sc, 0x1E, 0x0023);
25269                 MP_WritePhyUshort(sc, 0x16, 0x0000);
25270                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25271 
25272                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25273                 PhyRegValue = MP_ReadPhyUshort(sc, 0x0D);
25274                 PhyRegValue |= (BIT_5);
25275                 MP_WritePhyUshort(sc, 0x0D, PhyRegValue);
25276 
25277                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
25278                 PhyRegValue = MP_ReadPhyUshort(sc, 0x0C);
25279                 PhyRegValue |= (BIT_10);
25280                 MP_WritePhyUshort(sc, 0x0C, PhyRegValue);
25281                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25282         } else if (sc->re_type == MACFG_65) {
25283                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
25284                 MP_WritePhyUshort(sc, 0x17, 0x0cc0);
25285                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
25286 
25287                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25288                 PhyRegValue = MP_ReadPhyUshort(sc, 0x0D);
25289                 PhyRegValue |= (BIT_5);
25290                 MP_WritePhyUshort(sc, 0x0D, PhyRegValue);
25291 
25292                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
25293                 PhyRegValue = MP_ReadPhyUshort(sc, 0x0C);
25294                 PhyRegValue |= (BIT_10);
25295                 MP_WritePhyUshort(sc, 0x0C, PhyRegValue);
25296                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25297 
25298                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
25299                 MP_WritePhyUshort(sc, 0x1E, 0x002C);
25300                 MP_WritePhyUshort(sc, 0x15, 0x035D);
25301                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
25302                 MP_WritePhyUshort(sc, 0x01, 0x0300);
25303                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25304         } else if (sc->re_type == MACFG_66) {
25305                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25306                 PhyRegValue = MP_ReadPhyUshort(sc, 0x0D);
25307                 PhyRegValue |= (BIT_5);
25308                 MP_WritePhyUshort(sc, 0x0D, PhyRegValue);
25309 
25310                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
25311                 PhyRegValue = MP_ReadPhyUshort(sc, 0x0C);
25312                 PhyRegValue |= (BIT_10);
25313                 MP_WritePhyUshort(sc, 0x0C, PhyRegValue);
25314                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25315         } else if (sc->re_type == MACFG_68) {
25316                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25317                 MP_WritePhyUshort(sc, 0x13, 0x809b);
25318                 ClearAndSetEthPhyBit(sc,
25319                                      0x14,
25320                                      0xF800,
25321                                      0x8000
25322                                     );
25323                 MP_WritePhyUshort(sc, 0x13, 0x80A2);
25324                 ClearAndSetEthPhyBit(sc,
25325                                      0x14,
25326                                      0xFF00,
25327                                      0x8000
25328                                     );
25329                 MP_WritePhyUshort(sc, 0x13, 0x80A4);
25330                 ClearAndSetEthPhyBit(sc,
25331                                      0x14,
25332                                      0xFF00,
25333                                      0x8500
25334                                     );
25335                 MP_WritePhyUshort(sc, 0x13, 0x809C);
25336                 ClearAndSetEthPhyBit(sc,
25337                                      0x14,
25338                                      0xFF00,
25339                                      0xbd00
25340                                     );
25341                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25342 
25343                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25344                 MP_WritePhyUshort(sc, 0x13, 0x80AD);
25345                 ClearAndSetEthPhyBit(sc,
25346                                      0x14,
25347                                      0xF800,
25348                                      0x7000
25349                                     );
25350                 MP_WritePhyUshort(sc, 0x13, 0x80B4);
25351                 ClearAndSetEthPhyBit(sc,
25352                                      0x14,
25353                                      0xFF00,
25354                                      0x5000
25355                                     );
25356                 MP_WritePhyUshort(sc, 0x13, 0x80AC);
25357                 ClearAndSetEthPhyBit(sc,
25358                                      0x14,
25359                                      0xFF00,
25360                                      0x4000
25361                                     );
25362                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25363 
25364                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25365                 MP_WritePhyUshort(sc, 0x13, 0x808E);
25366                 ClearAndSetEthPhyBit(sc,
25367                                      0x14,
25368                                      0xFF00,
25369                                      0x1200
25370                                     );
25371                 MP_WritePhyUshort(sc, 0x13, 0x8090);
25372                 ClearAndSetEthPhyBit(sc,
25373                                      0x14,
25374                                      0xFF00,
25375                                      0xE500
25376                                     );
25377                 MP_WritePhyUshort(sc, 0x13, 0x8092);
25378                 ClearAndSetEthPhyBit(sc,
25379                                      0x14,
25380                                      0xFF00,
25381                                      0x9F00
25382                                     );
25383                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25384 
25385                 dout_tapbin = 0x0000;
25386                 MP_WritePhyUshort(sc, 0x1F, 0x0A46);
25387                 TmpUshort = MP_ReadPhyUshort(sc, 0x13);
25388                 TmpUshort &= (BIT_1|BIT_0);
25389                 TmpUshort <<= 2;
25390                 dout_tapbin |= TmpUshort;
25391 
25392                 TmpUshort = MP_ReadPhyUshort(sc, 0x12);
25393                 TmpUshort &= (BIT_15|BIT_14);
25394                 TmpUshort >>= 14;
25395                 dout_tapbin |= TmpUshort;
25396 
25397                 dout_tapbin = ~(dout_tapbin^BIT_3);
25398                 dout_tapbin <<= 12;
25399                 dout_tapbin &= 0xF000;
25400 
25401                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25402 
25403                 MP_WritePhyUshort(sc, 0x13, 0x827A);
25404                 ClearAndSetEthPhyBit(sc,
25405                                      0x14,
25406                                      BIT_15|BIT_14|BIT_13|BIT_12,
25407                                      dout_tapbin
25408                                     );
25409 
25410 
25411                 MP_WritePhyUshort(sc, 0x13, 0x827B);
25412                 ClearAndSetEthPhyBit(sc,
25413                                      0x14,
25414                                      BIT_15|BIT_14|BIT_13|BIT_12,
25415                                      dout_tapbin
25416                                     );
25417 
25418 
25419                 MP_WritePhyUshort(sc, 0x13, 0x827C);
25420                 ClearAndSetEthPhyBit(sc,
25421                                      0x14,
25422                                      BIT_15|BIT_14|BIT_13|BIT_12,
25423                                      dout_tapbin
25424                                     );
25425 
25426 
25427                 MP_WritePhyUshort(sc, 0x13, 0x827D);
25428                 ClearAndSetEthPhyBit(sc,
25429                                      0x14,
25430                                      BIT_15|BIT_14|BIT_13|BIT_12,
25431                                      dout_tapbin
25432                                     );
25433 
25434                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25435                 MP_WritePhyUshort(sc, 0x13, 0x8011);
25436                 SetEthPhyBit(sc, 0x14, BIT_11);
25437                 MP_WritePhyUshort(sc, 0x1F, 0x0A42);
25438                 SetEthPhyBit(sc, 0x16, BIT_1);
25439 
25440                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
25441                 SetEthPhyBit(sc, 0x11, BIT_11);
25442                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25443 
25444                 MP_WritePhyUshort(sc, 0x1F, 0x0BCA);
25445                 ClearAndSetEthPhyBit(sc,
25446                                      0x17,
25447                                      (BIT_13 | BIT_12),
25448                                      BIT_14
25449                                     );
25450                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25451 
25452                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25453                 MP_WritePhyUshort(sc, 0x13, 0x803F);
25454                 ClearEthPhyBit(sc, 0x14, (BIT_13 | BIT_12));
25455                 MP_WritePhyUshort(sc, 0x13, 0x8047);
25456                 ClearEthPhyBit(sc, 0x14, (BIT_13 | BIT_12));
25457                 MP_WritePhyUshort(sc, 0x13, 0x804F);
25458                 ClearEthPhyBit(sc, 0x14, (BIT_13 | BIT_12));
25459                 MP_WritePhyUshort(sc, 0x13, 0x8057);
25460                 ClearEthPhyBit(sc, 0x14, (BIT_13 | BIT_12));
25461                 MP_WritePhyUshort(sc, 0x13, 0x805F);
25462                 ClearEthPhyBit(sc, 0x14, (BIT_13 | BIT_12));
25463                 MP_WritePhyUshort(sc, 0x13, 0x8067);
25464                 ClearEthPhyBit(sc, 0x14, (BIT_13 | BIT_12));
25465                 MP_WritePhyUshort(sc, 0x13, 0x806F);
25466                 ClearEthPhyBit(sc, 0x14, (BIT_13 | BIT_12));
25467                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25468 
25469                 if (phy_power_saving == 1) {
25470                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25471                         SetEthPhyBit(sc, 0x10, BIT_2);
25472                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
25473                 } else {
25474                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25475                         ClearEthPhyBit(sc, 0x10, BIT_2);
25476                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
25477                         DELAY(20000);
25478                 }
25479 
25480                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25481                 MP_WritePhyUshort(sc, 0x13, 0x8045);
25482                 MP_WritePhyUshort(sc, 0x14, 0x2444);
25483                 MP_WritePhyUshort(sc, 0x13, 0x804d);
25484                 MP_WritePhyUshort(sc, 0x14, 0x2444);
25485                 MP_WritePhyUshort(sc, 0x13, 0x805d);
25486                 MP_WritePhyUshort(sc, 0x14, 0x2444);
25487                 MP_WritePhyUshort(sc, 0x13, 0x8011);
25488                 SetEthPhyBit(sc, 0x14, BIT_15);
25489                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
25490                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25491                 MP_WritePhyUshort(sc, 0x00, 0x9200);
25492         } else if (sc->re_type == MACFG_69) {
25493                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25494                 MP_WritePhyUshort(sc, 0x13, 0x808A);
25495                 ClearAndSetEthPhyBit(sc,
25496                                      0x14,
25497                                      BIT_5 | BIT_4 | BIT_3 | BIT_2 | BIT_1 | BIT_0,
25498                                      0x0A);
25499 
25500                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25501                 MP_WritePhyUshort(sc, 0x13, 0x8011);
25502                 SetEthPhyBit(sc, 0x14, BIT_11);
25503                 MP_WritePhyUshort(sc, 0x1F, 0x0A42);
25504                 SetEthPhyBit(sc, 0x16, BIT_1);
25505 
25506                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
25507                 SetEthPhyBit(sc, 0x11, BIT_11);
25508                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25509 
25510                 if (sc->RequireAdcBiasPatch) {
25511                         MP_WritePhyUshort(sc, 0x1F, 0x0BCF);
25512                         MP_WritePhyUshort(sc, 0x16, sc->AdcBiasPatchIoffset);
25513                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
25514                 }
25515 
25516                 {
25517                         u_int16_t rlen;
25518 
25519                         MP_WritePhyUshort(sc, 0x1F, 0x0BCD);
25520                         PhyRegValue = MP_ReadPhyUshort(sc, 0x16);
25521                         PhyRegValue &= 0x000F;
25522 
25523                         if (PhyRegValue > 3) {
25524                                 rlen = PhyRegValue - 3;
25525                         } else {
25526                                 rlen = 0;
25527                         }
25528 
25529                         PhyRegValue = rlen | (rlen<<4) | (rlen<<8) | (rlen<<12);
25530 
25531                         MP_WritePhyUshort(sc, 0x1F, 0x0BCD);
25532                         MP_WritePhyUshort(sc, 0x17, PhyRegValue);
25533                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
25534                 }
25535 
25536                 if (phy_power_saving == 1) {
25537                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25538                         SetEthPhyBit(sc, 0x10, BIT_2);
25539                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
25540                 } else {
25541                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25542                         ClearEthPhyBit(sc, 0x10, BIT_2);
25543                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
25544                         DELAY(20000);
25545                 }
25546 
25547                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25548                 MP_WritePhyUshort(sc, 0x13, 0x8045);
25549                 MP_WritePhyUshort(sc, 0x14, 0x2444);
25550                 MP_WritePhyUshort(sc, 0x13, 0x804d);
25551                 MP_WritePhyUshort(sc, 0x14, 0x2444);
25552                 MP_WritePhyUshort(sc, 0x13, 0x805d);
25553                 MP_WritePhyUshort(sc, 0x14, 0x2444);
25554                 MP_WritePhyUshort(sc, 0x13, 0x8011);
25555                 SetEthPhyBit(sc, 0x14, BIT_15);
25556                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
25557                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25558                 MP_WritePhyUshort(sc, 0x00, 0x9200);
25559         }  else if (sc->re_type == MACFG_70 || sc->re_type == MACFG_71) {
25560                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25561                 MP_WritePhyUshort(sc, 0x13, 0x808E);
25562                 ClearAndSetEthPhyBit( sc,
25563                                       0x14,
25564                                       0xFF00,
25565                                       0x4000
25566                                     );
25567                 MP_WritePhyUshort(sc, 0x13, 0x8090);
25568                 ClearAndSetEthPhyBit( sc,
25569                                       0x14,
25570                                       0xFF00,
25571                                       0xCC00
25572                                     );
25573                 MP_WritePhyUshort(sc, 0x13, 0x8092);
25574                 ClearAndSetEthPhyBit( sc,
25575                                       0x14,
25576                                       0xFF00,
25577                                       0xB000
25578                                     );
25579                 MP_WritePhyUshort(sc, 0x13, 0x8088);
25580                 ClearAndSetEthPhyBit( sc,
25581                                       0x14,
25582                                       0xFF00,
25583                                       0x8000
25584                                     );
25585                 MP_WritePhyUshort(sc, 0x13, 0x808B);
25586                 ClearAndSetEthPhyBit( sc,
25587                                       0x14,
25588                                       0x3F00,
25589                                       0x0B00
25590                                     );
25591                 MP_WritePhyUshort(sc, 0x13, 0x808D);
25592                 ClearAndSetEthPhyBit( sc,
25593                                       0x14,
25594                                       0x1F00,
25595                                       0x0600
25596                                     );
25597                 MP_WritePhyUshort(sc, 0x13, 0x808C);
25598                 ClearAndSetEthPhyBit( sc,
25599                                       0x14,
25600                                       0xFF00,
25601                                       0xB000
25602                                     );
25603 
25604                 MP_WritePhyUshort(sc, 0x13, 0x80A0);
25605                 ClearAndSetEthPhyBit( sc,
25606                                       0x14,
25607                                       0xFF00,
25608                                       0x2000
25609                                     );
25610                 MP_WritePhyUshort(sc, 0x13, 0x80A2);
25611                 ClearAndSetEthPhyBit( sc,
25612                                       0x14,
25613                                       0xFF00,
25614                                       0x5000
25615                                     );
25616                 MP_WritePhyUshort(sc, 0x13, 0x809B);
25617                 ClearAndSetEthPhyBit( sc,
25618                                       0x14,
25619                                       0xF800,
25620                                       0xB000
25621                                     );
25622                 MP_WritePhyUshort(sc, 0x13, 0x809A);
25623                 ClearAndSetEthPhyBit( sc,
25624                                       0x14,
25625                                       0xFF00,
25626                                       0x4B00
25627                                     );
25628                 MP_WritePhyUshort(sc, 0x13, 0x809D);
25629                 ClearAndSetEthPhyBit( sc,
25630                                       0x14,
25631                                       0x3F00,
25632                                       0x0800
25633                                     );
25634                 MP_WritePhyUshort(sc, 0x13, 0x80A1);
25635                 ClearAndSetEthPhyBit( sc,
25636                                       0x14,
25637                                       0xFF00,
25638                                       0x7000
25639                                     );
25640                 MP_WritePhyUshort(sc, 0x13, 0x809F);
25641                 ClearAndSetEthPhyBit( sc,
25642                                       0x14,
25643                                       0x1F00,
25644                                       0x0300
25645                                     );
25646                 MP_WritePhyUshort(sc, 0x13, 0x809E);
25647                 ClearAndSetEthPhyBit( sc,
25648                                       0x14,
25649                                       0xFF00,
25650                                       0x8800
25651                                     );
25652 
25653                 MP_WritePhyUshort(sc, 0x13, 0x80B2);
25654                 ClearAndSetEthPhyBit( sc,
25655                                       0x14,
25656                                       0xFF00,
25657                                       0x2200
25658                                     );
25659                 MP_WritePhyUshort(sc, 0x13, 0x80AD);
25660                 ClearAndSetEthPhyBit( sc,
25661                                       0x14,
25662                                       0xF800,
25663                                       0x9800
25664                                     );
25665                 MP_WritePhyUshort(sc, 0x13, 0x80AF);
25666                 ClearAndSetEthPhyBit( sc,
25667                                       0x14,
25668                                       0x3F00,
25669                                       0x0800
25670                                     );
25671                 MP_WritePhyUshort(sc, 0x13, 0x80B3);
25672                 ClearAndSetEthPhyBit( sc,
25673                                       0x14,
25674                                       0xFF00,
25675                                       0x6F00
25676                                     );
25677                 MP_WritePhyUshort(sc, 0x13, 0x80B1);
25678                 ClearAndSetEthPhyBit( sc,
25679                                       0x14,
25680                                       0x1F00,
25681                                       0x0300
25682                                     );
25683                 MP_WritePhyUshort(sc, 0x13, 0x80B0);
25684                 ClearAndSetEthPhyBit( sc,
25685                                       0x14,
25686                                       0xFF00,
25687                                       0x9300
25688                                     );
25689                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25690 
25691                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25692                 MP_WritePhyUshort(sc, 0x13, 0x8011);
25693                 SetEthPhyBit(sc, 0x14, BIT_11);
25694                 MP_WritePhyUshort(sc, 0x1F, 0x0A42);
25695                 SetEthPhyBit(sc, 0x16, BIT_1);
25696 
25697                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
25698                 SetEthPhyBit( sc, 0x11, BIT_11 );
25699                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25700 
25701                 if (phy_power_saving == 1) {
25702                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25703                         SetEthPhyBit(sc, 0x10, BIT_2);
25704                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
25705                 } else {
25706                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25707                         ClearEthPhyBit(sc, 0x10, BIT_2);
25708                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
25709                         DELAY(20000);
25710                 }
25711 
25712                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25713                 MP_WritePhyUshort(sc, 0x13, 0x8045);
25714                 MP_WritePhyUshort(sc, 0x14, 0x2444);
25715                 MP_WritePhyUshort(sc, 0x13, 0x804d);
25716                 MP_WritePhyUshort(sc, 0x14, 0x2444);
25717                 MP_WritePhyUshort(sc, 0x13, 0x805d);
25718                 MP_WritePhyUshort(sc, 0x14, 0x2444);
25719                 MP_WritePhyUshort(sc, 0x13, 0x8011);
25720                 SetEthPhyBit(sc, 0x14, BIT_15);
25721                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
25722                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25723                 MP_WritePhyUshort(sc, 0x00, 0x9200);
25724         }
25725         //EthPhyPPSW
25726         if (sc->re_type == MACFG_56 || sc->re_type == MACFG_56 ||
25727             sc->re_type == MACFG_58 || sc->re_type == MACFG_58 ||
25728             sc->re_type == MACFG_60) {
25729                 //disable EthPhyPPSW
25730                 MP_WritePhyUshort(sc, 0x1F, 0x0BCD);
25731                 MP_WritePhyUshort(sc, 0x14, 0x5065);
25732                 MP_WritePhyUshort(sc, 0x14, 0xD065);
25733                 MP_WritePhyUshort(sc, 0x1F, 0x0BC8);
25734                 MP_WritePhyUshort(sc, 0x12, 0x00ED);
25735                 MP_WritePhyUshort(sc, 0x1F, 0x0BCD);
25736                 MP_WritePhyUshort(sc, 0x14, 0x1065);
25737                 MP_WritePhyUshort(sc, 0x14, 0x9065);
25738                 MP_WritePhyUshort(sc, 0x14, 0x1065);
25739                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25740         } else if (sc->re_type == MACFG_68 || sc->re_type == MACFG_69) {
25741                 //enable EthPhyPPSW
25742                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
25743                 SetEthPhyBit(sc, 0x11, BIT_7);
25744                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
25745         }
25746 
25747         switch(sc->re_type) {
25748         case MACFG_56:
25749         case MACFG_57:
25750         case MACFG_58:
25751         case MACFG_59:
25752         case MACFG_60:
25753         case MACFG_61:
25754         case MACFG_62:
25755         case MACFG_67:
25756         case MACFG_68:
25757         case MACFG_69:
25758         case MACFG_70:
25759         case MACFG_71:
25760                 if (phy_mdix_mode == RE_ETH_PHY_FORCE_MDI) {
25761                         //Force MDI
25762                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25763                         SetEthPhyBit(sc, 0x10, BIT_8 | BIT_9);
25764                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
25765                 } else if (phy_mdix_mode == RE_ETH_PHY_FORCE_MDIX) {
25766                         //Force MDIX
25767                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25768                         ClearEthPhyBit(sc, 0x10, BIT_8);
25769                         SetEthPhyBit(sc, 0x10, BIT_9);
25770                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
25771                 } else {
25772                         //Auto MDI/MDIX
25773                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
25774                         ClearEthPhyBit(sc, 0x10, BIT_8 | BIT_9);
25775                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
25776                 }
25777 
25778                 break;
25779         }
25780 
25781         if (phy_power_saving == 1) {
25782                 if (sc->re_type == MACFG_59 || sc->re_type == MACFG_60 ||
25783                     sc->re_type == MACFG_62 || sc->re_type == MACFG_67 ||
25784                     sc->re_type == MACFG_68 || sc->re_type == MACFG_69 ||
25785                     sc->re_type == MACFG_70 || sc->re_type == MACFG_71) {
25786                         MP_WritePhyOcpRegWord(sc, 0x0C41, 0x13, 0x0000);
25787                         MP_WritePhyOcpRegWord(sc, 0x0C41, 0x13, 0x0050);
25788                 }
25789         }
25790 
25791         if (eee_enable == 1)
25792                 re_enable_EEE(sc);
25793         else
25794                 re_disable_EEE(sc);
25795 
25796         MP_WritePhyUshort(sc, 0x1F, 0x0000);
25797 }
25798 
25799 void MP_WritePhyUshort(struct re_softc *sc,u_int8_t RegAddr,u_int16_t RegData)
25800 {
25801         u_int32_t		TmpUlong=0x80000000;
25802         u_int32_t		Timeout=0;
25803 
25804         if (RegAddr == 0x1F) {
25805                 sc->cur_page = RegData;
25806         }
25807 
25808         if (sc->re_type == MACFG_63) {
25809                 int i;
25810                 CSR_WRITE_4(sc, RE_OCPDR, OCPDR_Write |
25811                             (RegAddr & OCPDR_Reg_Mask) << OCPDR_GPHY_Reg_shift |
25812                             (RegData & OCPDR_Data_Mask));
25813                 CSR_WRITE_4(sc, RE_OCPAR, OCPAR_GPHY_Write);
25814                 CSR_WRITE_4(sc, RE_EPHY_RXER_NUM, 0);
25815 
25816                 for (i = 0; i < 100; i++) {
25817                         DELAY(1000);
25818                         if (!(CSR_READ_4(sc, RE_OCPAR) & OCPAR_Flag))
25819                                 break;
25820                 }
25821         } else if (sc->re_type == MACFG_56 || sc->re_type == MACFG_57 ||
25822                    sc->re_type == MACFG_58 || sc->re_type == MACFG_59 ||
25823                    sc->re_type == MACFG_60 || sc->re_type == MACFG_61 ||
25824                    sc->re_type == MACFG_62 || sc->re_type == MACFG_67 ||
25825                    sc->re_type == MACFG_69 || sc->re_type == MACFG_69 ||
25826                    sc->re_type == MACFG_70 || sc->re_type == MACFG_71) {
25827                 if (RegAddr == 0x1F) {
25828                         return;
25829                 }
25830 
25831                 MP_WritePhyOcpRegWord(sc, sc->cur_page, RegAddr, RegData);
25832         } else {
25833                 if (sc->re_type == MACFG_65 || sc->re_type == MACFG_66)
25834                         CSR_WRITE_4(sc, 0xD0, CSR_READ_4(sc, 0xD0) & ~0x00020000);
25835 
25836                 TmpUlong |= (((u_int32_t)RegAddr)<<16 | (u_int32_t)RegData);
25837 
25838                 CSR_WRITE_4(sc, RE_PHYAR, TmpUlong);
25839 
25840                 /* Wait for writing to Phy ok */
25841                 for (Timeout=0; Timeout<5; Timeout++) {
25842                         DELAY(1000);
25843                         if ((CSR_READ_4(sc, RE_PHYAR)&PHYAR_Flag)==0)
25844                                 break;
25845                 }
25846 
25847                 if (sc->re_type == MACFG_65 || sc->re_type == MACFG_66)
25848                         CSR_WRITE_4(sc, 0xD0, CSR_READ_4(sc, 0xD0) | 0x00020000);
25849         }
25850 }
25851 
25852 u_int16_t MP_ReadPhyUshort(struct re_softc *sc,u_int8_t RegAddr)
25853 {
25854         u_int16_t		RegData;
25855         u_int32_t		TmpUlong;
25856         u_int32_t		Timeout=0;
25857 
25858         if (sc->re_type == MACFG_63) {
25859                 int i;
25860                 CSR_WRITE_4(sc, RE_OCPDR, OCPDR_Read |
25861                             (RegAddr & OCPDR_Reg_Mask) << OCPDR_GPHY_Reg_shift);
25862                 CSR_WRITE_4(sc, RE_OCPAR, OCPAR_GPHY_Write);
25863                 CSR_WRITE_4(sc, RE_EPHY_RXER_NUM, 0);
25864 
25865                 for (i = 0; i < 100; i++) {
25866                         DELAY(1000);
25867                         if (!(CSR_READ_4(sc, RE_OCPAR) & OCPAR_Flag))
25868                                 break;
25869                 }
25870 
25871                 DELAY(1000);
25872                 CSR_WRITE_4(sc, RE_OCPAR, OCPAR_GPHY_Read);
25873                 CSR_WRITE_4(sc, RE_EPHY_RXER_NUM, 0);
25874 
25875                 for (i = 0; i < 100; i++) {
25876                         DELAY(1000);
25877                         if (CSR_READ_4(sc, RE_OCPAR) & OCPAR_Flag)
25878                                 break;
25879                 }
25880 
25881                 RegData = CSR_READ_4(sc, RE_OCPDR) & OCPDR_Data_Mask;
25882         } else if (sc->re_type == MACFG_56 || sc->re_type == MACFG_57 ||
25883                    sc->re_type == MACFG_58 || sc->re_type == MACFG_59 ||
25884                    sc->re_type == MACFG_60 || sc->re_type == MACFG_61 ||
25885                    sc->re_type == MACFG_62 || sc->re_type == MACFG_67 ||
25886                    sc->re_type == MACFG_69 || sc->re_type == MACFG_69 ||
25887                    sc->re_type == MACFG_70 || sc->re_type == MACFG_71) {
25888                 RegData= MP_ReadPhyOcpRegWord(sc, sc->cur_page, RegAddr);
25889 
25890         } else {
25891                 if (sc->re_type == MACFG_65 || sc->re_type == MACFG_66)
25892                         CSR_WRITE_4(sc, 0xD0, CSR_READ_4(sc, 0xD0) & ~0x00020000);
25893 
25894                 TmpUlong = ((u_int32_t)RegAddr << 16);
25895                 CSR_WRITE_4(sc, RE_PHYAR, TmpUlong);
25896 
25897                 /* Wait for writing to Phy ok */
25898                 for (Timeout=0; Timeout<5; Timeout++) {
25899                         DELAY(1000);
25900                         TmpUlong = CSR_READ_4(sc, RE_PHYAR);
25901                         if ((TmpUlong&PHYAR_Flag)!=0)
25902                                 break;
25903                 }
25904 
25905                 RegData = (u_int16_t)(TmpUlong & 0x0000ffff);
25906 
25907                 if (sc->re_type == MACFG_65 || sc->re_type == MACFG_66)
25908                         CSR_WRITE_4(sc, 0xD0, CSR_READ_4(sc, 0xD0) | 0x00020000);
25909         }
25910 
25911         return RegData;
25912 }
25913 
25914 void MP_WriteEPhyUshort(struct re_softc *sc, u_int8_t RegAddr, u_int16_t RegData)
25915 {
25916         u_int32_t		TmpUlong=0x80000000;
25917         u_int32_t		Timeout=0;
25918 
25919         TmpUlong |= (((u_int32_t)RegAddr<<16) | (u_int32_t)RegData);
25920 
25921         CSR_WRITE_4(sc, RE_EPHYAR, TmpUlong);
25922 
25923         /* Wait for writing to Phy ok */
25924         for (Timeout=0; Timeout<5; Timeout++) {
25925                 DELAY(1000);
25926                 if ((CSR_READ_4(sc, RE_EPHYAR)&PHYAR_Flag)==0)
25927                         break;
25928         }
25929 }
25930 
25931 u_int16_t MP_ReadEPhyUshort(struct re_softc *sc, u_int8_t RegAddr)
25932 {
25933         u_int16_t		RegData;
25934         u_int32_t		TmpUlong;
25935         u_int32_t		Timeout=0;
25936 
25937         TmpUlong = ((u_int32_t)RegAddr << 16);
25938         CSR_WRITE_4(sc, RE_EPHYAR, TmpUlong);
25939 
25940         /* Wait for writing to Phy ok */
25941         for (Timeout=0; Timeout<5; Timeout++) {
25942                 DELAY(1000);
25943                 TmpUlong = CSR_READ_4(sc, RE_EPHYAR);
25944                 if ((TmpUlong&PHYAR_Flag)!=0)
25945                         break;
25946         }
25947 
25948         RegData = (u_int16_t)(TmpUlong & 0x0000ffff);
25949 
25950         return RegData;
25951 }
25952 
25953 static u_int8_t re_calc_efuse_dummy_bit(u_int16_t reg)
25954 {
25955         int s,a,b;
25956         u_int8_t dummyBitPos = 0;
25957 
25958 
25959         s=reg% 32;
25960         a=s % 16;
25961         b=s/16;
25962 
25963         if (s/16) {
25964                 dummyBitPos = (u_int8_t)(16-a);
25965         } else {
25966                 dummyBitPos = (u_int8_t)a;
25967         }
25968 
25969         return dummyBitPos;
25970 }
25971 
25972 static u_int32_t re_decode_efuse_cmd(struct re_softc *sc, u_int32_t DwCmd)
25973 {
25974         u_int16_t reg = (u_int16_t)((DwCmd & 0x00FE0000) >> 17);
25975         u_int32_t DummyPos = re_calc_efuse_dummy_bit(reg);
25976         u_int32_t DeCodeDwCmd = DwCmd;
25977         u_int32_t Dw17BitData;
25978 
25979 
25980         if (sc->re_efuse_ver < 3) {
25981                 DeCodeDwCmd = (DwCmd>>(DummyPos+1))<<DummyPos;
25982                 if (DummyPos > 0) {
25983                         DeCodeDwCmd |= ((DwCmd<<(32-DummyPos))>>(32-DummyPos));
25984                 }
25985         } else {
25986                 reg = (u_int16_t)((DwCmd & 0x007F0000) >> 16);
25987                 DummyPos = re_calc_efuse_dummy_bit(reg);
25988                 Dw17BitData = ((DwCmd & BIT_23) >> 23);
25989                 Dw17BitData <<= 16;
25990                 Dw17BitData |= (DwCmd & 0x0000FFFF);
25991                 DeCodeDwCmd = (Dw17BitData>>(DummyPos+1))<<DummyPos;
25992                 if (DummyPos > 0) {
25993                         DeCodeDwCmd |= ((Dw17BitData<<(32-DummyPos))>>(32-DummyPos));
25994                 }
25995         }
25996 
25997         return DeCodeDwCmd;
25998 }
25999 
26000 #define EFUSE_WRITE 0x80000000
26001 #define EFUSE_WRITE_OK  0x00000000
26002 #define EFUSE_READ  0x00000000
26003 #define EFUSE_READ_OK  0x80000000
26004 #define EFUSE_Reg_Mask 0x03FF
26005 #define EFUSE_Reg_Shift 8
26006 #define EFUSE_Check_Cnt 300
26007 #define EFUSE_READ_FAIL 0xFF
26008 #define EFUSE_Data_Mask 0x000000FF
26009 
26010 u_int8_t MP_ReadEfuse(struct re_softc *sc, u_int16_t reg)
26011 {
26012         u_int8_t efuse_data = 0;
26013         u_int32_t temp;
26014         u_int32_t cnt;
26015 
26016         if (sc->re_efuse_ver == EFUSE_NOT_SUPPORT)
26017                 return EFUSE_READ_FAIL;
26018 
26019         if (sc->re_efuse_ver == EFUSE_SUPPORT_V1) {
26020                 temp = EFUSE_READ | ((reg & EFUSE_Reg_Mask) << EFUSE_Reg_Shift);
26021                 CSR_WRITE_4(sc, RE_EFUSEAR, temp);
26022 
26023                 cnt = 0;
26024                 do {
26025                         DELAY(100);
26026                         temp = CSR_READ_4(sc, RE_EFUSEAR);
26027                         cnt++;
26028                 } while (!(temp & EFUSE_READ_OK) && (cnt < EFUSE_Check_Cnt));
26029 
26030                 if (cnt == EFUSE_Check_Cnt)
26031                         efuse_data = EFUSE_READ_FAIL;
26032                 else
26033                         efuse_data = (u_int8_t)(CSR_READ_4(sc, RE_EFUSEAR) & EFUSE_Data_Mask);
26034         } else  if (sc->re_efuse_ver == EFUSE_SUPPORT_V2) {
26035                 temp = (reg/2) & 0x03ff;
26036                 temp <<= 17;
26037                 temp |= EFUSE_READ;
26038                 CSR_WRITE_4(sc, RE_EFUSEAR, temp);
26039 
26040                 cnt = 0;
26041                 do {
26042                         DELAY(100);
26043                         temp = CSR_READ_4(sc, RE_EFUSEAR);
26044                         cnt++;
26045                 } while (!(temp & EFUSE_READ_OK) && (cnt < EFUSE_Check_Cnt));
26046 
26047                 if (cnt == EFUSE_Check_Cnt) {
26048                         efuse_data = EFUSE_READ_FAIL;
26049                 } else {
26050                         temp = CSR_READ_4(sc, RE_EFUSEAR);
26051                         temp = re_decode_efuse_cmd(sc, temp);
26052 
26053                         if (reg%2) {
26054                                 temp >>= 8;
26055                                 efuse_data = (u_int8_t)temp;
26056                         } else {
26057                                 efuse_data = (u_int8_t)temp;
26058                         }
26059                 }
26060         } else  if (sc->re_efuse_ver == EFUSE_SUPPORT_V3) {
26061                 temp = (reg/2) & 0x03ff;
26062                 temp <<= 16;
26063                 temp |= EFUSE_READ;
26064                 CSR_WRITE_4(sc, RE_EFUSEAR, temp);
26065 
26066                 cnt = 0;
26067                 do {
26068                         DELAY(100);
26069                         temp = CSR_READ_4(sc, RE_EFUSEAR);
26070                         cnt++;
26071                 } while (!(temp & EFUSE_READ_OK) && (cnt < EFUSE_Check_Cnt));
26072 
26073                 if (cnt == EFUSE_Check_Cnt) {
26074                         efuse_data = EFUSE_READ_FAIL;
26075                 } else {
26076                         temp = CSR_READ_4(sc, RE_EFUSEAR);
26077                         temp = re_decode_efuse_cmd(sc, temp);
26078 
26079                         if (reg%2) {
26080                                 temp >>= 8;
26081                                 efuse_data = (u_int8_t)temp;
26082                         } else {
26083                                 efuse_data = (u_int8_t)temp;
26084                         }
26085                 }
26086         }
26087 
26088         DELAY(20);
26089 
26090         return efuse_data;
26091 }
26092 
26093 void MP_WriteOtherFunPciEConfigSpace(
26094         struct re_softc *sc,
26095         u_int8_t MultiFunSelBit,
26096         u_int16_t ByteEnAndAddr,
26097         u_int32_t RegData)
26098 {
26099         u_int32_t Timeout = 0, WaitCount = 10;
26100         u_int32_t TmpUlong = 0x80000000;
26101         u_int32_t WriteDone;
26102 
26103         if (MultiFunSelBit > 7) {
26104                 return;
26105         }
26106 
26107         TmpUlong |= MultiFunSelBit << 16;
26108 
26109         CSR_WRITE_4(sc, RE_CSIDR, RegData);
26110         TmpUlong |= (u_int32_t) ByteEnAndAddr;
26111         CSR_WRITE_4(sc, RE_CSIAR, TmpUlong);
26112 
26113         do {
26114                 DELAY(100);
26115 
26116                 WriteDone = CSR_READ_4(sc, RE_CSIAR);
26117                 Timeout++;
26118         } while (((WriteDone & 0x80000000) != 0) && (Timeout < WaitCount));
26119 
26120 
26121         DELAY(50);
26122 }
26123 
26124 u_int32_t MP_ReadOtherFunPciEConfigSpace(
26125         struct re_softc *sc,
26126         u_int8_t MultiFunSelBit,
26127         u_int16_t ByteEnAndAddr)
26128 {
26129         u_int32_t Timeout = 0, WaitCount = 10;
26130         u_int32_t TmpUlong = 0x00000000;
26131         u_int32_t ReadDone;
26132         u_int32_t RetVal = 0xffffffff;
26133 
26134         if (MultiFunSelBit > 7) {
26135                 return 0xffffffff;
26136         }
26137 
26138         TmpUlong |= MultiFunSelBit << 16;
26139 
26140         TmpUlong |= (u_int32_t) ByteEnAndAddr;
26141         CSR_WRITE_4(sc, RE_CSIAR, TmpUlong);
26142 
26143         do {
26144                 DELAY(100);
26145 
26146                 ReadDone = CSR_READ_4(sc, RE_CSIAR);
26147                 Timeout++;
26148         } while (((ReadDone & 0x80000000) == 0)&& (Timeout < WaitCount));
26149 
26150         DELAY(50);
26151 
26152         return RetVal;
26153 }
26154 
26155 void MP_WritePciEConfigSpace(
26156         struct re_softc *sc,
26157         u_int16_t ByteEnAndAddr,
26158         u_int32_t RegData)
26159 {
26160         u_int8_t MultiFunSelBit;
26161 
26162         if (sc->re_type == MACFG_52 || sc->re_type == MACFG_53) {
26163                 MultiFunSelBit = 2;
26164         } else if (sc->re_type == MACFG_60) {
26165                 MultiFunSelBit = 1;
26166         } else {
26167                 MultiFunSelBit = 0;
26168         }
26169 
26170         MP_WriteOtherFunPciEConfigSpace(sc, MultiFunSelBit, ByteEnAndAddr, RegData);
26171 
26172 }
26173 
26174 u_int32_t MP_ReadPciEConfigSpace(
26175         struct re_softc *sc,
26176         u_int16_t ByteEnAndAddr)
26177 {
26178         u_int8_t MultiFunSelBit;
26179 
26180         if (sc->re_type == MACFG_52 || sc->re_type == MACFG_53) {
26181                 MultiFunSelBit = 2;
26182         } else if (sc->re_type == MACFG_60) {
26183                 MultiFunSelBit = 1;
26184         } else {
26185                 MultiFunSelBit = 0;
26186         }
26187 
26188         return MP_ReadOtherFunPciEConfigSpace(sc, MultiFunSelBit, ByteEnAndAddr);
26189 }
26190 
26191 static u_int16_t MappingPhyOcpAddress(
26192         struct re_softc *sc,
26193         u_int16_t   PageNum,
26194         u_int8_t  RegNum)
26195 {
26196         u_int16_t OcpPageNum = 0;
26197         u_int8_t OcpRegNum = 0;
26198         u_int16_t OcpPhyAddress = 0;
26199 
26200         if (PageNum == 0) {
26201                 OcpPageNum = 0x0A40 + (RegNum / 8);
26202                 OcpRegNum = 0x10 + (RegNum % 8);
26203         } else {
26204                 OcpPageNum = PageNum;
26205                 OcpRegNum = RegNum;
26206         }
26207 
26208         OcpPageNum <<= 4;
26209 
26210         if (OcpRegNum < 16) {
26211                 OcpPhyAddress = 0;
26212         } else {
26213                 OcpRegNum -= 16;
26214                 OcpRegNum <<= 1;
26215 
26216                 OcpPhyAddress = OcpPageNum + OcpRegNum;
26217         }
26218 
26219         return OcpPhyAddress;
26220 }
26221 
26222 static u_int16_t MP_RealReadPhyOcpRegWord(
26223         struct re_softc *sc,
26224         u_int16_t OcpRegAddr)
26225 {
26226         u_int32_t Timeout = 0, WaitCount = 100;
26227         u_int32_t TmpUlong;
26228         u_int16_t RetVal = 0xffff;
26229 
26230         TmpUlong = OcpRegAddr / 2;
26231         TmpUlong <<= 16;
26232 
26233         CSR_WRITE_4(sc, RE_PHYOCPACCESS, TmpUlong);
26234 
26235         do {
26236                 DELAY(1);
26237 
26238                 TmpUlong = CSR_READ_4(sc, RE_PHYOCPACCESS);
26239 
26240                 Timeout++;
26241         } while ((!(TmpUlong & PHYAR_Flag)) && (Timeout < WaitCount));
26242 
26243         RetVal = (u_int16_t)TmpUlong;
26244 
26245         return RetVal;
26246 }
26247 
26248 u_int16_t MP_ReadPhyOcpRegWord(
26249         struct re_softc *sc,
26250         u_int16_t PhyPage,
26251         u_int8_t PhyRegNum)
26252 {
26253         u_int16_t OcpRegAddr;
26254         u_int16_t RetVal = 0xffff;
26255 
26256         OcpRegAddr = MappingPhyOcpAddress(sc, PhyPage, PhyRegNum);
26257 
26258         if (OcpRegAddr % 2) {
26259                 u_int16_t tmpUshort;
26260 
26261                 tmpUshort = MP_RealReadPhyOcpRegWord(sc, OcpRegAddr);
26262                 tmpUshort &= 0xFF00;
26263                 tmpUshort >>= 8;
26264                 RetVal = tmpUshort;
26265 
26266 
26267                 tmpUshort = MP_RealReadPhyOcpRegWord(sc, OcpRegAddr + 1);
26268                 tmpUshort &= 0x00FF;
26269                 tmpUshort <<= 8;
26270                 RetVal |= tmpUshort;
26271         } else {
26272                 RetVal = MP_RealReadPhyOcpRegWord(sc, OcpRegAddr);
26273         }
26274 
26275         return RetVal;
26276 }
26277 
26278 static void MP_RealWritePhyOcpRegWord(
26279         struct re_softc *sc,
26280         u_int16_t OcpRegAddr,
26281         u_int16_t RegData)
26282 {
26283         u_int32_t Timeout = 0, WaitCount = 100;
26284         u_int32_t TmpUlong;
26285 
26286         TmpUlong = OcpRegAddr / 2;
26287         TmpUlong <<= 16;
26288         TmpUlong += RegData;
26289         TmpUlong |= BIT_31;
26290 
26291         CSR_WRITE_4(sc, RE_PHYOCPACCESS, TmpUlong);
26292 
26293         do {
26294                 DELAY(1);
26295 
26296                 TmpUlong = CSR_READ_4(sc, RE_PHYOCPACCESS);
26297 
26298                 Timeout++;
26299         } while ((TmpUlong & PHYAR_Flag) && (Timeout < WaitCount));
26300 }
26301 
26302 void MP_WritePhyOcpRegWord(
26303         struct re_softc *sc,
26304         u_int16_t PhyPage,
26305         u_int8_t PhyRegNum,
26306         u_int16_t RegData)
26307 {
26308         u_int16_t OcpRegAddr;
26309 
26310         OcpRegAddr = MappingPhyOcpAddress(sc, PhyPage, PhyRegNum);
26311 
26312         if (OcpRegAddr % 2) {
26313                 u_int16_t tmpUshort;
26314 
26315                 tmpUshort = MP_RealReadPhyOcpRegWord(sc, OcpRegAddr);
26316                 tmpUshort &= 0x00FF;
26317                 tmpUshort |= (RegData <<  8);
26318                 MP_RealWritePhyOcpRegWord(sc, OcpRegAddr, tmpUshort);
26319                 tmpUshort = MP_RealReadPhyOcpRegWord(sc, OcpRegAddr + 1);
26320                 tmpUshort &= 0xFF00;
26321                 tmpUshort |= (RegData >> 8);
26322                 MP_RealWritePhyOcpRegWord(sc, OcpRegAddr + 1, tmpUshort);
26323         } else {
26324                 MP_RealWritePhyOcpRegWord(sc, OcpRegAddr, RegData);
26325         }
26326 }
26327 
26328 void MP_WriteMcuAccessRegWord(
26329         struct re_softc *sc,
26330         u_int16_t ExtRegAddr,
26331         u_int16_t RegData)
26332 {
26333         u_int32_t TmpUlong;
26334 
26335         TmpUlong = ExtRegAddr / 2;
26336         TmpUlong <<= 16;
26337         TmpUlong += RegData;
26338         TmpUlong |= BIT_31;
26339 
26340         CSR_WRITE_4(sc, RE_MCUACCESS, TmpUlong);
26341 }
26342 
26343 u_int16_t MP_ReadMcuAccessRegWord(
26344         struct re_softc *sc,
26345         u_int16_t ExtRegAddr)
26346 {
26347         u_int32_t TmpUlong;
26348         u_int16_t RetVal = 0xffff;
26349 
26350         TmpUlong = ExtRegAddr / 2;
26351         TmpUlong <<= 16;
26352 
26353         CSR_WRITE_4(sc, RE_MCUACCESS, TmpUlong);
26354         TmpUlong = CSR_READ_4(sc, RE_MCUACCESS);
26355         RetVal = (u_int16_t)TmpUlong;
26356 
26357         return RetVal;
26358 }
26359 
26360 static u_int32_t real_ocp_read(struct re_softc *sc, u_int16_t addr, u_int8_t len)
26361 {
26362         int i, val_shift, shift = 0;
26363         u_int32_t value1 = 0, value2 = 0, mask;
26364 
26365         if (len > 4 || len <= 0)
26366                 return -1;
26367 
26368         while (len > 0) {
26369                 val_shift = addr % 4;
26370                 addr = addr & ~0x3;
26371 
26372                 CSR_WRITE_4(sc, RE_OCPAR, (0x0F<<12) | (addr&0xFFF));
26373 
26374                 for (i = 0; i < 20; i++) {
26375                         DELAY(100);
26376                         if (CSR_READ_4(sc, RE_OCPAR) & OCPAR_Flag)
26377                                 break;
26378                 }
26379 
26380                 if (len == 1)       mask = (0xFF << (val_shift * 8)) & 0xFFFFFFFF;
26381                 else if (len == 2)  mask = (0xFFFF << (val_shift * 8)) & 0xFFFFFFFF;
26382                 else if (len == 3)  mask = (0xFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
26383                 else            mask = (0xFFFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
26384 
26385                 value1 = CSR_READ_4(sc, RE_OCPDR) & mask;
26386                 value2 |= (value1 >> val_shift * 8) << shift * 8;
26387 
26388                 if (len <= 4 - val_shift) {
26389                         len = 0;
26390                 } else {
26391                         len -= (4 - val_shift);
26392                         shift = 4 - val_shift;
26393                         addr += 4;
26394                 }
26395         }
26396 
26397         DELAY(20);
26398 
26399         return value2;
26400 }
26401 
26402 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)
26403 {
26404         return re_eri_read_with_oob_base_address(sc, addr, len, ERIAR_OOB, base_address);
26405 }
26406 
26407 static u_int32_t OCP_read(struct re_softc *sc, u_int16_t addr, u_int8_t len)
26408 {
26409         u_int32_t value = 0;
26410 
26411         if (HW_DASH_SUPPORT_TYPE_2(sc))
26412                 value = re_eri_read(sc, addr, len, ERIAR_OOB);
26413         else if (HW_DASH_SUPPORT_TYPE_3(sc))
26414                 value = OCP_read_with_oob_base_address(sc, addr, len, RTL8168FP_OOBMAC_BASE);
26415         else
26416                 value = real_ocp_read(sc, addr, len);
26417 
26418         return value;
26419 }
26420 
26421 static int real_ocp_write(struct re_softc *sc, u_int16_t addr, u_int8_t len, u_int32_t value)
26422 {
26423         int i, val_shift, shift = 0;
26424         u_int32_t value1 = 0, mask;
26425 
26426         if (len > 4 || len <= 0)
26427                 return -1;
26428 
26429         while (len > 0) {
26430                 val_shift = addr % 4;
26431                 addr = addr & ~0x3;
26432 
26433                 if (len == 1)       mask = (0xFF << (val_shift * 8)) & 0xFFFFFFFF;
26434                 else if (len == 2)  mask = (0xFFFF << (val_shift * 8)) & 0xFFFFFFFF;
26435                 else if (len == 3)  mask = (0xFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
26436                 else            mask = (0xFFFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
26437 
26438                 value1 = OCP_read(sc, addr, 4) & ~mask;
26439                 value1 |= ((value << val_shift * 8) >> shift * 8);
26440 
26441                 CSR_WRITE_4(sc, RE_OCPDR, value1);
26442                 CSR_WRITE_4(sc, RE_OCPAR, OCPAR_Flag | (0x0F<<12) | (addr&0xFFF));
26443 
26444                 for (i = 0; i < 10; i++) {
26445                         DELAY(100);
26446 
26447                         /* Check if the RTL8168 has completed ERI write */
26448                         if (!(CSR_READ_4(sc, RE_OCPAR) & OCPAR_Flag))
26449                                 break;
26450                 }
26451 
26452                 if (len <= 4 - val_shift) {
26453                         len = 0;
26454                 } else {
26455                         len -= (4 - val_shift);
26456                         shift = 4 - val_shift;
26457                         addr += 4;
26458                 }
26459         }
26460 
26461         DELAY(20);
26462 
26463         return 0;
26464 }
26465 
26466 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)
26467 {
26468         return re_eri_write_with_oob_base_address(sc, addr, len, value, ERIAR_OOB, base_address);
26469 }
26470 
26471 static void OCP_write(struct re_softc *sc, u_int16_t addr, u_int8_t len, u_int32_t value)
26472 {
26473         if (HW_DASH_SUPPORT_TYPE_2(sc))
26474                 re_eri_write(sc, addr, len, value, ERIAR_OOB);
26475         else if (HW_DASH_SUPPORT_TYPE_3(sc))
26476                 OCP_write_with_oob_base_address(sc, addr, len, value, RTL8168FP_OOBMAC_BASE);
26477         else
26478                 real_ocp_write(sc, addr, len, value);
26479 }
26480 
26481 static void OOB_mutex_lock(struct re_softc *sc)
26482 {
26483         u_int8_t reg_16, reg_a0;
26484         u_int32_t wait_cnt_0, wait_Cnt_1;
26485         u_int16_t ocp_reg_mutex_ib;
26486         u_int16_t ocp_reg_mutex_oob;
26487         u_int16_t ocp_reg_mutex_prio;
26488 
26489         switch (sc->re_type) {
26490         case MACFG_63:
26491         case MACFG_64:
26492         case MACFG_65:
26493                 ocp_reg_mutex_oob = 0x16;
26494                 ocp_reg_mutex_ib = 0x17;
26495                 ocp_reg_mutex_prio = 0x9C;
26496                 break;
26497         case MACFG_66:
26498                 ocp_reg_mutex_oob = 0x06;
26499                 ocp_reg_mutex_ib = 0x07;
26500                 ocp_reg_mutex_prio = 0x9C;
26501                 break;
26502         case MACFG_61:
26503         case MACFG_62:
26504         case MACFG_67:
26505         case MACFG_70:
26506         case MACFG_71:
26507         default:
26508                 ocp_reg_mutex_oob = 0x110;
26509                 ocp_reg_mutex_ib = 0x114;
26510                 ocp_reg_mutex_prio = 0x11C;
26511                 break;
26512         }
26513 
26514         OCP_write(sc, ocp_reg_mutex_ib, 1, BIT_0);
26515         reg_16 = OCP_read(sc, ocp_reg_mutex_oob, 1);
26516         wait_cnt_0 = 0;
26517         while(reg_16) {
26518                 reg_a0 = OCP_read(sc, ocp_reg_mutex_prio, 1);
26519                 if (reg_a0) {
26520                         OCP_write(sc, ocp_reg_mutex_ib, 1, 0x00);
26521                         reg_a0 = OCP_read(sc, ocp_reg_mutex_prio, 1);
26522                         wait_Cnt_1 = 0;
26523                         while(reg_a0) {
26524                                 reg_a0 = OCP_read(sc, ocp_reg_mutex_prio, 1);
26525 
26526                                 wait_Cnt_1++;
26527 
26528                                 if (wait_Cnt_1 > 2000)
26529                                         break;
26530                         };
26531                         OCP_write(sc, ocp_reg_mutex_ib, 1, BIT_0);
26532 
26533                 }
26534                 reg_16 = OCP_read(sc, ocp_reg_mutex_oob, 1);
26535 
26536                 wait_cnt_0++;
26537 
26538                 if (wait_cnt_0 > 2000)
26539                         break;
26540         };
26541 }
26542 
26543 static void OOB_mutex_unlock(struct re_softc *sc)
26544 {
26545         u_int16_t ocp_reg_mutex_ib;
26546         u_int16_t ocp_reg_mutex_oob;
26547         u_int16_t ocp_reg_mutex_prio;
26548 
26549         switch (sc->re_type) {
26550         case MACFG_63:
26551         case MACFG_64:
26552         case MACFG_65:
26553                 ocp_reg_mutex_oob = 0x16;
26554                 ocp_reg_mutex_ib = 0x17;
26555                 ocp_reg_mutex_prio = 0x9C;
26556                 break;
26557         case MACFG_66:
26558                 ocp_reg_mutex_oob = 0x06;
26559                 ocp_reg_mutex_ib = 0x07;
26560                 ocp_reg_mutex_prio = 0x9C;
26561                 break;
26562         case MACFG_61:
26563         case MACFG_62:
26564         case MACFG_67:
26565         case MACFG_70:
26566         case MACFG_71:
26567         default:
26568                 ocp_reg_mutex_oob = 0x110;
26569                 ocp_reg_mutex_ib = 0x114;
26570                 ocp_reg_mutex_prio = 0x11C;
26571                 break;
26572         }
26573 
26574         OCP_write(sc, ocp_reg_mutex_prio, 1, BIT_0);
26575         OCP_write(sc, ocp_reg_mutex_ib, 1, 0x00);
26576 }
26577 
26578 static int re_check_dash(struct re_softc *sc)
26579 {
26580         switch(sc->re_type) {
26581         case MACFG_61:
26582         case MACFG_62:
26583         case MACFG_67:
26584         case MACFG_63:
26585         case MACFG_64:
26586         case MACFG_65:
26587         case MACFG_66:
26588         case MACFG_70:
26589         case MACFG_71:
26590                 if (HW_DASH_SUPPORT_TYPE_2(sc) || HW_DASH_SUPPORT_TYPE_3(sc)) {
26591                         if (OCP_read(sc, 0x128, 1) & BIT_0)
26592                                 return 1;
26593                         else
26594                                 return 0;
26595                 } else {
26596                         u_int32_t reg;
26597 
26598                         if (sc->re_type == MACFG_66)
26599                                 reg = 0xb8;
26600                         else
26601                                 reg = 0x10;
26602 
26603                         if (OCP_read(sc, reg, 2) & 0x00008000)
26604                                 return 1;
26605                         else
26606                                 return 0;
26607                 }
26608                 break;
26609         default:
26610                 return 0;
26611         }
26612 }
26613 
26614 static void OOB_notify(struct re_softc *sc, u_int8_t cmd)
26615 {
26616         int i;
26617 
26618         CSR_WRITE_1(sc, RE_ERIDR, cmd);
26619         CSR_WRITE_4(sc, RE_ERIAR, 0x800010E8);
26620         DELAY(2000);
26621         for (i = 0; i < 5; i++) {
26622                 DELAY(100);
26623                 if (!(CSR_READ_4(sc, RE_ERIAR) & ERIAR_Flag))
26624                         break;
26625         }
26626 
26627         OCP_write(sc, 0x30, 1, 0x01);
26628 }
26629 
26630 void re_driver_start(struct re_softc *sc)
26631 {
26632         if (HW_DASH_SUPPORT_TYPE_2(sc) || HW_DASH_SUPPORT_TYPE_3(sc)) {
26633                 u_int32_t tmp_value;
26634 
26635                 if (!sc->re_dash)
26636                         return;
26637 
26638                 OCP_write(sc, 0x180, 1, OOB_CMD_DRIVER_START);
26639                 tmp_value = OCP_read(sc, 0x30, 1);
26640                 tmp_value |= BIT_0;
26641                 OCP_write(sc, 0x30, 1, tmp_value);
26642         } else {
26643                 int timeout;
26644                 u_int32_t reg;
26645 
26646                 if (sc->re_type == MACFG_66) {
26647                         CSR_WRITE_1(sc, RE_TwiCmdReg, CSR_READ_1(sc, RE_TwiCmdReg) | (BIT_7));
26648                 }
26649 
26650                 OOB_notify(sc, OOB_CMD_DRIVER_START);
26651 
26652                 if (sc->re_type == MACFG_66)
26653                         reg = 0xB8;
26654                 else
26655                         reg = 0x10;
26656 
26657                 for (timeout = 0; timeout < 10; timeout++) {
26658                         DELAY(10000);
26659                         if (OCP_read(sc, reg, 2) & BIT_11)
26660                                 break;
26661                 }
26662         }
26663 }
26664 
26665 void re_driver_stop(struct re_softc *sc)
26666 {
26667         if (HW_DASH_SUPPORT_TYPE_2(sc) || HW_DASH_SUPPORT_TYPE_3(sc)) {
26668                 u_int32_t tmp_value;
26669 
26670                 if (!sc->re_dash)
26671                         return;
26672 
26673                 Dash2DisableTxRx(sc);
26674 
26675                 OCP_write(sc, 0x180, 1, OOB_CMD_DRIVER_STOP);
26676                 tmp_value = OCP_read(sc, 0x30, 1);
26677                 tmp_value |= BIT_0;
26678                 OCP_write(sc, 0x30, 1, tmp_value);
26679         } else {
26680                 int timeout;
26681                 u_int32_t reg;
26682 
26683                 OOB_notify(sc, OOB_CMD_DRIVER_STOP);
26684 
26685                 if (sc->re_type == MACFG_66)
26686                         reg = 0xB8;
26687                 else
26688                         reg = 0x10;
26689 
26690                 for (timeout = 0; timeout < 10; timeout++) {
26691                         DELAY(10000);
26692                         if ((OCP_read(sc, reg, 4) & BIT_11) == 0)
26693                                 break;
26694                 }
26695 
26696                 if (sc->re_type == MACFG_66) {
26697                         CSR_WRITE_1(sc, RE_TwiCmdReg, CSR_READ_1(sc, RE_TwiCmdReg) & ~(BIT_7));
26698                 }
26699         }
26700 }
26701 
26702 /*----------------------------------------------------------------------------*/
26703 /*	8139 (CR9346) 9346 command register bits (offset 0x50, 1 byte)*/
26704 /*----------------------------------------------------------------------------*/
26705 #define CR9346_EEDO				0x01			/* 9346 data out*/
26706 #define CR9346_EEDI				0x02			/* 9346 data in*/
26707 #define CR9346_EESK				0x04			/* 9346 serial clock*/
26708 #define CR9346_EECS				0x08			/* 9346 chip select*/
26709 #define CR9346_EEM0				0x40			/* select 8139 operating mode*/
26710 #define CR9346_EEM1				0x80			/* 00: normal*/
26711 #define CR9346_CFGRW			0xC0			/* Config register write*/
26712 #define CR9346_NORM			0x00
26713 
26714 /*----------------------------------------------------------------------------*/
26715 /*	EEPROM bit definitions(EEPROM control register bits)*/
26716 /*----------------------------------------------------------------------------*/
26717 #define EN_TRNF					0x10			/* Enable turnoff*/
26718 #define EEDO						CR9346_EEDO	/* EEPROM data out*/
26719 #define EEDI						CR9346_EEDI		/* EEPROM data in (set for writing data)*/
26720 #define EECS						CR9346_EECS		/* EEPROM chip select (1=high, 0=low)*/
26721 #define EESK						CR9346_EESK		/* EEPROM shift clock (1=high, 0=low)*/
26722 
26723 /*----------------------------------------------------------------------------*/
26724 /*	EEPROM opcodes*/
26725 /*----------------------------------------------------------------------------*/
26726 #define EEPROM_READ_OPCODE	06
26727 #define EEPROM_WRITE_OPCODE	05
26728 #define EEPROM_ERASE_OPCODE	07
26729 #define EEPROM_EWEN_OPCODE	19				/* Erase/write enable*/
26730 #define EEPROM_EWDS_OPCODE	16				/* Erase/write disable*/
26731 
26732 #define	CLOCK_RATE				50				/* us*/
26733 
26734 #define RaiseClock(_sc,_x)				\
26735 	(_x) = (_x) | EESK;					\
26736 	CSR_WRITE_1((_sc), RE_EECMD, (_x));	\
26737 	DELAY(CLOCK_RATE);
26738 
26739 #define LowerClock(_sc,_x)				\
26740 	(_x) = (_x) & ~EESK;					\
26741 	CSR_WRITE_1((_sc), RE_EECMD, (_x));	\
26742 	DELAY(CLOCK_RATE);
26743 
26744 /*
26745  * Shift out bit(s) to the EEPROM.
26746  */
26747 static void re_eeprom_ShiftOutBits(struct re_softc *sc, int data, int count)
26748 {
26749         u_int16_t x, mask;
26750 
26751         mask = 0x01 << (count - 1);
26752         x = CSR_READ_1(sc, RE_EECMD);
26753 
26754         x &= ~(EEDO | EEDI);
26755 
26756         do {
26757                 x &= ~EEDI;
26758                 if (data & mask)
26759                         x |= EEDI;
26760 
26761                 CSR_WRITE_1(sc, RE_EECMD, x);
26762                 DELAY(CLOCK_RATE);
26763                 RaiseClock(sc,x);
26764                 LowerClock(sc,x);
26765                 mask = mask >> 1;
26766         } while (mask);
26767 
26768         x &= ~EEDI;
26769         CSR_WRITE_1(sc, RE_EECMD, x);
26770 }
26771 
26772 /*
26773  * Shift in bit(s) from the EEPROM.
26774  */
26775 static u_int16_t re_eeprom_ShiftInBits(struct re_softc *sc)
26776 {
26777         u_int16_t x,d,i;
26778         x = CSR_READ_1(sc, RE_EECMD);
26779 
26780         x &= ~(EEDO | EEDI);
26781         d = 0;
26782 
26783         for (i=0; i<16; i++) {
26784                 d = d << 1;
26785                 RaiseClock(sc, x);
26786 
26787                 x = CSR_READ_1(sc, RE_EECMD);
26788 
26789                 x &= ~(EEDI);
26790                 if (x & EEDO)
26791                         d |= 1;
26792 
26793                 LowerClock(sc, x);
26794         }
26795 
26796         return d;
26797 }
26798 
26799 /*
26800  * Clean up EEprom read/write setting
26801  */
26802 static void re_eeprom_EEpromCleanup(struct re_softc *sc)
26803 {
26804         u_int16_t x;
26805         x = CSR_READ_1(sc, RE_EECMD);
26806 
26807         x &= ~(EECS | EEDI);
26808         CSR_WRITE_1(sc, RE_EECMD, x);
26809 
26810         RaiseClock(sc, x);
26811         LowerClock(sc, x);
26812 }
26813 
26814 /*
26815  * Read a word of data stored in the EEPROM at address 'addr.'
26816  */
26817 static void re_eeprom_getword(struct re_softc *sc, int addr, u_int16_t *dest)
26818 {
26819         u_int16_t x;
26820 
26821         /* select EEPROM, reset bits, set EECS*/
26822         x = CSR_READ_1(sc, RE_EECMD);
26823 
26824         x &= ~(EEDI | EEDO | EESK | CR9346_EEM0);
26825         x |= CR9346_EEM1 | EECS;
26826         CSR_WRITE_1(sc, RE_EECMD, x);
26827 
26828         /* write the read opcode and register number in that order*/
26829         /* The opcode is 3bits in length, reg is 6 bits long*/
26830         re_eeprom_ShiftOutBits(sc, EEPROM_READ_OPCODE, 3);
26831 
26832         if (CSR_READ_4(sc, RE_RXCFG) & RE_RXCFG_RX_9356SEL)
26833                 re_eeprom_ShiftOutBits(sc, addr,8);	/*93c56=8*/
26834         else
26835                 re_eeprom_ShiftOutBits(sc, addr,6);	/*93c46=6*/
26836 
26837         /* Now read the data (16 bits) in from the selected EEPROM word*/
26838         *dest=re_eeprom_ShiftInBits(sc);
26839 
26840         re_eeprom_EEpromCleanup(sc);
26841         return;
26842 }
26843 
26844 /*
26845  * Read a sequence of words from the EEPROM.
26846  */
26847 static void re_read_eeprom(struct re_softc *sc, caddr_t dest, int off, int cnt, int swap)
26848 {
26849         int			i;
26850         u_int16_t		word = 0, *ptr;
26851 
26852         for (i = 0; i < cnt; i++) {
26853                 re_eeprom_getword(sc, off + i, &word);
26854                 ptr = (u_int16_t *)(dest + (i * 2));
26855                 if (swap)
26856                         *ptr = ntohs(word);
26857                 else
26858                         *ptr = word;
26859         }
26860 
26861         return;
26862 }
26863 
26864 #ifdef __DragonFly__
26865 
26866 int
26867 rtl_check_mac_version(struct re_softc *sc)
26868 {
26869 
26870 	return (re_check_mac_version(sc));
26871 }
26872 
26873 void
26874 rtl_init_software_variable(struct re_softc *sc)
26875 {
26876 
26877 	re_init_software_variable(sc);
26878 }
26879 
26880 void
26881 rtl_exit_oob(struct re_softc *sc)
26882 {
26883 
26884 	re_exit_oob(sc);
26885 }
26886 
26887 void
26888 rtl_hw_init(struct re_softc *sc)
26889 {
26890 
26891 	re_hw_init(sc);
26892 }
26893 
26894 void
26895 rtl_reset(struct re_softc *sc)
26896 {
26897 
26898 	re_reset(sc);
26899 }
26900 
26901 void
26902 rtl_get_hw_mac_address(struct re_softc *sc, u_int8_t *eaddr)
26903 {
26904 
26905 	re_get_hw_mac_address(sc, eaddr);
26906 }
26907 
26908 void
26909 rtl_phy_power_up(struct re_softc *sc)
26910 {
26911 
26912 	re_phy_power_up(sc->dev);
26913 }
26914 
26915 void
26916 rtl_hw_phy_config(struct re_softc *sc)
26917 {
26918 
26919 	re_hw_phy_config(sc);
26920 }
26921 
26922 void
26923 rtl_clrwol(struct re_softc *sc)
26924 {
26925 
26926 	re_clrwol(sc);
26927 }
26928 
26929 int
26930 rtl_ifmedia_upd(struct ifnet *ifp)
26931 {
26932 
26933 	return (re_ifmedia_upd(ifp));
26934 }
26935 
26936 void
26937 rtl_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr)
26938 {
26939 
26940 	re_ifmedia_sts(ifp, ifmr);
26941 }
26942 
26943 void
26944 rtl_stop(struct re_softc *sc)
26945 {
26946 
26947 	re_stop_rtl(sc);
26948 }
26949 
26950 u_int8_t
26951 rtl_link_ok(struct re_softc *sc)
26952 {
26953 
26954 	return (re_link_ok(sc));
26955 }
26956 
26957 void
26958 rtl_link_on_patch(struct re_softc *sc)
26959 {
26960 
26961 	re_link_on_patch(sc);
26962 }
26963 
26964 void
26965 rtl_set_eaddr(struct re_softc *sc)
26966 {
26967 
26968 	re_init_unlock(sc);
26969 }
26970 
26971 void
26972 rtl_hw_start(struct re_softc *sc)
26973 {
26974 
26975 	re_hw_start_unlock(sc);
26976 }
26977 
26978 void
26979 rtl_set_rx_packet_filter(struct re_softc *sc)
26980 {
26981 
26982 	re_set_rx_packet_filter(sc);
26983 }
26984 
26985 void
26986 rtl_hw_d3_para(struct re_softc *sc)
26987 {
26988 
26989 	re_hw_d3_para(sc);
26990 }
26991 
26992 void
26993 rtl_phy_power_down(struct re_softc *sc)
26994 {
26995 
26996 	re_phy_power_down(sc->dev);
26997 }
26998 
26999 void
27000 rtl_cmac_unmap(struct re_softc *sc)
27001 {
27002 
27003 	if (HW_DASH_SUPPORT_TYPE_3(sc) && sc->re_dash &&
27004 	    sc->re_mapped_cmac_handle != 0) {
27005 		bus_space_unmap(sc->re_cmac_tag, sc->re_mapped_cmac_handle,
27006 		    RE_REGS_SIZE);
27007 	}
27008 }
27009 
27010 #endif	/* __DragonFly__ */
27011